diff options
author | Rich Trott <rtrott@gmail.com> | 2016-08-06 12:11:02 -0700 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-08-10 13:04:27 -0400 |
commit | 60ff991c09d61d760e38af5899b5fec3e6a38ee9 (patch) | |
tree | cd9762d9851984326b61ac3ec27083ea60897286 /tools/eslint/node_modules | |
parent | 4a8b8048f274eba6ee6283f89d0effac16f59c56 (diff) | |
download | node-new-60ff991c09d61d760e38af5899b5fec3e6a38ee9.tar.gz |
tools: update to ESLint 3.2.2
PR-URL: https://github.com/nodejs/node/pull/7999
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'tools/eslint/node_modules')
436 files changed, 15077 insertions, 8253 deletions
diff --git a/tools/eslint/node_modules/acorn-jsx/package.json b/tools/eslint/node_modules/acorn-jsx/package.json index 1982020ad5..ecb4920524 100644 --- a/tools/eslint/node_modules/acorn-jsx/package.json +++ b/tools/eslint/node_modules/acorn-jsx/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "acorn-jsx@^3.0.0", + { + "raw": "acorn-jsx@^3.0.0", + "scope": null, + "escapedName": "acorn-jsx", + "name": "acorn-jsx", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/espree" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/acorn-jsx-3.0.1.tgz_1462206645285_0.17844340158626437" }, "_npmUser": { - "email": "me@rreverser.com", - "name": "rreverser" + "name": "rreverser", + "email": "me@rreverser.com" }, "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "name": "acorn-jsx", "raw": "acorn-jsx@^3.0.0", - "rawSpec": "^3.0.0", "scope": null, + "escapedName": "acorn-jsx", + "name": "acorn-jsx", + "rawSpec": "^3.0.0", "spec": ">=3.0.0 <4.0.0", "type": "range" }, @@ -58,8 +67,8 @@ "license": "MIT", "maintainers": [ { - "email": "me@rreverser.com", - "name": "rreverser" + "name": "rreverser", + "email": "me@rreverser.com" } ], "name": "acorn-jsx", diff --git a/tools/eslint/node_modules/acorn/AUTHORS b/tools/eslint/node_modules/acorn/AUTHORS index c459c44642..1b2061cd4b 100644 --- a/tools/eslint/node_modules/acorn/AUTHORS +++ b/tools/eslint/node_modules/acorn/AUTHORS @@ -1,7 +1,8 @@ --e List of Acorn contributors. Updated before every release. +List of Acorn contributors. Updated before every release. Adrian Rakovsky Alistair Braidwood +Amila Welihinda Andres Suarez Angelo Aparajita Fishman @@ -10,6 +11,7 @@ Artem Govorov Brandon Mills Charles Hughes Conrad Irwin +Daniel Tschinder David Bonnet Domenico Matteo ForbesLindesay @@ -26,6 +28,7 @@ Jordan Klassen Jürg Lehni keeyipchan Keheliya Gallaba +Kevin Irish Kevin Kwok krator Marijn Haverbeke @@ -49,6 +52,7 @@ ReadmeCritic r-e-d Richard Gibson Rich Harris +Rich-Harris Sebastian McKenzie Timothy Gu Toru Nagashima diff --git a/tools/eslint/node_modules/acorn/bin/acorn b/tools/eslint/node_modules/acorn/bin/acorn index 63b7615e35..cf4acd5631 100755 --- a/tools/eslint/node_modules/acorn/bin/acorn +++ b/tools/eslint/node_modules/acorn/bin/acorn @@ -1,71 +1,65 @@ #!/usr/bin/env node -"use strict"; +'use strict'; -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } +var path = require('path'); +var fs = require('fs'); +var acorn = require('../dist/acorn.js'); -var _path = require("path"); - -var _fs = require("fs"); - -var _distAcornJs = require("../dist/acorn.js"); - -var acorn = _interopRequireWildcard(_distAcornJs); - -var infile = undefined, - forceFile = undefined, - silent = false, - compact = false, - tokenize = false; -var options = {}; +var infile; +var forceFile; +var silent = false; +var compact = false; +var tokenize = false; +var options = {} function help(status) { - var print = status == 0 ? console.log : console.error; - print("usage: " + (0, _path.basename)(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]"); - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]"); - process.exit(status); + var print = (status == 0) ? console.log : console.error + print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]") + print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]") + process.exit(status) } for (var i = 2; i < process.argv.length; ++i) { - var arg = process.argv[i]; - if ((arg == "-" || arg[0] != "-") && !infile) infile = arg;else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i];else if (arg == "--ecma3") options.ecmaVersion = 3;else if (arg == "--ecma5") options.ecmaVersion = 5;else if (arg == "--ecma6") options.ecmaVersion = 6;else if (arg == "--ecma7") options.ecmaVersion = 7;else if (arg == "--locations") options.locations = true;else if (arg == "--allow-hash-bang") options.allowHashBang = true;else if (arg == "--silent") silent = true;else if (arg == "--compact") compact = true;else if (arg == "--help") help(0);else if (arg == "--tokenize") tokenize = true;else if (arg == "--module") options.sourceType = 'module';else help(1); + var arg = process.argv[i] + if ((arg == "-" || arg[0] != "-") && !infile) infile = arg + else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i] + else if (arg == "--ecma3") options.ecmaVersion = 3 + else if (arg == "--ecma5") options.ecmaVersion = 5 + else if (arg == "--ecma6") options.ecmaVersion = 6 + else if (arg == "--ecma7") options.ecmaVersion = 7 + else if (arg == "--locations") options.locations = true + else if (arg == "--allow-hash-bang") options.allowHashBang = true + else if (arg == "--silent") silent = true + else if (arg == "--compact") compact = true + else if (arg == "--help") help(0) + else if (arg == "--tokenize") tokenize = true + else if (arg == "--module") options.sourceType = 'module' + else help(1) } function run(code) { - var result = undefined; + var result if (!tokenize) { - try { - result = acorn.parse(code, options); - } catch (e) { - console.error(e.message);process.exit(1); - } + try { result = acorn.parse(code, options) } + catch(e) { console.error(e.message); process.exit(1) } } else { - result = []; - var tokenizer = acorn.tokenizer(code, options), - token = undefined; + result = [] + var tokenizer = acorn.tokenizer(code, options), token while (true) { - try { - token = tokenizer.getToken(); - } catch (e) { - console.error(e.message);process.exit(1); - } - result.push(token); - if (token.type == acorn.tokTypes.eof) break; + try { token = tokenizer.getToken() } + catch(e) { console.error(e.message); process.exit(1) } + result.push(token) + if (token.type == acorn.tokTypes.eof) break } } - if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)); + if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)) } if (forceFile || infile && infile != "-") { - run((0, _fs.readFileSync)(infile, "utf8")); + run(fs.readFileSync(infile, "utf8")) } else { - (function () { - var code = ""; - process.stdin.resume(); - process.stdin.on("data", function (chunk) { - return code += chunk; - }); - process.stdin.on("end", function () { - return run(code); - }); - })(); + var code = "" + process.stdin.resume() + process.stdin.on("data", function (chunk) { return code += chunk; }) + process.stdin.on("end", function () { return run(code); }) }
\ No newline at end of file diff --git a/tools/eslint/node_modules/acorn/bin/build-acorn.js b/tools/eslint/node_modules/acorn/bin/build-acorn.js deleted file mode 100644 index 71f2cf941f..0000000000 --- a/tools/eslint/node_modules/acorn/bin/build-acorn.js +++ /dev/null @@ -1,82 +0,0 @@ -var fs = require("fs"), path = require("path") -var stream = require("stream") - -var browserify = require("browserify") -var babel = require('babel-core') -var babelify = require("babelify").configure({loose: "all"}) - -process.chdir(path.resolve(__dirname, "..")) - -browserify({standalone: "acorn"}) - .plugin(require('browserify-derequire')) - .transform(babelify) - .require("./src/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn.js")) - -var ACORN_PLACEHOLDER = "this_function_call_should_be_replaced_with_a_call_to_load_acorn()"; -function acornShimPrepare(file) { - var tr = new stream.Transform - if (file == path.resolve(__dirname, "../src/index.js")) { - var sent = false - tr._transform = function(chunk, _, callback) { - if (!sent) { - sent = true - callback(null, ACORN_PLACEHOLDER); - } else { - callback() - } - } - } else { - tr._transform = function(chunk, _, callback) { callback(null, chunk) } - } - return tr -} -function acornShimComplete() { - var tr = new stream.Transform - var buffer = ""; - tr._transform = function(chunk, _, callback) { - buffer += chunk.toString("utf8"); - callback(); - }; - tr._flush = function (callback) { - tr.push(buffer.replace(ACORN_PLACEHOLDER, "module.exports = typeof acorn != 'undefined' ? acorn : require(\"./acorn\")")); - callback(null); - }; - return tr; -} - -browserify({standalone: "acorn.loose"}) - .plugin(require('browserify-derequire')) - .transform(acornShimPrepare) - .transform(babelify) - .require("./src/loose/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(acornShimComplete()) - .pipe(fs.createWriteStream("dist/acorn_loose.js")) - -browserify({standalone: "acorn.walk"}) - .plugin(require('browserify-derequire')) - .transform(acornShimPrepare) - .transform(babelify) - .require("./src/walk/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(acornShimComplete()) - .pipe(fs.createWriteStream("dist/walk.js")) - -babel.transformFile("./src/bin/acorn.js", function (err, result) { - if (err) return console.log("Error: " + err.message) - fs.writeFile("bin/acorn", result.code, function (err) { - if (err) return console.log("Error: " + err.message) - - // Make bin/acorn executable - if (process.platform === 'win32') - return - var stat = fs.statSync("bin/acorn") - var newPerm = stat.mode | parseInt('111', 8) - fs.chmodSync("bin/acorn", newPerm) - }) -}) diff --git a/tools/eslint/node_modules/acorn/bin/generate-identifier-regex.js b/tools/eslint/node_modules/acorn/bin/generate-identifier-regex.js index e9f3551032..100e8cf280 100644 --- a/tools/eslint/node_modules/acorn/bin/generate-identifier-regex.js +++ b/tools/eslint/node_modules/acorn/bin/generate-identifier-regex.js @@ -1,11 +1,13 @@ +'use strict'; + // Which Unicode version should be used? -var version = '8.0.0'; +var version = '9.0.0'; -var start = require('unicode-' + version + '/properties/ID_Start/code-points') - .filter(function(ch) { return ch > 127; }); +var start = require('unicode-' + version + '/Binary_Property/ID_Start/code-points.js') + .filter(function(ch) { return ch > 0x7f; }); var last = -1; -var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points') - .filter(function(ch) { return ch > 127 && search(start, ch, last + 1) == -1; })); +var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/Binary_Property/ID_Continue/code-points.js') + .filter(function(ch) { return ch > 0x7f && search(start, ch, last + 1) == -1; })); function search(arr, ch, starting) { for (var i = starting; arr[i] <= ch && i < arr.length; last = i++) diff --git a/tools/eslint/node_modules/acorn/dist/acorn.es.js b/tools/eslint/node_modules/acorn/dist/acorn.es.js new file mode 100644 index 0000000000..4460957fd7 --- /dev/null +++ b/tools/eslint/node_modules/acorn/dist/acorn.es.js @@ -0,0 +1,3112 @@ +// Reserved word lists for various dialects of the language + +var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + 7: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" +} + +// And the keywords + +var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this" + +var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" +} + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +// Generated by `bin/generate-identifier-regex.js`. + +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" +var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" + +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]") +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]") + +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null + +// These are a run-length and offset encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +// generated by bin/generate-identifier-regex.js +var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] +var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239] + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code, set) { + var pos = 0x10000 + for (var i = 0; i < set.length; i += 2) { + pos += set[i] + if (pos > code) return false + pos += set[i + 1] + if (pos >= code) return true + } +} + +// Test whether a given character code starts an identifier. + +function isIdentifierStart(code, astral) { + if (code < 65) return code === 36 + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) +} + +// Test whether a given character is part of an identifier. + +function isIdentifierChar(code, astral) { + if (code < 48) return code === 36 + if (code < 58) return true + if (code < 65) return false + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) +} + +// ## Token types + +// The assignment of fine-grained, information-carrying type objects +// allows the tokenizer to store the information it has about a +// token in a way that is very cheap for the parser to look up. + +// All token type variables start with an underscore, to make them +// easy to recognize. + +// The `beforeExpr` property is used to disambiguate between regular +// expressions and divisions. It is set on all token types that can +// be followed by an expression (thus, a slash after them would be a +// regular expression). +// +// The `startsExpr` property is used to check if the token ends a +// `yield` expression. It is set on all token types that either can +// directly start an expression (like a quotation mark) or can +// continue an expression (like the body of a string). +// +// `isLoop` marks a keyword as starting a loop, which is important +// to know when parsing a label, in order to allow or disallow +// continue jumps to that label. + +var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label + this.keyword = conf.keyword + this.beforeExpr = !!conf.beforeExpr + this.startsExpr = !!conf.startsExpr + this.isLoop = !!conf.isLoop + this.isAssign = !!conf.isAssign + this.prefix = !!conf.prefix + this.postfix = !!conf.postfix + this.binop = conf.binop || null + this.updateContext = null +}; + +function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) +} +var beforeExpr = {beforeExpr: true}; +var startsExpr = {startsExpr: true}; +// Map keyword names to token types. + +var keywordTypes = {} + +// Succinct definitions of keyword token types +function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name + return keywordTypes[name] = new TokenType(name, options) +} + +var tt = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=", 6), + relational: binop("</>", 7), + bitShift: binop("<</>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class"), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import"), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) +} + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +var lineBreak = /\r\n?|\n|\u2028|\u2029/ +var lineBreakG = new RegExp(lineBreak.source, "g") + +function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code == 0x2029 +} + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/ + +var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g + +function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]" +} + +// Checks if an object has a property. + +function has(obj, propName) { + return Object.prototype.hasOwnProperty.call(obj, propName) +} + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = function Position(line, col) { + this.line = line + this.column = col +}; + +Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) +}; + +var SourceLocation = function SourceLocation(p, start, end) { + this.start = start + this.end = end + if (p.sourceFile !== null) this.source = p.sourceFile +}; + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur + var match = lineBreakG.exec(input) + if (match && match.index < offset) { + ++line + cur = match.index + match[0].length + } else { + return new Position(line, offset - cur) + } + } +} + +// A second optional argument can be given to further configure +// the parser process. These options are recognized: + +var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3, or 5, or 6. This influences support for strict + // mode, the set of reserved words, support for getters and + // setters and other features. The default is 6. + ecmaVersion: 6, + // Source type ("script" or "module") for different semantics + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // th position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false, + plugins: {} +} + +// Interpret and default an options object + +function getOptions(opts) { + var options = {} + for (var opt in defaultOptions) + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] + if (options.allowReserved == null) + options.allowReserved = options.ecmaVersion < 5 + + if (isArray(options.onToken)) { + var tokens = options.onToken + options.onToken = function (token) { return tokens.push(token); } + } + if (isArray(options.onComment)) + options.onComment = pushComment(options, options.onComment) + + return options +} + +function pushComment(options, array) { + return function (block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? 'Block' : 'Line', + value: text, + start: start, + end: end + } + if (options.locations) + comment.loc = new SourceLocation(this, startLoc, endLoc) + if (options.ranges) + comment.range = [start, end] + array.push(comment) + } +} + +// Registered plugins +var plugins = {} + +function keywordRegexp(words) { + return new RegExp("^(" + words.replace(/ /g, "|") + ")$") +} + +var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options) + this.sourceFile = options.sourceFile + this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]) + var reserved = options.allowReserved ? "" : + reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "") + this.reservedWords = keywordRegexp(reserved) + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict + this.reservedWordsStrict = keywordRegexp(reservedStrict) + this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind) + this.input = String(input) + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false + + // Load plugins + this.loadPlugins(options.plugins) + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)) + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length + } else { + this.pos = this.lineStart = 0 + this.curLine = 1 + } + + // Properties of the current token: + // Its type + this.type = tt.eof + // For tokens that include more information than their type, the value + this.value = null + // Its start and end offset + this.start = this.end = this.pos + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition() + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null + this.lastTokStart = this.lastTokEnd = this.pos + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext() + this.exprAllowed = true + + // Figure out if it's a module code. + this.strict = this.inModule = options.sourceType === "module" + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1 + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false + // Labels in scope. + this.labels = [] + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') + this.skipLineComment(2) +}; + +// DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them +Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) }; +Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) }; + +Parser.prototype.extend = function extend (name, f) { + this[name] = f(this[name]) +}; + +Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { + var this$1 = this; + + for (var name in pluginConfigs) { + var plugin = plugins[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this$1, pluginConfigs[name]) + } +}; + +Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode() + this.nextToken() + return this.parseTopLevel(node) +}; + +var pp = Parser.prototype + +// ## Parser utilities + +// Test whether a statement node is the string literal `"use strict"`. + +pp.isUseStrict = function(stmt) { + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && + stmt.expression.type === "Literal" && + stmt.expression.raw.slice(1, -1) === "use strict" +} + +// Predicate that tests whether the next token is of the given +// type, and if yes, consumes it as a side effect. + +pp.eat = function(type) { + if (this.type === type) { + this.next() + return true + } else { + return false + } +} + +// Tests whether parsed token is a contextual keyword. + +pp.isContextual = function(name) { + return this.type === tt.name && this.value === name +} + +// Consumes contextual keyword if possible. + +pp.eatContextual = function(name) { + return this.value === name && this.eat(tt.name) +} + +// Asserts that following token is given contextual keyword. + +pp.expectContextual = function(name) { + if (!this.eatContextual(name)) this.unexpected() +} + +// Test whether a semicolon can be inserted at the current position. + +pp.canInsertSemicolon = function() { + return this.type === tt.eof || + this.type === tt.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) +} + +pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc) + return true + } +} + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. + +pp.semicolon = function() { + if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected() +} + +pp.afterTrailingComma = function(tokType) { + if (this.type == tokType) { + if (this.options.onTrailingComma) + this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc) + this.next() + return true + } +} + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error. + +pp.expect = function(type) { + this.eat(type) || this.unexpected() +} + +// Raise an unexpected token error. + +pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token") +} + +var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = 0 + this.trailingComma = 0 +}; + +pp.checkPatternErrors = function(refDestructuringErrors, andThrow) { + var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma + if (!andThrow) return !!trailing + if (trailing) this.raise(trailing, "Comma is not permitted after the rest element") +} + +pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign + if (!andThrow) return !!pos + if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns") +} + +var pp$1 = Parser.prototype + +// ### Statement parsing + +// Parse a program. Initializes the parser, reads any number of +// statements, and wraps them in a Program node. Optionally takes a +// `program` argument. If present, the statements will be appended +// to its body instead of creating a new node. + +pp$1.parseTopLevel = function(node) { + var this$1 = this; + + var first = true + if (!node.body) node.body = [] + while (this.type !== tt.eof) { + var stmt = this$1.parseStatement(true, true) + node.body.push(stmt) + if (first) { + if (this$1.isUseStrict(stmt)) this$1.setStrict(true) + first = false + } + } + this.next() + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType + } + return this.finishNode(node, "Program") +} + +var loopLabel = {kind: "loop"}; +var switchLabel = {kind: "switch"}; +pp$1.isLet = function() { + if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false + skipWhiteSpace.lastIndex = this.pos + var skip = skipWhiteSpace.exec(this.input) + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next) + if (nextCh === 91 || nextCh == 123) return true // '{' and '[' + if (isIdentifierStart(nextCh, true)) { + for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {} + var ident = this.input.slice(next, pos) + if (!this.isKeyword(ident)) return true + } + return false +} + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp$1.parseStatement = function(declaration, topLevel) { + var starttype = this.type, node = this.startNode(), kind + + if (this.isLet()) { + starttype = tt._var + kind = "let" + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case tt._debugger: return this.parseDebuggerStatement(node) + case tt._do: return this.parseDoStatement(node) + case tt._for: return this.parseForStatement(node) + case tt._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected() + return this.parseFunctionStatement(node) + case tt._class: + if (!declaration) this.unexpected() + return this.parseClass(node, true) + case tt._if: return this.parseIfStatement(node) + case tt._return: return this.parseReturnStatement(node) + case tt._switch: return this.parseSwitchStatement(node) + case tt._throw: return this.parseThrowStatement(node) + case tt._try: return this.parseTryStatement(node) + case tt._const: case tt._var: + kind = kind || this.value + if (!declaration && kind != "var") this.unexpected() + return this.parseVarStatement(node, kind) + case tt._while: return this.parseWhileStatement(node) + case tt._with: return this.parseWithStatement(node) + case tt.braceL: return this.parseBlock() + case tt.semi: return this.parseEmptyStatement(node) + case tt._export: + case tt._import: + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + this.raise(this.start, "'import' and 'export' may only appear at the top level") + if (!this.inModule) + this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") + } + return starttype === tt._import ? this.parseImport(node) : this.parseExport(node) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + var maybeName = this.value, expr = this.parseExpression() + if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) + return this.parseLabeledStatement(node, maybeName, expr) + else return this.parseExpressionStatement(node, expr) + } +} + +pp$1.parseBreakContinueStatement = function(node, keyword) { + var this$1 = this; + + var isBreak = keyword == "break" + this.next() + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null + else if (this.type !== tt.name) this.unexpected() + else { + node.label = this.parseIdent() + this.semicolon() + } + + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < this.labels.length; ++i) { + var lab = this$1.labels[i] + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break + if (node.label && isBreak) break + } + } + if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword) + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") +} + +pp$1.parseDebuggerStatement = function(node) { + this.next() + this.semicolon() + return this.finishNode(node, "DebuggerStatement") +} + +pp$1.parseDoStatement = function(node) { + this.next() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + this.expect(tt._while) + node.test = this.parseParenExpression() + if (this.options.ecmaVersion >= 6) + this.eat(tt.semi) + else + this.semicolon() + return this.finishNode(node, "DoWhileStatement") +} + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. + +pp$1.parseForStatement = function(node) { + this.next() + this.labels.push(loopLabel) + this.expect(tt.parenL) + if (this.type === tt.semi) return this.parseFor(node, null) + var isLet = this.isLet() + if (this.type === tt._var || this.type === tt._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value + this.next() + this.parseVar(init$1, true, kind) + this.finishNode(init$1, "VariableDeclaration") + if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && + !(kind !== "var" && init$1.declarations[0].init)) + return this.parseForIn(node, init$1) + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors + var init = this.parseExpression(true, refDestructuringErrors) + if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.checkPatternErrors(refDestructuringErrors, true) + this.toAssignable(init) + this.checkLVal(init) + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true) + } + return this.parseFor(node, init) +} + +pp$1.parseFunctionStatement = function(node) { + this.next() + return this.parseFunction(node, true) +} + +pp$1.parseIfStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + node.consequent = this.parseStatement(false) + node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null + return this.finishNode(node, "IfStatement") +} + +pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + this.raise(this.start, "'return' outside of function") + this.next() + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null + else { node.argument = this.parseExpression(); this.semicolon() } + return this.finishNode(node, "ReturnStatement") +} + +pp$1.parseSwitchStatement = function(node) { + var this$1 = this; + + this.next() + node.discriminant = this.parseParenExpression() + node.cases = [] + this.expect(tt.braceL) + this.labels.push(switchLabel) + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + for (var cur, sawDefault = false; this.type != tt.braceR;) { + if (this$1.type === tt._case || this$1.type === tt._default) { + var isCase = this$1.type === tt._case + if (cur) this$1.finishNode(cur, "SwitchCase") + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + this$1.next() + if (isCase) { + cur.test = this$1.parseExpression() + } else { + if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses") + sawDefault = true + cur.test = null + } + this$1.expect(tt.colon) + } else { + if (!cur) this$1.unexpected() + cur.consequent.push(this$1.parseStatement(true)) + } + } + if (cur) this.finishNode(cur, "SwitchCase") + this.next() // Closing brace + this.labels.pop() + return this.finishNode(node, "SwitchStatement") +} + +pp$1.parseThrowStatement = function(node) { + this.next() + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + this.raise(this.lastTokEnd, "Illegal newline after throw") + node.argument = this.parseExpression() + this.semicolon() + return this.finishNode(node, "ThrowStatement") +} + +// Reused empty array added for node fields that are always empty. + +var empty = [] + +pp$1.parseTryStatement = function(node) { + this.next() + node.block = this.parseBlock() + node.handler = null + if (this.type === tt._catch) { + var clause = this.startNode() + this.next() + this.expect(tt.parenL) + clause.param = this.parseBindingAtom() + this.checkLVal(clause.param, true) + this.expect(tt.parenR) + clause.body = this.parseBlock() + node.handler = this.finishNode(clause, "CatchClause") + } + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null + if (!node.handler && !node.finalizer) + this.raise(node.start, "Missing catch or finally clause") + return this.finishNode(node, "TryStatement") +} + +pp$1.parseVarStatement = function(node, kind) { + this.next() + this.parseVar(node, false, kind) + this.semicolon() + return this.finishNode(node, "VariableDeclaration") +} + +pp$1.parseWhileStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "WhileStatement") +} + +pp$1.parseWithStatement = function(node) { + if (this.strict) this.raise(this.start, "'with' in strict mode") + this.next() + node.object = this.parseParenExpression() + node.body = this.parseStatement(false) + return this.finishNode(node, "WithStatement") +} + +pp$1.parseEmptyStatement = function(node) { + this.next() + return this.finishNode(node, "EmptyStatement") +} + +pp$1.parseLabeledStatement = function(node, maybeName, expr) { + var this$1 = this; + + for (var i = 0; i < this.labels.length; ++i) + if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared") + var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null + for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) { + var label = this$1.labels[i$1] + if (label.statementStart == node.start) { + label.statementStart = this$1.start + label.kind = kind + } else break + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}) + node.body = this.parseStatement(true) + this.labels.pop() + node.label = expr + return this.finishNode(node, "LabeledStatement") +} + +pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr + this.semicolon() + return this.finishNode(node, "ExpressionStatement") +} + +// Parse a semicolon-enclosed block of statements, handling `"use +// strict"` declarations when `allowStrict` is true (used for +// function bodies). + +pp$1.parseBlock = function(allowStrict) { + var this$1 = this; + + var node = this.startNode(), first = true, oldStrict + node.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + var stmt = this$1.parseStatement(true) + node.body.push(stmt) + if (first && allowStrict && this$1.isUseStrict(stmt)) { + oldStrict = this$1.strict + this$1.setStrict(this$1.strict = true) + } + first = false + } + if (oldStrict === false) this.setStrict(false) + return this.finishNode(node, "BlockStatement") +} + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +pp$1.parseFor = function(node, init) { + node.init = init + this.expect(tt.semi) + node.test = this.type === tt.semi ? null : this.parseExpression() + this.expect(tt.semi) + node.update = this.type === tt.parenR ? null : this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "ForStatement") +} + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +pp$1.parseForIn = function(node, init) { + var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement" + this.next() + node.left = init + node.right = this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, type) +} + +// Parse a list of variable declarations. + +pp$1.parseVar = function(node, isFor, kind) { + var this$1 = this; + + node.declarations = [] + node.kind = kind + for (;;) { + var decl = this$1.startNode() + this$1.parseVarId(decl) + if (this$1.eat(tt.eq)) { + decl.init = this$1.parseMaybeAssign(isFor) + } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { + this$1.unexpected() + } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) { + this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value") + } else { + decl.init = null + } + node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")) + if (!this$1.eat(tt.comma)) break + } + return node +} + +pp$1.parseVarId = function(decl) { + decl.id = this.parseBindingAtom() + this.checkLVal(decl.id, true) +} + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseFunction = function(node, isStatement, allowExpressionBody) { + this.initFunction(node) + if (this.options.ecmaVersion >= 6) + node.generator = this.eat(tt.star) + var oldInGen = this.inGenerator + this.inGenerator = node.generator + if (isStatement || this.type === tt.name) + node.id = this.parseIdent() + this.parseFunctionParams(node) + this.parseFunctionBody(node, allowExpressionBody) + this.inGenerator = oldInGen + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") +} + +pp$1.parseFunctionParams = function(node) { + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false, true) +} + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseClass = function(node, isStatement) { + var this$1 = this; + + this.next() + this.parseClassId(node, isStatement) + this.parseClassSuper(node) + var classBody = this.startNode() + var hadConstructor = false + classBody.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (this$1.eat(tt.semi)) continue + var method = this$1.startNode() + var isGenerator = this$1.eat(tt.star) + var isMaybeStatic = this$1.type === tt.name && this$1.value === "static" + this$1.parsePropertyName(method) + method.static = isMaybeStatic && this$1.type !== tt.parenL + if (method.static) { + if (isGenerator) this$1.unexpected() + isGenerator = this$1.eat(tt.star) + this$1.parsePropertyName(method) + } + method.kind = "method" + var isGetSet = false + if (!method.computed) { + var key = method.key; + if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) { + isGetSet = true + method.kind = key.name + key = this$1.parsePropertyName(method) + } + if (!method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class") + if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier") + if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator") + method.kind = "constructor" + hadConstructor = true + } + } + this$1.parseClassMethod(classBody, method, isGenerator) + if (isGetSet) { + var paramCount = method.kind === "get" ? 0 : 1 + if (method.value.params.length !== paramCount) { + var start = method.value.start + if (method.kind === "get") + this$1.raiseRecoverable(start, "getter should have no params") + else + this$1.raiseRecoverable(start, "setter should have exactly one param") + } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + this$1.raise(method.value.params[0].start, "Setter cannot use rest params") + } + } + node.body = this.finishNode(classBody, "ClassBody") + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") +} + +pp$1.parseClassMethod = function(classBody, method, isGenerator) { + method.value = this.parseMethod(isGenerator) + classBody.body.push(this.finishNode(method, "MethodDefinition")) +} + +pp$1.parseClassId = function(node, isStatement) { + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null +} + +pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null +} + +// Parses module export declaration. + +pp$1.parseExport = function(node) { + var this$1 = this; + + this.next() + // export * from '...' + if (this.eat(tt.star)) { + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + this.semicolon() + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(tt._default)) { // export default ... + var parens = this.type == tt.parenL + var expr = this.parseMaybeAssign() + var needsSemi = true + if (!parens && (expr.type == "FunctionExpression" || + expr.type == "ClassExpression")) { + needsSemi = false + if (expr.id) { + expr.type = expr.type == "FunctionExpression" + ? "FunctionDeclaration" + : "ClassDeclaration" + } + } + node.declaration = expr + if (needsSemi) this.semicolon() + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(true) + node.specifiers = [] + node.source = null + } else { // export { x, y as z } [from '...'] + node.declaration = null + node.specifiers = this.parseExportSpecifiers() + if (this.eatContextual("from")) { + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } else { + // check for keywords used as local names + for (var i = 0; i < node.specifiers.length; i++) { + if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) { + this$1.unexpected(node.specifiers[i].local.start) + } + } + + node.source = null + } + this.semicolon() + } + return this.finishNode(node, "ExportNamedDeclaration") +} + +pp$1.shouldParseExportStatement = function() { + return this.type.keyword || this.isLet() +} + +// Parses a comma-separated list of module exports. + +pp$1.parseExportSpecifiers = function() { + var this$1 = this; + + var nodes = [], first = true + // export { x, y as z } [from '...'] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node = this$1.startNode() + node.local = this$1.parseIdent(this$1.type === tt._default) + node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local + nodes.push(this$1.finishNode(node, "ExportSpecifier")) + } + return nodes +} + +// Parses import declaration. + +pp$1.parseImport = function(node) { + this.next() + // import '...' + if (this.type === tt.string) { + node.specifiers = empty + node.source = this.parseExprAtom() + } else { + node.specifiers = this.parseImportSpecifiers() + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } + this.semicolon() + return this.finishNode(node, "ImportDeclaration") +} + +// Parses a comma-separated list of module imports. + +pp$1.parseImportSpecifiers = function() { + var this$1 = this; + + var nodes = [], first = true + if (this.type === tt.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode() + node.local = this.parseIdent() + this.checkLVal(node.local, true) + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")) + if (!this.eat(tt.comma)) return nodes + } + if (this.type === tt.star) { + var node$1 = this.startNode() + this.next() + this.expectContextual("as") + node$1.local = this.parseIdent() + this.checkLVal(node$1.local, true) + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")) + return nodes + } + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node$2 = this$1.startNode() + node$2.imported = this$1.parseIdent(true) + if (this$1.eatContextual("as")) { + node$2.local = this$1.parseIdent() + } else { + node$2.local = node$2.imported + if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start) + if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved") + } + this$1.checkLVal(node$2.local, true) + nodes.push(this$1.finishNode(node$2, "ImportSpecifier")) + } + return nodes +} + +var pp$2 = Parser.prototype + +// Convert existing expression atom to assignable pattern +// if possible. + +pp$2.toAssignable = function(node, isBinding) { + var this$1 = this; + + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + break + + case "ObjectExpression": + node.type = "ObjectPattern" + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i] + if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter") + this$1.toAssignable(prop.value, isBinding) + } + break + + case "ArrayExpression": + node.type = "ArrayPattern" + this.toAssignableList(node.elements, isBinding) + break + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern" + delete node.operator + // falls through to AssignmentPattern + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value.") + break + } + + case "AssignmentPattern": + if (node.right.type === "YieldExpression") + this.raise(node.right.start, "Yield expression cannot be a default value") + break + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding) + break + + case "MemberExpression": + if (!isBinding) break + + default: + this.raise(node.start, "Assigning to rvalue") + } + } + return node +} + +// Convert list of expression atoms to binding list. + +pp$2.toAssignableList = function(exprList, isBinding) { + var this$1 = this; + + var end = exprList.length + if (end) { + var last = exprList[end - 1] + if (last && last.type == "RestElement") { + --end + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement" + var arg = last.argument + this.toAssignable(arg, isBinding) + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") + this.unexpected(arg.start) + --end + } + + if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + this.unexpected(last.argument.start) + } + for (var i = 0; i < end; i++) { + var elt = exprList[i] + if (elt) this$1.toAssignable(elt, isBinding) + } + return exprList +} + +// Parses spread element. + +pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode() + this.next() + node.argument = this.parseMaybeAssign(false, refDestructuringErrors) + return this.finishNode(node, "SpreadElement") +} + +pp$2.parseRest = function(allowNonIdent) { + var node = this.startNode() + this.next() + + // RestElement inside of a function parameter must be an identifier + if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected() + else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected() + + return this.finishNode(node, "RestElement") +} + +// Parses lvalue (assignable) atom. + +pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion < 6) return this.parseIdent() + switch (this.type) { + case tt.name: + return this.parseIdent() + + case tt.bracketL: + var node = this.startNode() + this.next() + node.elements = this.parseBindingList(tt.bracketR, true, true) + return this.finishNode(node, "ArrayPattern") + + case tt.braceL: + return this.parseObj(true) + + default: + this.unexpected() + } +} + +pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (first) first = false + else this$1.expect(tt.comma) + if (allowEmpty && this$1.type === tt.comma) { + elts.push(null) + } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { + break + } else if (this$1.type === tt.ellipsis) { + var rest = this$1.parseRest(allowNonIdent) + this$1.parseBindingListItem(rest) + elts.push(rest) + if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element") + this$1.expect(close) + break + } else { + var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc) + this$1.parseBindingListItem(elem) + elts.push(elem) + } + } + return elts +} + +pp$2.parseBindingListItem = function(param) { + return param +} + +// Parses assignment pattern around given atom if possible. + +pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom() + if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.right = this.parseMaybeAssign() + return this.finishNode(node, "AssignmentPattern") +} + +// Verify that a node is an lval — something that can be assigned +// to. + +pp$2.checkLVal = function(expr, isBinding, checkClashes) { + var this$1 = this; + + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode") + if (checkClashes) { + if (has(checkClashes, expr.name)) + this.raiseRecoverable(expr.start, "Argument name clash") + checkClashes[expr.name] = true + } + break + + case "MemberExpression": + if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression") + break + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) + this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes) + break + + case "ArrayPattern": + for (var i$1 = 0; i$1 < expr.elements.length; i$1++) { + var elem = expr.elements[i$1] + if (elem) this$1.checkLVal(elem, isBinding, checkClashes) + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, isBinding, checkClashes) + break + + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes) + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, isBinding, checkClashes) + break + + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue") + } +} + +var pp$3 = Parser.prototype + +// Check if property name clashes with already added. +// Object/class getters and setters are not allowed to clash — +// either with each other or with an init property — and in +// strict mode, init properties are also not allowed to be repeated. + +pp$3.checkPropClash = function(prop, propHash) { + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + return + var key = prop.key; + var name + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property") + propHash.proto = true + } + return + } + name = "$" + name + var other = propHash[name] + if (other) { + var isGetSet = kind !== "init" + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) + this.raiseRecoverable(key.start, "Redefinition of property") + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + } + } + other[kind] = true +} + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function(s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. + +// Parse a full expression. The optional arguments are used to +// forbid the `in` operator (in for loops initalization expressions) +// and provide reference for storing '=' operator inside shorthand +// property assignment in contexts where both object expression +// and object pattern might appear (so it's possible to raise +// delayed syntax error at correct position). + +pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors) + if (this.type === tt.comma) { + var node = this.startNodeAt(startPos, startLoc) + node.expressions = [expr] + while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)) + return this.finishNode(node, "SequenceExpression") + } + return expr +} + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.inGenerator && this.isContextual("yield")) return this.parseYield() + + var ownDestructuringErrors = false + if (!refDestructuringErrors) { + refDestructuringErrors = new DestructuringErrors + ownDestructuringErrors = true + } + var startPos = this.start, startLoc = this.startLoc + if (this.type == tt.parenL || this.type == tt.name) + this.potentialArrowAt = this.start + var left = this.parseMaybeConditional(noIn, refDestructuringErrors) + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc) + if (this.type.isAssign) { + this.checkPatternErrors(refDestructuringErrors, true) + if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors) + var node = this.startNodeAt(startPos, startLoc) + node.operator = this.value + node.left = this.type === tt.eq ? this.toAssignable(left) : left + refDestructuringErrors.shorthandAssign = 0 // reset because shorthand default was used correctly + this.checkLVal(left) + this.next() + node.right = this.parseMaybeAssign(noIn) + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true) + } + return left +} + +// Parse a ternary conditional (`?:`) operator. + +pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprOps(noIn, refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + if (this.eat(tt.question)) { + var node = this.startNodeAt(startPos, startLoc) + node.test = expr + node.consequent = this.parseMaybeAssign() + this.expect(tt.colon) + node.alternate = this.parseMaybeAssign(noIn) + return this.finishNode(node, "ConditionalExpression") + } + return expr +} + +// Start the precedence parser. + +pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeUnary(refDestructuringErrors, false) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + return this.parseExprOp(expr, startPos, startLoc, -1, noIn) +} + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. + +pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop + if (prec != null && (!noIn || this.type !== tt._in)) { + if (prec > minPrec) { + var logical = this.type === tt.logicalOR || this.type === tt.logicalAND + var op = this.value + this.next() + var startPos = this.start, startLoc = this.startLoc + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn) + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical) + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left +} + +pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.operator = op + node.right = right + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") +} + +// Parse unary operators, both prefix and postfix. + +pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, expr + if (this.type.prefix) { + var node = this.startNode(), update = this.type === tt.incDec + node.operator = this.value + node.prefix = true + this.next() + node.argument = this.parseMaybeUnary(null, true) + this.checkExpressionErrors(refDestructuringErrors, true) + if (update) this.checkLVal(node.argument) + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + this.raiseRecoverable(node.start, "Deleting local variable in strict mode") + else sawUnary = true + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") + } else { + expr = this.parseExprSubscripts(refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.operator = this$1.value + node$1.prefix = false + node$1.argument = expr + this$1.checkLVal(expr) + this$1.next() + expr = this$1.finishNode(node$1, "UpdateExpression") + } + } + + if (!sawUnary && this.eat(tt.starstar)) + return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) + else + return expr +} + +// Parse call, dot, and `[]`-subscript expressions. + +pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprAtom(refDestructuringErrors) + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")" + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr + return this.parseSubscripts(expr, startPos, startLoc) +} + +pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var this$1 = this; + + for (;;) { + if (this$1.eat(tt.dot)) { + var node = this$1.startNodeAt(startPos, startLoc) + node.object = base + node.property = this$1.parseIdent(true) + node.computed = false + base = this$1.finishNode(node, "MemberExpression") + } else if (this$1.eat(tt.bracketL)) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.object = base + node$1.property = this$1.parseExpression() + node$1.computed = true + this$1.expect(tt.bracketR) + base = this$1.finishNode(node$1, "MemberExpression") + } else if (!noCalls && this$1.eat(tt.parenL)) { + var node$2 = this$1.startNodeAt(startPos, startLoc) + node$2.callee = base + node$2.arguments = this$1.parseExprList(tt.parenR, false) + base = this$1.finishNode(node$2, "CallExpression") + } else if (this$1.type === tt.backQuote) { + var node$3 = this$1.startNodeAt(startPos, startLoc) + node$3.tag = base + node$3.quasi = this$1.parseTemplate() + base = this$1.finishNode(node$3, "TaggedTemplateExpression") + } else { + return base + } + } +} + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. + +pp$3.parseExprAtom = function(refDestructuringErrors) { + var node, canBeArrow = this.potentialArrowAt == this.start + switch (this.type) { + case tt._super: + if (!this.inFunction) + this.raise(this.start, "'super' outside of function or class") + + case tt._this: + var type = this.type === tt._this ? "ThisExpression" : "Super" + node = this.startNode() + this.next() + return this.finishNode(node, type) + + case tt.name: + var startPos = this.start, startLoc = this.startLoc + var id = this.parseIdent(this.type !== tt.name) + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]) + return id + + case tt.regexp: + var value = this.value + node = this.parseLiteral(value.value) + node.regex = {pattern: value.pattern, flags: value.flags} + return node + + case tt.num: case tt.string: + return this.parseLiteral(this.value) + + case tt._null: case tt._true: case tt._false: + node = this.startNode() + node.value = this.type === tt._null ? null : this.type === tt._true + node.raw = this.type.keyword + this.next() + return this.finishNode(node, "Literal") + + case tt.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow) + + case tt.bracketL: + node = this.startNode() + this.next() + node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors) + return this.finishNode(node, "ArrayExpression") + + case tt.braceL: + return this.parseObj(false, refDestructuringErrors) + + case tt._function: + node = this.startNode() + this.next() + return this.parseFunction(node, false) + + case tt._class: + return this.parseClass(this.startNode(), false) + + case tt._new: + return this.parseNew() + + case tt.backQuote: + return this.parseTemplate() + + default: + this.unexpected() + } +} + +pp$3.parseLiteral = function(value) { + var node = this.startNode() + node.value = value + node.raw = this.input.slice(this.start, this.end) + this.next() + return this.finishNode(node, "Literal") +} + +pp$3.parseParenExpression = function() { + this.expect(tt.parenL) + var val = this.parseExpression() + this.expect(tt.parenR) + return val +} + +pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, val + if (this.options.ecmaVersion >= 6) { + this.next() + + var innerStartPos = this.start, innerStartLoc = this.startLoc + var exprList = [], first = true + var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart + while (this.type !== tt.parenR) { + first ? first = false : this$1.expect(tt.comma) + if (this$1.type === tt.ellipsis) { + spreadStart = this$1.start + exprList.push(this$1.parseParenItem(this$1.parseRest())) + break + } else { + if (this$1.type === tt.parenL && !innerParenStart) { + innerParenStart = this$1.start + } + exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)) + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc + this.expect(tt.parenR) + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { + this.checkPatternErrors(refDestructuringErrors, true) + if (innerParenStart) this.unexpected(innerParenStart) + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length) this.unexpected(this.lastTokStart) + if (spreadStart) this.unexpected(spreadStart) + this.checkExpressionErrors(refDestructuringErrors, true) + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc) + val.expressions = exprList + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc) + } else { + val = exprList[0] + } + } else { + val = this.parseParenExpression() + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc) + par.expression = val + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } +} + +pp$3.parseParenItem = function(item) { + return item +} + +pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) +} + +// New's precedence is slightly tricky. It must allow its argument to +// be a `[]` or dot subscript expression, but not a call — at least, +// not without wrapping it in parentheses. Thus, it uses the noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. + +var empty$1 = [] + +pp$3.parseNew = function() { + var node = this.startNode() + var meta = this.parseIdent(true) + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta + node.property = this.parseIdent(true) + if (node.property.name !== "target") + this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target") + if (!this.inFunction) + this.raiseRecoverable(node.start, "new.target can only be used in functions") + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true) + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false) + else node.arguments = empty$1 + return this.finishNode(node, "NewExpression") +} + +// Parse template expression. + +pp$3.parseTemplateElement = function() { + var elem = this.startNode() + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), + cooked: this.value + } + this.next() + elem.tail = this.type === tt.backQuote + return this.finishNode(elem, "TemplateElement") +} + +pp$3.parseTemplate = function() { + var this$1 = this; + + var node = this.startNode() + this.next() + node.expressions = [] + var curElt = this.parseTemplateElement() + node.quasis = [curElt] + while (!curElt.tail) { + this$1.expect(tt.dollarBraceL) + node.expressions.push(this$1.parseExpression()) + this$1.expect(tt.braceR) + node.quasis.push(curElt = this$1.parseTemplateElement()) + } + this.next() + return this.finishNode(node, "TemplateLiteral") +} + +// Parse an object literal or binding pattern. + +pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var this$1 = this; + + var node = this.startNode(), first = true, propHash = {} + node.properties = [] + this.next() + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var prop = this$1.startNode(), isGenerator, startPos, startLoc + if (this$1.options.ecmaVersion >= 6) { + prop.method = false + prop.shorthand = false + if (isPattern || refDestructuringErrors) { + startPos = this$1.start + startLoc = this$1.startLoc + } + if (!isPattern) + isGenerator = this$1.eat(tt.star) + } + this$1.parsePropertyName(prop) + this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) + this$1.checkPropClash(prop, propHash) + node.properties.push(this$1.finishNode(prop, "Property")) + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") +} + +pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) { + if (this.eat(tt.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors) + prop.kind = "init" + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { + if (isPattern) this.unexpected() + prop.kind = "init" + prop.method = true + prop.value = this.parseMethod(isGenerator) + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type != tt.comma && this.type != tt.braceR)) { + if (isGenerator || isPattern) this.unexpected() + prop.kind = prop.key.name + this.parsePropertyName(prop) + prop.value = this.parseMethod(false) + var paramCount = prop.kind === "get" ? 0 : 1 + if (prop.value.params.length !== paramCount) { + var start = prop.value.start + if (prop.kind === "get") + this.raiseRecoverable(start, "getter should have no params") + else + this.raiseRecoverable(start, "setter should have exactly one param") + } + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params") + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (this.keywords.test(prop.key.name) || + (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) || + (this.inGenerator && prop.key.name == "yield")) + this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property") + prop.kind = "init" + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else if (this.type === tt.eq && refDestructuringErrors) { + if (!refDestructuringErrors.shorthandAssign) + refDestructuringErrors.shorthandAssign = this.start + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else { + prop.value = prop.key + } + prop.shorthand = true + } else this.unexpected() +} + +pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(tt.bracketL)) { + prop.computed = true + prop.key = this.parseMaybeAssign() + this.expect(tt.bracketR) + return prop.key + } else { + prop.computed = false + } + } + return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true) +} + +// Initialize empty function node. + +pp$3.initFunction = function(node) { + node.id = null + if (this.options.ecmaVersion >= 6) { + node.generator = false + node.expression = false + } +} + +// Parse object or class method. + +pp$3.parseMethod = function(isGenerator) { + var node = this.startNode(), oldInGen = this.inGenerator + this.inGenerator = isGenerator + this.initFunction(node) + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false) + if (this.options.ecmaVersion >= 6) + node.generator = isGenerator + this.parseFunctionBody(node, false) + this.inGenerator = oldInGen + return this.finishNode(node, "FunctionExpression") +} + +// Parse arrow function expression with given parameters. + +pp$3.parseArrowExpression = function(node, params) { + var oldInGen = this.inGenerator + this.inGenerator = false + this.initFunction(node) + node.params = this.toAssignableList(params, true) + this.parseFunctionBody(node, true) + this.inGenerator = oldInGen + return this.finishNode(node, "ArrowFunctionExpression") +} + +// Parse function body and check parameters. + +pp$3.parseFunctionBody = function(node, isArrowFunction) { + var isExpression = isArrowFunction && this.type !== tt.braceL + + if (isExpression) { + node.body = this.parseMaybeAssign() + node.expression = true + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, oldLabels = this.labels + this.inFunction = true; this.labels = [] + node.body = this.parseBlock(true) + node.expression = false + this.inFunction = oldInFunc; this.labels = oldLabels + } + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null; + if (this.strict || useStrict) { + var oldStrict = this.strict + this.strict = true + if (node.id) + this.checkLVal(node.id, true) + this.checkParams(node, useStrict) + this.strict = oldStrict + } else if (isArrowFunction) { + this.checkParams(node, useStrict) + } +} + +// Checks function params for various disallowed patterns such as using "eval" +// or "arguments" and duplicate parameters. + +pp$3.checkParams = function(node, useStrict) { + var this$1 = this; + + var nameHash = {} + for (var i = 0; i < node.params.length; i++) { + if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier") + this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list"); + this$1.checkLVal(node.params[i], true, nameHash) + } +} + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (!first) { + this$1.expect(tt.comma) + if (allowTrailingComma && this$1.afterTrailingComma(close)) break + } else first = false + + var elt + if (allowEmpty && this$1.type === tt.comma) + elt = null + else if (this$1.type === tt.ellipsis) { + elt = this$1.parseSpread(refDestructuringErrors) + if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) { + refDestructuringErrors.trailingComma = this$1.lastTokStart + } + } else + elt = this$1.parseMaybeAssign(false, refDestructuringErrors) + elts.push(elt) + } + return elts +} + +// Parse the next token as an identifier. If `liberal` is true (used +// when parsing properties), it will also convert keywords into +// identifiers. + +pp$3.parseIdent = function(liberal) { + var node = this.startNode() + if (liberal && this.options.allowReserved == "never") liberal = false + if (this.type === tt.name) { + if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && + (this.options.ecmaVersion >= 6 || + this.input.slice(this.start, this.end).indexOf("\\") == -1)) + this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved") + if (!liberal && this.inGenerator && this.value === "yield") + this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator") + node.name = this.value + } else if (liberal && this.type.keyword) { + node.name = this.type.keyword + } else { + this.unexpected() + } + this.next() + return this.finishNode(node, "Identifier") +} + +// Parses yield expression inside generator. + +pp$3.parseYield = function() { + var node = this.startNode() + this.next() + if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) { + node.delegate = false + node.argument = null + } else { + node.delegate = this.eat(tt.star) + node.argument = this.parseMaybeAssign() + } + return this.finishNode(node, "YieldExpression") +} + +var pp$4 = Parser.prototype + +// This function is used to raise exceptions on parse errors. It +// takes an offset integer (into the current `input`) to indicate +// the location of the error, attaches the position to the end +// of the error message, and then raises a `SyntaxError` with that +// message. + +pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos) + message += " (" + loc.line + ":" + loc.column + ")" + var err = new SyntaxError(message) + err.pos = pos; err.loc = loc; err.raisedAt = this.pos + throw err +} + +pp$4.raiseRecoverable = pp$4.raise + +pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } +} + +var Node = function Node(parser, pos, loc) { + this.type = "" + this.start = pos + this.end = 0 + if (parser.options.locations) + this.loc = new SourceLocation(parser, loc) + if (parser.options.directSourceFile) + this.sourceFile = parser.options.directSourceFile + if (parser.options.ranges) + this.range = [pos, 0] +}; + +// Start an AST node, attaching a start offset. + +var pp$5 = Parser.prototype + +pp$5.startNode = function() { + return new Node(this, this.start, this.startLoc) +} + +pp$5.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) +} + +// Finish an AST node, adding `type` and `end` properties. + +function finishNodeAt(node, type, pos, loc) { + node.type = type + node.end = pos + if (this.options.locations) + node.loc.end = loc + if (this.options.ranges) + node.range[1] = pos + return node +} + +pp$5.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) +} + +// Finish node at given position + +pp$5.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) +} + +var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + this.token = token + this.isExpr = !!isExpr + this.preserveSpace = !!preserveSpace + this.override = override +}; + +var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", true), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }), + f_expr: new TokContext("function", true) +} + +var pp$6 = Parser.prototype + +pp$6.initialContext = function() { + return [types.b_stat] +} + +pp$6.braceIsBlock = function(prevType) { + if (prevType === tt.colon) { + var parent = this.curContext() + if (parent === types.b_stat || parent === types.b_expr) + return !parent.isExpr + } + if (prevType === tt._return) + return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR) + return true + if (prevType == tt.braceL) + return this.curContext() === types.b_stat + return !this.exprAllowed +} + +pp$6.updateContext = function(prevType) { + var update, type = this.type + if (type.keyword && prevType == tt.dot) + this.exprAllowed = false + else if (update = type.updateContext) + update.call(this, prevType) + else + this.exprAllowed = type.beforeExpr +} + +// Token-specific context update code + +tt.parenR.updateContext = tt.braceR.updateContext = function() { + if (this.context.length == 1) { + this.exprAllowed = true + return + } + var out = this.context.pop() + if (out === types.b_stat && this.curContext() === types.f_expr) { + this.context.pop() + this.exprAllowed = false + } else if (out === types.b_tmpl) { + this.exprAllowed = true + } else { + this.exprAllowed = !out.isExpr + } +} + +tt.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr) + this.exprAllowed = true +} + +tt.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl) + this.exprAllowed = true +} + +tt.parenL.updateContext = function(prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while + this.context.push(statementParens ? types.p_stat : types.p_expr) + this.exprAllowed = true +} + +tt.incDec.updateContext = function() { + // tokExprAllowed stays unchanged +} + +tt._function.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else && + !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat)) + this.context.push(types.f_expr) + this.exprAllowed = false +} + +tt.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + this.context.pop() + else + this.context.push(types.q_tmpl) + this.exprAllowed = false +} + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = function Token(p) { + this.type = p.type + this.value = p.value + this.start = p.start + this.end = p.end + if (p.options.locations) + this.loc = new SourceLocation(p, p.startLoc, p.endLoc) + if (p.options.ranges) + this.range = [p.start, p.end] +}; + +// ## Tokenizer + +var pp$7 = Parser.prototype + +// Are we running under Rhino? +var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]" + +// Move to the next token + +pp$7.next = function() { + if (this.options.onToken) + this.options.onToken(new Token(this)) + + this.lastTokEnd = this.end + this.lastTokStart = this.start + this.lastTokEndLoc = this.endLoc + this.lastTokStartLoc = this.startLoc + this.nextToken() +} + +pp$7.getToken = function() { + this.next() + return new Token(this) +} + +// If we're in an ES6 environment, make parsers iterable +if (typeof Symbol !== "undefined") + pp$7[Symbol.iterator] = function () { + var self = this + return {next: function () { + var token = self.getToken() + return { + done: token.type === tt.eof, + value: token + } + }} + } + +// Toggle strict mode. Re-reads the next number or string to please +// pedantic tests (`"use strict"; 010;` should fail). + +pp$7.setStrict = function(strict) { + var this$1 = this; + + this.strict = strict + if (this.type !== tt.num && this.type !== tt.string) return + this.pos = this.start + if (this.options.locations) { + while (this.pos < this.lineStart) { + this$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1 + --this$1.curLine + } + } + this.nextToken() +} + +pp$7.curContext = function() { + return this.context[this.context.length - 1] +} + +// Read a single token, updating the parser object's token-related +// properties. + +pp$7.nextToken = function() { + var curContext = this.curContext() + if (!curContext || !curContext.preserveSpace) this.skipSpace() + + this.start = this.pos + if (this.options.locations) this.startLoc = this.curPosition() + if (this.pos >= this.input.length) return this.finishToken(tt.eof) + + if (curContext.override) return curContext.override(this) + else this.readToken(this.fullCharCodeAtPos()) +} + +pp$7.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + return this.readWord() + + return this.getTokenFromCode(code) +} + +pp$7.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos) + if (code <= 0xd7ff || code >= 0xe000) return code + var next = this.input.charCodeAt(this.pos + 1) + return (code << 10) + next - 0x35fdc00 +} + +pp$7.skipBlockComment = function() { + var this$1 = this; + + var startLoc = this.options.onComment && this.curPosition() + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2) + if (end === -1) this.raise(this.pos - 2, "Unterminated comment") + this.pos = end + 2 + if (this.options.locations) { + lineBreakG.lastIndex = start + var match + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this$1.curLine + this$1.lineStart = match.index + match[0].length + } + } + if (this.options.onComment) + this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()) +} + +pp$7.skipLineComment = function(startSkip) { + var this$1 = this; + + var start = this.pos + var startLoc = this.options.onComment && this.curPosition() + var ch = this.input.charCodeAt(this.pos+=startSkip) + while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this$1.pos + ch = this$1.input.charCodeAt(this$1.pos) + } + if (this.options.onComment) + this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()) +} + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp$7.skipSpace = function() { + var this$1 = this; + + loop: while (this.pos < this.input.length) { + var ch = this$1.input.charCodeAt(this$1.pos) + switch (ch) { + case 32: case 160: // ' ' + ++this$1.pos + break + case 13: + if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { + ++this$1.pos + } + case 10: case 8232: case 8233: + ++this$1.pos + if (this$1.options.locations) { + ++this$1.curLine + this$1.lineStart = this$1.pos + } + break + case 47: // '/' + switch (this$1.input.charCodeAt(this$1.pos + 1)) { + case 42: // '*' + this$1.skipBlockComment() + break + case 47: + this$1.skipLineComment(2) + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this$1.pos + } else { + break loop + } + } + } +} + +// Called at the end of every token. Sets `end`, `val`, and +// maintains `context` and `exprAllowed`, and skips the space after +// the token, so that the next one's `start` will point at the +// right position. + +pp$7.finishToken = function(type, val) { + this.end = this.pos + if (this.options.locations) this.endLoc = this.curPosition() + var prevType = this.type + this.type = type + this.value = val + + this.updateContext(prevType) +} + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +// +pp$7.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1) + if (next >= 48 && next <= 57) return this.readNumber(true) + var next2 = this.input.charCodeAt(this.pos + 2) + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3 + return this.finishToken(tt.ellipsis) + } else { + ++this.pos + return this.finishToken(tt.dot) + } +} + +pp$7.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1) + if (this.exprAllowed) {++this.pos; return this.readRegexp()} + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.slash, 1) +} + +pp$7.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + var tokentype = code === 42 ? tt.star : tt.modulo + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && next === 42) { + ++size + tokentype = tt.starstar + next = this.input.charCodeAt(this.pos + 2) + } + + if (next === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tokentype, size) +} + +pp$7.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1) +} + +pp$7.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.bitwiseXOR, 1) +} + +pp$7.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && + lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `<!--`, an XML-style comment that should be interpreted as a line comment + this.skipLineComment(4) + this.skipSpace() + return this.nextToken() + } + if (next === 61) size = 2 + return this.finishOp(tt.relational, size) +} + +pp$7.readToken_eq_excl = function(code) { // '=!' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) + if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>' + this.pos += 2 + return this.finishToken(tt.arrow) + } + return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1) +} + +pp$7.getTokenFromCode = function(code) { + switch (code) { + // The interpretation of a dot depends on whether it is followed + // by a digit or another two dots. + case 46: // '.' + return this.readToken_dot() + + // Punctuation tokens. + case 40: ++this.pos; return this.finishToken(tt.parenL) + case 41: ++this.pos; return this.finishToken(tt.parenR) + case 59: ++this.pos; return this.finishToken(tt.semi) + case 44: ++this.pos; return this.finishToken(tt.comma) + case 91: ++this.pos; return this.finishToken(tt.bracketL) + case 93: ++this.pos; return this.finishToken(tt.bracketR) + case 123: ++this.pos; return this.finishToken(tt.braceL) + case 125: ++this.pos; return this.finishToken(tt.braceR) + case 58: ++this.pos; return this.finishToken(tt.colon) + case 63: ++this.pos; return this.finishToken(tt.question) + + case 96: // '`' + if (this.options.ecmaVersion < 6) break + ++this.pos + return this.finishToken(tt.backQuote) + + case 48: // '0' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number + if (this.options.ecmaVersion >= 6) { + if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number + if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number + } + // Anything else beginning with a digit is an integer, octal + // number, or float. + case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9 + return this.readNumber(false) + + // Quotes produce strings. + case 34: case 39: // '"', "'" + return this.readString(code) + + // Operators are parsed inline in tiny state machines. '=' (61) is + // often referred to. `finishOp` simply skips the amount of + // characters it is given as second argument, and returns a token + // of the type given by its first argument. + + case 47: // '/' + return this.readToken_slash() + + case 37: case 42: // '%*' + return this.readToken_mult_modulo_exp(code) + + case 124: case 38: // '|&' + return this.readToken_pipe_amp(code) + + case 94: // '^' + return this.readToken_caret() + + case 43: case 45: // '+-' + return this.readToken_plus_min(code) + + case 60: case 62: // '<>' + return this.readToken_lt_gt(code) + + case 61: case 33: // '=!' + return this.readToken_eq_excl(code) + + case 126: // '~' + return this.finishOp(tt.prefix, 1) + } + + this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'") +} + +pp$7.finishOp = function(type, size) { + var str = this.input.slice(this.pos, this.pos + size) + this.pos += size + return this.finishToken(type, str) +} + +// Parse a regular expression. Some context-awareness is necessary, +// since a '/' inside a '[]' set does not end the expression. + +function tryCreateRegexp(src, flags, throwErrorAt, parser) { + try { + return new RegExp(src, flags) + } catch (e) { + if (throwErrorAt !== undefined) { + if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message) + throw e + } + } +} + +var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u") + +pp$7.readRegexp = function() { + var this$1 = this; + + var escaped, inClass, start = this.pos + for (;;) { + if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression") + var ch = this$1.input.charAt(this$1.pos) + if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression") + if (!escaped) { + if (ch === "[") inClass = true + else if (ch === "]" && inClass) inClass = false + else if (ch === "/" && !inClass) break + escaped = ch === "\\" + } else escaped = false + ++this$1.pos + } + var content = this.input.slice(start, this.pos) + ++this.pos + // Need to use `readWord1` because '\uXXXX' sequences are allowed + // here (don't ask). + var mods = this.readWord1() + var tmp = content, tmpFlags = "" + if (mods) { + var validFlags = /^[gim]*$/ + if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/ + if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag") + if (mods.indexOf("u") >= 0) { + if (regexpUnicodeSupport) { + tmpFlags = "u" + } else { + // Replace each astral symbol and every Unicode escape sequence that + // possibly represents an astral symbol or a paired surrogate with a + // single ASCII symbol to avoid throwing on regular expressions that + // are only valid in combination with the `/u` flag. + // Note: replacing with the ASCII symbol `x` might cause false + // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a + // perfectly valid pattern that is equivalent to `[a-b]`, but it would + // be replaced by `[x-b]` which throws an error. + tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) { + code = Number("0x" + code) + if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds") + return "x" + }) + tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x") + tmpFlags = tmpFlags.replace("u", "") + } + } + } + // Detect invalid regular expressions. + var value = null + // Rhino's regular expression parser is flaky and throws uncatchable exceptions, + // so don't do detection if we are running under Rhino + if (!isRhino) { + tryCreateRegexp(tmp, tmpFlags, start, this) + // Get a regular expression object for this pattern-flag pair, or `null` in + // case the current environment doesn't support the flags it uses. + value = tryCreateRegexp(content, mods) + } + return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value}) +} + +// Read an integer in the given radix. Return null if zero digits +// were read, the integer value otherwise. When `len` is given, this +// will return `null` unless the integer has exactly `len` digits. + +pp$7.readInt = function(radix, len) { + var this$1 = this; + + var start = this.pos, total = 0 + for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { + var code = this$1.input.charCodeAt(this$1.pos), val + if (code >= 97) val = code - 97 + 10 // a + else if (code >= 65) val = code - 65 + 10 // A + else if (code >= 48 && code <= 57) val = code - 48 // 0-9 + else val = Infinity + if (val >= radix) break + ++this$1.pos + total = total * radix + val + } + if (this.pos === start || len != null && this.pos - start !== len) return null + + return total +} + +pp$7.readRadixNumber = function(radix) { + this.pos += 2 // 0x + var val = this.readInt(radix) + if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix) + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number") + return this.finishToken(tt.num, val) +} + +// Read an integer, octal integer, or floating-point number. + +pp$7.readNumber = function(startsWithDot) { + var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48 + if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number") + var next = this.input.charCodeAt(this.pos) + if (next === 46) { // '.' + ++this.pos + this.readInt(10) + isFloat = true + next = this.input.charCodeAt(this.pos) + } + if (next === 69 || next === 101) { // 'eE' + next = this.input.charCodeAt(++this.pos) + if (next === 43 || next === 45) ++this.pos // '+-' + if (this.readInt(10) === null) this.raise(start, "Invalid number") + isFloat = true + } + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number") + + var str = this.input.slice(start, this.pos), val + if (isFloat) val = parseFloat(str) + else if (!octal || str.length === 1) val = parseInt(str, 10) + else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number") + else val = parseInt(str, 8) + return this.finishToken(tt.num, val) +} + +// Read a string value, interpreting backslash-escapes. + +pp$7.readCodePoint = function() { + var ch = this.input.charCodeAt(this.pos), code + + if (ch === 123) { + if (this.options.ecmaVersion < 6) this.unexpected() + var codePos = ++this.pos + code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos) + ++this.pos + if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds") + } else { + code = this.readHexChar(4) + } + return code +} + +function codePointToString(code) { + // UTF-16 Decoding + if (code <= 0xFFFF) return String.fromCharCode(code) + code -= 0x10000 + return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00) +} + +pp$7.readString = function(quote) { + var this$1 = this; + + var out = "", chunkStart = ++this.pos + for (;;) { + if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant") + var ch = this$1.input.charCodeAt(this$1.pos) + if (ch === quote) break + if (ch === 92) { // '\' + out += this$1.input.slice(chunkStart, this$1.pos) + out += this$1.readEscapedChar(false) + chunkStart = this$1.pos + } else { + if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant") + ++this$1.pos + } + } + out += this.input.slice(chunkStart, this.pos++) + return this.finishToken(tt.string, out) +} + +// Reads template string tokens. + +pp$7.readTmplToken = function() { + var this$1 = this; + + var out = "", chunkStart = this.pos + for (;;) { + if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template") + var ch = this$1.input.charCodeAt(this$1.pos) + if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${' + if (this$1.pos === this$1.start && this$1.type === tt.template) { + if (ch === 36) { + this$1.pos += 2 + return this$1.finishToken(tt.dollarBraceL) + } else { + ++this$1.pos + return this$1.finishToken(tt.backQuote) + } + } + out += this$1.input.slice(chunkStart, this$1.pos) + return this$1.finishToken(tt.template, out) + } + if (ch === 92) { // '\' + out += this$1.input.slice(chunkStart, this$1.pos) + out += this$1.readEscapedChar(true) + chunkStart = this$1.pos + } else if (isNewLine(ch)) { + out += this$1.input.slice(chunkStart, this$1.pos) + ++this$1.pos + switch (ch) { + case 13: + if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos + case 10: + out += "\n" + break + default: + out += String.fromCharCode(ch) + break + } + if (this$1.options.locations) { + ++this$1.curLine + this$1.lineStart = this$1.pos + } + chunkStart = this$1.pos + } else { + ++this$1.pos + } + } +} + +// Used to read escaped characters + +pp$7.readEscapedChar = function(inTemplate) { + var ch = this.input.charCodeAt(++this.pos) + ++this.pos + switch (ch) { + case 110: return "\n" // 'n' -> '\n' + case 114: return "\r" // 'r' -> '\r' + case 120: return String.fromCharCode(this.readHexChar(2)) // 'x' + case 117: return codePointToString(this.readCodePoint()) // 'u' + case 116: return "\t" // 't' -> '\t' + case 98: return "\b" // 'b' -> '\b' + case 118: return "\u000b" // 'v' -> '\u000b' + case 102: return "\f" // 'f' -> '\f' + case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n' + case 10: // ' \n' + if (this.options.locations) { this.lineStart = this.pos; ++this.curLine } + return "" + default: + if (ch >= 48 && ch <= 55) { + var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0] + var octal = parseInt(octalStr, 8) + if (octal > 255) { + octalStr = octalStr.slice(0, -1) + octal = parseInt(octalStr, 8) + } + if (octalStr !== "0" && (this.strict || inTemplate)) { + this.raise(this.pos - 2, "Octal literal in strict mode") + } + this.pos += octalStr.length - 1 + return String.fromCharCode(octal) + } + return String.fromCharCode(ch) + } +} + +// Used to read character escape sequences ('\x', '\u', '\U'). + +pp$7.readHexChar = function(len) { + var codePos = this.pos + var n = this.readInt(16, len) + if (n === null) this.raise(codePos, "Bad character escape sequence") + return n +} + +// Read an identifier, and return it as a string. Sets `this.containsEsc` +// to whether the word contained a '\u' escape. +// +// Incrementally adds only escaped chars, adding other chunks as-is +// as a micro-optimization. + +pp$7.readWord1 = function() { + var this$1 = this; + + this.containsEsc = false + var word = "", first = true, chunkStart = this.pos + var astral = this.options.ecmaVersion >= 6 + while (this.pos < this.input.length) { + var ch = this$1.fullCharCodeAtPos() + if (isIdentifierChar(ch, astral)) { + this$1.pos += ch <= 0xffff ? 1 : 2 + } else if (ch === 92) { // "\" + this$1.containsEsc = true + word += this$1.input.slice(chunkStart, this$1.pos) + var escStart = this$1.pos + if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u" + this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX") + ++this$1.pos + var esc = this$1.readCodePoint() + if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) + this$1.raise(escStart, "Invalid Unicode escape") + word += codePointToString(esc) + chunkStart = this$1.pos + } else { + break + } + first = false + } + return word + this.input.slice(chunkStart, this.pos) +} + +// Read an identifier or keyword token. Will check for reserved +// words when necessary. + +pp$7.readWord = function() { + var word = this.readWord1() + var type = tt.name + if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word)) + type = keywordTypes[word] + return this.finishToken(type, word) +} + +var version = "3.3.0" + +// The main exported interface (under `self.acorn` when in the +// browser) is a `parse` function that takes a code string and +// returns an abstract syntax tree as specified by [Mozilla parser +// API][api]. +// +// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + +function parse(input, options) { + return new Parser(options, input).parse() +} + +// This function tries to parse a single expression at a given +// offset in a string. Useful for parsing mixed-language formats +// that embed JavaScript expressions. + +function parseExpressionAt(input, pos, options) { + var p = new Parser(options, input, pos) + p.nextToken() + return p.parseExpression() +} + +// Acorn is organized as a tokenizer and a recursive-descent parser. +// The `tokenizer` export provides an interface to the tokenizer. + +function tokenizer(input, options) { + return new Parser(options, input) +} + +export { version, parse, parseExpressionAt, tokenizer, Parser, plugins, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, tt as tokTypes, TokContext, types as tokContexts, isIdentifierChar, isIdentifierStart, Token, isNewLine, lineBreak, lineBreakG };
\ No newline at end of file diff --git a/tools/eslint/node_modules/acorn/dist/acorn.js b/tools/eslint/node_modules/acorn/dist/acorn.js index b158f524d5..127dfb2da7 100644 --- a/tools/eslint/node_modules/acorn/dist/acorn.js +++ b/tools/eslint/node_modules/acorn/dist/acorn.js @@ -1,3384 +1,3142 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&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?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _parseutil = _dereq_("./parseutil"); - -var pp = _state.Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp.checkPropClash = function (prop, propHash) { - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) return; - var key = prop.key;var name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; - } - var kind = prop.kind; - - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); - propHash.proto = true; - } - return; - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raiseRecoverable(key.start, "Redefinition of property"); - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp.parseExpression = function (noIn, refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === _tokentype.types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp.parseMaybeAssign = function (noIn, refDestructuringErrors, afterLeftParse) { - if (this.inGenerator && this.isContextual("yield")) return this.parseYield(); - - var ownDestructuringErrors = false; - if (!refDestructuringErrors) { - refDestructuringErrors = new _parseutil.DestructuringErrors(); - ownDestructuringErrors = true; - } - var startPos = this.start, - startLoc = this.startLoc; - if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); - if (this.type.isAssign) { - this.checkPatternErrors(refDestructuringErrors, true); - if (!ownDestructuringErrors) _parseutil.DestructuringErrors.call(refDestructuringErrors); - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; - refDestructuringErrors.shorthandAssign = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else { - if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true); - } - return left; -}; - -// Parse a ternary conditional (`?:`) operator. - -pp.parseMaybeConditional = function (noIn, refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) return expr; - if (this.eat(_tokentype.types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(_tokentype.types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; - -// Start the precedence parser. - -pp.parseExprOps = function (noIn, refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) return expr; - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { - if (prec > minPrec) { - var logical = this.type === _tokentype.types.logicalOR || this.type === _tokentype.types.logicalAND; - var op = this.value; - this.next(); - var startPos = this.start, - startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - return left; -}; - -pp.buildBinary = function (startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression"); -}; - -// Parse unary operators, both prefix and postfix. - -pp.parseMaybeUnary = function (refDestructuringErrors, sawUnary) { - var startPos = this.start, - startLoc = this.startLoc, - expr = undefined; - if (this.type.prefix) { - var node = this.startNode(), - update = this.type === _tokentype.types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raiseRecoverable(node.start, "Deleting local variable in strict mode");else sawUnary = true; - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - } - - if (!sawUnary && this.eat(_tokentype.types.starstar)) return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false);else return expr; -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp.parseExprSubscripts = function (refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr; - return this.parseSubscripts(expr, startPos, startLoc); -}; - -pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { - for (;;) { - if (this.eat(_tokentype.types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - base = this.finishNode(node, "MemberExpression"); - } else if (this.eat(_tokentype.types.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(_tokentype.types.bracketR); - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(_tokentype.types.parenL)) { - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseExprList(_tokentype.types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (this.type === _tokentype.types.backQuote) { - var node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(); - base = this.finishNode(node, "TaggedTemplateExpression"); - } else { - return base; - } - } -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp.parseExprAtom = function (refDestructuringErrors) { - var node = undefined, - canBeArrow = this.potentialArrowAt == this.start; - switch (this.type) { - case _tokentype.types._super: - if (!this.inFunction) this.raise(this.start, "'super' outside of function or class"); - - case _tokentype.types._this: - var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case _tokentype.types.name: - var startPos = this.start, - startLoc = this.startLoc; - var id = this.parseIdent(this.type !== _tokentype.types.name); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); - return id; - - case _tokentype.types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; - - case _tokentype.types.num:case _tokentype.types.string: - return this.parseLiteral(this.value); - - case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false: - node = this.startNode(); - node.value = this.type === _tokentype.types._null ? null : this.type === _tokentype.types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal"); - - case _tokentype.types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case _tokentype.types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression"); - - case _tokentype.types.braceL: - return this.parseObj(false, refDestructuringErrors); - - case _tokentype.types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); - - case _tokentype.types._class: - return this.parseClass(this.startNode(), false); - - case _tokentype.types._new: - return this.parseNew(); - - case _tokentype.types.backQuote: - return this.parseTemplate(); +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.acorn = global.acorn || {}))); +}(this, function (exports) { 'use strict'; + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + 7: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + } + + // And the keywords + + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this" + + var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" + } + + // ## Character categories + + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + // Generated by `bin/generate-identifier-regex.js`. + + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]") + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]") + + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. They were + // generated by bin/generate-identifier-regex.js + var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239] + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000 + for (var i = 0; i < set.length; i += 2) { + pos += set[i] + if (pos > code) return false + pos += set[i + 1] + if (pos >= code) return true + } + } - default: - this.unexpected(); - } -}; - -pp.parseLiteral = function (value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal"); -}; - -pp.parseParenExpression = function () { - this.expect(_tokentype.types.parenL); - var val = this.parseExpression(); - this.expect(_tokentype.types.parenR); - return val; -}; - -pp.parseParenAndDistinguishExpression = function (canBeArrow) { - var startPos = this.start, - startLoc = this.startLoc, - val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); - - var innerStartPos = this.start, - innerStartLoc = this.startLoc; - var exprList = [], - first = true; - var refDestructuringErrors = new _parseutil.DestructuringErrors(), - spreadStart = undefined, - innerParenStart = undefined; - while (this.type !== _tokentype.types.parenR) { - first ? first = false : this.expect(_tokentype.types.comma); - if (this.type === _tokentype.types.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest())); - break; + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) return code === 36 + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) + } + + // Test whether a given character is part of an identifier. + + function isIdentifierChar(code, astral) { + if (code < 48) return code === 36 + if (code < 58) return true + if (code < 65) return false + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) + } + + // ## Token types + + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. + + // All token type variables start with an underscore, to make them + // easy to recognize. + + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label + this.keyword = conf.keyword + this.beforeExpr = !!conf.beforeExpr + this.startsExpr = !!conf.startsExpr + this.isLoop = !!conf.isLoop + this.isAssign = !!conf.isAssign + this.prefix = !!conf.prefix + this.postfix = !!conf.postfix + this.binop = conf.binop || null + this.updateContext = null + }; + + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}; + var startsExpr = {startsExpr: true}; + // Map keyword names to token types. + + var keywordTypes = {} + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name + return keywordTypes[name] = new TokenType(name, options) + } + + var tt = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=", 6), + relational: binop("</>", 7), + bitShift: binop("<</>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class"), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import"), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + } + + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. + + var lineBreak = /\r\n?|\n|\u2028|\u2029/ + var lineBreakG = new RegExp(lineBreak.source, "g") + + function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code == 0x2029 + } + + var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/ + + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g + + function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]" + } + + // Checks if an object has a property. + + function has(obj, propName) { + return Object.prototype.hasOwnProperty.call(obj, propName) + } + + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. + + var Position = function Position(line, col) { + this.line = line + this.column = col + }; + + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; + + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start + this.end = end + if (p.sourceFile !== null) this.source = p.sourceFile + }; + + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur + var match = lineBreakG.exec(input) + if (match && match.index < offset) { + ++line + cur = match.index + match[0].length } else { - if (this.type === _tokentype.types.parenL && !innerParenStart) { - innerParenStart = this.start; - } - exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + return new Position(line, offset - cur) } } - var innerEndPos = this.start, - innerEndLoc = this.startLoc; - this.expect(_tokentype.types.parenR); + } - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, true); - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(startPos, startLoc, exprList); + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3, or 5, or 6. This influences support for strict + // mode, the set of reserved words, support for getters and + // setters and other features. The default is 6. + ecmaVersion: 6, + // Source type ("script" or "module") for different semantics + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // th position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false, + plugins: {} + } + + // Interpret and default an options object + + function getOptions(opts) { + var options = {} + for (var opt in defaultOptions) + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] + if (options.allowReserved == null) + options.allowReserved = options.ecmaVersion < 5 + + if (isArray(options.onToken)) { + var tokens = options.onToken + options.onToken = function (token) { return tokens.push(token); } } + if (isArray(options.onComment)) + options.onComment = pushComment(options, options.onComment) - if (!exprList.length) this.unexpected(this.lastTokStart); - if (spreadStart) this.unexpected(spreadStart); - this.checkExpressionErrors(refDestructuringErrors, true); + return options + } - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } else { - return val; - } -}; - -pp.parseParenItem = function (item) { - return item; -}; - -pp.parseParenArrowList = function (startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList); -}; - -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. - -var empty = []; - -pp.parseNew = function () { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(_tokentype.types.dot)) { - node.meta = meta; - node.property = this.parseIdent(true); - if (node.property.name !== "target") this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); - if (!this.inFunction) this.raiseRecoverable(node.start, "new.target can only be used in functions"); - return this.finishNode(node, "MetaProperty"); - } - var startPos = this.start, - startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, false);else node.arguments = empty; - return this.finishNode(node, "NewExpression"); -}; - -// Parse template expression. - -pp.parseTemplateElement = function () { - var elem = this.startNode(); - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), - cooked: this.value - }; - this.next(); - elem.tail = this.type === _tokentype.types.backQuote; - return this.finishNode(elem, "TemplateElement"); -}; - -pp.parseTemplate = function () { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(); - node.quasis = [curElt]; - while (!curElt.tail) { - this.expect(_tokentype.types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(_tokentype.types.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; - -// Parse an object literal or binding pattern. - -pp.parseObj = function (isPattern, refDestructuringErrors) { - var node = this.startNode(), - first = true, - propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var prop = this.startNode(), - isGenerator = undefined, - startPos = undefined, - startLoc = undefined; - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; + function pushComment(options, array) { + return function (block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? 'Block' : 'Line', + value: text, + start: start, + end: end } - if (!isPattern) isGenerator = this.eat(_tokentype.types.star); - } - this.parsePropertyName(prop); - this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; - -pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) { - if (this.eat(_tokentype.types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === _tokentype.types.parenL) { - if (isPattern) this.unexpected(); - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type != _tokentype.types.comma && this.type != _tokentype.types.braceR) { - if (isGenerator || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") this.raiseRecoverable(start, "getter should have no params");else this.raiseRecoverable(start, "setter should have exactly one param"); - } - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (this.keywords.test(prop.key.name) || (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) || this.inGenerator && prop.key.name == "yield") this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property"); - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === _tokentype.types.eq && refDestructuringErrors) { - if (!refDestructuringErrors.shorthandAssign) refDestructuringErrors.shorthandAssign = this.start; - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + if (options.locations) + comment.loc = new SourceLocation(this, startLoc, endLoc) + if (options.ranges) + comment.range = [start, end] + array.push(comment) + } + } + + // Registered plugins + var plugins = {} + + function keywordRegexp(words) { + return new RegExp("^(" + words.replace(/ /g, "|") + ")$") + } + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options) + this.sourceFile = options.sourceFile + this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]) + var reserved = options.allowReserved ? "" : + reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "") + this.reservedWords = keywordRegexp(reserved) + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict + this.reservedWordsStrict = keywordRegexp(reservedStrict) + this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind) + this.input = String(input) + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false + + // Load plugins + this.loadPlugins(options.plugins) + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)) + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else this.unexpected(); -}; - -pp.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(_tokentype.types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(_tokentype.types.bracketR); - return prop.key; + this.pos = this.lineStart = 0 + this.curLine = 1 + } + + // Properties of the current token: + // Its type + this.type = tt.eof + // For tokens that include more information than their type, the value + this.value = null + // Its start and end offset + this.start = this.end = this.pos + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition() + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null + this.lastTokStart = this.lastTokEnd = this.pos + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext() + this.exprAllowed = true + + // Figure out if it's a module code. + this.strict = this.inModule = options.sourceType === "module" + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1 + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false + // Labels in scope. + this.labels = [] + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') + this.skipLineComment(2) + }; + + // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them + Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) }; + Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) }; + + Parser.prototype.extend = function extend (name, f) { + this[name] = f(this[name]) + }; + + Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { + var this$1 = this; + + for (var name in pluginConfigs) { + var plugin = plugins[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this$1, pluginConfigs[name]) + } + }; + + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode() + this.nextToken() + return this.parseTopLevel(node) + }; + + var pp = Parser.prototype + + // ## Parser utilities + + // Test whether a statement node is the string literal `"use strict"`. + + pp.isUseStrict = function(stmt) { + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && + stmt.expression.type === "Literal" && + stmt.expression.raw.slice(1, -1) === "use strict" + } + + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. + + pp.eat = function(type) { + if (this.type === type) { + this.next() + return true } else { - prop.computed = false; - } - } - return prop.key = this.type === _tokentype.types.num || this.type === _tokentype.types.string ? this.parseExprAtom() : this.parseIdent(true); -}; - -// Initialize empty function node. - -pp.initFunction = function (node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } -}; - -// Parse object or class method. - -pp.parseMethod = function (isGenerator) { - var node = this.startNode(), - oldInGen = this.inGenerator; - this.inGenerator = isGenerator; - this.initFunction(node); - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false); - if (this.options.ecmaVersion >= 6) node.generator = isGenerator; - this.parseFunctionBody(node, false); - this.inGenerator = oldInGen; - return this.finishNode(node, "FunctionExpression"); -}; - -// Parse arrow function expression with given parameters. - -pp.parseArrowExpression = function (node, params) { - var oldInGen = this.inGenerator; - this.inGenerator = false; - this.initFunction(node); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - this.inGenerator = oldInGen; - return this.finishNode(node, "ArrowFunctionExpression"); -}; - -// Parse function body and check parameters. - -pp.parseFunctionBody = function (node, isArrowFunction) { - var isExpression = isArrowFunction && this.type !== _tokentype.types.braceL; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldLabels = this.labels; - this.inFunction = true;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.labels = oldLabels; - } - - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - var oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - this.checkParams(node); - this.strict = oldStrict; - } else if (isArrowFunction) { - this.checkParams(node); - } -}; - -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. - -pp.checkParams = function (node) { - var nameHash = {}; - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; - - var elt = undefined; - if (allowEmpty && this.type === _tokentype.types.comma) elt = null;else if (this.type === _tokentype.types.ellipsis) { - elt = this.parseSpread(refDestructuringErrors); - if (this.type === _tokentype.types.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) { - refDestructuringErrors.trailingComma = this.lastTokStart; - } - } else elt = this.parseMaybeAssign(false, refDestructuringErrors); - elts.push(elt); - } - return elts; -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp.parseIdent = function (liberal) { - var node = this.startNode(); - if (liberal && this.options.allowReserved == "never") liberal = false; - if (this.type === _tokentype.types.name) { - if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1)) this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved"); - if (!liberal && this.inGenerator && this.value === "yield") this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator"); - node.name = this.value; - } else if (liberal && this.type.keyword) { - node.name = this.type.keyword; - } else { - this.unexpected(); - } - this.next(); - return this.finishNode(node, "Identifier"); -}; - -// Parses yield expression inside generator. - -pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.type == _tokentype.types.semi || this.canInsertSemicolon() || this.type != _tokentype.types.star && !this.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(_tokentype.types.star); - node.argument = this.parseMaybeAssign(); - } - return this.finishNode(node, "YieldExpression"); -}; - -},{"./parseutil":9,"./state":10,"./tokentype":14}],2:[function(_dereq_,module,exports){ -// Reserved word lists for various dialects of the language - -"use strict"; - -exports.__esModule = true; -exports.isIdentifierStart = isIdentifierStart; -exports.isIdentifierChar = isIdentifierChar; -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - 7: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; - -exports.reservedWords = reservedWords; -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " const class extends export import super" -}; - -exports.keywords = keywords; -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; -var nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by bin/generate-identifier-regex.js -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 287, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 449, 56, 1288, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 10591, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 168, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 3617, 6, 792618, 239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes); -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -},{}],3:[function(_dereq_,module,exports){ -// Acorn is a tiny, fast JavaScript parser written in JavaScript. -// -// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and -// various contributors and released under an MIT license. -// -// Git repositories for Acorn are available at -// -// http://marijnhaverbeke.nl/git/acorn -// https://github.com/ternjs/acorn.git -// -// Please use the [github bug tracker][ghbt] to report issues. -// -// [ghbt]: https://github.com/ternjs/acorn/issues -// -// This file defines the main parser interface. The library also comes -// with a [error-tolerant parser][dammit] and an -// [abstract syntax tree walker][walk], defined in other files. -// -// [dammit]: acorn_loose.js -// [walk]: util/walk.js + return false + } + } -"use strict"; + // Tests whether parsed token is a contextual keyword. -exports.__esModule = true; -exports.parse = parse; -exports.parseExpressionAt = parseExpressionAt; -exports.tokenizer = tokenizer; + pp.isContextual = function(name) { + return this.type === tt.name && this.value === name + } -var _state = _dereq_("./state"); + // Consumes contextual keyword if possible. -_dereq_("./parseutil"); + pp.eatContextual = function(name) { + return this.value === name && this.eat(tt.name) + } -_dereq_("./statement"); + // Asserts that following token is given contextual keyword. -_dereq_("./lval"); + pp.expectContextual = function(name) { + if (!this.eatContextual(name)) this.unexpected() + } -_dereq_("./expression"); + // Test whether a semicolon can be inserted at the current position. -_dereq_("./location"); + pp.canInsertSemicolon = function() { + return this.type === tt.eof || + this.type === tt.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + } -exports.Parser = _state.Parser; -exports.plugins = _state.plugins; + pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc) + return true + } + } -var _options = _dereq_("./options"); + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. -exports.defaultOptions = _options.defaultOptions; + pp.semicolon = function() { + if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected() + } -var _locutil = _dereq_("./locutil"); + pp.afterTrailingComma = function(tokType) { + if (this.type == tokType) { + if (this.options.onTrailingComma) + this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc) + this.next() + return true + } + } -exports.Position = _locutil.Position; -exports.SourceLocation = _locutil.SourceLocation; -exports.getLineInfo = _locutil.getLineInfo; + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. -var _node = _dereq_("./node"); + pp.expect = function(type) { + this.eat(type) || this.unexpected() + } -exports.Node = _node.Node; + // Raise an unexpected token error. -var _tokentype = _dereq_("./tokentype"); + pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token") + } -exports.TokenType = _tokentype.TokenType; -exports.tokTypes = _tokentype.types; + var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = 0 + this.trailingComma = 0 + }; -var _tokencontext = _dereq_("./tokencontext"); + pp.checkPatternErrors = function(refDestructuringErrors, andThrow) { + var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma + if (!andThrow) return !!trailing + if (trailing) this.raise(trailing, "Comma is not permitted after the rest element") + } -exports.TokContext = _tokencontext.TokContext; -exports.tokContexts = _tokencontext.types; + pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign + if (!andThrow) return !!pos + if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns") + } -var _identifier = _dereq_("./identifier"); + var pp$1 = Parser.prototype -exports.isIdentifierChar = _identifier.isIdentifierChar; -exports.isIdentifierStart = _identifier.isIdentifierStart; + // ### Statement parsing -var _tokenize = _dereq_("./tokenize"); + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. -exports.Token = _tokenize.Token; + pp$1.parseTopLevel = function(node) { + var this$1 = this; -var _whitespace = _dereq_("./whitespace"); + var first = true + if (!node.body) node.body = [] + while (this.type !== tt.eof) { + var stmt = this$1.parseStatement(true, true) + node.body.push(stmt) + if (first) { + if (this$1.isUseStrict(stmt)) this$1.setStrict(true) + first = false + } + } + this.next() + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType + } + return this.finishNode(node, "Program") + } + + var loopLabel = {kind: "loop"}; + var switchLabel = {kind: "switch"}; + pp$1.isLet = function() { + if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false + skipWhiteSpace.lastIndex = this.pos + var skip = skipWhiteSpace.exec(this.input) + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next) + if (nextCh === 91 || nextCh == 123) return true // '{' and '[' + if (isIdentifierStart(nextCh, true)) { + for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {} + var ident = this.input.slice(next, pos) + if (!this.isKeyword(ident)) return true + } + return false + } -exports.isNewLine = _whitespace.isNewLine; -exports.lineBreak = _whitespace.lineBreak; -exports.lineBreakG = _whitespace.lineBreakG; -var version = "3.1.0"; + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. -exports.version = version; -// The main exported interface (under `self.acorn` when in the -// browser) is a `parse` function that takes a code string and -// returns an abstract syntax tree as specified by [Mozilla parser -// API][api]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + pp$1.parseStatement = function(declaration, topLevel) { + var starttype = this.type, node = this.startNode(), kind -function parse(input, options) { - return new _state.Parser(options, input).parse(); -} + if (this.isLet()) { + starttype = tt._var + kind = "let" + } -// This function tries to parse a single expression at a given -// offset in a string. Useful for parsing mixed-language formats -// that embed JavaScript expressions. + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case tt._debugger: return this.parseDebuggerStatement(node) + case tt._do: return this.parseDoStatement(node) + case tt._for: return this.parseForStatement(node) + case tt._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected() + return this.parseFunctionStatement(node) + case tt._class: + if (!declaration) this.unexpected() + return this.parseClass(node, true) + case tt._if: return this.parseIfStatement(node) + case tt._return: return this.parseReturnStatement(node) + case tt._switch: return this.parseSwitchStatement(node) + case tt._throw: return this.parseThrowStatement(node) + case tt._try: return this.parseTryStatement(node) + case tt._const: case tt._var: + kind = kind || this.value + if (!declaration && kind != "var") this.unexpected() + return this.parseVarStatement(node, kind) + case tt._while: return this.parseWhileStatement(node) + case tt._with: return this.parseWithStatement(node) + case tt.braceL: return this.parseBlock() + case tt.semi: return this.parseEmptyStatement(node) + case tt._export: + case tt._import: + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + this.raise(this.start, "'import' and 'export' may only appear at the top level") + if (!this.inModule) + this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") + } + return starttype === tt._import ? this.parseImport(node) : this.parseExport(node) -function parseExpressionAt(input, pos, options) { - var p = new _state.Parser(options, input, pos); - p.nextToken(); - return p.parseExpression(); -} + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + var maybeName = this.value, expr = this.parseExpression() + if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) + return this.parseLabeledStatement(node, maybeName, expr) + else return this.parseExpressionStatement(node, expr) + } + } -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenizer` export provides an interface to the tokenizer. + pp$1.parseBreakContinueStatement = function(node, keyword) { + var this$1 = this; -function tokenizer(input, options) { - return new _state.Parser(options, input); -} + var isBreak = keyword == "break" + this.next() + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null + else if (this.type !== tt.name) this.unexpected() + else { + node.label = this.parseIdent() + this.semicolon() + } -},{"./expression":1,"./identifier":2,"./location":4,"./locutil":5,"./lval":6,"./node":7,"./options":8,"./parseutil":9,"./state":10,"./statement":11,"./tokencontext":12,"./tokenize":13,"./tokentype":14,"./whitespace":16}],4:[function(_dereq_,module,exports){ -"use strict"; + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < this.labels.length; ++i) { + var lab = this$1.labels[i] + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break + if (node.label && isBreak) break + } + } + if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword) + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + } + + pp$1.parseDebuggerStatement = function(node) { + this.next() + this.semicolon() + return this.finishNode(node, "DebuggerStatement") + } + + pp$1.parseDoStatement = function(node) { + this.next() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + this.expect(tt._while) + node.test = this.parseParenExpression() + if (this.options.ecmaVersion >= 6) + this.eat(tt.semi) + else + this.semicolon() + return this.finishNode(node, "DoWhileStatement") + } + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$1.parseForStatement = function(node) { + this.next() + this.labels.push(loopLabel) + this.expect(tt.parenL) + if (this.type === tt.semi) return this.parseFor(node, null) + var isLet = this.isLet() + if (this.type === tt._var || this.type === tt._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value + this.next() + this.parseVar(init$1, true, kind) + this.finishNode(init$1, "VariableDeclaration") + if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && + !(kind !== "var" && init$1.declarations[0].init)) + return this.parseForIn(node, init$1) + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors + var init = this.parseExpression(true, refDestructuringErrors) + if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.checkPatternErrors(refDestructuringErrors, true) + this.toAssignable(init) + this.checkLVal(init) + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true) + } + return this.parseFor(node, init) + } + + pp$1.parseFunctionStatement = function(node) { + this.next() + return this.parseFunction(node, true) + } -var _state = _dereq_("./state"); + pp$1.parseIfStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + node.consequent = this.parseStatement(false) + node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null + return this.finishNode(node, "IfStatement") + } + + pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + this.raise(this.start, "'return' outside of function") + this.next() -var _locutil = _dereq_("./locutil"); + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. -var pp = _state.Parser.prototype; + if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null + else { node.argument = this.parseExpression(); this.semicolon() } + return this.finishNode(node, "ReturnStatement") + } -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. + pp$1.parseSwitchStatement = function(node) { + var this$1 = this; -pp.raise = function (pos, message) { - var loc = _locutil.getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos;err.loc = loc;err.raisedAt = this.pos; - throw err; -}; + this.next() + node.discriminant = this.parseParenExpression() + node.cases = [] + this.expect(tt.braceL) + this.labels.push(switchLabel) -pp.raiseRecoverable = pp.raise; + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. -pp.curPosition = function () { - if (this.options.locations) { - return new _locutil.Position(this.curLine, this.pos - this.lineStart); + for (var cur, sawDefault = false; this.type != tt.braceR;) { + if (this$1.type === tt._case || this$1.type === tt._default) { + var isCase = this$1.type === tt._case + if (cur) this$1.finishNode(cur, "SwitchCase") + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + this$1.next() + if (isCase) { + cur.test = this$1.parseExpression() + } else { + if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses") + sawDefault = true + cur.test = null + } + this$1.expect(tt.colon) + } else { + if (!cur) this$1.unexpected() + cur.consequent.push(this$1.parseStatement(true)) + } + } + if (cur) this.finishNode(cur, "SwitchCase") + this.next() // Closing brace + this.labels.pop() + return this.finishNode(node, "SwitchStatement") + } + + pp$1.parseThrowStatement = function(node) { + this.next() + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + this.raise(this.lastTokEnd, "Illegal newline after throw") + node.argument = this.parseExpression() + this.semicolon() + return this.finishNode(node, "ThrowStatement") + } + + // Reused empty array added for node fields that are always empty. + + var empty = [] + + pp$1.parseTryStatement = function(node) { + this.next() + node.block = this.parseBlock() + node.handler = null + if (this.type === tt._catch) { + var clause = this.startNode() + this.next() + this.expect(tt.parenL) + clause.param = this.parseBindingAtom() + this.checkLVal(clause.param, true) + this.expect(tt.parenR) + clause.body = this.parseBlock() + node.handler = this.finishNode(clause, "CatchClause") + } + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null + if (!node.handler && !node.finalizer) + this.raise(node.start, "Missing catch or finally clause") + return this.finishNode(node, "TryStatement") } -}; -},{"./locutil":5,"./state":10}],5:[function(_dereq_,module,exports){ -"use strict"; + pp$1.parseVarStatement = function(node, kind) { + this.next() + this.parseVar(node, false, kind) + this.semicolon() + return this.finishNode(node, "VariableDeclaration") + } -exports.__esModule = true; -exports.getLineInfo = getLineInfo; + pp$1.parseWhileStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "WhileStatement") + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + pp$1.parseWithStatement = function(node) { + if (this.strict) this.raise(this.start, "'with' in strict mode") + this.next() + node.object = this.parseParenExpression() + node.body = this.parseStatement(false) + return this.finishNode(node, "WithStatement") + } -var _whitespace = _dereq_("./whitespace"); + pp$1.parseEmptyStatement = function(node) { + this.next() + return this.finishNode(node, "EmptyStatement") + } + + pp$1.parseLabeledStatement = function(node, maybeName, expr) { + var this$1 = this; + + for (var i = 0; i < this.labels.length; ++i) + if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared") + var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null + for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) { + var label = this$1.labels[i$1] + if (label.statementStart == node.start) { + label.statementStart = this$1.start + label.kind = kind + } else break + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}) + node.body = this.parseStatement(true) + this.labels.pop() + node.label = expr + return this.finishNode(node, "LabeledStatement") + } + + pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr + this.semicolon() + return this.finishNode(node, "ExpressionStatement") + } + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$1.parseBlock = function(allowStrict) { + var this$1 = this; + + var node = this.startNode(), first = true, oldStrict + node.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + var stmt = this$1.parseStatement(true) + node.body.push(stmt) + if (first && allowStrict && this$1.isUseStrict(stmt)) { + oldStrict = this$1.strict + this$1.setStrict(this$1.strict = true) + } + first = false + } + if (oldStrict === false) this.setStrict(false) + return this.finishNode(node, "BlockStatement") + } + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$1.parseFor = function(node, init) { + node.init = init + this.expect(tt.semi) + node.test = this.type === tt.semi ? null : this.parseExpression() + this.expect(tt.semi) + node.update = this.type === tt.parenR ? null : this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "ForStatement") + } + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$1.parseForIn = function(node, init) { + var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement" + this.next() + node.left = init + node.right = this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, type) + } + + // Parse a list of variable declarations. + + pp$1.parseVar = function(node, isFor, kind) { + var this$1 = this; + + node.declarations = [] + node.kind = kind + for (;;) { + var decl = this$1.startNode() + this$1.parseVarId(decl) + if (this$1.eat(tt.eq)) { + decl.init = this$1.parseMaybeAssign(isFor) + } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { + this$1.unexpected() + } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) { + this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value") + } else { + decl.init = null + } + node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")) + if (!this$1.eat(tt.comma)) break + } + return node + } + + pp$1.parseVarId = function(decl) { + decl.id = this.parseBindingAtom() + this.checkLVal(decl.id, true) + } + + // Parse a function declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseFunction = function(node, isStatement, allowExpressionBody) { + this.initFunction(node) + if (this.options.ecmaVersion >= 6) + node.generator = this.eat(tt.star) + var oldInGen = this.inGenerator + this.inGenerator = node.generator + if (isStatement || this.type === tt.name) + node.id = this.parseIdent() + this.parseFunctionParams(node) + this.parseFunctionBody(node, allowExpressionBody) + this.inGenerator = oldInGen + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") + } + + pp$1.parseFunctionParams = function(node) { + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false, true) + } + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseClass = function(node, isStatement) { + var this$1 = this; + + this.next() + this.parseClassId(node, isStatement) + this.parseClassSuper(node) + var classBody = this.startNode() + var hadConstructor = false + classBody.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (this$1.eat(tt.semi)) continue + var method = this$1.startNode() + var isGenerator = this$1.eat(tt.star) + var isMaybeStatic = this$1.type === tt.name && this$1.value === "static" + this$1.parsePropertyName(method) + method.static = isMaybeStatic && this$1.type !== tt.parenL + if (method.static) { + if (isGenerator) this$1.unexpected() + isGenerator = this$1.eat(tt.star) + this$1.parsePropertyName(method) + } + method.kind = "method" + var isGetSet = false + if (!method.computed) { + var key = method.key; + if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) { + isGetSet = true + method.kind = key.name + key = this$1.parsePropertyName(method) + } + if (!method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class") + if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier") + if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator") + method.kind = "constructor" + hadConstructor = true + } + } + this$1.parseClassMethod(classBody, method, isGenerator) + if (isGetSet) { + var paramCount = method.kind === "get" ? 0 : 1 + if (method.value.params.length !== paramCount) { + var start = method.value.start + if (method.kind === "get") + this$1.raiseRecoverable(start, "getter should have no params") + else + this$1.raiseRecoverable(start, "setter should have exactly one param") + } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + this$1.raise(method.value.params[0].start, "Setter cannot use rest params") + } + } + node.body = this.finishNode(classBody, "ClassBody") + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + } -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. + pp$1.parseClassMethod = function(classBody, method, isGenerator) { + method.value = this.parseMethod(isGenerator) + classBody.body.push(this.finishNode(method, "MethodDefinition")) + } -var Position = (function () { - function Position(line, col) { - _classCallCheck(this, Position); + pp$1.parseClassId = function(node, isStatement) { + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null + } - this.line = line; - this.column = col; + pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null } - Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); - }; + // Parses module export declaration. - return Position; -})(); + pp$1.parseExport = function(node) { + var this$1 = this; -exports.Position = Position; + this.next() + // export * from '...' + if (this.eat(tt.star)) { + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + this.semicolon() + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(tt._default)) { // export default ... + var parens = this.type == tt.parenL + var expr = this.parseMaybeAssign() + var needsSemi = true + if (!parens && (expr.type == "FunctionExpression" || + expr.type == "ClassExpression")) { + needsSemi = false + if (expr.id) { + expr.type = expr.type == "FunctionExpression" + ? "FunctionDeclaration" + : "ClassDeclaration" + } + } + node.declaration = expr + if (needsSemi) this.semicolon() + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(true) + node.specifiers = [] + node.source = null + } else { // export { x, y as z } [from '...'] + node.declaration = null + node.specifiers = this.parseExportSpecifiers() + if (this.eatContextual("from")) { + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } else { + // check for keywords used as local names + for (var i = 0; i < node.specifiers.length; i++) { + if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) { + this$1.unexpected(node.specifiers[i].local.start) + } + } -var SourceLocation = function SourceLocation(p, start, end) { - _classCallCheck(this, SourceLocation); + node.source = null + } + this.semicolon() + } + return this.finishNode(node, "ExportNamedDeclaration") + } - this.start = start; - this.end = end; - if (p.sourceFile !== null) this.source = p.sourceFile; -} + pp$1.shouldParseExportStatement = function() { + return this.type.keyword || this.isLet() + } -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. + // Parses a comma-separated list of module exports. -; + pp$1.parseExportSpecifiers = function() { + var this$1 = this; -exports.SourceLocation = SourceLocation; + var nodes = [], first = true + // export { x, y as z } [from '...'] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node = this$1.startNode() + node.local = this$1.parseIdent(this$1.type === tt._default) + node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local + nodes.push(this$1.finishNode(node, "ExportSpecifier")) + } + return nodes + } + + // Parses import declaration. -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - _whitespace.lineBreakG.lastIndex = cur; - var match = _whitespace.lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; + pp$1.parseImport = function(node) { + this.next() + // import '...' + if (this.type === tt.string) { + node.specifiers = empty + node.source = this.parseExprAtom() } else { - return new Position(line, offset - cur); + node.specifiers = this.parseImportSpecifiers() + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() } + this.semicolon() + return this.finishNode(node, "ImportDeclaration") } -} -},{"./whitespace":16}],6:[function(_dereq_,module,exports){ -"use strict"; + // Parses a comma-separated list of module imports. -var _tokentype = _dereq_("./tokentype"); + pp$1.parseImportSpecifiers = function() { + var this$1 = this; -var _state = _dereq_("./state"); + var nodes = [], first = true + if (this.type === tt.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode() + node.local = this.parseIdent() + this.checkLVal(node.local, true) + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")) + if (!this.eat(tt.comma)) return nodes + } + if (this.type === tt.star) { + var node$1 = this.startNode() + this.next() + this.expectContextual("as") + node$1.local = this.parseIdent() + this.checkLVal(node$1.local, true) + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")) + return nodes + } + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node$2 = this$1.startNode() + node$2.imported = this$1.parseIdent(true) + if (this$1.eatContextual("as")) { + node$2.local = this$1.parseIdent() + } else { + node$2.local = node$2.imported + if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start) + if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved") + } + this$1.checkLVal(node$2.local, true) + nodes.push(this$1.finishNode(node$2, "ImportSpecifier")) + } + return nodes + } -var _util = _dereq_("./util"); + var pp$2 = Parser.prototype -var pp = _state.Parser.prototype; + // Convert existing expression atom to assignable pattern + // if possible. -// Convert existing expression atom to assignable pattern -// if possible. + pp$2.toAssignable = function(node, isBinding) { + var this$1 = this; -pp.toAssignable = function (node, isBinding) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { case "Identifier": case "ObjectPattern": case "ArrayPattern": - break; + break case "ObjectExpression": - node.type = "ObjectPattern"; + node.type = "ObjectPattern" for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - this.toAssignable(prop.value, isBinding); + var prop = node.properties[i] + if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter") + this$1.toAssignable(prop.value, isBinding) } - break; + break case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding); - break; + node.type = "ArrayPattern" + this.toAssignableList(node.elements, isBinding) + break case "AssignmentExpression": if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; + node.type = "AssignmentPattern" + delete node.operator // falls through to AssignmentPattern } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - break; - } + this.raise(node.left.end, "Only '=' operator can be used for specifying default value.") + break + } case "AssignmentPattern": - if (node.right.type === "YieldExpression") this.raise(node.right.start, "Yield expression cannot be a default value"); - break; + if (node.right.type === "YieldExpression") + this.raise(node.right.start, "Yield expression cannot be a default value") + break case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding); - break; + node.expression = this.toAssignable(node.expression, isBinding) + break case "MemberExpression": - if (!isBinding) break; + if (!isBinding) break default: - this.raise(node.start, "Assigning to rvalue"); + this.raise(node.start, "Assigning to rvalue") + } } - } - return node; -}; - -// Convert list of expression atoms to binding list. + return node + } + + // Convert list of expression atoms to binding list. + + pp$2.toAssignableList = function(exprList, isBinding) { + var this$1 = this; + + var end = exprList.length + if (end) { + var last = exprList[end - 1] + if (last && last.type == "RestElement") { + --end + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement" + var arg = last.argument + this.toAssignable(arg, isBinding) + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") + this.unexpected(arg.start) + --end + } -pp.toAssignableList = function (exprList, isBinding) { - var end = exprList.length; - if (end) { - var last = exprList[end - 1]; - if (last && last.type == "RestElement") { - --end; - } else if (last && last.type == "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding); - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); - --end; + if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + this.unexpected(last.argument.start) } - - if (isBinding && last.type === "RestElement" && last.argument.type !== "Identifier") this.unexpected(last.argument.start); - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); + for (var i = 0; i < end; i++) { + var elt = exprList[i] + if (elt) this$1.toAssignable(elt, isBinding) + } + return exprList } - return exprList; -}; -// Parses spread element. + // Parses spread element. -pp.parseSpread = function (refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refDestructuringErrors); - return this.finishNode(node, "SpreadElement"); -}; + pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode() + this.next() + node.argument = this.parseMaybeAssign(false, refDestructuringErrors) + return this.finishNode(node, "SpreadElement") + } -pp.parseRest = function (allowNonIdent) { - var node = this.startNode(); - this.next(); + pp$2.parseRest = function(allowNonIdent) { + var node = this.startNode() + this.next() - // RestElement inside of a function parameter must be an identifier - if (allowNonIdent) node.argument = this.type === _tokentype.types.name ? this.parseIdent() : this.unexpected();else node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected(); + // RestElement inside of a function parameter must be an identifier + if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected() + else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected() - return this.finishNode(node, "RestElement"); -}; + return this.finishNode(node, "RestElement") + } -// Parses lvalue (assignable) atom. + // Parses lvalue (assignable) atom. -pp.parseBindingAtom = function () { - if (this.options.ecmaVersion < 6) return this.parseIdent(); - switch (this.type) { - case _tokentype.types.name: - return this.parseIdent(); + pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion < 6) return this.parseIdent() + switch (this.type) { + case tt.name: + return this.parseIdent() - case _tokentype.types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); + case tt.bracketL: + var node = this.startNode() + this.next() + node.elements = this.parseBindingList(tt.bracketR, true, true) + return this.finishNode(node, "ArrayPattern") - case _tokentype.types.braceL: - return this.parseObj(true); + case tt.braceL: + return this.parseObj(true) default: - this.unexpected(); - } -}; - -pp.parseBindingList = function (close, allowEmpty, allowTrailingComma, allowNonIdent) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) first = false;else this.expect(_tokentype.types.comma); - if (allowEmpty && this.type === _tokentype.types.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } else if (this.type === _tokentype.types.ellipsis) { - var rest = this.parseRest(allowNonIdent); - this.parseBindingListItem(rest); - elts.push(rest); - if (this.type === _tokentype.types.comma) this.raise(this.start, "Comma is not permitted after the rest element"); - this.expect(close); - break; - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); + this.unexpected() + } + } + + pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (first) first = false + else this$1.expect(tt.comma) + if (allowEmpty && this$1.type === tt.comma) { + elts.push(null) + } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { + break + } else if (this$1.type === tt.ellipsis) { + var rest = this$1.parseRest(allowNonIdent) + this$1.parseBindingListItem(rest) + elts.push(rest) + if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element") + this$1.expect(close) + break + } else { + var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc) + this$1.parseBindingListItem(elem) + elts.push(elem) + } } + return elts } - return elts; -}; -pp.parseBindingListItem = function (param) { - return param; -}; + pp$2.parseBindingListItem = function(param) { + return param + } + + // Parses assignment pattern around given atom if possible. -// Parses assignment pattern around given atom if possible. + pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom() + if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.right = this.parseMaybeAssign() + return this.finishNode(node, "AssignmentPattern") + } -pp.parseMaybeDefault = function (startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(_tokentype.types.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); -}; + // Verify that a node is an lval — something that can be assigned + // to. -// Verify that a node is an lval — something that can be assigned -// to. + pp$2.checkLVal = function(expr, isBinding, checkClashes) { + var this$1 = this; -pp.checkLVal = function (expr, isBinding, checkClashes) { - switch (expr.type) { + switch (expr.type) { case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode") if (checkClashes) { - if (_util.has(checkClashes, expr.name)) this.raiseRecoverable(expr.start, "Argument name clash"); - checkClashes[expr.name] = true; + if (has(checkClashes, expr.name)) + this.raiseRecoverable(expr.start, "Argument name clash") + checkClashes[expr.name] = true } - break; + break case "MemberExpression": - if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; + if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression") + break case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - this.checkLVal(expr.properties[i].value, isBinding, checkClashes); - }break; + for (var i = 0; i < expr.properties.length; i++) + this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes) + break case "ArrayPattern": - for (var i = 0; i < expr.elements.length; i++) { - var elem = expr.elements[i]; - if (elem) this.checkLVal(elem, isBinding, checkClashes); + for (var i$1 = 0; i$1 < expr.elements.length; i$1++) { + var elem = expr.elements[i$1] + if (elem) this$1.checkLVal(elem, isBinding, checkClashes) } - break; + break case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes); - break; + this.checkLVal(expr.left, isBinding, checkClashes) + break case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; + this.checkLVal(expr.argument, isBinding, checkClashes) + break case "ParenthesizedExpression": - this.checkLVal(expr.expression, isBinding, checkClashes); - break; + this.checkLVal(expr.expression, isBinding, checkClashes) + break default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -},{"./state":10,"./tokentype":14,"./util":15}],7:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var Node = function Node(parser, pos, loc) { - _classCallCheck(this, Node); - - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) this.loc = new _locutil.SourceLocation(parser, loc); - if (parser.options.directSourceFile) this.sourceFile = parser.options.directSourceFile; - if (parser.options.ranges) this.range = [pos, 0]; -} - -// Start an AST node, attaching a start offset. - -; - -exports.Node = Node; -var pp = _state.Parser.prototype; - -pp.startNode = function () { - return new Node(this, this.start, this.startLoc); -}; - -pp.startNodeAt = function (pos, loc) { - return new Node(this, pos, loc); -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - return node; -} - -pp.finishNode = function (node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); -}; - -// Finish node at given position - -pp.finishNodeAt = function (node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc); -}; - -},{"./locutil":5,"./state":10}],8:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; -exports.getOptions = getOptions; - -var _util = _dereq_("./util"); - -var _locutil = _dereq_("./locutil"); - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must - // be either 3, or 5, or 6. This influences support for strict - // mode, the set of reserved words, support for getters and - // setters and other features. The default is 6. - ecmaVersion: 6, - // Source type ("script" or "module") for different semantics - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // th position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false, - plugins: {} -}; - -exports.defaultOptions = defaultOptions; -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if (options.allowReserved == null) options.allowReserved = options.ecmaVersion < 5; - - if (_util.isArray(options.onToken)) { - (function () { - var tokens = options.onToken; - options.onToken = function (token) { - return tokens.push(token); - }; - })(); - } - if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); - - return options; -} - -function pushComment(options, array) { - return function (block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? 'Block' : 'Line', - value: text, - start: start, - end: end - }; - if (options.locations) comment.loc = new _locutil.SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; -} + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue") + } + } -},{"./locutil":5,"./util":15}],9:[function(_dereq_,module,exports){ -"use strict"; + var pp$3 = Parser.prototype -exports.__esModule = true; + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + pp$3.checkPropClash = function(prop, propHash) { + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + return + var key = prop.key; + var name + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property") + propHash.proto = true + } + return + } + name = "$" + name + var other = propHash[name] + if (other) { + var isGetSet = kind !== "init" + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) + this.raiseRecoverable(key.start, "Redefinition of property") + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + } + } + other[kind] = true + } + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors) + if (this.type === tt.comma) { + var node = this.startNodeAt(startPos, startLoc) + node.expressions = [expr] + while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)) + return this.finishNode(node, "SequenceExpression") + } + return expr + } -var _tokentype = _dereq_("./tokentype"); + // Parse an assignment expression. This includes applications of + // operators like `+=`. -var _state = _dereq_("./state"); + pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.inGenerator && this.isContextual("yield")) return this.parseYield() -var _whitespace = _dereq_("./whitespace"); + var ownDestructuringErrors = false + if (!refDestructuringErrors) { + refDestructuringErrors = new DestructuringErrors + ownDestructuringErrors = true + } + var startPos = this.start, startLoc = this.startLoc + if (this.type == tt.parenL || this.type == tt.name) + this.potentialArrowAt = this.start + var left = this.parseMaybeConditional(noIn, refDestructuringErrors) + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc) + if (this.type.isAssign) { + this.checkPatternErrors(refDestructuringErrors, true) + if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors) + var node = this.startNodeAt(startPos, startLoc) + node.operator = this.value + node.left = this.type === tt.eq ? this.toAssignable(left) : left + refDestructuringErrors.shorthandAssign = 0 // reset because shorthand default was used correctly + this.checkLVal(left) + this.next() + node.right = this.parseMaybeAssign(noIn) + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true) + } + return left + } + + // Parse a ternary conditional (`?:`) operator. + + pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprOps(noIn, refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + if (this.eat(tt.question)) { + var node = this.startNodeAt(startPos, startLoc) + node.test = expr + node.consequent = this.parseMaybeAssign() + this.expect(tt.colon) + node.alternate = this.parseMaybeAssign(noIn) + return this.finishNode(node, "ConditionalExpression") + } + return expr + } + + // Start the precedence parser. + + pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeUnary(refDestructuringErrors, false) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + return this.parseExprOp(expr, startPos, startLoc, -1, noIn) + } + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop + if (prec != null && (!noIn || this.type !== tt._in)) { + if (prec > minPrec) { + var logical = this.type === tt.logicalOR || this.type === tt.logicalAND + var op = this.value + this.next() + var startPos = this.start, startLoc = this.startLoc + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn) + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical) + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left + } + + pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.operator = op + node.right = right + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + } + + // Parse unary operators, both prefix and postfix. + + pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, expr + if (this.type.prefix) { + var node = this.startNode(), update = this.type === tt.incDec + node.operator = this.value + node.prefix = true + this.next() + node.argument = this.parseMaybeUnary(null, true) + this.checkExpressionErrors(refDestructuringErrors, true) + if (update) this.checkLVal(node.argument) + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + this.raiseRecoverable(node.start, "Deleting local variable in strict mode") + else sawUnary = true + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") + } else { + expr = this.parseExprSubscripts(refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.operator = this$1.value + node$1.prefix = false + node$1.argument = expr + this$1.checkLVal(expr) + this$1.next() + expr = this$1.finishNode(node$1, "UpdateExpression") + } + } + + if (!sawUnary && this.eat(tt.starstar)) + return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) + else + return expr + } + + // Parse call, dot, and `[]`-subscript expressions. + + pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprAtom(refDestructuringErrors) + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")" + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr + return this.parseSubscripts(expr, startPos, startLoc) + } + + pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var this$1 = this; + + for (;;) { + if (this$1.eat(tt.dot)) { + var node = this$1.startNodeAt(startPos, startLoc) + node.object = base + node.property = this$1.parseIdent(true) + node.computed = false + base = this$1.finishNode(node, "MemberExpression") + } else if (this$1.eat(tt.bracketL)) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.object = base + node$1.property = this$1.parseExpression() + node$1.computed = true + this$1.expect(tt.bracketR) + base = this$1.finishNode(node$1, "MemberExpression") + } else if (!noCalls && this$1.eat(tt.parenL)) { + var node$2 = this$1.startNodeAt(startPos, startLoc) + node$2.callee = base + node$2.arguments = this$1.parseExprList(tt.parenR, false) + base = this$1.finishNode(node$2, "CallExpression") + } else if (this$1.type === tt.backQuote) { + var node$3 = this$1.startNodeAt(startPos, startLoc) + node$3.tag = base + node$3.quasi = this$1.parseTemplate() + base = this$1.finishNode(node$3, "TaggedTemplateExpression") + } else { + return base + } + } + } + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$3.parseExprAtom = function(refDestructuringErrors) { + var node, canBeArrow = this.potentialArrowAt == this.start + switch (this.type) { + case tt._super: + if (!this.inFunction) + this.raise(this.start, "'super' outside of function or class") + + case tt._this: + var type = this.type === tt._this ? "ThisExpression" : "Super" + node = this.startNode() + this.next() + return this.finishNode(node, type) + + case tt.name: + var startPos = this.start, startLoc = this.startLoc + var id = this.parseIdent(this.type !== tt.name) + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]) + return id + + case tt.regexp: + var value = this.value + node = this.parseLiteral(value.value) + node.regex = {pattern: value.pattern, flags: value.flags} + return node + + case tt.num: case tt.string: + return this.parseLiteral(this.value) + + case tt._null: case tt._true: case tt._false: + node = this.startNode() + node.value = this.type === tt._null ? null : this.type === tt._true + node.raw = this.type.keyword + this.next() + return this.finishNode(node, "Literal") + + case tt.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow) + + case tt.bracketL: + node = this.startNode() + this.next() + node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors) + return this.finishNode(node, "ArrayExpression") + + case tt.braceL: + return this.parseObj(false, refDestructuringErrors) + + case tt._function: + node = this.startNode() + this.next() + return this.parseFunction(node, false) + + case tt._class: + return this.parseClass(this.startNode(), false) + + case tt._new: + return this.parseNew() + + case tt.backQuote: + return this.parseTemplate() + + default: + this.unexpected() + } + } -var pp = _state.Parser.prototype; + pp$3.parseLiteral = function(value) { + var node = this.startNode() + node.value = value + node.raw = this.input.slice(this.start, this.end) + this.next() + return this.finishNode(node, "Literal") + } -// ## Parser utilities + pp$3.parseParenExpression = function() { + this.expect(tt.parenL) + var val = this.parseExpression() + this.expect(tt.parenR) + return val + } -// Test whether a statement node is the string literal `"use strict"`. + pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var this$1 = this; -pp.isUseStrict = function (stmt) { - return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; -}; + var startPos = this.start, startLoc = this.startLoc, val + if (this.options.ecmaVersion >= 6) { + this.next() + + var innerStartPos = this.start, innerStartLoc = this.startLoc + var exprList = [], first = true + var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart + while (this.type !== tt.parenR) { + first ? first = false : this$1.expect(tt.comma) + if (this$1.type === tt.ellipsis) { + spreadStart = this$1.start + exprList.push(this$1.parseParenItem(this$1.parseRest())) + break + } else { + if (this$1.type === tt.parenL && !innerParenStart) { + innerParenStart = this$1.start + } + exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)) + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc + this.expect(tt.parenR) -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { + this.checkPatternErrors(refDestructuringErrors, true) + if (innerParenStart) this.unexpected(innerParenStart) + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length) this.unexpected(this.lastTokStart) + if (spreadStart) this.unexpected(spreadStart) + this.checkExpressionErrors(refDestructuringErrors, true) + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc) + val.expressions = exprList + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc) + } else { + val = exprList[0] + } + } else { + val = this.parseParenExpression() + } -pp.eat = function (type) { - if (this.type === type) { - this.next(); - return true; - } else { - return false; + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc) + par.expression = val + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } } -}; -// Tests whether parsed token is a contextual keyword. + pp$3.parseParenItem = function(item) { + return item + } -pp.isContextual = function (name) { - return this.type === _tokentype.types.name && this.value === name; -}; + pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) + } -// Consumes contextual keyword if possible. + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. -pp.eatContextual = function (name) { - return this.value === name && this.eat(_tokentype.types.name); -}; + var empty$1 = [] -// Asserts that following token is given contextual keyword. + pp$3.parseNew = function() { + var node = this.startNode() + var meta = this.parseIdent(true) + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta + node.property = this.parseIdent(true) + if (node.property.name !== "target") + this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target") + if (!this.inFunction) + this.raiseRecoverable(node.start, "new.target can only be used in functions") + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true) + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false) + else node.arguments = empty$1 + return this.finishNode(node, "NewExpression") + } -pp.expectContextual = function (name) { - if (!this.eatContextual(name)) this.unexpected(); -}; + // Parse template expression. -// Test whether a semicolon can be inserted at the current position. + pp$3.parseTemplateElement = function() { + var elem = this.startNode() + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), + cooked: this.value + } + this.next() + elem.tail = this.type === tt.backQuote + return this.finishNode(elem, "TemplateElement") + } + + pp$3.parseTemplate = function() { + var this$1 = this; + + var node = this.startNode() + this.next() + node.expressions = [] + var curElt = this.parseTemplateElement() + node.quasis = [curElt] + while (!curElt.tail) { + this$1.expect(tt.dollarBraceL) + node.expressions.push(this$1.parseExpression()) + this$1.expect(tt.braceR) + node.quasis.push(curElt = this$1.parseTemplateElement()) + } + this.next() + return this.finishNode(node, "TemplateLiteral") + } + + // Parse an object literal or binding pattern. + + pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var this$1 = this; + + var node = this.startNode(), first = true, propHash = {} + node.properties = [] + this.next() + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var prop = this$1.startNode(), isGenerator, startPos, startLoc + if (this$1.options.ecmaVersion >= 6) { + prop.method = false + prop.shorthand = false + if (isPattern || refDestructuringErrors) { + startPos = this$1.start + startLoc = this$1.startLoc + } + if (!isPattern) + isGenerator = this$1.eat(tt.star) + } + this$1.parsePropertyName(prop) + this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) + this$1.checkPropClash(prop, propHash) + node.properties.push(this$1.finishNode(prop, "Property")) + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + } + + pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) { + if (this.eat(tt.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors) + prop.kind = "init" + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { + if (isPattern) this.unexpected() + prop.kind = "init" + prop.method = true + prop.value = this.parseMethod(isGenerator) + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type != tt.comma && this.type != tt.braceR)) { + if (isGenerator || isPattern) this.unexpected() + prop.kind = prop.key.name + this.parsePropertyName(prop) + prop.value = this.parseMethod(false) + var paramCount = prop.kind === "get" ? 0 : 1 + if (prop.value.params.length !== paramCount) { + var start = prop.value.start + if (prop.kind === "get") + this.raiseRecoverable(start, "getter should have no params") + else + this.raiseRecoverable(start, "setter should have exactly one param") + } + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params") + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (this.keywords.test(prop.key.name) || + (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) || + (this.inGenerator && prop.key.name == "yield")) + this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property") + prop.kind = "init" + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else if (this.type === tt.eq && refDestructuringErrors) { + if (!refDestructuringErrors.shorthandAssign) + refDestructuringErrors.shorthandAssign = this.start + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else { + prop.value = prop.key + } + prop.shorthand = true + } else this.unexpected() + } -pp.canInsertSemicolon = function () { - return this.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; + pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(tt.bracketL)) { + prop.computed = true + prop.key = this.parseMaybeAssign() + this.expect(tt.bracketR) + return prop.key + } else { + prop.computed = false + } + } + return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true) + } -pp.insertSemicolon = function () { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); - return true; + // Initialize empty function node. + + pp$3.initFunction = function(node) { + node.id = null + if (this.options.ecmaVersion >= 6) { + node.generator = false + node.expression = false + } } -}; -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. + // Parse object or class method. -pp.semicolon = function () { - if (!this.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected(); -}; + pp$3.parseMethod = function(isGenerator) { + var node = this.startNode(), oldInGen = this.inGenerator + this.inGenerator = isGenerator + this.initFunction(node) + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false) + if (this.options.ecmaVersion >= 6) + node.generator = isGenerator + this.parseFunctionBody(node, false) + this.inGenerator = oldInGen + return this.finishNode(node, "FunctionExpression") + } + + // Parse arrow function expression with given parameters. + + pp$3.parseArrowExpression = function(node, params) { + var oldInGen = this.inGenerator + this.inGenerator = false + this.initFunction(node) + node.params = this.toAssignableList(params, true) + this.parseFunctionBody(node, true) + this.inGenerator = oldInGen + return this.finishNode(node, "ArrowFunctionExpression") + } + + // Parse function body and check parameters. + + pp$3.parseFunctionBody = function(node, isArrowFunction) { + var isExpression = isArrowFunction && this.type !== tt.braceL + + if (isExpression) { + node.body = this.parseMaybeAssign() + node.expression = true + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, oldLabels = this.labels + this.inFunction = true; this.labels = [] + node.body = this.parseBlock(true) + node.expression = false + this.inFunction = oldInFunc; this.labels = oldLabels + } -pp.afterTrailingComma = function (tokType) { - if (this.type == tokType) { - if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); - this.next(); - return true; + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null; + if (this.strict || useStrict) { + var oldStrict = this.strict + this.strict = true + if (node.id) + this.checkLVal(node.id, true) + this.checkParams(node, useStrict) + this.strict = oldStrict + } else if (isArrowFunction) { + this.checkParams(node, useStrict) + } } -}; -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. -pp.expect = function (type) { - this.eat(type) || this.unexpected(); -}; + pp$3.checkParams = function(node, useStrict) { + var this$1 = this; -// Raise an unexpected token error. + var nameHash = {} + for (var i = 0; i < node.params.length; i++) { + if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier") + this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list"); + this$1.checkLVal(node.params[i], true, nameHash) + } + } -pp.unexpected = function (pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (!first) { + this$1.expect(tt.comma) + if (allowTrailingComma && this$1.afterTrailingComma(close)) break + } else first = false + + var elt + if (allowEmpty && this$1.type === tt.comma) + elt = null + else if (this$1.type === tt.ellipsis) { + elt = this$1.parseSpread(refDestructuringErrors) + if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) { + refDestructuringErrors.trailingComma = this$1.lastTokStart + } + } else + elt = this$1.parseMaybeAssign(false, refDestructuringErrors) + elts.push(elt) + } + return elts + } + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$3.parseIdent = function(liberal) { + var node = this.startNode() + if (liberal && this.options.allowReserved == "never") liberal = false + if (this.type === tt.name) { + if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && + (this.options.ecmaVersion >= 6 || + this.input.slice(this.start, this.end).indexOf("\\") == -1)) + this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved") + if (!liberal && this.inGenerator && this.value === "yield") + this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator") + node.name = this.value + } else if (liberal && this.type.keyword) { + node.name = this.type.keyword + } else { + this.unexpected() + } + this.next() + return this.finishNode(node, "Identifier") + } -var DestructuringErrors = function DestructuringErrors() { - _classCallCheck(this, DestructuringErrors); + // Parses yield expression inside generator. - this.shorthandAssign = 0; - this.trailingComma = 0; -}; + pp$3.parseYield = function() { + var node = this.startNode() + this.next() + if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) { + node.delegate = false + node.argument = null + } else { + node.delegate = this.eat(tt.star) + node.argument = this.parseMaybeAssign() + } + return this.finishNode(node, "YieldExpression") + } -exports.DestructuringErrors = DestructuringErrors; + var pp$4 = Parser.prototype -pp.checkPatternErrors = function (refDestructuringErrors, andThrow) { - var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma; - if (!andThrow) return !!trailing; - if (trailing) this.raise(trailing, "Comma is not permitted after the rest element"); -}; + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. -pp.checkExpressionErrors = function (refDestructuringErrors, andThrow) { - var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign; - if (!andThrow) return !!pos; - if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns"); -}; + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos) + message += " (" + loc.line + ":" + loc.column + ")" + var err = new SyntaxError(message) + err.pos = pos; err.loc = loc; err.raisedAt = this.pos + throw err + } -},{"./state":10,"./tokentype":14,"./whitespace":16}],10:[function(_dereq_,module,exports){ -"use strict"; + pp$4.raiseRecoverable = pp$4.raise -exports.__esModule = true; + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var Node = function Node(parser, pos, loc) { + this.type = "" + this.start = pos + this.end = 0 + if (parser.options.locations) + this.loc = new SourceLocation(parser, loc) + if (parser.options.directSourceFile) + this.sourceFile = parser.options.directSourceFile + if (parser.options.ranges) + this.range = [pos, 0] + }; -var _identifier = _dereq_("./identifier"); + // Start an AST node, attaching a start offset. -var _tokentype = _dereq_("./tokentype"); + var pp$5 = Parser.prototype -var _whitespace = _dereq_("./whitespace"); + pp$5.startNode = function() { + return new Node(this, this.start, this.startLoc) + } -var _options = _dereq_("./options"); + pp$5.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + } -// Registered plugins -var plugins = {}; + // Finish an AST node, adding `type` and `end` properties. -exports.plugins = plugins; -function keywordRegexp(words) { - return new RegExp("^(" + words.replace(/ /g, "|") + ")$"); -} + function finishNodeAt(node, type, pos, loc) { + node.type = type + node.end = pos + if (this.options.locations) + node.loc.end = loc + if (this.options.ranges) + node.range[1] = pos + return node + } -var Parser = (function () { - function Parser(options, input, startPos) { - _classCallCheck(this, Parser); + pp$5.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + } - this.options = options = _options.getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = keywordRegexp(_identifier.keywords[options.ecmaVersion >= 6 ? 6 : 5]); - var reserved = options.allowReserved ? "" : _identifier.reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : ""); - this.reservedWords = keywordRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + _identifier.reservedWords.strict; - this.reservedWordsStrict = keywordRegexp(reservedStrict); - this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + _identifier.reservedWords.strictBind); - this.input = String(input); + // Finish node at given position - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; + pp$5.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + } - // Load plugins - this.loadPlugins(options.plugins); + var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + this.token = token + this.isExpr = !!isExpr + this.preserveSpace = !!preserveSpace + this.override = override + }; - // Set up token state + var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", true), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }), + f_expr: new TokContext("function", true) + } - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); - this.curLine = this.input.slice(0, this.lineStart).split(_whitespace.lineBreak).length; + var pp$6 = Parser.prototype + + pp$6.initialContext = function() { + return [types.b_stat] + } + + pp$6.braceIsBlock = function(prevType) { + if (prevType === tt.colon) { + var parent = this.curContext() + if (parent === types.b_stat || parent === types.b_expr) + return !parent.isExpr + } + if (prevType === tt._return) + return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR) + return true + if (prevType == tt.braceL) + return this.curContext() === types.b_stat + return !this.exprAllowed + } + + pp$6.updateContext = function(prevType) { + var update, type = this.type + if (type.keyword && prevType == tt.dot) + this.exprAllowed = false + else if (update = type.updateContext) + update.call(this, prevType) + else + this.exprAllowed = type.beforeExpr + } + + // Token-specific context update code + + tt.parenR.updateContext = tt.braceR.updateContext = function() { + if (this.context.length == 1) { + this.exprAllowed = true + return + } + var out = this.context.pop() + if (out === types.b_stat && this.curContext() === types.f_expr) { + this.context.pop() + this.exprAllowed = false + } else if (out === types.b_tmpl) { + this.exprAllowed = true } else { - this.pos = this.lineStart = 0; - this.curLine = 1; + this.exprAllowed = !out.isExpr } + } - // Properties of the current token: - // Its type - this.type = _tokentype.types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; + tt.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr) + this.exprAllowed = true + } - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; + tt.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl) + this.exprAllowed = true + } - // Figure out if it's a module code. - this.strict = this.inModule = options.sourceType === "module"; + tt.parenL.updateContext = function(prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while + this.context.push(statementParens ? types.p_stat : types.p_expr) + this.exprAllowed = true + } - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; + tt.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + } - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; + tt._function.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else && + !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat)) + this.context.push(types.f_expr) + this.exprAllowed = false + } - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') this.skipLineComment(2); + tt.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + this.context.pop() + else + this.context.push(types.q_tmpl) + this.exprAllowed = false } - // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. - Parser.prototype.isKeyword = function isKeyword(word) { - return this.keywords.test(word); + var Token = function Token(p) { + this.type = p.type + this.value = p.value + this.start = p.start + this.end = p.end + if (p.options.locations) + this.loc = new SourceLocation(p, p.startLoc, p.endLoc) + if (p.options.ranges) + this.range = [p.start, p.end] }; - Parser.prototype.isReservedWord = function isReservedWord(word) { - return this.reservedWords.test(word); - }; + // ## Tokenizer - Parser.prototype.extend = function extend(name, f) { - this[name] = f(this[name]); - }; + var pp$7 = Parser.prototype + + // Are we running under Rhino? + var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]" + + // Move to the next token - Parser.prototype.loadPlugins = function loadPlugins(pluginConfigs) { - for (var _name in pluginConfigs) { - var plugin = plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, pluginConfigs[_name]); + pp$7.next = function() { + if (this.options.onToken) + this.options.onToken(new Token(this)) + + this.lastTokEnd = this.end + this.lastTokStart = this.start + this.lastTokEndLoc = this.endLoc + this.lastTokStartLoc = this.startLoc + this.nextToken() + } + + pp$7.getToken = function() { + this.next() + return new Token(this) + } + + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + pp$7[Symbol.iterator] = function () { + var self = this + return {next: function () { + var token = self.getToken() + return { + done: token.type === tt.eof, + value: token + } + }} } - }; - Parser.prototype.parse = function parse() { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node); - }; + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). - return Parser; -})(); - -exports.Parser = Parser; - -},{"./identifier":2,"./options":8,"./tokentype":14,"./whitespace":16}],11:[function(_dereq_,module,exports){ -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _whitespace = _dereq_("./whitespace"); - -var _identifier = _dereq_("./identifier"); - -var _parseutil = _dereq_("./parseutil"); - -var pp = _state.Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp.parseTopLevel = function (node) { - var first = true; - if (!node.body) node.body = []; - while (this.type !== _tokentype.types.eof) { - var stmt = this.parseStatement(true, true); - node.body.push(stmt); - if (first) { - if (this.isUseStrict(stmt)) this.setStrict(true); - first = false; - } - } - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program"); -}; - -var loopLabel = { kind: "loop" }, - switchLabel = { kind: "switch" }; - -pp.isLet = function () { - if (this.type !== _tokentype.types.name || this.options.ecmaVersion < 6 || this.value != "let") return false; - _whitespace.skipWhiteSpace.lastIndex = this.pos; - var skip = _whitespace.skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, - nextCh = this.input.charCodeAt(next); - if (nextCh === 91 || nextCh == 123) return true; // '{' and '[' - if (_identifier.isIdentifierStart(nextCh, true)) { - for (var pos = next + 1; _identifier.isIdentifierChar(this.input.charCodeAt(pos, true)); ++pos) {} - var ident = this.input.slice(next, pos); - if (!this.isKeyword(ident)) return true; - } - return false; -}; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp.parseStatement = function (declaration, topLevel) { - var starttype = this.type, - node = this.startNode(), - kind = undefined; - - if (this.isLet()) { - starttype = _tokentype.types._var; - kind = "let"; - } - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case _tokentype.types._break:case _tokentype.types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - case _tokentype.types._debugger: - return this.parseDebuggerStatement(node); - case _tokentype.types._do: - return this.parseDoStatement(node); - case _tokentype.types._for: - return this.parseForStatement(node); - case _tokentype.types._function: - if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); - return this.parseFunctionStatement(node); - case _tokentype.types._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - case _tokentype.types._if: - return this.parseIfStatement(node); - case _tokentype.types._return: - return this.parseReturnStatement(node); - case _tokentype.types._switch: - return this.parseSwitchStatement(node); - case _tokentype.types._throw: - return this.parseThrowStatement(node); - case _tokentype.types._try: - return this.parseTryStatement(node); - case _tokentype.types._const:case _tokentype.types._var: - kind = kind || this.value; - if (!declaration && kind != "var") this.unexpected(); - return this.parseVarStatement(node, kind); - case _tokentype.types._while: - return this.parseWhileStatement(node); - case _tokentype.types._with: - return this.parseWithStatement(node); - case _tokentype.types.braceL: - return this.parseBlock(); - case _tokentype.types.semi: - return this.parseEmptyStatement(node); - case _tokentype.types._export: - case _tokentype.types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); - if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); - } - return starttype === _tokentype.types._import ? this.parseImport(node) : this.parseExport(node); + pp$7.setStrict = function(strict) { + var this$1 = this; - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - var maybeName = this.value, - expr = this.parseExpression(); - if (starttype === _tokentype.types.name && expr.type === "Identifier" && this.eat(_tokentype.types.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); - } -}; - -pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword == "break"; - this.next(); - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== _tokentype.types.name) this.unexpected();else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - for (var i = 0; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); -}; - -pp.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); -}; - -pp.parseDoStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - this.expect(_tokentype.types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) this.eat(_tokentype.types.semi);else this.semicolon(); - return this.finishNode(node, "DoWhileStatement"); -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp.parseForStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - this.expect(_tokentype.types.parenL); - if (this.type === _tokentype.types.semi) return this.parseFor(node, null); - var isLet = this.isLet(); - if (this.type === _tokentype.types._var || this.type === _tokentype.types._const || isLet) { - var _init = this.startNode(), - kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(_init, true, kind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(kind !== "var" && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refDestructuringErrors = new _parseutil.DestructuringErrors(); - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.checkPatternErrors(refDestructuringErrors, true); - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - return this.parseFor(node, init); -}; - -pp.parseFunctionStatement = function (node) { - this.next(); - return this.parseFunction(node, true); -}; - -pp.parseIfStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(_tokentype.types._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); -}; - -pp.parseReturnStatement = function (node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.argument = null;else { - node.argument = this.parseExpression();this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); -}; - -pp.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(_tokentype.types.braceL); - this.labels.push(switchLabel); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - for (var cur, sawDefault = false; this.type != _tokentype.types.braceR;) { - if (this.type === _tokentype.types._case || this.type === _tokentype.types._default) { - var isCase = this.type === _tokentype.types._case; - if (cur) this.finishNode(cur, "SwitchCase"); - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; - } - this.expect(_tokentype.types.colon); - } else { - if (!cur) this.unexpected(); - cur.consequent.push(this.parseStatement(true)); - } - } - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement"); -}; - -pp.parseThrowStatement = function (node) { - this.next(); - if (_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp.parseTryStatement = function (node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === _tokentype.types._catch) { - var clause = this.startNode(); - this.next(); - this.expect(_tokentype.types.parenL); - clause.param = this.parseBindingAtom(); - this.checkLVal(clause.param, true); - this.expect(_tokentype.types.parenR); - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(_tokentype.types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); - return this.finishNode(node, "TryStatement"); -}; - -pp.parseVarStatement = function (node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); -}; - -pp.parseWhileStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "WhileStatement"); -}; - -pp.parseWithStatement = function (node) { - if (this.strict) this.raise(this.start, "'with' in strict mode"); - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); -}; - -pp.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); -}; - -pp.parseLabeledStatement = function (node, maybeName, expr) { - for (var i = 0; i < this.labels.length; ++i) { - if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - }var kind = this.type.isLoop ? "loop" : this.type === _tokentype.types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label = this.labels[i]; - if (label.statementStart == node.start) { - label.statementStart = this.start; - label.kind = kind; - } else break; - } - this.labels.push({ name: maybeName, kind: kind, statementStart: this.start }); - node.body = this.parseStatement(true); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); -}; - -pp.parseExpressionStatement = function (node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp.parseBlock = function (allowStrict) { - var node = this.startNode(), - first = true, - oldStrict = undefined; - node.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - var stmt = this.parseStatement(true); - node.body.push(stmt); - if (first && allowStrict && this.isUseStrict(stmt)) { - oldStrict = this.strict; - this.setStrict(this.strict = true); - } - first = false; - } - if (oldStrict === false) this.setStrict(false); - return this.finishNode(node, "BlockStatement"); -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp.parseFor = function (node, init) { - node.init = init; - this.expect(_tokentype.types.semi); - node.test = this.type === _tokentype.types.semi ? null : this.parseExpression(); - this.expect(_tokentype.types.semi); - node.update = this.type === _tokentype.types.parenR ? null : this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "ForStatement"); -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp.parseForIn = function (node, init) { - var type = this.type === _tokentype.types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, type); -}; - -// Parse a list of variable declarations. - -pp.parseVar = function (node, isFor, kind) { - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl); - if (this.eat(_tokentype.types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - this.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === _tokentype.types._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(_tokentype.types.comma)) break; - } - return node; -}; - -pp.parseVarId = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); -}; - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseFunction = function (node, isStatement, allowExpressionBody) { - this.initFunction(node); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); - var oldInGen = this.inGenerator; - this.inGenerator = node.generator; - if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - this.inGenerator = oldInGen; - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; - -pp.parseFunctionParams = function (node) { - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false, true); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseClass = function (node, isStatement) { - this.next(); - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (this.eat(_tokentype.types.semi)) continue; - var method = this.startNode(); - var isGenerator = this.eat(_tokentype.types.star); - var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static"; - this.parsePropertyName(method); - method["static"] = isMaybeStatic && this.type !== _tokentype.types.parenL; - if (method["static"]) { - if (isGenerator) this.unexpected(); - isGenerator = this.eat(_tokentype.types.star); - this.parsePropertyName(method); - } - method.kind = "method"; - var isGetSet = false; - if (!method.computed) { - var key = method.key; - - if (!isGenerator && key.type === "Identifier" && this.type !== _tokentype.types.parenL && (key.name === "get" || key.name === "set")) { - isGetSet = true; - method.kind = key.name; - key = this.parsePropertyName(method); - } - if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) { - if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); - if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); - if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); - method.kind = "constructor"; - hadConstructor = true; + this.strict = strict + if (this.type !== tt.num && this.type !== tt.string) return + this.pos = this.start + if (this.options.locations) { + while (this.pos < this.lineStart) { + this$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1 + --this$1.curLine } } - this.parseClassMethod(classBody, method, isGenerator); - if (isGetSet) { - var paramCount = method.kind === "get" ? 0 : 1; - if (method.value.params.length !== paramCount) { - var start = method.value.start; - if (method.kind === "get") this.raiseRecoverable(start, "getter should have no params");else this.raiseRecoverable(start, "setter should have exactly one param"); - } - if (method.kind === "set" && method.value.params[0].type === "RestElement") this.raise(method.value.params[0].start, "Setter cannot use rest params"); - } - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; - -pp.parseClassMethod = function (classBody, method, isGenerator) { - method.value = this.parseMethod(isGenerator); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; - -pp.parseClassId = function (node, isStatement) { - node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null; -}; - -pp.parseClassSuper = function (node) { - node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null; -}; - -// Parses module export declaration. - -pp.parseExport = function (node) { - this.next(); - // export * from '...' - if (this.eat(_tokentype.types.star)) { - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration"); - } - if (this.eat(_tokentype.types._default)) { - // export default ... - var parens = this.type == _tokentype.types.parenL; - var expr = this.parseMaybeAssign(); - var needsSemi = true; - if (!parens && (expr.type == "FunctionExpression" || expr.type == "ClassExpression")) { - needsSemi = false; - if (expr.id) { - expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; + this.nextToken() + } + + pp$7.curContext = function() { + return this.context[this.context.length - 1] + } + + // Read a single token, updating the parser object's token-related + // properties. + + pp$7.nextToken = function() { + var curContext = this.curContext() + if (!curContext || !curContext.preserveSpace) this.skipSpace() + + this.start = this.pos + if (this.options.locations) this.startLoc = this.curPosition() + if (this.pos >= this.input.length) return this.finishToken(tt.eof) + + if (curContext.override) return curContext.override(this) + else this.readToken(this.fullCharCodeAtPos()) + } + + pp$7.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + return this.readWord() + + return this.getTokenFromCode(code) + } + + pp$7.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos) + if (code <= 0xd7ff || code >= 0xe000) return code + var next = this.input.charCodeAt(this.pos + 1) + return (code << 10) + next - 0x35fdc00 + } + + pp$7.skipBlockComment = function() { + var this$1 = this; + + var startLoc = this.options.onComment && this.curPosition() + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2) + if (end === -1) this.raise(this.pos - 2, "Unterminated comment") + this.pos = end + 2 + if (this.options.locations) { + lineBreakG.lastIndex = start + var match + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this$1.curLine + this$1.lineStart = match.index + match[0].length } } - node.declaration = expr; - if (needsSemi) this.semicolon(); - return this.finishNode(node, "ExportDefaultDeclaration"); + if (this.options.onComment) + this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()) } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(true); - node.specifiers = []; - node.source = null; - } else { - // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - if (this.eatContextual("from")) { - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - } else { - // check for keywords used as local names - for (var i = 0; i < node.specifiers.length; i++) { - if (this.keywords.test(node.specifiers[i].local.name) || this.reservedWords.test(node.specifiers[i].local.name)) { - this.unexpected(node.specifiers[i].local.start); - } - } - - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration"); -}; - -pp.shouldParseExportStatement = function () { - return this.type.keyword || this.isLet(); -}; - -// Parses a comma-separated list of module exports. - -pp.parseExportSpecifiers = function () { - var nodes = [], - first = true; - // export { x, y as z } [from '...'] - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.local = this.parseIdent(this.type === _tokentype.types._default); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes; -}; - -// Parses import declaration. - -pp.parseImport = function (node) { - this.next(); - // import '...' - if (this.type === _tokentype.types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; - -// Parses a comma-separated list of module imports. - -pp.parseImportSpecifiers = function () { - var nodes = [], - first = true; - if (this.type === _tokentype.types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(_tokentype.types.comma)) return nodes; - } - if (this.type === _tokentype.types.star) { - var node = this.startNode(); - this.next(); - this.expectContextual("as"); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); - return nodes; - } - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.imported = this.parseIdent(true); - if (this.eatContextual("as")) { - node.local = this.parseIdent(); - } else { - node.local = node.imported; - if (this.isKeyword(node.local.name)) this.unexpected(node.local.start); - if (this.reservedWordsStrict.test(node.local.name)) this.raise(node.local.start, "The keyword '" + node.local.name + "' is reserved"); - } - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportSpecifier")); - } - return nodes; -}; - -},{"./identifier":2,"./parseutil":9,"./state":10,"./tokentype":14,"./whitespace":16}],12:[function(_dereq_,module,exports){ -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _state = _dereq_("./state"); - -var _tokentype = _dereq_("./tokentype"); - -var _whitespace = _dereq_("./whitespace"); - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - _classCallCheck(this, TokContext); - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; -}; + pp$7.skipLineComment = function(startSkip) { + var this$1 = this; -exports.TokContext = TokContext; -var types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", true), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - f_expr: new TokContext("function", true) -}; + var start = this.pos + var startLoc = this.options.onComment && this.curPosition() + var ch = this.input.charCodeAt(this.pos+=startSkip) + while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this$1.pos + ch = this$1.input.charCodeAt(this$1.pos) + } + if (this.options.onComment) + this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()) + } -exports.types = types; -var pp = _state.Parser.prototype; + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. -pp.initialContext = function () { - return [types.b_stat]; -}; + pp$7.skipSpace = function() { + var this$1 = this; -pp.braceIsBlock = function (prevType) { - if (prevType === _tokentype.types.colon) { - var _parent = this.curContext(); - if (_parent === types.b_stat || _parent === types.b_expr) return !_parent.isExpr; + loop: while (this.pos < this.input.length) { + var ch = this$1.input.charCodeAt(this$1.pos) + switch (ch) { + case 32: case 160: // ' ' + ++this$1.pos + break + case 13: + if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { + ++this$1.pos + } + case 10: case 8232: case 8233: + ++this$1.pos + if (this$1.options.locations) { + ++this$1.curLine + this$1.lineStart = this$1.pos + } + break + case 47: // '/' + switch (this$1.input.charCodeAt(this$1.pos + 1)) { + case 42: // '*' + this$1.skipBlockComment() + break + case 47: + this$1.skipLineComment(2) + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this$1.pos + } else { + break loop + } + } + } } - if (prevType === _tokentype.types._return) return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - if (prevType === _tokentype.types._else || prevType === _tokentype.types.semi || prevType === _tokentype.types.eof || prevType === _tokentype.types.parenR) return true; - if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat; - return !this.exprAllowed; -}; -pp.updateContext = function (prevType) { - var update = undefined, - type = this.type; - if (type.keyword && prevType == _tokentype.types.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; -}; + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. -// Token-specific context update code + pp$7.finishToken = function(type, val) { + this.end = this.pos + if (this.options.locations) this.endLoc = this.curPosition() + var prevType = this.type + this.type = type + this.value = val -_tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = function () { - if (this.context.length == 1) { - this.exprAllowed = true; - return; + this.updateContext(prevType) } - var out = this.context.pop(); - if (out === types.b_stat && this.curContext() === types.f_expr) { - this.context.pop(); - this.exprAllowed = false; - } else if (out === types.b_tmpl) { - this.exprAllowed = true; - } else { - this.exprAllowed = !out.isExpr; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp$7.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1) + if (next >= 48 && next <= 57) return this.readNumber(true) + var next2 = this.input.charCodeAt(this.pos + 2) + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3 + return this.finishToken(tt.ellipsis) + } else { + ++this.pos + return this.finishToken(tt.dot) + } } -}; -_tokentype.types.braceL.updateContext = function (prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; -}; + pp$7.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1) + if (this.exprAllowed) {++this.pos; return this.readRegexp()} + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.slash, 1) + } -_tokentype.types.dollarBraceL.updateContext = function () { - this.context.push(types.b_tmpl); - this.exprAllowed = true; -}; - -_tokentype.types.parenL.updateContext = function (prevType) { - var statementParens = prevType === _tokentype.types._if || prevType === _tokentype.types._for || prevType === _tokentype.types._with || prevType === _tokentype.types._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; -}; + pp$7.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + var tokentype = code === 42 ? tt.star : tt.modulo -_tokentype.types.incDec.updateContext = function () { - // tokExprAllowed stays unchanged -}; - -_tokentype.types._function.updateContext = function (prevType) { - if (prevType.beforeExpr && prevType !== _tokentype.types.semi && prevType !== _tokentype.types._else && (prevType !== _tokentype.types.colon || this.curContext() !== types.b_stat)) this.context.push(types.f_expr); - this.exprAllowed = false; -}; + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && next === 42) { + ++size + tokentype = tt.starstar + next = this.input.charCodeAt(this.pos + 2) + } -_tokentype.types.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); - this.exprAllowed = false; -}; - -},{"./state":10,"./tokentype":14,"./whitespace":16}],13:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _identifier = _dereq_("./identifier"); - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var _whitespace = _dereq_("./whitespace"); - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - _classCallCheck(this, Token); - - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) this.loc = new _locutil.SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; -} - -// ## Tokenizer - -; - -exports.Token = Token; -var pp = _state.Parser.prototype; - -// Are we running under Rhino? -var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"; - -// Move to the next token - -pp.next = function () { - if (this.options.onToken) this.options.onToken(new Token(this)); - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp.getToken = function () { - this.next(); - return new Token(this); -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { - var self = this; - return { next: function next() { - var token = self.getToken(); - return { - done: token.type === _tokentype.types.eof, - value: token - }; - } }; -}; - -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). - -pp.setStrict = function (strict) { - this.strict = strict; - if (this.type !== _tokentype.types.num && this.type !== _tokentype.types.string) return; - this.pos = this.start; - if (this.options.locations) { - while (this.pos < this.lineStart) { - this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; - --this.curLine; - } + if (next === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tokentype, size) } - this.nextToken(); -}; - -pp.curContext = function () { - return this.context[this.context.length - 1]; -}; - -// Read a single token, updating the parser object's token-related -// properties. -pp.nextToken = function () { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); + pp$7.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1) + } - this.start = this.pos; - if (this.options.locations) this.startLoc = this.curPosition(); - if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof); + pp$7.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.bitwiseXOR, 1) + } - if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); -}; + pp$7.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && + lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) + } -pp.readToken = function (code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); - - return this.getTokenFromCode(code); -}; - -pp.fullCharCodeAtPos = function () { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00; -}; - -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, - end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); - this.pos = end + 2; - if (this.options.locations) { - _whitespace.lineBreakG.lastIndex = start; - var match = undefined; - while ((match = _whitespace.lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine; - this.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition()); -}; - -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.pos; - ch = this.input.charCodeAt(this.pos); - } - if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition()); -}; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp.skipSpace = function () { - loop: while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32:case 160: - // ' ' - ++this.pos; - break; - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10:case 8232:case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break; - case 47: - // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: - // '*' - this.skipBlockComment(); - break; - case 47: - this.skipLineComment(2); - break; - default: - break loop; - } - break; - default: - if (ch > 8 && ch < 14 || ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break loop; - } + pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `<!--`, an XML-style comment that should be interpreted as a line comment + this.skipLineComment(4) + this.skipSpace() + return this.nextToken() } + if (next === 61) size = 2 + return this.finishOp(tt.relational, size) } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp.finishToken = function (type, val) { - this.end = this.pos; - if (this.options.locations) this.endLoc = this.curPosition(); - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp.readToken_dot = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) return this.readNumber(true); - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { - // 46 = dot '.' - this.pos += 3; - return this.finishToken(_tokentype.types.ellipsis); - } else { - ++this.pos; - return this.finishToken(_tokentype.types.dot); - } -}; - -pp.readToken_slash = function () { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { - ++this.pos;return this.readRegexp(); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.slash, 1); -}; - -pp.readToken_mult_modulo_exp = function (code) { - // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? _tokentype.types.star : _tokentype.types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && next === 42) { - ++size; - tokentype = _tokentype.types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } - - if (next === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(tokentype, size); -}; - -pp.readToken_pipe_amp = function (code) { - // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) return this.finishOp(code === 124 ? _tokentype.types.logicalOR : _tokentype.types.logicalAND, 2); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(code === 124 ? _tokentype.types.bitwiseOR : _tokentype.types.bitwiseAND, 1); -}; - -pp.readToken_caret = function () { - // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.bitwiseXOR, 1); -}; - -pp.readToken_plus_min = function (code) { - // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(_tokentype.types.incDec, 2); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(_tokentype.types.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `<!--`, an XML-style comment that should be interpreted as a line comment - this.skipLineComment(4); - this.skipSpace(); - return this.nextToken(); - } - if (next === 61) size = 2; - return this.finishOp(_tokentype.types.relational, size); -}; - -pp.readToken_eq_excl = function (code) { - // '=!' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); - if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { - // '=>' - this.pos += 2; - return this.finishToken(_tokentype.types.arrow); - } - return this.finishOp(code === 61 ? _tokentype.types.eq : _tokentype.types.prefix, 1); -}; - -pp.getTokenFromCode = function (code) { - switch (code) { - // The interpretation of a dot depends on whether it is followed - // by a digit or another two dots. - case 46: - // '.' - return this.readToken_dot(); - - // Punctuation tokens. - case 40: - ++this.pos;return this.finishToken(_tokentype.types.parenL); - case 41: - ++this.pos;return this.finishToken(_tokentype.types.parenR); - case 59: - ++this.pos;return this.finishToken(_tokentype.types.semi); - case 44: - ++this.pos;return this.finishToken(_tokentype.types.comma); - case 91: - ++this.pos;return this.finishToken(_tokentype.types.bracketL); - case 93: - ++this.pos;return this.finishToken(_tokentype.types.bracketR); - case 123: - ++this.pos;return this.finishToken(_tokentype.types.braceL); - case 125: - ++this.pos;return this.finishToken(_tokentype.types.braceR); - case 58: - ++this.pos;return this.finishToken(_tokentype.types.colon); - case 63: - ++this.pos;return this.finishToken(_tokentype.types.question); - - case 96: - // '`' - if (this.options.ecmaVersion < 6) break; - ++this.pos; - return this.finishToken(_tokentype.types.backQuote); - - case 48: - // '0' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number + + pp$7.readToken_eq_excl = function(code) { // '=!' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) + if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>' + this.pos += 2 + return this.finishToken(tt.arrow) + } + return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1) + } + + pp$7.getTokenFromCode = function(code) { + switch (code) { + // The interpretation of a dot depends on whether it is followed + // by a digit or another two dots. + case 46: // '.' + return this.readToken_dot() + + // Punctuation tokens. + case 40: ++this.pos; return this.finishToken(tt.parenL) + case 41: ++this.pos; return this.finishToken(tt.parenR) + case 59: ++this.pos; return this.finishToken(tt.semi) + case 44: ++this.pos; return this.finishToken(tt.comma) + case 91: ++this.pos; return this.finishToken(tt.bracketL) + case 93: ++this.pos; return this.finishToken(tt.bracketR) + case 123: ++this.pos; return this.finishToken(tt.braceL) + case 125: ++this.pos; return this.finishToken(tt.braceR) + case 58: ++this.pos; return this.finishToken(tt.colon) + case 63: ++this.pos; return this.finishToken(tt.question) + + case 96: // '`' + if (this.options.ecmaVersion < 6) break + ++this.pos + return this.finishToken(tt.backQuote) + + case 48: // '0' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number if (this.options.ecmaVersion >= 6) { - if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number - if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number + if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number + if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number } - // Anything else beginning with a digit is an integer, octal - // number, or float. - case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57: - // 1-9 - return this.readNumber(false); - - // Quotes produce strings. - case 34:case 39: - // '"', "'" - return this.readString(code); - - // Operators are parsed inline in tiny state machines. '=' (61) is - // often referred to. `finishOp` simply skips the amount of - // characters it is given as second argument, and returns a token - // of the type given by its first argument. - - case 47: - // '/' - return this.readToken_slash(); - - case 37:case 42: - // '%*' - return this.readToken_mult_modulo_exp(code); - - case 124:case 38: - // '|&' - return this.readToken_pipe_amp(code); - - case 94: - // '^' - return this.readToken_caret(); - - case 43:case 45: - // '+-' - return this.readToken_plus_min(code); - - case 60:case 62: - // '<>' - return this.readToken_lt_gt(code); - - case 61:case 33: - // '=!' - return this.readToken_eq_excl(code); - - case 126: - // '~' - return this.finishOp(_tokentype.types.prefix, 1); - } - - this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'"); -}; - -pp.finishOp = function (type, size) { - var str = this.input.slice(this.pos, this.pos + size); - this.pos += size; - return this.finishToken(type, str); -}; - -// Parse a regular expression. Some context-awareness is necessary, -// since a '/' inside a '[]' set does not end the expression. - -function tryCreateRegexp(src, flags, throwErrorAt, parser) { - try { - return new RegExp(src, flags); - } catch (e) { - if (throwErrorAt !== undefined) { - if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message); - throw e; - } - } -} - -var regexpUnicodeSupport = !!tryCreateRegexp("", "u"); - -pp.readRegexp = function () { - var _this = this; - - var escaped = undefined, - inClass = undefined, - start = this.pos; - for (;;) { - if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression"); - var ch = this.input.charAt(this.pos); - if (_whitespace.lineBreak.test(ch)) this.raise(start, "Unterminated regular expression"); - if (!escaped) { - if (ch === "[") inClass = true;else if (ch === "]" && inClass) inClass = false;else if (ch === "/" && !inClass) break; - escaped = ch === "\\"; - } else escaped = false; - ++this.pos; - } - var content = this.input.slice(start, this.pos); - ++this.pos; - // Need to use `readWord1` because '\uXXXX' sequences are allowed - // here (don't ask). - var mods = this.readWord1(); - var tmp = content, - tmpFlags = ""; - if (mods) { - var validFlags = /^[gim]*$/; - if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/; - if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag"); - if (mods.indexOf("u") >= 0) { - if (regexpUnicodeSupport) { - tmpFlags = "u"; - } else { - // Replace each astral symbol and every Unicode escape sequence that - // possibly represents an astral symbol or a paired surrogate with a - // single ASCII symbol to avoid throwing on regular expressions that - // are only valid in combination with the `/u` flag. - // Note: replacing with the ASCII symbol `x` might cause false - // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a - // perfectly valid pattern that is equivalent to `[a-b]`, but it would - // be replaced by `[x-b]` which throws an error. - tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) { - code = Number("0x" + code); - if (code > 0x10FFFF) _this.raise(start + offset + 3, "Code point out of bounds"); - return "x"; - }); - tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"); - tmpFlags = tmpFlags.replace("u", ""); + // Anything else beginning with a digit is an integer, octal + // number, or float. + case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9 + return this.readNumber(false) + + // Quotes produce strings. + case 34: case 39: // '"', "'" + return this.readString(code) + + // Operators are parsed inline in tiny state machines. '=' (61) is + // often referred to. `finishOp` simply skips the amount of + // characters it is given as second argument, and returns a token + // of the type given by its first argument. + + case 47: // '/' + return this.readToken_slash() + + case 37: case 42: // '%*' + return this.readToken_mult_modulo_exp(code) + + case 124: case 38: // '|&' + return this.readToken_pipe_amp(code) + + case 94: // '^' + return this.readToken_caret() + + case 43: case 45: // '+-' + return this.readToken_plus_min(code) + + case 60: case 62: // '<>' + return this.readToken_lt_gt(code) + + case 61: case 33: // '=!' + return this.readToken_eq_excl(code) + + case 126: // '~' + return this.finishOp(tt.prefix, 1) + } + + this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'") + } + + pp$7.finishOp = function(type, size) { + var str = this.input.slice(this.pos, this.pos + size) + this.pos += size + return this.finishToken(type, str) + } + + // Parse a regular expression. Some context-awareness is necessary, + // since a '/' inside a '[]' set does not end the expression. + + function tryCreateRegexp(src, flags, throwErrorAt, parser) { + try { + return new RegExp(src, flags) + } catch (e) { + if (throwErrorAt !== undefined) { + if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message) + throw e } } } - // Detect invalid regular expressions. - var value = null; - // Rhino's regular expression parser is flaky and throws uncatchable exceptions, - // so don't do detection if we are running under Rhino - if (!isRhino) { - tryCreateRegexp(tmp, tmpFlags, start, this); - // Get a regular expression object for this pattern-flag pair, or `null` in - // case the current environment doesn't support the flags it uses. - value = tryCreateRegexp(content, mods); - } - return this.finishToken(_tokentype.types.regexp, { pattern: content, flags: mods, value: value }); -}; - -// Read an integer in the given radix. Return null if zero digits -// were read, the integer value otherwise. When `len` is given, this -// will return `null` unless the integer has exactly `len` digits. - -pp.readInt = function (radix, len) { - var start = this.pos, - total = 0; - for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { - var code = this.input.charCodeAt(this.pos), - val = undefined; - if (code >= 97) val = code - 97 + 10; // a - else if (code >= 65) val = code - 65 + 10; // A - else if (code >= 48 && code <= 57) val = code - 48; // 0-9 - else val = Infinity; - if (val >= radix) break; - ++this.pos; - total = total * radix + val; - } - if (this.pos === start || len != null && this.pos - start !== len) return null; - - return total; -}; - -pp.readRadixNumber = function (radix) { - this.pos += 2; // 0x - var val = this.readInt(radix); - if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix); - if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); - return this.finishToken(_tokentype.types.num, val); -}; - -// Read an integer, octal integer, or floating-point number. - -pp.readNumber = function (startsWithDot) { - var start = this.pos, - isFloat = false, - octal = this.input.charCodeAt(this.pos) === 48; - if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number"); - var next = this.input.charCodeAt(this.pos); - if (next === 46) { - // '.' - ++this.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.pos); - } - if (next === 69 || next === 101) { - // 'eE' - next = this.input.charCodeAt(++this.pos); - if (next === 43 || next === 45) ++this.pos; // '+-' - if (this.readInt(10) === null) this.raise(start, "Invalid number"); - isFloat = true; - } - if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); - - var str = this.input.slice(start, this.pos), - val = undefined; - if (isFloat) val = parseFloat(str);else if (!octal || str.length === 1) val = parseInt(str, 10);else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");else val = parseInt(str, 8); - return this.finishToken(_tokentype.types.num, val); -}; - -// Read a string value, interpreting backslash-escapes. - -pp.readCodePoint = function () { - var ch = this.input.charCodeAt(this.pos), - code = undefined; - - if (ch === 123) { - if (this.options.ecmaVersion < 6) this.unexpected(); - var codePos = ++this.pos; - code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos); - ++this.pos; - if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds"); - } else { - code = this.readHexChar(4); - } - return code; -}; - -function codePointToString(code) { - // UTF-16 Decoding - if (code <= 0xFFFF) return String.fromCharCode(code); - code -= 0x10000; - return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00); -} - -pp.readString = function (quote) { - var out = "", - chunkStart = ++this.pos; - for (;;) { - if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant"); - var ch = this.input.charCodeAt(this.pos); - if (ch === quote) break; - if (ch === 92) { - // '\' - out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(false); - chunkStart = this.pos; - } else { - if (_whitespace.isNewLine(ch)) this.raise(this.start, "Unterminated string constant"); - ++this.pos; - } - } - out += this.input.slice(chunkStart, this.pos++); - return this.finishToken(_tokentype.types.string, out); -}; - -// Reads template string tokens. - -pp.readTmplToken = function () { - var out = "", - chunkStart = this.pos; - for (;;) { - if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template"); - var ch = this.input.charCodeAt(this.pos); - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { - // '`', '${' - if (this.pos === this.start && this.type === _tokentype.types.template) { - if (ch === 36) { - this.pos += 2; - return this.finishToken(_tokentype.types.dollarBraceL); + + var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u") + + pp$7.readRegexp = function() { + var this$1 = this; + + var escaped, inClass, start = this.pos + for (;;) { + if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression") + var ch = this$1.input.charAt(this$1.pos) + if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression") + if (!escaped) { + if (ch === "[") inClass = true + else if (ch === "]" && inClass) inClass = false + else if (ch === "/" && !inClass) break + escaped = ch === "\\" + } else escaped = false + ++this$1.pos + } + var content = this.input.slice(start, this.pos) + ++this.pos + // Need to use `readWord1` because '\uXXXX' sequences are allowed + // here (don't ask). + var mods = this.readWord1() + var tmp = content, tmpFlags = "" + if (mods) { + var validFlags = /^[gim]*$/ + if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/ + if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag") + if (mods.indexOf("u") >= 0) { + if (regexpUnicodeSupport) { + tmpFlags = "u" } else { - ++this.pos; - return this.finishToken(_tokentype.types.backQuote); + // Replace each astral symbol and every Unicode escape sequence that + // possibly represents an astral symbol or a paired surrogate with a + // single ASCII symbol to avoid throwing on regular expressions that + // are only valid in combination with the `/u` flag. + // Note: replacing with the ASCII symbol `x` might cause false + // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a + // perfectly valid pattern that is equivalent to `[a-b]`, but it would + // be replaced by `[x-b]` which throws an error. + tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) { + code = Number("0x" + code) + if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds") + return "x" + }) + tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x") + tmpFlags = tmpFlags.replace("u", "") } } - out += this.input.slice(chunkStart, this.pos); - return this.finishToken(_tokentype.types.template, out); - } - if (ch === 92) { - // '\' - out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(true); - chunkStart = this.pos; - } else if (_whitespace.isNewLine(ch)) { - out += this.input.slice(chunkStart, this.pos); - ++this.pos; - switch (ch) { - case 13: - if (this.input.charCodeAt(this.pos) === 10) ++this.pos; - case 10: - out += "\n"; - break; - default: - out += String.fromCharCode(ch); - break; + } + // Detect invalid regular expressions. + var value = null + // Rhino's regular expression parser is flaky and throws uncatchable exceptions, + // so don't do detection if we are running under Rhino + if (!isRhino) { + tryCreateRegexp(tmp, tmpFlags, start, this) + // Get a regular expression object for this pattern-flag pair, or `null` in + // case the current environment doesn't support the flags it uses. + value = tryCreateRegexp(content, mods) + } + return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value}) + } + + // Read an integer in the given radix. Return null if zero digits + // were read, the integer value otherwise. When `len` is given, this + // will return `null` unless the integer has exactly `len` digits. + + pp$7.readInt = function(radix, len) { + var this$1 = this; + + var start = this.pos, total = 0 + for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { + var code = this$1.input.charCodeAt(this$1.pos), val + if (code >= 97) val = code - 97 + 10 // a + else if (code >= 65) val = code - 65 + 10 // A + else if (code >= 48 && code <= 57) val = code - 48 // 0-9 + else val = Infinity + if (val >= radix) break + ++this$1.pos + total = total * radix + val + } + if (this.pos === start || len != null && this.pos - start !== len) return null + + return total + } + + pp$7.readRadixNumber = function(radix) { + this.pos += 2 // 0x + var val = this.readInt(radix) + if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix) + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number") + return this.finishToken(tt.num, val) + } + + // Read an integer, octal integer, or floating-point number. + + pp$7.readNumber = function(startsWithDot) { + var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48 + if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number") + var next = this.input.charCodeAt(this.pos) + if (next === 46) { // '.' + ++this.pos + this.readInt(10) + isFloat = true + next = this.input.charCodeAt(this.pos) + } + if (next === 69 || next === 101) { // 'eE' + next = this.input.charCodeAt(++this.pos) + if (next === 43 || next === 45) ++this.pos // '+-' + if (this.readInt(10) === null) this.raise(start, "Invalid number") + isFloat = true + } + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number") + + var str = this.input.slice(start, this.pos), val + if (isFloat) val = parseFloat(str) + else if (!octal || str.length === 1) val = parseInt(str, 10) + else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number") + else val = parseInt(str, 8) + return this.finishToken(tt.num, val) + } + + // Read a string value, interpreting backslash-escapes. + + pp$7.readCodePoint = function() { + var ch = this.input.charCodeAt(this.pos), code + + if (ch === 123) { + if (this.options.ecmaVersion < 6) this.unexpected() + var codePos = ++this.pos + code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos) + ++this.pos + if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds") + } else { + code = this.readHexChar(4) + } + return code + } + + function codePointToString(code) { + // UTF-16 Decoding + if (code <= 0xFFFF) return String.fromCharCode(code) + code -= 0x10000 + return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00) + } + + pp$7.readString = function(quote) { + var this$1 = this; + + var out = "", chunkStart = ++this.pos + for (;;) { + if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant") + var ch = this$1.input.charCodeAt(this$1.pos) + if (ch === quote) break + if (ch === 92) { // '\' + out += this$1.input.slice(chunkStart, this$1.pos) + out += this$1.readEscapedChar(false) + chunkStart = this$1.pos + } else { + if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant") + ++this$1.pos } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; + } + out += this.input.slice(chunkStart, this.pos++) + return this.finishToken(tt.string, out) + } + + // Reads template string tokens. + + pp$7.readTmplToken = function() { + var this$1 = this; + + var out = "", chunkStart = this.pos + for (;;) { + if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template") + var ch = this$1.input.charCodeAt(this$1.pos) + if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${' + if (this$1.pos === this$1.start && this$1.type === tt.template) { + if (ch === 36) { + this$1.pos += 2 + return this$1.finishToken(tt.dollarBraceL) + } else { + ++this$1.pos + return this$1.finishToken(tt.backQuote) + } + } + out += this$1.input.slice(chunkStart, this$1.pos) + return this$1.finishToken(tt.template, out) } - chunkStart = this.pos; - } else { - ++this.pos; - } - } -}; - -// Used to read escaped characters - -pp.readEscapedChar = function (inTemplate) { - var ch = this.input.charCodeAt(++this.pos); - ++this.pos; - switch (ch) { - case 110: - return "\n"; // 'n' -> '\n' - case 114: - return "\r"; // 'r' -> '\r' - case 120: - return String.fromCharCode(this.readHexChar(2)); // 'x' - case 117: - return codePointToString(this.readCodePoint()); // 'u' - case 116: - return "\t"; // 't' -> '\t' - case 98: - return "\b"; // 'b' -> '\b' - case 118: - return "\u000b"; // 'v' -> '\u000b' - case 102: - return "\f"; // 'f' -> '\f' - case 13: - if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n' - case 10: - // ' \n' - if (this.options.locations) { - this.lineStart = this.pos;++this.curLine; + if (ch === 92) { // '\' + out += this$1.input.slice(chunkStart, this$1.pos) + out += this$1.readEscapedChar(true) + chunkStart = this$1.pos + } else if (isNewLine(ch)) { + out += this$1.input.slice(chunkStart, this$1.pos) + ++this$1.pos + switch (ch) { + case 13: + if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos + case 10: + out += "\n" + break + default: + out += String.fromCharCode(ch) + break + } + if (this$1.options.locations) { + ++this$1.curLine + this$1.lineStart = this$1.pos + } + chunkStart = this$1.pos + } else { + ++this$1.pos } - return ""; + } + } + + // Used to read escaped characters + + pp$7.readEscapedChar = function(inTemplate) { + var ch = this.input.charCodeAt(++this.pos) + ++this.pos + switch (ch) { + case 110: return "\n" // 'n' -> '\n' + case 114: return "\r" // 'r' -> '\r' + case 120: return String.fromCharCode(this.readHexChar(2)) // 'x' + case 117: return codePointToString(this.readCodePoint()) // 'u' + case 116: return "\t" // 't' -> '\t' + case 98: return "\b" // 'b' -> '\b' + case 118: return "\u000b" // 'v' -> '\u000b' + case 102: return "\f" // 'f' -> '\f' + case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n' + case 10: // ' \n' + if (this.options.locations) { this.lineStart = this.pos; ++this.curLine } + return "" default: if (ch >= 48 && ch <= 55) { - var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]; - var octal = parseInt(octalStr, 8); + var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0] + var octal = parseInt(octalStr, 8) if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); + octalStr = octalStr.slice(0, -1) + octal = parseInt(octalStr, 8) } if (octalStr !== "0" && (this.strict || inTemplate)) { - this.raise(this.pos - 2, "Octal literal in strict mode"); + this.raise(this.pos - 2, "Octal literal in strict mode") } - this.pos += octalStr.length - 1; - return String.fromCharCode(octal); + this.pos += octalStr.length - 1 + return String.fromCharCode(octal) } - return String.fromCharCode(ch); - } -}; - -// Used to read character escape sequences ('\x', '\u', '\U'). - -pp.readHexChar = function (len) { - var codePos = this.pos; - var n = this.readInt(16, len); - if (n === null) this.raise(codePos, "Bad character escape sequence"); - return n; -}; - -// Read an identifier, and return it as a string. Sets `this.containsEsc` -// to whether the word contained a '\u' escape. -// -// Incrementally adds only escaped chars, adding other chunks as-is -// as a micro-optimization. - -pp.readWord1 = function () { - this.containsEsc = false; - var word = "", - first = true, - chunkStart = this.pos; - var astral = this.options.ecmaVersion >= 6; - while (this.pos < this.input.length) { - var ch = this.fullCharCodeAtPos(); - if (_identifier.isIdentifierChar(ch, astral)) { - this.pos += ch <= 0xffff ? 1 : 2; - } else if (ch === 92) { - // "\" - this.containsEsc = true; - word += this.input.slice(chunkStart, this.pos); - var escStart = this.pos; - if (this.input.charCodeAt(++this.pos) != 117) // "u" - this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX"); - ++this.pos; - var esc = this.readCodePoint(); - if (!(first ? _identifier.isIdentifierStart : _identifier.isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape"); - word += codePointToString(esc); - chunkStart = this.pos; - } else { - break; - } - first = false; - } - return word + this.input.slice(chunkStart, this.pos); -}; - -// Read an identifier or keyword token. Will check for reserved -// words when necessary. - -pp.readWord = function () { - var word = this.readWord1(); - var type = _tokentype.types.name; - if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word)) type = _tokentype.keywords[word]; - return this.finishToken(type, word); -}; - -},{"./identifier":2,"./locutil":5,"./state":10,"./tokentype":14,"./whitespace":16}],14:[function(_dereq_,module,exports){ -// ## Token types - -// The assignment of fine-grained, information-carrying type objects -// allows the tokenizer to store the information it has about a -// token in a way that is very cheap for the parser to look up. - -// All token type variables start with an underscore, to make them -// easy to recognize. - -// The `beforeExpr` property is used to disambiguate between regular -// expressions and divisions. It is set on all token types that can -// be followed by an expression (thus, a slash after them would be a -// regular expression). -// -// The `startsExpr` property is used to check if the token ends a -// `yield` expression. It is set on all token types that either can -// directly start an expression (like a quotation mark) or can -// continue an expression (like the body of a string). -// -// `isLoop` marks a keyword as starting a loop, which is important -// to know when parsing a label, in order to allow or disallow -// continue jumps to that label. - -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var TokenType = function TokenType(label) { - var conf = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - _classCallCheck(this, TokenType); - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; - -exports.TokenType = TokenType; - -function binop(name, prec) { - return new TokenType(name, { beforeExpr: true, binop: prec }); -} -var beforeExpr = { beforeExpr: true }, - startsExpr = { startsExpr: true }; - -var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }), - braceR: new TokenType("}"), - parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. + return String.fromCharCode(ch) + } + } + + // Used to read character escape sequences ('\x', '\u', '\U'). + + pp$7.readHexChar = function(len) { + var codePos = this.pos + var n = this.readInt(16, len) + if (n === null) this.raise(codePos, "Bad character escape sequence") + return n + } + + // Read an identifier, and return it as a string. Sets `this.containsEsc` + // to whether the word contained a '\u' escape. // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. + // Incrementally adds only escaped chars, adding other chunks as-is + // as a micro-optimization. + + pp$7.readWord1 = function() { + var this$1 = this; + + this.containsEsc = false + var word = "", first = true, chunkStart = this.pos + var astral = this.options.ecmaVersion >= 6 + while (this.pos < this.input.length) { + var ch = this$1.fullCharCodeAtPos() + if (isIdentifierChar(ch, astral)) { + this$1.pos += ch <= 0xffff ? 1 : 2 + } else if (ch === 92) { // "\" + this$1.containsEsc = true + word += this$1.input.slice(chunkStart, this$1.pos) + var escStart = this$1.pos + if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u" + this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX") + ++this$1.pos + var esc = this$1.readCodePoint() + if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) + this$1.raise(escStart, "Invalid Unicode escape") + word += codePointToString(esc) + chunkStart = this$1.pos + } else { + break + } + first = false + } + return word + this.input.slice(chunkStart, this.pos) + } + + // Read an identifier or keyword token. Will check for reserved + // words when necessary. + + pp$7.readWord = function() { + var word = this.readWord1() + var type = tt.name + if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word)) + type = keywordTypes[word] + return this.finishToken(type, word) + } + + var version = "3.3.0" + + // The main exported interface (under `self.acorn` when in the + // browser) is a `parse` function that takes a code string and + // returns an abstract syntax tree as specified by [Mozilla parser + // API][api]. // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", { beforeExpr: true, isAssign: true }), - assign: new TokenType("_=", { beforeExpr: true, isAssign: true }), - incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }), - prefix: new TokenType("prefix", { beforeExpr: true, prefix: true, startsExpr: true }), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=", 6), - relational: binop("</>", 7), - bitShift: binop("<</>>", 8), - plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", { beforeExpr: true }) -}; - -exports.types = types; -// Map keyword names to token types. - -var keywords = {}; - -exports.keywords = keywords; -// Succinct definitions of keyword token types -function kw(name) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - options.keyword = name; - keywords[name] = types["_" + name] = new TokenType(name, options); -} - -kw("break"); -kw("case", beforeExpr); -kw("catch"); -kw("continue"); -kw("debugger"); -kw("default", beforeExpr); -kw("do", { isLoop: true, beforeExpr: true }); -kw("else", beforeExpr); -kw("finally"); -kw("for", { isLoop: true }); -kw("function", startsExpr); -kw("if"); -kw("return", beforeExpr); -kw("switch"); -kw("throw", beforeExpr); -kw("try"); -kw("var"); -kw("const"); -kw("while", { isLoop: true }); -kw("with"); -kw("new", { beforeExpr: true, startsExpr: true }); -kw("this", startsExpr); -kw("super", startsExpr); -kw("class"); -kw("extends", beforeExpr); -kw("export"); -kw("import"); -kw("null", startsExpr); -kw("true", startsExpr); -kw("false", startsExpr); -kw("in", { beforeExpr: true, binop: 7 }); -kw("instanceof", { beforeExpr: true, binop: 7 }); -kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }); -kw("void", { beforeExpr: true, prefix: true, startsExpr: true }); -kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }); - -},{}],15:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; -exports.isArray = isArray; -exports.has = has; - -function isArray(obj) { - return Object.prototype.toString.call(obj) === "[object Array]"; -} - -// Checks if an object has a property. - -function has(obj, propName) { - return Object.prototype.hasOwnProperty.call(obj, propName); -} - -},{}],16:[function(_dereq_,module,exports){ -// Matches a whole line break (where CRLF is considered a single -// line break). Used to count lines. - -"use strict"; - -exports.__esModule = true; -exports.isNewLine = isNewLine; -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -exports.lineBreak = lineBreak; -var lineBreakG = new RegExp(lineBreak.source, "g"); - -exports.lineBreakG = lineBreakG; - -function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code == 0x2029; -} - -var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -exports.nonASCIIwhitespace = nonASCIIwhitespace; -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -exports.skipWhiteSpace = skipWhiteSpace; - -},{}]},{},[3])(3) -});
\ No newline at end of file + // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + + function parse(input, options) { + return new Parser(options, input).parse() + } + + // This function tries to parse a single expression at a given + // offset in a string. Useful for parsing mixed-language formats + // that embed JavaScript expressions. + + function parseExpressionAt(input, pos, options) { + var p = new Parser(options, input, pos) + p.nextToken() + return p.parseExpression() + } + + // Acorn is organized as a tokenizer and a recursive-descent parser. + // The `tokenizer` export provides an interface to the tokenizer. + + function tokenizer(input, options) { + return new Parser(options, input) + } + + exports.version = version; + exports.parse = parse; + exports.parseExpressionAt = parseExpressionAt; + exports.tokenizer = tokenizer; + exports.Parser = Parser; + exports.plugins = plugins; + exports.defaultOptions = defaultOptions; + exports.Position = Position; + exports.SourceLocation = SourceLocation; + exports.getLineInfo = getLineInfo; + exports.Node = Node; + exports.TokenType = TokenType; + exports.tokTypes = tt; + exports.TokContext = TokContext; + exports.tokContexts = types; + exports.isIdentifierChar = isIdentifierChar; + exports.isIdentifierStart = isIdentifierStart; + exports.Token = Token; + exports.isNewLine = isNewLine; + exports.lineBreak = lineBreak; + exports.lineBreakG = lineBreakG; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}));
\ No newline at end of file diff --git a/tools/eslint/node_modules/acorn/dist/acorn_loose.es.js b/tools/eslint/node_modules/acorn/dist/acorn_loose.es.js new file mode 100644 index 0000000000..cb114d8cbd --- /dev/null +++ b/tools/eslint/node_modules/acorn/dist/acorn_loose.es.js @@ -0,0 +1,1261 @@ +import acorn, { SourceLocation, tokTypes, tokenizer, Node, lineBreak, isNewLine, getLineInfo, Token, lineBreakG } from './acorn.js'; + +// Registered plugins +var pluginsLoose = {} + +var LooseParser = function LooseParser(input, options) { + if ( options === void 0 ) options = {}; + + this.toks = tokenizer(input, options) + this.options = this.toks.options + this.input = this.toks.input + this.tok = this.last = {type: tokTypes.eof, start: 0, end: 0} + if (this.options.locations) { + var here = this.toks.curPosition() + this.tok.loc = new SourceLocation(this.toks, here, here) + } + this.ahead = [] // Tokens ahead + this.context = [] // Indentation contexted + this.curIndent = 0 + this.curLineStart = 0 + this.nextLineStart = this.lineEnd(this.curLineStart) + 1 + // Load plugins + this.options.pluginsLoose = options.pluginsLoose || {} + this.loadPlugins(this.options.pluginsLoose) +}; + +LooseParser.prototype.startNode = function startNode () { + return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null) +}; + +LooseParser.prototype.storeCurrentPos = function storeCurrentPos () { + return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start +}; + +LooseParser.prototype.startNodeAt = function startNodeAt (pos) { + if (this.options.locations) { + return new Node(this.toks, pos[0], pos[1]) + } else { + return new Node(this.toks, pos) + } +}; + +LooseParser.prototype.finishNode = function finishNode (node, type) { + node.type = type + node.end = this.last.end + if (this.options.locations) + node.loc.end = this.last.loc.end + if (this.options.ranges) + node.range[1] = this.last.end + return node +}; + +LooseParser.prototype.dummyNode = function dummyNode (type) { + var dummy = this.startNode() + dummy.type = type + dummy.end = dummy.start + if (this.options.locations) + dummy.loc.end = dummy.loc.start + if (this.options.ranges) + dummy.range[1] = dummy.start + this.last = {type: tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc} + return dummy +}; + +LooseParser.prototype.dummyIdent = function dummyIdent () { + var dummy = this.dummyNode("Identifier") + dummy.name = "✖" + return dummy +}; + +LooseParser.prototype.dummyString = function dummyString () { + var dummy = this.dummyNode("Literal") + dummy.value = dummy.raw = "✖" + return dummy +}; + +LooseParser.prototype.eat = function eat (type) { + if (this.tok.type === type) { + this.next() + return true + } else { + return false + } +}; + +LooseParser.prototype.isContextual = function isContextual (name) { + return this.tok.type === tokTypes.name && this.tok.value === name +}; + +LooseParser.prototype.eatContextual = function eatContextual (name) { + return this.tok.value === name && this.eat(tokTypes.name) +}; + +LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () { + return this.tok.type === tokTypes.eof || this.tok.type === tokTypes.braceR || + lineBreak.test(this.input.slice(this.last.end, this.tok.start)) +}; + +LooseParser.prototype.semicolon = function semicolon () { + return this.eat(tokTypes.semi) +}; + +LooseParser.prototype.expect = function expect (type) { + var this$1 = this; + + if (this.eat(type)) return true + for (var i = 1; i <= 2; i++) { + if (this$1.lookAhead(i).type == type) { + for (var j = 0; j < i; j++) this$1.next() + return true + } + } +}; + +LooseParser.prototype.pushCx = function pushCx () { + this.context.push(this.curIndent) +}; + +LooseParser.prototype.popCx = function popCx () { + this.curIndent = this.context.pop() +}; + +LooseParser.prototype.lineEnd = function lineEnd (pos) { + while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos + return pos +}; + +LooseParser.prototype.indentationAfter = function indentationAfter (pos) { + var this$1 = this; + + for (var count = 0;; ++pos) { + var ch = this$1.input.charCodeAt(pos) + if (ch === 32) ++count + else if (ch === 9) count += this$1.options.tabSize + else return count + } +}; + +LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) { + if (this.tok.type === closeTok || this.tok.type === tokTypes.eof) return true + return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && + (!blockHeuristic || this.nextLineStart >= this.input.length || + this.indentationAfter(this.nextLineStart) < indent) +}; + +LooseParser.prototype.tokenStartsLine = function tokenStartsLine () { + var this$1 = this; + + for (var p = this.tok.start - 1; p >= this.curLineStart; --p) { + var ch = this$1.input.charCodeAt(p) + if (ch !== 9 && ch !== 32) return false + } + return true +}; + +LooseParser.prototype.extend = function extend (name, f) { + this[name] = f(this[name]) +}; + +LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { + var this$1 = this; + + for (var name in pluginConfigs) { + var plugin = pluginsLoose[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this$1, pluginConfigs[name]) + } +}; + +var lp = LooseParser.prototype + +function isSpace(ch) { + return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch) +} + +lp.next = function() { + var this$1 = this; + + this.last = this.tok + if (this.ahead.length) + this.tok = this.ahead.shift() + else + this.tok = this.readToken() + + if (this.tok.start >= this.nextLineStart) { + while (this.tok.start >= this.nextLineStart) { + this$1.curLineStart = this$1.nextLineStart + this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1 + } + this.curIndent = this.indentationAfter(this.curLineStart) + } +} + +lp.readToken = function() { + var this$1 = this; + + for (;;) { + try { + this$1.toks.next() + if (this$1.toks.type === tokTypes.dot && + this$1.input.substr(this$1.toks.end, 1) === "." && + this$1.options.ecmaVersion >= 6) { + this$1.toks.end++ + this$1.toks.type = tokTypes.ellipsis + } + return new Token(this$1.toks) + } catch(e) { + if (!(e instanceof SyntaxError)) throw e + + // Try to skip some text, based on the error message, and then continue + var msg = e.message, pos = e.raisedAt, replace = true + if (/unterminated/i.test(msg)) { + pos = this$1.lineEnd(e.pos + 1) + if (/string/.test(msg)) { + replace = {start: e.pos, end: pos, type: tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)} + } else if (/regular expr/i.test(msg)) { + var re = this$1.input.slice(e.pos, pos) + try { re = new RegExp(re) } catch(e) {} + replace = {start: e.pos, end: pos, type: tokTypes.regexp, value: re} + } else if (/template/.test(msg)) { + replace = {start: e.pos, end: pos, + type: tokTypes.template, + value: this$1.input.slice(e.pos, pos)} + } else { + replace = false + } + } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) { + while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos + } else if (/character escape|expected hexadecimal/i.test(msg)) { + while (pos < this.input.length) { + var ch = this$1.input.charCodeAt(pos++) + if (ch === 34 || ch === 39 || isNewLine(ch)) break + } + } else if (/unexpected character/i.test(msg)) { + pos++ + replace = false + } else if (/regular expression/i.test(msg)) { + replace = true + } else { + throw e + } + this$1.resetTo(pos) + if (replace === true) replace = {start: pos, end: pos, type: tokTypes.name, value: "✖"} + if (replace) { + if (this$1.options.locations) + replace.loc = new SourceLocation( + this$1.toks, + getLineInfo(this$1.input, replace.start), + getLineInfo(this$1.input, replace.end)) + return replace + } + } + } +} + +lp.resetTo = function(pos) { + var this$1 = this; + + this.toks.pos = pos + var ch = this.input.charAt(pos - 1) + this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) || + /[enwfd]/.test(ch) && + /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos)) + + if (this.options.locations) { + this.toks.curLine = 1 + this.toks.lineStart = lineBreakG.lastIndex = 0 + var match + while ((match = lineBreakG.exec(this.input)) && match.index < pos) { + ++this$1.toks.curLine + this$1.toks.lineStart = match.index + match[0].length + } + } +} + +lp.lookAhead = function(n) { + var this$1 = this; + + while (n > this.ahead.length) + this$1.ahead.push(this$1.readToken()) + return this.ahead[n - 1] +} + +function isDummy(node) { return node.name == "✖" } + +var lp$1 = LooseParser.prototype + +lp$1.parseTopLevel = function() { + var this$1 = this; + + var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0) + node.body = [] + while (this.tok.type !== tokTypes.eof) node.body.push(this$1.parseStatement()) + this.last = this.tok + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType + } + return this.finishNode(node, "Program") +} + +lp$1.parseStatement = function() { + var this$1 = this; + + var starttype = this.tok.type, node = this.startNode(), kind + + if (this.toks.isLet()) { + starttype = tokTypes._var + kind = "let" + } + + switch (starttype) { + case tokTypes._break: case tokTypes._continue: + this.next() + var isBreak = starttype === tokTypes._break + if (this.semicolon() || this.canInsertSemicolon()) { + node.label = null + } else { + node.label = this.tok.type === tokTypes.name ? this.parseIdent() : null + this.semicolon() + } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + + case tokTypes._debugger: + this.next() + this.semicolon() + return this.finishNode(node, "DebuggerStatement") + + case tokTypes._do: + this.next() + node.body = this.parseStatement() + node.test = this.eat(tokTypes._while) ? this.parseParenExpression() : this.dummyIdent() + this.semicolon() + return this.finishNode(node, "DoWhileStatement") + + case tokTypes._for: + this.next() + this.pushCx() + this.expect(tokTypes.parenL) + if (this.tok.type === tokTypes.semi) return this.parseFor(node, null) + var isLet = this.toks.isLet() + if (isLet || this.tok.type === tokTypes._var || this.tok.type === tokTypes._const) { + var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value) + if (init$1.declarations.length === 1 && (this.tok.type === tokTypes._in || this.isContextual("of"))) { + return this.parseForIn(node, init$1) + } + return this.parseFor(node, init$1) + } + var init = this.parseExpression(true) + if (this.tok.type === tokTypes._in || this.isContextual("of")) + return this.parseForIn(node, this.toAssignable(init)) + return this.parseFor(node, init) + + case tokTypes._function: + this.next() + return this.parseFunction(node, true) + + case tokTypes._if: + this.next() + node.test = this.parseParenExpression() + node.consequent = this.parseStatement() + node.alternate = this.eat(tokTypes._else) ? this.parseStatement() : null + return this.finishNode(node, "IfStatement") + + case tokTypes._return: + this.next() + if (this.eat(tokTypes.semi) || this.canInsertSemicolon()) node.argument = null + else { node.argument = this.parseExpression(); this.semicolon() } + return this.finishNode(node, "ReturnStatement") + + case tokTypes._switch: + var blockIndent = this.curIndent, line = this.curLineStart + this.next() + node.discriminant = this.parseParenExpression() + node.cases = [] + this.pushCx() + this.expect(tokTypes.braceL) + + var cur + while (!this.closes(tokTypes.braceR, blockIndent, line, true)) { + if (this$1.tok.type === tokTypes._case || this$1.tok.type === tokTypes._default) { + var isCase = this$1.tok.type === tokTypes._case + if (cur) this$1.finishNode(cur, "SwitchCase") + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + this$1.next() + if (isCase) cur.test = this$1.parseExpression() + else cur.test = null + this$1.expect(tokTypes.colon) + } else { + if (!cur) { + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + cur.test = null + } + cur.consequent.push(this$1.parseStatement()) + } + } + if (cur) this.finishNode(cur, "SwitchCase") + this.popCx() + this.eat(tokTypes.braceR) + return this.finishNode(node, "SwitchStatement") + + case tokTypes._throw: + this.next() + node.argument = this.parseExpression() + this.semicolon() + return this.finishNode(node, "ThrowStatement") + + case tokTypes._try: + this.next() + node.block = this.parseBlock() + node.handler = null + if (this.tok.type === tokTypes._catch) { + var clause = this.startNode() + this.next() + this.expect(tokTypes.parenL) + clause.param = this.toAssignable(this.parseExprAtom(), true) + this.expect(tokTypes.parenR) + clause.body = this.parseBlock() + node.handler = this.finishNode(clause, "CatchClause") + } + node.finalizer = this.eat(tokTypes._finally) ? this.parseBlock() : null + if (!node.handler && !node.finalizer) return node.block + return this.finishNode(node, "TryStatement") + + case tokTypes._var: + case tokTypes._const: + return this.parseVar(false, kind || this.tok.value) + + case tokTypes._while: + this.next() + node.test = this.parseParenExpression() + node.body = this.parseStatement() + return this.finishNode(node, "WhileStatement") + + case tokTypes._with: + this.next() + node.object = this.parseParenExpression() + node.body = this.parseStatement() + return this.finishNode(node, "WithStatement") + + case tokTypes.braceL: + return this.parseBlock() + + case tokTypes.semi: + this.next() + return this.finishNode(node, "EmptyStatement") + + case tokTypes._class: + return this.parseClass(true) + + case tokTypes._import: + return this.parseImport() + + case tokTypes._export: + return this.parseExport() + + default: + var expr = this.parseExpression() + if (isDummy(expr)) { + this.next() + if (this.tok.type === tokTypes.eof) return this.finishNode(node, "EmptyStatement") + return this.parseStatement() + } else if (starttype === tokTypes.name && expr.type === "Identifier" && this.eat(tokTypes.colon)) { + node.body = this.parseStatement() + node.label = expr + return this.finishNode(node, "LabeledStatement") + } else { + node.expression = expr + this.semicolon() + return this.finishNode(node, "ExpressionStatement") + } + } +} + +lp$1.parseBlock = function() { + var this$1 = this; + + var node = this.startNode() + this.pushCx() + this.expect(tokTypes.braceL) + var blockIndent = this.curIndent, line = this.curLineStart + node.body = [] + while (!this.closes(tokTypes.braceR, blockIndent, line, true)) + node.body.push(this$1.parseStatement()) + this.popCx() + this.eat(tokTypes.braceR) + return this.finishNode(node, "BlockStatement") +} + +lp$1.parseFor = function(node, init) { + node.init = init + node.test = node.update = null + if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.semi) node.test = this.parseExpression() + if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.parenR) node.update = this.parseExpression() + this.popCx() + this.expect(tokTypes.parenR) + node.body = this.parseStatement() + return this.finishNode(node, "ForStatement") +} + +lp$1.parseForIn = function(node, init) { + var type = this.tok.type === tokTypes._in ? "ForInStatement" : "ForOfStatement" + this.next() + node.left = init + node.right = this.parseExpression() + this.popCx() + this.expect(tokTypes.parenR) + node.body = this.parseStatement() + return this.finishNode(node, type) +} + +lp$1.parseVar = function(noIn, kind) { + var this$1 = this; + + var node = this.startNode() + node.kind = kind + this.next() + node.declarations = [] + do { + var decl = this$1.startNode() + decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent() + decl.init = this$1.eat(tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null + node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")) + } while (this.eat(tokTypes.comma)) + if (!node.declarations.length) { + var decl$1 = this.startNode() + decl$1.id = this.dummyIdent() + node.declarations.push(this.finishNode(decl$1, "VariableDeclarator")) + } + if (!noIn) this.semicolon() + return this.finishNode(node, "VariableDeclaration") +} + +lp$1.parseClass = function(isStatement) { + var this$1 = this; + + var node = this.startNode() + this.next() + if (this.tok.type === tokTypes.name) node.id = this.parseIdent() + else if (isStatement) node.id = this.dummyIdent() + else node.id = null + node.superClass = this.eat(tokTypes._extends) ? this.parseExpression() : null + node.body = this.startNode() + node.body.body = [] + this.pushCx() + var indent = this.curIndent + 1, line = this.curLineStart + this.eat(tokTypes.braceL) + if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart } + while (!this.closes(tokTypes.braceR, indent, line)) { + if (this$1.semicolon()) continue + var method = this$1.startNode(), isGenerator + if (this$1.options.ecmaVersion >= 6) { + method.static = false + isGenerator = this$1.eat(tokTypes.star) + } + this$1.parsePropertyName(method) + if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(tokTypes.comma); continue } + if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" && + (this$1.tok.type != tokTypes.parenL && this$1.tok.type != tokTypes.braceL)) { + method.static = true + isGenerator = this$1.eat(tokTypes.star) + this$1.parsePropertyName(method) + } else { + method.static = false + } + if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" && + !method.computed && (method.key.name === "get" || method.key.name === "set") && + this$1.tok.type !== tokTypes.parenL && this$1.tok.type !== tokTypes.braceL) { + method.kind = method.key.name + this$1.parsePropertyName(method) + method.value = this$1.parseMethod(false) + } else { + if (!method.computed && !method.static && !isGenerator && ( + method.key.type === "Identifier" && method.key.name === "constructor" || + method.key.type === "Literal" && method.key.value === "constructor")) { + method.kind = "constructor" + } else { + method.kind = "method" + } + method.value = this$1.parseMethod(isGenerator) + } + node.body.body.push(this$1.finishNode(method, "MethodDefinition")) + } + this.popCx() + if (!this.eat(tokTypes.braceR)) { + // If there is no closing brace, make the node span to the start + // of the next token (this is useful for Tern) + this.last.end = this.tok.start + if (this.options.locations) this.last.loc.end = this.tok.loc.start + } + this.semicolon() + this.finishNode(node.body, "ClassBody") + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") +} + +lp$1.parseFunction = function(node, isStatement) { + this.initFunction(node) + if (this.options.ecmaVersion >= 6) { + node.generator = this.eat(tokTypes.star) + } + if (this.tok.type === tokTypes.name) node.id = this.parseIdent() + else if (isStatement) node.id = this.dummyIdent() + node.params = this.parseFunctionParams() + node.body = this.parseBlock() + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") +} + +lp$1.parseExport = function() { + var node = this.startNode() + this.next() + if (this.eat(tokTypes.star)) { + node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString() + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(tokTypes._default)) { + var expr = this.parseMaybeAssign() + if (expr.id) { + switch (expr.type) { + case "FunctionExpression": expr.type = "FunctionDeclaration"; break + case "ClassExpression": expr.type = "ClassDeclaration"; break + } + } + node.declaration = expr + this.semicolon() + return this.finishNode(node, "ExportDefaultDeclaration") + } + if (this.tok.type.keyword || this.toks.isLet()) { + node.declaration = this.parseStatement() + node.specifiers = [] + node.source = null + } else { + node.declaration = null + node.specifiers = this.parseExportSpecifierList() + node.source = this.eatContextual("from") ? this.parseExprAtom() : null + this.semicolon() + } + return this.finishNode(node, "ExportNamedDeclaration") +} + +lp$1.parseImport = function() { + var node = this.startNode() + this.next() + if (this.tok.type === tokTypes.string) { + node.specifiers = [] + node.source = this.parseExprAtom() + node.kind = '' + } else { + var elt + if (this.tok.type === tokTypes.name && this.tok.value !== "from") { + elt = this.startNode() + elt.local = this.parseIdent() + this.finishNode(elt, "ImportDefaultSpecifier") + this.eat(tokTypes.comma) + } + node.specifiers = this.parseImportSpecifierList() + node.source = this.eatContextual("from") && this.tok.type == tokTypes.string ? this.parseExprAtom() : this.dummyString() + if (elt) node.specifiers.unshift(elt) + } + this.semicolon() + return this.finishNode(node, "ImportDeclaration") +} + +lp$1.parseImportSpecifierList = function() { + var this$1 = this; + + var elts = [] + if (this.tok.type === tokTypes.star) { + var elt = this.startNode() + this.next() + elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent() + elts.push(this.finishNode(elt, "ImportNamespaceSpecifier")) + } else { + var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart + this.pushCx() + this.eat(tokTypes.braceL) + if (this.curLineStart > continuedLine) continuedLine = this.curLineStart + while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { + var elt$1 = this$1.startNode() + if (this$1.eat(tokTypes.star)) { + elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent() + this$1.finishNode(elt$1, "ImportNamespaceSpecifier") + } else { + if (this$1.isContextual("from")) break + elt$1.imported = this$1.parseIdent() + if (isDummy(elt$1.imported)) break + elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported + this$1.finishNode(elt$1, "ImportSpecifier") + } + elts.push(elt$1) + this$1.eat(tokTypes.comma) + } + this.eat(tokTypes.braceR) + this.popCx() + } + return elts +} + +lp$1.parseExportSpecifierList = function() { + var this$1 = this; + + var elts = [] + var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart + this.pushCx() + this.eat(tokTypes.braceL) + if (this.curLineStart > continuedLine) continuedLine = this.curLineStart + while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { + if (this$1.isContextual("from")) break + var elt = this$1.startNode() + elt.local = this$1.parseIdent() + if (isDummy(elt.local)) break + elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local + this$1.finishNode(elt, "ExportSpecifier") + elts.push(elt) + this$1.eat(tokTypes.comma) + } + this.eat(tokTypes.braceR) + this.popCx() + return elts +} + +var lp$2 = LooseParser.prototype + +lp$2.checkLVal = function(expr) { + if (!expr) return expr + switch (expr.type) { + case "Identifier": + case "MemberExpression": + return expr + + case "ParenthesizedExpression": + expr.expression = this.checkLVal(expr.expression) + return expr + + default: + return this.dummyIdent() + } +} + +lp$2.parseExpression = function(noIn) { + var this$1 = this; + + var start = this.storeCurrentPos() + var expr = this.parseMaybeAssign(noIn) + if (this.tok.type === tokTypes.comma) { + var node = this.startNodeAt(start) + node.expressions = [expr] + while (this.eat(tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn)) + return this.finishNode(node, "SequenceExpression") + } + return expr +} + +lp$2.parseParenExpression = function() { + this.pushCx() + this.expect(tokTypes.parenL) + var val = this.parseExpression() + this.popCx() + this.expect(tokTypes.parenR) + return val +} + +lp$2.parseMaybeAssign = function(noIn) { + if (this.toks.isContextual("yield")) { + var node = this.startNode() + this.next() + if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tokTypes.star && !this.tok.type.startsExpr)) { + node.delegate = false + node.argument = null + } else { + node.delegate = this.eat(tokTypes.star) + node.argument = this.parseMaybeAssign() + } + return this.finishNode(node, "YieldExpression") + } + + var start = this.storeCurrentPos() + var left = this.parseMaybeConditional(noIn) + if (this.tok.type.isAssign) { + var node$1 = this.startNodeAt(start) + node$1.operator = this.tok.value + node$1.left = this.tok.type === tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left) + this.next() + node$1.right = this.parseMaybeAssign(noIn) + return this.finishNode(node$1, "AssignmentExpression") + } + return left +} + +lp$2.parseMaybeConditional = function(noIn) { + var start = this.storeCurrentPos() + var expr = this.parseExprOps(noIn) + if (this.eat(tokTypes.question)) { + var node = this.startNodeAt(start) + node.test = expr + node.consequent = this.parseMaybeAssign() + node.alternate = this.expect(tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent() + return this.finishNode(node, "ConditionalExpression") + } + return expr +} + +lp$2.parseExprOps = function(noIn) { + var start = this.storeCurrentPos() + var indent = this.curIndent, line = this.curLineStart + return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line) +} + +lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) { + if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left + var prec = this.tok.type.binop + if (prec != null && (!noIn || this.tok.type !== tokTypes._in)) { + if (prec > minPrec) { + var node = this.startNodeAt(start) + node.left = left + node.operator = this.tok.value + this.next() + if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) { + node.right = this.dummyIdent() + } else { + var rightStart = this.storeCurrentPos() + node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line) + } + this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression") + return this.parseExprOp(node, start, minPrec, noIn, indent, line) + } + } + return left +} + +lp$2.parseMaybeUnary = function(sawUnary) { + var this$1 = this; + + var start = this.storeCurrentPos(), expr + if (this.tok.type.prefix) { + var node = this.startNode(), update = this.tok.type === tokTypes.incDec + if (!update) sawUnary = true + node.operator = this.tok.value + node.prefix = true + this.next() + node.argument = this.parseMaybeUnary(true) + if (update) node.argument = this.checkLVal(node.argument) + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") + } else if (this.tok.type === tokTypes.ellipsis) { + var node$1 = this.startNode() + this.next() + node$1.argument = this.parseMaybeUnary(sawUnary) + expr = this.finishNode(node$1, "SpreadElement") + } else { + expr = this.parseExprSubscripts() + while (this.tok.type.postfix && !this.canInsertSemicolon()) { + var node$2 = this$1.startNodeAt(start) + node$2.operator = this$1.tok.value + node$2.prefix = false + node$2.argument = this$1.checkLVal(expr) + this$1.next() + expr = this$1.finishNode(node$2, "UpdateExpression") + } + } + + if (!sawUnary && this.eat(tokTypes.starstar)) { + var node$3 = this.startNodeAt(start) + node$3.operator = "**" + node$3.left = expr + node$3.right = this.parseMaybeUnary(false) + return this.finishNode(node$3, "BinaryExpression") + } + + return expr +} + +lp$2.parseExprSubscripts = function() { + var start = this.storeCurrentPos() + return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart) +} + +lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) { + var this$1 = this; + + for (;;) { + if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) { + if (this$1.tok.type == tokTypes.dot && this$1.curIndent == startIndent) + --startIndent + else + return base + } + + if (this$1.eat(tokTypes.dot)) { + var node = this$1.startNodeAt(start) + node.object = base + if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) + node.property = this$1.dummyIdent() + else + node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent() + node.computed = false + base = this$1.finishNode(node, "MemberExpression") + } else if (this$1.tok.type == tokTypes.bracketL) { + this$1.pushCx() + this$1.next() + var node$1 = this$1.startNodeAt(start) + node$1.object = base + node$1.property = this$1.parseExpression() + node$1.computed = true + this$1.popCx() + this$1.expect(tokTypes.bracketR) + base = this$1.finishNode(node$1, "MemberExpression") + } else if (!noCalls && this$1.tok.type == tokTypes.parenL) { + var node$2 = this$1.startNodeAt(start) + node$2.callee = base + node$2.arguments = this$1.parseExprList(tokTypes.parenR) + base = this$1.finishNode(node$2, "CallExpression") + } else if (this$1.tok.type == tokTypes.backQuote) { + var node$3 = this$1.startNodeAt(start) + node$3.tag = base + node$3.quasi = this$1.parseTemplate() + base = this$1.finishNode(node$3, "TaggedTemplateExpression") + } else { + return base + } + } +} + +lp$2.parseExprAtom = function() { + var node + switch (this.tok.type) { + case tokTypes._this: + case tokTypes._super: + var type = this.tok.type === tokTypes._this ? "ThisExpression" : "Super" + node = this.startNode() + this.next() + return this.finishNode(node, type) + + case tokTypes.name: + var start = this.storeCurrentPos() + var id = this.parseIdent() + return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id + + case tokTypes.regexp: + node = this.startNode() + var val = this.tok.value + node.regex = {pattern: val.pattern, flags: val.flags} + node.value = val.value + node.raw = this.input.slice(this.tok.start, this.tok.end) + this.next() + return this.finishNode(node, "Literal") + + case tokTypes.num: case tokTypes.string: + node = this.startNode() + node.value = this.tok.value + node.raw = this.input.slice(this.tok.start, this.tok.end) + this.next() + return this.finishNode(node, "Literal") + + case tokTypes._null: case tokTypes._true: case tokTypes._false: + node = this.startNode() + node.value = this.tok.type === tokTypes._null ? null : this.tok.type === tokTypes._true + node.raw = this.tok.type.keyword + this.next() + return this.finishNode(node, "Literal") + + case tokTypes.parenL: + var parenStart = this.storeCurrentPos() + this.next() + var inner = this.parseExpression() + this.expect(tokTypes.parenR) + if (this.eat(tokTypes.arrow)) { + return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner])) + } + if (this.options.preserveParens) { + var par = this.startNodeAt(parenStart) + par.expression = inner + inner = this.finishNode(par, "ParenthesizedExpression") + } + return inner + + case tokTypes.bracketL: + node = this.startNode() + node.elements = this.parseExprList(tokTypes.bracketR, true) + return this.finishNode(node, "ArrayExpression") + + case tokTypes.braceL: + return this.parseObj() + + case tokTypes._class: + return this.parseClass() + + case tokTypes._function: + node = this.startNode() + this.next() + return this.parseFunction(node, false) + + case tokTypes._new: + return this.parseNew() + + case tokTypes.backQuote: + return this.parseTemplate() + + default: + return this.dummyIdent() + } +} + +lp$2.parseNew = function() { + var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart + var meta = this.parseIdent(true) + if (this.options.ecmaVersion >= 6 && this.eat(tokTypes.dot)) { + node.meta = meta + node.property = this.parseIdent(true) + return this.finishNode(node, "MetaProperty") + } + var start = this.storeCurrentPos() + node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line) + if (this.tok.type == tokTypes.parenL) { + node.arguments = this.parseExprList(tokTypes.parenR) + } else { + node.arguments = [] + } + return this.finishNode(node, "NewExpression") +} + +lp$2.parseTemplateElement = function() { + var elem = this.startNode() + elem.value = { + raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'), + cooked: this.tok.value + } + this.next() + elem.tail = this.tok.type === tokTypes.backQuote + return this.finishNode(elem, "TemplateElement") +} + +lp$2.parseTemplate = function() { + var this$1 = this; + + var node = this.startNode() + this.next() + node.expressions = [] + var curElt = this.parseTemplateElement() + node.quasis = [curElt] + while (!curElt.tail) { + this$1.next() + node.expressions.push(this$1.parseExpression()) + if (this$1.expect(tokTypes.braceR)) { + curElt = this$1.parseTemplateElement() + } else { + curElt = this$1.startNode() + curElt.value = {cooked: '', raw: ''} + curElt.tail = true + this$1.finishNode(curElt, "TemplateElement") + } + node.quasis.push(curElt) + } + this.expect(tokTypes.backQuote) + return this.finishNode(node, "TemplateLiteral") +} + +lp$2.parseObj = function() { + var this$1 = this; + + var node = this.startNode() + node.properties = [] + this.pushCx() + var indent = this.curIndent + 1, line = this.curLineStart + this.eat(tokTypes.braceL) + if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart } + while (!this.closes(tokTypes.braceR, indent, line)) { + var prop = this$1.startNode(), isGenerator, start + if (this$1.options.ecmaVersion >= 6) { + start = this$1.storeCurrentPos() + prop.method = false + prop.shorthand = false + isGenerator = this$1.eat(tokTypes.star) + } + this$1.parsePropertyName(prop) + if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(tokTypes.comma); continue } + if (this$1.eat(tokTypes.colon)) { + prop.kind = "init" + prop.value = this$1.parseMaybeAssign() + } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === tokTypes.parenL || this$1.tok.type === tokTypes.braceL)) { + prop.kind = "init" + prop.method = true + prop.value = this$1.parseMethod(isGenerator) + } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" && + !prop.computed && (prop.key.name === "get" || prop.key.name === "set") && + (this$1.tok.type != tokTypes.comma && this$1.tok.type != tokTypes.braceR)) { + prop.kind = prop.key.name + this$1.parsePropertyName(prop) + prop.value = this$1.parseMethod(false) + } else { + prop.kind = "init" + if (this$1.options.ecmaVersion >= 6) { + if (this$1.eat(tokTypes.eq)) { + var assign = this$1.startNodeAt(start) + assign.operator = "=" + assign.left = prop.key + assign.right = this$1.parseMaybeAssign() + prop.value = this$1.finishNode(assign, "AssignmentExpression") + } else { + prop.value = prop.key + } + } else { + prop.value = this$1.dummyIdent() + } + prop.shorthand = true + } + node.properties.push(this$1.finishNode(prop, "Property")) + this$1.eat(tokTypes.comma) + } + this.popCx() + if (!this.eat(tokTypes.braceR)) { + // If there is no closing brace, make the node span to the start + // of the next token (this is useful for Tern) + this.last.end = this.tok.start + if (this.options.locations) this.last.loc.end = this.tok.loc.start + } + return this.finishNode(node, "ObjectExpression") +} + +lp$2.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(tokTypes.bracketL)) { + prop.computed = true + prop.key = this.parseExpression() + this.expect(tokTypes.bracketR) + return + } else { + prop.computed = false + } + } + var key = (this.tok.type === tokTypes.num || this.tok.type === tokTypes.string) ? this.parseExprAtom() : this.parseIdent() + prop.key = key || this.dummyIdent() +} + +lp$2.parsePropertyAccessor = function() { + if (this.tok.type === tokTypes.name || this.tok.type.keyword) return this.parseIdent() +} + +lp$2.parseIdent = function() { + var name = this.tok.type === tokTypes.name ? this.tok.value : this.tok.type.keyword + if (!name) return this.dummyIdent() + var node = this.startNode() + this.next() + node.name = name + return this.finishNode(node, "Identifier") +} + +lp$2.initFunction = function(node) { + node.id = null + node.params = [] + if (this.options.ecmaVersion >= 6) { + node.generator = false + node.expression = false + } +} + +// Convert existing expression atom to assignable pattern +// if possible. + +lp$2.toAssignable = function(node, binding) { + var this$1 = this; + + if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) { + // Okay + } else if (node.type == "ParenthesizedExpression") { + node.expression = this.toAssignable(node.expression, binding) + } else if (this.options.ecmaVersion < 6) { + return this.dummyIdent() + } else if (node.type == "ObjectExpression") { + node.type = "ObjectPattern" + var props = node.properties + for (var i = 0; i < props.length; i++) + props[i].value = this$1.toAssignable(props[i].value, binding) + } else if (node.type == "ArrayExpression") { + node.type = "ArrayPattern" + this.toAssignableList(node.elements, binding) + } else if (node.type == "SpreadElement") { + node.type = "RestElement" + node.argument = this.toAssignable(node.argument, binding) + } else if (node.type == "AssignmentExpression") { + node.type = "AssignmentPattern" + delete node.operator + } else { + return this.dummyIdent() + } + return node +} + +lp$2.toAssignableList = function(exprList, binding) { + var this$1 = this; + + for (var i = 0; i < exprList.length; i++) + exprList[i] = this$1.toAssignable(exprList[i], binding) + return exprList +} + +lp$2.parseFunctionParams = function(params) { + params = this.parseExprList(tokTypes.parenR) + return this.toAssignableList(params, true) +} + +lp$2.parseMethod = function(isGenerator) { + var node = this.startNode() + this.initFunction(node) + node.params = this.parseFunctionParams() + node.generator = isGenerator || false + node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tokTypes.braceL + node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock() + return this.finishNode(node, "FunctionExpression") +} + +lp$2.parseArrowExpression = function(node, params) { + this.initFunction(node) + node.params = this.toAssignableList(params, true) + node.expression = this.tok.type !== tokTypes.braceL + node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock() + return this.finishNode(node, "ArrowFunctionExpression") +} + +lp$2.parseExprList = function(close, allowEmpty) { + var this$1 = this; + + this.pushCx() + var indent = this.curIndent, line = this.curLineStart, elts = [] + this.next() // Opening bracket + while (!this.closes(close, indent + 1, line)) { + if (this$1.eat(tokTypes.comma)) { + elts.push(allowEmpty ? null : this$1.dummyIdent()) + continue + } + var elt = this$1.parseMaybeAssign() + if (isDummy(elt)) { + if (this$1.closes(close, indent, line)) break + this$1.next() + } else { + elts.push(elt) + } + this$1.eat(tokTypes.comma) + } + this.popCx() + if (!this.eat(close)) { + // If there is no closing brace, make the node span to the start + // of the next token (this is useful for Tern) + this.last.end = this.tok.start + if (this.options.locations) this.last.loc.end = this.tok.loc.start + } + return elts +} + +acorn.defaultOptions.tabSize = 4 + +function parse_dammit(input, options) { + var p = new LooseParser(input, options) + p.next() + return p.parseTopLevel() +} + +acorn.parse_dammit = parse_dammit +acorn.LooseParser = LooseParser +acorn.pluginsLoose = pluginsLoose + +export { parse_dammit, LooseParser, pluginsLoose };
\ No newline at end of file diff --git a/tools/eslint/node_modules/acorn/dist/acorn_loose.js b/tools/eslint/node_modules/acorn/dist/acorn_loose.js index de4a13957e..26b9e48128 100644 --- a/tools/eslint/node_modules/acorn/dist/acorn_loose.js +++ b/tools/eslint/node_modules/acorn/dist/acorn_loose.js @@ -1,1322 +1,1273 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.acorn || (g.acorn = {})).loose = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&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?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ -"use strict"; +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('./acorn.js')) : + typeof define === 'function' && define.amd ? define(['exports', './acorn.js'], factory) : + (factory((global.acorn = global.acorn || {}, global.acorn.loose = global.acorn.loose || {}),global.acorn)); +}(this, function (exports,acorn) { 'use strict'; -module.exports = typeof acorn != 'undefined' ? acorn : require("./acorn"); + var acorn__default = 'default' in acorn ? acorn['default'] : acorn; -},{}],2:[function(_dereq_,module,exports){ -"use strict"; + // Registered plugins + var pluginsLoose = {} -var _state = _dereq_("./state"); + var LooseParser = function LooseParser(input, options) { + if ( options === void 0 ) options = {}; -var _parseutil = _dereq_("./parseutil"); + this.toks = acorn.tokenizer(input, options) + this.options = this.toks.options + this.input = this.toks.input + this.tok = this.last = {type: acorn.tokTypes.eof, start: 0, end: 0} + if (this.options.locations) { + var here = this.toks.curPosition() + this.tok.loc = new acorn.SourceLocation(this.toks, here, here) + } + this.ahead = [] // Tokens ahead + this.context = [] // Indentation contexted + this.curIndent = 0 + this.curLineStart = 0 + this.nextLineStart = this.lineEnd(this.curLineStart) + 1 + // Load plugins + this.options.pluginsLoose = options.pluginsLoose || {} + this.loadPlugins(this.options.pluginsLoose) + }; -var _ = _dereq_(".."); + LooseParser.prototype.startNode = function startNode () { + return new acorn.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null) + }; -var lp = _state.LooseParser.prototype; + LooseParser.prototype.storeCurrentPos = function storeCurrentPos () { + return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start + }; -lp.checkLVal = function (expr) { - if (!expr) return expr; - switch (expr.type) { - case "Identifier": - case "MemberExpression": - return expr; + LooseParser.prototype.startNodeAt = function startNodeAt (pos) { + if (this.options.locations) { + return new acorn.Node(this.toks, pos[0], pos[1]) + } else { + return new acorn.Node(this.toks, pos) + } + }; - case "ParenthesizedExpression": - expr.expression = this.checkLVal(expr.expression); - return expr; + LooseParser.prototype.finishNode = function finishNode (node, type) { + node.type = type + node.end = this.last.end + if (this.options.locations) + node.loc.end = this.last.loc.end + if (this.options.ranges) + node.range[1] = this.last.end + return node + }; - default: - return this.dummyIdent(); - } -}; - -lp.parseExpression = function (noIn) { - var start = this.storeCurrentPos(); - var expr = this.parseMaybeAssign(noIn); - if (this.tok.type === _.tokTypes.comma) { - var node = this.startNodeAt(start); - node.expressions = [expr]; - while (this.eat(_.tokTypes.comma)) node.expressions.push(this.parseMaybeAssign(noIn)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; - -lp.parseParenExpression = function () { - this.pushCx(); - this.expect(_.tokTypes.parenL); - var val = this.parseExpression(); - this.popCx(); - this.expect(_.tokTypes.parenR); - return val; -}; - -lp.parseMaybeAssign = function (noIn) { - if (this.toks.isContextual("yield")) { - var node = this.startNode(); - this.next(); - if (this.semicolon() || this.canInsertSemicolon() || this.tok.type != _.tokTypes.star && !this.tok.type.startsExpr) { - node.delegate = false; - node.argument = null; + LooseParser.prototype.dummyNode = function dummyNode (type) { + var dummy = this.startNode() + dummy.type = type + dummy.end = dummy.start + if (this.options.locations) + dummy.loc.end = dummy.loc.start + if (this.options.ranges) + dummy.range[1] = dummy.start + this.last = {type: acorn.tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc} + return dummy + }; + + LooseParser.prototype.dummyIdent = function dummyIdent () { + var dummy = this.dummyNode("Identifier") + dummy.name = "✖" + return dummy + }; + + LooseParser.prototype.dummyString = function dummyString () { + var dummy = this.dummyNode("Literal") + dummy.value = dummy.raw = "✖" + return dummy + }; + + LooseParser.prototype.eat = function eat (type) { + if (this.tok.type === type) { + this.next() + return true } else { - node.delegate = this.eat(_.tokTypes.star); - node.argument = this.parseMaybeAssign(); + return false } - return this.finishNode(node, "YieldExpression"); - } + }; - var start = this.storeCurrentPos(); - var left = this.parseMaybeConditional(noIn); - if (this.tok.type.isAssign) { - var node = this.startNodeAt(start); - node.operator = this.tok.value; - node.left = this.tok.type === _.tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } - return left; -}; - -lp.parseMaybeConditional = function (noIn) { - var start = this.storeCurrentPos(); - var expr = this.parseExprOps(noIn); - if (this.eat(_.tokTypes.question)) { - var node = this.startNodeAt(start); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - node.alternate = this.expect(_.tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent(); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; - -lp.parseExprOps = function (noIn) { - var start = this.storeCurrentPos(); - var indent = this.curIndent, - line = this.curLineStart; - return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line); -}; - -lp.parseExprOp = function (left, start, minPrec, noIn, indent, line) { - if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left; - var prec = this.tok.type.binop; - if (prec != null && (!noIn || this.tok.type !== _.tokTypes._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(start); - node.left = left; - node.operator = this.tok.value; - this.next(); - if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) { - node.right = this.dummyIdent(); - } else { - var rightStart = this.storeCurrentPos(); - node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line); + LooseParser.prototype.isContextual = function isContextual (name) { + return this.tok.type === acorn.tokTypes.name && this.tok.value === name + }; + + LooseParser.prototype.eatContextual = function eatContextual (name) { + return this.tok.value === name && this.eat(acorn.tokTypes.name) + }; + + LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () { + return this.tok.type === acorn.tokTypes.eof || this.tok.type === acorn.tokTypes.braceR || + acorn.lineBreak.test(this.input.slice(this.last.end, this.tok.start)) + }; + + LooseParser.prototype.semicolon = function semicolon () { + return this.eat(acorn.tokTypes.semi) + }; + + LooseParser.prototype.expect = function expect (type) { + var this$1 = this; + + if (this.eat(type)) return true + for (var i = 1; i <= 2; i++) { + if (this$1.lookAhead(i).type == type) { + for (var j = 0; j < i; j++) this$1.next() + return true } - this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, start, minPrec, noIn, indent, line); - } - } - return left; -}; - -lp.parseMaybeUnary = function (sawUnary) { - var start = this.storeCurrentPos(), - expr = undefined; - if (this.tok.type.prefix) { - var node = this.startNode(), - update = this.tok.type === _.tokTypes.incDec; - if (!update) sawUnary = true; - node.operator = this.tok.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(true); - if (update) node.argument = this.checkLVal(node.argument); - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else if (this.tok.type === _.tokTypes.ellipsis) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(sawUnary); - expr = this.finishNode(node, "SpreadElement"); - } else { - expr = this.parseExprSubscripts(); - while (this.tok.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(start); - node.operator = this.tok.value; - node.prefix = false; - node.argument = this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); } - } + }; - if (!sawUnary && this.eat(_.tokTypes.starstar)) { - var node = this.startNodeAt(start); - node.operator = "**"; - node.left = expr; - node.right = this.parseMaybeUnary(false); - return this.finishNode(node, "BinaryExpression"); - } + LooseParser.prototype.pushCx = function pushCx () { + this.context.push(this.curIndent) + }; - return expr; -}; + LooseParser.prototype.popCx = function popCx () { + this.curIndent = this.context.pop() + }; -lp.parseExprSubscripts = function () { - var start = this.storeCurrentPos(); - return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart); -}; + LooseParser.prototype.lineEnd = function lineEnd (pos) { + while (pos < this.input.length && !acorn.isNewLine(this.input.charCodeAt(pos))) ++pos + return pos + }; -lp.parseSubscripts = function (base, start, noCalls, startIndent, line) { - for (;;) { - if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) { - if (this.tok.type == _.tokTypes.dot && this.curIndent == startIndent) --startIndent;else return base; - } + LooseParser.prototype.indentationAfter = function indentationAfter (pos) { + var this$1 = this; - if (this.eat(_.tokTypes.dot)) { - var node = this.startNodeAt(start); - node.object = base; - if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) node.property = this.dummyIdent();else node.property = this.parsePropertyAccessor() || this.dummyIdent(); - node.computed = false; - base = this.finishNode(node, "MemberExpression"); - } else if (this.tok.type == _.tokTypes.bracketL) { - this.pushCx(); - this.next(); - var node = this.startNodeAt(start); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.popCx(); - this.expect(_.tokTypes.bracketR); - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.tok.type == _.tokTypes.parenL) { - var node = this.startNodeAt(start); - node.callee = base; - node.arguments = this.parseExprList(_.tokTypes.parenR); - base = this.finishNode(node, "CallExpression"); - } else if (this.tok.type == _.tokTypes.backQuote) { - var node = this.startNodeAt(start); - node.tag = base; - node.quasi = this.parseTemplate(); - base = this.finishNode(node, "TaggedTemplateExpression"); - } else { - return base; + for (var count = 0;; ++pos) { + var ch = this$1.input.charCodeAt(pos) + if (ch === 32) ++count + else if (ch === 9) count += this$1.options.tabSize + else return count } - } -}; - -lp.parseExprAtom = function () { - var node = undefined; - switch (this.tok.type) { - case _.tokTypes._this: - case _.tokTypes._super: - var type = this.tok.type === _.tokTypes._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case _.tokTypes.name: - var start = this.storeCurrentPos(); - var id = this.parseIdent(); - return this.eat(_.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id; - - case _.tokTypes.regexp: - node = this.startNode(); - var val = this.tok.value; - node.regex = { pattern: val.pattern, flags: val.flags }; - node.value = val.value; - node.raw = this.input.slice(this.tok.start, this.tok.end); - this.next(); - return this.finishNode(node, "Literal"); - - case _.tokTypes.num:case _.tokTypes.string: - node = this.startNode(); - node.value = this.tok.value; - node.raw = this.input.slice(this.tok.start, this.tok.end); - this.next(); - return this.finishNode(node, "Literal"); - - case _.tokTypes._null:case _.tokTypes._true:case _.tokTypes._false: - node = this.startNode(); - node.value = this.tok.type === _.tokTypes._null ? null : this.tok.type === _.tokTypes._true; - node.raw = this.tok.type.keyword; - this.next(); - return this.finishNode(node, "Literal"); - - case _.tokTypes.parenL: - var parenStart = this.storeCurrentPos(); - this.next(); - var inner = this.parseExpression(); - this.expect(_.tokTypes.parenR); - if (this.eat(_.tokTypes.arrow)) { - return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (_parseutil.isDummy(inner) ? [] : [inner])); - } - if (this.options.preserveParens) { - var par = this.startNodeAt(parenStart); - par.expression = inner; - inner = this.finishNode(par, "ParenthesizedExpression"); - } - return inner; + }; - case _.tokTypes.bracketL: - node = this.startNode(); - node.elements = this.parseExprList(_.tokTypes.bracketR, true); - return this.finishNode(node, "ArrayExpression"); + LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) { + if (this.tok.type === closeTok || this.tok.type === acorn.tokTypes.eof) return true + return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && + (!blockHeuristic || this.nextLineStart >= this.input.length || + this.indentationAfter(this.nextLineStart) < indent) + }; - case _.tokTypes.braceL: - return this.parseObj(); + LooseParser.prototype.tokenStartsLine = function tokenStartsLine () { + var this$1 = this; - case _.tokTypes._class: - return this.parseClass(); + for (var p = this.tok.start - 1; p >= this.curLineStart; --p) { + var ch = this$1.input.charCodeAt(p) + if (ch !== 9 && ch !== 32) return false + } + return true + }; - case _.tokTypes._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); + LooseParser.prototype.extend = function extend (name, f) { + this[name] = f(this[name]) + }; - case _.tokTypes._new: - return this.parseNew(); + LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { + var this$1 = this; - case _.tokTypes.backQuote: - return this.parseTemplate(); + for (var name in pluginConfigs) { + var plugin = pluginsLoose[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this$1, pluginConfigs[name]) + } + }; - default: - return this.dummyIdent(); - } -}; - -lp.parseNew = function () { - var node = this.startNode(), - startIndent = this.curIndent, - line = this.curLineStart; - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(_.tokTypes.dot)) { - node.meta = meta; - node.property = this.parseIdent(true); - return this.finishNode(node, "MetaProperty"); - } - var start = this.storeCurrentPos(); - node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line); - if (this.tok.type == _.tokTypes.parenL) { - node.arguments = this.parseExprList(_.tokTypes.parenR); - } else { - node.arguments = []; + var lp = LooseParser.prototype + + function isSpace(ch) { + return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || acorn.isNewLine(ch) } - return this.finishNode(node, "NewExpression"); -}; - -lp.parseTemplateElement = function () { - var elem = this.startNode(); - elem.value = { - raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'), - cooked: this.tok.value - }; - this.next(); - elem.tail = this.tok.type === _.tokTypes.backQuote; - return this.finishNode(elem, "TemplateElement"); -}; - -lp.parseTemplate = function () { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(); - node.quasis = [curElt]; - while (!curElt.tail) { - this.next(); - node.expressions.push(this.parseExpression()); - if (this.expect(_.tokTypes.braceR)) { - curElt = this.parseTemplateElement(); - } else { - curElt = this.startNode(); - curElt.value = { cooked: '', raw: '' }; - curElt.tail = true; - this.finishNode(curElt, "TemplateElement"); + + lp.next = function() { + var this$1 = this; + + this.last = this.tok + if (this.ahead.length) + this.tok = this.ahead.shift() + else + this.tok = this.readToken() + + if (this.tok.start >= this.nextLineStart) { + while (this.tok.start >= this.nextLineStart) { + this$1.curLineStart = this$1.nextLineStart + this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1 + } + this.curIndent = this.indentationAfter(this.curLineStart) } - node.quasis.push(curElt); } - this.expect(_.tokTypes.backQuote); - return this.finishNode(node, "TemplateLiteral"); -}; - -lp.parseObj = function () { - var node = this.startNode(); - node.properties = []; - this.pushCx(); - var indent = this.curIndent + 1, - line = this.curLineStart; - this.eat(_.tokTypes.braceL); - if (this.curIndent + 1 < indent) { - indent = this.curIndent;line = this.curLineStart; - } - while (!this.closes(_.tokTypes.braceR, indent, line)) { - var prop = this.startNode(), - isGenerator = undefined, - start = undefined; - if (this.options.ecmaVersion >= 6) { - start = this.storeCurrentPos(); - prop.method = false; - prop.shorthand = false; - isGenerator = this.eat(_.tokTypes.star); - } - this.parsePropertyName(prop); - if (_parseutil.isDummy(prop.key)) { - if (_parseutil.isDummy(this.parseMaybeAssign())) this.next();this.eat(_.tokTypes.comma);continue; - } - if (this.eat(_.tokTypes.colon)) { - prop.kind = "init"; - prop.value = this.parseMaybeAssign(); - } else if (this.options.ecmaVersion >= 6 && (this.tok.type === _.tokTypes.parenL || this.tok.type === _.tokTypes.braceL)) { - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" && !prop.computed && (prop.key.name === "get" || prop.key.name === "set") && this.tok.type != _.tokTypes.comma && this.tok.type != _.tokTypes.braceR) { - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - } else { - prop.kind = "init"; - if (this.options.ecmaVersion >= 6) { - if (this.eat(_.tokTypes.eq)) { - var assign = this.startNodeAt(start); - assign.operator = "="; - assign.left = prop.key; - assign.right = this.parseMaybeAssign(); - prop.value = this.finishNode(assign, "AssignmentExpression"); + + lp.readToken = function() { + var this$1 = this; + + for (;;) { + try { + this$1.toks.next() + if (this$1.toks.type === acorn.tokTypes.dot && + this$1.input.substr(this$1.toks.end, 1) === "." && + this$1.options.ecmaVersion >= 6) { + this$1.toks.end++ + this$1.toks.type = acorn.tokTypes.ellipsis + } + return new acorn.Token(this$1.toks) + } catch(e) { + if (!(e instanceof SyntaxError)) throw e + + // Try to skip some text, based on the error message, and then continue + var msg = e.message, pos = e.raisedAt, replace = true + if (/unterminated/i.test(msg)) { + pos = this$1.lineEnd(e.pos + 1) + if (/string/.test(msg)) { + replace = {start: e.pos, end: pos, type: acorn.tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)} + } else if (/regular expr/i.test(msg)) { + var re = this$1.input.slice(e.pos, pos) + try { re = new RegExp(re) } catch(e) {} + replace = {start: e.pos, end: pos, type: acorn.tokTypes.regexp, value: re} + } else if (/template/.test(msg)) { + replace = {start: e.pos, end: pos, + type: acorn.tokTypes.template, + value: this$1.input.slice(e.pos, pos)} + } else { + replace = false + } + } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) { + while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos + } else if (/character escape|expected hexadecimal/i.test(msg)) { + while (pos < this.input.length) { + var ch = this$1.input.charCodeAt(pos++) + if (ch === 34 || ch === 39 || acorn.isNewLine(ch)) break + } + } else if (/unexpected character/i.test(msg)) { + pos++ + replace = false + } else if (/regular expression/i.test(msg)) { + replace = true } else { - prop.value = prop.key; + throw e + } + this$1.resetTo(pos) + if (replace === true) replace = {start: pos, end: pos, type: acorn.tokTypes.name, value: "✖"} + if (replace) { + if (this$1.options.locations) + replace.loc = new acorn.SourceLocation( + this$1.toks, + acorn.getLineInfo(this$1.input, replace.start), + acorn.getLineInfo(this$1.input, replace.end)) + return replace } - } else { - prop.value = this.dummyIdent(); } - prop.shorthand = true; } - node.properties.push(this.finishNode(prop, "Property")); - this.eat(_.tokTypes.comma); - } - this.popCx(); - if (!this.eat(_.tokTypes.braceR)) { - // If there is no closing brace, make the node span to the start - // of the next token (this is useful for Tern) - this.last.end = this.tok.start; - if (this.options.locations) this.last.loc.end = this.tok.loc.start; } - return this.finishNode(node, "ObjectExpression"); -}; - -lp.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(_.tokTypes.bracketL)) { - prop.computed = true; - prop.key = this.parseExpression(); - this.expect(_.tokTypes.bracketR); - return; - } else { - prop.computed = false; - } - } - var key = this.tok.type === _.tokTypes.num || this.tok.type === _.tokTypes.string ? this.parseExprAtom() : this.parseIdent(); - prop.key = key || this.dummyIdent(); -}; - -lp.parsePropertyAccessor = function () { - if (this.tok.type === _.tokTypes.name || this.tok.type.keyword) return this.parseIdent(); -}; - -lp.parseIdent = function () { - var name = this.tok.type === _.tokTypes.name ? this.tok.value : this.tok.type.keyword; - if (!name) return this.dummyIdent(); - var node = this.startNode(); - this.next(); - node.name = name; - return this.finishNode(node, "Identifier"); -}; - -lp.initFunction = function (node) { - node.id = null; - node.params = []; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } -}; -// Convert existing expression atom to assignable pattern -// if possible. + lp.resetTo = function(pos) { + var this$1 = this; -lp.toAssignable = function (node, binding) { - if (!node || node.type == "Identifier" || node.type == "MemberExpression" && !binding) { - // Okay - } else if (node.type == "ParenthesizedExpression") { - node.expression = this.toAssignable(node.expression, binding); - } else if (this.options.ecmaVersion < 6) { - return this.dummyIdent(); - } else if (node.type == "ObjectExpression") { - node.type = "ObjectPattern"; - var props = node.properties; - for (var i = 0; i < props.length; i++) { - props[i].value = this.toAssignable(props[i].value, binding); + this.toks.pos = pos + var ch = this.input.charAt(pos - 1) + this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) || + /[enwfd]/.test(ch) && + /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos)) + + if (this.options.locations) { + this.toks.curLine = 1 + this.toks.lineStart = acorn.lineBreakG.lastIndex = 0 + var match + while ((match = acorn.lineBreakG.exec(this.input)) && match.index < pos) { + ++this$1.toks.curLine + this$1.toks.lineStart = match.index + match[0].length } - } else if (node.type == "ArrayExpression") { - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, binding); - } else if (node.type == "SpreadElement") { - node.type = "RestElement"; - node.argument = this.toAssignable(node.argument, binding); - } else if (node.type == "AssignmentExpression") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - return this.dummyIdent(); - } - return node; -}; - -lp.toAssignableList = function (exprList, binding) { - for (var i = 0; i < exprList.length; i++) { - exprList[i] = this.toAssignable(exprList[i], binding); - }return exprList; -}; - -lp.parseFunctionParams = function (params) { - params = this.parseExprList(_.tokTypes.parenR); - return this.toAssignableList(params, true); -}; - -lp.parseMethod = function (isGenerator) { - var node = this.startNode(); - this.initFunction(node); - node.params = this.parseFunctionParams(); - node.generator = isGenerator || false; - node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== _.tokTypes.braceL; - node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock(); - return this.finishNode(node, "FunctionExpression"); -}; - -lp.parseArrowExpression = function (node, params) { - this.initFunction(node); - node.params = this.toAssignableList(params, true); - node.expression = this.tok.type !== _.tokTypes.braceL; - node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock(); - return this.finishNode(node, "ArrowFunctionExpression"); -}; - -lp.parseExprList = function (close, allowEmpty) { - this.pushCx(); - var indent = this.curIndent, - line = this.curLineStart, - elts = []; - this.next(); // Opening bracket - while (!this.closes(close, indent + 1, line)) { - if (this.eat(_.tokTypes.comma)) { - elts.push(allowEmpty ? null : this.dummyIdent()); - continue; - } - var elt = this.parseMaybeAssign(); - if (_parseutil.isDummy(elt)) { - if (this.closes(close, indent, line)) break; - this.next(); - } else { - elts.push(elt); } - this.eat(_.tokTypes.comma); } - this.popCx(); - if (!this.eat(close)) { - // If there is no closing brace, make the node span to the start - // of the next token (this is useful for Tern) - this.last.end = this.tok.start; - if (this.options.locations) this.last.loc.end = this.tok.loc.start; - } - return elts; -}; - -},{"..":1,"./parseutil":4,"./state":5}],3:[function(_dereq_,module,exports){ -// Acorn: Loose parser -// -// This module provides an alternative parser (`parse_dammit`) that -// exposes that same interface as `parse`, but will try to parse -// anything as JavaScript, repairing syntax error the best it can. -// There are circumstances in which it will raise an error and give -// up, but they are very rare. The resulting AST will be a mostly -// valid JavaScript AST (as per the [Mozilla parser API][api], except -// that: -// -// - Return outside functions is allowed -// -// - Label consistency (no conflicts, break only to existing labels) -// is not enforced. -// -// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever -// the parser got too confused to return anything meaningful. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API -// -// The expected use for this is to *first* try `acorn.parse`, and only -// if that fails switch to `parse_dammit`. The loose parser might -// parse badly indented code incorrectly, so **don't** use it as -// your default parser. -// -// Quite a lot of acorn.js is duplicated here. The alternative was to -// add a *lot* of extra cruft to that file, making it less readable -// and slower. Copying and editing the code allowed me to make -// invasive changes and simplifications without creating a complicated -// tangle. - -"use strict"; -exports.__esModule = true; -exports.parse_dammit = parse_dammit; + lp.lookAhead = function(n) { + var this$1 = this; -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } - -var _ = _dereq_(".."); + while (n > this.ahead.length) + this$1.ahead.push(this$1.readToken()) + return this.ahead[n - 1] + } -var acorn = _interopRequireWildcard(_); + function isDummy(node) { return node.name == "✖" } -var _state = _dereq_("./state"); + var lp$1 = LooseParser.prototype -_dereq_("./tokenize"); + lp$1.parseTopLevel = function() { + var this$1 = this; -_dereq_("./statement"); + var node = this.startNodeAt(this.options.locations ? [0, acorn.getLineInfo(this.input, 0)] : 0) + node.body = [] + while (this.tok.type !== acorn.tokTypes.eof) node.body.push(this$1.parseStatement()) + this.last = this.tok + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType + } + return this.finishNode(node, "Program") + } -_dereq_("./expression"); + lp$1.parseStatement = function() { + var this$1 = this; -exports.LooseParser = _state.LooseParser; -exports.pluginsLoose = _state.pluginsLoose; + var starttype = this.tok.type, node = this.startNode(), kind -acorn.defaultOptions.tabSize = 4; + if (this.toks.isLet()) { + starttype = acorn.tokTypes._var + kind = "let" + } -function parse_dammit(input, options) { - var p = new _state.LooseParser(input, options); - p.next(); - return p.parseTopLevel(); -} + switch (starttype) { + case acorn.tokTypes._break: case acorn.tokTypes._continue: + this.next() + var isBreak = starttype === acorn.tokTypes._break + if (this.semicolon() || this.canInsertSemicolon()) { + node.label = null + } else { + node.label = this.tok.type === acorn.tokTypes.name ? this.parseIdent() : null + this.semicolon() + } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + + case acorn.tokTypes._debugger: + this.next() + this.semicolon() + return this.finishNode(node, "DebuggerStatement") + + case acorn.tokTypes._do: + this.next() + node.body = this.parseStatement() + node.test = this.eat(acorn.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent() + this.semicolon() + return this.finishNode(node, "DoWhileStatement") + + case acorn.tokTypes._for: + this.next() + this.pushCx() + this.expect(acorn.tokTypes.parenL) + if (this.tok.type === acorn.tokTypes.semi) return this.parseFor(node, null) + var isLet = this.toks.isLet() + if (isLet || this.tok.type === acorn.tokTypes._var || this.tok.type === acorn.tokTypes._const) { + var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value) + if (init$1.declarations.length === 1 && (this.tok.type === acorn.tokTypes._in || this.isContextual("of"))) { + return this.parseForIn(node, init$1) + } + return this.parseFor(node, init$1) + } + var init = this.parseExpression(true) + if (this.tok.type === acorn.tokTypes._in || this.isContextual("of")) + return this.parseForIn(node, this.toAssignable(init)) + return this.parseFor(node, init) + + case acorn.tokTypes._function: + this.next() + return this.parseFunction(node, true) + + case acorn.tokTypes._if: + this.next() + node.test = this.parseParenExpression() + node.consequent = this.parseStatement() + node.alternate = this.eat(acorn.tokTypes._else) ? this.parseStatement() : null + return this.finishNode(node, "IfStatement") + + case acorn.tokTypes._return: + this.next() + if (this.eat(acorn.tokTypes.semi) || this.canInsertSemicolon()) node.argument = null + else { node.argument = this.parseExpression(); this.semicolon() } + return this.finishNode(node, "ReturnStatement") + + case acorn.tokTypes._switch: + var blockIndent = this.curIndent, line = this.curLineStart + this.next() + node.discriminant = this.parseParenExpression() + node.cases = [] + this.pushCx() + this.expect(acorn.tokTypes.braceL) + + var cur + while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true)) { + if (this$1.tok.type === acorn.tokTypes._case || this$1.tok.type === acorn.tokTypes._default) { + var isCase = this$1.tok.type === acorn.tokTypes._case + if (cur) this$1.finishNode(cur, "SwitchCase") + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + this$1.next() + if (isCase) cur.test = this$1.parseExpression() + else cur.test = null + this$1.expect(acorn.tokTypes.colon) + } else { + if (!cur) { + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + cur.test = null + } + cur.consequent.push(this$1.parseStatement()) + } + } + if (cur) this.finishNode(cur, "SwitchCase") + this.popCx() + this.eat(acorn.tokTypes.braceR) + return this.finishNode(node, "SwitchStatement") + + case acorn.tokTypes._throw: + this.next() + node.argument = this.parseExpression() + this.semicolon() + return this.finishNode(node, "ThrowStatement") + + case acorn.tokTypes._try: + this.next() + node.block = this.parseBlock() + node.handler = null + if (this.tok.type === acorn.tokTypes._catch) { + var clause = this.startNode() + this.next() + this.expect(acorn.tokTypes.parenL) + clause.param = this.toAssignable(this.parseExprAtom(), true) + this.expect(acorn.tokTypes.parenR) + clause.body = this.parseBlock() + node.handler = this.finishNode(clause, "CatchClause") + } + node.finalizer = this.eat(acorn.tokTypes._finally) ? this.parseBlock() : null + if (!node.handler && !node.finalizer) return node.block + return this.finishNode(node, "TryStatement") -acorn.parse_dammit = parse_dammit; -acorn.LooseParser = _state.LooseParser; -acorn.pluginsLoose = _state.pluginsLoose; + case acorn.tokTypes._var: + case acorn.tokTypes._const: + return this.parseVar(false, kind || this.tok.value) -},{"..":1,"./expression":2,"./state":5,"./statement":6,"./tokenize":7}],4:[function(_dereq_,module,exports){ -"use strict"; + case acorn.tokTypes._while: + this.next() + node.test = this.parseParenExpression() + node.body = this.parseStatement() + return this.finishNode(node, "WhileStatement") -exports.__esModule = true; -exports.isDummy = isDummy; + case acorn.tokTypes._with: + this.next() + node.object = this.parseParenExpression() + node.body = this.parseStatement() + return this.finishNode(node, "WithStatement") -function isDummy(node) { - return node.name == "✖"; -} + case acorn.tokTypes.braceL: + return this.parseBlock() -},{}],5:[function(_dereq_,module,exports){ -"use strict"; + case acorn.tokTypes.semi: + this.next() + return this.finishNode(node, "EmptyStatement") -exports.__esModule = true; + case acorn.tokTypes._class: + return this.parseClass(true) -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + case acorn.tokTypes._import: + return this.parseImport() -var _ = _dereq_(".."); + case acorn.tokTypes._export: + return this.parseExport() -// Registered plugins -var pluginsLoose = {}; + default: + var expr = this.parseExpression() + if (isDummy(expr)) { + this.next() + if (this.tok.type === acorn.tokTypes.eof) return this.finishNode(node, "EmptyStatement") + return this.parseStatement() + } else if (starttype === acorn.tokTypes.name && expr.type === "Identifier" && this.eat(acorn.tokTypes.colon)) { + node.body = this.parseStatement() + node.label = expr + return this.finishNode(node, "LabeledStatement") + } else { + node.expression = expr + this.semicolon() + return this.finishNode(node, "ExpressionStatement") + } + } + } -exports.pluginsLoose = pluginsLoose; + lp$1.parseBlock = function() { + var this$1 = this; + + var node = this.startNode() + this.pushCx() + this.expect(acorn.tokTypes.braceL) + var blockIndent = this.curIndent, line = this.curLineStart + node.body = [] + while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true)) + node.body.push(this$1.parseStatement()) + this.popCx() + this.eat(acorn.tokTypes.braceR) + return this.finishNode(node, "BlockStatement") + } -var LooseParser = (function () { - function LooseParser(input) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + lp$1.parseFor = function(node, init) { + node.init = init + node.test = node.update = null + if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.semi) node.test = this.parseExpression() + if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.parenR) node.update = this.parseExpression() + this.popCx() + this.expect(acorn.tokTypes.parenR) + node.body = this.parseStatement() + return this.finishNode(node, "ForStatement") + } - _classCallCheck(this, LooseParser); + lp$1.parseForIn = function(node, init) { + var type = this.tok.type === acorn.tokTypes._in ? "ForInStatement" : "ForOfStatement" + this.next() + node.left = init + node.right = this.parseExpression() + this.popCx() + this.expect(acorn.tokTypes.parenR) + node.body = this.parseStatement() + return this.finishNode(node, type) + } - this.toks = _.tokenizer(input, options); - this.options = this.toks.options; - this.input = this.toks.input; - this.tok = this.last = { type: _.tokTypes.eof, start: 0, end: 0 }; - if (this.options.locations) { - var here = this.toks.curPosition(); - this.tok.loc = new _.SourceLocation(this.toks, here, here); + lp$1.parseVar = function(noIn, kind) { + var this$1 = this; + + var node = this.startNode() + node.kind = kind + this.next() + node.declarations = [] + do { + var decl = this$1.startNode() + decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent() + decl.init = this$1.eat(acorn.tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null + node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")) + } while (this.eat(acorn.tokTypes.comma)) + if (!node.declarations.length) { + var decl$1 = this.startNode() + decl$1.id = this.dummyIdent() + node.declarations.push(this.finishNode(decl$1, "VariableDeclarator")) } - this.ahead = []; // Tokens ahead - this.context = []; // Indentation contexted - this.curIndent = 0; - this.curLineStart = 0; - this.nextLineStart = this.lineEnd(this.curLineStart) + 1; - // Load plugins - this.options.pluginsLoose = options.pluginsLoose || {}; - this.loadPlugins(this.options.pluginsLoose); + if (!noIn) this.semicolon() + return this.finishNode(node, "VariableDeclaration") } - LooseParser.prototype.startNode = function startNode() { - return new _.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null); - }; + lp$1.parseClass = function(isStatement) { + var this$1 = this; + + var node = this.startNode() + this.next() + if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent() + else if (isStatement) node.id = this.dummyIdent() + else node.id = null + node.superClass = this.eat(acorn.tokTypes._extends) ? this.parseExpression() : null + node.body = this.startNode() + node.body.body = [] + this.pushCx() + var indent = this.curIndent + 1, line = this.curLineStart + this.eat(acorn.tokTypes.braceL) + if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart } + while (!this.closes(acorn.tokTypes.braceR, indent, line)) { + if (this$1.semicolon()) continue + var method = this$1.startNode(), isGenerator + if (this$1.options.ecmaVersion >= 6) { + method.static = false + isGenerator = this$1.eat(acorn.tokTypes.star) + } + this$1.parsePropertyName(method) + if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue } + if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" && + (this$1.tok.type != acorn.tokTypes.parenL && this$1.tok.type != acorn.tokTypes.braceL)) { + method.static = true + isGenerator = this$1.eat(acorn.tokTypes.star) + this$1.parsePropertyName(method) + } else { + method.static = false + } + if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" && + !method.computed && (method.key.name === "get" || method.key.name === "set") && + this$1.tok.type !== acorn.tokTypes.parenL && this$1.tok.type !== acorn.tokTypes.braceL) { + method.kind = method.key.name + this$1.parsePropertyName(method) + method.value = this$1.parseMethod(false) + } else { + if (!method.computed && !method.static && !isGenerator && ( + method.key.type === "Identifier" && method.key.name === "constructor" || + method.key.type === "Literal" && method.key.value === "constructor")) { + method.kind = "constructor" + } else { + method.kind = "method" + } + method.value = this$1.parseMethod(isGenerator) + } + node.body.body.push(this$1.finishNode(method, "MethodDefinition")) + } + this.popCx() + if (!this.eat(acorn.tokTypes.braceR)) { + // If there is no closing brace, make the node span to the start + // of the next token (this is useful for Tern) + this.last.end = this.tok.start + if (this.options.locations) this.last.loc.end = this.tok.loc.start + } + this.semicolon() + this.finishNode(node.body, "ClassBody") + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + } - LooseParser.prototype.storeCurrentPos = function storeCurrentPos() { - return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start; - }; + lp$1.parseFunction = function(node, isStatement) { + this.initFunction(node) + if (this.options.ecmaVersion >= 6) { + node.generator = this.eat(acorn.tokTypes.star) + } + if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent() + else if (isStatement) node.id = this.dummyIdent() + node.params = this.parseFunctionParams() + node.body = this.parseBlock() + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") + } - LooseParser.prototype.startNodeAt = function startNodeAt(pos) { - if (this.options.locations) { - return new _.Node(this.toks, pos[0], pos[1]); + lp$1.parseExport = function() { + var node = this.startNode() + this.next() + if (this.eat(acorn.tokTypes.star)) { + node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString() + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(acorn.tokTypes._default)) { + var expr = this.parseMaybeAssign() + if (expr.id) { + switch (expr.type) { + case "FunctionExpression": expr.type = "FunctionDeclaration"; break + case "ClassExpression": expr.type = "ClassDeclaration"; break + } + } + node.declaration = expr + this.semicolon() + return this.finishNode(node, "ExportDefaultDeclaration") + } + if (this.tok.type.keyword || this.toks.isLet()) { + node.declaration = this.parseStatement() + node.specifiers = [] + node.source = null } else { - return new _.Node(this.toks, pos); + node.declaration = null + node.specifiers = this.parseExportSpecifierList() + node.source = this.eatContextual("from") ? this.parseExprAtom() : null + this.semicolon() } - }; - - LooseParser.prototype.finishNode = function finishNode(node, type) { - node.type = type; - node.end = this.last.end; - if (this.options.locations) node.loc.end = this.last.loc.end; - if (this.options.ranges) node.range[1] = this.last.end; - return node; - }; - - LooseParser.prototype.dummyNode = function dummyNode(type) { - var dummy = this.startNode(); - dummy.type = type; - dummy.end = dummy.start; - if (this.options.locations) dummy.loc.end = dummy.loc.start; - if (this.options.ranges) dummy.range[1] = dummy.start; - this.last = { type: _.tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc }; - return dummy; - }; - - LooseParser.prototype.dummyIdent = function dummyIdent() { - var dummy = this.dummyNode("Identifier"); - dummy.name = "✖"; - return dummy; - }; - - LooseParser.prototype.dummyString = function dummyString() { - var dummy = this.dummyNode("Literal"); - dummy.value = dummy.raw = "✖"; - return dummy; - }; + return this.finishNode(node, "ExportNamedDeclaration") + } - LooseParser.prototype.eat = function eat(type) { - if (this.tok.type === type) { - this.next(); - return true; + lp$1.parseImport = function() { + var node = this.startNode() + this.next() + if (this.tok.type === acorn.tokTypes.string) { + node.specifiers = [] + node.source = this.parseExprAtom() + node.kind = '' } else { - return false; + var elt + if (this.tok.type === acorn.tokTypes.name && this.tok.value !== "from") { + elt = this.startNode() + elt.local = this.parseIdent() + this.finishNode(elt, "ImportDefaultSpecifier") + this.eat(acorn.tokTypes.comma) + } + node.specifiers = this.parseImportSpecifierList() + node.source = this.eatContextual("from") && this.tok.type == acorn.tokTypes.string ? this.parseExprAtom() : this.dummyString() + if (elt) node.specifiers.unshift(elt) } - }; - - LooseParser.prototype.isContextual = function isContextual(name) { - return this.tok.type === _.tokTypes.name && this.tok.value === name; - }; - - LooseParser.prototype.eatContextual = function eatContextual(name) { - return this.tok.value === name && this.eat(_.tokTypes.name); - }; - - LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon() { - return this.tok.type === _.tokTypes.eof || this.tok.type === _.tokTypes.braceR || _.lineBreak.test(this.input.slice(this.last.end, this.tok.start)); - }; + this.semicolon() + return this.finishNode(node, "ImportDeclaration") + } - LooseParser.prototype.semicolon = function semicolon() { - return this.eat(_.tokTypes.semi); - }; + lp$1.parseImportSpecifierList = function() { + var this$1 = this; - LooseParser.prototype.expect = function expect(type) { - if (this.eat(type)) return true; - for (var i = 1; i <= 2; i++) { - if (this.lookAhead(i).type == type) { - for (var j = 0; j < i; j++) { - this.next(); - }return true; + var elts = [] + if (this.tok.type === acorn.tokTypes.star) { + var elt = this.startNode() + this.next() + elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent() + elts.push(this.finishNode(elt, "ImportNamespaceSpecifier")) + } else { + var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart + this.pushCx() + this.eat(acorn.tokTypes.braceL) + if (this.curLineStart > continuedLine) continuedLine = this.curLineStart + while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { + var elt$1 = this$1.startNode() + if (this$1.eat(acorn.tokTypes.star)) { + elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent() + this$1.finishNode(elt$1, "ImportNamespaceSpecifier") + } else { + if (this$1.isContextual("from")) break + elt$1.imported = this$1.parseIdent() + if (isDummy(elt$1.imported)) break + elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported + this$1.finishNode(elt$1, "ImportSpecifier") + } + elts.push(elt$1) + this$1.eat(acorn.tokTypes.comma) } + this.eat(acorn.tokTypes.braceR) + this.popCx() } - }; + return elts + } - LooseParser.prototype.pushCx = function pushCx() { - this.context.push(this.curIndent); - }; + lp$1.parseExportSpecifierList = function() { + var this$1 = this; + + var elts = [] + var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart + this.pushCx() + this.eat(acorn.tokTypes.braceL) + if (this.curLineStart > continuedLine) continuedLine = this.curLineStart + while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { + if (this$1.isContextual("from")) break + var elt = this$1.startNode() + elt.local = this$1.parseIdent() + if (isDummy(elt.local)) break + elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local + this$1.finishNode(elt, "ExportSpecifier") + elts.push(elt) + this$1.eat(acorn.tokTypes.comma) + } + this.eat(acorn.tokTypes.braceR) + this.popCx() + return elts + } - LooseParser.prototype.popCx = function popCx() { - this.curIndent = this.context.pop(); - }; + var lp$2 = LooseParser.prototype - LooseParser.prototype.lineEnd = function lineEnd(pos) { - while (pos < this.input.length && !_.isNewLine(this.input.charCodeAt(pos))) ++pos; - return pos; - }; + lp$2.checkLVal = function(expr) { + if (!expr) return expr + switch (expr.type) { + case "Identifier": + case "MemberExpression": + return expr - LooseParser.prototype.indentationAfter = function indentationAfter(pos) { - for (var count = 0;; ++pos) { - var ch = this.input.charCodeAt(pos); - if (ch === 32) ++count;else if (ch === 9) count += this.options.tabSize;else return count; + case "ParenthesizedExpression": + expr.expression = this.checkLVal(expr.expression) + return expr + + default: + return this.dummyIdent() } - }; + } - LooseParser.prototype.closes = function closes(closeTok, indent, line, blockHeuristic) { - if (this.tok.type === closeTok || this.tok.type === _.tokTypes.eof) return true; - return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && (!blockHeuristic || this.nextLineStart >= this.input.length || this.indentationAfter(this.nextLineStart) < indent); - }; + lp$2.parseExpression = function(noIn) { + var this$1 = this; - LooseParser.prototype.tokenStartsLine = function tokenStartsLine() { - for (var p = this.tok.start - 1; p >= this.curLineStart; --p) { - var ch = this.input.charCodeAt(p); - if (ch !== 9 && ch !== 32) return false; + var start = this.storeCurrentPos() + var expr = this.parseMaybeAssign(noIn) + if (this.tok.type === acorn.tokTypes.comma) { + var node = this.startNodeAt(start) + node.expressions = [expr] + while (this.eat(acorn.tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn)) + return this.finishNode(node, "SequenceExpression") } - return true; - }; + return expr + } - LooseParser.prototype.extend = function extend(name, f) { - this[name] = f(this[name]); - }; + lp$2.parseParenExpression = function() { + this.pushCx() + this.expect(acorn.tokTypes.parenL) + var val = this.parseExpression() + this.popCx() + this.expect(acorn.tokTypes.parenR) + return val + } - LooseParser.prototype.loadPlugins = function loadPlugins(pluginConfigs) { - for (var _name in pluginConfigs) { - var plugin = pluginsLoose[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, pluginConfigs[_name]); + lp$2.parseMaybeAssign = function(noIn) { + if (this.toks.isContextual("yield")) { + var node = this.startNode() + this.next() + if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != acorn.tokTypes.star && !this.tok.type.startsExpr)) { + node.delegate = false + node.argument = null + } else { + node.delegate = this.eat(acorn.tokTypes.star) + node.argument = this.parseMaybeAssign() + } + return this.finishNode(node, "YieldExpression") } - }; - return LooseParser; -})(); + var start = this.storeCurrentPos() + var left = this.parseMaybeConditional(noIn) + if (this.tok.type.isAssign) { + var node$1 = this.startNodeAt(start) + node$1.operator = this.tok.value + node$1.left = this.tok.type === acorn.tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left) + this.next() + node$1.right = this.parseMaybeAssign(noIn) + return this.finishNode(node$1, "AssignmentExpression") + } + return left + } -exports.LooseParser = LooseParser; + lp$2.parseMaybeConditional = function(noIn) { + var start = this.storeCurrentPos() + var expr = this.parseExprOps(noIn) + if (this.eat(acorn.tokTypes.question)) { + var node = this.startNodeAt(start) + node.test = expr + node.consequent = this.parseMaybeAssign() + node.alternate = this.expect(acorn.tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent() + return this.finishNode(node, "ConditionalExpression") + } + return expr + } -},{"..":1}],6:[function(_dereq_,module,exports){ -"use strict"; + lp$2.parseExprOps = function(noIn) { + var start = this.storeCurrentPos() + var indent = this.curIndent, line = this.curLineStart + return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line) + } -var _state = _dereq_("./state"); + lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) { + if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left + var prec = this.tok.type.binop + if (prec != null && (!noIn || this.tok.type !== acorn.tokTypes._in)) { + if (prec > minPrec) { + var node = this.startNodeAt(start) + node.left = left + node.operator = this.tok.value + this.next() + if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) { + node.right = this.dummyIdent() + } else { + var rightStart = this.storeCurrentPos() + node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line) + } + this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression") + return this.parseExprOp(node, start, minPrec, noIn, indent, line) + } + } + return left + } -var _parseutil = _dereq_("./parseutil"); + lp$2.parseMaybeUnary = function(sawUnary) { + var this$1 = this; + + var start = this.storeCurrentPos(), expr + if (this.tok.type.prefix) { + var node = this.startNode(), update = this.tok.type === acorn.tokTypes.incDec + if (!update) sawUnary = true + node.operator = this.tok.value + node.prefix = true + this.next() + node.argument = this.parseMaybeUnary(true) + if (update) node.argument = this.checkLVal(node.argument) + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") + } else if (this.tok.type === acorn.tokTypes.ellipsis) { + var node$1 = this.startNode() + this.next() + node$1.argument = this.parseMaybeUnary(sawUnary) + expr = this.finishNode(node$1, "SpreadElement") + } else { + expr = this.parseExprSubscripts() + while (this.tok.type.postfix && !this.canInsertSemicolon()) { + var node$2 = this$1.startNodeAt(start) + node$2.operator = this$1.tok.value + node$2.prefix = false + node$2.argument = this$1.checkLVal(expr) + this$1.next() + expr = this$1.finishNode(node$2, "UpdateExpression") + } + } -var _ = _dereq_(".."); + if (!sawUnary && this.eat(acorn.tokTypes.starstar)) { + var node$3 = this.startNodeAt(start) + node$3.operator = "**" + node$3.left = expr + node$3.right = this.parseMaybeUnary(false) + return this.finishNode(node$3, "BinaryExpression") + } -var lp = _state.LooseParser.prototype; + return expr + } -lp.parseTopLevel = function () { - var node = this.startNodeAt(this.options.locations ? [0, _.getLineInfo(this.input, 0)] : 0); - node.body = []; - while (this.tok.type !== _.tokTypes.eof) node.body.push(this.parseStatement()); - this.last = this.tok; - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; + lp$2.parseExprSubscripts = function() { + var start = this.storeCurrentPos() + return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart) } - return this.finishNode(node, "Program"); -}; -lp.parseStatement = function () { - var starttype = this.tok.type, - node = this.startNode(), - kind = undefined; + lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) { + var this$1 = this; - if (this.toks.isLet()) { - starttype = _.tokTypes._var; - kind = "let"; - } + for (;;) { + if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) { + if (this$1.tok.type == acorn.tokTypes.dot && this$1.curIndent == startIndent) + --startIndent + else + return base + } - switch (starttype) { - case _.tokTypes._break:case _.tokTypes._continue: - this.next(); - var isBreak = starttype === _.tokTypes._break; - if (this.semicolon() || this.canInsertSemicolon()) { - node.label = null; + if (this$1.eat(acorn.tokTypes.dot)) { + var node = this$1.startNodeAt(start) + node.object = base + if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) + node.property = this$1.dummyIdent() + else + node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent() + node.computed = false + base = this$1.finishNode(node, "MemberExpression") + } else if (this$1.tok.type == acorn.tokTypes.bracketL) { + this$1.pushCx() + this$1.next() + var node$1 = this$1.startNodeAt(start) + node$1.object = base + node$1.property = this$1.parseExpression() + node$1.computed = true + this$1.popCx() + this$1.expect(acorn.tokTypes.bracketR) + base = this$1.finishNode(node$1, "MemberExpression") + } else if (!noCalls && this$1.tok.type == acorn.tokTypes.parenL) { + var node$2 = this$1.startNodeAt(start) + node$2.callee = base + node$2.arguments = this$1.parseExprList(acorn.tokTypes.parenR) + base = this$1.finishNode(node$2, "CallExpression") + } else if (this$1.tok.type == acorn.tokTypes.backQuote) { + var node$3 = this$1.startNodeAt(start) + node$3.tag = base + node$3.quasi = this$1.parseTemplate() + base = this$1.finishNode(node$3, "TaggedTemplateExpression") } else { - node.label = this.tok.type === _.tokTypes.name ? this.parseIdent() : null; - this.semicolon(); + return base } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - - case _.tokTypes._debugger: - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - - case _.tokTypes._do: - this.next(); - node.body = this.parseStatement(); - node.test = this.eat(_.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent(); - this.semicolon(); - return this.finishNode(node, "DoWhileStatement"); - - case _.tokTypes._for: - this.next(); - this.pushCx(); - this.expect(_.tokTypes.parenL); - if (this.tok.type === _.tokTypes.semi) return this.parseFor(node, null); - var isLet = this.toks.isLet(); - if (isLet || this.tok.type === _.tokTypes._var || this.tok.type === _.tokTypes._const) { - var _init = this.parseVar(true, isLet ? "let" : this.tok.value); - if (_init.declarations.length === 1 && (this.tok.type === _.tokTypes._in || this.isContextual("of"))) { - return this.parseForIn(node, _init); - } - return this.parseFor(node, _init); - } - var init = this.parseExpression(true); - if (this.tok.type === _.tokTypes._in || this.isContextual("of")) return this.parseForIn(node, this.toAssignable(init)); - return this.parseFor(node, init); - - case _.tokTypes._function: - this.next(); - return this.parseFunction(node, true); - - case _.tokTypes._if: - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(); - node.alternate = this.eat(_.tokTypes._else) ? this.parseStatement() : null; - return this.finishNode(node, "IfStatement"); - - case _.tokTypes._return: - this.next(); - if (this.eat(_.tokTypes.semi) || this.canInsertSemicolon()) node.argument = null;else { - node.argument = this.parseExpression();this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); - - case _.tokTypes._switch: - var blockIndent = this.curIndent, - line = this.curLineStart; - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.pushCx(); - this.expect(_.tokTypes.braceL); - - var cur = undefined; - while (!this.closes(_.tokTypes.braceR, blockIndent, line, true)) { - if (this.tok.type === _.tokTypes._case || this.tok.type === _.tokTypes._default) { - var isCase = this.tok.type === _.tokTypes._case; - if (cur) this.finishNode(cur, "SwitchCase"); - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) cur.test = this.parseExpression();else cur.test = null; - this.expect(_.tokTypes.colon); - } else { - if (!cur) { - node.cases.push(cur = this.startNode()); - cur.consequent = []; - cur.test = null; - } - cur.consequent.push(this.parseStatement()); - } + } + } + + lp$2.parseExprAtom = function() { + var node + switch (this.tok.type) { + case acorn.tokTypes._this: + case acorn.tokTypes._super: + var type = this.tok.type === acorn.tokTypes._this ? "ThisExpression" : "Super" + node = this.startNode() + this.next() + return this.finishNode(node, type) + + case acorn.tokTypes.name: + var start = this.storeCurrentPos() + var id = this.parseIdent() + return this.eat(acorn.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id + + case acorn.tokTypes.regexp: + node = this.startNode() + var val = this.tok.value + node.regex = {pattern: val.pattern, flags: val.flags} + node.value = val.value + node.raw = this.input.slice(this.tok.start, this.tok.end) + this.next() + return this.finishNode(node, "Literal") + + case acorn.tokTypes.num: case acorn.tokTypes.string: + node = this.startNode() + node.value = this.tok.value + node.raw = this.input.slice(this.tok.start, this.tok.end) + this.next() + return this.finishNode(node, "Literal") + + case acorn.tokTypes._null: case acorn.tokTypes._true: case acorn.tokTypes._false: + node = this.startNode() + node.value = this.tok.type === acorn.tokTypes._null ? null : this.tok.type === acorn.tokTypes._true + node.raw = this.tok.type.keyword + this.next() + return this.finishNode(node, "Literal") + + case acorn.tokTypes.parenL: + var parenStart = this.storeCurrentPos() + this.next() + var inner = this.parseExpression() + this.expect(acorn.tokTypes.parenR) + if (this.eat(acorn.tokTypes.arrow)) { + return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner])) } - if (cur) this.finishNode(cur, "SwitchCase"); - this.popCx(); - this.eat(_.tokTypes.braceR); - return this.finishNode(node, "SwitchStatement"); - - case _.tokTypes._throw: - this.next(); - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - - case _.tokTypes._try: - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.tok.type === _.tokTypes._catch) { - var clause = this.startNode(); - this.next(); - this.expect(_.tokTypes.parenL); - clause.param = this.toAssignable(this.parseExprAtom(), true); - this.expect(_.tokTypes.parenR); - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); + if (this.options.preserveParens) { + var par = this.startNodeAt(parenStart) + par.expression = inner + inner = this.finishNode(par, "ParenthesizedExpression") } - node.finalizer = this.eat(_.tokTypes._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) return node.block; - return this.finishNode(node, "TryStatement"); - - case _.tokTypes._var: - case _.tokTypes._const: - return this.parseVar(false, kind || this.tok.value); + return inner - case _.tokTypes._while: - this.next(); - node.test = this.parseParenExpression(); - node.body = this.parseStatement(); - return this.finishNode(node, "WhileStatement"); + case acorn.tokTypes.bracketL: + node = this.startNode() + node.elements = this.parseExprList(acorn.tokTypes.bracketR, true) + return this.finishNode(node, "ArrayExpression") - case _.tokTypes._with: - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(); - return this.finishNode(node, "WithStatement"); + case acorn.tokTypes.braceL: + return this.parseObj() - case _.tokTypes.braceL: - return this.parseBlock(); + case acorn.tokTypes._class: + return this.parseClass() - case _.tokTypes.semi: - this.next(); - return this.finishNode(node, "EmptyStatement"); + case acorn.tokTypes._function: + node = this.startNode() + this.next() + return this.parseFunction(node, false) - case _.tokTypes._class: - return this.parseClass(true); + case acorn.tokTypes._new: + return this.parseNew() - case _.tokTypes._import: - return this.parseImport(); - - case _.tokTypes._export: - return this.parseExport(); + case acorn.tokTypes.backQuote: + return this.parseTemplate() default: - var expr = this.parseExpression(); - if (_parseutil.isDummy(expr)) { - this.next(); - if (this.tok.type === _.tokTypes.eof) return this.finishNode(node, "EmptyStatement"); - return this.parseStatement(); - } else if (starttype === _.tokTypes.name && expr.type === "Identifier" && this.eat(_.tokTypes.colon)) { - node.body = this.parseStatement(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - } else { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - } - } -}; - -lp.parseBlock = function () { - var node = this.startNode(); - this.pushCx(); - this.expect(_.tokTypes.braceL); - var blockIndent = this.curIndent, - line = this.curLineStart; - node.body = []; - while (!this.closes(_.tokTypes.braceR, blockIndent, line, true)) node.body.push(this.parseStatement()); - this.popCx(); - this.eat(_.tokTypes.braceR); - return this.finishNode(node, "BlockStatement"); -}; - -lp.parseFor = function (node, init) { - node.init = init; - node.test = node.update = null; - if (this.eat(_.tokTypes.semi) && this.tok.type !== _.tokTypes.semi) node.test = this.parseExpression(); - if (this.eat(_.tokTypes.semi) && this.tok.type !== _.tokTypes.parenR) node.update = this.parseExpression(); - this.popCx(); - this.expect(_.tokTypes.parenR); - node.body = this.parseStatement(); - return this.finishNode(node, "ForStatement"); -}; - -lp.parseForIn = function (node, init) { - var type = this.tok.type === _.tokTypes._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.popCx(); - this.expect(_.tokTypes.parenR); - node.body = this.parseStatement(); - return this.finishNode(node, type); -}; - -lp.parseVar = function (noIn, kind) { - var node = this.startNode(); - node.kind = kind; - this.next(); - node.declarations = []; - do { - var decl = this.startNode(); - decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent(); - decl.init = this.eat(_.tokTypes.eq) ? this.parseMaybeAssign(noIn) : null; - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - } while (this.eat(_.tokTypes.comma)); - if (!node.declarations.length) { - var decl = this.startNode(); - decl.id = this.dummyIdent(); - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - } - if (!noIn) this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); -}; - -lp.parseClass = function (isStatement) { - var node = this.startNode(); - this.next(); - if (this.tok.type === _.tokTypes.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent();else node.id = null; - node.superClass = this.eat(_.tokTypes._extends) ? this.parseExpression() : null; - node.body = this.startNode(); - node.body.body = []; - this.pushCx(); - var indent = this.curIndent + 1, - line = this.curLineStart; - this.eat(_.tokTypes.braceL); - if (this.curIndent + 1 < indent) { - indent = this.curIndent;line = this.curLineStart; - } - while (!this.closes(_.tokTypes.braceR, indent, line)) { - if (this.semicolon()) continue; - var method = this.startNode(), - isGenerator = undefined; - if (this.options.ecmaVersion >= 6) { - method["static"] = false; - isGenerator = this.eat(_.tokTypes.star); + return this.dummyIdent() } - this.parsePropertyName(method); - if (_parseutil.isDummy(method.key)) { - if (_parseutil.isDummy(this.parseMaybeAssign())) this.next();this.eat(_.tokTypes.comma);continue; + } + + lp$2.parseNew = function() { + var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart + var meta = this.parseIdent(true) + if (this.options.ecmaVersion >= 6 && this.eat(acorn.tokTypes.dot)) { + node.meta = meta + node.property = this.parseIdent(true) + return this.finishNode(node, "MetaProperty") } - if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" && this.tok.type != _.tokTypes.parenL && this.tok.type != _.tokTypes.braceL) { - method["static"] = true; - isGenerator = this.eat(_.tokTypes.star); - this.parsePropertyName(method); + var start = this.storeCurrentPos() + node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line) + if (this.tok.type == acorn.tokTypes.parenL) { + node.arguments = this.parseExprList(acorn.tokTypes.parenR) } else { - method["static"] = false; + node.arguments = [] } - if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" && !method.computed && (method.key.name === "get" || method.key.name === "set") && this.tok.type !== _.tokTypes.parenL && this.tok.type !== _.tokTypes.braceL) { - method.kind = method.key.name; - this.parsePropertyName(method); - method.value = this.parseMethod(false); - } else { - if (!method.computed && !method["static"] && !isGenerator && (method.key.type === "Identifier" && method.key.name === "constructor" || method.key.type === "Literal" && method.key.value === "constructor")) { - method.kind = "constructor"; + return this.finishNode(node, "NewExpression") + } + + lp$2.parseTemplateElement = function() { + var elem = this.startNode() + elem.value = { + raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'), + cooked: this.tok.value + } + this.next() + elem.tail = this.tok.type === acorn.tokTypes.backQuote + return this.finishNode(elem, "TemplateElement") + } + + lp$2.parseTemplate = function() { + var this$1 = this; + + var node = this.startNode() + this.next() + node.expressions = [] + var curElt = this.parseTemplateElement() + node.quasis = [curElt] + while (!curElt.tail) { + this$1.next() + node.expressions.push(this$1.parseExpression()) + if (this$1.expect(acorn.tokTypes.braceR)) { + curElt = this$1.parseTemplateElement() } else { - method.kind = "method"; + curElt = this$1.startNode() + curElt.value = {cooked: '', raw: ''} + curElt.tail = true + this$1.finishNode(curElt, "TemplateElement") } - method.value = this.parseMethod(isGenerator); + node.quasis.push(curElt) } - node.body.body.push(this.finishNode(method, "MethodDefinition")); + this.expect(acorn.tokTypes.backQuote) + return this.finishNode(node, "TemplateLiteral") } - this.popCx(); - if (!this.eat(_.tokTypes.braceR)) { - // If there is no closing brace, make the node span to the start - // of the next token (this is useful for Tern) - this.last.end = this.tok.start; - if (this.options.locations) this.last.loc.end = this.tok.loc.start; - } - this.semicolon(); - this.finishNode(node.body, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; - -lp.parseFunction = function (node, isStatement) { - this.initFunction(node); - if (this.options.ecmaVersion >= 6) { - node.generator = this.eat(_.tokTypes.star); - } - if (this.tok.type === _.tokTypes.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent(); - node.params = this.parseFunctionParams(); - node.body = this.parseBlock(); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; - -lp.parseExport = function () { - var node = this.startNode(); - this.next(); - if (this.eat(_.tokTypes.star)) { - node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString(); - return this.finishNode(node, "ExportAllDeclaration"); - } - if (this.eat(_.tokTypes._default)) { - var expr = this.parseMaybeAssign(); - if (expr.id) { - switch (expr.type) { - case "FunctionExpression": - expr.type = "FunctionDeclaration";break; - case "ClassExpression": - expr.type = "ClassDeclaration";break; + + lp$2.parseObj = function() { + var this$1 = this; + + var node = this.startNode() + node.properties = [] + this.pushCx() + var indent = this.curIndent + 1, line = this.curLineStart + this.eat(acorn.tokTypes.braceL) + if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart } + while (!this.closes(acorn.tokTypes.braceR, indent, line)) { + var prop = this$1.startNode(), isGenerator, start + if (this$1.options.ecmaVersion >= 6) { + start = this$1.storeCurrentPos() + prop.method = false + prop.shorthand = false + isGenerator = this$1.eat(acorn.tokTypes.star) + } + this$1.parsePropertyName(prop) + if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue } + if (this$1.eat(acorn.tokTypes.colon)) { + prop.kind = "init" + prop.value = this$1.parseMaybeAssign() + } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === acorn.tokTypes.parenL || this$1.tok.type === acorn.tokTypes.braceL)) { + prop.kind = "init" + prop.method = true + prop.value = this$1.parseMethod(isGenerator) + } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" && + !prop.computed && (prop.key.name === "get" || prop.key.name === "set") && + (this$1.tok.type != acorn.tokTypes.comma && this$1.tok.type != acorn.tokTypes.braceR)) { + prop.kind = prop.key.name + this$1.parsePropertyName(prop) + prop.value = this$1.parseMethod(false) + } else { + prop.kind = "init" + if (this$1.options.ecmaVersion >= 6) { + if (this$1.eat(acorn.tokTypes.eq)) { + var assign = this$1.startNodeAt(start) + assign.operator = "=" + assign.left = prop.key + assign.right = this$1.parseMaybeAssign() + prop.value = this$1.finishNode(assign, "AssignmentExpression") + } else { + prop.value = prop.key + } + } else { + prop.value = this$1.dummyIdent() + } + prop.shorthand = true } + node.properties.push(this$1.finishNode(prop, "Property")) + this$1.eat(acorn.tokTypes.comma) } - node.declaration = expr; - this.semicolon(); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - if (this.tok.type.keyword || this.toks.isLet()) { - node.declaration = this.parseStatement(); - node.specifiers = []; - node.source = null; - } else { - node.declaration = null; - node.specifiers = this.parseExportSpecifierList(); - node.source = this.eatContextual("from") ? this.parseExprAtom() : null; - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration"); -}; - -lp.parseImport = function () { - var node = this.startNode(); - this.next(); - if (this.tok.type === _.tokTypes.string) { - node.specifiers = []; - node.source = this.parseExprAtom(); - node.kind = ''; - } else { - var elt = undefined; - if (this.tok.type === _.tokTypes.name && this.tok.value !== "from") { - elt = this.startNode(); - elt.local = this.parseIdent(); - this.finishNode(elt, "ImportDefaultSpecifier"); - this.eat(_.tokTypes.comma); + this.popCx() + if (!this.eat(acorn.tokTypes.braceR)) { + // If there is no closing brace, make the node span to the start + // of the next token (this is useful for Tern) + this.last.end = this.tok.start + if (this.options.locations) this.last.loc.end = this.tok.loc.start } - node.specifiers = this.parseImportSpecifierList(); - node.source = this.eatContextual("from") && this.tok.type == _.tokTypes.string ? this.parseExprAtom() : this.dummyString(); - if (elt) node.specifiers.unshift(elt); + return this.finishNode(node, "ObjectExpression") } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; - -lp.parseImportSpecifierList = function () { - var elts = []; - if (this.tok.type === _.tokTypes.star) { - var elt = this.startNode(); - this.next(); - elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent(); - elts.push(this.finishNode(elt, "ImportNamespaceSpecifier")); - } else { - var indent = this.curIndent, - line = this.curLineStart, - continuedLine = this.nextLineStart; - this.pushCx(); - this.eat(_.tokTypes.braceL); - if (this.curLineStart > continuedLine) continuedLine = this.curLineStart; - while (!this.closes(_.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { - var elt = this.startNode(); - if (this.eat(_.tokTypes.star)) { - elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent(); - this.finishNode(elt, "ImportNamespaceSpecifier"); + + lp$2.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(acorn.tokTypes.bracketL)) { + prop.computed = true + prop.key = this.parseExpression() + this.expect(acorn.tokTypes.bracketR) + return } else { - if (this.isContextual("from")) break; - elt.imported = this.parseIdent(); - if (_parseutil.isDummy(elt.imported)) break; - elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported; - this.finishNode(elt, "ImportSpecifier"); + prop.computed = false } - elts.push(elt); - this.eat(_.tokTypes.comma); } - this.eat(_.tokTypes.braceR); - this.popCx(); + var key = (this.tok.type === acorn.tokTypes.num || this.tok.type === acorn.tokTypes.string) ? this.parseExprAtom() : this.parseIdent() + prop.key = key || this.dummyIdent() } - return elts; -}; - -lp.parseExportSpecifierList = function () { - var elts = []; - var indent = this.curIndent, - line = this.curLineStart, - continuedLine = this.nextLineStart; - this.pushCx(); - this.eat(_.tokTypes.braceL); - if (this.curLineStart > continuedLine) continuedLine = this.curLineStart; - while (!this.closes(_.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { - if (this.isContextual("from")) break; - var elt = this.startNode(); - elt.local = this.parseIdent(); - if (_parseutil.isDummy(elt.local)) break; - elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local; - this.finishNode(elt, "ExportSpecifier"); - elts.push(elt); - this.eat(_.tokTypes.comma); + + lp$2.parsePropertyAccessor = function() { + if (this.tok.type === acorn.tokTypes.name || this.tok.type.keyword) return this.parseIdent() } - this.eat(_.tokTypes.braceR); - this.popCx(); - return elts; -}; -},{"..":1,"./parseutil":4,"./state":5}],7:[function(_dereq_,module,exports){ -"use strict"; + lp$2.parseIdent = function() { + var name = this.tok.type === acorn.tokTypes.name ? this.tok.value : this.tok.type.keyword + if (!name) return this.dummyIdent() + var node = this.startNode() + this.next() + node.name = name + return this.finishNode(node, "Identifier") + } -var _ = _dereq_(".."); + lp$2.initFunction = function(node) { + node.id = null + node.params = [] + if (this.options.ecmaVersion >= 6) { + node.generator = false + node.expression = false + } + } -var _state = _dereq_("./state"); + // Convert existing expression atom to assignable pattern + // if possible. -var lp = _state.LooseParser.prototype; + lp$2.toAssignable = function(node, binding) { + var this$1 = this; -function isSpace(ch) { - return ch < 14 && ch > 8 || ch === 32 || ch === 160 || _.isNewLine(ch); -} + if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) { + // Okay + } else if (node.type == "ParenthesizedExpression") { + node.expression = this.toAssignable(node.expression, binding) + } else if (this.options.ecmaVersion < 6) { + return this.dummyIdent() + } else if (node.type == "ObjectExpression") { + node.type = "ObjectPattern" + var props = node.properties + for (var i = 0; i < props.length; i++) + props[i].value = this$1.toAssignable(props[i].value, binding) + } else if (node.type == "ArrayExpression") { + node.type = "ArrayPattern" + this.toAssignableList(node.elements, binding) + } else if (node.type == "SpreadElement") { + node.type = "RestElement" + node.argument = this.toAssignable(node.argument, binding) + } else if (node.type == "AssignmentExpression") { + node.type = "AssignmentPattern" + delete node.operator + } else { + return this.dummyIdent() + } + return node + } -lp.next = function () { - this.last = this.tok; - if (this.ahead.length) this.tok = this.ahead.shift();else this.tok = this.readToken(); + lp$2.toAssignableList = function(exprList, binding) { + var this$1 = this; - if (this.tok.start >= this.nextLineStart) { - while (this.tok.start >= this.nextLineStart) { - this.curLineStart = this.nextLineStart; - this.nextLineStart = this.lineEnd(this.curLineStart) + 1; - } - this.curIndent = this.indentationAfter(this.curLineStart); + for (var i = 0; i < exprList.length; i++) + exprList[i] = this$1.toAssignable(exprList[i], binding) + return exprList } -}; - -lp.readToken = function () { - for (;;) { - try { - this.toks.next(); - if (this.toks.type === _.tokTypes.dot && this.input.substr(this.toks.end, 1) === "." && this.options.ecmaVersion >= 6) { - this.toks.end++; - this.toks.type = _.tokTypes.ellipsis; + + lp$2.parseFunctionParams = function(params) { + params = this.parseExprList(acorn.tokTypes.parenR) + return this.toAssignableList(params, true) + } + + lp$2.parseMethod = function(isGenerator) { + var node = this.startNode() + this.initFunction(node) + node.params = this.parseFunctionParams() + node.generator = isGenerator || false + node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== acorn.tokTypes.braceL + node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock() + return this.finishNode(node, "FunctionExpression") + } + + lp$2.parseArrowExpression = function(node, params) { + this.initFunction(node) + node.params = this.toAssignableList(params, true) + node.expression = this.tok.type !== acorn.tokTypes.braceL + node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock() + return this.finishNode(node, "ArrowFunctionExpression") + } + + lp$2.parseExprList = function(close, allowEmpty) { + var this$1 = this; + + this.pushCx() + var indent = this.curIndent, line = this.curLineStart, elts = [] + this.next() // Opening bracket + while (!this.closes(close, indent + 1, line)) { + if (this$1.eat(acorn.tokTypes.comma)) { + elts.push(allowEmpty ? null : this$1.dummyIdent()) + continue } - return new _.Token(this.toks); - } catch (e) { - if (!(e instanceof SyntaxError)) throw e; - - // Try to skip some text, based on the error message, and then continue - var msg = e.message, - pos = e.raisedAt, - replace = true; - if (/unterminated/i.test(msg)) { - pos = this.lineEnd(e.pos + 1); - if (/string/.test(msg)) { - replace = { start: e.pos, end: pos, type: _.tokTypes.string, value: this.input.slice(e.pos + 1, pos) }; - } else if (/regular expr/i.test(msg)) { - var re = this.input.slice(e.pos, pos); - try { - re = new RegExp(re); - } catch (e) {} - replace = { start: e.pos, end: pos, type: _.tokTypes.regexp, value: re }; - } else if (/template/.test(msg)) { - replace = { start: e.pos, end: pos, - type: _.tokTypes.template, - value: this.input.slice(e.pos, pos) }; - } else { - replace = false; - } - } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) { - while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos; - } else if (/character escape|expected hexadecimal/i.test(msg)) { - while (pos < this.input.length) { - var ch = this.input.charCodeAt(pos++); - if (ch === 34 || ch === 39 || _.isNewLine(ch)) break; - } - } else if (/unexpected character/i.test(msg)) { - pos++; - replace = false; - } else if (/regular expression/i.test(msg)) { - replace = true; + var elt = this$1.parseMaybeAssign() + if (isDummy(elt)) { + if (this$1.closes(close, indent, line)) break + this$1.next() } else { - throw e; - } - this.resetTo(pos); - if (replace === true) replace = { start: pos, end: pos, type: _.tokTypes.name, value: "✖" }; - if (replace) { - if (this.options.locations) replace.loc = new _.SourceLocation(this.toks, _.getLineInfo(this.input, replace.start), _.getLineInfo(this.input, replace.end)); - return replace; + elts.push(elt) } + this$1.eat(acorn.tokTypes.comma) } - } -}; - -lp.resetTo = function (pos) { - this.toks.pos = pos; - var ch = this.input.charAt(pos - 1); - this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) || /[enwfd]/.test(ch) && /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos)); - - if (this.options.locations) { - this.toks.curLine = 1; - this.toks.lineStart = _.lineBreakG.lastIndex = 0; - var match = undefined; - while ((match = _.lineBreakG.exec(this.input)) && match.index < pos) { - ++this.toks.curLine; - this.toks.lineStart = match.index + match[0].length; + this.popCx() + if (!this.eat(close)) { + // If there is no closing brace, make the node span to the start + // of the next token (this is useful for Tern) + this.last.end = this.tok.start + if (this.options.locations) this.last.loc.end = this.tok.loc.start } + return elts } -}; -lp.lookAhead = function (n) { - while (n > this.ahead.length) this.ahead.push(this.readToken()); - return this.ahead[n - 1]; -}; + acorn__default.defaultOptions.tabSize = 4 + + function parse_dammit(input, options) { + var p = new LooseParser(input, options) + p.next() + return p.parseTopLevel() + } + + acorn__default.parse_dammit = parse_dammit + acorn__default.LooseParser = LooseParser + acorn__default.pluginsLoose = pluginsLoose + + exports.parse_dammit = parse_dammit; + exports.LooseParser = LooseParser; + exports.pluginsLoose = pluginsLoose; + + Object.defineProperty(exports, '__esModule', { value: true }); -},{"..":1,"./state":5}]},{},[3])(3) -});
\ No newline at end of file +}));
\ No newline at end of file diff --git a/tools/eslint/node_modules/acorn/dist/walk.es.js b/tools/eslint/node_modules/acorn/dist/walk.es.js new file mode 100644 index 0000000000..bef40937ac --- /dev/null +++ b/tools/eslint/node_modules/acorn/dist/walk.es.js @@ -0,0 +1,342 @@ +// AST walker module for Mozilla Parser API compatible trees + +// A simple walk is one where you simply specify callbacks to be +// called on specific nodes. The last two arguments are optional. A +// simple use would be +// +// walk.simple(myTree, { +// Expression: function(node) { ... } +// }); +// +// to do something with all expressions. All Parser API node types +// can be used to identify node types, as well as Expression, +// Statement, and ScopeBody, which denote categories of nodes. +// +// The base argument can be used to pass a custom (recursive) +// walker, and state can be used to give this walked an initial +// state. + +function simple(node, visitors, base, state, override) { + if (!base) base = exports.base + ;(function c(node, st, override) { + var type = override || node.type, found = visitors[type] + base[type](node, st, c) + if (found) found(node, st) + })(node, state, override) +} + +// An ancestor walk keeps an array of ancestor nodes (including the +// current node) and passes them to the callback as third parameter +// (and also as state parameter when no other state is present). +function ancestor(node, visitors, base, state) { + if (!base) base = exports.base + var ancestors = [] + ;(function c(node, st, override) { + var type = override || node.type, found = visitors[type] + var isNew = node != ancestors[ancestors.length - 1] + if (isNew) ancestors.push(node) + base[type](node, st, c) + if (found) found(node, st || ancestors, ancestors) + if (isNew) ancestors.pop() + })(node, state) +} + +// A recursive walk is one where your functions override the default +// walkers. They can modify and replace the state parameter that's +// threaded through the walk, and can opt how and whether to walk +// their child nodes (by calling their third argument on these +// nodes). +function recursive(node, state, funcs, base, override) { + var visitor = funcs ? exports.make(funcs, base) : base + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c) + })(node, state, override) +} + +function makeTest(test) { + if (typeof test == "string") + return function (type) { return type == test; } + else if (!test) + return function () { return true; } + else + return test +} + +var Found = function Found(node, state) { this.node = node; this.state = state }; + +// Find a node with a given start, end, and type (all are optional, +// null can be used as wildcard). Returns a {node, state} object, or +// undefined when it doesn't find a matching node. +function findNodeAt(node, start, end, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + try { + ;(function c(node, st, override) { + var type = override || node.type + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + base[type](node, st, c) + if ((start == null || node.start == start) && + (end == null || node.end == end) && + test(type, node)) + throw new Found(node, st) + })(node, state) + } catch (e) { + if (e instanceof Found) return e + throw e + } +} + +// Find the innermost node of a given type that contains the given +// position. Interface similar to findNodeAt. +function findNodeAround(node, pos, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + try { + ;(function c(node, st, override) { + var type = override || node.type + if (node.start > pos || node.end < pos) return + base[type](node, st, c) + if (test(type, node)) throw new Found(node, st) + })(node, state) + } catch (e) { + if (e instanceof Found) return e + throw e + } +} + +// Find the outermost matching node after a given position. +function findNodeAfter(node, pos, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + try { + ;(function c(node, st, override) { + if (node.end < pos) return + var type = override || node.type + if (node.start >= pos && test(type, node)) throw new Found(node, st) + base[type](node, st, c) + })(node, state) + } catch (e) { + if (e instanceof Found) return e + throw e + } +} + +// Find the outermost matching node before a given position. +function findNodeBefore(node, pos, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + var max + ;(function c(node, st, override) { + if (node.start > pos) return + var type = override || node.type + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + max = new Found(node, st) + base[type](node, st, c) + })(node, state) + return max +} + +// Fallback to an Object.create polyfill for older environments. +var create = Object.create || function(proto) { + function Ctor() {} + Ctor.prototype = proto + return new Ctor +} + +// Used to create a custom walker. Will fill in all missing node +// type properties with the defaults. +function make(funcs, base) { + if (!base) base = exports.base + var visitor = create(base) + for (var type in funcs) visitor[type] = funcs[type] + return visitor +} + +function skipThrough(node, st, c) { c(node, st) } +function ignore(_node, _st, _c) {} + +// Node walkers. + +var base = {} + +base.Program = base.BlockStatement = function (node, st, c) { + for (var i = 0; i < node.body.length; ++i) + c(node.body[i], st, "Statement") +} +base.Statement = skipThrough +base.EmptyStatement = ignore +base.ExpressionStatement = base.ParenthesizedExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); } +base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression") + c(node.consequent, st, "Statement") + if (node.alternate) c(node.alternate, st, "Statement") +} +base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); } +base.BreakStatement = base.ContinueStatement = ignore +base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression") + c(node.body, st, "Statement") +} +base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression") + for (var i = 0; i < node.cases.length; ++i) { + var cs = node.cases[i] + if (cs.test) c(cs.test, st, "Expression") + for (var j = 0; j < cs.consequent.length; ++j) + c(cs.consequent[j], st, "Statement") + } +} +base.ReturnStatement = base.YieldExpression = function (node, st, c) { + if (node.argument) c(node.argument, st, "Expression") +} +base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); } +base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement") + if (node.handler) c(node.handler, st) + if (node.finalizer) c(node.finalizer, st, "Statement") +} +base.CatchClause = function (node, st, c) { + c(node.param, st, "Pattern") + c(node.body, st, "ScopeBody") +} +base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression") + c(node.body, st, "Statement") +} +base.ForStatement = function (node, st, c) { + if (node.init) c(node.init, st, "ForInit") + if (node.test) c(node.test, st, "Expression") + if (node.update) c(node.update, st, "Expression") + c(node.body, st, "Statement") +} +base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit") + c(node.right, st, "Expression") + c(node.body, st, "Statement") +} +base.ForInit = function (node, st, c) { + if (node.type == "VariableDeclaration") c(node, st) + else c(node, st, "Expression") +} +base.DebuggerStatement = ignore + +base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); } +base.VariableDeclaration = function (node, st, c) { + for (var i = 0; i < node.declarations.length; ++i) + c(node.declarations[i], st) +} +base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern") + if (node.init) c(node.init, st, "Expression") +} + +base.Function = function (node, st, c) { + if (node.id) c(node.id, st, "Pattern") + for (var i = 0; i < node.params.length; i++) + c(node.params[i], st, "Pattern") + c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody") +} +// FIXME drop these node types in next major version +// (They are awkward, and in ES6 every block can be a scope.) +base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); } +base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); } + +base.Pattern = function (node, st, c) { + if (node.type == "Identifier") + c(node, st, "VariablePattern") + else if (node.type == "MemberExpression") + c(node, st, "MemberPattern") + else + c(node, st) +} +base.VariablePattern = ignore +base.MemberPattern = skipThrough +base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); } +base.ArrayPattern = function (node, st, c) { + for (var i = 0; i < node.elements.length; ++i) { + var elt = node.elements[i] + if (elt) c(elt, st, "Pattern") + } +} +base.ObjectPattern = function (node, st, c) { + for (var i = 0; i < node.properties.length; ++i) + c(node.properties[i].value, st, "Pattern") +} + +base.Expression = skipThrough +base.ThisExpression = base.Super = base.MetaProperty = ignore +base.ArrayExpression = function (node, st, c) { + for (var i = 0; i < node.elements.length; ++i) { + var elt = node.elements[i] + if (elt) c(elt, st, "Expression") + } +} +base.ObjectExpression = function (node, st, c) { + for (var i = 0; i < node.properties.length; ++i) + c(node.properties[i], st) +} +base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration +base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { + for (var i = 0; i < node.expressions.length; ++i) + c(node.expressions[i], st, "Expression") +} +base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression") +} +base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression") + c(node.right, st, "Expression") +} +base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern") + c(node.right, st, "Expression") +} +base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression") + c(node.consequent, st, "Expression") + c(node.alternate, st, "Expression") +} +base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression") + if (node.arguments) for (var i = 0; i < node.arguments.length; ++i) + c(node.arguments[i], st, "Expression") +} +base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression") + if (node.computed) c(node.property, st, "Expression") +} +base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression") + if (node.source) c(node.source, st, "Expression") +} +base.ExportAllDeclaration = function (node, st, c) { + c(node.source, st, "Expression") +} +base.ImportDeclaration = function (node, st, c) { + for (var i = 0; i < node.specifiers.length; i++) + c(node.specifiers[i], st) + c(node.source, st, "Expression") +} +base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore + +base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression") + c(node.quasi, st) +} +base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); } +base.Class = function (node, st, c) { + if (node.id) c(node.id, st, "Pattern") + if (node.superClass) c(node.superClass, st, "Expression") + for (var i = 0; i < node.body.body.length; i++) + c(node.body.body[i], st) +} +base.MethodDefinition = base.Property = function (node, st, c) { + if (node.computed) c(node.key, st, "Expression") + c(node.value, st, "Expression") +} + +export { simple, ancestor, recursive, findNodeAt, findNodeAround, findNodeAfter, findNodeBefore, make, base };
\ No newline at end of file diff --git a/tools/eslint/node_modules/acorn/dist/walk.js b/tools/eslint/node_modules/acorn/dist/walk.js index 9c4b4898b8..56079ac13f 100644 --- a/tools/eslint/node_modules/acorn/dist/walk.js +++ b/tools/eslint/node_modules/acorn/dist/walk.js @@ -1,379 +1,360 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.acorn || (g.acorn = {})).walk = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&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?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ -// AST walker module for Mozilla Parser API compatible trees - -// A simple walk is one where you simply specify callbacks to be -// called on specific nodes. The last two arguments are optional. A -// simple use would be -// -// walk.simple(myTree, { -// Expression: function(node) { ... } -// }); -// -// to do something with all expressions. All Parser API node types -// can be used to identify node types, as well as Expression, -// Statement, and ScopeBody, which denote categories of nodes. -// -// The base argument can be used to pass a custom (recursive) -// walker, and state can be used to give this walked an initial -// state. - -"use strict"; - -exports.__esModule = true; -exports.simple = simple; -exports.ancestor = ancestor; -exports.recursive = recursive; -exports.findNodeAt = findNodeAt; -exports.findNodeAround = findNodeAround; -exports.findNodeAfter = findNodeAfter; -exports.findNodeBefore = findNodeBefore; -exports.make = make; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function simple(node, visitors, base, state, override) { - if (!base) base = exports.base;(function c(node, st, override) { - var type = override || node.type, - found = visitors[type]; - base[type](node, st, c); - if (found) found(node, st); - })(node, state, override); -} - -// An ancestor walk keeps an array of ancestor nodes (including the -// current node) and passes them to the callback as third parameter -// (and also as state parameter when no other state is present). - -function ancestor(node, visitors, base, state) { - if (!base) base = exports.base; - var ancestors = [];(function c(node, st, override) { - var type = override || node.type, - found = visitors[type]; - var isNew = node != ancestors[ancestors.length - 1]; - if (isNew) ancestors.push(node); - base[type](node, st, c); - if (found) found(node, st || ancestors, ancestors); - if (isNew) ancestors.pop(); - })(node, state); -} - -// A recursive walk is one where your functions override the default -// walkers. They can modify and replace the state parameter that's -// threaded through the walk, and can opt how and whether to walk -// their child nodes (by calling their third argument on these -// nodes). - -function recursive(node, state, funcs, base, override) { - var visitor = funcs ? exports.make(funcs, base) : base;(function c(node, st, override) { - visitor[override || node.type](node, st, c); - })(node, state, override); -} - -function makeTest(test) { - if (typeof test == "string") return function (type) { - return type == test; - };else if (!test) return function () { - return true; - };else return test; -} - -var Found = function Found(node, state) { - _classCallCheck(this, Found); - - this.node = node;this.state = state; -} - -// Find a node with a given start, end, and type (all are optional, -// null can be used as wildcard). Returns a {node, state} object, or -// undefined when it doesn't find a matching node. -; - -function findNodeAt(node, start, end, test, base, state) { - test = makeTest(test); - if (!base) base = exports.base; - try { +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.acorn = global.acorn || {}, global.acorn.walk = global.acorn.walk || {}))); +}(this, function (exports) { 'use strict'; + + // AST walker module for Mozilla Parser API compatible trees + + // A simple walk is one where you simply specify callbacks to be + // called on specific nodes. The last two arguments are optional. A + // simple use would be + // + // walk.simple(myTree, { + // Expression: function(node) { ... } + // }); + // + // to do something with all expressions. All Parser API node types + // can be used to identify node types, as well as Expression, + // Statement, and ScopeBody, which denote categories of nodes. + // + // The base argument can be used to pass a custom (recursive) + // walker, and state can be used to give this walked an initial + // state. + + function simple(node, visitors, base, state, override) { + if (!base) base = exports.base ;(function c(node, st, override) { - var type = override || node.type; - if ((start == null || node.start <= start) && (end == null || node.end >= end)) base[type](node, st, c); - if ((start == null || node.start == start) && (end == null || node.end == end) && test(type, node)) throw new Found(node, st); - })(node, state); - } catch (e) { - if (e instanceof Found) return e; - throw e; - } -} + var type = override || node.type, found = visitors[type] + base[type](node, st, c) + if (found) found(node, st) + })(node, state, override) + } -// Find the innermost node of a given type that contains the given -// position. Interface similar to findNodeAt. + // An ancestor walk keeps an array of ancestor nodes (including the + // current node) and passes them to the callback as third parameter + // (and also as state parameter when no other state is present). + function ancestor(node, visitors, base, state) { + if (!base) base = exports.base + var ancestors = [] + ;(function c(node, st, override) { + var type = override || node.type, found = visitors[type] + var isNew = node != ancestors[ancestors.length - 1] + if (isNew) ancestors.push(node) + base[type](node, st, c) + if (found) found(node, st || ancestors, ancestors) + if (isNew) ancestors.pop() + })(node, state) + } -function findNodeAround(node, pos, test, base, state) { - test = makeTest(test); - if (!base) base = exports.base; - try { + // A recursive walk is one where your functions override the default + // walkers. They can modify and replace the state parameter that's + // threaded through the walk, and can opt how and whether to walk + // their child nodes (by calling their third argument on these + // nodes). + function recursive(node, state, funcs, base, override) { + var visitor = funcs ? exports.make(funcs, base) : base ;(function c(node, st, override) { - var type = override || node.type; - if (node.start > pos || node.end < pos) return; - base[type](node, st, c); - if (test(type, node)) throw new Found(node, st); - })(node, state); - } catch (e) { - if (e instanceof Found) return e; - throw e; - } -} + visitor[override || node.type](node, st, c) + })(node, state, override) + } -// Find the outermost matching node after a given position. + function makeTest(test) { + if (typeof test == "string") + return function (type) { return type == test; } + else if (!test) + return function () { return true; } + else + return test + } -function findNodeAfter(node, pos, test, base, state) { - test = makeTest(test); - if (!base) base = exports.base; - try { - ;(function c(node, st, override) { - if (node.end < pos) return; - var type = override || node.type; - if (node.start >= pos && test(type, node)) throw new Found(node, st); - base[type](node, st, c); - })(node, state); - } catch (e) { - if (e instanceof Found) return e; - throw e; - } -} + var Found = function Found(node, state) { this.node = node; this.state = state }; + + // Find a node with a given start, end, and type (all are optional, + // null can be used as wildcard). Returns a {node, state} object, or + // undefined when it doesn't find a matching node. + function findNodeAt(node, start, end, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + try { + ;(function c(node, st, override) { + var type = override || node.type + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + base[type](node, st, c) + if ((start == null || node.start == start) && + (end == null || node.end == end) && + test(type, node)) + throw new Found(node, st) + })(node, state) + } catch (e) { + if (e instanceof Found) return e + throw e + } + } -// Find the outermost matching node before a given position. + // Find the innermost node of a given type that contains the given + // position. Interface similar to findNodeAt. + function findNodeAround(node, pos, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + try { + ;(function c(node, st, override) { + var type = override || node.type + if (node.start > pos || node.end < pos) return + base[type](node, st, c) + if (test(type, node)) throw new Found(node, st) + })(node, state) + } catch (e) { + if (e instanceof Found) return e + throw e + } + } -function findNodeBefore(node, pos, test, base, state) { - test = makeTest(test); - if (!base) base = exports.base; - var max = undefined;(function c(node, st, override) { - if (node.start > pos) return; - var type = override || node.type; - if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) max = new Found(node, st); - base[type](node, st, c); - })(node, state); - return max; -} + // Find the outermost matching node after a given position. + function findNodeAfter(node, pos, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + try { + ;(function c(node, st, override) { + if (node.end < pos) return + var type = override || node.type + if (node.start >= pos && test(type, node)) throw new Found(node, st) + base[type](node, st, c) + })(node, state) + } catch (e) { + if (e instanceof Found) return e + throw e + } + } -// Fallback to an Object.create polyfill for older environments. -var create = Object.create || function (proto) { - function Ctor() {} - Ctor.prototype = proto; - return new Ctor(); -}; + // Find the outermost matching node before a given position. + function findNodeBefore(node, pos, test, base, state) { + test = makeTest(test) + if (!base) base = exports.base + var max + ;(function c(node, st, override) { + if (node.start > pos) return + var type = override || node.type + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + max = new Found(node, st) + base[type](node, st, c) + })(node, state) + return max + } -// Used to create a custom walker. Will fill in all missing node -// type properties with the defaults. + // Fallback to an Object.create polyfill for older environments. + var create = Object.create || function(proto) { + function Ctor() {} + Ctor.prototype = proto + return new Ctor + } -function make(funcs, base) { - if (!base) base = exports.base; - var visitor = create(base); - for (var type in funcs) visitor[type] = funcs[type]; - return visitor; -} + // Used to create a custom walker. Will fill in all missing node + // type properties with the defaults. + function make(funcs, base) { + if (!base) base = exports.base + var visitor = create(base) + for (var type in funcs) visitor[type] = funcs[type] + return visitor + } -function skipThrough(node, st, c) { - c(node, st); -} -function ignore(_node, _st, _c) {} + function skipThrough(node, st, c) { c(node, st) } + function ignore(_node, _st, _c) {} -// Node walkers. + // Node walkers. -var base = {}; + var base = {} -exports.base = base; -base.Program = base.BlockStatement = function (node, st, c) { - for (var i = 0; i < node.body.length; ++i) { - c(node.body[i], st, "Statement"); - } -}; -base.Statement = skipThrough; -base.EmptyStatement = ignore; -base.ExpressionStatement = base.ParenthesizedExpression = function (node, st, c) { - return c(node.expression, st, "Expression"); -}; -base.IfStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Statement"); - if (node.alternate) c(node.alternate, st, "Statement"); -}; -base.LabeledStatement = function (node, st, c) { - return c(node.body, st, "Statement"); -}; -base.BreakStatement = base.ContinueStatement = ignore; -base.WithStatement = function (node, st, c) { - c(node.object, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.SwitchStatement = function (node, st, c) { - c(node.discriminant, st, "Expression"); - for (var i = 0; i < node.cases.length; ++i) { - var cs = node.cases[i]; - if (cs.test) c(cs.test, st, "Expression"); - for (var j = 0; j < cs.consequent.length; ++j) { - c(cs.consequent[j], st, "Statement"); + base.Program = base.BlockStatement = function (node, st, c) { + for (var i = 0; i < node.body.length; ++i) + c(node.body[i], st, "Statement") + } + base.Statement = skipThrough + base.EmptyStatement = ignore + base.ExpressionStatement = base.ParenthesizedExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); } + base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression") + c(node.consequent, st, "Statement") + if (node.alternate) c(node.alternate, st, "Statement") + } + base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); } + base.BreakStatement = base.ContinueStatement = ignore + base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression") + c(node.body, st, "Statement") + } + base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression") + for (var i = 0; i < node.cases.length; ++i) { + var cs = node.cases[i] + if (cs.test) c(cs.test, st, "Expression") + for (var j = 0; j < cs.consequent.length; ++j) + c(cs.consequent[j], st, "Statement") } } -}; -base.ReturnStatement = base.YieldExpression = function (node, st, c) { - if (node.argument) c(node.argument, st, "Expression"); -}; -base.ThrowStatement = base.SpreadElement = function (node, st, c) { - return c(node.argument, st, "Expression"); -}; -base.TryStatement = function (node, st, c) { - c(node.block, st, "Statement"); - if (node.handler) c(node.handler, st); - if (node.finalizer) c(node.finalizer, st, "Statement"); -}; -base.CatchClause = function (node, st, c) { - c(node.param, st, "Pattern"); - c(node.body, st, "ScopeBody"); -}; -base.WhileStatement = base.DoWhileStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForStatement = function (node, st, c) { - if (node.init) c(node.init, st, "ForInit"); - if (node.test) c(node.test, st, "Expression"); - if (node.update) c(node.update, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForInStatement = base.ForOfStatement = function (node, st, c) { - c(node.left, st, "ForInit"); - c(node.right, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForInit = function (node, st, c) { - if (node.type == "VariableDeclaration") c(node, st);else c(node, st, "Expression"); -}; -base.DebuggerStatement = ignore; + base.ReturnStatement = base.YieldExpression = function (node, st, c) { + if (node.argument) c(node.argument, st, "Expression") + } + base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); } + base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement") + if (node.handler) c(node.handler, st) + if (node.finalizer) c(node.finalizer, st, "Statement") + } + base.CatchClause = function (node, st, c) { + c(node.param, st, "Pattern") + c(node.body, st, "ScopeBody") + } + base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression") + c(node.body, st, "Statement") + } + base.ForStatement = function (node, st, c) { + if (node.init) c(node.init, st, "ForInit") + if (node.test) c(node.test, st, "Expression") + if (node.update) c(node.update, st, "Expression") + c(node.body, st, "Statement") + } + base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit") + c(node.right, st, "Expression") + c(node.body, st, "Statement") + } + base.ForInit = function (node, st, c) { + if (node.type == "VariableDeclaration") c(node, st) + else c(node, st, "Expression") + } + base.DebuggerStatement = ignore -base.FunctionDeclaration = function (node, st, c) { - return c(node, st, "Function"); -}; -base.VariableDeclaration = function (node, st, c) { - for (var i = 0; i < node.declarations.length; ++i) { - c(node.declarations[i], st); - } -}; -base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) c(node.init, st, "Expression"); -}; + base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); } + base.VariableDeclaration = function (node, st, c) { + for (var i = 0; i < node.declarations.length; ++i) + c(node.declarations[i], st) + } + base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern") + if (node.init) c(node.init, st, "Expression") + } + + base.Function = function (node, st, c) { + if (node.id) c(node.id, st, "Pattern") + for (var i = 0; i < node.params.length; i++) + c(node.params[i], st, "Pattern") + c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody") + } + // FIXME drop these node types in next major version + // (They are awkward, and in ES6 every block can be a scope.) + base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); } + base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); } + + base.Pattern = function (node, st, c) { + if (node.type == "Identifier") + c(node, st, "VariablePattern") + else if (node.type == "MemberExpression") + c(node, st, "MemberPattern") + else + c(node, st) + } + base.VariablePattern = ignore + base.MemberPattern = skipThrough + base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); } + base.ArrayPattern = function (node, st, c) { + for (var i = 0; i < node.elements.length; ++i) { + var elt = node.elements[i] + if (elt) c(elt, st, "Pattern") + } + } + base.ObjectPattern = function (node, st, c) { + for (var i = 0; i < node.properties.length; ++i) + c(node.properties[i].value, st, "Pattern") + } -base.Function = function (node, st, c) { - if (node.id) c(node.id, st, "Pattern"); - for (var i = 0; i < node.params.length; i++) { - c(node.params[i], st, "Pattern"); - }c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody"); -}; -// FIXME drop these node types in next major version -// (They are awkward, and in ES6 every block can be a scope.) -base.ScopeBody = function (node, st, c) { - return c(node, st, "Statement"); -}; -base.ScopeExpression = function (node, st, c) { - return c(node, st, "Expression"); -}; + base.Expression = skipThrough + base.ThisExpression = base.Super = base.MetaProperty = ignore + base.ArrayExpression = function (node, st, c) { + for (var i = 0; i < node.elements.length; ++i) { + var elt = node.elements[i] + if (elt) c(elt, st, "Expression") + } + } + base.ObjectExpression = function (node, st, c) { + for (var i = 0; i < node.properties.length; ++i) + c(node.properties[i], st) + } + base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration + base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { + for (var i = 0; i < node.expressions.length; ++i) + c(node.expressions[i], st, "Expression") + } + base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression") + } + base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression") + c(node.right, st, "Expression") + } + base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern") + c(node.right, st, "Expression") + } + base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression") + c(node.consequent, st, "Expression") + c(node.alternate, st, "Expression") + } + base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression") + if (node.arguments) for (var i = 0; i < node.arguments.length; ++i) + c(node.arguments[i], st, "Expression") + } + base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression") + if (node.computed) c(node.property, st, "Expression") + } + base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression") + if (node.source) c(node.source, st, "Expression") + } + base.ExportAllDeclaration = function (node, st, c) { + c(node.source, st, "Expression") + } + base.ImportDeclaration = function (node, st, c) { + for (var i = 0; i < node.specifiers.length; i++) + c(node.specifiers[i], st) + c(node.source, st, "Expression") + } + base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore -base.Pattern = function (node, st, c) { - if (node.type == "Identifier") c(node, st, "VariablePattern");else if (node.type == "MemberExpression") c(node, st, "MemberPattern");else c(node, st); -}; -base.VariablePattern = ignore; -base.MemberPattern = skipThrough; -base.RestElement = function (node, st, c) { - return c(node.argument, st, "Pattern"); -}; -base.ArrayPattern = function (node, st, c) { - for (var i = 0; i < node.elements.length; ++i) { - var elt = node.elements[i]; - if (elt) c(elt, st, "Pattern"); - } -}; -base.ObjectPattern = function (node, st, c) { - for (var i = 0; i < node.properties.length; ++i) { - c(node.properties[i].value, st, "Pattern"); - } -}; + base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression") + c(node.quasi, st) + } + base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); } + base.Class = function (node, st, c) { + if (node.id) c(node.id, st, "Pattern") + if (node.superClass) c(node.superClass, st, "Expression") + for (var i = 0; i < node.body.body.length; i++) + c(node.body.body[i], st) + } + base.MethodDefinition = base.Property = function (node, st, c) { + if (node.computed) c(node.key, st, "Expression") + c(node.value, st, "Expression") + } -base.Expression = skipThrough; -base.ThisExpression = base.Super = base.MetaProperty = ignore; -base.ArrayExpression = function (node, st, c) { - for (var i = 0; i < node.elements.length; ++i) { - var elt = node.elements[i]; - if (elt) c(elt, st, "Expression"); - } -}; -base.ObjectExpression = function (node, st, c) { - for (var i = 0; i < node.properties.length; ++i) { - c(node.properties[i], st); - } -}; -base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; -base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { - for (var i = 0; i < node.expressions.length; ++i) { - c(node.expressions[i], st, "Expression"); - } -}; -base.UnaryExpression = base.UpdateExpression = function (node, st, c) { - c(node.argument, st, "Expression"); -}; -base.BinaryExpression = base.LogicalExpression = function (node, st, c) { - c(node.left, st, "Expression"); - c(node.right, st, "Expression"); -}; -base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); -}; -base.ConditionalExpression = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Expression"); - c(node.alternate, st, "Expression"); -}; -base.NewExpression = base.CallExpression = function (node, st, c) { - c(node.callee, st, "Expression"); - if (node.arguments) for (var i = 0; i < node.arguments.length; ++i) { - c(node.arguments[i], st, "Expression"); - } -}; -base.MemberExpression = function (node, st, c) { - c(node.object, st, "Expression"); - if (node.computed) c(node.property, st, "Expression"); -}; -base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); - if (node.source) c(node.source, st, "Expression"); -}; -base.ExportAllDeclaration = function (node, st, c) { - c(node.source, st, "Expression"); -}; -base.ImportDeclaration = function (node, st, c) { - for (var i = 0; i < node.specifiers.length; i++) { - c(node.specifiers[i], st); - }c(node.source, st, "Expression"); -}; -base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; + exports.simple = simple; + exports.ancestor = ancestor; + exports.recursive = recursive; + exports.findNodeAt = findNodeAt; + exports.findNodeAround = findNodeAround; + exports.findNodeAfter = findNodeAfter; + exports.findNodeBefore = findNodeBefore; + exports.make = make; + exports.base = base; -base.TaggedTemplateExpression = function (node, st, c) { - c(node.tag, st, "Expression"); - c(node.quasi, st); -}; -base.ClassDeclaration = base.ClassExpression = function (node, st, c) { - return c(node, st, "Class"); -}; -base.Class = function (node, st, c) { - if (node.id) c(node.id, st, "Pattern"); - if (node.superClass) c(node.superClass, st, "Expression"); - for (var i = 0; i < node.body.body.length; i++) { - c(node.body.body[i], st); - } -}; -base.MethodDefinition = base.Property = function (node, st, c) { - if (node.computed) c(node.key, st, "Expression"); - c(node.value, st, "Expression"); -}; + Object.defineProperty(exports, '__esModule', { value: true }); -},{}]},{},[1])(1) -});
\ No newline at end of file +}));
\ No newline at end of file diff --git a/tools/eslint/node_modules/acorn/package.json b/tools/eslint/node_modules/acorn/package.json index 8b6deea764..4abe7ad8f2 100644 --- a/tools/eslint/node_modules/acorn/package.json +++ b/tools/eslint/node_modules/acorn/package.json @@ -1,42 +1,51 @@ { "_args": [ [ - "acorn@^3.2.0", + { + "raw": "acorn@^3.3.0", + "scope": null, + "escapedName": "acorn", + "name": "acorn", + "rawSpec": "^3.3.0", + "spec": ">=3.3.0 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/espree" ] ], - "_from": "acorn@>=3.2.0 <4.0.0", - "_id": "acorn@3.2.0", + "_from": "acorn@>=3.3.0 <4.0.0", + "_id": "acorn@3.3.0", "_inCache": true, "_installable": true, "_location": "/acorn", - "_nodeVersion": "6.2.1", + "_nodeVersion": "6.3.0", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/acorn-3.2.0.tgz_1465299452629_0.4749092774000019" + "tmp": "tmp/acorn-3.3.0.tgz_1469481913382_0.3856039580423385" }, "_npmUser": { - "email": "marijnh@gmail.com", - "name": "marijn" + "name": "marijn", + "email": "marijnh@gmail.com" }, - "_npmVersion": "3.9.3", + "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { - "name": "acorn", - "raw": "acorn@^3.2.0", - "rawSpec": "^3.2.0", + "raw": "acorn@^3.3.0", "scope": null, - "spec": ">=3.2.0 <4.0.0", + "escapedName": "acorn", + "name": "acorn", + "rawSpec": "^3.3.0", + "spec": ">=3.3.0 <4.0.0", "type": "range" }, "_requiredBy": [ "/acorn-jsx", "/espree" ], - "_resolved": "https://registry.npmjs.org/acorn/-/acorn-3.2.0.tgz", - "_shasum": "7a82989ef6f063a237ababaf8df20d2965184b9f", + "_resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "_shasum": "45e37fb39e8da3f25baee3ff5369e2bb5f22017a", "_shrinkwrap": null, - "_spec": "acorn@^3.2.0", + "_spec": "acorn@^3.3.0", "_where": "/Users/trott/io.js/tools/node_modules/espree", "bin": { "acorn": "./bin/acorn" @@ -46,7 +55,7 @@ }, "contributors": [ { - "name": "-e List of Acorn contributors. Updated before every release." + "name": "List of Acorn contributors. Updated before every release." }, { "name": "Adrian Rakovsky" @@ -55,6 +64,9 @@ "name": "Alistair Braidwood" }, { + "name": "Amila Welihinda" + }, + { "name": "Andres Suarez" }, { @@ -79,6 +91,9 @@ "name": "Conrad Irwin" }, { + "name": "Daniel Tschinder" + }, + { "name": "David Bonnet" }, { @@ -127,6 +142,9 @@ "name": "Keheliya Gallaba" }, { + "name": "Kevin Irish" + }, + { "name": "Kevin Kwok" }, { @@ -196,6 +214,9 @@ "name": "Rich Harris" }, { + "name": "Rich-Harris" + }, + { "name": "Sebastian McKenzie" }, { @@ -211,32 +232,31 @@ "dependencies": {}, "description": "ECMAScript parser", "devDependencies": { - "babel-core": "^5.6.15", - "babelify": "^6.1.2", - "browserify": "^10.2.4", - "browserify-derequire": "^0.9.4", - "unicode-8.0.0": "^0.1.5" + "rollup": "^0.34.1", + "rollup-plugin-buble": "^0.11.0", + "unicode-9.0.0": "^0.7.0" }, "directories": {}, "dist": { - "shasum": "7a82989ef6f063a237ababaf8df20d2965184b9f", - "tarball": "https://registry.npmjs.org/acorn/-/acorn-3.2.0.tgz" + "shasum": "45e37fb39e8da3f25baee3ff5369e2bb5f22017a", + "tarball": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" }, "engines": { "node": ">=0.4.0" }, - "gitHead": "c7d72884836f92742cb6fcdb01aa42de0c2dd8fc", + "gitHead": "693c5fe9257c3e114a7097dc9196d6e484e52809", "homepage": "https://github.com/ternjs/acorn", + "jsnext:main": "dist/acorn.es.js", "license": "MIT", "main": "dist/acorn.js", "maintainers": [ { - "email": "marijnh@gmail.com", - "name": "marijn" + "name": "marijn", + "email": "marijnh@gmail.com" }, { - "email": "me@rreverser.com", - "name": "rreverser" + "name": "rreverser", + "email": "me@rreverser.com" } ], "name": "acorn", @@ -247,8 +267,14 @@ "url": "git+https://github.com/ternjs/acorn.git" }, "scripts": { - "prepublish": "node bin/build-acorn.js", + "build": "npm run build:main && npm run build:walk && npm run build:loose && npm run build:bin", + "build:bin": "rollup -c rollup/config.bin.js", + "build:loose": "rollup -c rollup/config.loose.js", + "build:main": "rollup -c rollup/config.main.js", + "build:walk": "rollup -c rollup/config.walk.js", + "prepublish": "npm test", + "pretest": "npm run build", "test": "node test/run.js" }, - "version": "3.2.0" + "version": "3.3.0" } diff --git a/tools/eslint/node_modules/acorn/rollup/config.bin.js b/tools/eslint/node_modules/acorn/rollup/config.bin.js new file mode 100644 index 0000000000..3726606e0d --- /dev/null +++ b/tools/eslint/node_modules/acorn/rollup/config.bin.js @@ -0,0 +1,15 @@ +import buble from 'rollup-plugin-buble' + +export default { + entry: 'src/bin/acorn.js', + dest: 'bin/acorn', + format: 'cjs', + banner: '#!/usr/bin/env node', + external: [ 'fs', 'path', 'acorn' ], + paths: { + acorn: '../dist/acorn.js' + }, + plugins: [ + buble() + ] +} diff --git a/tools/eslint/node_modules/acorn/rollup/config.loose.js b/tools/eslint/node_modules/acorn/rollup/config.loose.js new file mode 100644 index 0000000000..11116950ee --- /dev/null +++ b/tools/eslint/node_modules/acorn/rollup/config.loose.js @@ -0,0 +1,20 @@ +import buble from 'rollup-plugin-buble' + +export default { + entry: 'src/loose/index.js', + moduleName: 'acorn.loose', + external: [ 'acorn' ], + paths: { + acorn: './acorn.js' + }, + globals: { + acorn: 'acorn' + }, + targets: [ + { dest: 'dist/acorn_loose.js', format: 'umd' }, + { dest: 'dist/acorn_loose.es.js', format: 'es' } + ], + plugins: [ + buble() + ] +} diff --git a/tools/eslint/node_modules/acorn/rollup/config.main.js b/tools/eslint/node_modules/acorn/rollup/config.main.js new file mode 100644 index 0000000000..730b79b2fe --- /dev/null +++ b/tools/eslint/node_modules/acorn/rollup/config.main.js @@ -0,0 +1,11 @@ +import buble from 'rollup-plugin-buble'; + +export default { + entry: 'src/index.js', + moduleName: 'acorn', + plugins: [ buble() ], + targets: [ + { dest: 'dist/acorn.js', format: 'umd' }, + { dest: 'dist/acorn.es.js', format: 'es' } + ] +}; diff --git a/tools/eslint/node_modules/acorn/rollup/config.walk.js b/tools/eslint/node_modules/acorn/rollup/config.walk.js new file mode 100644 index 0000000000..95f2a93db1 --- /dev/null +++ b/tools/eslint/node_modules/acorn/rollup/config.walk.js @@ -0,0 +1,11 @@ +import buble from 'rollup-plugin-buble'; + +export default { + entry: 'src/walk/index.js', + moduleName: 'acorn.walk', + plugins: [ buble() ], + targets: [ + { dest: 'dist/walk.js', format: 'umd' }, + { dest: 'dist/walk.es.js', format: 'es' } + ] +}; diff --git a/tools/eslint/node_modules/acorn/src/bin/acorn.js b/tools/eslint/node_modules/acorn/src/bin/acorn.js index 4d7ce83a35..2d9cff7c60 100644 --- a/tools/eslint/node_modules/acorn/src/bin/acorn.js +++ b/tools/eslint/node_modules/acorn/src/bin/acorn.js @@ -1,8 +1,6 @@ -#!/usr/bin/env node - import {basename} from "path" import {readFileSync as readFile} from "fs" -import * as acorn from "../dist/acorn.js" +import * as acorn from "acorn" let infile, forceFile, silent = false, compact = false, tokenize = false const options = {} diff --git a/tools/eslint/node_modules/acorn/src/expression.js b/tools/eslint/node_modules/acorn/src/expression.js index a8c7497ab2..20b25cf055 100644 --- a/tools/eslint/node_modules/acorn/src/expression.js +++ b/tools/eslint/node_modules/acorn/src/expression.js @@ -607,25 +607,29 @@ pp.parseFunctionBody = function(node, isArrowFunction) { // If this is a strict mode function, verify that argument names // are not repeated, and it does not try to bind the words `eval` // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { + let useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null; + if (this.strict || useStrict) { let oldStrict = this.strict this.strict = true if (node.id) this.checkLVal(node.id, true) - this.checkParams(node) + this.checkParams(node, useStrict) this.strict = oldStrict } else if (isArrowFunction) { - this.checkParams(node) + this.checkParams(node, useStrict) } } // Checks function params for various disallowed patterns such as using "eval" // or "arguments" and duplicate parameters. -pp.checkParams = function(node) { +pp.checkParams = function(node, useStrict) { let nameHash = {} - for (let i = 0; i < node.params.length; i++) + for (let i = 0; i < node.params.length; i++) { + if (useStrict && this.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier") + this.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list"); this.checkLVal(node.params[i], true, nameHash) + } } // Parses a comma-separated list of expressions, and returns them as diff --git a/tools/eslint/node_modules/acorn/src/identifier.js b/tools/eslint/node_modules/acorn/src/identifier.js index 0be50dc40b..e4a7415ac1 100644 --- a/tools/eslint/node_modules/acorn/src/identifier.js +++ b/tools/eslint/node_modules/acorn/src/identifier.js @@ -26,8 +26,8 @@ export const keywords = { // code point above 128. // Generated by `bin/generate-identifier-regex.js`. -let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ad\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" -let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" +let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]") const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]") @@ -39,8 +39,8 @@ nonASCIIidentifierStartChars = nonASCIIidentifierChars = null // offset starts at 0x10000, and each pair of numbers represents an // offset to the next range, and then a size of the range. They were // generated by bin/generate-identifier-regex.js -const astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,287,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,1288,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] -const astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,168,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,3617,6,792618,239] +const astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] +const astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239] // This has a complexity linear to the value of the code. The // assumption is that looking up astral identifier characters is diff --git a/tools/eslint/node_modules/acorn/src/index.js b/tools/eslint/node_modules/acorn/src/index.js index a585dea5bf..0a59bdf791 100644 --- a/tools/eslint/node_modules/acorn/src/index.js +++ b/tools/eslint/node_modules/acorn/src/index.js @@ -36,7 +36,7 @@ export {isIdentifierChar, isIdentifierStart} from "./identifier" export {Token} from "./tokenize" export {isNewLine, lineBreak, lineBreakG} from "./whitespace" -export const version = "3.1.0" +export const version = "3.3.0" // The main exported interface (under `self.acorn` when in the // browser) is a `parse` function that takes a code string and diff --git a/tools/eslint/node_modules/acorn/src/loose/acorn_loose.js b/tools/eslint/node_modules/acorn/src/loose/acorn_loose.js deleted file mode 100644 index e69de29bb2..0000000000 --- a/tools/eslint/node_modules/acorn/src/loose/acorn_loose.js +++ /dev/null diff --git a/tools/eslint/node_modules/acorn/src/loose/expression.js b/tools/eslint/node_modules/acorn/src/loose/expression.js index 5bff0d1a1a..52f409e5c9 100644 --- a/tools/eslint/node_modules/acorn/src/loose/expression.js +++ b/tools/eslint/node_modules/acorn/src/loose/expression.js @@ -1,6 +1,6 @@ import {LooseParser} from "./state" import {isDummy} from "./parseutil" -import {tokTypes as tt} from ".." +import {tokTypes as tt} from "acorn" const lp = LooseParser.prototype diff --git a/tools/eslint/node_modules/acorn/src/loose/index.js b/tools/eslint/node_modules/acorn/src/loose/index.js index 7b3fad1402..e9e940e75f 100644 --- a/tools/eslint/node_modules/acorn/src/loose/index.js +++ b/tools/eslint/node_modules/acorn/src/loose/index.js @@ -29,7 +29,7 @@ // invasive changes and simplifications without creating a complicated // tangle. -import * as acorn from ".." +import acorn from "acorn" import {LooseParser, pluginsLoose} from "./state" import "./tokenize" import "./statement" diff --git a/tools/eslint/node_modules/acorn/src/loose/state.js b/tools/eslint/node_modules/acorn/src/loose/state.js index 678c9b6f4c..5101bc4de2 100644 --- a/tools/eslint/node_modules/acorn/src/loose/state.js +++ b/tools/eslint/node_modules/acorn/src/loose/state.js @@ -1,4 +1,4 @@ -import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from ".." +import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from "acorn" // Registered plugins export const pluginsLoose = {} diff --git a/tools/eslint/node_modules/acorn/src/loose/statement.js b/tools/eslint/node_modules/acorn/src/loose/statement.js index 277ced6266..4da72189eb 100644 --- a/tools/eslint/node_modules/acorn/src/loose/statement.js +++ b/tools/eslint/node_modules/acorn/src/loose/statement.js @@ -1,6 +1,6 @@ import {LooseParser} from "./state" import {isDummy} from "./parseutil" -import {getLineInfo, tokTypes as tt} from ".." +import {getLineInfo, tokTypes as tt} from "acorn" const lp = LooseParser.prototype diff --git a/tools/eslint/node_modules/acorn/src/loose/tokenize.js b/tools/eslint/node_modules/acorn/src/loose/tokenize.js index c20db22467..ce5a49a3f4 100644 --- a/tools/eslint/node_modules/acorn/src/loose/tokenize.js +++ b/tools/eslint/node_modules/acorn/src/loose/tokenize.js @@ -1,4 +1,4 @@ -import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from ".." +import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from "acorn" import {LooseParser} from "./state" const lp = LooseParser.prototype diff --git a/tools/eslint/node_modules/acorn/src/lval.js b/tools/eslint/node_modules/acorn/src/lval.js index 2a390c4777..a6bc3b7ad2 100644 --- a/tools/eslint/node_modules/acorn/src/lval.js +++ b/tools/eslint/node_modules/acorn/src/lval.js @@ -75,7 +75,7 @@ pp.toAssignableList = function(exprList, isBinding) { --end } - if (isBinding && last.type === "RestElement" && last.argument.type !== "Identifier") + if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") this.unexpected(last.argument.start) } for (let i = 0; i < end; i++) { @@ -90,7 +90,7 @@ pp.toAssignableList = function(exprList, isBinding) { pp.parseSpread = function(refDestructuringErrors) { let node = this.startNode() this.next() - node.argument = this.parseMaybeAssign(refDestructuringErrors) + node.argument = this.parseMaybeAssign(false, refDestructuringErrors) return this.finishNode(node, "SpreadElement") } diff --git a/tools/eslint/node_modules/acorn/src/statement.js b/tools/eslint/node_modules/acorn/src/statement.js index 44392e6d8e..ab5ece0307 100644 --- a/tools/eslint/node_modules/acorn/src/statement.js +++ b/tools/eslint/node_modules/acorn/src/statement.js @@ -40,7 +40,7 @@ pp.isLet = function() { let next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next) if (nextCh === 91 || nextCh == 123) return true // '{' and '[' if (isIdentifierStart(nextCh, true)) { - for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos, true)); ++pos) {} + for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {} let ident = this.input.slice(next, pos) if (!this.isKeyword(ident)) return true } diff --git a/tools/eslint/node_modules/acorn/src/tokencontext.js b/tools/eslint/node_modules/acorn/src/tokencontext.js index 0d144e7c6c..911a51563d 100644 --- a/tools/eslint/node_modules/acorn/src/tokencontext.js +++ b/tools/eslint/node_modules/acorn/src/tokencontext.js @@ -96,7 +96,7 @@ tt.incDec.updateContext = function() { tt._function.updateContext = function(prevType) { if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else && - (prevType !== tt.colon || this.curContext() !== types.b_stat)) + !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat)) this.context.push(types.f_expr) this.exprAllowed = false } diff --git a/tools/eslint/node_modules/acorn/src/tokentype.js b/tools/eslint/node_modules/acorn/src/tokentype.js index 283741ad72..7c36e2d49d 100644 --- a/tools/eslint/node_modules/acorn/src/tokentype.js +++ b/tools/eslint/node_modules/acorn/src/tokentype.js @@ -41,6 +41,16 @@ function binop(name, prec) { } const beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true} +// Map keyword names to token types. + +export const keywords = {} + +// Succinct definitions of keyword token types +function kw(name, options = {}) { + options.keyword = name + return keywords[name] = new TokenType(name, options) +} + export const types = { num: new TokenType("num", startsExpr), regexp: new TokenType("regexp", startsExpr), @@ -96,51 +106,42 @@ export const types = { modulo: binop("%", 10), star: binop("*", 10), slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}) -} - -// Map keyword names to token types. - -export const keywords = {} + starstar: new TokenType("**", {beforeExpr: true}), -// Succinct definitions of keyword token types -function kw(name, options = {}) { - options.keyword = name - keywords[name] = types["_" + name] = new TokenType(name, options) + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class"), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import"), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) } - -kw("break") -kw("case", beforeExpr) -kw("catch") -kw("continue") -kw("debugger") -kw("default", beforeExpr) -kw("do", {isLoop: true, beforeExpr: true}) -kw("else", beforeExpr) -kw("finally") -kw("for", {isLoop: true}) -kw("function", startsExpr) -kw("if") -kw("return", beforeExpr) -kw("switch") -kw("throw", beforeExpr) -kw("try") -kw("var") -kw("const") -kw("while", {isLoop: true}) -kw("with") -kw("new", {beforeExpr: true, startsExpr: true}) -kw("this", startsExpr) -kw("super", startsExpr) -kw("class") -kw("extends", beforeExpr) -kw("export") -kw("import") -kw("null", startsExpr) -kw("true", startsExpr) -kw("false", startsExpr) -kw("in", {beforeExpr: true, binop: 7}) -kw("instanceof", {beforeExpr: true, binop: 7}) -kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}) -kw("void", {beforeExpr: true, prefix: true, startsExpr: true}) -kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) diff --git a/tools/eslint/node_modules/ansi-escapes/package.json b/tools/eslint/node_modules/ansi-escapes/package.json index bc1e21eb89..a3b3fc5065 100644 --- a/tools/eslint/node_modules/ansi-escapes/package.json +++ b/tools/eslint/node_modules/ansi-escapes/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "ansi-escapes@^1.1.0", + { + "raw": "ansi-escapes@^1.1.0", + "scope": null, + "escapedName": "ansi-escapes", + "name": "ansi-escapes", + "rawSpec": "^1.1.0", + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/ansi-escapes-1.4.0.tgz_1460925437568_0.228597579523921" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.0", "_phantomChildren": {}, "_requested": { - "name": "ansi-escapes", "raw": "ansi-escapes@^1.1.0", - "rawSpec": "^1.1.0", "scope": null, + "escapedName": "ansi-escapes", + "name": "ansi-escapes", + "rawSpec": "^1.1.0", "spec": ">=1.1.0 <2.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "ansi-escapes@^1.1.0", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -92,8 +101,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "ansi-escapes", diff --git a/tools/eslint/node_modules/ansi-regex/package.json b/tools/eslint/node_modules/ansi-regex/package.json index 81c4facdb7..fc7f81510e 100644 --- a/tools/eslint/node_modules/ansi-regex/package.json +++ b/tools/eslint/node_modules/ansi-regex/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "ansi-regex@^2.0.0", + { + "raw": "ansi-regex@^2.0.0", + "scope": null, + "escapedName": "ansi-regex", + "name": "ansi-regex", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/has-ansi" ] ], @@ -12,16 +20,17 @@ "_location": "/ansi-regex", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "ansi-regex", "raw": "ansi-regex@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "ansi-regex", + "name": "ansi-regex", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -36,8 +45,8 @@ "_spec": "ansi-regex@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/has-ansi", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -51,7 +60,7 @@ "directories": {}, "dist": { "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", - "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" }, "engines": { "node": ">=0.10.0" @@ -91,12 +100,12 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "name": "jbnicolai", + "email": "jappelman@xebia.com" } ], "name": "ansi-regex", diff --git a/tools/eslint/node_modules/ansi-styles/package.json b/tools/eslint/node_modules/ansi-styles/package.json index 9b0a697571..485c4f6706 100644 --- a/tools/eslint/node_modules/ansi-styles/package.json +++ b/tools/eslint/node_modules/ansi-styles/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "ansi-styles@^2.2.1", + { + "raw": "ansi-styles@^2.2.1", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "^2.2.1", + "spec": ">=2.2.1 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/chalk" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/ansi-styles-2.2.1.tgz_1459197317833_0.9694824463222176" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "3.8.3", "_phantomChildren": {}, "_requested": { - "name": "ansi-styles", "raw": "ansi-styles@^2.2.1", - "rawSpec": "^2.2.1", "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "^2.2.1", "spec": ">=2.2.1 <3.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "ansi-styles@^2.2.1", "_where": "/Users/trott/io.js/tools/node_modules/chalk", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -53,7 +62,7 @@ "directories": {}, "dist": { "shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe", - "tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + "tarball": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" }, "engines": { "node": ">=0.10.0" @@ -88,8 +97,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "ansi-styles", diff --git a/tools/eslint/node_modules/argparse/package.json b/tools/eslint/node_modules/argparse/package.json index e8e94e7b66..86244a6123 100644 --- a/tools/eslint/node_modules/argparse/package.json +++ b/tools/eslint/node_modules/argparse/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "argparse@^1.0.7", + { + "raw": "argparse@^1.0.7", + "scope": null, + "escapedName": "argparse", + "name": "argparse", + "rawSpec": "^1.0.7", + "spec": ">=1.0.7 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/js-yaml" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/argparse-1.0.7.tgz_1458226887302_0.8524546672124416" }, "_npmUser": { - "email": "vitaly@rcdesign.ru", - "name": "vitaly" + "name": "vitaly", + "email": "vitaly@rcdesign.ru" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { - "name": "argparse", "raw": "argparse@^1.0.7", - "rawSpec": "^1.0.7", "scope": null, + "escapedName": "argparse", + "name": "argparse", + "rawSpec": "^1.0.7", "spec": ">=1.0.7 <2.0.0", "type": "range" }, @@ -79,8 +88,8 @@ "license": "MIT", "maintainers": [ { - "email": "vitaly@rcdesign.ru", - "name": "vitaly" + "name": "vitaly", + "email": "vitaly@rcdesign.ru" } ], "name": "argparse", diff --git a/tools/eslint/node_modules/array-union/package.json b/tools/eslint/node_modules/array-union/package.json index f82a5f3d6b..ecb557b5f5 100644 --- a/tools/eslint/node_modules/array-union/package.json +++ b/tools/eslint/node_modules/array-union/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "array-union@^1.0.1", + { + "raw": "array-union@^1.0.1", + "scope": null, + "escapedName": "array-union", + "name": "array-union", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/globby" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/array-union-1.0.2.tgz_1466079411551_0.23353995219804347" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.0", "_phantomChildren": {}, "_requested": { - "name": "array-union", "raw": "array-union@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "array-union", + "name": "array-union", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "array-union@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/globby", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -81,8 +90,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "array-union", diff --git a/tools/eslint/node_modules/array-uniq/package.json b/tools/eslint/node_modules/array-uniq/package.json index 99ff6005af..f270f73827 100644 --- a/tools/eslint/node_modules/array-uniq/package.json +++ b/tools/eslint/node_modules/array-uniq/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "array-uniq@^1.0.1", + { + "raw": "array-uniq@^1.0.1", + "scope": null, + "escapedName": "array-uniq", + "name": "array-uniq", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/array-union" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/array-uniq-1.0.3.tgz_1466079716839_0.9139188586268574" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.0", "_phantomChildren": {}, "_requested": { - "name": "array-uniq", "raw": "array-uniq@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "array-uniq", + "name": "array-uniq", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "array-uniq@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/array-union", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -79,8 +88,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "array-uniq", diff --git a/tools/eslint/node_modules/arrify/package.json b/tools/eslint/node_modules/arrify/package.json index 6f90371fbf..e25e31f7cb 100644 --- a/tools/eslint/node_modules/arrify/package.json +++ b/tools/eslint/node_modules/arrify/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "arrify@^1.0.0", + { + "raw": "arrify@^1.0.0", + "scope": null, + "escapedName": "arrify", + "name": "arrify", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/globby" ] ], @@ -12,16 +20,17 @@ "_location": "/arrify", "_nodeVersion": "4.2.1", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "3.5.2", "_phantomChildren": {}, "_requested": { - "name": "arrify", "raw": "arrify@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "arrify", + "name": "arrify", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "arrify@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/globby", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -50,7 +59,7 @@ "directories": {}, "dist": { "shasum": "898508da2226f380df904728456849c1501a4b0d", - "tarball": "http://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + "tarball": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" }, "engines": { "node": ">=0.10.0" @@ -71,8 +80,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "arrify", diff --git a/tools/eslint/node_modules/balanced-match/README.md b/tools/eslint/node_modules/balanced-match/README.md index d6880b2f36..08e918c0db 100644 --- a/tools/eslint/node_modules/balanced-match/README.md +++ b/tools/eslint/node_modules/balanced-match/README.md @@ -47,7 +47,7 @@ object with those keys: If there's no match, `undefined` will be returned. -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`. +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. ### var r = balanced.range(a, b, str) @@ -56,7 +56,7 @@ array with indexes: `[ <a index>, <b index> ]`. If there's no match, `undefined` will be returned. -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`. +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. ## Installation diff --git a/tools/eslint/node_modules/balanced-match/index.js b/tools/eslint/node_modules/balanced-match/index.js index 4670f7f79f..e8d8587020 100644 --- a/tools/eslint/node_modules/balanced-match/index.js +++ b/tools/eslint/node_modules/balanced-match/index.js @@ -30,7 +30,7 @@ function range(a, b, str) { begs = []; left = str.length; - while (i < str.length && i >= 0 && ! result) { + while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str.indexOf(a, i + 1); diff --git a/tools/eslint/node_modules/balanced-match/package.json b/tools/eslint/node_modules/balanced-match/package.json index 2e8b67141d..1e15de116f 100644 --- a/tools/eslint/node_modules/balanced-match/package.json +++ b/tools/eslint/node_modules/balanced-match/package.json @@ -1,45 +1,54 @@ { "_args": [ [ - "balanced-match@^0.4.1", + { + "raw": "balanced-match@^0.4.1", + "scope": null, + "escapedName": "balanced-match", + "name": "balanced-match", + "rawSpec": "^0.4.1", + "spec": ">=0.4.1 <0.5.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/brace-expansion" ] ], "_from": "balanced-match@>=0.4.1 <0.5.0", - "_id": "balanced-match@0.4.1", + "_id": "balanced-match@0.4.2", "_inCache": true, "_installable": true, "_location": "/balanced-match", - "_nodeVersion": "6.0.0", + "_nodeVersion": "4.4.7", "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572" }, "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, - "_npmVersion": "3.8.6", + "_npmVersion": "2.15.8", "_phantomChildren": {}, "_requested": { - "name": "balanced-match", "raw": "balanced-match@^0.4.1", - "rawSpec": "^0.4.1", "scope": null, + "escapedName": "balanced-match", + "name": "balanced-match", + "rawSpec": "^0.4.1", "spec": ">=0.4.1 <0.5.0", "type": "range" }, "_requiredBy": [ "/brace-expansion" ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz", - "_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335", + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", "_shrinkwrap": null, "_spec": "balanced-match@^0.4.1", "_where": "/Users/trott/io.js/tools/node_modules/brace-expansion", "author": { - "email": "mail@juliangruber.com", "name": "Julian Gruber", + "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "bugs": { @@ -48,14 +57,14 @@ "dependencies": {}, "description": "Match balanced character pairs, like \"{\" and \"}\"", "devDependencies": { - "tape": "~4.5.0" + "tape": "^4.6.0" }, "directories": {}, "dist": { - "shasum": "19053e2e0748eadb379da6c09d455cf5e1039335", - "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz" + "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", + "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" }, - "gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863", + "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2", "homepage": "https://github.com/juliangruber/balanced-match", "keywords": [ "match", @@ -68,8 +77,8 @@ "main": "index.js", "maintainers": [ { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" } ], "name": "balanced-match", @@ -83,6 +92,7 @@ "test": "make test" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/20..latest", @@ -95,8 +105,7 @@ "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" - ], - "files": "test/*.js" + ] }, - "version": "0.4.1" + "version": "0.4.2" } diff --git a/tools/eslint/node_modules/bluebird/package.json b/tools/eslint/node_modules/bluebird/package.json index 5b46128bc0..56ab6e32b3 100644 --- a/tools/eslint/node_modules/bluebird/package.json +++ b/tools/eslint/node_modules/bluebird/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "bluebird@^3.1.1", + { + "raw": "bluebird@^3.1.1", + "scope": null, + "escapedName": "bluebird", + "name": "bluebird", + "rawSpec": "^3.1.1", + "spec": ">=3.1.1 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/table" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/bluebird-3.4.1.tgz_1466192624169_0.8191918630618602" }, "_npmUser": { - "email": "petka_antonov@hotmail.com", - "name": "esailija" + "name": "esailija", + "email": "petka_antonov@hotmail.com" }, "_npmVersion": "3.6.0", "_phantomChildren": {}, "_requested": { - "name": "bluebird", "raw": "bluebird@^3.1.1", - "rawSpec": "^3.1.1", "scope": null, + "escapedName": "bluebird", + "name": "bluebird", + "rawSpec": "^3.1.1", "spec": ">=3.1.1 <4.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "bluebird@^3.1.1", "_where": "/Users/trott/io.js/tools/node_modules/table", "author": { - "email": "petka_antonov@hotmail.com", "name": "Petka Antonov", + "email": "petka_antonov@hotmail.com", "url": "http://github.com/petkaantonov/" }, "browser": "./js/browser/bluebird.js", @@ -105,8 +114,8 @@ "main": "./js/release/bluebird.js", "maintainers": [ { - "email": "petka_antonov@hotmail.com", - "name": "esailija" + "name": "esailija", + "email": "petka_antonov@hotmail.com" } ], "name": "bluebird", diff --git a/tools/eslint/node_modules/brace-expansion/index.js b/tools/eslint/node_modules/brace-expansion/index.js index 932718f928..955f27c817 100644 --- a/tools/eslint/node_modules/brace-expansion/index.js +++ b/tools/eslint/node_modules/brace-expansion/index.js @@ -66,6 +66,16 @@ function expandTop(str) { if (!str) return []; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); } diff --git a/tools/eslint/node_modules/brace-expansion/package.json b/tools/eslint/node_modules/brace-expansion/package.json index 9a8f29f973..8073d9549f 100644 --- a/tools/eslint/node_modules/brace-expansion/package.json +++ b/tools/eslint/node_modules/brace-expansion/package.json @@ -1,45 +1,54 @@ { "_args": [ [ - "brace-expansion@^1.0.0", + { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/minimatch" ] ], "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_id": "brace-expansion@1.1.5", + "_id": "brace-expansion@1.1.6", "_inCache": true, "_installable": true, "_location": "/brace-expansion", - "_nodeVersion": "4.4.5", + "_nodeVersion": "4.4.7", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/brace-expansion-1.1.5.tgz_1465989660138_0.34528115345165133" + "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428" }, "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, - "_npmVersion": "2.15.5", + "_npmVersion": "2.15.8", "_phantomChildren": {}, "_requested": { - "name": "brace-expansion", "raw": "brace-expansion@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/minimatch" ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz", - "_shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526", + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", "_shrinkwrap": null, "_spec": "brace-expansion@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/minimatch", "author": { - "email": "mail@juliangruber.com", "name": "Julian Gruber", + "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "bugs": { @@ -51,26 +60,26 @@ }, "description": "Brace expansion as known from sh/bash", "devDependencies": { - "tape": "4.5.1" + "tape": "^4.6.0" }, "directories": {}, "dist": { - "shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526", - "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz" + "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" }, - "gitHead": "ff31acab078f1bb696ac4c55ca56ea24e6495fb6", + "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2", "homepage": "https://github.com/juliangruber/brace-expansion", "keywords": [], "license": "MIT", "main": "index.js", "maintainers": [ { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, { - "email": "isaacs@npmjs.com", - "name": "isaacs" + "name": "isaacs", + "email": "isaacs@npmjs.com" } ], "name": "brace-expansion", @@ -85,6 +94,7 @@ "test": "tape test/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/20..latest", @@ -97,8 +107,7 @@ "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" - ], - "files": "test/*.js" + ] }, - "version": "1.1.5" + "version": "1.1.6" } diff --git a/tools/eslint/node_modules/caller-path/package.json b/tools/eslint/node_modules/caller-path/package.json index b58a29e666..21028e0b77 100644 --- a/tools/eslint/node_modules/caller-path/package.json +++ b/tools/eslint/node_modules/caller-path/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "caller-path@^0.1.0", + { + "raw": "caller-path@^0.1.0", + "scope": null, + "escapedName": "caller-path", + "name": "caller-path", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/require-uncached" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/caller-path", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "1.4.6", "_phantomChildren": {}, "_requested": { - "name": "caller-path", "raw": "caller-path@^0.1.0", - "rawSpec": "^0.1.0", "scope": null, + "escapedName": "caller-path", + "name": "caller-path", + "rawSpec": "^0.1.0", "spec": ">=0.1.0 <0.2.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "caller-path@^0.1.0", "_where": "/Users/trott/io.js/tools/node_modules/require-uncached", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -76,8 +85,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "caller-path", diff --git a/tools/eslint/node_modules/callsites/package.json b/tools/eslint/node_modules/callsites/package.json index 494a20422c..a497ebcb7a 100644 --- a/tools/eslint/node_modules/callsites/package.json +++ b/tools/eslint/node_modules/callsites/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "callsites@^0.2.0", + { + "raw": "callsites@^0.2.0", + "scope": null, + "escapedName": "callsites", + "name": "callsites", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/caller-path" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/callsites", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "1.4.6", "_phantomChildren": {}, "_requested": { - "name": "callsites", "raw": "callsites@^0.2.0", - "rawSpec": "^0.2.0", "scope": null, + "escapedName": "callsites", + "name": "callsites", + "rawSpec": "^0.2.0", "spec": ">=0.2.0 <0.3.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "callsites@^0.2.0", "_where": "/Users/trott/io.js/tools/node_modules/caller-path", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -72,8 +81,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "callsites", diff --git a/tools/eslint/node_modules/chalk/package.json b/tools/eslint/node_modules/chalk/package.json index 310c22ce48..ba8e53a66a 100644 --- a/tools/eslint/node_modules/chalk/package.json +++ b/tools/eslint/node_modules/chalk/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "chalk@^1.1.3", + { + "raw": "chalk@^1.1.3", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^1.1.3", + "spec": ">=1.1.3 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/chalk-1.1.3.tgz_1459210604109_0.3892582862172276" }, "_npmUser": { - "email": "i.am.qix@gmail.com", - "name": "qix" + "name": "qix", + "email": "i.am.qix@gmail.com" }, "_npmVersion": "2.14.2", "_phantomChildren": {}, "_requested": { - "name": "chalk", "raw": "chalk@^1.1.3", - "rawSpec": "^1.1.3", "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^1.1.3", "spec": ">=1.1.3 <2.0.0", "type": "range" }, @@ -99,16 +108,16 @@ "license": "MIT", "maintainers": [ { - "email": "i.am.qix@gmail.com", - "name": "qix" + "name": "qix", + "email": "i.am.qix@gmail.com" }, { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "sindresorhus+unicorn@gmail.com", - "name": "unicorn" + "name": "unicorn", + "email": "sindresorhus+unicorn@gmail.com" } ], "name": "chalk", diff --git a/tools/eslint/node_modules/circular-json/LICENSE.txt b/tools/eslint/node_modules/circular-json/LICENSE.txt new file mode 100644 index 0000000000..468a071cc0 --- /dev/null +++ b/tools/eslint/node_modules/circular-json/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2013 by WebReflection + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tools/eslint/node_modules/circular-json/README.md b/tools/eslint/node_modules/circular-json/README.md new file mode 100644 index 0000000000..ad0d6eca9c --- /dev/null +++ b/tools/eslint/node_modules/circular-json/README.md @@ -0,0 +1,135 @@ +CircularJSON +============ + +[![build status](https://secure.travis-ci.org/WebReflection/circular-json.png)](http://travis-ci.org/WebReflection/circular-json) + +Serializes and deserializes otherwise valid JSON objects containing circular references into and from a specialized JSON format. + +Example +===== + +### A Working Solution To A Common Problem +A usage example: + +```JavaScript +var object = {}; +object.arr = [ + object, object +]; +object.arr.push(object.arr); +object.obj = object; + +var serialized = CircularJSON.stringify(object); +// '{"arr":["~","~","~arr"],"obj":"~"}' +// NOTE: CircularJSON DOES NOT parse JS +// it handles receiver and reviver callbacks + +var unserialized = CircularJSON.parse(serialized); +// { arr: [ [Circular], [Circular] ], +// obj: [Circular] } + +unserialized.obj === unserialized; +unserialized.arr[0] === unserialized; +unserialized.arr.pop() === unserialized.arr; +``` + +A quick summary: + + * uses `~` as a special prefix symbol to denote which parent the reference belongs to (i.e. `~root~child1~child2`) + * reasonably fast in both serialization and deserialization + * compact serialization for easier and slimmer transportation across environments + * [tested and covered](test/circular-json.js) over nasty structures too + * compatible with all JavaScript engines + +Node Installation & Usage +============ + +```bash +npm install --save circular-json +``` + +```javascript +'use strict'; + +var CircularJSON = require('circular-json') + , obj = { foo: 'bar' } + , str + ; + +obj.self = obj; +str = CircularJSON.stringify(obj); +``` + +There are no dependencies. + +Browser Installation & Usage +================ + +* Global: <build/circular-json.js> +* AMD: <build/circular-json.amd.js> +* CommonJS: <build/circular-json.node.js> + +(generated via [gitstrap](https://github.com/WebReflection/gitstrap)) + +```html +<script src="build/circular-json.js"></script> +``` + +```javascript +'use strict'; + +var CircularJSON = window.CircularJSON + , obj = { foo: 'bar' } + , str + ; + +obj.self = obj; +str = CircularJSON.stringify(obj); +``` + +NOTE: Platforms without native JSON (i.e. MSIE <= 8) requires `json3.js` or similar. + +It is also *a bad idea* to `CircularJSON.parse(JSON.stringify(object))` because of those manipulation used in `CircularJSON.stringify()` able to make parsing safe and secure. + +As summary: `CircularJSON.parse(CircularJSON.stringify(object))` is the way to go, same is for `JSON.parse(JSON.stringify(object))`. + +API +=== + +It's the same as native JSON, except the fourth parameter `placeholder`, which circular references to be replaced with `"[Circular]"` (i.e. for logging). + +* CircularJSON.stringify(object, replacer, spacer, placeholder) +* CircularJSON.parse(string, reviver) + +Bear in mind `JSON.parse(CircularJSON.stringify(object))` will work but not produce the expected output. + +Similar Libraries +======= + +### Why Not the [@izs](https://twitter.com/izs) One +The module [json-stringify-safe](https://github.com/isaacs/json-stringify-safe) seems to be for `console.log()` but it's completely pointless for `JSON.parse()`, being latter one unable to retrieve back the initial structure. Here an example: + +```JavaScript +// a logged object with circular references +{ + "circularRef": "[Circular]", + "list": [ + "[Circular]", + "[Circular]" + ] +} +// what do we do with above output ? +``` + +Just type this in your `node` console: `var o = {}; o.a = o; console.log(o);`. The output will be `{ a: [Circular] }` ... good, but that ain't really solving the problem. + +However, if that's all you need, the function used to create that kind of output is probably faster than `CircularJSON` and surely fits in less lines of code. + + +### Why Not {{put random name}} Solution +So here the thing: circular references can be wrong but, if there is a need for them, any attempt to ignore them or remove them can be considered just a failure. + +Not because the method is bad or it's not working, simply because the circular info, the one we needed and used in the first place, is lost! + +In this case, `CircularJSON` does even more than just solve circular and recursions: it maps all same objects so that less memory is used as well on deserialization as less bandwidth too! +It's able to redefine those references back later on so the way we store is the way we retrieve and in a reasonably performant way, also trusting the snappy and native `JSON` methods to iterate. diff --git a/tools/eslint/node_modules/circular-json/build/circular-json.js b/tools/eslint/node_modules/circular-json/build/circular-json.js new file mode 100644 index 0000000000..acf1c2599e --- /dev/null +++ b/tools/eslint/node_modules/circular-json/build/circular-json.js @@ -0,0 +1,2 @@ +/*! (C) WebReflection Mit Style License */ +var CircularJSON=function(e,t){function l(e,t,o){var u=[],f=[e],l=[e],c=[o?n:"[Circular]"],h=e,p=1,d;return function(e,v){return t&&(v=t.call(this,e,v)),e!==""&&(h!==this&&(d=p-a.call(f,this)-1,p-=d,f.splice(p,f.length),u.splice(p-1,u.length),h=this),typeof v=="object"&&v?(a.call(f,v)<0&&f.push(h=v),p=f.length,d=a.call(l,v),d<0?(d=l.push(v)-1,o?(u.push((""+e).replace(s,r)),c[d]=n+u.join(n)):c[d]=c[0]):v=c[d]):typeof v=="string"&&o&&(v=v.replace(r,i).replace(n,r))),v}}function c(e,t){for(var r=0,i=t.length;r<i;e=e[t[r++].replace(o,n)]);return e}function h(e){return function(t,s){var o=typeof s=="string";return o&&s.charAt(0)===n?new f(s.slice(1)):(t===""&&(s=v(s,s,{})),o&&(s=s.replace(u,"$1"+n).replace(i,r)),e?e.call(this,t,s):s)}}function p(e,t,n){for(var r=0,i=t.length;r<i;r++)t[r]=v(e,t[r],n);return t}function d(e,t,n){for(var r in t)t.hasOwnProperty(r)&&(t[r]=v(e,t[r],n));return t}function v(e,t,r){return t instanceof Array?p(e,t,r):t instanceof f?t.length?r.hasOwnProperty(t)?r[t]:r[t]=c(e,t.split(n)):e:t instanceof Object?d(e,t,r):t}function m(t,n,r,i){return e.stringify(t,l(t,n,!i),r)}function g(t,n){return e.parse(t,h(n))}var n="~",r="\\x"+("0"+n.charCodeAt(0).toString(16)).slice(-2),i="\\"+r,s=new t(r,"g"),o=new t(i,"g"),u=new t("(?:^|([^\\\\]))"+i),a=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},f=String;return{stringify:m,parse:g}}(JSON,RegExp);
\ No newline at end of file diff --git a/tools/eslint/node_modules/circular-json/build/circular-json.max.js b/tools/eslint/node_modules/circular-json/build/circular-json.max.js new file mode 100644 index 0000000000..5ad5ffad85 --- /dev/null +++ b/tools/eslint/node_modules/circular-json/build/circular-json.max.js @@ -0,0 +1,189 @@ +/*! +Copyright (C) 2013 by WebReflection + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ +var CircularJSON = (function(JSON, RegExp){ +var + // should be a not so common char + // possibly one JSON does not encode + // possibly one encodeURIComponent does not encode + // right now this char is '~' but this might change in the future + specialChar = '~', + safeSpecialChar = '\\x' + ( + '0' + specialChar.charCodeAt(0).toString(16) + ).slice(-2), + escapedSafeSpecialChar = '\\' + safeSpecialChar, + specialCharRG = new RegExp(safeSpecialChar, 'g'), + safeSpecialCharRG = new RegExp(escapedSafeSpecialChar, 'g'), + + safeStartWithSpecialCharRG = new RegExp('(?:^|([^\\\\]))' + escapedSafeSpecialChar), + + indexOf = [].indexOf || function(v){ + for(var i=this.length;i--&&this[i]!==v;); + return i; + }, + $String = String // there's no way to drop warnings in JSHint + // about new String ... well, I need that here! + // faked, and happy linter! +; + +function generateReplacer(value, replacer, resolve) { + var + path = [], + all = [value], + seen = [value], + mapp = [resolve ? specialChar : '[Circular]'], + last = value, + lvl = 1, + i + ; + return function(key, value) { + // the replacer has rights to decide + // if a new object should be returned + // or if there's some key to drop + // let's call it here rather than "too late" + if (replacer) value = replacer.call(this, key, value); + + // did you know ? Safari passes keys as integers for arrays + // which means if (key) when key === 0 won't pass the check + if (key !== '') { + if (last !== this) { + i = lvl - indexOf.call(all, this) - 1; + lvl -= i; + all.splice(lvl, all.length); + path.splice(lvl - 1, path.length); + last = this; + } + // console.log(lvl, key, path); + if (typeof value === 'object' && value) { + // if object isn't referring to parent object, add to the + // object path stack. Otherwise it is already there. + if (indexOf.call(all, value) < 0) { + all.push(last = value); + } + lvl = all.length; + i = indexOf.call(seen, value); + if (i < 0) { + i = seen.push(value) - 1; + if (resolve) { + // key cannot contain specialChar but could be not a string + path.push(('' + key).replace(specialCharRG, safeSpecialChar)); + mapp[i] = specialChar + path.join(specialChar); + } else { + mapp[i] = mapp[0]; + } + } else { + value = mapp[i]; + } + } else { + if (typeof value === 'string' && resolve) { + // ensure no special char involved on deserialization + // in this case only first char is important + // no need to replace all value (better performance) + value = value .replace(safeSpecialChar, escapedSafeSpecialChar) + .replace(specialChar, safeSpecialChar); + } + } + } + return value; + }; +} + +function retrieveFromPath(current, keys) { + for(var i = 0, length = keys.length; i < length; current = current[ + // keys should be normalized back here + keys[i++].replace(safeSpecialCharRG, specialChar) + ]); + return current; +} + +function generateReviver(reviver) { + return function(key, value) { + var isString = typeof value === 'string'; + if (isString && value.charAt(0) === specialChar) { + return new $String(value.slice(1)); + } + if (key === '') value = regenerate(value, value, {}); + // again, only one needed, do not use the RegExp for this replacement + // only keys need the RegExp + if (isString) value = value .replace(safeStartWithSpecialCharRG, '$1' + specialChar) + .replace(escapedSafeSpecialChar, safeSpecialChar); + return reviver ? reviver.call(this, key, value) : value; + }; +} + +function regenerateArray(root, current, retrieve) { + for (var i = 0, length = current.length; i < length; i++) { + current[i] = regenerate(root, current[i], retrieve); + } + return current; +} + +function regenerateObject(root, current, retrieve) { + for (var key in current) { + if (current.hasOwnProperty(key)) { + current[key] = regenerate(root, current[key], retrieve); + } + } + return current; +} + +function regenerate(root, current, retrieve) { + return current instanceof Array ? + // fast Array reconstruction + regenerateArray(root, current, retrieve) : + ( + current instanceof $String ? + ( + // root is an empty string + current.length ? + ( + retrieve.hasOwnProperty(current) ? + retrieve[current] : + retrieve[current] = retrieveFromPath( + root, current.split(specialChar) + ) + ) : + root + ) : + ( + current instanceof Object ? + // dedicated Object parser + regenerateObject(root, current, retrieve) : + // value as it is + current + ) + ) + ; +} + +function stringifyRecursion(value, replacer, space, doNotResolve) { + return JSON.stringify(value, generateReplacer(value, replacer, !doNotResolve), space); +} + +function parseRecursion(text, reviver) { + return JSON.parse(text, generateReviver(reviver)); +} +return { + stringify: stringifyRecursion, + parse: parseRecursion +}; +}(JSON, RegExp));
\ No newline at end of file diff --git a/tools/eslint/node_modules/circular-json/build/circular-json.node.js b/tools/eslint/node_modules/circular-json/build/circular-json.node.js new file mode 100644 index 0000000000..576266fe65 --- /dev/null +++ b/tools/eslint/node_modules/circular-json/build/circular-json.node.js @@ -0,0 +1,185 @@ +/*! +Copyright (C) 2013 by WebReflection + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ +var + // should be a not so common char + // possibly one JSON does not encode + // possibly one encodeURIComponent does not encode + // right now this char is '~' but this might change in the future + specialChar = '~', + safeSpecialChar = '\\x' + ( + '0' + specialChar.charCodeAt(0).toString(16) + ).slice(-2), + escapedSafeSpecialChar = '\\' + safeSpecialChar, + specialCharRG = new RegExp(safeSpecialChar, 'g'), + safeSpecialCharRG = new RegExp(escapedSafeSpecialChar, 'g'), + + safeStartWithSpecialCharRG = new RegExp('(?:^|([^\\\\]))' + escapedSafeSpecialChar), + + indexOf = [].indexOf || function(v){ + for(var i=this.length;i--&&this[i]!==v;); + return i; + }, + $String = String // there's no way to drop warnings in JSHint + // about new String ... well, I need that here! + // faked, and happy linter! +; + +function generateReplacer(value, replacer, resolve) { + var + path = [], + all = [value], + seen = [value], + mapp = [resolve ? specialChar : '[Circular]'], + last = value, + lvl = 1, + i + ; + return function(key, value) { + // the replacer has rights to decide + // if a new object should be returned + // or if there's some key to drop + // let's call it here rather than "too late" + if (replacer) value = replacer.call(this, key, value); + + // did you know ? Safari passes keys as integers for arrays + // which means if (key) when key === 0 won't pass the check + if (key !== '') { + if (last !== this) { + i = lvl - indexOf.call(all, this) - 1; + lvl -= i; + all.splice(lvl, all.length); + path.splice(lvl - 1, path.length); + last = this; + } + // console.log(lvl, key, path); + if (typeof value === 'object' && value) { + // if object isn't referring to parent object, add to the + // object path stack. Otherwise it is already there. + if (indexOf.call(all, value) < 0) { + all.push(last = value); + } + lvl = all.length; + i = indexOf.call(seen, value); + if (i < 0) { + i = seen.push(value) - 1; + if (resolve) { + // key cannot contain specialChar but could be not a string + path.push(('' + key).replace(specialCharRG, safeSpecialChar)); + mapp[i] = specialChar + path.join(specialChar); + } else { + mapp[i] = mapp[0]; + } + } else { + value = mapp[i]; + } + } else { + if (typeof value === 'string' && resolve) { + // ensure no special char involved on deserialization + // in this case only first char is important + // no need to replace all value (better performance) + value = value .replace(safeSpecialChar, escapedSafeSpecialChar) + .replace(specialChar, safeSpecialChar); + } + } + } + return value; + }; +} + +function retrieveFromPath(current, keys) { + for(var i = 0, length = keys.length; i < length; current = current[ + // keys should be normalized back here + keys[i++].replace(safeSpecialCharRG, specialChar) + ]); + return current; +} + +function generateReviver(reviver) { + return function(key, value) { + var isString = typeof value === 'string'; + if (isString && value.charAt(0) === specialChar) { + return new $String(value.slice(1)); + } + if (key === '') value = regenerate(value, value, {}); + // again, only one needed, do not use the RegExp for this replacement + // only keys need the RegExp + if (isString) value = value .replace(safeStartWithSpecialCharRG, '$1' + specialChar) + .replace(escapedSafeSpecialChar, safeSpecialChar); + return reviver ? reviver.call(this, key, value) : value; + }; +} + +function regenerateArray(root, current, retrieve) { + for (var i = 0, length = current.length; i < length; i++) { + current[i] = regenerate(root, current[i], retrieve); + } + return current; +} + +function regenerateObject(root, current, retrieve) { + for (var key in current) { + if (current.hasOwnProperty(key)) { + current[key] = regenerate(root, current[key], retrieve); + } + } + return current; +} + +function regenerate(root, current, retrieve) { + return current instanceof Array ? + // fast Array reconstruction + regenerateArray(root, current, retrieve) : + ( + current instanceof $String ? + ( + // root is an empty string + current.length ? + ( + retrieve.hasOwnProperty(current) ? + retrieve[current] : + retrieve[current] = retrieveFromPath( + root, current.split(specialChar) + ) + ) : + root + ) : + ( + current instanceof Object ? + // dedicated Object parser + regenerateObject(root, current, retrieve) : + // value as it is + current + ) + ) + ; +} + +function stringifyRecursion(value, replacer, space, doNotResolve) { + return JSON.stringify(value, generateReplacer(value, replacer, !doNotResolve), space); +} + +function parseRecursion(text, reviver) { + return JSON.parse(text, generateReviver(reviver)); +} +this.stringify = stringifyRecursion; +this.parse = parseRecursion;
\ No newline at end of file diff --git a/tools/eslint/node_modules/circular-json/package.json b/tools/eslint/node_modules/circular-json/package.json new file mode 100644 index 0000000000..7b1290514e --- /dev/null +++ b/tools/eslint/node_modules/circular-json/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "circular-json@^0.3.0", + "scope": null, + "escapedName": "circular-json", + "name": "circular-json", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/Users/trott/io.js/tools/node_modules/flat-cache" + ] + ], + "_from": "circular-json@>=0.3.0 <0.4.0", + "_id": "circular-json@0.3.1", + "_inCache": true, + "_installable": true, + "_location": "/circular-json", + "_nodeVersion": "6.3.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/circular-json-0.3.1.tgz_1470074424027_0.9458420514129102" + }, + "_npmUser": { + "name": "webreflection", + "email": "andrea.giammarchi@gmail.com" + }, + "_npmVersion": "3.10.5", + "_phantomChildren": {}, + "_requested": { + "raw": "circular-json@^0.3.0", + "scope": null, + "escapedName": "circular-json", + "name": "circular-json", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/flat-cache" + ], + "_resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz", + "_shasum": "be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d", + "_shrinkwrap": null, + "_spec": "circular-json@^0.3.0", + "_where": "/Users/trott/io.js/tools/node_modules/flat-cache", + "author": { + "name": "Andrea Giammarchi", + "url": "http://webreflection.blogspot.com/" + }, + "bugs": { + "url": "https://github.com/WebReflection/circular-json/issues" + }, + "dependencies": {}, + "description": "JSON does not handle circular references. This version does", + "devDependencies": { + "wru": "*" + }, + "directories": {}, + "dist": { + "shasum": "be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d", + "tarball": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz" + }, + "generator": "https://github.com/WebReflection/gitstrap", + "gitHead": "54e5be62cf7f8b761ad120ea7a986da7fbffa5b9", + "homepage": "https://github.com/WebReflection/circular-json", + "keywords": [ + "JSON", + "circular", + "reference", + "recursive", + "recursion", + "parse", + "stringify" + ], + "license": "MIT", + "main": "./build/circular-json.node.js", + "maintainers": [ + { + "name": "webreflection", + "email": "andrea.giammarchi@gmail.com" + } + ], + "name": "circular-json", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/WebReflection/circular-json.git" + }, + "scripts": { + "test": "node test/.test.js" + }, + "version": "0.3.1" +} diff --git a/tools/eslint/node_modules/circular-json/template/license.after b/tools/eslint/node_modules/circular-json/template/license.after new file mode 100644 index 0000000000..d7365df165 --- /dev/null +++ b/tools/eslint/node_modules/circular-json/template/license.after @@ -0,0 +1,2 @@ + +*/ diff --git a/tools/eslint/node_modules/circular-json/template/license.before b/tools/eslint/node_modules/circular-json/template/license.before new file mode 100644 index 0000000000..bf11147bdb --- /dev/null +++ b/tools/eslint/node_modules/circular-json/template/license.before @@ -0,0 +1 @@ +/*! diff --git a/tools/eslint/node_modules/cli-cursor/package.json b/tools/eslint/node_modules/cli-cursor/package.json index dc4835baa0..3b1995eb4a 100644 --- a/tools/eslint/node_modules/cli-cursor/package.json +++ b/tools/eslint/node_modules/cli-cursor/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "cli-cursor@^1.0.1", + { + "raw": "cli-cursor@^1.0.1", + "scope": null, + "escapedName": "cli-cursor", + "name": "cli-cursor", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -12,16 +20,17 @@ "_location": "/cli-cursor", "_nodeVersion": "4.1.0", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.14.3", "_phantomChildren": {}, "_requested": { - "name": "cli-cursor", "raw": "cli-cursor@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "cli-cursor", + "name": "cli-cursor", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "cli-cursor@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -80,8 +89,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "cli-cursor", diff --git a/tools/eslint/node_modules/cli-width/package.json b/tools/eslint/node_modules/cli-width/package.json index 3edbc4806f..57d073576d 100644 --- a/tools/eslint/node_modules/cli-width/package.json +++ b/tools/eslint/node_modules/cli-width/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "cli-width@^2.0.0", + { + "raw": "cli-width@^2.0.0", + "scope": null, + "escapedName": "cli-width", + "name": "cli-width", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/cli-width-2.1.0.tgz_1455570612101_0.2879865295253694" }, "_npmUser": { - "email": "ilya@burstcreations.com", - "name": "knownasilya" + "name": "knownasilya", + "email": "ilya@burstcreations.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { - "name": "cli-width", "raw": "cli-width@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "cli-width", + "name": "cli-width", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "cli-width@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "ilya@burstcreations.com", - "name": "Ilya Radchenko" + "name": "Ilya Radchenko", + "email": "ilya@burstcreations.com" }, "bugs": { "url": "https://github.com/knownasilya/cli-width/issues" @@ -56,7 +65,7 @@ "directories": {}, "dist": { "shasum": "b234ca209b29ef66fc518d9b98d5847b00edf00a", - "tarball": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz" + "tarball": "http://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz" }, "gitHead": "c9506fd74bd3863ff327f8f8892601fa4ac2dbb3", "homepage": "https://github.com/knownasilya/cli-width", @@ -64,8 +73,8 @@ "main": "index.js", "maintainers": [ { - "email": "ilya@burstcreations.com", - "name": "knownasilya" + "name": "knownasilya", + "email": "ilya@burstcreations.com" } ], "name": "cli-width", diff --git a/tools/eslint/node_modules/code-point-at/package.json b/tools/eslint/node_modules/code-point-at/package.json index 19d38f9668..f749becd6b 100644 --- a/tools/eslint/node_modules/code-point-at/package.json +++ b/tools/eslint/node_modules/code-point-at/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "code-point-at@^1.0.0", + { + "raw": "code-point-at@^1.0.0", + "scope": null, + "escapedName": "code-point-at", + "name": "code-point-at", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/readline2" ] ], @@ -12,16 +20,17 @@ "_location": "/code-point-at", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "code-point-at", "raw": "code-point-at@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "code-point-at", + "name": "code-point-at", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "code-point-at@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/readline2", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -79,8 +88,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "code-point-at", diff --git a/tools/eslint/node_modules/concat-map/package.json b/tools/eslint/node_modules/concat-map/package.json index c9474a109d..74476a28b4 100644 --- a/tools/eslint/node_modules/concat-map/package.json +++ b/tools/eslint/node_modules/concat-map/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "concat-map@0.0.1", + { + "raw": "concat-map@0.0.1", + "scope": null, + "escapedName": "concat-map", + "name": "concat-map", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, "/Users/trott/io.js/tools/node_modules/brace-expansion" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/concat-map", "_npmUser": { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" }, "_npmVersion": "1.3.21", "_phantomChildren": {}, "_requested": { - "name": "concat-map", "raw": "concat-map@0.0.1", - "rawSpec": "0.0.1", "scope": null, + "escapedName": "concat-map", + "name": "concat-map", + "rawSpec": "0.0.1", "spec": "0.0.1", "type": "version" }, @@ -33,8 +42,8 @@ "_spec": "concat-map@0.0.1", "_where": "/Users/trott/io.js/tools/node_modules/brace-expansion", "author": { - "email": "mail@substack.net", "name": "James Halliday", + "email": "mail@substack.net", "url": "http://substack.net" }, "bugs": { @@ -65,8 +74,8 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "concat-map", @@ -80,30 +89,30 @@ "test": "tape test/*.js" }, "testling": { + "files": "test/*.js", "browsers": { - "chrome": [ - 10, - 22 - ], - "ff": [ - 3.5, - 10, - 15 - ], "ie": [ 6, 7, 8, 9 ], - "opera": [ - 12 + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 ], "safari": [ 5.1 + ], + "opera": [ + 12 ] - }, - "files": "test/*.js" + } }, "version": "0.0.1" } diff --git a/tools/eslint/node_modules/concat-stream/package.json b/tools/eslint/node_modules/concat-stream/package.json index 99e9fe9a96..a0ddfc105f 100644 --- a/tools/eslint/node_modules/concat-stream/package.json +++ b/tools/eslint/node_modules/concat-stream/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "concat-stream@^1.4.6", + { + "raw": "concat-stream@^1.4.6", + "scope": null, + "escapedName": "concat-stream", + "name": "concat-stream", + "rawSpec": "^1.4.6", + "spec": ">=1.4.6 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/concat-stream", "_nodeVersion": "4.0.0", "_npmUser": { - "email": "max@maxogden.com", - "name": "maxogden" + "name": "maxogden", + "email": "max@maxogden.com" }, "_npmVersion": "2.14.2", "_phantomChildren": {}, "_requested": { - "name": "concat-stream", "raw": "concat-stream@^1.4.6", - "rawSpec": "^1.4.6", "scope": null, + "escapedName": "concat-stream", + "name": "concat-stream", + "rawSpec": "^1.4.6", "spec": ">=1.4.6 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "concat-stream@^1.4.6", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "max@maxogden.com", - "name": "Max Ogden" + "name": "Max Ogden", + "email": "max@maxogden.com" }, "bugs": { "url": "http://github.com/maxogden/concat-stream/issues" @@ -66,8 +75,8 @@ "main": "index.js", "maintainers": [ { - "email": "max@maxogden.com", - "name": "maxogden" + "name": "maxogden", + "email": "max@maxogden.com" } ], "name": "concat-stream", @@ -87,6 +96,7 @@ "utility" ], "testling": { + "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/17..latest", @@ -99,8 +109,7 @@ "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" - ], - "files": "test/*.js" + ] }, "version": "1.5.1" } diff --git a/tools/eslint/node_modules/core-util-is/package.json b/tools/eslint/node_modules/core-util-is/package.json index 42730fa2e7..48af30153b 100644 --- a/tools/eslint/node_modules/core-util-is/package.json +++ b/tools/eslint/node_modules/core-util-is/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "core-util-is@~1.0.0", + { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/readable-stream" ] ], @@ -12,16 +20,17 @@ "_location": "/core-util-is", "_nodeVersion": "4.0.0", "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "3.3.2", "_phantomChildren": {}, "_requested": { - "name": "core-util-is", "raw": "core-util-is@~1.0.0", - "rawSpec": "~1.0.0", "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", "spec": ">=1.0.0 <1.1.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "core-util-is@~1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/readable-stream", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -68,8 +77,8 @@ "main": "lib/util.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "core-util-is", diff --git a/tools/eslint/node_modules/d/package.json b/tools/eslint/node_modules/d/package.json index cd59238a3f..0f43c1a5ba 100644 --- a/tools/eslint/node_modules/d/package.json +++ b/tools/eslint/node_modules/d/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "d@~0.1.1", + { + "raw": "d@~0.1.1", + "scope": null, + "escapedName": "d", + "name": "d", + "rawSpec": "~0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/es6-map" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/d", "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "1.4.3", "_phantomChildren": {}, "_requested": { - "name": "d", "raw": "d@~0.1.1", - "rawSpec": "~0.1.1", "scope": null, + "escapedName": "d", + "name": "d", + "rawSpec": "~0.1.1", "spec": ">=0.1.1 <0.2.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "d@~0.1.1", "_where": "/Users/trott/io.js/tools/node_modules/es6-map", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -71,8 +80,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "d", diff --git a/tools/eslint/node_modules/debug/package.json b/tools/eslint/node_modules/debug/package.json index cfa74e368b..310a8a8b03 100644 --- a/tools/eslint/node_modules/debug/package.json +++ b/tools/eslint/node_modules/debug/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "debug@^2.1.1", + { + "raw": "debug@^2.1.1", + "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "^2.1.1", + "spec": ">=2.1.1 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/debug", "_nodeVersion": "0.12.2", "_npmUser": { - "email": "nathan@tootallnate.net", - "name": "tootallnate" + "name": "tootallnate", + "email": "nathan@tootallnate.net" }, "_npmVersion": "2.7.4", "_phantomChildren": {}, "_requested": { - "name": "debug", "raw": "debug@^2.1.1", - "rawSpec": "^2.1.1", "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "^2.1.1", "spec": ">=2.1.1 <3.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "debug@^2.1.1", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "tj@vision-media.ca", - "name": "TJ Holowaychuk" + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" }, "browser": "./browser.js", "bugs": { @@ -43,14 +52,14 @@ }, "component": { "scripts": { - "debug/debug.js": "debug.js", - "debug/index.js": "browser.js" + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" } }, "contributors": [ { - "email": "nathan@tootallnate.net", "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", "url": "http://n8.io" } ], @@ -78,12 +87,12 @@ "main": "./node.js", "maintainers": [ { - "email": "tj@vision-media.ca", - "name": "tjholowaychuk" + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" }, { - "email": "nathan@tootallnate.net", - "name": "tootallnate" + "name": "tootallnate", + "email": "nathan@tootallnate.net" } ], "name": "debug", diff --git a/tools/eslint/node_modules/deep-is/package.json b/tools/eslint/node_modules/deep-is/package.json index 910df98ad5..65f91ed623 100644 --- a/tools/eslint/node_modules/deep-is/package.json +++ b/tools/eslint/node_modules/deep-is/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "deep-is@~0.1.3", + { + "raw": "deep-is@~0.1.3", + "scope": null, + "escapedName": "deep-is", + "name": "deep-is", + "rawSpec": "~0.1.3", + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/optionator" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/deep-is", "_npmUser": { - "email": "thlorenz@gmx.de", - "name": "thlorenz" + "name": "thlorenz", + "email": "thlorenz@gmx.de" }, "_npmVersion": "1.4.14", "_phantomChildren": {}, "_requested": { - "name": "deep-is", "raw": "deep-is@~0.1.3", - "rawSpec": "~0.1.3", "scope": null, + "escapedName": "deep-is", + "name": "deep-is", + "rawSpec": "~0.1.3", "spec": ">=0.1.3 <0.2.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "deep-is@~0.1.3", "_where": "/Users/trott/io.js/tools/node_modules/optionator", "author": { - "email": "thlorenz@gmx.de", "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", "url": "http://thlorenz.com" }, "bugs": { @@ -46,13 +55,13 @@ "tape": "~1.0.2" }, "directories": { - "example": "example", "lib": ".", + "example": "example", "test": "test" }, "dist": { "shasum": "b369d6fb5dbc13eecf524f91b070feedc357cf34", - "tarball": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" + "tarball": "http://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" }, "gitHead": "f126057628423458636dec9df3d621843b9ac55e", "homepage": "https://github.com/thlorenz/deep-is", @@ -68,8 +77,8 @@ "main": "index.js", "maintainers": [ { - "email": "thlorenz@gmx.de", - "name": "thlorenz" + "name": "thlorenz", + "email": "thlorenz@gmx.de" } ], "name": "deep-is", @@ -83,30 +92,30 @@ "test": "tape test/*.js" }, "testling": { + "files": "test/*.js", "browsers": { - "chrome": [ - 10, - 22 - ], - "ff": [ - 3.5, - 10, - 15 - ], "ie": [ 6, 7, 8, 9 ], - "opera": [ - 12 + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 ], "safari": [ 5.1 + ], + "opera": [ + 12 ] - }, - "files": "test/*.js" + } }, "version": "0.1.3" } diff --git a/tools/eslint/node_modules/del/package.json b/tools/eslint/node_modules/del/package.json index 11ec71b1d9..74749f63ff 100644 --- a/tools/eslint/node_modules/del/package.json +++ b/tools/eslint/node_modules/del/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "del@^2.0.2", + { + "raw": "del@^2.0.2", + "scope": null, + "escapedName": "del", + "name": "del", + "rawSpec": "^2.0.2", + "spec": ">=2.0.2 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/flat-cache" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/del-2.2.1.tgz_1466503710609_0.6494583815801889" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.0", "_phantomChildren": {}, "_requested": { - "name": "del", "raw": "del@^2.0.2", - "rawSpec": "^2.0.2", "scope": null, + "escapedName": "del", + "name": "del", + "rawSpec": "^2.0.2", "spec": ">=2.0.2 <3.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "del@^2.0.2", "_where": "/Users/trott/io.js/tools/node_modules/flat-cache", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -102,8 +111,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "del", diff --git a/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json b/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json index 53a9b85a62..a566a75d10 100644 --- a/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json +++ b/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "esutils@^1.1.6", + { + "raw": "esutils@^1.1.6", + "scope": null, + "escapedName": "esutils", + "name": "esutils", + "rawSpec": "^1.1.6", + "spec": ">=1.1.6 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/doctrine" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/doctrine/esutils", "_npmUser": { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, "_npmVersion": "2.0.0-alpha-5", "_phantomChildren": {}, "_requested": { - "name": "esutils", "raw": "esutils@^1.1.6", - "rawSpec": "^1.1.6", "scope": null, + "escapedName": "esutils", + "name": "esutils", + "rawSpec": "^1.1.6", "spec": ">=1.1.6 <2.0.0", "type": "range" }, @@ -50,7 +59,7 @@ }, "dist": { "shasum": "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375", - "tarball": "http://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" + "tarball": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" }, "engines": { "node": ">=0.10.0" @@ -71,8 +80,8 @@ "main": "lib/utils.js", "maintainers": [ { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" } ], "name": "esutils", diff --git a/tools/eslint/node_modules/doctrine/package.json b/tools/eslint/node_modules/doctrine/package.json index 99c3c2ba7a..bd3d0367cd 100644 --- a/tools/eslint/node_modules/doctrine/package.json +++ b/tools/eslint/node_modules/doctrine/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "doctrine@^1.2.2", + { + "raw": "doctrine@^1.2.2", + "scope": null, + "escapedName": "doctrine", + "name": "doctrine", + "rawSpec": "^1.2.2", + "spec": ">=1.2.2 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/doctrine-1.2.2.tgz_1463692862416_0.07905266736634076" }, "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" }, "_npmVersion": "2.15.0", "_phantomChildren": {}, "_requested": { - "name": "doctrine", "raw": "doctrine@^1.2.2", - "rawSpec": "^1.2.2", "scope": null, + "escapedName": "doctrine", + "name": "doctrine", + "rawSpec": "^1.2.2", "spec": ">=1.2.2 <2.0.0", "type": "range" }, @@ -87,12 +96,12 @@ "main": "lib/doctrine.js", "maintainers": [ { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" } ], "name": "doctrine", diff --git a/tools/eslint/node_modules/es5-ext/package.json b/tools/eslint/node_modules/es5-ext/package.json index 620e7a6381..d7b6d15ca2 100644 --- a/tools/eslint/node_modules/es5-ext/package.json +++ b/tools/eslint/node_modules/es5-ext/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "es5-ext@~0.10.11", + { + "raw": "es5-ext@~0.10.11", + "scope": null, + "escapedName": "es5-ext", + "name": "es5-ext", + "rawSpec": "~0.10.11", + "spec": ">=0.10.11 <0.11.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/es6-map" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/es5-ext-0.10.12.tgz_1467387765797_0.7073166444897652" }, "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "es5-ext", "raw": "es5-ext@~0.10.11", - "rawSpec": "~0.10.11", "scope": null, + "escapedName": "es5-ext", + "name": "es5-ext", + "rawSpec": "~0.10.11", "spec": ">=0.10.11 <0.11.0", "type": "range" }, @@ -44,8 +53,8 @@ "_spec": "es5-ext@~0.10.11", "_where": "/Users/trott/io.js/tools/node_modules/es6-map", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -89,8 +98,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "es5-ext", diff --git a/tools/eslint/node_modules/es6-iterator/package.json b/tools/eslint/node_modules/es6-iterator/package.json index 1e1e83c752..e36e7b7b70 100644 --- a/tools/eslint/node_modules/es6-iterator/package.json +++ b/tools/eslint/node_modules/es6-iterator/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "es6-iterator@2", + { + "raw": "es6-iterator@2", + "scope": null, + "escapedName": "es6-iterator", + "name": "es6-iterator", + "rawSpec": "2", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/es6-map" ] ], @@ -12,16 +20,17 @@ "_location": "/es6-iterator", "_nodeVersion": "0.12.7", "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "2.11.3", "_phantomChildren": {}, "_requested": { - "name": "es6-iterator", "raw": "es6-iterator@2", - "rawSpec": "2", "scope": null, + "escapedName": "es6-iterator", + "name": "es6-iterator", + "rawSpec": "2", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -37,8 +46,8 @@ "_spec": "es6-iterator@2", "_where": "/Users/trott/io.js/tools/node_modules/es6-map", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -74,8 +83,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "es6-iterator", diff --git a/tools/eslint/node_modules/es6-map/package.json b/tools/eslint/node_modules/es6-map/package.json index 6a75e9855c..fc0af63efb 100644 --- a/tools/eslint/node_modules/es6-map/package.json +++ b/tools/eslint/node_modules/es6-map/package.json @@ -1,8 +1,16 @@ { "_args": [ [ - "es6-map@^0.1.3", - "/Users/trott/io.js/tools/node_modules/eslint" + { + "raw": "es6-map@^0.1.3", + "scope": null, + "escapedName": "es6-map", + "name": "es6-map", + "rawSpec": "^0.1.3", + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "/Users/trott/io.js/tools/node_modules/escope" ] ], "_from": "es6-map@>=0.1.3 <0.2.0", @@ -16,31 +24,31 @@ "tmp": "tmp/es6-map-0.1.4.tgz_1464964802447_0.8775503970682621" }, "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "es6-map", "raw": "es6-map@^0.1.3", - "rawSpec": "^0.1.3", "scope": null, + "escapedName": "es6-map", + "name": "es6-map", + "rawSpec": "^0.1.3", "spec": ">=0.1.3 <0.2.0", "type": "range" }, "_requiredBy": [ - "/escope", - "/eslint" + "/escope" ], "_resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.4.tgz", "_shasum": "a34b147be224773a4d7da8072794cefa3632b897", "_shrinkwrap": null, "_spec": "es6-map@^0.1.3", - "_where": "/Users/trott/io.js/tools/node_modules/eslint", + "_where": "/Users/trott/io.js/tools/node_modules/escope", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -82,8 +90,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "es6-map", diff --git a/tools/eslint/node_modules/es6-set/package.json b/tools/eslint/node_modules/es6-set/package.json index 9717f130ec..d7fa809e73 100644 --- a/tools/eslint/node_modules/es6-set/package.json +++ b/tools/eslint/node_modules/es6-set/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "es6-set@~0.1.3", + { + "raw": "es6-set@~0.1.3", + "scope": null, + "escapedName": "es6-set", + "name": "es6-set", + "rawSpec": "~0.1.3", + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/es6-map" ] ], @@ -12,16 +20,17 @@ "_location": "/es6-set", "_nodeVersion": "4.2.4", "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { - "name": "es6-set", "raw": "es6-set@~0.1.3", - "rawSpec": "~0.1.3", "scope": null, + "escapedName": "es6-set", + "name": "es6-set", + "rawSpec": "~0.1.3", "spec": ">=0.1.3 <0.2.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "es6-set@~0.1.3", "_where": "/Users/trott/io.js/tools/node_modules/es6-map", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -72,8 +81,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "es6-set", diff --git a/tools/eslint/node_modules/es6-symbol/package.json b/tools/eslint/node_modules/es6-symbol/package.json index 089d0f298d..6143895243 100644 --- a/tools/eslint/node_modules/es6-symbol/package.json +++ b/tools/eslint/node_modules/es6-symbol/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "es6-symbol@~3.1.0", + { + "raw": "es6-symbol@~3.1.0", + "scope": null, + "escapedName": "es6-symbol", + "name": "es6-symbol", + "rawSpec": "~3.1.0", + "spec": ">=3.1.0 <3.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/es6-map" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/es6-symbol-3.1.0.tgz_1464960261964_0.3645231726113707" }, "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "es6-symbol", "raw": "es6-symbol@~3.1.0", - "rawSpec": "~3.1.0", "scope": null, + "escapedName": "es6-symbol", + "name": "es6-symbol", + "rawSpec": "~3.1.0", "spec": ">=3.1.0 <3.2.0", "type": "range" }, @@ -42,8 +51,8 @@ "_spec": "es6-symbol@~3.1.0", "_where": "/Users/trott/io.js/tools/node_modules/es6-map", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -79,8 +88,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "es6-symbol", diff --git a/tools/eslint/node_modules/es6-weak-map/package.json b/tools/eslint/node_modules/es6-weak-map/package.json index 8e1edcf9e1..1de11874bb 100644 --- a/tools/eslint/node_modules/es6-weak-map/package.json +++ b/tools/eslint/node_modules/es6-weak-map/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "es6-weak-map@^2.0.1", + { + "raw": "es6-weak-map@^2.0.1", + "scope": null, + "escapedName": "es6-weak-map", + "name": "es6-weak-map", + "rawSpec": "^2.0.1", + "spec": ">=2.0.1 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/escope" ] ], @@ -12,16 +20,17 @@ "_location": "/es6-weak-map", "_nodeVersion": "0.12.7", "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "2.11.3", "_phantomChildren": {}, "_requested": { - "name": "es6-weak-map", "raw": "es6-weak-map@^2.0.1", - "rawSpec": "^2.0.1", "scope": null, + "escapedName": "es6-weak-map", + "name": "es6-weak-map", + "rawSpec": "^2.0.1", "spec": ">=2.0.1 <3.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "es6-weak-map@^2.0.1", "_where": "/Users/trott/io.js/tools/node_modules/escope", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -56,7 +65,7 @@ "directories": {}, "dist": { "shasum": "0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81", - "tarball": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz" + "tarball": "http://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz" }, "gitHead": "b8b62d44e3b9f8134095c8fb6a5697e371b36867", "homepage": "https://github.com/medikoo/es6-weak-map#readme", @@ -74,8 +83,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "es6-weak-map", diff --git a/tools/eslint/node_modules/escape-string-regexp/package.json b/tools/eslint/node_modules/escape-string-regexp/package.json index b1d8a1ebca..078128e098 100644 --- a/tools/eslint/node_modules/escape-string-regexp/package.json +++ b/tools/eslint/node_modules/escape-string-regexp/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "escape-string-regexp@^1.0.2", + { + "raw": "escape-string-regexp@^1.0.2", + "scope": null, + "escapedName": "escape-string-regexp", + "name": "escape-string-regexp", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/chalk" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/escape-string-regexp-1.0.5.tgz_1456059312074_0.7245344955008477" }, "_npmUser": { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "name": "jbnicolai", + "email": "jappelman@xebia.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { - "name": "escape-string-regexp", "raw": "escape-string-regexp@^1.0.2", - "rawSpec": "^1.0.2", "scope": null, + "escapedName": "escape-string-regexp", + "name": "escape-string-regexp", + "rawSpec": "^1.0.2", "spec": ">=1.0.2 <2.0.0", "type": "range" }, @@ -39,8 +48,8 @@ "_spec": "escape-string-regexp@^1.0.2", "_where": "/Users/trott/io.js/tools/node_modules/chalk", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -80,12 +89,12 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "name": "jbnicolai", + "email": "jappelman@xebia.com" } ], "name": "escape-string-regexp", diff --git a/tools/eslint/node_modules/escope/package.json b/tools/eslint/node_modules/escope/package.json index 6d9e4831fa..87e60751eb 100644 --- a/tools/eslint/node_modules/escope/package.json +++ b/tools/eslint/node_modules/escope/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "escope@^3.6.0", + { + "raw": "escope@^3.6.0", + "scope": null, + "escapedName": "escope", + "name": "escope", + "rawSpec": "^3.6.0", + "spec": ">=3.6.0 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/escope-3.6.0.tgz_1457720018969_0.025237560039386153" }, "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" }, "_npmVersion": "2.14.9", "_phantomChildren": {}, "_requested": { - "name": "escope", "raw": "escope@^3.6.0", - "rawSpec": "^3.6.0", "scope": null, + "escapedName": "escope", + "name": "escope", + "rawSpec": "^3.6.0", "spec": ">=3.6.0 <4.0.0", "type": "range" }, @@ -84,16 +93,16 @@ "main": "lib/index.js", "maintainers": [ { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, { - "email": "npm@michael.ficarra.me", - "name": "michaelficarra" + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" }, { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" } ], "name": "escope", diff --git a/tools/eslint/node_modules/espree/package.json b/tools/eslint/node_modules/espree/package.json index d922d24fc0..1329a56298 100644 --- a/tools/eslint/node_modules/espree/package.json +++ b/tools/eslint/node_modules/espree/package.json @@ -1,51 +1,60 @@ { "_args": [ [ - "espree@^3.1.6", + { + "raw": "espree@^3.1.6", + "scope": null, + "escapedName": "espree", + "name": "espree", + "rawSpec": "^3.1.6", + "spec": ">=3.1.6 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], "_from": "espree@>=3.1.6 <4.0.0", - "_id": "espree@3.1.6", + "_id": "espree@3.1.7", "_inCache": true, "_installable": true, "_location": "/espree", - "_nodeVersion": "4.4.2", + "_nodeVersion": "4.4.7", "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/espree-3.1.6.tgz_1466014033649_0.5769831945654005" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/espree-3.1.7.tgz_1469818741131_0.25705570145510137" }, "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "eslint", + "email": "nicholas+eslint@nczconsulting.com" }, - "_npmVersion": "2.15.0", + "_npmVersion": "2.15.8", "_phantomChildren": {}, "_requested": { - "name": "espree", "raw": "espree@^3.1.6", - "rawSpec": "^3.1.6", "scope": null, + "escapedName": "espree", + "name": "espree", + "rawSpec": "^3.1.6", "spec": ">=3.1.6 <4.0.0", "type": "range" }, "_requiredBy": [ "/eslint" ], - "_resolved": "https://registry.npmjs.org/espree/-/espree-3.1.6.tgz", - "_shasum": "b26f0824de1436a0e17146e65cdcb728681e21f4", + "_resolved": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz", + "_shasum": "fd5deec76a97a5120a9cd3a7cb1177a0923b11d2", "_shrinkwrap": null, "_spec": "espree@^3.1.6", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "nicholas+npm@nczconsulting.com", - "name": "Nicholas C. Zakas" + "name": "Nicholas C. Zakas", + "email": "nicholas+npm@nczconsulting.com" }, "bugs": { "url": "http://github.com/eslint/espree.git" }, "dependencies": { - "acorn": "^3.2.0", + "acorn": "^3.3.0", "acorn-jsx": "^3.0.0" }, "description": "An Esprima-compatible JavaScript parser built on Acorn", @@ -54,7 +63,7 @@ "chai": "^1.10.0", "eslint": "^2.0.0-beta.1", "eslint-config-eslint": "^3.0.0", - "eslint-release": "^0.3.0", + "eslint-release": "^0.6.4", "esprima": "latest", "esprima-fb": "^8001.2001.0-dev-harmony-fb", "istanbul": "~0.2.6", @@ -68,8 +77,8 @@ }, "directories": {}, "dist": { - "shasum": "b26f0824de1436a0e17146e65cdcb728681e21f4", - "tarball": "https://registry.npmjs.org/espree/-/espree-3.1.6.tgz" + "shasum": "fd5deec76a97a5120a9cd3a7cb1177a0923b11d2", + "tarball": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz" }, "engines": { "node": ">=0.10.0" @@ -78,7 +87,7 @@ "lib", "espree.js" ], - "gitHead": "ea34a7755cc172b94861a1b838e0229f281cde31", + "gitHead": "4ddfacba95c96732541d94521efbcdccce2fad99", "homepage": "https://github.com/eslint/espree", "keywords": [ "ast", @@ -92,8 +101,12 @@ "main": "espree.js", "maintainers": [ { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "eslint", + "email": "nicholas+eslint@nczconsulting.com" + }, + { + "name": "nzakas", + "email": "nicholas@nczconsulting.com" } ], "name": "espree", @@ -107,10 +120,11 @@ "alpharelease": "eslint-prelease alpha", "betarelease": "eslint-prelease beta", "browserify": "node Makefile.js browserify", + "ci-release": "eslint-ci-release", "generate-regex": "node tools/generate-identifier-regex.js", "lint": "node Makefile.js lint", "release": "eslint-release", "test": "npm run-script lint && node Makefile.js test" }, - "version": "3.1.6" + "version": "3.1.7" } diff --git a/tools/eslint/node_modules/esprima/package.json b/tools/eslint/node_modules/esprima/package.json index 332d87e6d8..748bc15cfe 100644 --- a/tools/eslint/node_modules/esprima/package.json +++ b/tools/eslint/node_modules/esprima/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "esprima@^2.6.0", + { + "raw": "esprima@^2.6.0", + "scope": null, + "escapedName": "esprima", + "name": "esprima", + "rawSpec": "^2.6.0", + "spec": ">=2.6.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/js-yaml" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/esprima-2.7.2.tgz_1454477276067_0.014412595424801111" }, "_npmUser": { - "email": "ariya.hidayat@gmail.com", - "name": "ariya" + "name": "ariya", + "email": "ariya.hidayat@gmail.com" }, "_npmVersion": "2.14.7", "_phantomChildren": {}, "_requested": { - "name": "esprima", "raw": "esprima@^2.6.0", - "rawSpec": "^2.6.0", "scope": null, + "escapedName": "esprima", + "name": "esprima", + "rawSpec": "^2.6.0", "spec": ">=2.6.0 <3.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "esprima@^2.6.0", "_where": "/Users/trott/io.js/tools/node_modules/js-yaml", "author": { - "email": "ariya.hidayat@gmail.com", - "name": "Ariya Hidayat" + "name": "Ariya Hidayat", + "email": "ariya.hidayat@gmail.com" }, "bin": { "esparse": "./bin/esparse.js", @@ -100,8 +109,8 @@ "main": "esprima.js", "maintainers": [ { - "email": "ariya.hidayat@gmail.com", - "name": "ariya" + "name": "ariya", + "email": "ariya.hidayat@gmail.com" } ], "name": "esprima", diff --git a/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json index 14d3332460..5bfc71956e 100644 --- a/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json +++ b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "estraverse@~4.1.0", + { + "raw": "estraverse@~4.1.0", + "scope": null, + "escapedName": "estraverse", + "name": "estraverse", + "rawSpec": "~4.1.0", + "spec": ">=4.1.0 <4.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/esrecurse" ] ], @@ -12,16 +20,17 @@ "_location": "/esrecurse/estraverse", "_nodeVersion": "4.1.1", "_npmUser": { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, "_npmVersion": "2.14.4", "_phantomChildren": {}, "_requested": { - "name": "estraverse", "raw": "estraverse@~4.1.0", - "rawSpec": "~4.1.0", "scope": null, + "escapedName": "estraverse", + "name": "estraverse", + "rawSpec": "~4.1.0", "spec": ">=4.1.0 <4.2.0", "type": "range" }, @@ -53,7 +62,7 @@ "directories": {}, "dist": { "shasum": "f6caca728933a850ef90661d0e17982ba47111a2", - "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz" + "tarball": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz" }, "engines": { "node": ">=0.10.0" @@ -64,16 +73,16 @@ "main": "estraverse.js", "maintainers": [ { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, { - "email": "npm@michael.ficarra.me", - "name": "michaelficarra" + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" }, { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" } ], "name": "estraverse", diff --git a/tools/eslint/node_modules/esrecurse/package.json b/tools/eslint/node_modules/esrecurse/package.json index fed6870022..d095882f5e 100644 --- a/tools/eslint/node_modules/esrecurse/package.json +++ b/tools/eslint/node_modules/esrecurse/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "esrecurse@^4.1.0", + { + "raw": "esrecurse@^4.1.0", + "scope": null, + "escapedName": "esrecurse", + "name": "esrecurse", + "rawSpec": "^4.1.0", + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/escope" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/esrecurse-4.1.0.tgz_1457712782215_0.15950557170435786" }, "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" }, "_npmVersion": "2.14.9", "_phantomChildren": {}, "_requested": { - "name": "esrecurse", "raw": "esrecurse@^4.1.0", - "rawSpec": "^4.1.0", "scope": null, + "escapedName": "esrecurse", + "name": "esrecurse", + "rawSpec": "^4.1.0", "spec": ">=4.1.0 <5.0.0", "type": "range" }, @@ -73,16 +82,16 @@ "main": "esrecurse.js", "maintainers": [ { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, { - "email": "npm@michael.ficarra.me", - "name": "michaelficarra" + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" }, { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" } ], "name": "esrecurse", diff --git a/tools/eslint/node_modules/estraverse/package.json b/tools/eslint/node_modules/estraverse/package.json index 20ae6912b0..111099c6fa 100644 --- a/tools/eslint/node_modules/estraverse/package.json +++ b/tools/eslint/node_modules/estraverse/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "estraverse@^4.2.0", + { + "raw": "estraverse@^4.2.0", + "scope": null, + "escapedName": "estraverse", + "name": "estraverse", + "rawSpec": "^4.2.0", + "spec": ">=4.2.0 <5.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/estraverse-4.2.0.tgz_1457646738925_0.7118953282479197" }, "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" }, "_npmVersion": "2.14.9", "_phantomChildren": {}, "_requested": { - "name": "estraverse", "raw": "estraverse@^4.2.0", - "rawSpec": "^4.2.0", "scope": null, + "escapedName": "estraverse", + "name": "estraverse", + "rawSpec": "^4.2.0", "spec": ">=4.2.0 <5.0.0", "type": "range" }, @@ -59,7 +68,7 @@ "directories": {}, "dist": { "shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13", - "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" + "tarball": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" }, "engines": { "node": ">=0.10.0" @@ -70,16 +79,16 @@ "main": "estraverse.js", "maintainers": [ { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, { - "email": "npm@michael.ficarra.me", - "name": "michaelficarra" + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" }, { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" } ], "name": "estraverse", diff --git a/tools/eslint/node_modules/esutils/package.json b/tools/eslint/node_modules/esutils/package.json index 990e438b2a..39034dcb3c 100644 --- a/tools/eslint/node_modules/esutils/package.json +++ b/tools/eslint/node_modules/esutils/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "esutils@^2.0.2", + { + "raw": "esutils@^2.0.2", + "scope": null, + "escapedName": "esutils", + "name": "esutils", + "rawSpec": "^2.0.2", + "spec": ">=2.0.2 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/esutils", "_nodeVersion": "0.12.0", "_npmUser": { - "email": "npm@michael.ficarra.me", - "name": "michaelficarra" + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" }, "_npmVersion": "2.5.1", "_phantomChildren": {}, "_requested": { - "name": "esutils", "raw": "esutils@^2.0.2", - "rawSpec": "^2.0.2", "scope": null, + "escapedName": "esutils", + "name": "esutils", + "rawSpec": "^2.0.2", "spec": ">=2.0.2 <3.0.0", "type": "range" }, @@ -51,7 +60,7 @@ }, "dist": { "shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b", - "tarball": "http://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" + "tarball": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" }, "engines": { "node": ">=0.10.0" @@ -72,12 +81,12 @@ "main": "lib/utils.js", "maintainers": [ { - "email": "utatane.tea@gmail.com", - "name": "constellation" + "name": "constellation", + "email": "utatane.tea@gmail.com" }, { - "email": "npm@michael.ficarra.me", - "name": "michaelficarra" + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" } ], "name": "esutils", diff --git a/tools/eslint/node_modules/event-emitter/package.json b/tools/eslint/node_modules/event-emitter/package.json index 29b02cc8e8..8a376cc3d6 100644 --- a/tools/eslint/node_modules/event-emitter/package.json +++ b/tools/eslint/node_modules/event-emitter/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "event-emitter@~0.3.4", + { + "raw": "event-emitter@~0.3.4", + "scope": null, + "escapedName": "event-emitter", + "name": "event-emitter", + "rawSpec": "~0.3.4", + "spec": ">=0.3.4 <0.4.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/es6-map" ] ], @@ -12,16 +20,17 @@ "_location": "/event-emitter", "_nodeVersion": "4.1.1", "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" }, "_npmVersion": "2.14.4", "_phantomChildren": {}, "_requested": { - "name": "event-emitter", "raw": "event-emitter@~0.3.4", - "rawSpec": "~0.3.4", "scope": null, + "escapedName": "event-emitter", + "name": "event-emitter", + "rawSpec": "~0.3.4", "spec": ">=0.3.4 <0.4.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "event-emitter@~0.3.4", "_where": "/Users/trott/io.js/tools/node_modules/es6-map", "author": { - "email": "medyk@medikoo.com", "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", "url": "http://www.medikoo.com/" }, "bugs": { @@ -71,8 +80,8 @@ "license": "MIT", "maintainers": [ { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" } ], "name": "event-emitter", diff --git a/tools/eslint/node_modules/exit-hook/package.json b/tools/eslint/node_modules/exit-hook/package.json index 25504298d0..7e9d38bf18 100644 --- a/tools/eslint/node_modules/exit-hook/package.json +++ b/tools/eslint/node_modules/exit-hook/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "exit-hook@^1.0.0", + { + "raw": "exit-hook@^1.0.0", + "scope": null, + "escapedName": "exit-hook", + "name": "exit-hook", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/restore-cursor" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/exit-hook", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "1.4.9", "_phantomChildren": {}, "_requested": { - "name": "exit-hook", "raw": "exit-hook@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "exit-hook", + "name": "exit-hook", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "exit-hook@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/restore-cursor", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -75,8 +84,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "exit-hook", diff --git a/tools/eslint/node_modules/fast-levenshtein/levenshtein.js b/tools/eslint/node_modules/fast-levenshtein/levenshtein.js index 850626de68..3051ec5894 100644 --- a/tools/eslint/node_modules/fast-levenshtein/levenshtein.js +++ b/tools/eslint/node_modules/fast-levenshtein/levenshtein.js @@ -196,7 +196,7 @@ }); } // commonjs - else if (typeof module !== "undefined" && module !== null) { + else if (typeof module !== "undefined" && module !== null && typeof exports !== "undefined" && module.exports === exports) { module.exports = Levenshtein; } // web worker diff --git a/tools/eslint/node_modules/fast-levenshtein/package.json b/tools/eslint/node_modules/fast-levenshtein/package.json index 36431b8842..17508b9272 100644 --- a/tools/eslint/node_modules/fast-levenshtein/package.json +++ b/tools/eslint/node_modules/fast-levenshtein/package.json @@ -1,41 +1,54 @@ { "_args": [ [ - "fast-levenshtein@^1.1.0", + { + "raw": "fast-levenshtein@^1.1.0", + "scope": null, + "escapedName": "fast-levenshtein", + "name": "fast-levenshtein", + "rawSpec": "^1.1.0", + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/optionator" ] ], "_from": "fast-levenshtein@>=1.1.0 <2.0.0", - "_id": "fast-levenshtein@1.1.3", + "_id": "fast-levenshtein@1.1.4", "_inCache": true, "_installable": true, "_location": "/fast-levenshtein", - "_nodeVersion": "0.12.9", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/fast-levenshtein-1.1.4.tgz_1469168840025_0.9637497058138251" + }, "_npmUser": { - "email": "ram@hiddentao.com", - "name": "hiddentao" + "name": "hiddentao", + "email": "ram@hiddentao.com" }, - "_npmVersion": "2.14.9", + "_npmVersion": "3.9.3", "_phantomChildren": {}, "_requested": { - "name": "fast-levenshtein", "raw": "fast-levenshtein@^1.1.0", - "rawSpec": "^1.1.0", "scope": null, + "escapedName": "fast-levenshtein", + "name": "fast-levenshtein", + "rawSpec": "^1.1.0", "spec": ">=1.1.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/optionator" ], - "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz", - "_shasum": "2ae7b32abc1e612da48a4e13849b888a2f61e7e9", + "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "_shasum": "e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9", "_shrinkwrap": null, "_spec": "fast-levenshtein@^1.1.0", "_where": "/Users/trott/io.js/tools/node_modules/optionator", "author": { - "email": "ram@hiddentao.com", "name": "Ramesh Nair", + "email": "ram@hiddentao.com", "url": "http://www.hiddentao.com/" }, "bugs": { @@ -57,13 +70,13 @@ }, "directories": {}, "dist": { - "shasum": "2ae7b32abc1e612da48a4e13849b888a2f61e7e9", - "tarball": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz" + "shasum": "e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9", + "tarball": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz" }, "files": [ "levenshtein.js" ], - "gitHead": "bce911eb885fb52e37b1be793c22cfaf88d580d2", + "gitHead": "80874a9c0cd8d9f5aee9d73aa39d9ab0a9d51435", "homepage": "https://github.com/hiddentao/fast-levenshtein#readme", "keywords": [ "levenshtein", @@ -74,8 +87,8 @@ "main": "levenshtein.js", "maintainers": [ { - "email": "ram@hiddentao.com", - "name": "hiddentao" + "name": "hiddentao", + "email": "ram@hiddentao.com" } ], "name": "fast-levenshtein", @@ -90,5 +103,5 @@ "build": "grunt build", "test": "mocha" }, - "version": "1.1.3" + "version": "1.1.4" } diff --git a/tools/eslint/node_modules/figures/package.json b/tools/eslint/node_modules/figures/package.json index 1bfd18a3f2..c36d27c079 100644 --- a/tools/eslint/node_modules/figures/package.json +++ b/tools/eslint/node_modules/figures/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "figures@^1.3.5", + { + "raw": "figures@^1.3.5", + "scope": null, + "escapedName": "figures", + "name": "figures", + "rawSpec": "^1.3.5", + "spec": ">=1.3.5 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/figures-1.7.0.tgz_1463504380148_0.06917169434018433" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.0", "_phantomChildren": {}, "_requested": { - "name": "figures", "raw": "figures@^1.3.5", - "rawSpec": "^1.3.5", "scope": null, + "escapedName": "figures", + "name": "figures", + "rawSpec": "^1.3.5", "spec": ">=1.3.5 <2.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "figures@^1.3.5", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -85,8 +94,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "figures", diff --git a/tools/eslint/node_modules/file-entry-cache/README.md b/tools/eslint/node_modules/file-entry-cache/README.md index 0ea7e7a092..19d25f0445 100644 --- a/tools/eslint/node_modules/file-entry-cache/README.md +++ b/tools/eslint/node_modules/file-entry-cache/README.md @@ -1,5 +1,5 @@ # file-entry-cache -> Super simple cache for file metadata, useful for process that work o a given series of files +> Super simple cache for file metadata, useful for process that work o a given series of files > and that only need to repeat the job on the changed ones since the previous run of the process — Edit [![NPM Version](http://img.shields.io/npm/v/file-entry-cache.svg?style=flat)](https://npmjs.org/package/file-entry-cache) @@ -14,7 +14,7 @@ npm i --save file-entry-cache ## Usage ```js -// loads the cache, if one does not exists for the given +// loads the cache, if one does not exists for the given // Id a new one will be prepared to be created var fileEntryCache = require('file-entry-cache'); @@ -25,18 +25,23 @@ var files = expand('../fixtures/*.txt'); // the first time this method is called, will return all the files var oFiles = cache.getUpdatedFiles(files); -// this will persist this to disk checking each file stats and +// this will persist this to disk checking each file stats and // updating the meta attributes `size` and `mtime`. // custom fields could also be added to the meta object and will be persisted // in order to retrieve them later -cache.reconcile(); +cache.reconcile(); + +// use this if you want the non visited file entries to be kept in the cache +// for more than one execution +// +// cache.reconcile( true /* noPrune */) // on a second run var cache2 = fileEntryCache.create('testCache'); // will return now only the files that were modified or none // if no files were modified previous to the execution of this function -var oFiles = cache.getUpdatedFiles(files); +var oFiles = cache.getUpdatedFiles(files); // if you want to prevent a file from being considered non modified // something useful if a file failed some sort of validation @@ -64,21 +69,21 @@ entry = { ## Motivation for this module -I needed a super simple and dumb **in-memory cache** with optional disk persistence (write-back cache) in order to make +I needed a super simple and dumb **in-memory cache** with optional disk persistence (write-back cache) in order to make a script that will beautify files with `esformatter` to execute only on the files that were changed since the last run. In doing so the process of beautifying files was reduced from several seconds to a small fraction of a second. -This module uses [flat-cache](https://www.npmjs.com/package/flat-cache) a super simple `key/value` cache storage with +This module uses [flat-cache](https://www.npmjs.com/package/flat-cache) a super simple `key/value` cache storage with optional file persistance. -The main idea is to read the files when the task begins, apply the transforms required, and if the process succeed, -then store the new state of the files. The next time this module request for `getChangedFiles` will return only +The main idea is to read the files when the task begins, apply the transforms required, and if the process succeed, +then store the new state of the files. The next time this module request for `getChangedFiles` will return only the files that were modified. Making the process to end faster. This module could also be used by processes that modify the files applying a transform, in that case the result of the -transform could be stored in the `meta` field, of the entries. Anything added to the meta field will be persisted. -Those processes won't need to call `getChangedFiles` they will instead call `normalizeEntries` that will return the +transform could be stored in the `meta` field, of the entries. Anything added to the meta field will be persisted. +Those processes won't need to call `getChangedFiles` they will instead call `normalizeEntries` that will return the entries with a `changed` field that can be used to determine if the file was changed or not. If it was not changed the transformed stored data could be used instead of actually applying the transformation, saving time in case of only a few files changed. @@ -86,10 +91,16 @@ a few files changed. In the worst case scenario all the files will be processed. In the best case scenario only a few of them will be processed. ## Important notes -- The values set on the meta attribute of the entries should be `stringify-able` ones, meaning no circular references -- All the changes to the cache state are done to memory first and only persisted after reconcile +- The values set on the meta attribute of the entries should be `stringify-able` ones if possible, flat-cache uses `circular-json` to try to persist circular structures, but this should be considered experimental. The best results are always obtained with non circular values +- All the changes to the cache state are done to memory first and only persisted after reconcile. +- By default non visited entries are removed from the cache. This is done to prevent the file from growing too much. If this is not an issue and + you prefer to do a manual pruning of the cache files, you can pass `true` to the `reconcile` call. Like this: + + ```javascript + cache.reconcile( true /* noPrune */ ); + ``` -## License +## License MIT diff --git a/tools/eslint/node_modules/file-entry-cache/cache.js b/tools/eslint/node_modules/file-entry-cache/cache.js index e4590a1bb3..5823b332c5 100644 --- a/tools/eslint/node_modules/file-entry-cache/cache.js +++ b/tools/eslint/node_modules/file-entry-cache/cache.js @@ -16,7 +16,7 @@ module.exports = { return { /** - * the flat cache storage used to persist the metadata of the files + * the flat cache storage used to persist the metadata of the `files * @type {Object} */ cache: cache, @@ -161,16 +161,18 @@ module.exports = { }, /** * Sync the files and persist them to the cache - * + * @param [noPrune=false] {Boolean} whether to remove non visited/saved entries * @method reconcile */ - reconcile: function () { + reconcile: function ( noPrune ) { var entries = normalizedEntries; var keys = Object.keys( entries ); + if ( keys.length === 0 ) { return; } + keys.forEach( function ( entryName ) { var cacheEntry = entries[ entryName ]; var stat = fs.statSync( cacheEntry.key ); @@ -183,7 +185,7 @@ module.exports = { cache.setKey( entryName, meta ); } ); - cache.save(); + cache.save( noPrune ); } }; } diff --git a/tools/eslint/node_modules/file-entry-cache/changelog.md b/tools/eslint/node_modules/file-entry-cache/changelog.md index 8cc876141e..57eec48aad 100644 --- a/tools/eslint/node_modules/file-entry-cache/changelog.md +++ b/tools/eslint/node_modules/file-entry-cache/changelog.md @@ -1,5 +1,15 @@ # file-entry-cache - Changelog +## v1.3.1 +- **Build Scripts Changes** + - remove older node version - [0a26ac4]( https://github.com/royriojas/file-entry-cache/commit/0a26ac4 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 06:09:17 + + +## v1.3.0 +- **Features** + - Add an option to not prune non visited keys. Closes [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [b1a64db]( https://github.com/royriojas/file-entry-cache/commit/b1a64db ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 05:52:12 + + ## v1.2.4 - **Enhancements** - Expose the flat-cache instance - [f34c557]( https://github.com/royriojas/file-entry-cache/commit/f34c557 ), [royriojas](https://github.com/royriojas), 23/09/2015 20:26:33 diff --git a/tools/eslint/node_modules/file-entry-cache/package.json b/tools/eslint/node_modules/file-entry-cache/package.json index e435cf15f3..dc15546159 100644 --- a/tools/eslint/node_modules/file-entry-cache/package.json +++ b/tools/eslint/node_modules/file-entry-cache/package.json @@ -1,37 +1,50 @@ { "_args": [ [ - "file-entry-cache@^1.1.1", + { + "raw": "file-entry-cache@^1.3.1", + "scope": null, + "escapedName": "file-entry-cache", + "name": "file-entry-cache", + "rawSpec": "^1.3.1", + "spec": ">=1.3.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], - "_from": "file-entry-cache@>=1.1.1 <2.0.0", - "_id": "file-entry-cache@1.2.4", + "_from": "file-entry-cache@>=1.3.1 <2.0.0", + "_id": "file-entry-cache@1.3.1", "_inCache": true, "_installable": true, "_location": "/file-entry-cache", - "_nodeVersion": "0.12.0", + "_nodeVersion": "6.3.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/file-entry-cache-1.3.1.tgz_1470049850988_0.09572241548448801" + }, "_npmUser": { - "email": "royriojas@gmail.com", - "name": "royriojas" + "name": "royriojas", + "email": "royriojas@gmail.com" }, - "_npmVersion": "2.14.5", + "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { - "name": "file-entry-cache", - "raw": "file-entry-cache@^1.1.1", - "rawSpec": "^1.1.1", + "raw": "file-entry-cache@^1.3.1", "scope": null, - "spec": ">=1.1.1 <2.0.0", + "escapedName": "file-entry-cache", + "name": "file-entry-cache", + "rawSpec": "^1.3.1", + "spec": ">=1.3.1 <2.0.0", "type": "range" }, "_requiredBy": [ "/eslint" ], - "_resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz", - "_shasum": "9a586072c69365a7ef7ec72a7c2b9046de091e9c", + "_resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz", + "_shasum": "44c61ea607ae4be9c1402f41f44270cbfe334ff8", "_shrinkwrap": null, - "_spec": "file-entry-cache@^1.1.1", + "_spec": "file-entry-cache@^1.3.1", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { "name": "Roy Riojas", @@ -41,19 +54,19 @@ "url": "https://github.com/royriojas/file-entry-cache/issues" }, "changelogx": { - "authorURL": "https://github.com/{0}", - "commitURL": "https://github.com/royriojas/file-entry-cache/commit/{0}", "ignoreRegExp": [ "BLD: Release", "DOC: Generate Changelog", "Generated Changelog" ], "issueIDRegExp": "#(\\d+)", + "commitURL": "https://github.com/royriojas/file-entry-cache/commit/{0}", + "authorURL": "https://github.com/{0}", "issueIDURL": "https://github.com/royriojas/file-entry-cache/issues/{0}", "projectName": "file-entry-cache" }, "dependencies": { - "flat-cache": "^1.0.9", + "flat-cache": "^1.2.1", "object-assign": "^4.0.1" }, "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process", @@ -70,16 +83,15 @@ "precommit": "^1.1.5", "prepush": "^3.1.4", "proxyquire": "^1.3.1", - "read-file": "^0.2.0", "sinon": "^1.12.2", "sinon-chai": "^2.7.0", "watch-run": "^1.2.1", - "write": "^0.2.1" + "write": "^0.3.1" }, "directories": {}, "dist": { - "shasum": "9a586072c69365a7ef7ec72a7c2b9046de091e9c", - "tarball": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz" + "shasum": "44c61ea607ae4be9c1402f41f44270cbfe334ff8", + "tarball": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz" }, "engines": { "node": ">=0.10.0" @@ -87,7 +99,7 @@ "files": [ "cache.js" ], - "gitHead": "3ca70d84f97822df7f769409f49ecf22c8908412", + "gitHead": "037bc03eb9c2e759a66da95cd5432499a74f754a", "homepage": "https://github.com/royriojas/file-entry-cache#readme", "keywords": [ "file cache", @@ -101,8 +113,8 @@ "main": "cache.js", "maintainers": [ { - "email": "royriojas@gmail.com", - "name": "royriojas" + "name": "royriojas", + "email": "royriojas@gmail.com" } ], "name": "file-entry-cache", @@ -119,8 +131,8 @@ "url": "git+https://github.com/royriojas/file-entry-cache.git" }, "scripts": { - "beautify": "esbeautifier 'cache.js' 'specs/**/*.js'", - "beautify-check": "esbeautifier -k 'cache.js' 'specs/**/*.js'", + "beautify": "esbeautifier 'cache.js' 'test/**/*.js'", + "beautify-check": "npm run beautify -- -k", "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", @@ -131,10 +143,10 @@ "install-hooks": "prepush install && changelogx install-hook && precommit install", "lint": "npm run beautify && npm run eslint", "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", - "pre-v": "npm run verify", - "test": "mocha -R spec test/specs", + "pre-v": "npm run test", + "test": "npm run verify && mocha -R spec test/specs", "verify": "npm run beautify-check && npm run eslint", "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" }, - "version": "1.2.4" + "version": "1.3.1" } diff --git a/tools/eslint/node_modules/flat-cache/README.md b/tools/eslint/node_modules/flat-cache/README.md index 33a315fb34..77770aa3ba 100644 --- a/tools/eslint/node_modules/flat-cache/README.md +++ b/tools/eslint/node_modules/flat-cache/README.md @@ -29,6 +29,7 @@ cache.removeKey('key'); // removes a key from the cache // save it to disk cache.save(); // very important, if you don't save no changes will be persisted. +// cache.save( true /* noPrune */) // can be used to prevent the removal of non visited keys // loads the cache from a given directory, if one does // not exists for the given Id a new one will be prepared to be created @@ -57,6 +58,8 @@ storage was needed and Bam! this module was born. - All the changes to the cache state are done to memory - I could have used a timer or `Object.observe` to deliver the changes to disk, but I wanted to keep this module intentionally dumb and simple +- Non visited keys are removed when `cache.save()` is called. If this is not desired, you can pass `true` to the save call + like: `cache.save( true /* noPrune */ )`. ## License diff --git a/tools/eslint/node_modules/flat-cache/cache.js b/tools/eslint/node_modules/flat-cache/cache.js index 90b8e77c30..e7d205e5e1 100644 --- a/tools/eslint/node_modules/flat-cache/cache.js +++ b/tools/eslint/node_modules/flat-cache/cache.js @@ -1,8 +1,8 @@ var path = require( 'path' ); var fs = require( 'graceful-fs' ); -var readJSON = require( 'read-json-sync' ); -var write = require( 'write' ); var del = require( 'del' ).sync; +var readJSON = require( './utils' ).readJSON; +var writeJSON = require( './utils' ).writeJSON; var cache = { /** @@ -100,13 +100,14 @@ var cache = { /** * Save the state of the cache identified by the docId to disk * as a JSON structure + * @param [noPrune=false] {Boolean} whether to remove from cache the non visited files * @method save */ - save: function () { + save: function ( noPrune ) { var me = this; - me._prune(); - write.sync( me._pathToFile, JSON.stringify( me._persisted ) ); + (!noPrune) && me._prune(); + writeJSON( me._pathToFile, me._persisted ); }, /** diff --git a/tools/eslint/node_modules/flat-cache/changelog.md b/tools/eslint/node_modules/flat-cache/changelog.md index 6ba9ef745c..4312b4c32a 100644 --- a/tools/eslint/node_modules/flat-cache/changelog.md +++ b/tools/eslint/node_modules/flat-cache/changelog.md @@ -1,5 +1,46 @@ # flat-cache - Changelog +## v1.2.1 +- **Bug Fixes** + - Add missing utils.js file to the package. closes [#8](https://github.com/royriojas/flat-cache/issues/8) - [ec10cf2]( https://github.com/royriojas/flat-cache/commit/ec10cf2 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:18:57 + + +## v1.2.0 +- **Documentation** + - Add documentation about noPrune option - [23e11f9]( https://github.com/royriojas/flat-cache/commit/23e11f9 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:06:49 + + +## v1.0.11 +- **Features** + - Add noPrune option to cache.save() method. closes [#7](https://github.com/royriojas/flat-cache/issues/7) - [2c8016a]( https://github.com/royriojas/flat-cache/commit/2c8016a ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:00:29 + + + - Add json read and write utility based on circular-json - [c31081e]( https://github.com/royriojas/flat-cache/commit/c31081e ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:58:17 + + +- **Bug Fixes** + - Remove UTF16 BOM stripping - [4a41e22]( https://github.com/royriojas/flat-cache/commit/4a41e22 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:18:06 + + Since we control both writing and reading of JSON stream, there no needs + to handle unicode BOM. + - Use circular-json to handle circular references (fix [#5](https://github.com/royriojas/flat-cache/issues/5)) - [cd7aeed]( https://github.com/royriojas/flat-cache/commit/cd7aeed ), [Jean Ponchon](https://github.com/Jean Ponchon), 25/07/2016 13:11:59 + + +- **Tests Related fixes** + - Add missing file from eslint test - [d6fa3c3]( https://github.com/royriojas/flat-cache/commit/d6fa3c3 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:15:51 + + + - Add test for circular json serialization / deserialization - [07d2ddd]( https://github.com/royriojas/flat-cache/commit/07d2ddd ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:36 + + +- **Refactoring** + - Remove unused read-json-sync - [2be1c24]( https://github.com/royriojas/flat-cache/commit/2be1c24 ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:18 + + +- **Build Scripts Changes** + - travis tests on 0.12 and 4x - [3a613fd]( https://github.com/royriojas/flat-cache/commit/3a613fd ), [royriojas](https://github.com/royriojas), 15/11/2015 17:34:40 + + ## v1.0.10 - **Build Scripts Changes** - add eslint-fix task - [fd29e52]( https://github.com/royriojas/flat-cache/commit/fd29e52 ), [royriojas](https://github.com/royriojas), 01/11/2015 18:04:08 diff --git a/tools/eslint/node_modules/flat-cache/package.json b/tools/eslint/node_modules/flat-cache/package.json index 3c923ffe84..3c46762ece 100644 --- a/tools/eslint/node_modules/flat-cache/package.json +++ b/tools/eslint/node_modules/flat-cache/package.json @@ -1,37 +1,50 @@ { "_args": [ [ - "flat-cache@^1.0.9", + { + "raw": "flat-cache@^1.2.1", + "scope": null, + "escapedName": "flat-cache", + "name": "flat-cache", + "rawSpec": "^1.2.1", + "spec": ">=1.2.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/file-entry-cache" ] ], - "_from": "flat-cache@>=1.0.9 <2.0.0", - "_id": "flat-cache@1.0.10", + "_from": "flat-cache@>=1.2.1 <2.0.0", + "_id": "flat-cache@1.2.1", "_inCache": true, "_installable": true, "_location": "/flat-cache", - "_nodeVersion": "0.12.0", + "_nodeVersion": "6.3.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/flat-cache-1.2.1.tgz_1470043202592_0.29112970223650336" + }, "_npmUser": { - "email": "royriojas@gmail.com", - "name": "royriojas" + "name": "royriojas", + "email": "royriojas@gmail.com" }, - "_npmVersion": "2.14.5", + "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { - "name": "flat-cache", - "raw": "flat-cache@^1.0.9", - "rawSpec": "^1.0.9", + "raw": "flat-cache@^1.2.1", "scope": null, - "spec": ">=1.0.9 <2.0.0", + "escapedName": "flat-cache", + "name": "flat-cache", + "rawSpec": "^1.2.1", + "spec": ">=1.2.1 <2.0.0", "type": "range" }, "_requiredBy": [ "/file-entry-cache" ], - "_resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz", - "_shasum": "73d6df4a28502160a05e059544a6aeeae8b0047a", + "_resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.1.tgz", + "_shasum": "6c837d6225a7de5659323740b36d5361f71691ff", "_shrinkwrap": null, - "_spec": "flat-cache@^1.0.9", + "_spec": "flat-cache@^1.2.1", "_where": "/Users/trott/io.js/tools/node_modules/file-entry-cache", "author": { "name": "Roy Riojas", @@ -41,21 +54,21 @@ "url": "https://github.com/royriojas/flat-cache/issues" }, "changelogx": { - "authorURL": "https://github.com/{0}", - "commitURL": "https://github.com/royriojas/flat-cache/commit/{0}", "ignoreRegExp": [ "BLD: Release", "DOC: Generate Changelog", "Generated Changelog" ], "issueIDRegExp": "#(\\d+)", + "commitURL": "https://github.com/royriojas/flat-cache/commit/{0}", + "authorURL": "https://github.com/{0}", "issueIDURL": "https://github.com/royriojas/flat-cache/issues/{0}", "projectName": "flat-cache" }, "dependencies": { + "circular-json": "^0.3.0", "del": "^2.0.2", "graceful-fs": "^4.1.2", - "read-json-sync": "^1.1.0", "write": "^0.2.1" }, "description": "A stupidly simple key/value storage using files to persist some data", @@ -76,16 +89,17 @@ }, "directories": {}, "dist": { - "shasum": "73d6df4a28502160a05e059544a6aeeae8b0047a", - "tarball": "http://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz" + "shasum": "6c837d6225a7de5659323740b36d5361f71691ff", + "tarball": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.1.tgz" }, "engines": { "node": ">=0.10.0" }, "files": [ - "cache.js" + "cache.js", + "utils.js" ], - "gitHead": "58bb40ccc87d79eb16146629be79d7577e6632da", + "gitHead": "ca27117e382576b93d22754902bf7d80f607fb22", "homepage": "https://github.com/royriojas/flat-cache#readme", "keywords": [ "json cache", @@ -99,8 +113,8 @@ "main": "cache.js", "maintainers": [ { - "email": "royriojas@gmail.com", - "name": "royriojas" + "name": "royriojas", + "email": "royriojas@gmail.com" } ], "name": "flat-cache", @@ -118,7 +132,7 @@ }, "scripts": { "autofix": "npm run beautify && npm run eslint-fix", - "beautify": "esbeautifier 'cache.js' 'specs/**/*.js'", + "beautify": "esbeautifier 'cache.js' 'test/specs/**/*.js'", "beautify-check": "npm run beautify -- -k", "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", @@ -127,7 +141,7 @@ "check": "npm run beautify-check && npm run eslint", "cover": "istanbul cover test/runner.js html text-summary", "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", - "eslint": "eslinter 'cache.js' 'specs/**/*.js'", + "eslint": "eslinter 'cache.js' 'utils.js' 'specs/**/*.js'", "eslint-fix": "npm run eslint -- --fix", "install-hooks": "prepush install && changelogx install-hook && precommit install", "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", @@ -137,5 +151,5 @@ "verify": "npm run check && npm run test:cache", "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" }, - "version": "1.0.10" + "version": "1.2.1" } diff --git a/tools/eslint/node_modules/flat-cache/utils.js b/tools/eslint/node_modules/flat-cache/utils.js new file mode 100644 index 0000000000..3bdd1efa37 --- /dev/null +++ b/tools/eslint/node_modules/flat-cache/utils.js @@ -0,0 +1,29 @@ +var fs = require( 'graceful-fs' ); +var write = require( 'write' ); +var circularJson = require( 'circular-json' ); + +module.exports = { + + /** + * Read json file synchronously using circular-json + * + * @method readJSON + * @param {String} filePath Json filepath + * @returns {*} parse result + */ + readJSON: function ( filePath ) { + return circularJson.parse( fs.readFileSync( filePath ).toString() ); + }, + + /** + * Write json file synchronously using circular-json + * + * @method writeJSON + * @param {String} filePath Json filepath + * @param {*} data Object to serialize + */ + writeJSON: function (filePath, data ) { + write.sync( filePath, circularJson.stringify( data ) ); + } + +}; diff --git a/tools/eslint/node_modules/fs.realpath/package.json b/tools/eslint/node_modules/fs.realpath/package.json index 53b5ef9e59..8a4f8d51d0 100644 --- a/tools/eslint/node_modules/fs.realpath/package.json +++ b/tools/eslint/node_modules/fs.realpath/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "fs.realpath@^1.0.0", + { + "raw": "fs.realpath@^1.0.0", + "scope": null, + "escapedName": "fs.realpath", + "name": "fs.realpath", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/glob" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/fs.realpath-1.0.0.tgz_1466015941059_0.3332864767871797" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "3.9.1", "_phantomChildren": {}, "_requested": { - "name": "fs.realpath", "raw": "fs.realpath@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "fs.realpath", + "name": "fs.realpath", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "fs.realpath@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/glob", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -68,8 +77,8 @@ "main": "index.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "fs.realpath", diff --git a/tools/eslint/node_modules/generate-function/package.json b/tools/eslint/node_modules/generate-function/package.json index 2ef064b45f..4b0a3ab010 100644 --- a/tools/eslint/node_modules/generate-function/package.json +++ b/tools/eslint/node_modules/generate-function/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "generate-function@^2.0.0", + { + "raw": "generate-function@^2.0.0", + "scope": null, + "escapedName": "generate-function", + "name": "generate-function", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/is-my-json-valid" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/generate-function", "_npmUser": { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" }, "_npmVersion": "1.4.23", "_phantomChildren": {}, "_requested": { - "name": "generate-function", "raw": "generate-function@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "generate-function", + "name": "generate-function", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -46,7 +55,7 @@ "directories": {}, "dist": { "shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74", - "tarball": "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" + "tarball": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" }, "gitHead": "3d5fc8de5859be95f58e3af9bfb5f663edd95149", "homepage": "https://github.com/mafintosh/generate-function", @@ -61,8 +70,8 @@ "main": "index.js", "maintainers": [ { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" } ], "name": "generate-function", diff --git a/tools/eslint/node_modules/generate-object-property/package.json b/tools/eslint/node_modules/generate-object-property/package.json index 3d8e68caff..8d60083c4c 100644 --- a/tools/eslint/node_modules/generate-object-property/package.json +++ b/tools/eslint/node_modules/generate-object-property/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "generate-object-property@^1.1.0", + { + "raw": "generate-object-property@^1.1.0", + "scope": null, + "escapedName": "generate-object-property", + "name": "generate-object-property", + "rawSpec": "^1.1.0", + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/is-my-json-valid" ] ], @@ -12,16 +20,17 @@ "_location": "/generate-object-property", "_nodeVersion": "2.0.1", "_npmUser": { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" }, "_npmVersion": "2.9.0", "_phantomChildren": {}, "_requested": { - "name": "generate-object-property", "raw": "generate-object-property@^1.1.0", - "rawSpec": "^1.1.0", "scope": null, + "escapedName": "generate-object-property", + "name": "generate-object-property", + "rawSpec": "^1.1.0", "spec": ">=1.1.0 <2.0.0", "type": "range" }, @@ -50,7 +59,7 @@ "directories": {}, "dist": { "shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0", - "tarball": "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" + "tarball": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" }, "gitHead": "0dd7d411018de54b2eae63b424c15b3e50bd678c", "homepage": "https://github.com/mafintosh/generate-object-property", @@ -58,8 +67,8 @@ "main": "index.js", "maintainers": [ { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" } ], "name": "generate-object-property", diff --git a/tools/eslint/node_modules/glob/package.json b/tools/eslint/node_modules/glob/package.json index d11c3cab7f..879ae78291 100644 --- a/tools/eslint/node_modules/glob/package.json +++ b/tools/eslint/node_modules/glob/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "glob@^7.0.3", + { + "raw": "glob@^7.0.3", + "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "^7.0.3", + "spec": ">=7.0.3 <8.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/glob-7.0.5.tgz_1466471133629_0.7749870484694839" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "3.9.1", "_phantomChildren": {}, "_requested": { - "name": "glob", "raw": "glob@^7.0.3", - "rawSpec": "^7.0.3", "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "^7.0.3", "spec": ">=7.0.3 <8.0.0", "type": "range" }, @@ -40,8 +49,8 @@ "_spec": "glob@^7.0.3", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -81,8 +90,8 @@ "main": "glob.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "glob", diff --git a/tools/eslint/node_modules/globals/package.json b/tools/eslint/node_modules/globals/package.json index 2a64d7eb6c..8c2c63260b 100644 --- a/tools/eslint/node_modules/globals/package.json +++ b/tools/eslint/node_modules/globals/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "globals@^9.2.0", + { + "raw": "globals@^9.2.0", + "scope": null, + "escapedName": "globals", + "name": "globals", + "rawSpec": "^9.2.0", + "spec": ">=9.2.0 <10.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/globals-9.9.0.tgz_1467581255981_0.6368429779540747" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "globals", "raw": "globals@^9.2.0", - "rawSpec": "^9.2.0", "scope": null, + "escapedName": "globals", + "name": "globals", + "rawSpec": "^9.2.0", "spec": ">=9.2.0 <10.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "globals@^9.2.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -77,20 +86,20 @@ "license": "MIT", "maintainers": [ { - "email": "ben@byk.im", - "name": "byk" + "name": "byk", + "email": "ben@byk.im" }, { - "email": "schreck.mathias@gmail.com", - "name": "lo1tuma" + "name": "lo1tuma", + "email": "schreck.mathias@gmail.com" }, { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" + "name": "nzakas", + "email": "nicholas@nczconsulting.com" }, { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "globals", diff --git a/tools/eslint/node_modules/globby/package.json b/tools/eslint/node_modules/globby/package.json index bced4bf1ce..f79cc15fa2 100644 --- a/tools/eslint/node_modules/globby/package.json +++ b/tools/eslint/node_modules/globby/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "globby@^5.0.0", + { + "raw": "globby@^5.0.0", + "scope": null, + "escapedName": "globby", + "name": "globby", + "rawSpec": "^5.0.0", + "spec": ">=5.0.0 <6.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/del" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/globby-5.0.0.tgz_1465626598422_0.48254713881760836" }, "_npmUser": { - "email": "ult_combo@hotmail.com", - "name": "ult_combo" + "name": "ult_combo", + "email": "ult_combo@hotmail.com" }, "_npmVersion": "3.7.5", "_phantomChildren": {}, "_requested": { - "name": "globby", "raw": "globby@^5.0.0", - "rawSpec": "^5.0.0", "scope": null, + "escapedName": "globby", + "name": "globby", + "rawSpec": "^5.0.0", "spec": ">=5.0.0 <6.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "globby@^5.0.0", "_where": "/Users/trott/io.js/tools/node_modules/del", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -110,16 +119,16 @@ "license": "MIT", "maintainers": [ { - "email": "michael@schnittstabil.de", - "name": "schnittstabil" + "name": "schnittstabil", + "email": "michael@schnittstabil.de" }, { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "ultcombo@gmail.com", - "name": "ult_combo" + "name": "ult_combo", + "email": "ultcombo@gmail.com" } ], "name": "globby", diff --git a/tools/eslint/node_modules/graceful-fs/README.md b/tools/eslint/node_modules/graceful-fs/README.md index d0dcd49254..5273a50ad6 100644 --- a/tools/eslint/node_modules/graceful-fs/README.md +++ b/tools/eslint/node_modules/graceful-fs/README.md @@ -7,7 +7,7 @@ The improvements are meant to normalize behavior across different platforms and environments, and to make filesystem access more resilient to errors. -## Improvements over [fs module](http://api.nodejs.org/fs.html) +## Improvements over [fs module](https://nodejs.org/api/fs.html) * Queues up `open` and `readdir` calls, and retries them once something closes if there is an EMFILE error from too many file diff --git a/tools/eslint/node_modules/graceful-fs/package.json b/tools/eslint/node_modules/graceful-fs/package.json index 2e31d3f264..417c5b3b1c 100644 --- a/tools/eslint/node_modules/graceful-fs/package.json +++ b/tools/eslint/node_modules/graceful-fs/package.json @@ -1,40 +1,48 @@ { "_args": [ [ - "graceful-fs@^4.1.2", + { + "raw": "graceful-fs@^4.1.2", + "scope": null, + "escapedName": "graceful-fs", + "name": "graceful-fs", + "rawSpec": "^4.1.2", + "spec": ">=4.1.2 <5.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/flat-cache" ] ], "_from": "graceful-fs@>=4.1.2 <5.0.0", - "_id": "graceful-fs@4.1.4", + "_id": "graceful-fs@4.1.5", "_inCache": true, "_installable": true, "_location": "/graceful-fs", - "_nodeVersion": "5.6.0", + "_nodeVersion": "4.4.4", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/graceful-fs-4.1.4.tgz_1462474854900_0.9423982477746904" + "tmp": "tmp/graceful-fs-4.1.5.tgz_1469558843062_0.986795610981062" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, - "_npmVersion": "3.8.9", + "_npmVersion": "3.10.6", "_phantomChildren": {}, "_requested": { - "name": "graceful-fs", "raw": "graceful-fs@^4.1.2", - "rawSpec": "^4.1.2", "scope": null, + "escapedName": "graceful-fs", + "name": "graceful-fs", + "rawSpec": "^4.1.2", "spec": ">=4.1.2 <5.0.0", "type": "range" }, "_requiredBy": [ - "/flat-cache", - "/read-json-sync" + "/flat-cache" ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz", - "_shasum": "ef089d2880f033b011823ce5c8fae798da775dbd", + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz", + "_shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0", "_shrinkwrap": null, "_spec": "graceful-fs@^4.1.2", "_where": "/Users/trott/io.js/tools/node_modules/flat-cache", @@ -52,8 +60,8 @@ "test": "test" }, "dist": { - "shasum": "ef089d2880f033b011823ce5c8fae798da775dbd", - "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz" + "shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0", + "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz" }, "engines": { "node": ">=0.4.0" @@ -64,7 +72,7 @@ "legacy-streams.js", "polyfills.js" ], - "gitHead": "fe8f05ccc2779d1dfa6db6173f3ed64f1e9aa72c", + "gitHead": "d170f3f2ceb56adb4d6bd50df4b535bed54120c0", "homepage": "https://github.com/isaacs/node-graceful-fs#readme", "keywords": [ "fs", @@ -86,8 +94,8 @@ "main": "graceful-fs.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "graceful-fs", @@ -100,5 +108,5 @@ "scripts": { "test": "node test.js | tap -" }, - "version": "4.1.4" + "version": "4.1.5" } diff --git a/tools/eslint/node_modules/graceful-fs/polyfills.js b/tools/eslint/node_modules/graceful-fs/polyfills.js index 5e4f480461..1cc74c8236 100644 --- a/tools/eslint/node_modules/graceful-fs/polyfills.js +++ b/tools/eslint/node_modules/graceful-fs/polyfills.js @@ -44,28 +44,28 @@ function patch (fs) { fs.fchown = chownFix(fs.fchown) fs.lchown = chownFix(fs.lchown) - fs.chmod = chownFix(fs.chmod) - fs.fchmod = chownFix(fs.fchmod) - fs.lchmod = chownFix(fs.lchmod) + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) fs.chownSync = chownFixSync(fs.chownSync) fs.fchownSync = chownFixSync(fs.fchownSync) fs.lchownSync = chownFixSync(fs.lchownSync) - fs.chmodSync = chownFix(fs.chmodSync) - fs.fchmodSync = chownFix(fs.fchmodSync) - fs.lchmodSync = chownFix(fs.lchmodSync) + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) // if lchmod/lchown do not exist, then make them no-ops if (!fs.lchmod) { fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) + if (cb) process.nextTick(cb) } fs.lchmodSync = function () {} } if (!fs.lchown) { fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) + if (cb) process.nextTick(cb) } fs.lchownSync = function () {} } @@ -121,20 +121,19 @@ function patch (fs) { function patchLchmod (fs) { fs.lchmod = function (path, mode, callback) { - callback = callback || noop fs.open( path , constants.O_WRONLY | constants.O_SYMLINK , mode , function (err, fd) { if (err) { - callback(err) + if (callback) callback(err) return } // prefer to return the chmod error, if one occurs, // but still try to close, and report closing errors if they occur. fs.fchmod(fd, mode, function (err) { fs.close(fd, function(err2) { - callback(err || err2) + if (callback) callback(err || err2) }) }) }) @@ -167,11 +166,13 @@ function patchLutimes (fs) { if (constants.hasOwnProperty("O_SYMLINK")) { fs.lutimes = function (path, at, mt, cb) { fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) + if (er) { + if (cb) cb(er) + return + } fs.futimes(fd, at, mt, function (er) { fs.close(fd, function (er2) { - return cb(er || er2) + if (cb) cb(er || er2) }) }) }) @@ -197,17 +198,39 @@ function patchLutimes (fs) { } } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } fs.lutimesSync = function () {} } } +function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er, res) { + if (chownErOk(er)) er = null + if (cb) cb(er, res) + }) + } +} + +function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + + function chownFix (orig) { if (!orig) return orig return function (target, uid, gid, cb) { return orig.call(fs, target, uid, gid, function (er, res) { if (chownErOk(er)) er = null - cb(er, res) + if (cb) cb(er, res) }) } } diff --git a/tools/eslint/node_modules/has-ansi/package.json b/tools/eslint/node_modules/has-ansi/package.json index e82a8e7386..43cb7328ad 100644 --- a/tools/eslint/node_modules/has-ansi/package.json +++ b/tools/eslint/node_modules/has-ansi/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "has-ansi@^2.0.0", + { + "raw": "has-ansi@^2.0.0", + "scope": null, + "escapedName": "has-ansi", + "name": "has-ansi", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/chalk" ] ], @@ -12,16 +20,17 @@ "_location": "/has-ansi", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "has-ansi", "raw": "has-ansi@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "has-ansi", + "name": "has-ansi", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "has-ansi@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/chalk", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -88,12 +97,12 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "name": "jbnicolai", + "email": "jappelman@xebia.com" } ], "name": "has-ansi", diff --git a/tools/eslint/node_modules/ignore/package.json b/tools/eslint/node_modules/ignore/package.json index 6853d1afc8..a1198d589b 100644 --- a/tools/eslint/node_modules/ignore/package.json +++ b/tools/eslint/node_modules/ignore/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "ignore@^3.1.2", + { + "raw": "ignore@^3.1.2", + "scope": null, + "escapedName": "ignore", + "name": "ignore", + "rawSpec": "^3.1.2", + "spec": ">=3.1.2 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/ignore-3.1.3.tgz_1466563368081_0.9863177102524787" }, "_npmUser": { - "email": "i@kael.me", - "name": "kael" + "name": "kael", + "email": "i@kael.me" }, "_npmVersion": "3.9.3", "_phantomChildren": {}, "_requested": { - "name": "ignore", "raw": "ignore@^3.1.2", - "rawSpec": "^3.1.2", "scope": null, + "escapedName": "ignore", + "name": "ignore", + "rawSpec": "^3.1.2", "spec": ">=3.1.2 <4.0.0", "type": "range" }, @@ -79,8 +88,8 @@ "main": "./ignore.js", "maintainers": [ { - "email": "i@kael.me", - "name": "kael" + "name": "kael", + "email": "i@kael.me" } ], "name": "ignore", diff --git a/tools/eslint/node_modules/imurmurhash/package.json b/tools/eslint/node_modules/imurmurhash/package.json index f330ef054a..ff9909c180 100644 --- a/tools/eslint/node_modules/imurmurhash/package.json +++ b/tools/eslint/node_modules/imurmurhash/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "imurmurhash@^0.1.4", + { + "raw": "imurmurhash@^0.1.4", + "scope": null, + "escapedName": "imurmurhash", + "name": "imurmurhash", + "rawSpec": "^0.1.4", + "spec": ">=0.1.4 <0.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/imurmurhash", "_npmUser": { - "email": "jensyt@gmail.com", - "name": "jensyt" + "name": "jensyt", + "email": "jensyt@gmail.com" }, "_npmVersion": "1.3.2", "_phantomChildren": {}, "_requested": { - "name": "imurmurhash", "raw": "imurmurhash@^0.1.4", - "rawSpec": "^0.1.4", "scope": null, + "escapedName": "imurmurhash", + "name": "imurmurhash", + "rawSpec": "^0.1.4", "spec": ">=0.1.4 <0.2.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "imurmurhash@^0.1.4", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "jensyt@gmail.com", "name": "Jens Taylor", + "email": "jensyt@gmail.com", "url": "https://github.com/homebrewing" }, "bugs": { @@ -69,8 +78,8 @@ "main": "imurmurhash.js", "maintainers": [ { - "email": "jensyt@gmail.com", - "name": "jensyt" + "name": "jensyt", + "email": "jensyt@gmail.com" } ], "name": "imurmurhash", diff --git a/tools/eslint/node_modules/inflight/package.json b/tools/eslint/node_modules/inflight/package.json index 780fe04322..cd270efffe 100644 --- a/tools/eslint/node_modules/inflight/package.json +++ b/tools/eslint/node_modules/inflight/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "inflight@^1.0.4", + { + "raw": "inflight@^1.0.4", + "scope": null, + "escapedName": "inflight", + "name": "inflight", + "rawSpec": "^1.0.4", + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/glob" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/inflight-1.0.5.tgz_1463529611443_0.00041943578980863094" }, "_npmUser": { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "zkat", + "email": "kat@sykosomatic.org" }, "_npmVersion": "3.9.1", "_phantomChildren": {}, "_requested": { - "name": "inflight", "raw": "inflight@^1.0.4", - "rawSpec": "^1.0.4", "scope": null, + "escapedName": "inflight", + "name": "inflight", + "rawSpec": "^1.0.4", "spec": ">=1.0.4 <2.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "inflight@^1.0.4", "_where": "/Users/trott/io.js/tools/node_modules/glob", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -67,20 +76,20 @@ "main": "inflight.js", "maintainers": [ { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "zkat", + "email": "kat@sykosomatic.org" } ], "name": "inflight", diff --git a/tools/eslint/node_modules/inherits/package.json b/tools/eslint/node_modules/inherits/package.json index 715c22e932..2a543ab076 100644 --- a/tools/eslint/node_modules/inherits/package.json +++ b/tools/eslint/node_modules/inherits/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "inherits@~2.0.1", + { + "raw": "inherits@~2.0.1", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/concat-stream" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/inherits", "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "1.3.8", "_phantomChildren": {}, "_requested": { - "name": "inherits", "raw": "inherits@~2.0.1", - "rawSpec": "~2.0.1", "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "~2.0.1", "spec": ">=2.0.1 <2.1.0", "type": "range" }, @@ -61,8 +70,8 @@ "main": "./inherits.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "inherits", diff --git a/tools/eslint/node_modules/inquirer/package.json b/tools/eslint/node_modules/inquirer/package.json index e00360eda2..8a8a134b11 100644 --- a/tools/eslint/node_modules/inquirer/package.json +++ b/tools/eslint/node_modules/inquirer/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "inquirer@^0.12.0", + { + "raw": "inquirer@^0.12.0", + "scope": null, + "escapedName": "inquirer", + "name": "inquirer", + "rawSpec": "^0.12.0", + "spec": ">=0.12.0 <0.13.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/inquirer-0.12.0.tgz_1454990163157_0.11014768108725548" }, "_npmUser": { - "email": "admin@simonboudrias.com", - "name": "sboudrias" + "name": "sboudrias", + "email": "admin@simonboudrias.com" }, "_npmVersion": "3.5.3", "_phantomChildren": {}, "_requested": { - "name": "inquirer", "raw": "inquirer@^0.12.0", - "rawSpec": "^0.12.0", "scope": null, + "escapedName": "inquirer", + "name": "inquirer", + "rawSpec": "^0.12.0", "spec": ">=0.12.0 <0.13.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "inquirer@^0.12.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "admin@simonboudrias.com", - "name": "Simon Boudrias" + "name": "Simon Boudrias", + "email": "admin@simonboudrias.com" }, "bugs": { "url": "https://github.com/sboudrias/Inquirer.js/issues" @@ -93,8 +102,8 @@ "main": "lib/inquirer.js", "maintainers": [ { - "email": "admin@simonboudrias.com", - "name": "sboudrias" + "name": "sboudrias", + "email": "admin@simonboudrias.com" } ], "name": "inquirer", diff --git a/tools/eslint/node_modules/is-fullwidth-code-point/package.json b/tools/eslint/node_modules/is-fullwidth-code-point/package.json index bbd8013bf3..f179608ad0 100644 --- a/tools/eslint/node_modules/is-fullwidth-code-point/package.json +++ b/tools/eslint/node_modules/is-fullwidth-code-point/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "is-fullwidth-code-point@^1.0.0", + { + "raw": "is-fullwidth-code-point@^1.0.0", + "scope": null, + "escapedName": "is-fullwidth-code-point", + "name": "is-fullwidth-code-point", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/readline2" ] ], @@ -12,16 +20,17 @@ "_location": "/is-fullwidth-code-point", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "is-fullwidth-code-point", "raw": "is-fullwidth-code-point@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "is-fullwidth-code-point", + "name": "is-fullwidth-code-point", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "is-fullwidth-code-point@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/readline2", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -83,8 +92,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "is-fullwidth-code-point", diff --git a/tools/eslint/node_modules/is-my-json-valid/package.json b/tools/eslint/node_modules/is-my-json-valid/package.json index 3f3a520706..f71efcbd61 100644 --- a/tools/eslint/node_modules/is-my-json-valid/package.json +++ b/tools/eslint/node_modules/is-my-json-valid/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "is-my-json-valid@^2.10.0", + { + "raw": "is-my-json-valid@^2.10.0", + "scope": null, + "escapedName": "is-my-json-valid", + "name": "is-my-json-valid", + "rawSpec": "^2.10.0", + "spec": ">=2.10.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/is-my-json-valid-2.13.1.tgz_1456180270224_0.17748022079467773" }, "_npmUser": { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" }, "_npmVersion": "2.14.7", "_phantomChildren": {}, "_requested": { - "name": "is-my-json-valid", "raw": "is-my-json-valid@^2.10.0", - "rawSpec": "^2.10.0", "scope": null, + "escapedName": "is-my-json-valid", + "name": "is-my-json-valid", + "rawSpec": "^2.10.0", "spec": ">=2.10.0 <3.0.0", "type": "range" }, @@ -70,20 +79,20 @@ "main": "index.js", "maintainers": [ { - "email": "freeall@gmail.com", - "name": "freeall" + "name": "freeall", + "email": "freeall@gmail.com" }, { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" }, { - "email": "w@tson.dk", - "name": "watson" + "name": "watson", + "email": "w@tson.dk" }, { - "email": "i@yoshuawuyts.com", - "name": "yoshuawuyts" + "name": "yoshuawuyts", + "email": "i@yoshuawuyts.com" } ], "name": "is-my-json-valid", diff --git a/tools/eslint/node_modules/is-path-cwd/package.json b/tools/eslint/node_modules/is-path-cwd/package.json index 66686a815f..c513c2bc6e 100644 --- a/tools/eslint/node_modules/is-path-cwd/package.json +++ b/tools/eslint/node_modules/is-path-cwd/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "is-path-cwd@^1.0.0", + { + "raw": "is-path-cwd@^1.0.0", + "scope": null, + "escapedName": "is-path-cwd", + "name": "is-path-cwd", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/del" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/is-path-cwd", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "1.4.21", "_phantomChildren": {}, "_requested": { - "name": "is-path-cwd", "raw": "is-path-cwd@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "is-path-cwd", + "name": "is-path-cwd", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "is-path-cwd@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/del", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -70,8 +79,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "is-path-cwd", diff --git a/tools/eslint/node_modules/is-path-in-cwd/package.json b/tools/eslint/node_modules/is-path-in-cwd/package.json index 771793e891..e2e6c0264f 100644 --- a/tools/eslint/node_modules/is-path-in-cwd/package.json +++ b/tools/eslint/node_modules/is-path-in-cwd/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "is-path-in-cwd@^1.0.0", + { + "raw": "is-path-in-cwd@^1.0.0", + "scope": null, + "escapedName": "is-path-in-cwd", + "name": "is-path-in-cwd", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/del" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/is-path-in-cwd", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "1.4.21", "_phantomChildren": {}, "_requested": { - "name": "is-path-in-cwd", "raw": "is-path-in-cwd@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "is-path-in-cwd", + "name": "is-path-in-cwd", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "is-path-in-cwd@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/del", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -50,7 +59,7 @@ "directories": {}, "dist": { "shasum": "6477582b8214d602346094567003be8a9eac04dc", - "tarball": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz" + "tarball": "http://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz" }, "engines": { "node": ">=0.10.0" @@ -74,8 +83,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "is-path-in-cwd", diff --git a/tools/eslint/node_modules/is-path-inside/package.json b/tools/eslint/node_modules/is-path-inside/package.json index 52ddff568b..2972a7484c 100644 --- a/tools/eslint/node_modules/is-path-inside/package.json +++ b/tools/eslint/node_modules/is-path-inside/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "is-path-inside@^1.0.0", + { + "raw": "is-path-inside@^1.0.0", + "scope": null, + "escapedName": "is-path-inside", + "name": "is-path-inside", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/is-path-in-cwd" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/is-path-inside", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "1.4.21", "_phantomChildren": {}, "_requested": { - "name": "is-path-inside", "raw": "is-path-inside@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "is-path-inside", + "name": "is-path-inside", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "is-path-inside@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/is-path-in-cwd", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -72,8 +81,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "is-path-inside", diff --git a/tools/eslint/node_modules/is-property/package.json b/tools/eslint/node_modules/is-property/package.json index fd059a345a..2831943936 100644 --- a/tools/eslint/node_modules/is-property/package.json +++ b/tools/eslint/node_modules/is-property/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "is-property@^1.0.0", + { + "raw": "is-property@^1.0.0", + "scope": null, + "escapedName": "is-property", + "name": "is-property", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/generate-object-property" ] ], @@ -12,16 +20,17 @@ "_location": "/is-property", "_nodeVersion": "0.10.26", "_npmUser": { - "email": "mikolalysenko@gmail.com", - "name": "mikolalysenko" + "name": "mikolalysenko", + "email": "mikolalysenko@gmail.com" }, "_npmVersion": "2.1.4", "_phantomChildren": {}, "_requested": { - "name": "is-property", "raw": "is-property@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "is-property", + "name": "is-property", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -49,7 +58,7 @@ }, "dist": { "shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84", - "tarball": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" + "tarball": "http://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" }, "gitHead": "0a85ea5b6b1264ea1cdecc6e5cf186adbb3ffc50", "homepage": "https://github.com/mikolalysenko/is-property", @@ -66,8 +75,8 @@ "main": "is-property.js", "maintainers": [ { - "email": "mikolalysenko@gmail.com", - "name": "mikolalysenko" + "name": "mikolalysenko", + "email": "mikolalysenko@gmail.com" } ], "name": "is-property", diff --git a/tools/eslint/node_modules/is-resolvable/package.json b/tools/eslint/node_modules/is-resolvable/package.json index 850f387864..ae3aeb7a0a 100644 --- a/tools/eslint/node_modules/is-resolvable/package.json +++ b/tools/eslint/node_modules/is-resolvable/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "is-resolvable@^1.0.0", + { + "raw": "is-resolvable@^1.0.0", + "scope": null, + "escapedName": "is-resolvable", + "name": "is-resolvable", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/is-resolvable", "_nodeVersion": "2.4.0", "_npmUser": { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" + "name": "shinnn", + "email": "snnskwtnb@gmail.com" }, "_npmVersion": "2.13.1", "_phantomChildren": {}, "_requested": { - "name": "is-resolvable", "raw": "is-resolvable@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "is-resolvable", + "name": "is-resolvable", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -53,7 +62,7 @@ "directories": {}, "dist": { "shasum": "8df57c61ea2e3c501408d100fb013cf8d6e0cc62", - "tarball": "http://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz" + "tarball": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz" }, "files": [ "index.js" @@ -76,8 +85,8 @@ "license": "MIT", "maintainers": [ { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" + "name": "shinnn", + "email": "snnskwtnb@gmail.com" } ], "name": "is-resolvable", diff --git a/tools/eslint/node_modules/isarray/package.json b/tools/eslint/node_modules/isarray/package.json index fade22d0b8..470fd4d1b1 100644 --- a/tools/eslint/node_modules/isarray/package.json +++ b/tools/eslint/node_modules/isarray/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "isarray@~1.0.0", + { + "raw": "isarray@~1.0.0", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/readable-stream" ] ], @@ -12,16 +20,17 @@ "_location": "/isarray", "_nodeVersion": "5.1.0", "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, "_npmVersion": "3.3.12", "_phantomChildren": {}, "_requested": { - "name": "isarray", "raw": "isarray@~1.0.0", - "rawSpec": "~1.0.0", "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "~1.0.0", "spec": ">=1.0.0 <1.1.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "isarray@~1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/readable-stream", "author": { - "email": "mail@juliangruber.com", "name": "Julian Gruber", + "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "bugs": { @@ -50,7 +59,7 @@ "directories": {}, "dist": { "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "http://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", "homepage": "https://github.com/juliangruber/isarray", @@ -63,8 +72,8 @@ "main": "index.js", "maintainers": [ { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" } ], "name": "isarray", @@ -78,6 +87,7 @@ "test": "tape test.js" }, "testling": { + "files": "test.js", "browsers": [ "ie/8..latest", "firefox/17..latest", @@ -90,8 +100,7 @@ "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" - ], - "files": "test.js" + ] }, "version": "1.0.0" } diff --git a/tools/eslint/node_modules/js-yaml/package.json b/tools/eslint/node_modules/js-yaml/package.json index e590a2c07c..e42dae4523 100644 --- a/tools/eslint/node_modules/js-yaml/package.json +++ b/tools/eslint/node_modules/js-yaml/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "js-yaml@^3.5.1", + { + "raw": "js-yaml@^3.5.1", + "scope": null, + "escapedName": "js-yaml", + "name": "js-yaml", + "rawSpec": "^3.5.1", + "spec": ">=3.5.1 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/js-yaml-3.6.1.tgz_1462995636349_0.2209061929024756" }, "_npmUser": { - "email": "vitaly@rcdesign.ru", - "name": "vitaly" + "name": "vitaly", + "email": "vitaly@rcdesign.ru" }, "_npmVersion": "2.15.1", "_phantomChildren": {}, "_requested": { - "name": "js-yaml", "raw": "js-yaml@^3.5.1", - "rawSpec": "^3.5.1", "scope": null, + "escapedName": "js-yaml", + "name": "js-yaml", + "rawSpec": "^3.5.1", "spec": ">=3.5.1 <4.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "js-yaml@^3.5.1", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "dervus.grim@gmail.com", - "name": "Vladimir Zapparov" + "name": "Vladimir Zapparov", + "email": "dervus.grim@gmail.com" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -49,18 +58,18 @@ }, "contributors": [ { - "email": "ixti@member.fsf.org", "name": "Aleksey V Zapparov", + "email": "ixti@member.fsf.org", "url": "http://www.ixti.net/" }, { - "email": "vitaly@rcdesign.ru", "name": "Vitaly Puzrin", + "email": "vitaly@rcdesign.ru", "url": "https://github.com/puzrin" }, { - "email": "martin.grenfell@gmail.com", "name": "Martin Grenfell", + "email": "martin.grenfell@gmail.com", "url": "http://got-ravings.blogspot.com" } ], @@ -101,8 +110,8 @@ "license": "MIT", "maintainers": [ { - "email": "vitaly@rcdesign.ru", - "name": "vitaly" + "name": "vitaly", + "email": "vitaly@rcdesign.ru" } ], "name": "js-yaml", diff --git a/tools/eslint/node_modules/json-stable-stringify/package.json b/tools/eslint/node_modules/json-stable-stringify/package.json index 3ce6e06c18..a8b20a3639 100644 --- a/tools/eslint/node_modules/json-stable-stringify/package.json +++ b/tools/eslint/node_modules/json-stable-stringify/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "json-stable-stringify@^1.0.0", + { + "raw": "json-stable-stringify@^1.0.0", + "scope": null, + "escapedName": "json-stable-stringify", + "name": "json-stable-stringify", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/json-stable-stringify-1.0.1.tgz_1454436356521_0.9410459187347442" }, "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" + "name": "substack", + "email": "substack@gmail.com" }, "_npmVersion": "3.4.1", "_phantomChildren": {}, "_requested": { - "name": "json-stable-stringify", "raw": "json-stable-stringify@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "json-stable-stringify", + "name": "json-stable-stringify", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "json-stable-stringify@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "mail@substack.net", "name": "James Halliday", + "email": "mail@substack.net", "url": "http://substack.net" }, "bugs": { @@ -71,8 +80,8 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "json-stable-stringify", @@ -86,6 +95,7 @@ "test": "tape test/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/8..latest", "ff/5", @@ -94,8 +104,7 @@ "chrome/latest", "safari/latest", "opera/latest" - ], - "files": "test/*.js" + ] }, "version": "1.0.1" } diff --git a/tools/eslint/node_modules/jsonify/package.json b/tools/eslint/node_modules/jsonify/package.json index 932982d5ba..3c1a4c2782 100644 --- a/tools/eslint/node_modules/jsonify/package.json +++ b/tools/eslint/node_modules/jsonify/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "jsonify@~0.0.0", + { + "raw": "jsonify@~0.0.0", + "scope": null, + "escapedName": "jsonify", + "name": "jsonify", + "rawSpec": "~0.0.0", + "spec": ">=0.0.0 <0.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/json-stable-stringify" ] ], @@ -16,10 +24,11 @@ "_npmVersion": "1.0.10", "_phantomChildren": {}, "_requested": { - "name": "jsonify", "raw": "jsonify@~0.0.0", - "rawSpec": "~0.0.0", "scope": null, + "escapedName": "jsonify", + "name": "jsonify", + "rawSpec": "~0.0.0", "spec": ">=0.0.0 <0.1.0", "type": "range" }, @@ -50,7 +59,7 @@ }, "dist": { "shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "tarball": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + "tarball": "http://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" }, "engines": { "node": "*" @@ -64,8 +73,8 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "jsonify", diff --git a/tools/eslint/node_modules/jsonpointer/package.json b/tools/eslint/node_modules/jsonpointer/package.json index db8ac7c3f4..e4daa31efa 100644 --- a/tools/eslint/node_modules/jsonpointer/package.json +++ b/tools/eslint/node_modules/jsonpointer/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "jsonpointer@2.0.0", + { + "raw": "jsonpointer@2.0.0", + "scope": null, + "escapedName": "jsonpointer", + "name": "jsonpointer", + "rawSpec": "2.0.0", + "spec": "2.0.0", + "type": "version" + }, "/Users/trott/io.js/tools/node_modules/is-my-json-valid" ] ], @@ -12,16 +20,17 @@ "_location": "/jsonpointer", "_nodeVersion": "0.10.36", "_npmUser": { - "email": "marc.brookman@gmail.com", - "name": "marcbachmann" + "name": "marcbachmann", + "email": "marc.brookman@gmail.com" }, "_npmVersion": "2.10.1", "_phantomChildren": {}, "_requested": { - "name": "jsonpointer", "raw": "jsonpointer@2.0.0", - "rawSpec": "2.0.0", "scope": null, + "escapedName": "jsonpointer", + "name": "jsonpointer", + "rawSpec": "2.0.0", "spec": "2.0.0", "type": "version" }, @@ -34,16 +43,16 @@ "_spec": "jsonpointer@2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/is-my-json-valid", "author": { - "email": "jan@apache.org", - "name": "Jan Lehnardt" + "name": "Jan Lehnardt", + "email": "jan@apache.org" }, "bugs": { "url": "http://github.com/janl/node-jsonpointer/issues" }, "contributors": [ { - "email": "joe-github@cursive.net", - "name": "Joe Hildebrand" + "name": "Joe Hildebrand", + "email": "joe-github@cursive.net" } ], "dependencies": {}, @@ -63,12 +72,12 @@ "main": "./jsonpointer", "maintainers": [ { - "email": "jan@apache.org", - "name": "jan" + "name": "jan", + "email": "jan@apache.org" }, { - "email": "marc.brookman@gmail.com", - "name": "marcbachmann" + "name": "marcbachmann", + "email": "marc.brookman@gmail.com" } ], "name": "jsonpointer", diff --git a/tools/eslint/node_modules/levn/package.json b/tools/eslint/node_modules/levn/package.json index 1b165e0946..847602fe65 100644 --- a/tools/eslint/node_modules/levn/package.json +++ b/tools/eslint/node_modules/levn/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "levn@^0.3.0", + { + "raw": "levn@^0.3.0", + "scope": null, + "escapedName": "levn", + "name": "levn", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/levn", "_nodeVersion": "4.2.4", "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { - "name": "levn", "raw": "levn@^0.3.0", - "rawSpec": "^0.3.0", "scope": null, + "escapedName": "levn", + "name": "levn", + "rawSpec": "^0.3.0", "spec": ">=0.3.0 <0.4.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "levn@^0.3.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" + "name": "George Zahariev", + "email": "z@georgezahariev.com" }, "bugs": { "url": "https://github.com/gkz/levn/issues" @@ -54,7 +63,7 @@ "directories": {}, "dist": { "shasum": "3b09924edf9f083c0490fdd4c0bc4421e04764ee", - "tarball": "http://registry.npmjs.org/levn/-/levn-0.3.0.tgz" + "tarball": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" }, "engines": { "node": ">= 0.8.0" @@ -83,8 +92,8 @@ "main": "./lib/", "maintainers": [ { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" } ], "name": "levn", diff --git a/tools/eslint/node_modules/lodash/README.md b/tools/eslint/node_modules/lodash/README.md index 59cc860c80..2cf1492ccc 100644 --- a/tools/eslint/node_modules/lodash/README.md +++ b/tools/eslint/node_modules/lodash/README.md @@ -1,4 +1,4 @@ -# lodash v4.13.1 +# lodash v4.14.1 The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. @@ -28,7 +28,7 @@ var chunk = require('lodash/chunk'); var extend = require('lodash/fp/extend'); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.13.1-npm) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.14.1-npm) for more details. **Note:**<br> Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` in the Node.js < 6 REPL.<br> @@ -36,5 +36,5 @@ Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes `lodash` ## Support -Tested in Chrome 49-50, Firefox 45-46, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10-6, & PhantomJS 1.9.8.<br> +Tested in Chrome 50-51, Firefox 46-47, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10-6, & PhantomJS 1.9.8.<br> Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/tools/eslint/node_modules/lodash/_addMapEntry.js b/tools/eslint/node_modules/lodash/_addMapEntry.js index 0112ef7442..5a69212160 100644 --- a/tools/eslint/node_modules/lodash/_addMapEntry.js +++ b/tools/eslint/node_modules/lodash/_addMapEntry.js @@ -7,7 +7,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { - // Don't return `Map#set` because it doesn't return the map instance in IE 11. + // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } diff --git a/tools/eslint/node_modules/lodash/_addSetEntry.js b/tools/eslint/node_modules/lodash/_addSetEntry.js index 7b75c13f62..1a07b708ac 100644 --- a/tools/eslint/node_modules/lodash/_addSetEntry.js +++ b/tools/eslint/node_modules/lodash/_addSetEntry.js @@ -7,6 +7,7 @@ * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } diff --git a/tools/eslint/node_modules/lodash/_apply.js b/tools/eslint/node_modules/lodash/_apply.js index d000f04607..36436dda50 100644 --- a/tools/eslint/node_modules/lodash/_apply.js +++ b/tools/eslint/node_modules/lodash/_apply.js @@ -9,8 +9,7 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { - var length = args.length; - switch (length) { + switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); diff --git a/tools/eslint/node_modules/lodash/_baseClamp.js b/tools/eslint/node_modules/lodash/_baseClamp.js index ceadeef1c4..a1c5692927 100644 --- a/tools/eslint/node_modules/lodash/_baseClamp.js +++ b/tools/eslint/node_modules/lodash/_baseClamp.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. + * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. diff --git a/tools/eslint/node_modules/lodash/_baseClone.js b/tools/eslint/node_modules/lodash/_baseClone.js index b1079edd8b..fce3c0c086 100644 --- a/tools/eslint/node_modules/lodash/_baseClone.js +++ b/tools/eslint/node_modules/lodash/_baseClone.js @@ -125,12 +125,12 @@ function baseClone(value, isDeep, isFull, customizer, key, object, stack) { if (!isArr) { var props = isFull ? getAllKeys(value) : keys(value); } - // Recursively populate clone (susceptible to call stack limits). arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } + // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); return result; diff --git a/tools/eslint/node_modules/lodash/_baseConforms.js b/tools/eslint/node_modules/lodash/_baseConforms.js index 396727c42d..947e20d409 100644 --- a/tools/eslint/node_modules/lodash/_baseConforms.js +++ b/tools/eslint/node_modules/lodash/_baseConforms.js @@ -1,4 +1,5 @@ -var keys = require('./keys'); +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); /** * The base implementation of `_.conforms` which doesn't clone `source`. @@ -8,25 +9,9 @@ var keys = require('./keys'); * @returns {Function} Returns the new spec function. */ function baseConforms(source) { - var props = keys(source), - length = props.length; - + var props = keys(source); return function(object) { - if (object == null) { - return !length; - } - var index = length; - while (index--) { - var key = props[index], - predicate = source[key], - value = object[key]; - - if ((value === undefined && - !(key in Object(object))) || !predicate(value)) { - return false; - } - } - return true; + return baseConformsTo(object, source, props); }; } diff --git a/tools/eslint/node_modules/lodash/_baseConformsTo.js b/tools/eslint/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 0000000000..a72deda2d5 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,28 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + var index = length; + while (index--) { + var key = props[index], + predicate = source[key], + value = object[key]; + + if ((value === undefined && + !(key in Object(object))) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/tools/eslint/node_modules/lodash/_baseDelay.js b/tools/eslint/node_modules/lodash/_baseDelay.js index c397562570..1e4e69b68f 100644 --- a/tools/eslint/node_modules/lodash/_baseDelay.js +++ b/tools/eslint/node_modules/lodash/_baseDelay.js @@ -2,13 +2,13 @@ var FUNC_ERROR_TEXT = 'Expected a function'; /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. + * @param {Array} args The arguments to provide to `func`. * @returns {number} Returns the timer id. */ function baseDelay(func, wait, args) { diff --git a/tools/eslint/node_modules/lodash/_baseGetTag.js b/tools/eslint/node_modules/lodash/_baseGetTag.js new file mode 100644 index 0000000000..ce773623cd --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +module.exports = baseGetTag; diff --git a/tools/eslint/node_modules/lodash/_baseGt.js b/tools/eslint/node_modules/lodash/_baseGt.js index 813238b97a..502d273ca8 100644 --- a/tools/eslint/node_modules/lodash/_baseGt.js +++ b/tools/eslint/node_modules/lodash/_baseGt.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. diff --git a/tools/eslint/node_modules/lodash/_baseInRange.js b/tools/eslint/node_modules/lodash/_baseInRange.js index 16d53f2d31..ec95666187 100644 --- a/tools/eslint/node_modules/lodash/_baseInRange.js +++ b/tools/eslint/node_modules/lodash/_baseInRange.js @@ -3,7 +3,7 @@ var nativeMax = Math.max, nativeMin = Math.min; /** - * The base implementation of `_.inRange` which doesn't coerce arguments to numbers. + * The base implementation of `_.inRange` which doesn't coerce arguments. * * @private * @param {number} number The number to check. diff --git a/tools/eslint/node_modules/lodash/_baseIndexOf.js b/tools/eslint/node_modules/lodash/_baseIndexOf.js index 6cda8023c5..94d228996a 100644 --- a/tools/eslint/node_modules/lodash/_baseIndexOf.js +++ b/tools/eslint/node_modules/lodash/_baseIndexOf.js @@ -1,4 +1,5 @@ -var indexOfNaN = require('./_indexOfNaN'); +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. @@ -11,7 +12,7 @@ var indexOfNaN = require('./_indexOfNaN'); */ function baseIndexOf(array, value, fromIndex) { if (value !== value) { - return indexOfNaN(array, fromIndex); + return baseFindIndex(array, baseIsNaN, fromIndex); } var index = fromIndex - 1, length = array.length; diff --git a/tools/eslint/node_modules/lodash/_baseIsArrayBuffer.js b/tools/eslint/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 0000000000..a380bf7b2c --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,26 @@ +var isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/tools/eslint/node_modules/lodash/_baseIsDate.js b/tools/eslint/node_modules/lodash/_baseIsDate.js new file mode 100644 index 0000000000..01b7c72d46 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,27 @@ +var isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && objectToString.call(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/tools/eslint/node_modules/lodash/_baseIsMap.js b/tools/eslint/node_modules/lodash/_baseIsMap.js new file mode 100644 index 0000000000..02a4021cab --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/tools/eslint/node_modules/lodash/_baseIsNaN.js b/tools/eslint/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 0000000000..316f1eb1ef --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/tools/eslint/node_modules/lodash/_baseIsRegExp.js b/tools/eslint/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 0000000000..6d10b42dee --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,27 @@ +var isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObject(value) && objectToString.call(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/tools/eslint/node_modules/lodash/_baseIsSet.js b/tools/eslint/node_modules/lodash/_baseIsSet.js new file mode 100644 index 0000000000..6dee36716e --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/tools/eslint/node_modules/lodash/_baseIsTypedArray.js b/tools/eslint/node_modules/lodash/_baseIsTypedArray.js new file mode 100644 index 0000000000..5d1e43bdac --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsTypedArray.js @@ -0,0 +1,69 @@ +var isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/tools/eslint/node_modules/lodash/_baseKeys.js b/tools/eslint/node_modules/lodash/_baseKeys.js index 2c8ccb912c..2a27d55546 100644 --- a/tools/eslint/node_modules/lodash/_baseKeys.js +++ b/tools/eslint/node_modules/lodash/_baseKeys.js @@ -1,3 +1,5 @@ +var overArg = require('./_overArg'); + /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = Object.keys; @@ -9,8 +11,6 @@ var nativeKeys = Object.keys; * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ -function baseKeys(object) { - return nativeKeys(Object(object)); -} +var baseKeys = overArg(nativeKeys, Object); module.exports = baseKeys; diff --git a/tools/eslint/node_modules/lodash/_baseLt.js b/tools/eslint/node_modules/lodash/_baseLt.js index aa05efacfc..8674d2946a 100644 --- a/tools/eslint/node_modules/lodash/_baseLt.js +++ b/tools/eslint/node_modules/lodash/_baseLt.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. diff --git a/tools/eslint/node_modules/lodash/_baseMergeDeep.js b/tools/eslint/node_modules/lodash/_baseMergeDeep.js index 062f004c23..535c0d110a 100644 --- a/tools/eslint/node_modules/lodash/_baseMergeDeep.js +++ b/tools/eslint/node_modules/lodash/_baseMergeDeep.js @@ -70,13 +70,12 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta isCommon = false; } } - stack.set(srcValue, newValue); - if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); } - stack['delete'](srcValue); assignMergeValue(object, key, newValue); } diff --git a/tools/eslint/node_modules/lodash/_baseNth.js b/tools/eslint/node_modules/lodash/_baseNth.js index 6978a651da..0403c2a368 100644 --- a/tools/eslint/node_modules/lodash/_baseNth.js +++ b/tools/eslint/node_modules/lodash/_baseNth.js @@ -1,7 +1,7 @@ var isIndex = require('./_isIndex'); /** - * The base implementation of `_.nth` which doesn't coerce `n` to an integer. + * The base implementation of `_.nth` which doesn't coerce arguments. * * @private * @param {Array} array The array to query. diff --git a/tools/eslint/node_modules/lodash/_basePick.js b/tools/eslint/node_modules/lodash/_basePick.js index 7272548307..add3600206 100644 --- a/tools/eslint/node_modules/lodash/_basePick.js +++ b/tools/eslint/node_modules/lodash/_basePick.js @@ -1,4 +1,4 @@ -var arrayReduce = require('./_arrayReduce'); +var basePickBy = require('./_basePickBy'); /** * The base implementation of `_.pick` without support for individual @@ -11,12 +11,9 @@ var arrayReduce = require('./_arrayReduce'); */ function basePick(object, props) { object = Object(object); - return arrayReduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); + return basePickBy(object, props, function(value, key) { + return key in object; + }); } module.exports = basePick; diff --git a/tools/eslint/node_modules/lodash/_basePickBy.js b/tools/eslint/node_modules/lodash/_basePickBy.js index 56ffa5f5d7..fcc66105a8 100644 --- a/tools/eslint/node_modules/lodash/_basePickBy.js +++ b/tools/eslint/node_modules/lodash/_basePickBy.js @@ -1,16 +1,14 @@ -var getAllKeysIn = require('./_getAllKeysIn'); - /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. + * @param {string[]} props The property identifiers to pick from. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ -function basePickBy(object, predicate) { +function basePickBy(object, props, predicate) { var index = -1, - props = getAllKeysIn(object), length = props.length, result = {}; diff --git a/tools/eslint/node_modules/lodash/_basePropertyOf.js b/tools/eslint/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 0000000000..4617399908 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/tools/eslint/node_modules/lodash/_baseRange.js b/tools/eslint/node_modules/lodash/_baseRange.js index 02d4ae25f0..0fb8e419fb 100644 --- a/tools/eslint/node_modules/lodash/_baseRange.js +++ b/tools/eslint/node_modules/lodash/_baseRange.js @@ -4,7 +4,7 @@ var nativeCeil = Math.ceil, /** * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments to numbers. + * coerce arguments. * * @private * @param {number} start The start of the range. diff --git a/tools/eslint/node_modules/lodash/_baseRest.js b/tools/eslint/node_modules/lodash/_baseRest.js new file mode 100644 index 0000000000..d8aa217c66 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseRest.js @@ -0,0 +1,35 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +module.exports = baseRest; diff --git a/tools/eslint/node_modules/lodash/_baseUnary.js b/tools/eslint/node_modules/lodash/_baseUnary.js index 4db20e22ee..98639e92f6 100644 --- a/tools/eslint/node_modules/lodash/_baseUnary.js +++ b/tools/eslint/node_modules/lodash/_baseUnary.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.unary` without support for storing wrapper metadata. + * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. diff --git a/tools/eslint/node_modules/lodash/_checkGlobal.js b/tools/eslint/node_modules/lodash/_checkGlobal.js deleted file mode 100644 index b0ea47e129..0000000000 --- a/tools/eslint/node_modules/lodash/_checkGlobal.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ -function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; -} - -module.exports = checkGlobal; diff --git a/tools/eslint/node_modules/lodash/_copyObject.js b/tools/eslint/node_modules/lodash/_copyObject.js index 474d17bb87..7d267b2e55 100644 --- a/tools/eslint/node_modules/lodash/_copyObject.js +++ b/tools/eslint/node_modules/lodash/_copyObject.js @@ -21,9 +21,9 @@ function copyObject(source, props, object, customizer) { var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + assignValue(object, key, newValue === undefined ? source[key] : newValue); } return object; } diff --git a/tools/eslint/node_modules/lodash/_createAggregator.js b/tools/eslint/node_modules/lodash/_createAggregator.js index 7f7afd2c1b..0be42c41cd 100644 --- a/tools/eslint/node_modules/lodash/_createAggregator.js +++ b/tools/eslint/node_modules/lodash/_createAggregator.js @@ -16,7 +16,7 @@ function createAggregator(setter, initializer) { var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; - return func(collection, setter, baseIteratee(iteratee), accumulator); + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); }; } diff --git a/tools/eslint/node_modules/lodash/_createAssigner.js b/tools/eslint/node_modules/lodash/_createAssigner.js index e0ba582ff7..1f904c51bd 100644 --- a/tools/eslint/node_modules/lodash/_createAssigner.js +++ b/tools/eslint/node_modules/lodash/_createAssigner.js @@ -1,5 +1,5 @@ -var isIterateeCall = require('./_isIterateeCall'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); /** * Creates a function like `_.assign`. @@ -9,7 +9,7 @@ var isIterateeCall = require('./_isIterateeCall'), * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, diff --git a/tools/eslint/node_modules/lodash/_createBaseWrapper.js b/tools/eslint/node_modules/lodash/_createBind.js index c365621bd7..aadc94380b 100644 --- a/tools/eslint/node_modules/lodash/_createBaseWrapper.js +++ b/tools/eslint/node_modules/lodash/_createBind.js @@ -1,7 +1,7 @@ -var createCtorWrapper = require('./_createCtorWrapper'), +var createCtor = require('./_createCtor'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1; /** @@ -10,14 +10,13 @@ var BIND_FLAG = 1; * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ -function createBaseWrapper(func, bitmask, thisArg) { +function createBind(func, bitmask, thisArg) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -26,4 +25,4 @@ function createBaseWrapper(func, bitmask, thisArg) { return wrapper; } -module.exports = createBaseWrapper; +module.exports = createBind; diff --git a/tools/eslint/node_modules/lodash/_createCtorWrapper.js b/tools/eslint/node_modules/lodash/_createCtor.js index 17e1bd8314..ee904f4ff3 100644 --- a/tools/eslint/node_modules/lodash/_createCtorWrapper.js +++ b/tools/eslint/node_modules/lodash/_createCtor.js @@ -9,7 +9,7 @@ var baseCreate = require('./_baseCreate'), * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ -function createCtorWrapper(Ctor) { +function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist @@ -34,4 +34,4 @@ function createCtorWrapper(Ctor) { }; } -module.exports = createCtorWrapper; +module.exports = createCtor; diff --git a/tools/eslint/node_modules/lodash/_createCurryWrapper.js b/tools/eslint/node_modules/lodash/_createCurry.js index d765b84d01..f06c2cdd85 100644 --- a/tools/eslint/node_modules/lodash/_createCurryWrapper.js +++ b/tools/eslint/node_modules/lodash/_createCurry.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), - createCtorWrapper = require('./_createCtorWrapper'), - createHybridWrapper = require('./_createHybridWrapper'), - createRecurryWrapper = require('./_createRecurryWrapper'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); @@ -11,13 +11,12 @@ var apply = require('./_apply'), * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createCurryWrapper(func, bitmask, arity) { - var Ctor = createCtorWrapper(func); +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); function wrapper() { var length = arguments.length, @@ -34,8 +33,8 @@ function createCurryWrapper(func, bitmask, arity) { length -= holders.length; if (length < arity) { - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, undefined, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -44,4 +43,4 @@ function createCurryWrapper(func, bitmask, arity) { return wrapper; } -module.exports = createCurryWrapper; +module.exports = createCurry; diff --git a/tools/eslint/node_modules/lodash/_createFind.js b/tools/eslint/node_modules/lodash/_createFind.js index 0a84618eb7..8859ff89f4 100644 --- a/tools/eslint/node_modules/lodash/_createFind.js +++ b/tools/eslint/node_modules/lodash/_createFind.js @@ -12,18 +12,13 @@ var baseIteratee = require('./_baseIteratee'), function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); - predicate = baseIteratee(predicate, 3); if (!isArrayLike(collection)) { - var props = keys(collection); + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } - var index = findIndexFunc(props || collection, function(value, key) { - if (props) { - key = value; - value = iterable[key]; - } - return predicate(value, key, iterable); - }, fromIndex); - return index > -1 ? collection[props ? props[index] : index] : undefined; + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } diff --git a/tools/eslint/node_modules/lodash/_createFlow.js b/tools/eslint/node_modules/lodash/_createFlow.js index 6b5ee54be1..911aaf15ca 100644 --- a/tools/eslint/node_modules/lodash/_createFlow.js +++ b/tools/eslint/node_modules/lodash/_createFlow.js @@ -1,10 +1,10 @@ var LodashWrapper = require('./_LodashWrapper'), baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), getData = require('./_getData'), getFuncName = require('./_getFuncName'), isArray = require('./isArray'), - isLaziable = require('./_isLaziable'), - rest = require('./rest'); + isLaziable = require('./_isLaziable'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -12,7 +12,7 @@ var LARGE_ARRAY_SIZE = 200; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var CURRY_FLAG = 8, PARTIAL_FLAG = 32, ARY_FLAG = 128, @@ -26,7 +26,7 @@ var CURRY_FLAG = 8, * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { - return rest(function(funcs) { + return baseRest(function(funcs) { funcs = baseFlatten(funcs, 1); var length = funcs.length, diff --git a/tools/eslint/node_modules/lodash/_createHybridWrapper.js b/tools/eslint/node_modules/lodash/_createHybrid.js index e433640af1..1594b886cb 100644 --- a/tools/eslint/node_modules/lodash/_createHybridWrapper.js +++ b/tools/eslint/node_modules/lodash/_createHybrid.js @@ -1,14 +1,14 @@ var composeArgs = require('./_composeArgs'), composeArgsRight = require('./_composeArgsRight'), countHolders = require('./_countHolders'), - createCtorWrapper = require('./_createCtorWrapper'), - createRecurryWrapper = require('./_createRecurryWrapper'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), getHolder = require('./_getHolder'), reorder = require('./_reorder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_FLAG = 8, @@ -22,8 +22,7 @@ var BIND_FLAG = 1, * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. @@ -36,13 +35,13 @@ var BIND_FLAG = 1, * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & ARY_FLAG, isBind = bitmask & BIND_FLAG, isBindKey = bitmask & BIND_KEY_FLAG, isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), isFlip = bitmask & FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); + Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, @@ -65,8 +64,8 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } @@ -83,11 +82,11 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials args.length = ary; } if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(fn); + fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } -module.exports = createHybridWrapper; +module.exports = createHybrid; diff --git a/tools/eslint/node_modules/lodash/_createMathOperation.js b/tools/eslint/node_modules/lodash/_createMathOperation.js index e750e98b1e..f1e238ac0a 100644 --- a/tools/eslint/node_modules/lodash/_createMathOperation.js +++ b/tools/eslint/node_modules/lodash/_createMathOperation.js @@ -6,13 +6,14 @@ var baseToNumber = require('./_baseToNumber'), * * @private * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */ -function createMathOperation(operator) { +function createMathOperation(operator, defaultValue) { return function(value, other) { var result; if (value === undefined && other === undefined) { - return 0; + return defaultValue; } if (value !== undefined) { result = value; diff --git a/tools/eslint/node_modules/lodash/_createOver.js b/tools/eslint/node_modules/lodash/_createOver.js index e5f9b8b914..723182dc1a 100644 --- a/tools/eslint/node_modules/lodash/_createOver.js +++ b/tools/eslint/node_modules/lodash/_createOver.js @@ -2,10 +2,9 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUnary = require('./_baseUnary'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - rest = require('./rest'); + isArray = require('./isArray'); /** * Creates a function like `_.over`. @@ -15,12 +14,12 @@ var apply = require('./_apply'), * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { - return rest(function(iteratees) { + return baseRest(function(iteratees) { iteratees = (iteratees.length == 1 && isArray(iteratees[0])) ? arrayMap(iteratees[0], baseUnary(baseIteratee)) - : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(baseIteratee)); + : arrayMap(baseFlatten(iteratees, 1), baseUnary(baseIteratee)); - return rest(function(args) { + return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { return apply(iteratee, thisArg, args); diff --git a/tools/eslint/node_modules/lodash/_createPartialWrapper.js b/tools/eslint/node_modules/lodash/_createPartial.js index cc4314ef9f..fc2bf8be23 100644 --- a/tools/eslint/node_modules/lodash/_createPartialWrapper.js +++ b/tools/eslint/node_modules/lodash/_createPartial.js @@ -1,8 +1,8 @@ var apply = require('./_apply'), - createCtorWrapper = require('./_createCtorWrapper'), + createCtor = require('./_createCtor'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1; /** @@ -11,16 +11,15 @@ var BIND_FLAG = 1; * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ -function createPartialWrapper(func, bitmask, thisArg, partials) { +function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -41,4 +40,4 @@ function createPartialWrapper(func, bitmask, thisArg, partials) { return wrapper; } -module.exports = createPartialWrapper; +module.exports = createPartial; diff --git a/tools/eslint/node_modules/lodash/_createRange.js b/tools/eslint/node_modules/lodash/_createRange.js index 9728563660..9f52c77932 100644 --- a/tools/eslint/node_modules/lodash/_createRange.js +++ b/tools/eslint/node_modules/lodash/_createRange.js @@ -1,6 +1,6 @@ var baseRange = require('./_baseRange'), isIterateeCall = require('./_isIterateeCall'), - toNumber = require('./toNumber'); + toFinite = require('./toFinite'); /** * Creates a `_.range` or `_.rangeRight` function. @@ -15,15 +15,14 @@ function createRange(fromRight) { end = step = undefined; } // Ensure the sign of `-0` is preserved. - start = toNumber(start); - start = start === start ? start : 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } - step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0); + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } diff --git a/tools/eslint/node_modules/lodash/_createRecurryWrapper.js b/tools/eslint/node_modules/lodash/_createRecurry.js index 63c096ad73..35a22e586f 100644 --- a/tools/eslint/node_modules/lodash/_createRecurryWrapper.js +++ b/tools/eslint/node_modules/lodash/_createRecurry.js @@ -1,7 +1,8 @@ var isLaziable = require('./_isLaziable'), - setData = require('./_setData'); + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, @@ -14,8 +15,7 @@ var BIND_FLAG = 1, * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. @@ -27,7 +27,7 @@ var BIND_FLAG = 1, * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, @@ -50,7 +50,7 @@ function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, par setData(result, newData); } result.placeholder = placeholder; - return result; + return setWrapToString(result, func, bitmask); } -module.exports = createRecurryWrapper; +module.exports = createRecurry; diff --git a/tools/eslint/node_modules/lodash/_createSet.js b/tools/eslint/node_modules/lodash/_createSet.js index ae24d05939..0f644eeae6 100644 --- a/tools/eslint/node_modules/lodash/_createSet.js +++ b/tools/eslint/node_modules/lodash/_createSet.js @@ -6,7 +6,7 @@ var Set = require('./_Set'), var INFINITY = 1 / 0; /** - * Creates a set of `values`. + * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. diff --git a/tools/eslint/node_modules/lodash/_createWrapper.js b/tools/eslint/node_modules/lodash/_createWrap.js index c77e763952..6afe6b5f3e 100644 --- a/tools/eslint/node_modules/lodash/_createWrapper.js +++ b/tools/eslint/node_modules/lodash/_createWrap.js @@ -1,17 +1,18 @@ var baseSetData = require('./_baseSetData'), - createBaseWrapper = require('./_createBaseWrapper'), - createCurryWrapper = require('./_createCurryWrapper'), - createHybridWrapper = require('./_createHybridWrapper'), - createPartialWrapper = require('./_createPartialWrapper'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), getData = require('./_getData'), mergeData = require('./_mergeData'), setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), toInteger = require('./toInteger'); /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_FLAG = 8, @@ -28,7 +29,7 @@ var nativeMax = Math.max; * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. + * @param {number} bitmask The bitmask flags. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -48,7 +49,7 @@ var nativeMax = Math.max; * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); @@ -91,16 +92,16 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == BIND_FLAG) { - var result = createBaseWrapper(func, bitmask, thisArg); + var result = createBind(func, bitmask, thisArg); } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { - result = createCurryWrapper(func, bitmask, arity); + result = createCurry(func, bitmask, arity); } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { - result = createPartialWrapper(func, bitmask, thisArg, partials); + result = createPartial(func, bitmask, thisArg, partials); } else { - result = createHybridWrapper.apply(undefined, newData); + result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; - return setter(result, newData); + return setWrapToString(setter(result, newData), func, bitmask); } -module.exports = createWrapper; +module.exports = createWrap; diff --git a/tools/eslint/node_modules/lodash/_deburrLetter.js b/tools/eslint/node_modules/lodash/_deburrLetter.js index e559dbea7a..f7be3d4f04 100644 --- a/tools/eslint/node_modules/lodash/_deburrLetter.js +++ b/tools/eslint/node_modules/lodash/_deburrLetter.js @@ -1,3 +1,5 @@ +var basePropertyOf = require('./_basePropertyOf'); + /** Used to map latin-1 supplementary letters to basic latin letters. */ var deburredLetters = { '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', @@ -26,8 +28,6 @@ var deburredLetters = { * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ -function deburrLetter(letter) { - return deburredLetters[letter]; -} +var deburrLetter = basePropertyOf(deburredLetters); module.exports = deburrLetter; diff --git a/tools/eslint/node_modules/lodash/_defineProperty.js b/tools/eslint/node_modules/lodash/_defineProperty.js new file mode 100644 index 0000000000..f6128d7760 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +/* Used to set `toString` methods. */ +var defineProperty = (function() { + var func = getNative(Object, 'defineProperty'), + name = getNative.name; + + return (name && name.length > 2) ? func : undefined; +}()); + +module.exports = defineProperty; diff --git a/tools/eslint/node_modules/lodash/_equalArrays.js b/tools/eslint/node_modules/lodash/_equalArrays.js index 17ef31312d..e095170ce3 100644 --- a/tools/eslint/node_modules/lodash/_equalArrays.js +++ b/tools/eslint/node_modules/lodash/_equalArrays.js @@ -29,7 +29,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } // Assume cyclic values are equal. var stacked = stack.get(array); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var index = -1, @@ -37,6 +37,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { @@ -75,6 +76,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](array); + stack['delete'](other); return result; } diff --git a/tools/eslint/node_modules/lodash/_equalByTag.js b/tools/eslint/node_modules/lodash/_equalByTag.js index b3e37bd8a5..d6baa0a555 100644 --- a/tools/eslint/node_modules/lodash/_equalByTag.js +++ b/tools/eslint/node_modules/lodash/_equalByTag.js @@ -1,5 +1,6 @@ var Symbol = require('./_Symbol'), Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), equalArrays = require('./_equalArrays'), mapToArray = require('./_mapToArray'), setToArray = require('./_setToArray'); @@ -63,18 +64,14 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, @@ -98,10 +95,12 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { return stacked == other; } bitmask |= UNORDERED_COMPARE_FLAG; - stack.set(object, other); // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; case symbolTag: if (symbolValueOf) { diff --git a/tools/eslint/node_modules/lodash/_equalObjects.js b/tools/eslint/node_modules/lodash/_equalObjects.js index 9a5d17fac1..92646ed533 100644 --- a/tools/eslint/node_modules/lodash/_equalObjects.js +++ b/tools/eslint/node_modules/lodash/_equalObjects.js @@ -37,11 +37,12 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } // Assume cyclic values are equal. var stacked = stack.get(object); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); + stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { @@ -77,6 +78,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](object); + stack['delete'](other); return result; } diff --git a/tools/eslint/node_modules/lodash/_escapeHtmlChar.js b/tools/eslint/node_modules/lodash/_escapeHtmlChar.js index b21e452b5b..6abceb51c9 100644 --- a/tools/eslint/node_modules/lodash/_escapeHtmlChar.js +++ b/tools/eslint/node_modules/lodash/_escapeHtmlChar.js @@ -1,3 +1,5 @@ +var basePropertyOf = require('./_basePropertyOf'); + /** Used to map characters to HTML entities. */ var htmlEscapes = { '&': '&', @@ -15,8 +17,6 @@ var htmlEscapes = { * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ -function escapeHtmlChar(chr) { - return htmlEscapes[chr]; -} +var escapeHtmlChar = basePropertyOf(htmlEscapes); module.exports = escapeHtmlChar; diff --git a/tools/eslint/node_modules/lodash/_freeGlobal.js b/tools/eslint/node_modules/lodash/_freeGlobal.js new file mode 100644 index 0000000000..bbec998fc8 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/tools/eslint/node_modules/lodash/_getPrototype.js b/tools/eslint/node_modules/lodash/_getPrototype.js index 1ef6d927e3..5724793887 100644 --- a/tools/eslint/node_modules/lodash/_getPrototype.js +++ b/tools/eslint/node_modules/lodash/_getPrototype.js @@ -1,3 +1,5 @@ +var overArg = require('./_overArg'); + /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetPrototype = Object.getPrototypeOf; @@ -8,8 +10,6 @@ var nativeGetPrototype = Object.getPrototypeOf; * @param {*} value The value to query. * @returns {null|Object} Returns the `[[Prototype]]`. */ -function getPrototype(value) { - return nativeGetPrototype(Object(value)); -} +var getPrototype = overArg(nativeGetPrototype, Object); module.exports = getPrototype; diff --git a/tools/eslint/node_modules/lodash/_getSymbols.js b/tools/eslint/node_modules/lodash/_getSymbols.js index 1a76917336..e41dad1d52 100644 --- a/tools/eslint/node_modules/lodash/_getSymbols.js +++ b/tools/eslint/node_modules/lodash/_getSymbols.js @@ -1,7 +1,8 @@ -var stubArray = require('./stubArray'); +var overArg = require('./_overArg'), + stubArray = require('./stubArray'); -/** Built-in value references. */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbol properties of `object`. @@ -10,15 +11,6 @@ var getOwnPropertySymbols = Object.getOwnPropertySymbols; * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ -function getSymbols(object) { - // Coerce `object` to an object to avoid non-object errors in V8. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details. - return getOwnPropertySymbols(Object(object)); -} - -// Fallback for IE < 11. -if (!getOwnPropertySymbols) { - getSymbols = stubArray; -} +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; module.exports = getSymbols; diff --git a/tools/eslint/node_modules/lodash/_getSymbolsIn.js b/tools/eslint/node_modules/lodash/_getSymbolsIn.js index 3a3729f05b..221277e843 100644 --- a/tools/eslint/node_modules/lodash/_getSymbolsIn.js +++ b/tools/eslint/node_modules/lodash/_getSymbolsIn.js @@ -1,9 +1,10 @@ var arrayPush = require('./_arrayPush'), getPrototype = require('./_getPrototype'), - getSymbols = require('./_getSymbols'); + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); -/** Built-in value references. */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbol properties @@ -13,7 +14,7 @@ var getOwnPropertySymbols = Object.getOwnPropertySymbols; * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ -var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) { +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); diff --git a/tools/eslint/node_modules/lodash/_getTag.js b/tools/eslint/node_modules/lodash/_getTag.js index 0d1a455c1b..af186020ba 100644 --- a/tools/eslint/node_modules/lodash/_getTag.js +++ b/tools/eslint/node_modules/lodash/_getTag.js @@ -3,6 +3,7 @@ var DataView = require('./_DataView'), Promise = require('./_Promise'), Set = require('./_Set'), WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), toSource = require('./_toSource'); /** `Object#toString` result references. */ @@ -38,9 +39,7 @@ var dataViewCtorString = toSource(DataView), * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ -function getTag(value) { - return objectToString.call(value); -} +var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11, // for data views in Edge, and promises in Node.js. diff --git a/tools/eslint/node_modules/lodash/_getWrapDetails.js b/tools/eslint/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 0000000000..3bcc6e48a3 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/tools/eslint/node_modules/lodash/_indexOfNaN.js b/tools/eslint/node_modules/lodash/_indexOfNaN.js deleted file mode 100644 index 49a42bb826..0000000000 --- a/tools/eslint/node_modules/lodash/_indexOfNaN.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ -function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; -} - -module.exports = indexOfNaN; diff --git a/tools/eslint/node_modules/lodash/_insertWrapDetails.js b/tools/eslint/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 0000000000..191f226de6 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,21 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length, + lastIndex = length - 1; + + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/tools/eslint/node_modules/lodash/_isFlattenable.js b/tools/eslint/node_modules/lodash/_isFlattenable.js index 1764fef6b8..4cc2c249cc 100644 --- a/tools/eslint/node_modules/lodash/_isFlattenable.js +++ b/tools/eslint/node_modules/lodash/_isFlattenable.js @@ -1,6 +1,10 @@ -var isArguments = require('./isArguments'), +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), isArray = require('./isArray'); +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + /** * Checks if `value` is a flattenable `arguments` object or array. * @@ -9,7 +13,8 @@ var isArguments = require('./isArguments'), * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArray(value) || isArguments(value); + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; diff --git a/tools/eslint/node_modules/lodash/_isFlattenableIteratee.js b/tools/eslint/node_modules/lodash/_isFlattenableIteratee.js deleted file mode 100644 index f7ede3e22a..0000000000 --- a/tools/eslint/node_modules/lodash/_isFlattenableIteratee.js +++ /dev/null @@ -1,16 +0,0 @@ -var isArray = require('./isArray'), - isFunction = require('./isFunction'); - -/** - * Checks if `value` is a flattenable array and not a `_.matchesProperty` - * iteratee shorthand. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenableIteratee(value) { - return isArray(value) && !(value.length == 2 && !isFunction(value[0])); -} - -module.exports = isFlattenableIteratee; diff --git a/tools/eslint/node_modules/lodash/_mergeData.js b/tools/eslint/node_modules/lodash/_mergeData.js index 911e6ae7ad..5aa1f1ff15 100644 --- a/tools/eslint/node_modules/lodash/_mergeData.js +++ b/tools/eslint/node_modules/lodash/_mergeData.js @@ -5,7 +5,7 @@ var composeArgs = require('./_composeArgs'), /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, diff --git a/tools/eslint/node_modules/lodash/_mergeDefaults.js b/tools/eslint/node_modules/lodash/_mergeDefaults.js index 33375cc5bb..9888f0e761 100644 --- a/tools/eslint/node_modules/lodash/_mergeDefaults.js +++ b/tools/eslint/node_modules/lodash/_mergeDefaults.js @@ -16,7 +16,10 @@ var baseMerge = require('./_baseMerge'), */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + stack['delete'](srcValue); } return objValue; } diff --git a/tools/eslint/node_modules/lodash/_nodeUtil.js b/tools/eslint/node_modules/lodash/_nodeUtil.js new file mode 100644 index 0000000000..b8e48e3d76 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,22 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/tools/eslint/node_modules/lodash/_overArg.js b/tools/eslint/node_modules/lodash/_overArg.js new file mode 100644 index 0000000000..f3c170a7af --- /dev/null +++ b/tools/eslint/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/tools/eslint/node_modules/lodash/_root.js b/tools/eslint/node_modules/lodash/_root.js index c46a71af97..d2852bed4d 100644 --- a/tools/eslint/node_modules/lodash/_root.js +++ b/tools/eslint/node_modules/lodash/_root.js @@ -1,15 +1,9 @@ -var checkGlobal = require('./_checkGlobal'); - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = checkGlobal(typeof global == 'object' && global); +var freeGlobal = require('./_freeGlobal'); /** Detect free variable `self`. */ -var freeSelf = checkGlobal(typeof self == 'object' && self); - -/** Detect `this` as the global object. */ -var thisGlobal = checkGlobal(typeof this == 'object' && this); +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || thisGlobal || Function('return this')(); +var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; diff --git a/tools/eslint/node_modules/lodash/_setWrapToString.js b/tools/eslint/node_modules/lodash/_setWrapToString.js new file mode 100644 index 0000000000..3c53cd0fc0 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,27 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + getWrapDetails = require('./_getWrapDetails'), + identity = require('./identity'), + insertWrapDetails = require('./_insertWrapDetails'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) { + var source = (reference + ''); + return defineProperty(wrapper, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))) + }); +}; + +module.exports = setWrapToString; diff --git a/tools/eslint/node_modules/lodash/_stackSet.js b/tools/eslint/node_modules/lodash/_stackSet.js index 0380ee54c0..604918376c 100644 --- a/tools/eslint/node_modules/lodash/_stackSet.js +++ b/tools/eslint/node_modules/lodash/_stackSet.js @@ -1,4 +1,5 @@ var ListCache = require('./_ListCache'), + Map = require('./_Map'), MapCache = require('./_MapCache'); /** Used as the size to enable large array optimizations. */ @@ -16,8 +17,13 @@ var LARGE_ARRAY_SIZE = 200; */ function stackSet(key, value) { var cache = this.__data__; - if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) { - cache = this.__data__ = new MapCache(cache.__data__); + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); } cache.set(key, value); return this; diff --git a/tools/eslint/node_modules/lodash/_stringToPath.js b/tools/eslint/node_modules/lodash/_stringToPath.js index 8b884b92ac..3eaf5c3924 100644 --- a/tools/eslint/node_modules/lodash/_stringToPath.js +++ b/tools/eslint/node_modules/lodash/_stringToPath.js @@ -2,7 +2,8 @@ var memoize = require('./memoize'), toString = require('./toString'); /** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; @@ -15,8 +16,13 @@ var reEscapeChar = /\\(\\)?/g; * @returns {Array} Returns the property path array. */ var stringToPath = memoize(function(string) { + string = toString(string); + var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; diff --git a/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js b/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js index 28b345498d..11e5b7d55a 100644 --- a/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js +++ b/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js @@ -1,3 +1,5 @@ +var basePropertyOf = require('./_basePropertyOf'); + /** Used to map HTML entities to characters. */ var htmlUnescapes = { '&': '&', @@ -15,8 +17,6 @@ var htmlUnescapes = { * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ -function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; -} +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); module.exports = unescapeHtmlChar; diff --git a/tools/eslint/node_modules/lodash/_updateWrapDetails.js b/tools/eslint/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 0000000000..128b1b46d6 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128, + REARG_FLAG = 256, + FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', ARY_FLAG], + ['bind', BIND_FLAG], + ['bindKey', BIND_KEY_FLAG], + ['curry', CURRY_FLAG], + ['curryRight', CURRY_RIGHT_FLAG], + ['flip', FLIP_FLAG], + ['partial', PARTIAL_FLAG], + ['partialRight', PARTIAL_RIGHT_FLAG], + ['rearg', REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/tools/eslint/node_modules/lodash/add.js b/tools/eslint/node_modules/lodash/add.js index d82c6522ae..f069515647 100644 --- a/tools/eslint/node_modules/lodash/add.js +++ b/tools/eslint/node_modules/lodash/add.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var add = createMathOperation(function(augend, addend) { return augend + addend; -}); +}, 0); module.exports = add; diff --git a/tools/eslint/node_modules/lodash/ary.js b/tools/eslint/node_modules/lodash/ary.js index 91ce37969b..c743b06a1f 100644 --- a/tools/eslint/node_modules/lodash/ary.js +++ b/tools/eslint/node_modules/lodash/ary.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var ARY_FLAG = 128; /** @@ -23,7 +23,7 @@ var ARY_FLAG = 128; function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; - return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + return createWrap(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); } module.exports = ary; diff --git a/tools/eslint/node_modules/lodash/assign.js b/tools/eslint/node_modules/lodash/assign.js index 2a60ff2c59..5488c8b691 100644 --- a/tools/eslint/node_modules/lodash/assign.js +++ b/tools/eslint/node_modules/lodash/assign.js @@ -36,18 +36,18 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { diff --git a/tools/eslint/node_modules/lodash/assignIn.js b/tools/eslint/node_modules/lodash/assignIn.js index b001c492a0..e77aebf189 100644 --- a/tools/eslint/node_modules/lodash/assignIn.js +++ b/tools/eslint/node_modules/lodash/assignIn.js @@ -32,18 +32,18 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { diff --git a/tools/eslint/node_modules/lodash/at.js b/tools/eslint/node_modules/lodash/at.js index 3f2ec0c004..5849a8caa3 100644 --- a/tools/eslint/node_modules/lodash/at.js +++ b/tools/eslint/node_modules/lodash/at.js @@ -1,6 +1,6 @@ var baseAt = require('./_baseAt'), baseFlatten = require('./_baseFlatten'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Creates an array of values corresponding to `paths` of `object`. @@ -19,7 +19,7 @@ var baseAt = require('./_baseAt'), * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] */ -var at = rest(function(object, paths) { +var at = baseRest(function(object, paths) { return baseAt(object, baseFlatten(paths, 1)); }); diff --git a/tools/eslint/node_modules/lodash/attempt.js b/tools/eslint/node_modules/lodash/attempt.js index e65b2e6f5f..624d01524d 100644 --- a/tools/eslint/node_modules/lodash/attempt.js +++ b/tools/eslint/node_modules/lodash/attempt.js @@ -1,6 +1,6 @@ var apply = require('./_apply'), - isError = require('./isError'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isError = require('./isError'); /** * Attempts to invoke `func`, returning either the result or the caught error @@ -24,7 +24,7 @@ var apply = require('./_apply'), * elements = []; * } */ -var attempt = rest(function(func, args) { +var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { diff --git a/tools/eslint/node_modules/lodash/before.js b/tools/eslint/node_modules/lodash/before.js index a495adcbdc..87aff94906 100644 --- a/tools/eslint/node_modules/lodash/before.js +++ b/tools/eslint/node_modules/lodash/before.js @@ -18,7 +18,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; diff --git a/tools/eslint/node_modules/lodash/bind.js b/tools/eslint/node_modules/lodash/bind.js index 893932a1da..eac913bf61 100644 --- a/tools/eslint/node_modules/lodash/bind.js +++ b/tools/eslint/node_modules/lodash/bind.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, PARTIAL_FLAG = 32; @@ -27,9 +27,9 @@ var BIND_FLAG = 1, * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -42,13 +42,13 @@ var BIND_FLAG = 1, * bound('hi'); * // => 'hi fred!' */ -var bind = rest(function(func, thisArg, partials) { +var bind = baseRest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bind)); bitmask |= PARTIAL_FLAG; } - return createWrapper(func, bitmask, thisArg, partials, holders); + return createWrap(func, bitmask, thisArg, partials, holders); }); // Assign default placeholders. diff --git a/tools/eslint/node_modules/lodash/bindAll.js b/tools/eslint/node_modules/lodash/bindAll.js index 7d1e9bac45..7d0d09d5af 100644 --- a/tools/eslint/node_modules/lodash/bindAll.js +++ b/tools/eslint/node_modules/lodash/bindAll.js @@ -1,7 +1,7 @@ var arrayEach = require('./_arrayEach'), baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), bind = require('./bind'), - rest = require('./rest'), toKey = require('./_toKey'); /** @@ -21,16 +21,16 @@ var arrayEach = require('./_arrayEach'), * * var view = { * 'label': 'docs', - * 'onClick': function() { + * 'click': function() { * console.log('clicked ' + this.label); * } * }; * - * _.bindAll(view, ['onClick']); - * jQuery(element).on('click', view.onClick); + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ -var bindAll = rest(function(object, methodNames) { +var bindAll = baseRest(function(object, methodNames) { arrayEach(baseFlatten(methodNames, 1), function(key) { key = toKey(key); object[key] = bind(object[key], object); diff --git a/tools/eslint/node_modules/lodash/bindKey.js b/tools/eslint/node_modules/lodash/bindKey.js index 1ed754be85..8824440849 100644 --- a/tools/eslint/node_modules/lodash/bindKey.js +++ b/tools/eslint/node_modules/lodash/bindKey.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, PARTIAL_FLAG = 32; @@ -53,13 +53,13 @@ var BIND_FLAG = 1, * bound('hi'); * // => 'hiya fred!' */ -var bindKey = rest(function(object, key, partials) { +var bindKey = baseRest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= PARTIAL_FLAG; } - return createWrapper(key, bitmask, object, partials, holders); + return createWrap(key, bitmask, object, partials, holders); }); // Assign default placeholders. diff --git a/tools/eslint/node_modules/lodash/collection.js b/tools/eslint/node_modules/lodash/collection.js index 22b0c8bce7..77fe837f32 100644 --- a/tools/eslint/node_modules/lodash/collection.js +++ b/tools/eslint/node_modules/lodash/collection.js @@ -1,5 +1,4 @@ module.exports = { - 'at': require('./at'), 'countBy': require('./countBy'), 'each': require('./each'), 'eachRight': require('./eachRight'), diff --git a/tools/eslint/node_modules/lodash/cond.js b/tools/eslint/node_modules/lodash/cond.js index cdebd12a1c..28955cefd0 100644 --- a/tools/eslint/node_modules/lodash/cond.js +++ b/tools/eslint/node_modules/lodash/cond.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), baseIteratee = require('./_baseIteratee'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -23,7 +23,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * var func = _.cond([ * [_.matches({ 'a': 1 }), _.constant('matches A')], * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.constant(true), _.constant('no match')] + * [_.stubTrue, _.constant('no match')] * ]); * * func({ 'a': 1, 'b': 2 }); @@ -46,7 +46,7 @@ function cond(pairs) { return [toIteratee(pair[0]), pair[1]]; }); - return rest(function(args) { + return baseRest(function(args) { var index = -1; while (++index < length) { var pair = pairs[index]; diff --git a/tools/eslint/node_modules/lodash/conforms.js b/tools/eslint/node_modules/lodash/conforms.js index 2a3915436a..e4c537e929 100644 --- a/tools/eslint/node_modules/lodash/conforms.js +++ b/tools/eslint/node_modules/lodash/conforms.js @@ -6,6 +6,9 @@ var baseClone = require('./_baseClone'), * the corresponding property values of a given object, returning `true` if * all predicates return truthy, else `false`. * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * * @static * @memberOf _ * @since 4.0.0 @@ -14,13 +17,13 @@ var baseClone = require('./_baseClone'), * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } * ]; * - * _.filter(users, _.conforms({ 'age': function(n) { return n > 38; } })); - * // => [{ 'user': 'fred', 'age': 40 }] + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] */ function conforms(source) { return baseConforms(baseClone(source, true)); diff --git a/tools/eslint/node_modules/lodash/conformsTo.js b/tools/eslint/node_modules/lodash/conformsTo.js new file mode 100644 index 0000000000..b8a93ebf45 --- /dev/null +++ b/tools/eslint/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/tools/eslint/node_modules/lodash/core.js b/tools/eslint/node_modules/lodash/core.js index 9b6092dd9c..99f6f66fc7 100644 --- a/tools/eslint/node_modules/lodash/core.js +++ b/tools/eslint/node_modules/lodash/core.js @@ -13,12 +13,12 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.13.1'; + var VERSION = '4.14.1'; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; - /** Used to compose bitmasks for wrapper metadata. */ + /** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, PARTIAL_FLAG = 32; @@ -57,23 +57,20 @@ '`': '`' }; - /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports; - - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module; - /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(typeof global == 'object' && global); + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ - var freeSelf = checkGlobal(typeof self == 'object' && self); - - /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(typeof this == 'object' && this); + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || thisGlobal || Function('return this')(); + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /*--------------------------------------------------------------------------*/ @@ -114,6 +111,32 @@ } /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * @@ -152,26 +175,13 @@ } /** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - - /** * Used by `_.escape` to convert characters to HTML entities. * * @private * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } + var escapeHtmlChar = basePropertyOf(htmlEscapes); /** * Checks if `value` is a host object in IE < 9. @@ -184,6 +194,20 @@ return false; } + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + /*--------------------------------------------------------------------------*/ /** Used for built-in method references. */ @@ -283,16 +307,16 @@ * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, - * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, - * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, - * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, @@ -407,13 +431,13 @@ } /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. + * @param {Array} args The arguments to provide to `func`. * @returns {number} Returns the timer id. */ function baseDelay(func, wait, args) { @@ -573,7 +597,7 @@ } /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -586,6 +610,17 @@ } /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && objectToString.call(value) == dateTag; + } + + /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * @@ -644,13 +679,17 @@ isSameTag = objTag == othTag; stack || (stack = []); - var stacked = find(stack, function(entry) { - return entry[0] === object; + var objStack = find(stack, function(entry) { + return entry[0] == object; }); - if (stacked && stacked[1]) { - return stacked[1] == other; + var othStack = find(stack, function(entry) { + return entry[0] == other; + }); + if (objStack && othStack) { + return objStack[1] == other; } stack.push([object, other]); + stack.push([other, object]); if (isSameTag && !objIsObj) { var result = (objIsArr) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) @@ -680,6 +719,17 @@ } /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObject(value) && objectToString.call(value) == regexpTag; + } + + /** * The base implementation of `_.iteratee`. * * @private @@ -704,9 +754,7 @@ * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ - function baseKeys(object) { - return nativeKeys(Object(object)); - } + var baseKeys = overArg(nativeKeys, Object); /** * The base implementation of `_.keysIn` which doesn't skip the constructor @@ -727,7 +775,7 @@ } /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -804,15 +852,31 @@ } /** - * The base implementation of `_.property` without support for deep paths. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; + function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return func.apply(this, otherArgs); }; } @@ -953,9 +1017,9 @@ var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + assignValue(object, key, newValue === undefined ? source[key] : newValue); } return object; } @@ -968,7 +1032,7 @@ * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined; @@ -1049,7 +1113,7 @@ * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ - function createCtorWrapper(Ctor) { + function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist @@ -1074,18 +1138,13 @@ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); - predicate = baseIteratee(predicate, 3); if (!isArrayLike(collection)) { - var props = keys(collection); + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } - var index = findIndexFunc(props || collection, function(value, key) { - if (props) { - key = value; - value = iterable[key]; - } - return predicate(value, key, iterable); - }, fromIndex); - return index > -1 ? collection[props ? props[index] : index] : undefined; + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } @@ -1095,19 +1154,18 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ - function createPartialWrapper(func, bitmask, thisArg, partials) { + function createPartial(func, bitmask, thisArg, partials) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -1212,18 +1270,14 @@ case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, @@ -1399,7 +1453,7 @@ * @since 1.1.0 * @category Array * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. @@ -1735,7 +1789,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, @@ -1772,12 +1826,14 @@ * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject @@ -1817,7 +1873,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. @@ -1899,8 +1955,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * @@ -2007,8 +2062,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. @@ -2050,8 +2104,8 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -2101,7 +2155,7 @@ * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; @@ -2140,9 +2194,9 @@ * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -2155,8 +2209,8 @@ * bound('hi'); * // => 'hi fred!' */ - var bind = rest(function(func, thisArg, partials) { - return createPartialWrapper(func, BIND_FLAG | PARTIAL_FLAG, thisArg, partials); + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, BIND_FLAG | PARTIAL_FLAG, thisArg, partials); }); /** @@ -2177,7 +2231,7 @@ * }, 'deferred'); * // => Logs 'deferred' after one or more milliseconds. */ - var defer = rest(function(func, args) { + var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); @@ -2200,7 +2254,7 @@ * }, 1000, 'later'); * // => Logs 'later' after one second. */ - var delay = rest(function(func, wait, args) { + var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); @@ -2229,7 +2283,8 @@ throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + return !predicate.apply(this, args); }; } @@ -2249,61 +2304,12 @@ * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); } - /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return func.apply(this, otherArgs); - }; - } - /*------------------------------------------------------------------------*/ /** @@ -2353,8 +2359,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true @@ -2383,7 +2389,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * @@ -2405,11 +2411,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); @@ -2492,8 +2496,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -2515,8 +2518,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -2525,9 +2527,7 @@ * _.isDate('Mon April 23 2012'); * // => false */ - function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; - } + var isDate = baseIsDate; /** * Checks if `value` is an empty object, collection, map, or set. @@ -2591,8 +2591,8 @@ * else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true @@ -2643,8 +2643,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -2818,8 +2817,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -2847,8 +2845,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -2857,9 +2854,7 @@ * _.isRegExp('/abc/'); * // => false */ - function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; - } + var isRegExp = baseIsRegExp; /** * Checks if `value` is classified as a `String` primitive or object. @@ -2869,8 +2864,7 @@ * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -3037,18 +3031,18 @@ * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { copyObject(source, keys(source), object); @@ -3072,18 +3066,18 @@ * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { copyObject(source, keysIn(source), object); @@ -3179,10 +3173,10 @@ * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var defaults = rest(function(args) { + var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return assignInWith.apply(undefined, args); }); @@ -3290,7 +3284,7 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = rest(function(object, props) { + var pick = baseRest(function(object, props) { return object == null ? {} : basePick(object, baseMap(baseFlatten(props, 1), toKey)); }); @@ -3407,7 +3401,7 @@ /*------------------------------------------------------------------------*/ /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -3417,7 +3411,7 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true @@ -3473,10 +3467,10 @@ /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** The created function supports comparing the same values as + * `_.isEqual` is equivalent to `_.isMatch` with `source` partially applied. * * @static * @memberOf _ @@ -3486,13 +3480,13 @@ * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(assign({}, source)); @@ -3591,7 +3585,7 @@ } /** - * A method that returns `undefined`. + * This method returns `undefined`. * * @static * @memberOf _ @@ -3801,22 +3795,21 @@ /*--------------------------------------------------------------------------*/ - // Expose Lodash on the free variable `window` or `self` when available so it's - // globally accessible, even when bundled with Browserify, Webpack, etc. This - // also prevents errors in cases where Lodash is loaded by a script tag in the - // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch - // for more details. Use `_.noConflict` to remove Lodash from the global object. - (freeSelf || {})._ = lodash; - - // Some AMD build optimizers like r.js check for condition patterns like the following: + // Some AMD build optimizers, like r.js, check for condition patterns like: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. define(function() { return lodash; }); } - // Check for `exports` after `define` in case a build optimizer adds an `exports` object. + // Check for `exports` after `define` in case a build optimizer adds it. else if (freeModule) { // Export for Node.js. (freeModule.exports = lodash)._ = lodash; diff --git a/tools/eslint/node_modules/lodash/core.min.js b/tools/eslint/node_modules/lodash/core.min.js index 96f15c2125..3336ee8d3b 100644 --- a/tools/eslint/node_modules/lodash/core.min.js +++ b/tools/eslint/node_modules/lodash/core.min.js @@ -3,26 +3,26 @@ * lodash (Custom Build) /license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash core -o ./dist/lodash.core.js` */ -;(function(){function n(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function t(n){return mn(Object(n))}function r(n,t){return n.push.apply(n,t),n}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return x(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return cn[n]}function c(n){return n instanceof f?n:new f(n)}function f(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r,e){ -var u;return(u=n===rn)||(u=hn[r],u=(n===u||n!==n&&u!==u)&&!vn.call(e,r)),u?t:n}function l(n){return L(n)?_n(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(rn,r)},t)}function s(n,t){var r=true;return xn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===rn?i===i:r(i,c)))var c=i,f=o}return f}function v(n,t){var r=[];return xn(n,function(n,e,u){t(n,e,u)&&r.push(n); -}),r}function y(n,t,e,u,o){var i=-1,c=n.length;for(e||(e=z),o||(o=[]);++i<c;){var f=n[i];t>0&&e(f)?t>1?y(f,t-1,e,u,o):r(o,f):u||(o[o.length]=f)}return o}function b(n,r){return n&&En(n,r,t)}function g(n,t){return v(t,function(t){return K(n[t])})}function _(n,t){return n>t}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!L(n)&&!Q(t)?n!==n&&t!==t:d(n,t,j,r,e,u)}function d(n,t,r,e,u,o){var i=Tn(n),c=Tn(t),f="[object Array]",a="[object Array]";i||(f=bn.call(n),f="[object Arguments]"==f?"[object Object]":f), -c||(a=bn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f&&true,c="[object Object]"==a&&true,a=f==a;o||(o=[]);var p=kn(o,function(t){return t[0]===n});return p&&p[1]?p[1]==t:(o.push([n,t]),a&&!l?(r=i?I(n,t,r,e,u,o):q(n,t,f),o.pop(),r):2&u||(i=l&&vn.call(n,"__wrapped__"),f=c&&vn.call(t,"__wrapped__"),!i&&!f)?a?(r=$(n,t,r,e,u,o),o.pop(),r):false:(i=i?n.value():n,t=f?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?nn:(typeof n=="object"?E:w)(n); -}function O(n,t){return t>n}function x(n,t){var r=-1,e=H(n)?Array(n.length):[];return xn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function E(n){var r=t(n);return function(t){var e=r.length;if(null==t)return!e;for(t=Object(t);e--;){var u=r[e];if(!(u in t&&j(n[u],t[u],rn,3)))return false}return true}}function A(n,t){return n=Object(n),M(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function w(n){return function(t){return null==t?rn:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r, -0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return xn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function F(n,t){return M(t,function(n,t){return t.func.apply(t.thisArg,r([n],t.args))},n)}function T(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];vn.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==rn||i in f)||(f[i]=c)}return r}function B(n){return U(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:rn,o=n.length>3&&typeof o=="function"?(u--, -o):rn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function R(n){return function(){var t=arguments,r=l(n.prototype),t=n.apply(r,t);return L(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==pn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=R(n);return e}function I(n,t,r,e,u,o){var i=n.length,c=t.length; -if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:rn;++c<i;){var l=n[c],p=t[c];if(void 0!==rn){f=false;break}if(a){if(!S(t,function(n,t){return G(a,t)||l!==n&&!r(l,n,e,u,o)?void 0:a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function q(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""; -}return false}function $(n,r,e,u,o,i){var c=2&o,f=t(n),a=f.length,l=t(r).length;if(a!=l&&!c)return false;for(var p=a;p--;){var s=f[p];if(!(c?s in r:vn.call(r,s)))return false}for(l=true;++p<a;){var s=f[p],h=n[s],v=r[s];if(void 0!==rn||h!==v&&!e(h,v,u,o,i)){l=false;break}c||(c="constructor"==s)}return l&&!c&&(e=n.constructor,u=r.constructor,e!=u&&"constructor"in n&&"constructor"in r&&!(typeof e=="function"&&e instanceof e&&typeof u=="function"&&u instanceof u)&&(l=false)),l}function z(n){return Tn(n)||V(n)}function C(n){ -return n&&n.length?n[0]:rn}function G(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?On(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function J(n,t){return xn(n,m(t))}function M(n,t,r){return e(n,m(t),r,3>arguments.length,xn)}function P(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Bn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=rn),r}}function U(n){var t;if(typeof n!="function")throw new TypeError("Expected a function"); -return t=On(t===rn?n.length-1:Bn(t),0),function(){for(var r=arguments,e=-1,u=On(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function V(n){return Q(n)&&H(n)&&vn.call(n,"callee")&&(!jn.call(n,"callee")||"[object Arguments]"==bn.call(n))}function H(n){var t;return(t=null!=n)&&(t=An(n),t=typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t),t&&!K(n)}function K(n){return n=L(n)?bn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n; -}function L(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Q(n){return!!n&&typeof n=="object"}function W(n){return typeof n=="number"||Q(n)&&"[object Number]"==bn.call(n)}function X(n){return typeof n=="string"||!Tn(n)&&Q(n)&&"[object String]"==bn.call(n)}function Y(n){return typeof n=="string"?n:null==n?"":n+""}function Z(n){return n?u(n,t(n)):[]}function nn(n){return n}function tn(n,e,u){var o=t(e),i=g(e,o);null!=u||L(e)&&(i.length||!o.length)||(u=e,e=n,n=this,i=g(e,t(e)));var c=!(L(u)&&"chain"in u&&!u.chain),f=K(n); -return xn(i,function(t){var u=e[t];n[t]=u,f&&(n.prototype[t]=function(){var t=this.__chain__;if(c||t){var e=n(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=t,e}return u.apply(n,r([this.value()],arguments))})}),n}var rn,en=1/0,un=/[&<>"'`]/g,on=RegExp(un.source),cn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},fn=typeof exports=="object"&&exports,an=fn&&typeof module=="object"&&module,ln=o(typeof self=="object"&&self),pn=o(typeof global=="object"&&global)||ln||o(typeof this=="object"&&this)||Function("return this")(),sn=Array.prototype,hn=Object.prototype,vn=hn.hasOwnProperty,yn=0,bn=hn.toString,gn=pn._,_n=Object.create,jn=hn.propertyIsEnumerable,dn=pn.isFinite,mn=Object.keys,On=Math.max; -f.prototype=l(c.prototype),f.prototype.constructor=f;var xn=function(n,t){return function(r,e){if(null==r)return r;if(!H(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(b),En=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),An=w("length"),wn=String,kn=function(n){return function(r,e,u){var o=Object(r);if(e=m(e),!H(r))var i=t(r);return u=n(i||r,function(n,t){ -return i&&(t=n,n=o[t]),e(n,t,o)},u),u>-1?r[i?i[u]:u]:rn}}(function(n,t,r){var e=n?n.length:0;if(!e)return-1;r=null==r?0:Bn(r),0>r&&(r=On(e+r,0));n:{for(t=m(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),Nn=U(function(n,t,r){return D(n,t,r)}),Sn=U(function(n,t){return p(n,1,t)}),Fn=U(function(n,t,r){return p(n,Rn(t)||0,r)}),Tn=Array.isArray,Bn=Number,Rn=Number,Dn=B(function(n,r){T(r,t(r),n)}),In=B(function(t,r){T(r,n(r),t)}),qn=B(function(t,r,e,u){T(r,n(r),t,u)}),$n=U(function(n){ -return n.push(rn,a),qn.apply(rn,n)}),zn=U(function(n,t){return null==n?{}:A(n,x(y(t,1),wn))});c.assignIn=In,c.before=P,c.bind=Nn,c.chain=function(n){return n=c(n),n.__chain__=true,n},c.compact=function(n){return v(n,Boolean)},c.concat=function(){for(var n=arguments.length,t=Array(n?n-1:0),e=arguments[0],u=n;u--;)t[u-1]=arguments[u];return n?r(Tn(e)?N(e):[e],y(t,1)):[]},c.create=function(n,t){var r=l(n);return t?Dn(r,t):r},c.defaults=$n,c.defer=Sn,c.delay=Fn,c.filter=function(n,t){return v(n,m(t))}, -c.flatten=function(n){return n&&n.length?y(n,1):[]},c.flattenDeep=function(n){return n&&n.length?y(n,en):[]},c.iteratee=m,c.keys=t,c.map=function(n,t){return x(n,m(t))},c.matches=function(n){return E(Dn({},n))},c.mixin=tn,c.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return P(2,n)},c.pick=zn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===rn?e:+r,e?k(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){ -var r=0;return t=m(t),x(x(n,function(n,e,u){return{value:n,index:r++,criteria:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==rn,o=null===r,i=r===r,c=e!==rn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&e>r||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),w("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return H(n)?n.length?N(n):[]:Z(n)},c.values=Z,c.extend=In, -tn(c,c),c.clone=function(n){return L(n)?Tn(n)?N(n):T(n,t(n)):n},c.escape=function(n){return(n=Y(n))&&on.test(n)?n.replace(un,i):n},c.every=function(n,t,r){return t=r?rn:t,s(n,m(t))},c.find=kn,c.forEach=J,c.has=function(n,t){return null!=n&&vn.call(n,t)},c.head=C,c.identity=nn,c.indexOf=G,c.isArguments=V,c.isArray=Tn,c.isBoolean=function(n){return true===n||false===n||Q(n)&&"[object Boolean]"==bn.call(n)},c.isDate=function(n){return Q(n)&&"[object Date]"==bn.call(n)},c.isEmpty=function(n){return H(n)&&(Tn(n)||X(n)||K(n.splice)||V(n))?!n.length:!t(n).length; -},c.isEqual=function(n,t){return j(n,t)},c.isFinite=function(n){return typeof n=="number"&&dn(n)},c.isFunction=K,c.isNaN=function(n){return W(n)&&n!=+n},c.isNull=function(n){return null===n},c.isNumber=W,c.isObject=L,c.isRegExp=function(n){return L(n)&&"[object RegExp]"==bn.call(n)},c.isString=X,c.isUndefined=function(n){return n===rn},c.last=function(n){var t=n?n.length:0;return t?n[t-1]:rn},c.max=function(n){return n&&n.length?h(n,nn,_):rn},c.min=function(n){return n&&n.length?h(n,nn,O):rn},c.noConflict=function(){ -return pn._===this&&(pn._=gn),this},c.noop=function(){},c.reduce=M,c.result=function(n,t,r){return t=null==n?rn:n[t],t===rn&&(t=r),K(t)?t.call(n):t},c.size=function(n){return null==n?0:(n=H(n)?n:t(n),n.length)},c.some=function(n,t,r){return t=r?rn:t,S(n,m(t))},c.uniqueId=function(n){var t=++yn;return Y(n)+t},c.each=J,c.first=C,tn(c,function(){var n={};return b(c,function(t,r){vn.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION="4.13.1",xn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){ -var t=(/^(?:replace|split)$/.test(n)?String.prototype:sn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);c.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Tn(u)?u:[],n)}return this[r](function(r){return t.apply(Tn(r)?r:[],n)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=function(){return F(this.__wrapped__,this.__actions__)},(ln||{})._=c,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){ -return c}):an?((an.exports=c)._=c,fn._=c):pn._=c}).call(this);
\ No newline at end of file +;(function(){function n(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return m(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r,e){return n===Z||J(n,an[r])&&!ln.call(e,r)?t:n; +}function f(n){return V(n)?vn(n):{}}function a(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(Z,r)},t)}function l(n,t){var r=true;return jn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function p(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===Z?i===i:r(i,c)))var c=i,f=o}return f}function s(n,t){var r=[];return jn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function h(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=I),o||(o=[]);++i<c;){ +var f=n[i];0<r&&e(f)?1<r?h(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function v(n,t){return n&&dn(n,t,Dn)}function b(n,t){return s(t,function(t){return U(n[t])})}function y(n,t){return n>t}function g(n,t,r,e,u){return n===t||(null==n||null==t||!V(n)&&!H(t)?n!==n&&t!==t:_(n,t,g,r,e,u))}function _(n,t,r,e,u,o){var i=kn(n),c=kn(t),f="[object Array]",a="[object Array]";i||(f=sn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=sn.call(t),a="[object Arguments]"==a?"[object Object]":a); +var l="[object Object]"==f&&true,c="[object Object]"==a&&true,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=R(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 2&u||(i=l&&ln.call(n,"__wrapped__"), +f=c&&ln.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=D(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,r=r(i,f,e,u,o),o.pop(),r)}function j(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?O:r)(n)}function d(n,t){return n<t}function m(n,t){var r=-1,e=P(n)?Array(n.length):[];return jn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function O(n){var t=Dn(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&g(n[u],r[u],Z,3)))return false}return true}} +function x(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function A(n){var t;return t=_n(t===Z?n.length-1:t,0),function(){for(var r=arguments,e=-1,u=_n(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(e=-1,u=Array(t+1);++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function E(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function w(n){return E(n,0,n.length)}function k(n,t){var r;return jn(n,function(n,e,u){ +return r=t(n,e,u),!r}),!!r}function N(n,r){return C(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function S(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):Z,f=r,a=i,i=c===Z?n[i]:c,c=f[a];ln.call(f,a)&&J(c,i)&&(i!==Z||a in f)||(f[a]=i)}return r}function T(n){return A(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:Z,o=3<n.length&&typeof o=="function"?(u--,o):Z;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){ +var t=arguments,r=f(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function B(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==un&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=F(n);return e}function R(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){ +f=false;break}if(a){if(!k(t,function(n,t){if(!$(a,t)&&(l===n||r(l,n,e,u,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function D(n,t,r,e,u,o){var i=2&u,c=Dn(n),f=c.length,a=Dn(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:ln.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==Z||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)), +a}function I(n){return kn(n)||M(n)}function q(n){return n&&n.length?n[0]:Z}function $(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?_n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function z(n,t){return jn(n,j(t))}function C(n,t,r){return e(n,j(t),r,3>arguments.length,jn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Nn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){ +return n===t||n!==n&&t!==t}function M(n){return H(n)&&P(n)&&ln.call(n,"callee")&&(!bn.call(n,"callee")||"[object Arguments]"==sn.call(n))}function P(n){var t;return(t=null!=n)&&(t=On(n),t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!U(n)}function U(n){return n=V(n)?sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function V(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function H(n){return!!n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==sn.call(n); +}function L(n){return typeof n=="string"||!kn(n)&&H(n)&&"[object String]"==sn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return n?u(n,Dn(n)):[]}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=b(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=b(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);return jn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=w(this.__actions__)).push({ +func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"'`]/g,rn=RegExp(tn.source),en=typeof self=="object"&&self&&self.Object===Object&&self,un=typeof global=="object"&&global&&global.Object===Object&&global||en||Function("return this")(),on=(en=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,cn=function(n){return function(t){return null==n?Z:n[t]}}({"&":"&", +"<":"<",">":">",'"':""","'":"'","`":"`"}),fn=Array.prototype,an=Object.prototype,ln=an.hasOwnProperty,pn=0,sn=an.toString,hn=un._,vn=Object.create,bn=an.propertyIsEnumerable,yn=un.isFinite,gn=Object.keys,_n=Math.max;i.prototype=f(o.prototype),i.prototype.constructor=i;var jn=function(n,t){return function(r,e){if(null==r)return r;if(!P(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(v),dn=function(n){return function(t,r,e){var u=-1,o=Object(t); +e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),mn=function(n,t){return function(r){return n(t(r))}}(gn,Object),On=r("length"),xn=String,An=function(n){return function(t,r,e){var u=Object(t);if(!P(t)){var o=j(r);t=Dn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:Z}}(function(n,t,r){var e=n?n.length:0;if(!e)return-1;r=null==r?0:Nn(r),0>r&&(r=_n(e+r,0));n:{for(t=j(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),gn=A(function(n,t,r){ +return B(n,t,r)}),En=A(function(n,t){return a(n,1,t)}),wn=A(function(n,t,r){return a(n,Sn(t)||0,r)}),kn=Array.isArray,Nn=Number,Sn=Number,Tn=T(function(n,t){S(t,Dn(t),n)}),Fn=T(function(t,r){S(r,n(r),t)}),Bn=T(function(t,r,e,u){S(r,n(r),t,u)}),Rn=A(function(n){return n.push(Z,c),Bn.apply(Z,n)}),Dn=mn,mn=A(function(n,t){return null==n?{}:x(n,m(h(t,1),xn))});o.assignIn=Fn,o.before=G,o.bind=gn,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return s(n,Boolean)},o.concat=function(){ +for(var n=arguments.length,r=Array(n?n-1:0),e=arguments[0],u=n;u--;)r[u-1]=arguments[u];return n?t(kn(e)?w(e):[e],h(r,1)):[]},o.create=function(n,t){var r=f(n);return t?Tn(r,t):r},o.defaults=Rn,o.defer=En,o.delay=wn,o.filter=function(n,t){return s(n,j(t))},o.flatten=function(n){return n&&n.length?h(n,1):[]},o.flattenDeep=function(n){return n&&n.length?h(n,nn):[]},o.iteratee=j,o.keys=Dn,o.map=function(n,t){return m(n,j(t))},o.matches=function(n){return O(Tn({},n))},o.mixin=Y,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function"); +return function(){return!n.apply(this,arguments)}},o.once=function(n){return G(2,n)},o.pick=mn,o.slice=function(n,t,r){var e=n?n.length:0;return r=r===Z?e:+r,e?E(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=j(t),m(m(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==Z,o=null===r,i=r===r,c=e!==Z,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1; +break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return P(n)?n.length?w(n):[]:W(n)},o.values=W,o.extend=Fn,Y(o,o),o.clone=function(n){return V(n)?kn(n)?w(n):S(n,Dn(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,cn):n},o.every=function(n,t,r){return t=r?Z:t,l(n,j(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&ln.call(n,t)},o.head=q,o.identity=X,o.indexOf=$,o.isArguments=M, +o.isArray=kn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==sn.call(n)},o.isDate=function(n){return H(n)&&"[object Date]"==sn.call(n)},o.isEmpty=function(n){return P(n)&&(kn(n)||L(n)||U(n.splice)||M(n))?!n.length:!Dn(n).length},o.isEqual=function(n,t){return g(n,t)},o.isFinite=function(n){return typeof n=="number"&&yn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return V(n)&&"[object RegExp]"==sn.call(n); +},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){var t=n?n.length:0;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?p(n,X,y):Z},o.min=function(n){return n&&n.length?p(n,X,d):Z},o.noConflict=function(){return un._===this&&(un._=hn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=P(n)?n:Dn(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,k(n,j(t))},o.uniqueId=function(n){ +var t=++pn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){var n={};return v(o,function(t,r){ln.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.14.1",jn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:fn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(kn(u)?u:[],n); +}return this[r](function(r){return t.apply(kn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return N(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(un._=o, define(function(){return o})):on?((on.exports=o)._=o,en._=o):un._=o}).call(this);
\ No newline at end of file diff --git a/tools/eslint/node_modules/lodash/countBy.js b/tools/eslint/node_modules/lodash/countBy.js index 9162b9f1cc..9861dddaad 100644 --- a/tools/eslint/node_modules/lodash/countBy.js +++ b/tools/eslint/node_modules/lodash/countBy.js @@ -17,7 +17,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @since 0.5.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example diff --git a/tools/eslint/node_modules/lodash/curry.js b/tools/eslint/node_modules/lodash/curry.js index 2f85624c4a..ce3910bc60 100644 --- a/tools/eslint/node_modules/lodash/curry.js +++ b/tools/eslint/node_modules/lodash/curry.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var CURRY_FLAG = 8; /** @@ -46,7 +46,7 @@ var CURRY_FLAG = 8; */ function curry(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } diff --git a/tools/eslint/node_modules/lodash/curryRight.js b/tools/eslint/node_modules/lodash/curryRight.js index d00bfad5de..2b7691fa6e 100644 --- a/tools/eslint/node_modules/lodash/curryRight.js +++ b/tools/eslint/node_modules/lodash/curryRight.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var CURRY_RIGHT_FLAG = 16; /** @@ -43,7 +43,7 @@ var CURRY_RIGHT_FLAG = 16; */ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curryRight.placeholder; return result; } diff --git a/tools/eslint/node_modules/lodash/debounce.js b/tools/eslint/node_modules/lodash/debounce.js index a36c8ac065..07dd22ee72 100644 --- a/tools/eslint/node_modules/lodash/debounce.js +++ b/tools/eslint/node_modules/lodash/debounce.js @@ -14,14 +14,18 @@ var nativeMax = Math.max, * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide an options object to indicate whether `func` should be invoked on - * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent calls - * to the debounced function return the result of the last `func` invocation. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the debounced function is - * invoked more than once during the `wait` timeout. + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. @@ -142,6 +146,9 @@ function debounce(func, wait, options) { } function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } diff --git a/tools/eslint/node_modules/lodash/defaultTo.js b/tools/eslint/node_modules/lodash/defaultTo.js new file mode 100644 index 0000000000..5b333592e9 --- /dev/null +++ b/tools/eslint/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/tools/eslint/node_modules/lodash/defaults.js b/tools/eslint/node_modules/lodash/defaults.js index 099d2e97d7..5333b42561 100644 --- a/tools/eslint/node_modules/lodash/defaults.js +++ b/tools/eslint/node_modules/lodash/defaults.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), assignInDefaults = require('./_assignInDefaults'), assignInWith = require('./assignInWith'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Assigns own and inherited enumerable string keyed properties of source @@ -21,10 +21,10 @@ var apply = require('./_apply'), * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ -var defaults = rest(function(args) { +var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return apply(assignInWith, undefined, args); }); diff --git a/tools/eslint/node_modules/lodash/defaultsDeep.js b/tools/eslint/node_modules/lodash/defaultsDeep.js index b6447f78c9..41680ed2d6 100644 --- a/tools/eslint/node_modules/lodash/defaultsDeep.js +++ b/tools/eslint/node_modules/lodash/defaultsDeep.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), + baseRest = require('./_baseRest'), mergeDefaults = require('./_mergeDefaults'), - mergeWith = require('./mergeWith'), - rest = require('./rest'); + mergeWith = require('./mergeWith'); /** * This method is like `_.defaults` except that it recursively assigns @@ -19,11 +19,10 @@ var apply = require('./_apply'), * @see _.defaults * @example * - * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); - * // => { 'user': { 'name': 'barney', 'age': 36 } } - * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ -var defaultsDeep = rest(function(args) { +var defaultsDeep = baseRest(function(args) { args.push(undefined, mergeDefaults); return apply(mergeWith, undefined, args); }); diff --git a/tools/eslint/node_modules/lodash/defer.js b/tools/eslint/node_modules/lodash/defer.js index b096f71b5f..351f630bca 100644 --- a/tools/eslint/node_modules/lodash/defer.js +++ b/tools/eslint/node_modules/lodash/defer.js @@ -1,5 +1,5 @@ var baseDelay = require('./_baseDelay'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Defers invoking the `func` until the current call stack has cleared. Any @@ -19,7 +19,7 @@ var baseDelay = require('./_baseDelay'), * }, 'deferred'); * // => Logs 'deferred' after one or more milliseconds. */ -var defer = rest(function(func, args) { +var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); diff --git a/tools/eslint/node_modules/lodash/delay.js b/tools/eslint/node_modules/lodash/delay.js index cac90a9bce..bd554796fd 100644 --- a/tools/eslint/node_modules/lodash/delay.js +++ b/tools/eslint/node_modules/lodash/delay.js @@ -1,5 +1,5 @@ var baseDelay = require('./_baseDelay'), - rest = require('./rest'), + baseRest = require('./_baseRest'), toNumber = require('./toNumber'); /** @@ -21,7 +21,7 @@ var baseDelay = require('./_baseDelay'), * }, 1000, 'later'); * // => Logs 'later' after one second. */ -var delay = rest(function(func, wait, args) { +var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); diff --git a/tools/eslint/node_modules/lodash/difference.js b/tools/eslint/node_modules/lodash/difference.js index bd52f54eae..8c4af3dcaa 100644 --- a/tools/eslint/node_modules/lodash/difference.js +++ b/tools/eslint/node_modules/lodash/difference.js @@ -1,14 +1,16 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); /** - * Creates an array of unique `array` values not included in the other given - * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * for equality comparisons. The order of result values is determined by the * order they occur in the first array. * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 @@ -22,7 +24,7 @@ var baseDifference = require('./_baseDifference'), * _.difference([2, 1], [2, 3]); * // => [1] */ -var difference = rest(function(array, values) { +var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; diff --git a/tools/eslint/node_modules/lodash/differenceBy.js b/tools/eslint/node_modules/lodash/differenceBy.js index bbafa32726..16fa097a7b 100644 --- a/tools/eslint/node_modules/lodash/differenceBy.js +++ b/tools/eslint/node_modules/lodash/differenceBy.js @@ -1,9 +1,9 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.difference` except that it accepts `iteratee` which @@ -11,14 +11,15 @@ var baseDifference = require('./_baseDifference'), * by which they're compared. Result values are chosen from the first array. * The iteratee is invoked with one argument: (value). * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * @@ -29,13 +30,13 @@ var baseDifference = require('./_baseDifference'), * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ -var differenceBy = rest(function(array, values) { +var differenceBy = baseRest(function(array, values) { var iteratee = last(values); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) : []; }); diff --git a/tools/eslint/node_modules/lodash/differenceWith.js b/tools/eslint/node_modules/lodash/differenceWith.js index 6ae89865e8..82ecc95fca 100644 --- a/tools/eslint/node_modules/lodash/differenceWith.js +++ b/tools/eslint/node_modules/lodash/differenceWith.js @@ -1,8 +1,8 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.difference` except that it accepts `comparator` @@ -10,6 +10,8 @@ var baseDifference = require('./_baseDifference'), * are chosen from the first array. The comparator is invoked with two arguments: * (arrVal, othVal). * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * * @static * @memberOf _ * @since 4.0.0 @@ -25,7 +27,7 @@ var baseDifference = require('./_baseDifference'), * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); * // => [{ 'x': 2, 'y': 1 }] */ -var differenceWith = rest(function(array, values) { +var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = undefined; diff --git a/tools/eslint/node_modules/lodash/divide.js b/tools/eslint/node_modules/lodash/divide.js index 2889d79928..8cae0cd1b0 100644 --- a/tools/eslint/node_modules/lodash/divide.js +++ b/tools/eslint/node_modules/lodash/divide.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var divide = createMathOperation(function(dividend, divisor) { return dividend / divisor; -}); +}, 1); module.exports = divide; diff --git a/tools/eslint/node_modules/lodash/dropRightWhile.js b/tools/eslint/node_modules/lodash/dropRightWhile.js index 98f457b811..9ad36a0445 100644 --- a/tools/eslint/node_modules/lodash/dropRightWhile.js +++ b/tools/eslint/node_modules/lodash/dropRightWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/tools/eslint/node_modules/lodash/dropWhile.js b/tools/eslint/node_modules/lodash/dropWhile.js index 94f76e0192..f89444ed4c 100644 --- a/tools/eslint/node_modules/lodash/dropWhile.js +++ b/tools/eslint/node_modules/lodash/dropWhile.js @@ -11,7 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example diff --git a/tools/eslint/node_modules/lodash/endsWith.js b/tools/eslint/node_modules/lodash/endsWith.js index bf10f2562b..dc43484f2f 100644 --- a/tools/eslint/node_modules/lodash/endsWith.js +++ b/tools/eslint/node_modules/lodash/endsWith.js @@ -35,8 +35,9 @@ function endsWith(string, target, position) { ? length : baseClamp(toInteger(position), 0, length); + var end = position; position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; + return position >= 0 && string.slice(position, end) == target; } module.exports = endsWith; diff --git a/tools/eslint/node_modules/lodash/eq.js b/tools/eslint/node_modules/lodash/eq.js index e9445d4fa3..b821483faa 100644 --- a/tools/eslint/node_modules/lodash/eq.js +++ b/tools/eslint/node_modules/lodash/eq.js @@ -12,8 +12,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true diff --git a/tools/eslint/node_modules/lodash/every.js b/tools/eslint/node_modules/lodash/every.js index 14f68e744f..96495bdeb3 100644 --- a/tools/eslint/node_modules/lodash/every.js +++ b/tools/eslint/node_modules/lodash/every.js @@ -14,7 +14,7 @@ var arrayEvery = require('./_arrayEvery'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, diff --git a/tools/eslint/node_modules/lodash/filter.js b/tools/eslint/node_modules/lodash/filter.js index 98e3a96407..3df977bb08 100644 --- a/tools/eslint/node_modules/lodash/filter.js +++ b/tools/eslint/node_modules/lodash/filter.js @@ -8,12 +8,14 @@ var arrayFilter = require('./_arrayFilter'), * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject diff --git a/tools/eslint/node_modules/lodash/find.js b/tools/eslint/node_modules/lodash/find.js index 3e40bb6d2e..88fb9ab374 100644 --- a/tools/eslint/node_modules/lodash/find.js +++ b/tools/eslint/node_modules/lodash/find.js @@ -11,7 +11,7 @@ var createFind = require('./_createFind'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. diff --git a/tools/eslint/node_modules/lodash/findIndex.js b/tools/eslint/node_modules/lodash/findIndex.js index 83af981f51..224604a16b 100644 --- a/tools/eslint/node_modules/lodash/findIndex.js +++ b/tools/eslint/node_modules/lodash/findIndex.js @@ -14,7 +14,7 @@ var nativeMax = Math.max; * @since 1.1.0 * @category Array * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. diff --git a/tools/eslint/node_modules/lodash/findKey.js b/tools/eslint/node_modules/lodash/findKey.js index 26fc234e23..becfb5aa2f 100644 --- a/tools/eslint/node_modules/lodash/findKey.js +++ b/tools/eslint/node_modules/lodash/findKey.js @@ -11,8 +11,7 @@ var baseFindKey = require('./_baseFindKey'), * @since 1.1.0 * @category Object * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example diff --git a/tools/eslint/node_modules/lodash/findLast.js b/tools/eslint/node_modules/lodash/findLast.js index f8dd4e1d74..a1dce40397 100644 --- a/tools/eslint/node_modules/lodash/findLast.js +++ b/tools/eslint/node_modules/lodash/findLast.js @@ -10,7 +10,7 @@ var createFind = require('./_createFind'), * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. diff --git a/tools/eslint/node_modules/lodash/findLastIndex.js b/tools/eslint/node_modules/lodash/findLastIndex.js index 2caf34aecd..684be484fa 100644 --- a/tools/eslint/node_modules/lodash/findLastIndex.js +++ b/tools/eslint/node_modules/lodash/findLastIndex.js @@ -15,7 +15,7 @@ var nativeMax = Math.max, * @since 2.0.0 * @category Array * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. diff --git a/tools/eslint/node_modules/lodash/findLastKey.js b/tools/eslint/node_modules/lodash/findLastKey.js index 5eedc1d29f..9db2c5e732 100644 --- a/tools/eslint/node_modules/lodash/findLastKey.js +++ b/tools/eslint/node_modules/lodash/findLastKey.js @@ -11,8 +11,7 @@ var baseFindKey = require('./_baseFindKey'), * @since 2.0.0 * @category Object * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example diff --git a/tools/eslint/node_modules/lodash/flatMap.js b/tools/eslint/node_modules/lodash/flatMap.js index f8307495f8..8c5d83281b 100644 --- a/tools/eslint/node_modules/lodash/flatMap.js +++ b/tools/eslint/node_modules/lodash/flatMap.js @@ -11,7 +11,7 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example diff --git a/tools/eslint/node_modules/lodash/flatMapDeep.js b/tools/eslint/node_modules/lodash/flatMapDeep.js index 3808262aab..9359882ff0 100644 --- a/tools/eslint/node_modules/lodash/flatMapDeep.js +++ b/tools/eslint/node_modules/lodash/flatMapDeep.js @@ -13,7 +13,7 @@ var INFINITY = 1 / 0; * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example diff --git a/tools/eslint/node_modules/lodash/flatMapDepth.js b/tools/eslint/node_modules/lodash/flatMapDepth.js index d528bff265..2182bed67d 100644 --- a/tools/eslint/node_modules/lodash/flatMapDepth.js +++ b/tools/eslint/node_modules/lodash/flatMapDepth.js @@ -11,7 +11,7 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. diff --git a/tools/eslint/node_modules/lodash/flip.js b/tools/eslint/node_modules/lodash/flip.js index 574c78088f..02e3fc27ef 100644 --- a/tools/eslint/node_modules/lodash/flip.js +++ b/tools/eslint/node_modules/lodash/flip.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var FLIP_FLAG = 512; /** @@ -22,7 +22,7 @@ var FLIP_FLAG = 512; * // => ['d', 'c', 'b', 'a'] */ function flip(func) { - return createWrapper(func, FLIP_FLAG); + return createWrap(func, FLIP_FLAG); } module.exports = flip; diff --git a/tools/eslint/node_modules/lodash/flow.js b/tools/eslint/node_modules/lodash/flow.js index 462f2dbdc5..74b6b62d40 100644 --- a/tools/eslint/node_modules/lodash/flow.js +++ b/tools/eslint/node_modules/lodash/flow.js @@ -9,7 +9,7 @@ var createFlow = require('./_createFlow'); * @memberOf _ * @since 3.0.0 * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. + * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flowRight * @example diff --git a/tools/eslint/node_modules/lodash/flowRight.js b/tools/eslint/node_modules/lodash/flowRight.js index a4eb8b6164..1146141059 100644 --- a/tools/eslint/node_modules/lodash/flowRight.js +++ b/tools/eslint/node_modules/lodash/flowRight.js @@ -8,7 +8,7 @@ var createFlow = require('./_createFlow'); * @since 3.0.0 * @memberOf _ * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. + * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flow * @example diff --git a/tools/eslint/node_modules/lodash/fp/F.js b/tools/eslint/node_modules/lodash/fp/F.js new file mode 100644 index 0000000000..a05a63ad9c --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/tools/eslint/node_modules/lodash/fp/T.js b/tools/eslint/node_modules/lodash/fp/T.js new file mode 100644 index 0000000000..e2ba8ea569 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/tools/eslint/node_modules/lodash/fp/_baseConvert.js b/tools/eslint/node_modules/lodash/fp/_baseConvert.js index e177cdd031..d294820d8c 100644 --- a/tools/eslint/node_modules/lodash/fp/_baseConvert.js +++ b/tools/eslint/node_modules/lodash/fp/_baseConvert.js @@ -71,11 +71,11 @@ function createCloner(func) { * @param {Function} cloner The function to clone arguments. * @returns {Function} Returns the new immutable function. */ -function immutWrap(func, cloner) { +function wrapImmutable(func, cloner) { return function() { var length = arguments.length; if (!length) { - return result; + return; } var args = Array(length); while (length--) { @@ -209,6 +209,12 @@ function baseConvert(util, name, func, options) { return func; }; }, + 'rearg': function(rearg) { + return function(func, indexes) { + var n = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), n); + }; + }, 'runInContext': function(runInContext) { return function(context) { return baseConvert(util, runInContext(context), options); @@ -219,6 +225,77 @@ function baseConvert(util, name, func, options) { /*--------------------------------------------------------------------------*/ /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : spread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** * Creates a clone of `object` by `path`. * * @private @@ -310,12 +387,11 @@ function baseConvert(util, name, func, options) { } /** - * Creates a function that invokes `func` with its first argument passed - * thru `transform`. + * Creates a function that invokes `func` with its first argument transformed. * * @private * @param {Function} func The function to wrap. - * @param {...Function} transform The functions to transform the first argument. + * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { @@ -355,42 +431,27 @@ function baseConvert(util, name, func, options) { } else if (config.immutable) { if (mutateMap.array[name]) { - wrapped = immutWrap(func, cloneArray); + wrapped = wrapImmutable(func, cloneArray); } else if (mutateMap.object[name]) { - wrapped = immutWrap(func, createCloner(func)); + wrapped = wrapImmutable(func, createCloner(func)); } else if (mutateMap.set[name]) { - wrapped = immutWrap(func, cloneByPath); + wrapped = wrapImmutable(func, cloneByPath); } } each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(otherName) { if (name == otherName) { - var aryN = !isLib && mapping.iterateeAry[name], - reargIndexes = mapping.iterateeRearg[name], - spreadStart = mapping.methodSpread[name]; - - result = wrapped; - if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { - result = spreadStart === undefined - ? ary(result, aryKey) - : spread(result, spreadStart); - } - if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) { - result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]); - } - if (config.cap) { - if (reargIndexes) { - result = iterateeRearg(result, reargIndexes); - } else if (aryN) { - result = iterateeAry(result, aryN); - } - } - if (forceCurry || (config.curry && aryKey > 1)) { - forceCurry && console.log(forceCurry, name); - result = curry(result, aryKey); - } + var spreadData = mapping.methodSpread[name], + afterRearg = spreadData && spreadData.afterRearg; + + result = afterRearg + ? castFixed(name, castRearg(name, wrapped, aryKey), aryKey) + : castRearg(name, castFixed(name, wrapped, aryKey), aryKey); + + result = castCap(name, result); + result = castCurry(name, result, aryKey); return false; } }); diff --git a/tools/eslint/node_modules/lodash/fp/_mapping.js b/tools/eslint/node_modules/lodash/fp/_mapping.js index a30c5dee41..cb36eedad1 100644 --- a/tools/eslint/node_modules/lodash/fp/_mapping.js +++ b/tools/eslint/node_modules/lodash/fp/_mapping.js @@ -7,11 +7,20 @@ exports.aliasToReal = { 'entries': 'toPairs', 'entriesIn': 'toPairsIn', 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', 'extendWith': 'assignInWith', 'first': 'head', + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + // Ramda aliases. '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', 'all': 'every', 'allPass': 'overEvery', 'always': 'constant', @@ -25,8 +34,11 @@ exports.aliasToReal = { 'contains': 'includes', 'dissoc': 'unset', 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', 'equals': 'isEqual', 'identical': 'eq', + 'indexBy': 'keyBy', 'init': 'initial', 'invertObj': 'invert', 'juxt': 'over', @@ -43,36 +55,44 @@ exports.aliasToReal = { 'propEq': 'matchesProperty', 'propOr': 'getOr', 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', 'unapply': 'rest', 'unnest': 'flatten', 'useWith': 'overArgs', - 'whereEq': 'filter', + 'where': 'conformsTo', + 'whereEq': 'isMatch', 'zipObj': 'zipObject' }; /** Used to map ary to method names. */ exports.aryMethod = { '1': [ - 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor', - 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', - 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse', - 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', - 'uniqueId', 'words' + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', + 'mergeAll', 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', + 'reverse', 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', + 'trimStart', 'uniqueId', 'words', 'zipAll' ], '2': [ - 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll', - 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN', - 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference', - 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', - 'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', - 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', - 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', - 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', - 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', - 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', - 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth', - 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', - 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', @@ -151,7 +171,9 @@ exports.iterateeRearg = { /** Used to map method names to rearg configs. */ exports.methodRearg = { + 'assignInAllWith': [1, 2, 0], 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 2, 0], 'assignWith': [1, 2, 0], 'differenceBy': [1, 2, 0], 'differenceWith': [1, 2, 0], @@ -160,6 +182,7 @@ exports.methodRearg = { 'intersectionWith': [1, 2, 0], 'isEqualWith': [1, 2, 0], 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 2, 0], 'mergeWith': [1, 2, 0], 'padChars': [2, 1, 0], 'padCharsEnd': [2, 1, 0], @@ -179,11 +202,20 @@ exports.methodRearg = { /** Used to map method names to spread configs. */ exports.methodSpread = { - 'invokeArgs': 2, - 'invokeArgsMap': 2, - 'partial': 1, - 'partialRight': 1, - 'without': 1 + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'afterRearg': true, 'start': 1 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'afterRearg': true, 'start': 1 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'afterRearg': true, 'start': 1 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } }; /** Used to identify methods which mutate arrays or objects. */ @@ -200,13 +232,21 @@ exports.mutate = { }, 'object': { 'assign': true, + 'assignAll': true, + 'assignAllWith': true, 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, 'assignInWith': true, 'assignWith': true, 'defaults': true, + 'defaultsAll': true, 'defaultsDeep': true, + 'defaultsDeepAll': true, 'merge': true, - 'mergeWith': true + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, }, 'set': { 'set': true, @@ -246,8 +286,14 @@ exports.realToAlias = (function() { /** Used to map method names to other names. */ exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', 'curryN': 'curry', 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', 'findFrom': 'find', 'findIndexFrom': 'findIndex', 'findLastFrom': 'findLast', @@ -258,14 +304,18 @@ exports.remap = { 'invokeArgs': 'invoke', 'invokeArgsMap': 'invokeMap', 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', 'padChars': 'pad', 'padCharsEnd': 'padEnd', 'padCharsStart': 'padStart', + 'propertyOf': 'get', 'restFrom': 'rest', 'spreadFrom': 'spread', 'trimChars': 'trim', 'trimCharsEnd': 'trimEnd', - 'trimCharsStart': 'trimStart' + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' }; /** Used to track methods that skip fixing their arity. */ @@ -275,6 +325,7 @@ exports.skipFixed = { 'flowRight': true, 'iteratee': true, 'mixin': true, + 'rearg': true, 'runInContext': true }; @@ -300,10 +351,12 @@ exports.skipRearg = { 'overArgs': true, 'partial': true, 'partialRight': true, + 'propertyOf': true, 'random': true, 'range': true, 'rangeRight': true, 'subtract': true, 'zip': true, - 'zipObject': true + 'zipObject': true, + 'zipObjectDeep': true }; diff --git a/tools/eslint/node_modules/lodash/fp/assignAll.js b/tools/eslint/node_modules/lodash/fp/assignAll.js new file mode 100644 index 0000000000..b1d36c7ef8 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/assignAllWith.js b/tools/eslint/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 0000000000..21e836e6f0 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/assignInAll.js b/tools/eslint/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 0000000000..7ba75dba11 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/assignInAllWith.js b/tools/eslint/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 0000000000..e766903d4c --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/conforms.js b/tools/eslint/node_modules/lodash/fp/conforms.js index e193cd6c1f..3247f64a8c 100644 --- a/tools/eslint/node_modules/lodash/fp/conforms.js +++ b/tools/eslint/node_modules/lodash/fp/conforms.js @@ -1,5 +1 @@ -var convert = require('./convert'), - func = convert('conforms', require('../conforms'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; +module.exports = require('./conformsTo'); diff --git a/tools/eslint/node_modules/lodash/fp/conformsTo.js b/tools/eslint/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 0000000000..aa7f41ec09 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/defaultTo.js b/tools/eslint/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 0000000000..d6b52a4447 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/defaultsAll.js b/tools/eslint/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 0000000000..238fcc3c2f --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/defaultsDeepAll.js b/tools/eslint/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 0000000000..6835f2f079 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/dropLast.js b/tools/eslint/node_modules/lodash/fp/dropLast.js new file mode 100644 index 0000000000..174e525512 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/tools/eslint/node_modules/lodash/fp/dropLastWhile.js b/tools/eslint/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 0000000000..be2a9d24ae --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/tools/eslint/node_modules/lodash/fp/extendAll.js b/tools/eslint/node_modules/lodash/fp/extendAll.js new file mode 100644 index 0000000000..cc55b64fcc --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/tools/eslint/node_modules/lodash/fp/extendAllWith.js b/tools/eslint/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 0000000000..6679d208bc --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/tools/eslint/node_modules/lodash/fp/indexBy.js b/tools/eslint/node_modules/lodash/fp/indexBy.js new file mode 100644 index 0000000000..7e64bc0fcd --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/tools/eslint/node_modules/lodash/fp/matches.js b/tools/eslint/node_modules/lodash/fp/matches.js index 629399cb8d..29d1e1e4f1 100644 --- a/tools/eslint/node_modules/lodash/fp/matches.js +++ b/tools/eslint/node_modules/lodash/fp/matches.js @@ -1,5 +1 @@ -var convert = require('./convert'), - func = convert('matches', require('../matches'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; +module.exports = require('./isMatch'); diff --git a/tools/eslint/node_modules/lodash/fp/mergeAll.js b/tools/eslint/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 0000000000..a3674d6716 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/mergeAllWith.js b/tools/eslint/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 0000000000..4bd4206dc7 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/property.js b/tools/eslint/node_modules/lodash/fp/property.js index d832fbba32..b29cfb2139 100644 --- a/tools/eslint/node_modules/lodash/fp/property.js +++ b/tools/eslint/node_modules/lodash/fp/property.js @@ -1,5 +1 @@ -var convert = require('./convert'), - func = convert('property', require('../property'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; +module.exports = require('./get'); diff --git a/tools/eslint/node_modules/lodash/fp/propertyOf.js b/tools/eslint/node_modules/lodash/fp/propertyOf.js index 3cfdef790a..f6273ee47a 100644 --- a/tools/eslint/node_modules/lodash/fp/propertyOf.js +++ b/tools/eslint/node_modules/lodash/fp/propertyOf.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('propertyOf', require('../propertyOf'), require('./_falseOptions')); + func = convert('propertyOf', require('../get')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/symmetricDifference.js b/tools/eslint/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 0000000000..78c16add62 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/tools/eslint/node_modules/lodash/fp/symmetricDifferenceBy.js b/tools/eslint/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 0000000000..298fc7ff68 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/tools/eslint/node_modules/lodash/fp/symmetricDifferenceWith.js b/tools/eslint/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 0000000000..70bc6faf28 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/tools/eslint/node_modules/lodash/fp/takeLast.js b/tools/eslint/node_modules/lodash/fp/takeLast.js new file mode 100644 index 0000000000..e98c84a162 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/tools/eslint/node_modules/lodash/fp/takeLastWhile.js b/tools/eslint/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 0000000000..5367968a3d --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/tools/eslint/node_modules/lodash/fp/where.js b/tools/eslint/node_modules/lodash/fp/where.js new file mode 100644 index 0000000000..3247f64a8c --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/tools/eslint/node_modules/lodash/fp/whereEq.js b/tools/eslint/node_modules/lodash/fp/whereEq.js index ade80f6fba..29d1e1e4f1 100644 --- a/tools/eslint/node_modules/lodash/fp/whereEq.js +++ b/tools/eslint/node_modules/lodash/fp/whereEq.js @@ -1 +1 @@ -module.exports = require('./filter'); +module.exports = require('./isMatch'); diff --git a/tools/eslint/node_modules/lodash/fp/zipAll.js b/tools/eslint/node_modules/lodash/fp/zipAll.js new file mode 100644 index 0000000000..efa8ccbfbb --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fromPairs.js b/tools/eslint/node_modules/lodash/fromPairs.js index a591488ef9..39f5fb3429 100644 --- a/tools/eslint/node_modules/lodash/fromPairs.js +++ b/tools/eslint/node_modules/lodash/fromPairs.js @@ -10,8 +10,8 @@ * @returns {Object} Returns the new object. * @example * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, diff --git a/tools/eslint/node_modules/lodash/get.js b/tools/eslint/node_modules/lodash/get.js index 5a5837b254..8805ff92c1 100644 --- a/tools/eslint/node_modules/lodash/get.js +++ b/tools/eslint/node_modules/lodash/get.js @@ -2,7 +2,7 @@ var baseGet = require('./_baseGet'); /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/groupBy.js b/tools/eslint/node_modules/lodash/groupBy.js index ae7db5faa3..3a7dbaf437 100644 --- a/tools/eslint/node_modules/lodash/groupBy.js +++ b/tools/eslint/node_modules/lodash/groupBy.js @@ -18,7 +18,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example diff --git a/tools/eslint/node_modules/lodash/identity.js b/tools/eslint/node_modules/lodash/identity.js index 058296ffcc..2d5d963cd2 100644 --- a/tools/eslint/node_modules/lodash/identity.js +++ b/tools/eslint/node_modules/lodash/identity.js @@ -1,5 +1,5 @@ /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -9,7 +9,7 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true diff --git a/tools/eslint/node_modules/lodash/inRange.js b/tools/eslint/node_modules/lodash/inRange.js index bf71a8d77e..f20728d920 100644 --- a/tools/eslint/node_modules/lodash/inRange.js +++ b/tools/eslint/node_modules/lodash/inRange.js @@ -1,4 +1,5 @@ var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), toNumber = require('./toNumber'); /** @@ -40,12 +41,12 @@ var baseInRange = require('./_baseInRange'), * // => true */ function inRange(number, start, end) { - start = toNumber(start) || 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); diff --git a/tools/eslint/node_modules/lodash/includes.js b/tools/eslint/node_modules/lodash/includes.js index cefe3bf948..8c3c51376a 100644 --- a/tools/eslint/node_modules/lodash/includes.js +++ b/tools/eslint/node_modules/lodash/includes.js @@ -31,10 +31,10 @@ var nativeMax = Math.max; * _.includes([1, 2, 3], 1, 2); * // => false * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * - * _.includes('pebbles', 'eb'); + * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { diff --git a/tools/eslint/node_modules/lodash/intersection.js b/tools/eslint/node_modules/lodash/intersection.js index 1da06f8f5b..20c0a40840 100644 --- a/tools/eslint/node_modules/lodash/intersection.js +++ b/tools/eslint/node_modules/lodash/intersection.js @@ -1,7 +1,7 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), - castArrayLikeObject = require('./_castArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); /** * Creates an array of unique values that are included in all given arrays @@ -20,7 +20,7 @@ var arrayMap = require('./_arrayMap'), * _.intersection([2, 1], [2, 3]); * // => [2] */ -var intersection = rest(function(arrays) { +var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) diff --git a/tools/eslint/node_modules/lodash/intersectionBy.js b/tools/eslint/node_modules/lodash/intersectionBy.js index 5b8ffdcc27..436c28646d 100644 --- a/tools/eslint/node_modules/lodash/intersectionBy.js +++ b/tools/eslint/node_modules/lodash/intersectionBy.js @@ -1,9 +1,9 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.intersection` except that it accepts `iteratee` @@ -16,8 +16,7 @@ var arrayMap = require('./_arrayMap'), * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * @@ -28,7 +27,7 @@ var arrayMap = require('./_arrayMap'), * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }] */ -var intersectionBy = rest(function(arrays) { +var intersectionBy = baseRest(function(arrays) { var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); @@ -38,7 +37,7 @@ var intersectionBy = rest(function(arrays) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, baseIteratee(iteratee)) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) : []; }); diff --git a/tools/eslint/node_modules/lodash/intersectionWith.js b/tools/eslint/node_modules/lodash/intersectionWith.js index bc195dc999..736eca26a4 100644 --- a/tools/eslint/node_modules/lodash/intersectionWith.js +++ b/tools/eslint/node_modules/lodash/intersectionWith.js @@ -1,8 +1,8 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.intersection` except that it accepts `comparator` @@ -25,7 +25,7 @@ var arrayMap = require('./_arrayMap'), * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ -var intersectionWith = rest(function(arrays) { +var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); diff --git a/tools/eslint/node_modules/lodash/invertBy.js b/tools/eslint/node_modules/lodash/invertBy.js index 4298199ccd..e5ba0f7091 100644 --- a/tools/eslint/node_modules/lodash/invertBy.js +++ b/tools/eslint/node_modules/lodash/invertBy.js @@ -19,8 +19,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @since 4.1.0 * @category Object * @param {Object} object The object to invert. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Object} Returns the new inverted object. * @example * diff --git a/tools/eslint/node_modules/lodash/invoke.js b/tools/eslint/node_modules/lodash/invoke.js index 7b6f56bb1f..97d51eb5bc 100644 --- a/tools/eslint/node_modules/lodash/invoke.js +++ b/tools/eslint/node_modules/lodash/invoke.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Invokes the method at `path` of `object`. @@ -19,6 +19,6 @@ var baseInvoke = require('./_baseInvoke'), * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ -var invoke = rest(baseInvoke); +var invoke = baseRest(baseInvoke); module.exports = invoke; diff --git a/tools/eslint/node_modules/lodash/invokeMap.js b/tools/eslint/node_modules/lodash/invokeMap.js index 4a6063e0aa..f3302db86a 100644 --- a/tools/eslint/node_modules/lodash/invokeMap.js +++ b/tools/eslint/node_modules/lodash/invokeMap.js @@ -1,15 +1,15 @@ var apply = require('./_apply'), baseEach = require('./_baseEach'), baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), isArrayLike = require('./isArrayLike'), - isKey = require('./_isKey'), - rest = require('./rest'); + isKey = require('./_isKey'); /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function, it's - * invoked for and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -28,7 +28,7 @@ var apply = require('./_apply'), * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ -var invokeMap = rest(function(collection, path, args) { +var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', isProp = isKey(path), diff --git a/tools/eslint/node_modules/lodash/isArguments.js b/tools/eslint/node_modules/lodash/isArguments.js index 3ca0d3ca12..a96e244baf 100644 --- a/tools/eslint/node_modules/lodash/isArguments.js +++ b/tools/eslint/node_modules/lodash/isArguments.js @@ -27,7 +27,7 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * diff --git a/tools/eslint/node_modules/lodash/isArray.js b/tools/eslint/node_modules/lodash/isArray.js index 1901120e7e..88ab55fd0a 100644 --- a/tools/eslint/node_modules/lodash/isArray.js +++ b/tools/eslint/node_modules/lodash/isArray.js @@ -4,11 +4,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); diff --git a/tools/eslint/node_modules/lodash/isArrayBuffer.js b/tools/eslint/node_modules/lodash/isArrayBuffer.js index 0a6a8e6761..12904a64b4 100644 --- a/tools/eslint/node_modules/lodash/isArrayBuffer.js +++ b/tools/eslint/node_modules/lodash/isArrayBuffer.js @@ -1,16 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -var arrayBufferTag = '[object ArrayBuffer]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; /** * Checks if `value` is classified as an `ArrayBuffer` object. @@ -20,8 +13,7 @@ var objectToString = objectProto.toString; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * * _.isArrayBuffer(new ArrayBuffer(2)); @@ -30,8 +22,6 @@ var objectToString = objectProto.toString; * _.isArrayBuffer(new Array(2)); * // => false */ -function isArrayBuffer(value) { - return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; -} +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; module.exports = isArrayBuffer; diff --git a/tools/eslint/node_modules/lodash/isBoolean.js b/tools/eslint/node_modules/lodash/isBoolean.js index 242fad1ffd..b9083211c9 100644 --- a/tools/eslint/node_modules/lodash/isBoolean.js +++ b/tools/eslint/node_modules/lodash/isBoolean.js @@ -21,8 +21,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); diff --git a/tools/eslint/node_modules/lodash/isBuffer.js b/tools/eslint/node_modules/lodash/isBuffer.js index 566c09f778..c103cc74e7 100644 --- a/tools/eslint/node_modules/lodash/isBuffer.js +++ b/tools/eslint/node_modules/lodash/isBuffer.js @@ -2,10 +2,10 @@ var root = require('./_root'), stubFalse = require('./stubFalse'); /** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports; +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; @@ -13,6 +13,9 @@ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + /** * Checks if `value` is a buffer. * @@ -30,8 +33,6 @@ var Buffer = moduleExports ? root.Buffer : undefined; * _.isBuffer(new Uint8Array(2)); * // => false */ -var isBuffer = !Buffer ? stubFalse : function(value) { - return value instanceof Buffer; -}; +var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; diff --git a/tools/eslint/node_modules/lodash/isDate.js b/tools/eslint/node_modules/lodash/isDate.js index f85a801747..7f0209fca7 100644 --- a/tools/eslint/node_modules/lodash/isDate.js +++ b/tools/eslint/node_modules/lodash/isDate.js @@ -1,17 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var dateTag = '[object Date]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; /** * Checks if `value` is classified as a `Date` object. @@ -21,8 +13,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -31,8 +22,6 @@ var objectToString = objectProto.toString; * _.isDate('Mon April 23 2012'); * // => false */ -function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; -} +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; module.exports = isDate; diff --git a/tools/eslint/node_modules/lodash/isEqual.js b/tools/eslint/node_modules/lodash/isEqual.js index dd5d0cc7ce..bd694dcf25 100644 --- a/tools/eslint/node_modules/lodash/isEqual.js +++ b/tools/eslint/node_modules/lodash/isEqual.js @@ -20,8 +20,8 @@ var baseIsEqual = require('./_baseIsEqual'); * else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true diff --git a/tools/eslint/node_modules/lodash/isFunction.js b/tools/eslint/node_modules/lodash/isFunction.js index da02be0e10..115f4667f5 100644 --- a/tools/eslint/node_modules/lodash/isFunction.js +++ b/tools/eslint/node_modules/lodash/isFunction.js @@ -22,8 +22,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); diff --git a/tools/eslint/node_modules/lodash/isMap.js b/tools/eslint/node_modules/lodash/isMap.js index f83758e13b..44f8517eee 100644 --- a/tools/eslint/node_modules/lodash/isMap.js +++ b/tools/eslint/node_modules/lodash/isMap.js @@ -1,8 +1,9 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. @@ -12,8 +13,7 @@ var mapTag = '[object Map]'; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); @@ -22,8 +22,6 @@ var mapTag = '[object Map]'; * _.isMap(new WeakMap); * // => false */ -function isMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; -} +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; diff --git a/tools/eslint/node_modules/lodash/isMatch.js b/tools/eslint/node_modules/lodash/isMatch.js index 371e4458b2..32fc5fb501 100644 --- a/tools/eslint/node_modules/lodash/isMatch.js +++ b/tools/eslint/node_modules/lodash/isMatch.js @@ -3,10 +3,10 @@ var baseIsMatch = require('./_baseIsMatch'), /** * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. This method is - * equivalent to a `_.matches` function when `source` is partially applied. + * determine if `object` contains equivalent property values. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** This method supports comparing the same values as `_.isEqual` + * and is equivalent to `_.matches` when `source` is partially applied. * * @static * @memberOf _ @@ -17,12 +17,12 @@ var baseIsMatch = require('./_baseIsMatch'), * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * var object = { 'user': 'fred', 'age': 40 }; + * var object = { 'a': 1, 'b': 2 }; * - * _.isMatch(object, { 'age': 40 }); + * _.isMatch(object, { 'b': 2 }); * // => true * - * _.isMatch(object, { 'age': 36 }); + * _.isMatch(object, { 'b': 1 }); * // => false */ function isMatch(object, source) { diff --git a/tools/eslint/node_modules/lodash/isNative.js b/tools/eslint/node_modules/lodash/isNative.js index 8d9dd0588b..4bd57d8d12 100644 --- a/tools/eslint/node_modules/lodash/isNative.js +++ b/tools/eslint/node_modules/lodash/isNative.js @@ -4,13 +4,13 @@ var baseIsNative = require('./_baseIsNative'), /** * Checks if `value` is a pristine native function. * - * **Note:** This method can't reliably detect native functions in the - * presence of the `core-js` package because `core-js` circumvents this kind - * of detection. Despite multiple requests, the `core-js` maintainer has made - * it clear: any attempt to fix the detection will be obstructed. As a result, - * we're left with little choice but to throw an error. Unfortunately, this - * also affects packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on `core-js`. + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. * * @static * @memberOf _ @@ -29,7 +29,7 @@ var baseIsNative = require('./_baseIsNative'), */ function isNative(value) { if (isMaskable(value)) { - throw new Error('This method is not supported with `core-js`. Try https://github.com/es-shims.'); + throw new Error('This method is not supported with core-js. Try https://github.com/es-shims.'); } return baseIsNative(value); } diff --git a/tools/eslint/node_modules/lodash/isNumber.js b/tools/eslint/node_modules/lodash/isNumber.js index e427282ac8..aa61488362 100644 --- a/tools/eslint/node_modules/lodash/isNumber.js +++ b/tools/eslint/node_modules/lodash/isNumber.js @@ -24,8 +24,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); diff --git a/tools/eslint/node_modules/lodash/isRegExp.js b/tools/eslint/node_modules/lodash/isRegExp.js index 8eeb4103ec..76c9b6e9c3 100644 --- a/tools/eslint/node_modules/lodash/isRegExp.js +++ b/tools/eslint/node_modules/lodash/isRegExp.js @@ -1,17 +1,9 @@ -var isObject = require('./isObject'); +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; /** * Checks if `value` is classified as a `RegExp` object. @@ -21,8 +13,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -31,8 +22,6 @@ var objectToString = objectProto.toString; * _.isRegExp('/abc/'); * // => false */ -function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; -} +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; module.exports = isRegExp; diff --git a/tools/eslint/node_modules/lodash/isSet.js b/tools/eslint/node_modules/lodash/isSet.js index 9030dc44e0..ab88bdf81a 100644 --- a/tools/eslint/node_modules/lodash/isSet.js +++ b/tools/eslint/node_modules/lodash/isSet.js @@ -1,8 +1,9 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var setTag = '[object Set]'; +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. @@ -12,8 +13,7 @@ var setTag = '[object Set]'; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); @@ -22,8 +22,6 @@ var setTag = '[object Set]'; * _.isSet(new WeakSet); * // => false */ -function isSet(value) { - return isObjectLike(value) && getTag(value) == setTag; -} +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; diff --git a/tools/eslint/node_modules/lodash/isString.js b/tools/eslint/node_modules/lodash/isString.js index 573de3b53c..b9d4f24feb 100644 --- a/tools/eslint/node_modules/lodash/isString.js +++ b/tools/eslint/node_modules/lodash/isString.js @@ -22,8 +22,7 @@ var objectToString = objectProto.toString; * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); diff --git a/tools/eslint/node_modules/lodash/isSymbol.js b/tools/eslint/node_modules/lodash/isSymbol.js index 21dd55927d..060d97f17e 100644 --- a/tools/eslint/node_modules/lodash/isSymbol.js +++ b/tools/eslint/node_modules/lodash/isSymbol.js @@ -21,8 +21,7 @@ var objectToString = objectProto.toString; * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); diff --git a/tools/eslint/node_modules/lodash/isTypedArray.js b/tools/eslint/node_modules/lodash/isTypedArray.js index 0d86b90cb6..da3f8dd198 100644 --- a/tools/eslint/node_modules/lodash/isTypedArray.js +++ b/tools/eslint/node_modules/lodash/isTypedArray.js @@ -1,58 +1,9 @@ -var isLength = require('./isLength'), - isObjectLike = require('./isObjectLike'); +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. @@ -62,8 +13,7 @@ var objectToString = objectProto.toString; * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); @@ -72,9 +22,6 @@ var objectToString = objectProto.toString; * _.isTypedArray([]); * // => false */ -function isTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; -} +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; diff --git a/tools/eslint/node_modules/lodash/isWeakMap.js b/tools/eslint/node_modules/lodash/isWeakMap.js index cd7b9ed81d..8d36f6638f 100644 --- a/tools/eslint/node_modules/lodash/isWeakMap.js +++ b/tools/eslint/node_modules/lodash/isWeakMap.js @@ -12,8 +12,7 @@ var weakMapTag = '[object WeakMap]'; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); diff --git a/tools/eslint/node_modules/lodash/isWeakSet.js b/tools/eslint/node_modules/lodash/isWeakSet.js index 5395797ae6..a018f53c03 100644 --- a/tools/eslint/node_modules/lodash/isWeakSet.js +++ b/tools/eslint/node_modules/lodash/isWeakSet.js @@ -21,8 +21,7 @@ var objectToString = objectProto.toString; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. * @example * * _.isWeakSet(new WeakSet); diff --git a/tools/eslint/node_modules/lodash/keyBy.js b/tools/eslint/node_modules/lodash/keyBy.js index 97e6f4b38e..44393bf57d 100644 --- a/tools/eslint/node_modules/lodash/keyBy.js +++ b/tools/eslint/node_modules/lodash/keyBy.js @@ -11,7 +11,7 @@ var createAggregator = require('./_createAggregator'); * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example diff --git a/tools/eslint/node_modules/lodash/lang.js b/tools/eslint/node_modules/lodash/lang.js index 6340c4b820..a3962169ab 100644 --- a/tools/eslint/node_modules/lodash/lang.js +++ b/tools/eslint/node_modules/lodash/lang.js @@ -4,6 +4,7 @@ module.exports = { 'cloneDeep': require('./cloneDeep'), 'cloneDeepWith': require('./cloneDeepWith'), 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), 'eq': require('./eq'), 'gt': require('./gt'), 'gte': require('./gte'), diff --git a/tools/eslint/node_modules/lodash/lastIndexOf.js b/tools/eslint/node_modules/lodash/lastIndexOf.js index 1b8fbbc0ee..f86516d517 100644 --- a/tools/eslint/node_modules/lodash/lastIndexOf.js +++ b/tools/eslint/node_modules/lodash/lastIndexOf.js @@ -1,4 +1,5 @@ -var indexOfNaN = require('./_indexOfNaN'), +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), toInteger = require('./toInteger'); /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -41,7 +42,7 @@ function lastIndexOf(array, value, fromIndex) { ) + 1; } if (value !== value) { - return indexOfNaN(array, index - 1, true); + return baseFindIndex(array, baseIsNaN, index - 1, true); } while (index--) { if (array[index] === value) { diff --git a/tools/eslint/node_modules/lodash/lodash.js b/tools/eslint/node_modules/lodash/lodash.js index 5b5c703ba0..22e73749bd 100644 --- a/tools/eslint/node_modules/lodash/lodash.js +++ b/tools/eslint/node_modules/lodash/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.13.1'; + var VERSION = '4.14.1'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -26,7 +26,7 @@ /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; - /** Used to compose bitmasks for wrapper metadata. */ + /** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, @@ -66,6 +66,19 @@ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', ARY_FLAG], + ['bind', BIND_FLAG], + ['bindKey', BIND_KEY_FLAG], + ['curry', CURRY_FLAG], + ['curryRight', CURRY_RIGHT_FLAG], + ['flip', FLIP_FLAG], + ['partial', PARTIAL_FLAG], + ['partialRight', PARTIAL_RIGHT_FLAG], + ['rearg', REARG_FLAG] + ]; + /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', @@ -116,7 +129,8 @@ /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` @@ -130,6 +144,11 @@ reTrimStart = /^\s+/, reTrimEnd = /\s+$/; + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + /** Used to match non-compound words composed of alphanumeric characters. */ var reBasicWord = /[a-zA-Z0-9]+/g; @@ -249,7 +268,7 @@ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', 'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', - '_', 'isFinite', 'parseInt', 'setTimeout' + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' ]; /** Used to make template sourceURLs easier to identify. */ @@ -342,26 +361,41 @@ var freeParseFloat = parseFloat, freeParseInt = parseInt; + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports; + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module; + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; - /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(typeof global == 'object' && global); + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; - /** Detect free variable `self`. */ - var freeSelf = checkGlobal(typeof self == 'object' && self); + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} + }()); - /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(typeof this == 'object' && this); - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || thisGlobal || Function('return this')(); + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /*--------------------------------------------------------------------------*/ @@ -374,7 +408,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { - // Don't return `Map#set` because it doesn't return the map instance in IE 11. + // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } @@ -388,6 +422,7 @@ * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } @@ -403,8 +438,7 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { - var length = args.length; - switch (length) { + switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); @@ -721,7 +755,7 @@ */ function baseIndexOf(array, value, fromIndex) { if (value !== value) { - return indexOfNaN(array, fromIndex); + return baseFindIndex(array, baseIsNaN, fromIndex); } var index = fromIndex - 1, length = array.length; @@ -757,6 +791,17 @@ } /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** * The base implementation of `_.mean` and `_.meanBy` without support for * iteratee shorthands. * @@ -771,6 +816,32 @@ } /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * @@ -870,7 +941,7 @@ } /** - * The base implementation of `_.unary` without support for storing wrapper metadata. + * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. @@ -944,17 +1015,6 @@ } /** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - - /** * Gets the number of `placeholder` occurrences in `array`. * * @private @@ -981,9 +1041,7 @@ * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ - function deburrLetter(letter) { - return deburredLetters[letter]; - } + var deburrLetter = basePropertyOf(deburredLetters); /** * Used by `_.escape` to convert characters to HTML entities. @@ -992,9 +1050,7 @@ * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } + var escapeHtmlChar = basePropertyOf(htmlEscapes); /** * Used by `_.template` to escape characters for inclusion in compiled string literals. @@ -1020,28 +1076,6 @@ } /** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ - function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; - } - - /** * Checks if `value` is a host object in IE < 9. * * @private @@ -1095,6 +1129,20 @@ } /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. * @@ -1189,9 +1237,7 @@ * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ - function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; - } + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); /*--------------------------------------------------------------------------*/ @@ -1235,7 +1281,8 @@ context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root; /** Built-in constructor references. */ - var Date = context.Date, + var Array = context.Array, + Date = context.Date, Error = context.Error, Math = context.Math, RegExp = context.RegExp, @@ -1289,19 +1336,22 @@ Symbol = context.Symbol, Uint8Array = context.Uint8Array, enumerate = Reflect ? Reflect.enumerate : undefined, - getOwnPropertySymbols = Object.getOwnPropertySymbols, - iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined, - objectCreate = Object.create, + iteratorSymbol = Symbol ? Symbol.iterator : undefined, + objectCreate = context.Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** Built-in method references that are mockable. */ - var setTimeout = function(func, wait) { return context.setTimeout.call(root, func, wait); }; + var clearTimeout = function(id) { return context.clearTimeout.call(root, id); }, + setTimeout = function(func, wait) { return context.setTimeout.call(root, func, wait); }; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetPrototype = Object.getPrototypeOf, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = Object.keys, @@ -1319,7 +1369,15 @@ Promise = getNative(context, 'Promise'), Set = getNative(context, 'Set'), WeakMap = getNative(context, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); + nativeCreate = getNative(context.Object, 'create'); + + /* Used to set `toString` methods. */ + var defineProperty = (function() { + var func = getNative(context.Object, 'defineProperty'), + name = getNative.name; + + return (name && name.length > 2) ? func : undefined; + }()); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; @@ -1410,16 +1468,16 @@ * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, - * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, - * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, - * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, @@ -2122,8 +2180,13 @@ */ function stackSet(key, value) { var cache = this.__data__; - if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) { - cache = this.__data__ = new MapCache(cache.__data__); + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); } cache.set(key, value); return this; @@ -2260,7 +2323,7 @@ } /** - * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. + * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. @@ -2344,12 +2407,12 @@ if (!isArr) { var props = isFull ? getAllKeys(value) : keys(value); } - // Recursively populate clone (susceptible to call stack limits). arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } + // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); return result; @@ -2363,26 +2426,37 @@ * @returns {Function} Returns the new spec function. */ function baseConforms(source) { - var props = keys(source), - length = props.length; - + var props = keys(source); return function(object) { - if (object == null) { - return !length; - } - var index = length; - while (index--) { - var key = props[index], - predicate = source[key], - value = object[key]; + return baseConformsTo(object, source, props); + }; + } - if ((value === undefined && - !(key in Object(object))) || !predicate(value)) { - return false; - } + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + var index = length; + while (index--) { + var key = props[index], + predicate = source[key], + value = object[key]; + + if ((value === undefined && + !(key in Object(object))) || !predicate(value)) { + return false; } - return true; - }; + } + return true; } /** @@ -2398,13 +2472,13 @@ } /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. + * @param {Array} args The arguments to provide to `func`. * @returns {number} Returns the timer id. */ function baseDelay(func, wait, args) { @@ -2718,7 +2792,18 @@ } /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString.call(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -2760,7 +2845,7 @@ } /** - * The base implementation of `_.inRange` which doesn't coerce arguments to numbers. + * The base implementation of `_.inRange` which doesn't coerce arguments. * * @private * @param {number} number The number to check. @@ -2874,6 +2959,28 @@ } /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && objectToString.call(value) == dateTag; + } + + /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * @@ -2957,6 +3064,17 @@ } /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private @@ -3027,6 +3145,40 @@ } /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObject(value) && objectToString.call(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + + /** * The base implementation of `_.iteratee`. * * @private @@ -3058,9 +3210,7 @@ * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ - function baseKeys(object) { - return nativeKeys(Object(object)); - } + var baseKeys = overArg(nativeKeys, Object); /** * The base implementation of `_.keysIn` which doesn't skip the constructor @@ -3088,7 +3238,7 @@ } /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -3255,18 +3405,17 @@ isCommon = false; } } - stack.set(srcValue, newValue); - if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); } - stack['delete'](srcValue); assignMergeValue(object, key, newValue); } /** - * The base implementation of `_.nth` which doesn't coerce `n` to an integer. + * The base implementation of `_.nth` which doesn't coerce arguments. * * @private * @param {Array} array The array to query. @@ -3318,12 +3467,9 @@ */ function basePick(object, props) { object = Object(object); - return arrayReduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); + return basePickBy(object, props, function(value, key) { + return key in object; + }); } /** @@ -3331,12 +3477,12 @@ * * @private * @param {Object} object The source object. + * @param {string[]} props The property identifiers to pick from. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ - function basePickBy(object, predicate) { + function basePickBy(object, props, predicate) { var index = -1, - props = getAllKeysIn(object), length = props.length, result = {}; @@ -3352,19 +3498,6 @@ } /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** * A specialized version of `baseProperty` which supports deep paths. * * @private @@ -3466,7 +3599,7 @@ /** * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments to numbers. + * coerce arguments. * * @private * @param {number} start The start of the range. @@ -3516,6 +3649,35 @@ } /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + + /** * The base implementation of `_.set`. * * @private @@ -4294,9 +4456,9 @@ var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + assignValue(object, key, newValue === undefined ? source[key] : newValue); } return object; } @@ -4326,7 +4488,7 @@ var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; - return func(collection, setter, getIteratee(iteratee), accumulator); + return func(collection, setter, getIteratee(iteratee, 2), accumulator); }; } @@ -4338,7 +4500,7 @@ * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, @@ -4422,14 +4584,13 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ - function createBaseWrapper(func, bitmask, thisArg) { + function createBind(func, bitmask, thisArg) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -4486,7 +4647,7 @@ * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ - function createCtorWrapper(Ctor) { + function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist @@ -4516,13 +4677,12 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createCurryWrapper(func, bitmask, arity) { - var Ctor = createCtorWrapper(func); + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); function wrapper() { var length = arguments.length, @@ -4539,8 +4699,8 @@ length -= holders.length; if (length < arity) { - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, undefined, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -4559,18 +4719,13 @@ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); - predicate = getIteratee(predicate, 3); if (!isArrayLike(collection)) { - var props = keys(collection); + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } - var index = findIndexFunc(props || collection, function(value, key) { - if (props) { - key = value; - value = iterable[key]; - } - return predicate(value, key, iterable); - }, fromIndex); - return index > -1 ? collection[props ? props[index] : index] : undefined; + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } @@ -4582,7 +4737,7 @@ * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { - return rest(function(funcs) { + return baseRest(function(funcs) { funcs = baseFlatten(funcs, 1); var length = funcs.length, @@ -4644,8 +4799,7 @@ * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. @@ -4658,13 +4812,13 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & ARY_FLAG, isBind = bitmask & BIND_FLAG, isBindKey = bitmask & BIND_KEY_FLAG, isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), isFlip = bitmask & FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); + Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, @@ -4687,8 +4841,8 @@ length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } @@ -4705,7 +4859,7 @@ args.length = ary; } if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(fn); + fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } @@ -4731,13 +4885,14 @@ * * @private * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */ - function createMathOperation(operator) { + function createMathOperation(operator, defaultValue) { return function(value, other) { var result; if (value === undefined && other === undefined) { - return 0; + return defaultValue; } if (value !== undefined) { result = value; @@ -4767,12 +4922,12 @@ * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { - return rest(function(iteratees) { + return baseRest(function(iteratees) { iteratees = (iteratees.length == 1 && isArray(iteratees[0])) ? arrayMap(iteratees[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee())); + : arrayMap(baseFlatten(iteratees, 1), baseUnary(getIteratee())); - return rest(function(args) { + return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { return apply(iteratee, thisArg, args); @@ -4809,16 +4964,15 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ - function createPartialWrapper(func, bitmask, thisArg, partials) { + function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -4852,15 +5006,14 @@ end = step = undefined; } // Ensure the sign of `-0` is preserved. - start = toNumber(start); - start = start === start ? start : 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } - step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0); + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } @@ -4887,8 +5040,7 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. @@ -4900,7 +5052,7 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, @@ -4923,7 +5075,7 @@ setData(result, newData); } result.placeholder = placeholder; - return result; + return setWrapToString(result, func, bitmask); } /** @@ -4952,7 +5104,7 @@ } /** - * Creates a set of `values`. + * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. @@ -4988,7 +5140,7 @@ * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. + * @param {number} bitmask The bitmask flags. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -5008,7 +5160,7 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); @@ -5051,16 +5203,16 @@ bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == BIND_FLAG) { - var result = createBaseWrapper(func, bitmask, thisArg); + var result = createBind(func, bitmask, thisArg); } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { - result = createCurryWrapper(func, bitmask, arity); + result = createCurry(func, bitmask, arity); } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { - result = createPartialWrapper(func, bitmask, thisArg, partials); + result = createPartial(func, bitmask, thisArg, partials); } else { - result = createHybridWrapper.apply(undefined, newData); + result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; - return setter(result, newData); + return setWrapToString(setter(result, newData), func, bitmask); } /** @@ -5087,7 +5239,7 @@ } // Assume cyclic values are equal. var stacked = stack.get(array); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var index = -1, @@ -5095,6 +5247,7 @@ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { @@ -5133,6 +5286,7 @@ } } stack['delete'](array); + stack['delete'](other); return result; } @@ -5173,18 +5327,14 @@ case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, @@ -5208,10 +5358,12 @@ return stacked == other; } bitmask |= UNORDERED_COMPARE_FLAG; - stack.set(object, other); // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; case symbolTag: if (symbolValueOf) { @@ -5254,11 +5406,12 @@ } // Assume cyclic values are equal. var stacked = stack.get(object); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); + stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { @@ -5294,6 +5447,7 @@ } } stack['delete'](object); + stack['delete'](other); return result; } @@ -5450,9 +5604,7 @@ * @param {*} value The value to query. * @returns {null|Object} Returns the `[[Prototype]]`. */ - function getPrototype(value) { - return nativeGetPrototype(Object(value)); - } + var getPrototype = overArg(nativeGetPrototype, Object); /** * Creates an array of the own enumerable symbol properties of `object`. @@ -5461,16 +5613,7 @@ * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ - function getSymbols(object) { - // Coerce `object` to an object to avoid non-object errors in V8. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details. - return getOwnPropertySymbols(Object(object)); - } - - // Fallback for IE < 11. - if (!getOwnPropertySymbols) { - getSymbols = stubArray; - } + var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; /** * Creates an array of the own and inherited enumerable symbol properties @@ -5480,7 +5623,7 @@ * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ - var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) { + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); @@ -5496,9 +5639,7 @@ * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ - function getTag(value) { - return objectToString.call(value); - } + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11, // for data views in Edge, and promises in Node.js. @@ -5554,6 +5695,18 @@ } /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** * Checks if `path` exists on `object`. * * @private @@ -5683,26 +5836,32 @@ } /** - * Checks if `value` is a flattenable `arguments` object or array. + * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. */ - function isFlattenable(value) { - return isArray(value) || isArguments(value); + function insertWrapDetails(source, details) { + var length = details.length, + lastIndex = length - 1; + + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } /** - * Checks if `value` is a flattenable array and not a `_.matchesProperty` - * iteratee shorthand. + * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ - function isFlattenableIteratee(value) { - return isArray(value) && !(value.length == 2 && !isFunction(value[0])); + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } /** @@ -5952,7 +6111,10 @@ */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + stack['delete'](srcValue); } return objValue; } @@ -6026,6 +6188,25 @@ }()); /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) { + var source = (reference + ''); + return defineProperty(wrapper, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))) + }); + }; + + /** * Converts `string` to a property path array. * * @private @@ -6033,8 +6214,13 @@ * @returns {Array} Returns the property path array. */ var stringToPath = memoize(function(string) { + string = toString(string); + var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; @@ -6075,6 +6261,24 @@ } /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** * Creates a clone of `wrapper`. * * @private @@ -6202,11 +6406,13 @@ } /** - * Creates an array of unique `array` values not included in the other given - * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * for equality comparisons. The order of result values is determined by the * order they occur in the first array. * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 @@ -6220,7 +6426,7 @@ * _.difference([2, 1], [2, 3]); * // => [1] */ - var difference = rest(function(array, values) { + var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; @@ -6232,14 +6438,15 @@ * by which they're compared. Result values are chosen from the first array. * The iteratee is invoked with one argument: (value). * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * @@ -6250,13 +6457,13 @@ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ - var differenceBy = rest(function(array, values) { + var differenceBy = baseRest(function(array, values) { var iteratee = last(values); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) : []; }); @@ -6266,6 +6473,8 @@ * are chosen from the first array. The comparator is invoked with two arguments: * (arrVal, othVal). * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * * @static * @memberOf _ * @since 4.0.0 @@ -6281,7 +6490,7 @@ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); * // => [{ 'x': 2, 'y': 1 }] */ - var differenceWith = rest(function(array, values) { + var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = undefined; @@ -6370,8 +6579,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -6412,7 +6620,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example @@ -6494,7 +6702,7 @@ * @since 1.1.0 * @category Array * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. @@ -6542,7 +6750,7 @@ * @since 2.0.0 * @category Array * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. @@ -6663,8 +6871,8 @@ * @returns {Object} Returns the new object. * @example * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, @@ -6770,7 +6978,7 @@ * _.intersection([2, 1], [2, 3]); * // => [2] */ - var intersection = rest(function(arrays) { + var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) @@ -6788,8 +6996,7 @@ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * @@ -6800,7 +7007,7 @@ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }] */ - var intersectionBy = rest(function(arrays) { + var intersectionBy = baseRest(function(arrays) { var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); @@ -6810,7 +7017,7 @@ mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, getIteratee(iteratee)) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) : []; }); @@ -6835,7 +7042,7 @@ * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ - var intersectionWith = rest(function(arrays) { + var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); @@ -6923,7 +7130,7 @@ ) + 1; } if (value !== value) { - return indexOfNaN(array, index - 1, true); + return baseFindIndex(array, baseIsNaN, index - 1, true); } while (index--) { if (array[index] === value) { @@ -6981,7 +7188,7 @@ * console.log(array); * // => ['b', 'b'] */ - var pull = rest(pullAll); + var pull = baseRest(pullAll); /** * This method is like `_.pull` except that it accepts an array of values to remove. @@ -7022,7 +7229,7 @@ * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns `array`. * @example @@ -7035,7 +7242,7 @@ */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAll(array, values, getIteratee(iteratee)) + ? basePullAll(array, values, getIteratee(iteratee, 2)) : array; } @@ -7092,7 +7299,7 @@ * console.log(pulled); * // => ['b', 'd'] */ - var pullAt = rest(function(array, indexes) { + var pullAt = baseRest(function(array, indexes) { indexes = baseFlatten(indexes, 1); var length = array ? array.length : 0, @@ -7118,7 +7325,7 @@ * @since 2.0.0 * @category Array * @param {Array} array The array to modify. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example @@ -7246,7 +7453,7 @@ * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. @@ -7262,7 +7469,7 @@ * // => 0 */ function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee)); + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); } /** @@ -7325,7 +7532,7 @@ * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. @@ -7341,7 +7548,7 @@ * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee), true); + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); } /** @@ -7410,7 +7617,7 @@ */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniq(array, getIteratee(iteratee)) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; } @@ -7510,7 +7717,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example @@ -7552,7 +7759,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example @@ -7600,14 +7807,15 @@ * _.union([2], [1, 2]); * // => [2, 1] */ - var union = rest(function(arrays) { + var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); /** * This method is like `_.union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. The iteratee is invoked with one argument: + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: * (value). * * @static @@ -7615,7 +7823,7 @@ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns the new array of combined values. * @example @@ -7627,17 +7835,18 @@ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ - var unionBy = rest(function(arrays) { + var unionBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); }); /** * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static @@ -7655,7 +7864,7 @@ * _.unionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - var unionWith = rest(function(arrays) { + var unionWith = baseRest(function(arrays) { var comparator = last(arrays); if (isArrayLikeObject(comparator)) { comparator = undefined; @@ -7696,7 +7905,7 @@ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example @@ -7710,7 +7919,7 @@ */ function uniqBy(array, iteratee) { return (array && array.length) - ? baseUniq(array, getIteratee(iteratee)) + ? baseUniq(array, getIteratee(iteratee, 2)) : []; } @@ -7752,11 +7961,11 @@ * @returns {Array} Returns the new array of regrouped elements. * @example * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] * * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] + * // => [['a', 'b'], [1, 2], [true, false]] */ function unzip(array) { if (!(array && array.length)) { @@ -7813,6 +8022,8 @@ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * for equality comparisons. * + * **Note:** Unlike `_.pull`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 @@ -7826,7 +8037,7 @@ * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ - var without = rest(function(array, values) { + var without = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, values) : []; @@ -7850,7 +8061,7 @@ * _.xor([2, 1], [2, 3]); * // => [1, 3] */ - var xor = rest(function(arrays) { + var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); @@ -7865,7 +8076,7 @@ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example @@ -7877,12 +8088,12 @@ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ - var xorBy = rest(function(arrays) { + var xorBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee)); + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); }); /** @@ -7905,7 +8116,7 @@ * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - var xorWith = rest(function(arrays) { + var xorWith = baseRest(function(arrays) { var comparator = last(arrays); if (isArrayLikeObject(comparator)) { comparator = undefined; @@ -7926,10 +8137,10 @@ * @returns {Array} Returns the new array of grouped elements. * @example * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ - var zip = rest(unzip); + var zip = baseRest(unzip); /** * This method is like `_.fromPairs` except that it accepts two arrays, @@ -7989,7 +8200,7 @@ * }); * // => [111, 222] */ - var zipWith = rest(function(arrays) { + var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined; @@ -8105,7 +8316,7 @@ * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] */ - var wrapperAt = rest(function(paths) { + var wrapperAt = baseRest(function(paths) { paths = baseFlatten(paths, 1); var length = paths.length, start = length ? paths[0] : 0, @@ -8358,7 +8569,7 @@ * @since 0.5.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example @@ -8384,7 +8595,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, @@ -8424,12 +8635,14 @@ * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject @@ -8470,7 +8683,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. @@ -8508,7 +8721,7 @@ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. @@ -8531,7 +8744,7 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example @@ -8556,7 +8769,7 @@ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example @@ -8581,7 +8794,7 @@ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. @@ -8671,7 +8884,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example @@ -8715,10 +8928,10 @@ * _.includes([1, 2, 3], 1, 2); * // => false * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * - * _.includes('pebbles', 'eb'); + * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { @@ -8737,8 +8950,8 @@ /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function, it's - * invoked for and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -8757,7 +8970,7 @@ * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ - var invokeMap = rest(function(collection, path, args) { + var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', isProp = isKey(path), @@ -8781,7 +8994,7 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example @@ -8822,8 +9035,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * @@ -8905,8 +9117,7 @@ * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * @@ -9017,8 +9228,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example @@ -9045,10 +9255,7 @@ */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = getIteratee(predicate, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); + return func(collection, negate(getIteratee(predicate, 3))); } /** @@ -9181,8 +9388,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. @@ -9227,8 +9433,8 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -9250,7 +9456,7 @@ * }); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ - var sortBy = rest(function(collection, iteratees) { + var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } @@ -9260,11 +9466,7 @@ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? iteratees[0] - : baseFlatten(iteratees, 1, isFlattenableIteratee); - - return baseOrderBy(collection, iteratees, []); + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); /*------------------------------------------------------------------------*/ @@ -9347,7 +9549,7 @@ function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; - return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + return createWrap(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); } /** @@ -9365,7 +9567,7 @@ * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; @@ -9404,9 +9606,9 @@ * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -9419,13 +9621,13 @@ * bound('hi'); * // => 'hi fred!' */ - var bind = rest(function(func, thisArg, partials) { + var bind = baseRest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bind)); bitmask |= PARTIAL_FLAG; } - return createWrapper(func, bitmask, thisArg, partials, holders); + return createWrap(func, bitmask, thisArg, partials, holders); }); /** @@ -9473,13 +9675,13 @@ * bound('hi'); * // => 'hiya fred!' */ - var bindKey = rest(function(object, key, partials) { + var bindKey = baseRest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= PARTIAL_FLAG; } - return createWrapper(key, bitmask, object, partials, holders); + return createWrap(key, bitmask, object, partials, holders); }); /** @@ -9525,7 +9727,7 @@ */ function curry(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } @@ -9570,7 +9772,7 @@ */ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curryRight.placeholder; return result; } @@ -9580,14 +9782,18 @@ * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide an options object to indicate whether `func` should be invoked on - * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent calls - * to the debounced function return the result of the last `func` invocation. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the debounced function is - * invoked more than once during the `wait` timeout. + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. @@ -9708,6 +9914,9 @@ } function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } @@ -9762,7 +9971,7 @@ * }, 'deferred'); * // => Logs 'deferred' after one or more milliseconds. */ - var defer = rest(function(func, args) { + var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); @@ -9785,7 +9994,7 @@ * }, 1000, 'later'); * // => Logs 'later' after one second. */ - var delay = rest(function(func, wait, args) { + var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); @@ -9808,7 +10017,7 @@ * // => ['d', 'c', 'b', 'a'] */ function flip(func) { - return createWrapper(func, FLIP_FLAG); + return createWrap(func, FLIP_FLAG); } /** @@ -9903,7 +10112,14 @@ throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); }; } @@ -9923,23 +10139,22 @@ * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); } /** - * Creates a function that invokes `func` with arguments transformed by - * corresponding `transforms`. + * Creates a function that invokes `func` with its arguments transformed. * * @static * @since 4.0.0 * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [transforms[_.identity]] The functions to transform. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. * @returns {Function} Returns the new function. * @example * @@ -9961,13 +10176,13 @@ * func(10, 5); * // => [100, 10] */ - var overArgs = rest(function(func, transforms) { + var overArgs = baseRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee())); + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); var funcsLength = transforms.length; - return rest(function(args) { + return baseRest(function(args) { var index = -1, length = nativeMin(args.length, funcsLength); @@ -9998,9 +10213,9 @@ * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); @@ -10011,9 +10226,9 @@ * greetFred('hi'); * // => 'hi fred' */ - var partial = rest(function(func, partials) { + var partial = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partial)); - return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); + return createWrap(func, PARTIAL_FLAG, undefined, partials, holders); }); /** @@ -10035,9 +10250,9 @@ * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); @@ -10048,9 +10263,9 @@ * sayHelloTo('fred'); * // => 'hello fred' */ - var partialRight = rest(function(func, partials) { + var partialRight = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); + return createWrap(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); /** @@ -10075,8 +10290,8 @@ * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ - var rearg = rest(function(func, indexes) { - return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); + var rearg = baseRest(function(func, indexes) { + return createWrap(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); }); /** @@ -10108,29 +10323,8 @@ if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, array); - case 1: return func.call(this, args[0], array); - case 2: return func.call(this, args[0], args[1], array); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } /** @@ -10172,7 +10366,7 @@ throw new TypeError(FUNC_ERROR_TEXT); } start = start === undefined ? 0 : nativeMax(toInteger(start), 0); - return rest(function(args) { + return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); @@ -10187,8 +10381,8 @@ * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide an options object to indicate whether - * `func` should be invoked on the leading and/or trailing edge of the `wait` + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. @@ -10197,6 +10391,9 @@ * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * @@ -10262,10 +10459,10 @@ } /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ @@ -10451,6 +10648,34 @@ } /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. @@ -10464,8 +10689,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true @@ -10546,7 +10771,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * @@ -10568,11 +10793,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); @@ -10597,8 +10820,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * * _.isArrayBuffer(new ArrayBuffer(2)); @@ -10607,9 +10829,7 @@ * _.isArrayBuffer(new Array(2)); * // => false */ - function isArrayBuffer(value) { - return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; - } + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; /** * Checks if `value` is array-like. A value is considered array-like if it's @@ -10677,8 +10897,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -10709,9 +10928,7 @@ * _.isBuffer(new Uint8Array(2)); * // => false */ - var isBuffer = !Buffer ? stubFalse : function(value) { - return value instanceof Buffer; - }; + var isBuffer = nativeIsBuffer || stubFalse; /** * Checks if `value` is classified as a `Date` object. @@ -10721,8 +10938,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -10731,9 +10947,7 @@ * _.isDate('Mon April 23 2012'); * // => false */ - function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; - } + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; /** * Checks if `value` is likely a DOM element. @@ -10830,8 +11044,8 @@ * else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true @@ -10948,8 +11162,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -11094,8 +11307,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); @@ -11104,16 +11316,14 @@ * _.isMap(new WeakMap); * // => false */ - function isMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; - } + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; /** * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. This method is - * equivalent to a `_.matches` function when `source` is partially applied. + * determine if `object` contains equivalent property values. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** This method supports comparing the same values as `_.isEqual` + * and is equivalent to `_.matches` when `source` is partially applied. * * @static * @memberOf _ @@ -11124,12 +11334,12 @@ * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * var object = { 'user': 'fred', 'age': 40 }; + * var object = { 'a': 1, 'b': 2 }; * - * _.isMatch(object, { 'age': 40 }); + * _.isMatch(object, { 'b': 2 }); * // => true * - * _.isMatch(object, { 'age': 36 }); + * _.isMatch(object, { 'b': 1 }); * // => false */ function isMatch(object, source) { @@ -11211,13 +11421,13 @@ /** * Checks if `value` is a pristine native function. * - * **Note:** This method can't reliably detect native functions in the - * presence of the `core-js` package because `core-js` circumvents this kind - * of detection. Despite multiple requests, the `core-js` maintainer has made - * it clear: any attempt to fix the detection will be obstructed. As a result, - * we're left with little choice but to throw an error. Unfortunately, this - * also affects packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on `core-js`. + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. * * @static * @memberOf _ @@ -11236,7 +11446,7 @@ */ function isNative(value) { if (isMaskable(value)) { - throw new Error('This method is not supported with `core-js`. Try https://github.com/es-shims.'); + throw new Error('This method is not supported with core-js. Try https://github.com/es-shims.'); } return baseIsNative(value); } @@ -11297,8 +11507,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -11369,8 +11578,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -11379,9 +11587,7 @@ * _.isRegExp('/abc/'); * // => false */ - function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; - } + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; /** * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 @@ -11423,8 +11629,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); @@ -11433,9 +11638,7 @@ * _.isSet(new WeakSet); * // => false */ - function isSet(value) { - return isObjectLike(value) && getTag(value) == setTag; - } + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; /** * Checks if `value` is classified as a `String` primitive or object. @@ -11445,8 +11648,7 @@ * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -11468,8 +11670,7 @@ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -11491,8 +11692,7 @@ * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); @@ -11501,10 +11701,7 @@ * _.isTypedArray([]); * // => false */ - function isTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; - } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Checks if `value` is `undefined`. @@ -11535,8 +11732,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); @@ -11557,8 +11753,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. * @example * * _.isWeakSet(new WeakSet); @@ -11907,18 +12102,18 @@ * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { @@ -11950,18 +12145,18 @@ * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { @@ -12055,7 +12250,7 @@ * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] */ - var at = rest(function(object, paths) { + var at = baseRest(function(object, paths) { return baseAt(object, baseFlatten(paths, 1)); }); @@ -12116,10 +12311,10 @@ * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var defaults = rest(function(args) { + var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return apply(assignInWith, undefined, args); }); @@ -12140,11 +12335,10 @@ * @see _.defaults * @example * - * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); - * // => { 'user': { 'name': 'barney', 'age': 36 } } - * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ - var defaultsDeep = rest(function(args) { + var defaultsDeep = baseRest(function(args) { args.push(undefined, mergeDefaults); return apply(mergeWith, undefined, args); }); @@ -12158,8 +12352,7 @@ * @since 1.1.0 * @category Object * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -12198,8 +12391,7 @@ * @since 2.0.0 * @category Object * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -12413,7 +12605,7 @@ /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ @@ -12536,8 +12728,7 @@ * @since 4.1.0 * @category Object * @param {Object} object The object to invert. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Object} Returns the new inverted object. * @example * @@ -12577,7 +12768,7 @@ * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ - var invoke = rest(baseInvoke); + var invoke = baseRest(baseInvoke); /** * Creates an array of the own enumerable property names of `object`. @@ -12681,8 +12872,7 @@ * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example @@ -12713,8 +12903,7 @@ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example @@ -12761,16 +12950,16 @@ * @returns {Object} Returns `object`. * @example * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); @@ -12801,18 +12990,11 @@ * } * } * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; * * _.mergeWith(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + * // => { 'a': [1, 3], 'b': [2, 4] } */ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { baseMerge(object, source, srcIndex, customizer); @@ -12837,7 +13019,7 @@ * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ - var omit = rest(function(object, props) { + var omit = baseRest(function(object, props) { if (object == null) { return {}; } @@ -12856,8 +13038,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -12867,10 +13048,7 @@ * // => { 'b': '2' } */ function omitBy(object, predicate) { - predicate = getIteratee(predicate); - return basePickBy(object, function(value, key) { - return !predicate(value, key); - }); + return pickBy(object, negate(getIteratee(predicate))); } /** @@ -12890,7 +13068,7 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = rest(function(object, props) { + var pick = baseRest(function(object, props) { return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); }); @@ -12903,8 +13081,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -12914,7 +13091,7 @@ * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { - return object == null ? {} : basePickBy(object, getIteratee(predicate)); + return object == null ? {} : basePickBy(object, getAllKeysIn(object), getIteratee(predicate)); } /** @@ -13358,12 +13535,12 @@ * // => true */ function inRange(number, start, end) { - start = toNumber(start) || 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); @@ -13419,12 +13596,12 @@ upper = 1; } else { - lower = toNumber(lower) || 0; + lower = toFinite(lower); if (upper === undefined) { upper = lower; lower = 0; } else { - upper = toNumber(upper) || 0; + upper = toFinite(upper); } } if (lower > upper) { @@ -13539,8 +13716,9 @@ ? length : baseClamp(toInteger(position), 0, length); + var end = position; position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; + return position >= 0 && string.slice(position, end) == target; } /** @@ -13988,7 +14166,8 @@ function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(baseToString(target), position) == position; + target = baseToString(target); + return string.slice(position, position + target.length) == target; } /** @@ -14571,7 +14750,7 @@ * elements = []; * } */ - var attempt = rest(function(func, args) { + var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { @@ -14596,16 +14775,16 @@ * * var view = { * 'label': 'docs', - * 'onClick': function() { + * 'click': function() { * console.log('clicked ' + this.label); * } * }; * - * _.bindAll(view, ['onClick']); - * jQuery(element).on('click', view.onClick); + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ - var bindAll = rest(function(object, methodNames) { + var bindAll = baseRest(function(object, methodNames) { arrayEach(baseFlatten(methodNames, 1), function(key) { key = toKey(key); object[key] = bind(object[key], object); @@ -14630,7 +14809,7 @@ * var func = _.cond([ * [_.matches({ 'a': 1 }), _.constant('matches A')], * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.constant(true), _.constant('no match')] + * [_.stubTrue, _.constant('no match')] * ]); * * func({ 'a': 1, 'b': 2 }); @@ -14653,7 +14832,7 @@ return [toIteratee(pair[0]), pair[1]]; }); - return rest(function(args) { + return baseRest(function(args) { var index = -1; while (++index < length) { var pair = pairs[index]; @@ -14669,6 +14848,9 @@ * the corresponding property values of a given object, returning `true` if * all predicates return truthy, else `false`. * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * * @static * @memberOf _ * @since 4.0.0 @@ -14677,13 +14859,13 @@ * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } * ]; * - * _.filter(users, _.conforms({ 'age': function(n) { return n > 38; } })); - * // => [{ 'user': 'fred', 'age': 40 }] + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] */ function conforms(source) { return baseConforms(baseClone(source, true)); @@ -14715,6 +14897,30 @@ } /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; + } + + /** * Creates a function that returns the result of invoking the given functions * with the `this` binding of the created function, where each successive * invocation is supplied the return value of the previous. @@ -14723,7 +14929,7 @@ * @memberOf _ * @since 3.0.0 * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. + * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flowRight * @example @@ -14746,7 +14952,7 @@ * @since 3.0.0 * @memberOf _ * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. + * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flow * @example @@ -14762,7 +14968,7 @@ var flowRight = createFlow(true); /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -14772,7 +14978,7 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true @@ -14830,10 +15036,10 @@ /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** The created function supports comparing the same values as + * `_.isEqual` is equivalent to `_.isMatch` with `source` partially applied. * * @static * @memberOf _ @@ -14843,13 +15049,13 @@ * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, true)); @@ -14871,13 +15077,13 @@ * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.find(users, _.matchesProperty('user', 'fred')); - * // => { 'user': 'fred' } + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, true)); @@ -14907,7 +15113,7 @@ * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ - var method = rest(function(path, args) { + var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; @@ -14936,7 +15142,7 @@ * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); * // => [2, 0] */ - var methodOf = rest(function(object, args) { + var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; @@ -15035,7 +15241,7 @@ } /** - * A method that returns `undefined`. + * This method returns `undefined`. * * @static * @memberOf _ @@ -15072,7 +15278,7 @@ */ function nthArg(n) { n = toInteger(n); - return rest(function(args) { + return baseRest(function(args) { return baseNth(args, n); }); } @@ -15085,8 +15291,8 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to invoke. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. * @returns {Function} Returns the new function. * @example * @@ -15105,8 +15311,8 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * @@ -15131,8 +15337,8 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * @@ -15284,7 +15490,7 @@ var rangeRight = createRange(true); /** - * A method that returns a new empty array. + * This method returns a new empty array. * * @static * @memberOf _ @@ -15306,7 +15512,7 @@ } /** - * A method that returns `false`. + * This method returns `false`. * * @static * @memberOf _ @@ -15323,7 +15529,7 @@ } /** - * A method that returns a new empty object. + * This method returns a new empty object. * * @static * @memberOf _ @@ -15345,7 +15551,7 @@ } /** - * A method that returns an empty string. + * This method returns an empty string. * * @static * @memberOf _ @@ -15362,7 +15568,7 @@ } /** - * A method that returns `true`. + * This method returns `true`. * * @static * @memberOf _ @@ -15480,7 +15686,7 @@ */ var add = createMathOperation(function(augend, addend) { return augend + addend; - }); + }, 0); /** * Computes `number` rounded up to `precision`. @@ -15522,7 +15728,7 @@ */ var divide = createMathOperation(function(dividend, divisor) { return dividend / divisor; - }); + }, 1); /** * Computes `number` rounded down to `precision`. @@ -15581,8 +15787,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * @@ -15597,7 +15802,7 @@ */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), baseGt) + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) : undefined; } @@ -15629,8 +15834,7 @@ * @since 4.7.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the mean. * @example * @@ -15644,7 +15848,7 @@ * // => 5 */ function meanBy(array, iteratee) { - return baseMean(array, getIteratee(iteratee)); + return baseMean(array, getIteratee(iteratee, 2)); } /** @@ -15681,8 +15885,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * @@ -15697,7 +15900,7 @@ */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), baseLt) + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) : undefined; } @@ -15718,7 +15921,7 @@ */ var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; - }); + }, 1); /** * Computes `number` rounded to `precision`. @@ -15760,7 +15963,7 @@ */ var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; - }); + }, 0); /** * Computes the sum of the values in `array`. @@ -15792,8 +15995,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * @@ -15808,7 +16010,7 @@ */ function sumBy(array, iteratee) { return (array && array.length) - ? baseSum(array, getIteratee(iteratee)) + ? baseSum(array, getIteratee(iteratee, 2)) : 0; } @@ -15987,7 +16189,9 @@ lodash.cloneDeep = cloneDeep; lodash.cloneDeepWith = cloneDeepWith; lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; lodash.deburr = deburr; + lodash.defaultTo = defaultTo; lodash.divide = divide; lodash.endsWith = endsWith; lodash.eq = eq; @@ -16228,7 +16432,7 @@ return this.reverse().find(predicate); }; - LazyWrapper.prototype.invokeMap = rest(function(path, args) { + LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { if (typeof path == 'function') { return new LazyWrapper(this); } @@ -16238,10 +16442,7 @@ }); LazyWrapper.prototype.reject = function(predicate) { - predicate = getIteratee(predicate, 3); - return this.filter(function(value) { - return !predicate(value); - }); + return this.filter(negate(getIteratee(predicate))); }; LazyWrapper.prototype.slice = function(start, end) { @@ -16345,7 +16546,7 @@ } }); - realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{ + realNames[createHybrid(undefined, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }]; @@ -16364,6 +16565,9 @@ lodash.prototype.reverse = wrapperReverse; lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + if (iteratorSymbol) { lodash.prototype[iteratorSymbol] = wrapperToIterator; } @@ -16375,22 +16579,21 @@ // Export lodash. var _ = runInContext(); - // Expose Lodash on the free variable `window` or `self` when available so it's - // globally accessible, even when bundled with Browserify, Webpack, etc. This - // also prevents errors in cases where Lodash is loaded by a script tag in the - // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch - // for more details. Use `_.noConflict` to remove Lodash from the global object. - (freeSelf || {})._ = _; - - // Some AMD build optimizers like r.js check for condition patterns like the following: + // Some AMD build optimizers, like r.js, check for condition patterns like: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. define(function() { return _; }); } - // Check for `exports` after `define` in case a build optimizer adds an `exports` object. + // Check for `exports` after `define` in case a build optimizer adds it. else if (freeModule) { // Export for Node.js. (freeModule.exports = _)._ = _; diff --git a/tools/eslint/node_modules/lodash/lodash.min.js b/tools/eslint/node_modules/lodash/lodash.min.js index 018b6a7668..5c282e70a2 100644 --- a/tools/eslint/node_modules/lodash/lodash.min.js +++ b/tools/eslint/node_modules/lodash/lodash.min.js @@ -4,124 +4,127 @@ */ ;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t?t.length:0;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t);); return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){ -var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){return n(t,r,u)?(e=r,false):void 0}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n!==n)return M(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r; -return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t,n){var r=t?t.length:0;return r?w(t,n)/r:V}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function w(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==T&&(r=r===T?o:r+o)}return r}function m(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return l(n,function(n){return[n,t[n]]; -})}function O(t){return function(n){return t(n)}}function k(t,n){return l(n,function(n){return t[n]})}function E(t,n){return t.has(n)}function S(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function I(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function R(t){return t&&t.Object===Object?t:null}function W(t){return zt[t]}function B(t){return Ut[t]}function L(t){return"\\"+Dt[t]}function M(t,n,r){var e=t.length;for(n+=r?1:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1; -}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function z(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}function U(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function $(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function F(t){ -var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function N(t){if(!t||!Wt.test(t))return t.length;for(var n=It.lastIndex=0;It.test(t);)n++;return n}function P(t){return $t[t]}function Z(R){function At(t,n){return R.setTimeout.call(Kt,t,n)}function Ot(t){if(Te(t)&&!yi(t)&&!(t instanceof Ut)){if(t instanceof zt)return t;if(Wu.call(t,"__wrapped__"))return ae(t)}return new zt(t)}function kt(){}function zt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0, -this.__values__=T}function Ut(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function $t(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Dt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Pt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t){var n=-1,r=t?t.length:0; -for(this.__data__=new Pt;++n<r;)this.add(t[n])}function qt(t){this.__data__=new Dt(t)}function Vt(t,n,r,e){return t===T||Ce(t,ku[r])&&!Wu.call(e,r)?n:t}function Jt(t,n,r){(r===T||Ce(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Yt(t,n,r){var e=t[n];Wu.call(t,n)&&Ce(e,r)&&(r!==T||n in t)||(t[n]=r)}function Ht(t,n){for(var r=t.length;r--;)if(Ce(t[r][0],n))return r;return-1}function Qt(t,n,r,e){return Ao(t,function(t,u,o){n(e,t,r(t),o)}),e}function Xt(t,n){return t&&sr(n,iu(n),t)} -function tn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?T:uu(t,n[r]);return o}function nn(t,n,r){return t===t&&(r!==T&&(t=r>=t?t:r),n!==T&&(t=t>=n?t:n)),t}function rn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Ze(t))return t;if(o=yi(t)){if(c=Kr(t),!n)return lr(t,c)}else{var a=qr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(bi(t))return or(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(C(t))return i?t:{};if(c=Gr(l?{}:t), -!n)return hr(t,Xt(c,t))}else{if(!Ct[a])return i?t:{};c=Jr(t,a,rn,n)}}if(f||(f=new qt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?gn(t,iu,Tr):iu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),Yt(c,o,rn(u,n,r,e,o,t,f))}),c}function en(t){var n=iu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function un(t){return Ze(t)?Tu(t):{}}function on(t,n,r){if(typeof t!="function")throw new Au("Expected a function"); -return At(function(){t.apply(T,r)},n)}function fn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,O(r))),e?(o=a,i=false):n.length>=200&&(o=E,i=false,n=new Zt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function cn(t,n){var r=true;return Ao(t,function(t,e,u){return r=!!n(t,e,u)}),r}function an(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===T?i===i&&!Je(i):r(i,f)))var f=i,c=o; -}return c}function ln(t,n){var r=[];return Ao(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function sn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=Hr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?sn(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function hn(t,n){return t&&ko(t,n,iu)}function pn(t,n){return t&&Eo(t,n,iu)}function _n(t,n){return f(n,function(n){return Fe(t[n])})}function vn(t,n){n=ne(n,t)?[n]:er(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[fe(n[r++])];return r&&r==e?t:T}function gn(t,n,r){ -return n=n(t),yi(t)?n:s(n,r(t))}function dn(t,n){return t>n}function yn(t,n){return null!=t&&(Wu.call(t,n)||typeof t=="object"&&n in t&&null===Ju(Object(t)))}function bn(t,n){return null!=t&&n in Object(t)}function xn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,O(n))),s=to(p.length,s),f[i]=!r&&(n||u>=120&&p.length>=120)?new Zt(i&&p):T}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!E(v,d):!e(h,d,r)){ -for(i=o;--i;){var y=f[i];if(y?!E(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function jn(t,n,r){var e={};return hn(t,function(t,u,o){n(e,r(t),u,o)}),e}function wn(t,n,e){return ne(n,t)||(n=er(n),t=ie(t,n),n=ve(n)),n=null==t?t:t[fe(n)],null==n?T:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Ze(t)&&!Te(n))n=t!==t&&n!==n;else t:{var o=yi(t),i=yi(n),f="[object Array]",c="[object Array]";o||(f=qr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=qr(n), -c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!C(t),i="[object Object]"==c&&!C(n);if((c=f==c)&&!a)u||(u=new qt),n=o||Ye(t)?zr(t,n,mn,r,e,u):Ur(t,n,f,mn,r,e,u);else{if(!(2&e)&&(o=a&&Wu.call(t,"__wrapped__"),f=i&&Wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new qt),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new qt),o=2&e,f=iu(t),i=f.length,c=iu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:yn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{ -c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===T?h!==p&&!mn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u["delete"](t),n=c}}else n=false;else n=false}}return n}function An(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false; -}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===T&&!(c in t))return false}else{if(f=new qt,e)var s=e(a,l,c,t,n,f);if(s===T?!mn(l,a,e,3,f):!s)return false}}return true}function On(t){return!Ze(t)||Iu&&Iu in t?false:(Fe(t)||C(t)?zu:yt).test(ce(t))}function kn(t){return typeof t=="function"?t:null==t?pu:typeof t=="object"?yi(t)?Wn(t[0],t[1]):Rn(t):du(t)}function En(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);return r}function Sn(t,n){return n>t}function In(t,n){var r=-1,e=Ue(t)?Array(t.length):[]; -return Ao(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Rn(t){var n=Pr(t);return 1==n.length&&n[0][2]?ue(n[0][0],n[0][1]):function(r){return r===t||An(r,t,n)}}function Wn(t,n){return ne(t)&&n===n&&!Ze(n)?ue(fe(t),n):function(r){var e=uu(r,t);return e===T&&e===n?ou(r,t):mn(n,e,T,3)}}function Bn(t,n,r,e,o){if(t!==n){if(!yi(n)&&!Ye(n))var i=fu(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),Ze(u)){o||(o=new qt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Jt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):T,p=h===T;p&&(h=s, -yi(s)||Ye(s)?yi(l)?h=l:$e(l)?h=lr(l):(p=false,h=rn(s,true)):Ve(s)||ze(s)?ze(l)?h=ru(l):!Ze(l)||r&&Fe(l)?(p=false,h=rn(s,true)):h=l:p=false),a.set(s,h),p&&Bn(h,s,r,e,a),a["delete"](s),Jt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):T,c===T&&(c=u),Jt(t,f,c)})}}function Ln(t,n){var r=t.length;return r?(n+=0>n?r:0,Xr(n,r)?t[n]:T):void 0}function Mn(t,n,r){var e=-1;return n=l(n.length?n:[pu],O(Fr())),t=In(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),j(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){ -var c=fr(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function Cn(t,n){return t=Object(t),h(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function zn(t,n){for(var r=-1,e=gn(t,fu,Bo),u=e.length,o={};++r<u;){var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Un(t){return function(n){return null==n?T:n[t]}}function $n(t){return function(n){return vn(n,t)}}function Dn(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(t===n&&(n=lr(n)),r&&(f=l(t,O(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&Vu.call(f,c,1), -Vu.call(t,c,1);return t}function Fn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(Xr(u))Vu.call(t,u,1);else if(ne(u,t))delete t[fe(u)];else{var u=er(u),i=ie(t,u);null!=i&&delete i[fe(ve(u))]}}}}function Nn(t,n){return t+Gu(ro()*(n-t+1))}function Pn(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=Gu(n/2))&&(t+=t);while(n);return r}function Zn(t,n,r,e){n=ne(n,t)?[n]:er(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=fe(n[u]);if(Ze(f)){ -var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=null==l?Xr(n[u+1])?[]:{}:l)}Yt(f,c,a)}f=f[c]}return t}function Tn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];return r}function qn(t,n){var r;return Ao(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Vn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Je(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u} -return Kn(t,n,pu,r)}function Kn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Je(n),a=n===T;o>u;){var l=Gu((u+o)/2),s=r(t[l]),h=s!==T,p=null===s,_=s===s,v=Je(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l}return to(o,4294967294)}function Gn(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r],f=n?n(i):i;if(!r||!Ce(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function Jn(t){return typeof t=="number"?t:Je(t)?V:+t}function Yn(t){if(typeof t=="string")return t; -if(Je(t))return mo?mo.call(t):"";var n=t+"";return"0"==n&&1/t==-q?"-0":n}function Hn(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(o>=200){if(u=n?null:Io(t))return D(u);i=false,u=E,l=new Zt}else l=n?[]:f;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function Qn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Tn(t,e?0:o,e?o+1:u):Tn(t,e?o+1:0,e?u:o); -}function Xn(t,n){var r=t;return r instanceof Ut&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function tr(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(fn(o,t[e],n,r),fn(t[e],o,n,r)):t[e];return o&&o.length?Hn(o,n,r):[]}function nr(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:T);return i}function rr(t){return $e(t)?t:[]}function er(t){return yi(t)?t:Co(t)}function ur(t,n,r){var e=t.length;return r=r===T?e:r,!n&&r>=e?t:Tn(t,n,r)}function or(t,n){ -if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ir(t){var n=new t.constructor(t.byteLength);return new Fu(n).set(new Fu(t)),n}function fr(t,n){if(t!==n){var r=t!==T,e=null===t,u=t===t,o=Je(t),i=n!==T,f=null===n,c=n===n,a=Je(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function cr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Xu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f]; -for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function ar(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Xu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);return s}function lr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function sr(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];Yt(r,i,f)}return r}function hr(t,n){return sr(t,Tr(t),n); -}function pr(t,n){return function(r,u){var o=yi(r)?e:Qt,i=n?n():{};return o(r,t,Fr(u),i)}}function _r(t){return Me(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:T,i=u>2?r[2]:T,o=t.length>3&&typeof o=="function"?(u--,o):T;for(i&&te(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function vr(t,n){return function(r,e){if(null==r)return r;if(!Ue(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function gr(t){return function(n,r,e){ -var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function dr(t,n,r){function e(){return(this&&this!==Kt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=xr(t);return e}function yr(t){return function(n){n=eu(n);var r=Wt.test(n)?n.match(It):T,e=r?r[0]:n.charAt(0);return n=r?ur(r,1).join(""):n.slice(1),e[t]()+n}}function br(t){return function(n){return h(su(lu(n).replace(Et,"")),t,"")}}function xr(t){return function(){var n=arguments; -switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=un(t.prototype),n=t.apply(r,n);return Ze(n)?n:r}}function jr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Dr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:$(f,a), -i-=c.length,e>i?Br(t,n,Ar,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Kt&&this instanceof u?o:t,this,f)}var o=xr(t);return u}function wr(t){return function(n,r,e){var u=Object(n);if(r=Fr(r,3),!Ue(n))var o=iu(n);return e=t(o||n,function(t,n){return o&&(n=t,t=u[n]),r(t,n,u)},e),e>-1?n[o?o[e]:e]:T}}function mr(t){return Me(function(n){n=sn(n,1);var r=n.length,e=r,u=zt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new Au("Expected a function");if(u&&!i&&"wrapper"==$r(o))var i=new zt([],true); -}for(e=i?e:r;++e<r;)var o=n[e],u=$r(o),f="wrapper"==u?Ro(o):T,i=f&&re(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[$r(f[0])].apply(i,f[3]):1==o.length&&re(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&yi(e)&&e.length>=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function Ar(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=Array(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=Dr(l),b=y.length;for(x=0;b--;)y[b]===j&&x++; -}if(e&&(y=cr(y,e,u,_)),o&&(y=ar(y,o,i,_)),d-=x,_&&a>d)return j=$(y,j),Br(t,n,Ar,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=to(f.length,x),m=lr(y);w--;){var A=f[w];y[w]=Xr(A,x)?m[A]:T}}else v&&d>1&&y.reverse();return s&&d>c&&(y.length=c),this&&this!==Kt&&this instanceof l&&(b=g||xr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:xr(t);return l}function Or(t,n){return function(r,e){return jn(r,t,n(e))}}function kr(t){return function(n,r){var e; -if(n===T&&r===T)return 0;if(n!==T&&(e=n),r!==T){if(e===T)return r;typeof n=="string"||typeof r=="string"?(n=Yn(n),r=Yn(r)):(n=Jn(n),r=Jn(r)),e=t(n,r)}return e}}function Er(t){return Me(function(n){return n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr())),Me(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Sr(t,n){n=n===T?" ":Yn(n);var r=n.length;return 2>r?r?Pn(n,t):n:(r=Pn(n,Ku(t/N(n))),Wt.test(n)?ur(r.match(It),0,t).join(""):r.slice(0,t))}function Ir(t,n,e,u){ -function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Kt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=xr(t);return o}function Rr(t){return function(n,r,e){e&&typeof e!="number"&&te(n,r,e)&&(r=e=T),n=nu(n),n=n===n?n:0,r===T?(r=n,n=0):r=nu(r)||0,e=e===T?r>n?1:-1:nu(e)||0;var u=-1;r=Xu(Ku((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Wr(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=nu(n), -r=nu(r)),t(n,r)}}function Br(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),re(t)&&Mo(r,n),r.placeholder=e,r}function Lr(t){var n=wu[t];return function(t,r){if(t=nu(t),r=to(Xe(r),292)){var e=(eu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(eu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Mr(t){return function(n){var r=qr(n);return"[object Map]"==r?U(n):"[object Set]"==r?F(n):A(n,t(n)); -}}function Cr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new Au("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Xu(Xe(i),0),f=f===T?f:Xe(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:Ro(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?cr(e,r,h[4]):r,o[4]=e?$(o[3],"__lodash_placeholder__"):h[4]), -(r=h[5])&&(e=o[5],o[5]=e?ar(e,r,h[6]):r,o[6]=e?$(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:to(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Xu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?So:Mo)(n&&1!=n?8==n||16==n?jr(t,n,f):32!=n&&33!=n||u.length?Ar.apply(T,o):Ir(t,n,r,e):dr(t,n,r),o)}function zr(t,n,r,e,u,o){var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if(c=o.get(t))return c==n; -var c=-1,a=true,l=1&u?new Zt:T;for(o.set(t,n);++c<f;){var s=t[c],h=n[c];if(e)var p=i?e(h,s,c,n,t,o):e(s,h,c,t,n,o);if(p!==T){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){return l.has(n)||s!==t&&!r(s,t,e,u,o)?void 0:l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o["delete"](t),a}function Ur(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Fu(t),new Fu(n)))break; -return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=U;case"[object Set]":if(f||(f=D),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),zr(f(t),f(n),e,u,o,i));case"[object Symbol]":if(wo)return wo.call(t)==wo.call(n)}return false}function $r(t){for(var n=t.name+"",r=_o[n],e=Wu.call(_o,n)?r.length:0;e--;){ -var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Dr(t){return(Wu.call(Ot,"placeholder")?Ot:t).placeholder}function Fr(){var t=Ot.iteratee||_u,t=t===_u?kn:t;return arguments.length?t(arguments[0],arguments[1]):t}function Nr(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map}function Pr(t){for(var n=iu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!Ze(u)]}return n; -}function Zr(t,n){var r=null==t?T:t[n];return On(r)?r:T}function Tr(t){return Pu(Object(t))}function qr(t){return Mu.call(t)}function Vr(t,n,r){n=ne(n,t)?[n]:er(n);for(var e,u=-1,o=n.length;++u<o;){var i=fe(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&Pe(o)&&Xr(i,o)&&(yi(t)||Ge(t)||ze(t)))}function Kr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Wu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Gr(t){return typeof t.constructor!="function"||ee(t)?{}:un(Ju(Object(t))); -}function Jr(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return ir(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]": -return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(U(r),true):U(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,_t.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(D(r),true):D(r),h(e,n,new r.constructor);case"[object Symbol]":return wo?Object(wo.call(r)):{}}}function Yr(t){var n=t?t.length:T;return Pe(n)&&(yi(t)||Ge(t)||ze(t))?m(n,String):null; -}function Hr(t){return yi(t)||ze(t)}function Qr(t){return yi(t)&&!(2==t.length&&!Fe(t[0]))}function Xr(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||xt.test(t))&&t>-1&&0==t%1&&n>t}function te(t,n,r){if(!Ze(r))return false;var e=typeof n;return("number"==e?Ue(r)&&Xr(n,r.length):"string"==e&&n in r)?Ce(r[n],t):false}function ne(t,n){if(yi(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Je(t)?true:ut.test(t)||!et.test(t)||null!=n&&t in Object(n)}function re(t){ -var n=$r(t),r=Ot[n];return typeof r=="function"&&n in Ut.prototype?t===r?true:(n=Ro(r),!!n&&t===n[0]):false}function ee(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||ku)}function ue(t,n){return function(r){return null==r?false:r[t]===n&&(n!==T||t in Object(r))}}function oe(t,n,r,e,u,o){return Ze(t)&&Ze(n)&&Bn(t,n,T,oe,o.set(n,t)),t}function ie(t,n){return 1==n.length?t:vn(t,Tn(n,0,-1))}function fe(t){if(typeof t=="string"||Je(t))return t;var n=t+"";return"0"==n&&1/t==-q?"-0":n}function ce(t){ -if(null!=t){try{return Ru.call(t)}catch(n){}return t+""}return""}function ae(t){if(t instanceof Ut)return t.clone();var n=new zt(t.__wrapped__,t.__chain__);return n.__actions__=lr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function le(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),Tn(t,0>n?0:n,e)):[]}function se(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0,0>n?0:n)):[]}function he(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)), -g(t,Fr(n,3),r)):-1}function pe(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==T&&(u=Xe(r),u=0>r?Xu(e+u,0):to(u,e-1)),g(t,Fr(n,3),u,true)}function _e(t){return t&&t.length?t[0]:T}function ve(t){var n=t?t.length:0;return n?t[n-1]:T}function ge(t,n){return t&&t.length&&n&&n.length?Dn(t,n):t}function de(t){return t?uo.call(t):t}function ye(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){return $e(t)?(n=Xu(t.length,n),true):void 0}),m(n,function(n){return l(t,Un(n))})}function be(t,n){ -if(!t||!t.length)return[];var e=ye(t);return null==n?e:l(e,function(t){return r(n,T,t)})}function xe(t){return t=Ot(t),t.__chain__=true,t}function je(t,n){return n(t)}function we(){return this}function me(t,n){return(yi(t)?u:Ao)(t,Fr(n,3))}function Ae(t,n){return(yi(t)?o:Oo)(t,Fr(n,3))}function Oe(t,n){return(yi(t)?l:In)(t,Fr(n,3))}function ke(t,n,r){var e=-1,u=He(t),o=u.length,i=o-1;for(n=(r?te(t,n,r):n===T)?1:nn(Xe(n),0,o);++e<n;)t=Nn(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function Ee(){ -return xu.now()}function Se(t,n,r){return n=r?T:n,n=t&&null==n?t.length:n,Cr(t,128,T,T,T,T,n)}function Ie(t,n){var r;if(typeof n!="function")throw new Au("Expected a function");return t=Xe(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=T),r}}function Re(t,n,r){return n=r?T:n,t=Cr(t,8,T,T,T,T,T,n),t.placeholder=Re.placeholder,t}function We(t,n,r){return n=r?T:n,t=Cr(t,16,T,T,T,T,T,n),t.placeholder=We.placeholder,t}function Be(t,n,r){function e(n){var r=c,e=a;return c=a=T,_=n,s=t.apply(e,r); -}function u(t){var r=t-p;return t-=_,p===T||r>=n||0>r||g&&t>=l}function o(){var t=Ee();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?to(t,l-r):t,h=At(o,r)}function i(t){return h=T,d&&c?e(t):(c=a=T,s)}function f(){var t=Ee(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===T)return _=t=p,h=At(o,n),v?e(t):s;if(g)return h=At(o,n),e(p)}return h===T&&(h=At(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Au("Expected a function");return n=nu(n)||0,Ze(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Xu(nu(r.maxWait)||0,n):l, -d="trailing"in r?!!r.trailing:d),f.cancel=function(){_=0,c=p=a=h=T},f.flush=function(){return h===T?s:i(Ee())},f}function Le(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Au("Expected a function");return r.cache=new(Le.Cache||Pt),r}function Me(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=Xu(n===T?t.length-1:Xe(n),0),function(){ -for(var e=arguments,u=-1,o=Xu(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function Ce(t,n){return t===n||t!==t&&n!==n}function ze(t){return $e(t)&&Wu.call(t,"callee")&&(!qu.call(t,"callee")||"[object Arguments]"==Mu.call(t))}function Ue(t){return null!=t&&Pe(Wo(t))&&!Fe(t)}function $e(t){return Te(t)&&Ue(t)}function De(t){ -return Te(t)?"[object Error]"==Mu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Fe(t){return t=Ze(t)?Mu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Ne(t){return typeof t=="number"&&t==Xe(t)}function Pe(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Ze(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Te(t){return!!t&&typeof t=="object"}function qe(t){return typeof t=="number"||Te(t)&&"[object Number]"==Mu.call(t); -}function Ve(t){return!Te(t)||"[object Object]"!=Mu.call(t)||C(t)?false:(t=Ju(Object(t)),null===t?true:(t=Wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Ru.call(t)==Lu))}function Ke(t){return Ze(t)&&"[object RegExp]"==Mu.call(t)}function Ge(t){return typeof t=="string"||!yi(t)&&Te(t)&&"[object String]"==Mu.call(t)}function Je(t){return typeof t=="symbol"||Te(t)&&"[object Symbol]"==Mu.call(t)}function Ye(t){return Te(t)&&Pe(t.length)&&!!Mt[Mu.call(t)]}function He(t){if(!t)return[]; -if(Ue(t))return Ge(t)?t.match(It):lr(t);if(Zu&&t[Zu])return z(t[Zu]());var n=qr(t);return("[object Map]"==n?U:"[object Set]"==n?D:cu)(t)}function Qe(t){return t?(t=nu(t),t===q||t===-q?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function Xe(t){t=Qe(t);var n=t%1;return t===t?n?t-n:t:0}function tu(t){return t?nn(Xe(t),0,4294967295):0}function nu(t){if(typeof t=="number")return t;if(Je(t))return V;if(Ze(t)&&(t=Fe(t.valueOf)?t.valueOf():t,t=Ze(t)?t+"":t),typeof t!="string")return 0===t?t:+t; -t=t.replace(ct,"");var n=dt.test(t);return n||bt.test(t)?Nt(t.slice(2),n?2:8):gt.test(t)?V:+t}function ru(t){return sr(t,fu(t))}function eu(t){return null==t?"":Yn(t)}function uu(t,n,r){return t=null==t?T:vn(t,n),t===T?r:t}function ou(t,n){return null!=t&&Vr(t,n,bn)}function iu(t){var n=ee(t);if(!n&&!Ue(t))return Qu(Object(t));var r,e=Yr(t),u=!!e,e=e||[],o=e.length;for(r in t)!yn(t,r)||u&&("length"==r||Xr(r,o))||n&&"constructor"==r||e.push(r);return e}function fu(t){for(var n=-1,r=ee(t),e=En(t),u=e.length,o=Yr(t),i=!!o,o=o||[],f=o.length;++n<u;){ -var c=e[n];i&&("length"==c||Xr(c,f))||"constructor"==c&&(r||!Wu.call(t,c))||o.push(c)}return o}function cu(t){return t?k(t,iu(t)):[]}function au(t){return qi(eu(t).toLowerCase())}function lu(t){return(t=eu(t))&&t.replace(jt,W).replace(St,"")}function su(t,n,r){return t=eu(t),n=r?T:n,n===T&&(n=Bt.test(t)?Rt:st),t.match(n)||[]}function hu(t){return function(){return t}}function pu(t){return t}function _u(t){return kn(typeof t=="function"?t:rn(t,true))}function vu(t,n,r){var e=iu(n),o=_n(n,e);null!=r||Ze(n)&&(o.length||!e.length)||(r=n, -n=t,t=this,o=_n(n,iu(n)));var i=!(Ze(r)&&"chain"in r&&!r.chain),f=Fe(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=lr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function gu(){}function du(t){return ne(t)?Un(fe(t)):$n(t)}function yu(){return[]}function bu(){return false}R=R?Gt.defaults({},R,Gt.pick(Kt,Lt)):Kt;var xu=R.Date,ju=R.Error,wu=R.Math,mu=R.RegExp,Au=R.TypeError,Ou=R.Array.prototype,ku=R.Object.prototype,Eu=R.String.prototype,Su=R["__core-js_shared__"],Iu=function(){ -var t=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ru=R.Function.prototype.toString,Wu=ku.hasOwnProperty,Bu=0,Lu=Ru.call(Object),Mu=ku.toString,Cu=Kt._,zu=mu("^"+Ru.call(Wu).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Uu=Tt?R.Buffer:T,$u=R.Reflect,Du=R.Symbol,Fu=R.Uint8Array,Nu=$u?$u.f:T,Pu=Object.getOwnPropertySymbols,Zu=typeof(Zu=Du&&Du.iterator)=="symbol"?Zu:T,Tu=Object.create,qu=ku.propertyIsEnumerable,Vu=Ou.splice,Ku=wu.ceil,Gu=wu.floor,Ju=Object.getPrototypeOf,Yu=R.isFinite,Hu=Ou.join,Qu=Object.keys,Xu=wu.max,to=wu.min,no=R.parseInt,ro=wu.random,eo=Eu.replace,uo=Ou.reverse,oo=Eu.split,io=Zr(R,"DataView"),fo=Zr(R,"Map"),co=Zr(R,"Promise"),ao=Zr(R,"Set"),lo=Zr(R,"WeakMap"),so=Zr(Object,"create"),ho=lo&&new lo,po=!qu.call({ -valueOf:1},"valueOf"),_o={},vo=ce(io),go=ce(fo),yo=ce(co),bo=ce(ao),xo=ce(lo),jo=Du?Du.prototype:T,wo=jo?jo.valueOf:T,mo=jo?jo.toString:T;Ot.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:Ot}},Ot.prototype=kt.prototype,Ot.prototype.constructor=Ot,zt.prototype=un(kt.prototype),zt.prototype.constructor=zt,Ut.prototype=un(kt.prototype),Ut.prototype.constructor=Ut,$t.prototype.clear=function(){this.__data__=so?so(null):{}},$t.prototype["delete"]=function(t){return this.has(t)&&delete this.__data__[t]; -},$t.prototype.get=function(t){var n=this.__data__;return so?(t=n[t],"__lodash_hash_undefined__"===t?T:t):Wu.call(n,t)?n[t]:T},$t.prototype.has=function(t){var n=this.__data__;return so?n[t]!==T:Wu.call(n,t)},$t.prototype.set=function(t,n){return this.__data__[t]=so&&n===T?"__lodash_hash_undefined__":n,this},Dt.prototype.clear=function(){this.__data__=[]},Dt.prototype["delete"]=function(t){var n=this.__data__;return t=Ht(n,t),0>t?false:(t==n.length-1?n.pop():Vu.call(n,t,1),true)},Dt.prototype.get=function(t){ -var n=this.__data__;return t=Ht(n,t),0>t?T:n[t][1]},Dt.prototype.has=function(t){return-1<Ht(this.__data__,t)},Dt.prototype.set=function(t,n){var r=this.__data__,e=Ht(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},Pt.prototype.clear=function(){this.__data__={hash:new $t,map:new(fo||Dt),string:new $t}},Pt.prototype["delete"]=function(t){return Nr(this,t)["delete"](t)},Pt.prototype.get=function(t){return Nr(this,t).get(t)},Pt.prototype.has=function(t){return Nr(this,t).has(t)},Pt.prototype.set=function(t,n){ -return Nr(this,t).set(t,n),this},Zt.prototype.add=Zt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Zt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.clear=function(){this.__data__=new Dt},qt.prototype["delete"]=function(t){return this.__data__["delete"](t)},qt.prototype.get=function(t){return this.__data__.get(t)},qt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.set=function(t,n){var r=this.__data__;return r instanceof Dt&&200==r.__data__.length&&(r=this.__data__=new Pt(r.__data__)), -r.set(t,n),this};var Ao=vr(hn),Oo=vr(pn,true),ko=gr(),Eo=gr(true);Nu&&!qu.call({valueOf:1},"valueOf")&&(En=function(t){return z(Nu(t))});var So=ho?function(t,n){return ho.set(t,n),t}:pu,Io=ao&&1/D(new ao([,-0]))[1]==q?function(t){return new ao(t)}:gu,Ro=ho?function(t){return ho.get(t)}:gu,Wo=Un("length");Pu||(Tr=yu);var Bo=Pu?function(t){for(var n=[];t;)s(n,Tr(t)),t=Ju(Object(t));return n}:Tr;(io&&"[object DataView]"!=qr(new io(new ArrayBuffer(1)))||fo&&"[object Map]"!=qr(new fo)||co&&"[object Promise]"!=qr(co.resolve())||ao&&"[object Set]"!=qr(new ao)||lo&&"[object WeakMap]"!=qr(new lo))&&(qr=function(t){ -var n=Mu.call(t);if(t=(t="[object Object]"==n?t.constructor:T)?ce(t):T)switch(t){case vo:return"[object DataView]";case go:return"[object Map]";case yo:return"[object Promise]";case bo:return"[object Set]";case xo:return"[object WeakMap]"}return n});var Lo=Su?Fe:bu,Mo=function(){var t=0,n=0;return function(r,e){var u=Ee(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return So(r,e)}}(),Co=Le(function(t){var n=[];return eu(t).replace(ot,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}), -n}),zo=Me(function(t,n){return $e(t)?fn(t,sn(n,1,$e,true)):[]}),Uo=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),Fr(r)):[]}),$o=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),T,r):[]}),Do=Me(function(t){var n=l(t,rr);return n.length&&n[0]===t[0]?xn(n):[]}),Fo=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,Fr(n)):[]}),No=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,T,n):[]; -}),Po=Me(ge),Zo=Me(function(t,n){n=sn(n,1);var r=t?t.length:0,e=tn(t,n);return Fn(t,l(n,function(t){return Xr(t,r)?+t:t}).sort(fr)),e}),To=Me(function(t){return Hn(sn(t,1,$e,true))}),qo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),Fr(n))}),Vo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),T,n)}),Ko=Me(function(t,n){return $e(t)?fn(t,n):[]}),Go=Me(function(t){return tr(f(t,$e))}),Jo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),Fr(n))}),Yo=Me(function(t){ -var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),T,n)}),Ho=Me(ye),Qo=Me(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return be(t,n)}),Xo=Me(function(t){function n(n){return tn(n,t)}t=sn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof Ut&&Xr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:je,args:[n],thisArg:T}),new zt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),ti=pr(function(t,n,r){ -Wu.call(t,r)?++t[r]:t[r]=1}),ni=wr(he),ri=wr(pe),ei=pr(function(t,n,r){Wu.call(t,r)?t[r].push(n):t[r]=[n]}),ui=Me(function(t,n,e){var u=-1,o=typeof n=="function",i=ne(n),f=Ue(t)?Array(t.length):[];return Ao(t,function(t){var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):wn(t,n,e)}),f}),oi=pr(function(t,n,r){t[r]=n}),ii=pr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),fi=Me(function(t,n){if(null==t)return[];var r=n.length;return r>1&&te(t,n[0],n[1])?n=[]:r>2&&te(n[0],n[1],n[2])&&(n=[n[0]]), -n=1==n.length&&yi(n[0])?n[0]:sn(n,1,Qr),Mn(t,n,[])}),ci=Me(function(t,n,r){var e=1;if(r.length)var u=$(r,Dr(ci)),e=32|e;return Cr(t,e,n,r,u)}),ai=Me(function(t,n,r){var e=3;if(r.length)var u=$(r,Dr(ai)),e=32|e;return Cr(n,e,t,r,u)}),li=Me(function(t,n){return on(t,1,n)}),si=Me(function(t,n,r){return on(t,nu(n)||0,r)});Le.Cache=Pt;var hi=Me(function(t,n){n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr()));var e=n.length;return Me(function(u){for(var o=-1,i=to(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]); -return r(t,this,u)})}),pi=Me(function(t,n){var r=$(n,Dr(pi));return Cr(t,32,T,n,r)}),_i=Me(function(t,n){var r=$(n,Dr(_i));return Cr(t,64,T,n,r)}),vi=Me(function(t,n){return Cr(t,256,T,T,T,sn(n,1))}),gi=Wr(dn),di=Wr(function(t,n){return t>=n}),yi=Array.isArray,bi=Uu?function(t){return t instanceof Uu}:bu,xi=Wr(Sn),ji=Wr(function(t,n){return n>=t}),wi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,iu(n),t);else for(var r in n)Wu.call(n,r)&&Yt(t,r,n[r])}),mi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,fu(n),t);else for(var r in n)Yt(t,r,n[r]); -}),Ai=_r(function(t,n,r,e){sr(n,fu(n),t,e)}),Oi=_r(function(t,n,r,e){sr(n,iu(n),t,e)}),ki=Me(function(t,n){return tn(t,sn(n,1))}),Ei=Me(function(t){return t.push(T,Vt),r(Ai,T,t)}),Si=Me(function(t){return t.push(T,oe),r(Li,T,t)}),Ii=Or(function(t,n,r){t[n]=r},hu(pu)),Ri=Or(function(t,n,r){Wu.call(t,n)?t[n].push(r):t[n]=[r]},Fr),Wi=Me(wn),Bi=_r(function(t,n,r){Bn(t,n,r)}),Li=_r(function(t,n,r,e){Bn(t,n,r,e)}),Mi=Me(function(t,n){return null==t?{}:(n=l(sn(n,1),fe),Cn(t,fn(gn(t,fu,Bo),n)))}),Ci=Me(function(t,n){ -return null==t?{}:Cn(t,l(sn(n,1),fe))}),zi=Mr(iu),Ui=Mr(fu),$i=br(function(t,n,r){return n=n.toLowerCase(),t+(r?au(n):n)}),Di=br(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),Fi=br(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Ni=yr("toLowerCase"),Pi=br(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Zi=br(function(t,n,r){return t+(r?" ":"")+qi(n)}),Ti=br(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),qi=yr("toUpperCase"),Vi=Me(function(t,n){try{return r(t,T,n)}catch(e){ -return De(e)?e:new ju(e)}}),Ki=Me(function(t,n){return u(sn(n,1),function(n){n=fe(n),t[n]=ci(t[n],t)}),t}),Gi=mr(),Ji=mr(true),Yi=Me(function(t,n){return function(r){return wn(r,t,n)}}),Hi=Me(function(t,n){return function(r){return wn(t,r,n)}}),Qi=Er(l),Xi=Er(i),tf=Er(_),nf=Rr(),rf=Rr(true),ef=kr(function(t,n){return t+n}),uf=Lr("ceil"),of=kr(function(t,n){return t/n}),ff=Lr("floor"),cf=kr(function(t,n){return t*n}),af=Lr("round"),lf=kr(function(t,n){return t-n});return Ot.after=function(t,n){if(typeof n!="function")throw new Au("Expected a function"); -return t=Xe(t),function(){return 1>--t?n.apply(this,arguments):void 0}},Ot.ary=Se,Ot.assign=wi,Ot.assignIn=mi,Ot.assignInWith=Ai,Ot.assignWith=Oi,Ot.at=ki,Ot.before=Ie,Ot.bind=ci,Ot.bindAll=Ki,Ot.bindKey=ai,Ot.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return yi(t)?t:[t]},Ot.chain=xe,Ot.chunk=function(t,n,r){if(n=(r?te(t,n,r):n===T)?1:Xu(Xe(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Ku(r/n));r>e;)o[u++]=Tn(t,e,e+=n);return o},Ot.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){ -var o=t[n];o&&(u[e++]=o)}return u},Ot.concat=function(){for(var t=arguments.length,n=Array(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(yi(r)?lr(r):[r],sn(n,1)):[]},Ot.cond=function(t){var n=t?t.length:0,e=Fr();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Au("Expected a function");return[e(t[0]),t[1]]}):[],Me(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},Ot.conforms=function(t){return en(rn(t,true))},Ot.constant=hu,Ot.countBy=ti, -Ot.create=function(t,n){var r=un(t);return n?Xt(r,n):r},Ot.curry=Re,Ot.curryRight=We,Ot.debounce=Be,Ot.defaults=Ei,Ot.defaultsDeep=Si,Ot.defer=li,Ot.delay=si,Ot.difference=zo,Ot.differenceBy=Uo,Ot.differenceWith=$o,Ot.drop=le,Ot.dropRight=se,Ot.dropRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true,true):[]},Ot.dropWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true):[]},Ot.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&te(t,n,r)&&(r=0,e=u),u=t.length, -r=Xe(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Xe(e),0>e&&(e+=u),e=r>e?0:tu(e);e>r;)t[r++]=n;return t},Ot.filter=function(t,n){return(yi(t)?f:ln)(t,Fr(n,3))},Ot.flatMap=function(t,n){return sn(Oe(t,n),1)},Ot.flatMapDeep=function(t,n){return sn(Oe(t,n),q)},Ot.flatMapDepth=function(t,n,r){return r=r===T?1:Xe(r),sn(Oe(t,n),r)},Ot.flatten=function(t){return t&&t.length?sn(t,1):[]},Ot.flattenDeep=function(t){return t&&t.length?sn(t,q):[]},Ot.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:Xe(n),sn(t,n)):[]; -},Ot.flip=function(t){return Cr(t,512)},Ot.flow=Gi,Ot.flowRight=Ji,Ot.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},Ot.functions=function(t){return null==t?[]:_n(t,iu(t))},Ot.functionsIn=function(t){return null==t?[]:_n(t,fu(t))},Ot.groupBy=ei,Ot.initial=function(t){return se(t,1)},Ot.intersection=Do,Ot.intersectionBy=Fo,Ot.intersectionWith=No,Ot.invert=Ii,Ot.invertBy=Ri,Ot.invokeMap=ui,Ot.iteratee=_u,Ot.keyBy=oi,Ot.keys=iu,Ot.keysIn=fu,Ot.map=Oe, -Ot.mapKeys=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[n(t,e,u)]=t}),r},Ot.mapValues=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[e]=n(t,e,u)}),r},Ot.matches=function(t){return Rn(rn(t,true))},Ot.matchesProperty=function(t,n){return Wn(t,rn(n,true))},Ot.memoize=Le,Ot.merge=Bi,Ot.mergeWith=Li,Ot.method=Yi,Ot.methodOf=Hi,Ot.mixin=vu,Ot.negate=function(t){if(typeof t!="function")throw new Au("Expected a function");return function(){return!t.apply(this,arguments)}},Ot.nthArg=function(t){ -return t=Xe(t),Me(function(n){return Ln(n,t)})},Ot.omit=Mi,Ot.omitBy=function(t,n){return n=Fr(n),zn(t,function(t,r){return!n(t,r)})},Ot.once=function(t){return Ie(2,t)},Ot.orderBy=function(t,n,r,e){return null==t?[]:(yi(n)||(n=null==n?[]:[n]),r=e?T:r,yi(r)||(r=null==r?[]:[r]),Mn(t,n,r))},Ot.over=Qi,Ot.overArgs=hi,Ot.overEvery=Xi,Ot.overSome=tf,Ot.partial=pi,Ot.partialRight=_i,Ot.partition=ii,Ot.pick=Ci,Ot.pickBy=function(t,n){return null==t?{}:zn(t,Fr(n))},Ot.property=du,Ot.propertyOf=function(t){ -return function(n){return null==t?T:vn(t,n)}},Ot.pull=Po,Ot.pullAll=ge,Ot.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,Fr(r)):t},Ot.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,T,r):t},Ot.pullAt=Zo,Ot.range=nf,Ot.rangeRight=rf,Ot.rearg=vi,Ot.reject=function(t,n){var r=yi(t)?f:ln;return n=Fr(n,3),r(t,function(t,r,e){return!n(t,r,e)})},Ot.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Fr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i), -u.push(e))}return Fn(t,u),r},Ot.rest=Me,Ot.reverse=de,Ot.sampleSize=ke,Ot.set=function(t,n,r){return null==t?t:Zn(t,n,r)},Ot.setWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null==t?t:Zn(t,n,r,e)},Ot.shuffle=function(t){return ke(t,4294967295)},Ot.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&te(t,n,r)?(n=0,r=e):(n=null==n?0:Xe(n),r=r===T?e:Xe(r)),Tn(t,n,r)):[]},Ot.sortBy=fi,Ot.sortedUniq=function(t){return t&&t.length?Gn(t):[]},Ot.sortedUniqBy=function(t,n){ -return t&&t.length?Gn(t,Fr(n)):[]},Ot.split=function(t,n,r){return r&&typeof r!="number"&&te(t,n,r)&&(n=r=T),r=r===T?4294967295:r>>>0,r?(t=eu(t))&&(typeof n=="string"||null!=n&&!Ke(n))&&(n=Yn(n),""==n&&Wt.test(t))?ur(t.match(It),0,r):oo.call(t,n,r):[]},Ot.spread=function(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=n===T?0:Xu(Xe(n),0),Me(function(e){var u=e[n];return e=ur(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){return le(t,1)},Ot.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:Xe(n), -Tn(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),false,true):[]},Ot.takeWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3)):[]},Ot.tap=function(t,n){return n(t),t},Ot.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Au("Expected a function");return Ze(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Be(t,n,{leading:e,maxWait:n, -trailing:u})},Ot.thru=je,Ot.toArray=He,Ot.toPairs=zi,Ot.toPairsIn=Ui,Ot.toPath=function(t){return yi(t)?l(t,fe):Je(t)?[t]:lr(Co(t))},Ot.toPlainObject=ru,Ot.transform=function(t,n,r){var e=yi(t)||Ye(t);if(n=Fr(n,4),null==r)if(e||Ze(t)){var o=t.constructor;r=e?yi(t)?new o:[]:Fe(o)?un(Ju(Object(t))):{}}else r={};return(e?u:hn)(t,function(t,e,u){return n(r,t,e,u)}),r},Ot.unary=function(t){return Se(t,1)},Ot.union=To,Ot.unionBy=qo,Ot.unionWith=Vo,Ot.uniq=function(t){return t&&t.length?Hn(t):[]},Ot.uniqBy=function(t,n){ -return t&&t.length?Hn(t,Fr(n)):[]},Ot.uniqWith=function(t,n){return t&&t.length?Hn(t,T,n):[]},Ot.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ne(e,r)?[e]:er(e);r=ie(r,e),e=fe(ve(e)),r=!(null!=r&&yn(r,e))||delete r[e]}return r},Ot.unzip=ye,Ot.unzipWith=be,Ot.update=function(t,n,r){return null==t?t:Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),void 0)},Ot.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),e)),t},Ot.values=cu, -Ot.valuesIn=function(t){return null==t?[]:k(t,fu(t))},Ot.without=Ko,Ot.words=su,Ot.wrap=function(t,n){return n=null==n?pu:n,pi(n,t)},Ot.xor=Go,Ot.xorBy=Jo,Ot.xorWith=Yo,Ot.zip=Ho,Ot.zipObject=function(t,n){return nr(t||[],n||[],Yt)},Ot.zipObjectDeep=function(t,n){return nr(t||[],n||[],Zn)},Ot.zipWith=Qo,Ot.entries=zi,Ot.entriesIn=Ui,Ot.extend=mi,Ot.extendWith=Ai,vu(Ot,Ot),Ot.add=ef,Ot.attempt=Vi,Ot.camelCase=$i,Ot.capitalize=au,Ot.ceil=uf,Ot.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=nu(r), -r=r===r?r:0),n!==T&&(n=nu(n),n=n===n?n:0),nn(nu(t),n,r)},Ot.clone=function(t){return rn(t,false,true)},Ot.cloneDeep=function(t){return rn(t,true,true)},Ot.cloneDeepWith=function(t,n){return rn(t,true,true,n)},Ot.cloneWith=function(t,n){return rn(t,false,true,n)},Ot.deburr=lu,Ot.divide=of,Ot.endsWith=function(t,n,r){t=eu(t),n=Yn(n);var e=t.length;return r=r===T?e:nn(Xe(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},Ot.eq=Ce,Ot.escape=function(t){return(t=eu(t))&&X.test(t)?t.replace(H,B):t},Ot.escapeRegExp=function(t){ -return(t=eu(t))&&ft.test(t)?t.replace(it,"\\$&"):t},Ot.every=function(t,n,r){var e=yi(t)?i:cn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.find=ni,Ot.findIndex=he,Ot.findKey=function(t,n){return v(t,Fr(n,3),hn)},Ot.findLast=ri,Ot.findLastIndex=pe,Ot.findLastKey=function(t,n){return v(t,Fr(n,3),pn)},Ot.floor=ff,Ot.forEach=me,Ot.forEachRight=Ae,Ot.forIn=function(t,n){return null==t?t:ko(t,Fr(n,3),fu)},Ot.forInRight=function(t,n){return null==t?t:Eo(t,Fr(n,3),fu)},Ot.forOwn=function(t,n){return t&&hn(t,Fr(n,3)); -},Ot.forOwnRight=function(t,n){return t&&pn(t,Fr(n,3))},Ot.get=uu,Ot.gt=gi,Ot.gte=di,Ot.has=function(t,n){return null!=t&&Vr(t,n,yn)},Ot.hasIn=ou,Ot.head=_e,Ot.identity=pu,Ot.includes=function(t,n,r,e){return t=Ue(t)?t:cu(t),r=r&&!e?Xe(r):0,e=t.length,0>r&&(r=Xu(e+r,0)),Ge(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},Ot.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){return n=nu(n)||0,r===T?(r=n,n=0):r=nu(r)||0,t=nu(t), -t>=to(n,r)&&t<Xu(n,r)},Ot.invoke=Wi,Ot.isArguments=ze,Ot.isArray=yi,Ot.isArrayBuffer=function(t){return Te(t)&&"[object ArrayBuffer]"==Mu.call(t)},Ot.isArrayLike=Ue,Ot.isArrayLikeObject=$e,Ot.isBoolean=function(t){return true===t||false===t||Te(t)&&"[object Boolean]"==Mu.call(t)},Ot.isBuffer=bi,Ot.isDate=function(t){return Te(t)&&"[object Date]"==Mu.call(t)},Ot.isElement=function(t){return!!t&&1===t.nodeType&&Te(t)&&!Ve(t)},Ot.isEmpty=function(t){if(Ue(t)&&(yi(t)||Ge(t)||Fe(t.splice)||ze(t)||bi(t)))return!t.length; -if(Te(t)){var n=qr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(Wu.call(t,r))return false;return!(po&&iu(t).length)},Ot.isEqual=function(t,n){return mn(t,n)},Ot.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:T)?r(t,n):T;return e===T?mn(t,n,r):!!e},Ot.isError=De,Ot.isFinite=function(t){return typeof t=="number"&&Yu(t)},Ot.isFunction=Fe,Ot.isInteger=Ne,Ot.isLength=Pe,Ot.isMap=function(t){return Te(t)&&"[object Map]"==qr(t)},Ot.isMatch=function(t,n){return t===n||An(t,n,Pr(n)); -},Ot.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:T,An(t,n,Pr(n),r)},Ot.isNaN=function(t){return qe(t)&&t!=+t},Ot.isNative=function(t){if(Lo(t))throw new ju("This method is not supported with `core-js`. Try https://github.com/es-shims.");return On(t)},Ot.isNil=function(t){return null==t},Ot.isNull=function(t){return null===t},Ot.isNumber=qe,Ot.isObject=Ze,Ot.isObjectLike=Te,Ot.isPlainObject=Ve,Ot.isRegExp=Ke,Ot.isSafeInteger=function(t){return Ne(t)&&t>=-9007199254740991&&9007199254740991>=t; -},Ot.isSet=function(t){return Te(t)&&"[object Set]"==qr(t)},Ot.isString=Ge,Ot.isSymbol=Je,Ot.isTypedArray=Ye,Ot.isUndefined=function(t){return t===T},Ot.isWeakMap=function(t){return Te(t)&&"[object WeakMap]"==qr(t)},Ot.isWeakSet=function(t){return Te(t)&&"[object WeakSet]"==Mu.call(t)},Ot.join=function(t,n){return t?Hu.call(t,n):""},Ot.kebabCase=Di,Ot.last=ve,Ot.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==T&&(u=Xe(r),u=(0>u?Xu(e+u,0):to(u,e-1))+1),n!==n)return M(t,u-1,true); -for(;u--;)if(t[u]===n)return u;return-1},Ot.lowerCase=Fi,Ot.lowerFirst=Ni,Ot.lt=xi,Ot.lte=ji,Ot.max=function(t){return t&&t.length?an(t,pu,dn):T},Ot.maxBy=function(t,n){return t&&t.length?an(t,Fr(n),dn):T},Ot.mean=function(t){return b(t,pu)},Ot.meanBy=function(t,n){return b(t,Fr(n))},Ot.min=function(t){return t&&t.length?an(t,pu,Sn):T},Ot.minBy=function(t,n){return t&&t.length?an(t,Fr(n),Sn):T},Ot.stubArray=yu,Ot.stubFalse=bu,Ot.stubObject=function(){return{}},Ot.stubString=function(){return""},Ot.stubTrue=function(){ -return true},Ot.multiply=cf,Ot.nth=function(t,n){return t&&t.length?Ln(t,Xe(n)):T},Ot.noConflict=function(){return Kt._===this&&(Kt._=Cu),this},Ot.noop=gu,Ot.now=Ee,Ot.pad=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return!n||e>=n?t:(n=(n-e)/2,Sr(Gu(n),r)+t+Sr(Ku(n),r))},Ot.padEnd=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?t+Sr(n-e,r):t},Ot.padStart=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?Sr(n-e,r)+t:t},Ot.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n), -t=eu(t).replace(ct,""),no(t,n||(vt.test(t)?16:10))},Ot.random=function(t,n,r){if(r&&typeof r!="boolean"&&te(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=nu(t)||0,n===T?(n=t,t=0):n=nu(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=ro(),to(t+r*(n-t+Ft("1e-"+((r+"").length-1))),n)):Nn(t,n)},Ot.reduce=function(t,n,r){var e=yi(t)?h:x,u=3>arguments.length;return e(t,Fr(n,4),r,u,Ao)},Ot.reduceRight=function(t,n,r){var e=yi(t)?p:x,u=3>arguments.length; -return e(t,Fr(n,4),r,u,Oo)},Ot.repeat=function(t,n,r){return n=(r?te(t,n,r):n===T)?1:Xe(n),Pn(eu(t),n)},Ot.replace=function(){var t=arguments,n=eu(t[0]);return 3>t.length?n:eo.call(n,t[1],t[2])},Ot.result=function(t,n,r){n=ne(n,t)?[n]:er(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e<u;){var o=null==t?T:t[fe(n[e])];o===T&&(e=u,o=r),t=Fe(o)?o.call(t):o}return t},Ot.round=af,Ot.runInContext=Z,Ot.sample=function(t){t=Ue(t)?t:cu(t);var n=t.length;return n>0?t[Nn(0,n-1)]:T},Ot.size=function(t){if(null==t)return 0; -if(Ue(t)){var n=t.length;return n&&Ge(t)?N(t):n}return Te(t)&&(n=qr(t),"[object Map]"==n||"[object Set]"==n)?t.size:iu(t).length},Ot.snakeCase=Pi,Ot.some=function(t,n,r){var e=yi(t)?_:qn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.sortedIndex=function(t,n){return Vn(t,n)},Ot.sortedIndexBy=function(t,n,r){return Kn(t,n,Fr(r))},Ot.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Vn(t,n);if(r>e&&Ce(t[e],n))return e}return-1},Ot.sortedLastIndex=function(t,n){return Vn(t,n,true)},Ot.sortedLastIndexBy=function(t,n,r){ -return Kn(t,n,Fr(r),true)},Ot.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Vn(t,n,true)-1;if(Ce(t[r],n))return r}return-1},Ot.startCase=Zi,Ot.startsWith=function(t,n,r){return t=eu(t),r=nn(Xe(r),0,t.length),t.lastIndexOf(Yn(n),r)==r},Ot.subtract=lf,Ot.sum=function(t){return t&&t.length?w(t,pu):0},Ot.sumBy=function(t,n){return t&&t.length?w(t,Fr(n)):0},Ot.template=function(t,n,r){var e=Ot.templateSettings;r&&te(t,n,r)&&(n=T),t=eu(t),n=Ai({},n,e,Vt),r=Ai({},n.imports,e.imports,Vt);var u,o,i=iu(r),f=k(r,i),c=0; -r=n.interpolate||wt;var a="__p+='";r=mu((n.escape||wt).source+"|"+r.source+"|"+(r===rt?pt:wt).source+"|"+(n.evaluate||wt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(mt,L),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(K,""):a).replace(G,"$1").replace(J,"$1;"), -a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Vi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,De(n))throw n;return n},Ot.times=function(t,n){if(t=Xe(t),1>t||t>9007199254740991)return[];var r=4294967295,e=to(t,4294967295);for(n=Fr(n),t-=4294967295,e=m(e,n);++r<t;)n(r);return e},Ot.toFinite=Qe,Ot.toInteger=Xe,Ot.toLength=tu,Ot.toLower=function(t){ -return eu(t).toLowerCase()},Ot.toNumber=nu,Ot.toSafeInteger=function(t){return nn(Xe(t),-9007199254740991,9007199254740991)},Ot.toString=eu,Ot.toUpper=function(t){return eu(t).toUpperCase()},Ot.trim=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(ct,""):t&&(n=Yn(n))?(t=t.match(It),n=n.match(It),ur(t,S(t,n),I(t,n)+1).join("")):t},Ot.trimEnd=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(lt,""):t&&(n=Yn(n))?(t=t.match(It),n=I(t,n.match(It))+1,ur(t,0,n).join("")):t},Ot.trimStart=function(t,n,r){ -return(t=eu(t))&&(r||n===T)?t.replace(at,""):t&&(n=Yn(n))?(t=t.match(It),n=S(t,n.match(It)),ur(t,n).join("")):t},Ot.truncate=function(t,n){var r=30,e="...";if(Ze(n))var u="separator"in n?n.separator:u,r="length"in n?Xe(n.length):r,e="omission"in n?Yn(n.omission):e;t=eu(t);var o=t.length;if(Wt.test(t))var i=t.match(It),o=i.length;if(r>=o)return t;if(o=r-N(e),1>o)return e;if(r=i?ur(i,0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ke(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=mu(u.source,eu(_t.exec(u))+"g")), -u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(Yn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},Ot.unescape=function(t){return(t=eu(t))&&Q.test(t)?t.replace(Y,P):t},Ot.uniqueId=function(t){var n=++Bu;return eu(t)+n},Ot.upperCase=Ti,Ot.upperFirst=qi,Ot.each=me,Ot.eachRight=Ae,Ot.first=_e,vu(Ot,function(){var t={};return hn(Ot,function(n,r){Wu.call(Ot.prototype,r)||(t[r]=n)}),t}(),{chain:false}),Ot.VERSION="4.13.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){ -Ot[t].placeholder=Ot}),u(["drop","take"],function(t,n){Ut.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Ut(this);r=r===T?1:Xu(Xe(r),0);var u=this.clone();return e?u.__takeCount__=to(r,u.__takeCount__):u.__views__.push({size:to(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Ut.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Ut.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({ -iteratee:Fr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Ut.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");Ut.prototype[t]=function(){return this.__filtered__?new Ut(this):this[r](1)}}),Ut.prototype.compact=function(){return this.filter(pu)},Ut.prototype.find=function(t){return this.filter(t).head()},Ut.prototype.findLast=function(t){return this.reverse().find(t); -},Ut.prototype.invokeMap=Me(function(t,n){return typeof t=="function"?new Ut(this):this.map(function(r){return wn(r,t,n)})}),Ut.prototype.reject=function(t){return t=Fr(t,3),this.filter(function(n){return!t(n)})},Ut.prototype.slice=function(t,n){t=Xe(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Ut(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=Xe(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Ut.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ut.prototype.toArray=function(){ -return this.take(4294967295)},hn(Ut.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=Ot[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(Ot.prototype[n]=function(){function n(t){return t=u.apply(Ot,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Ut,a=f[0],l=c||yi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new Ut(this), -i=t.apply(i,f),i.__actions__.push({func:je,args:[n],thisArg:T}),new zt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Ou[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Ot.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(yi(u)?u:[],t)}return this[r](function(r){return n.apply(yi(r)?r:[],t)})}}),hn(Ut.prototype,function(t,n){ -var r=Ot[n];if(r){var e=r.name+"";(_o[e]||(_o[e]=[])).push({name:n,func:r})}}),_o[Ar(T,2).name]=[{name:"wrapper",func:T}],Ut.prototype.clone=function(){var t=new Ut(this.__wrapped__);return t.__actions__=lr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=lr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=lr(this.__views__),t},Ut.prototype.reverse=function(){if(this.__filtered__){var t=new Ut(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(), -t.__dir__*=-1;return t},Ut.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=yi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=to(t,f+s);break;case"takeRight":f=Xu(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=to(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Xn(n,this.__actions__);e=[]; -t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},Ot.prototype.at=Xo,Ot.prototype.chain=function(){return xe(this)},Ot.prototype.commit=function(){return new zt(this.value(),this.__chain__)},Ot.prototype.next=function(){this.__values__===T&&(this.__values__=He(this.value()));var t=this.__index__>=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},Ot.prototype.plant=function(t){ -for(var n,r=this;r instanceof kt;){var e=ae(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},Ot.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Ut?(this.__actions__.length&&(t=new Ut(this)),t=t.reverse(),t.__actions__.push({func:je,args:[de],thisArg:T}),new zt(t,this.__chain__)):this.thru(de)},Ot.prototype.toJSON=Ot.prototype.valueOf=Ot.prototype.value=function(){return Xn(this.__wrapped__,this.__actions__)},Zu&&(Ot.prototype[Zu]=we), -Ot}var T,q=1/0,V=NaN,K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(it.source),ct=/^\s+|\s+$/g,at=/^\s+/,lt=/\s+$/,st=/[a-zA-Z0-9]+/g,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,At="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("['\u2019]","g"),St=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),It=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),Rt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",Ot].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ isFinite parseInt setTimeout".split(" "),Mt={}; -Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=true,Mt["[object Arguments]"]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object Boolean]"]=Mt["[object DataView]"]=Mt["[object Date]"]=Mt["[object Error]"]=Mt["[object Function]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt["[object Object]"]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object WeakMap]"]=false; -var Ct={};Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object DataView]"]=Ct["[object Boolean]"]=Ct["[object Date]"]=Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[object Symbol]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=true, -Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object WeakMap]"]=false;var zt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", -"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ut={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},$t={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ft=parseFloat,Nt=parseInt,Pt=typeof exports=="object"&&exports,Zt=Pt&&typeof module=="object"&&module,Tt=Zt&&Zt.exports===Pt,qt=R(typeof self=="object"&&self),Vt=R(typeof this=="object"&&this),Kt=R(typeof global=="object"&&global)||qt||Vt||Function("return this")(),Gt=Z(); -(qt||{})._=Gt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Gt}):Zt?((Zt.exports=Gt)._=Gt,Pt._=Gt):Kt._=Gt}).call(this);
\ No newline at end of file +var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){if(n(t,r,u))return e=r,false}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n!==n)return g(t,b,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r; +return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t){return t!==t}function x(t,n){var r=t?t.length:0;return r?O(t,n)/r:q}function j(t){return function(n){return null==n?P:n[t]}}function w(t){return function(n){return null==t?P:t[n]}}function m(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function A(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function O(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==P&&(r=r===P?o:r+o); +}return r}function k(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function E(t,n){return l(n,function(n){return[n,t[n]]})}function S(t){return function(n){return t(n)}}function R(t,n){return l(n,function(n){return t[n]})}function I(t,n){return t.has(n)}function W(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function B(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function M(t){return"\\"+Tt[t]}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{ +n=!!(t+"")}catch(t){}return n}function L(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}function z(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function U(t){var n=Object;return function(r){return t(n(r))}}function D(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function $(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function F(t){ +var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function T(t){if(!t||!Lt.test(t))return t.length;for(var n=Mt.lastIndex=0;Mt.test(t);)n++;return n}function N(w){function St(t){return Xu.call(t)}function Rt(t,n){return w.setTimeout.call(Vt,t,n)}function It(t){if(au(t)&&!Zi(t)&&!(t instanceof Zt)){if(t instanceof Tt)return t;if(Yu.call(t,"__wrapped__"))return Se(t)}return new Tt(t)}function Ft(){}function Tt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0, +this.__values__=P}function Zt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function qt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Kt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Gt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Yt(t){var n=-1,r=t?t.length:0; +for(this.__data__=new Gt;++n<r;)this.add(t[n])}function cn(t){this.__data__=new Kt(t)}function an(t,n,r,e){return t===P||tu(t,qu[r])&&!Yu.call(e,r)?n:t}function ln(t,n,r){(r===P||tu(t[n],r))&&(typeof n!="number"||r!==P||n in t)||(t[n]=r)}function sn(t,n,r){var e=t[n];Yu.call(t,n)&&tu(e,r)&&(r!==P||n in t)||(t[n]=r)}function hn(t,n){for(var r=t.length;r--;)if(tu(t[r][0],n))return r;return-1}function pn(t,n,r,e){return Vo(t,function(t,u,o){n(e,t,r(t),o)}),e}function _n(t,n){return t&&Br(n,mu(n),t)} +function vn(t,n){for(var r=-1,e=null==t,u=n.length,o=Du(u);++r<u;)o[r]=e?P:ju(t,n[r]);return o}function gn(t,n,r){return t===t&&(r!==P&&(t=t<=r?t:r),n!==P&&(t=t>=n?t:n)),t}function dn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==P)return c;if(!cu(t))return t;if(o=Zi(t)){if(c=he(t),!n)return Wr(t,c)}else{var a=St(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Vi(t))return kr(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(C(t))return i?t:{};if(c=pe(l?{}:t), +!n)return Mr(t,_n(c,t))}else{if(!$t[a])return i?t:{};c=_e(t,a,dn,n)}}if(f||(f=new cn),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?Wn(t,mu,ri):mu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),sn(c,o,dn(u,n,r,e,o,t,f))}),c}function yn(t){var n=mu(t);return function(r){return bn(r,t,n)}}function bn(t,n,r){var e=r.length;if(null==t)return!e;for(;e--;){var u=r[e],o=n[u],i=t[u];if(i===P&&!(u in Object(t))||!o(i))return false}return true}function xn(t){return cu(t)?co(t):{}}function jn(t,n,r){if(typeof t!="function")throw new Pu("Expected a function"); +return Rt(function(){t.apply(P,r)},n)}function wn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,S(r))),e?(o=a,i=false):200<=n.length&&(o=I,i=false,n=new Yt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function mn(t,n){var r=true;return Vo(t,function(t,e,u){return r=!!n(t,e,u)}),r}function An(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===P?i===i&&!pu(i):r(i,f)))var f=i,c=o; +}return c}function On(t,n){var r=[];return Vo(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function kn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=ge),u||(u=[]);++o<i;){var f=t[o];0<n&&r(f)?1<n?kn(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function En(t,n){return t&&Go(t,n,mu)}function Sn(t,n){return t&&Jo(t,n,mu)}function Rn(t,n){return f(n,function(n){return ou(t[n])})}function In(t,n){n=be(n,t)?[n]:Ar(n);for(var r=0,e=n.length;null!=t&&r<e;)t=t[Oe(n[r++])];return r&&r==e?t:P}function Wn(t,n,r){ +return n=n(t),Zi(t)?n:s(n,r(t))}function Bn(t,n){return t>n}function Mn(t,n){return null!=t&&(Yu.call(t,n)||typeof t=="object"&&n in t&&null===ni(t))}function Cn(t,n){return null!=t&&n in Object(t)}function Ln(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Du(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,S(n))),s=wo(p.length,s),f[i]=!r&&(n||120<=u&&120<=p.length)?new Yt(i&&p):P}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&h.length<s;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!I(v,d):!e(h,d,r)){for(i=o;--i;){ +var y=f[i];if(y?!I(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function zn(t,n,r){var e={};return En(t,function(t,u,o){n(e,r(t),u,o)}),e}function Un(t,n,e){return be(n,t)||(n=Ar(n),t=Ae(t,n),n=Ce(n)),n=null==t?t:t[Oe(n)],null==n?P:r(n,t,e)}function Dn(t){return au(t)&&"[object ArrayBuffer]"==Xu.call(t)}function $n(t){return au(t)&&"[object Date]"==Xu.call(t)}function Fn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!cu(t)&&!au(n))n=t!==t&&n!==n;else t:{var o=Zi(t),i=Zi(n),f="[object Array]",c="[object Array]"; +o||(f=St(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=St(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!C(t),i="[object Object]"==c&&!C(n);if((c=f==c)&&!a)u||(u=new cn),n=o||Hi(t)?ee(t,n,Fn,r,e,u):ue(t,n,f,Fn,r,e,u);else{if(!(2&e)&&(o=a&&Yu.call(t,"__wrapped__"),f=i&&Yu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new cn),n=Fn(t,n,r,e,u);break t}if(c)n:if(u||(u=new cn),o=2&e,f=mu(t),i=f.length,c=mu(n).length,i==c||o){for(a=i;a--;){var l=f[a]; +if(!(o?l in n:Mn(n,l))){n=false;break n}}if((c=u.get(t))&&u.get(n))n=c==n;else{c=true,u.set(t,n),u.set(n,t);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===P?h!==p&&!Fn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u.delete(t),u.delete(n),n=c}}else n=false;else n=false}}return n}function Tn(t){ +return au(t)&&"[object Map]"==St(t)}function Nn(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===P&&!(c in t))return false}else{if(f=new cn,e)var s=e(a,l,c,t,n,f);if(s===P?!Fn(l,a,e,3,f):!s)return false}}return true}function Pn(t){return!(!cu(t)||Gu&&Gu in t)&&(ou(t)||C(t)?no:wt).test(ke(t))}function Zn(t){return cu(t)&&"[object RegExp]"==Xu.call(t)}function qn(t){ +return au(t)&&"[object Set]"==St(t)}function Vn(t){return au(t)&&fu(t.length)&&!!Dt[Xu.call(t)]}function Kn(t){return typeof t=="function"?t:null==t?Wu:typeof t=="object"?Zi(t)?Qn(t[0],t[1]):Hn(t):Lu(t)}function Gn(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);return r}function Jn(t,n){return t<n}function Yn(t,n){var r=-1,e=ru(t)?Du(t.length):[];return Vo(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Hn(t){var n=ae(t);return 1==n.length&&n[0][2]?we(n[0][0],n[0][1]):function(r){return r===t||Nn(r,t,n); +}}function Qn(t,n){return be(t)&&n===n&&!cu(n)?we(Oe(t),n):function(r){var e=ju(r,t);return e===P&&e===n?wu(r,t):Fn(n,e,P,3)}}function Xn(t,n,r,e,o){if(t!==n){if(!Zi(n)&&!Hi(n))var i=Au(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),cu(u)){o||(o=new cn);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)ln(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):P,p=h===P;p&&(h=s,Zi(s)||Hi(s)?Zi(l)?h=l:eu(l)?h=Wr(l):(p=false,h=dn(s,true)):su(s)||nu(s)?nu(l)?h=bu(l):!cu(l)||r&&ou(l)?(p=false,h=dn(s,true)):h=l:p=false),p&&(a.set(s,h),Xn(h,s,r,e,a), +a.delete(s)),ln(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):P,c===P&&(c=u),ln(t,f,c)})}}function tr(t,n){var r=t.length;if(r)return n+=0>n?r:0,de(n,r)?t[n]:P}function nr(t,n,r){var e=-1;return n=l(n.length?n:[Wu],S(fe())),t=Yn(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),A(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){var c=Sr(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function rr(t,n){return t=Object(t),er(t,n,function(n,r){ +return r in t})}function er(t,n,r){for(var e=-1,u=n.length,o={};++e<u;){var i=n[e],f=t[i];r(f,i)&&(o[i]=f)}return o}function ur(t){return function(n){return In(n,t)}}function or(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(t===n&&(n=Wr(n)),r&&(f=l(t,S(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&lo.call(f,c,1),lo.call(t,c,1);return t}function ir(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(de(u))lo.call(t,u,1);else if(be(u,t))delete t[Oe(u)];else{ +var u=Ar(u),i=Ae(t,u);null!=i&&delete i[Oe(Ce(u))]}}}}function fr(t,n){return t+po(Ao()*(n-t+1))}function cr(t,n){var r="";if(!t||1>n||9007199254740991<n)return r;do n%2&&(r+=t),(n=po(n/2))&&(t+=t);while(n);return r}function ar(t,n){return n=jo(n===P?t.length-1:n,0),function(){for(var e=arguments,u=-1,o=jo(e.length-n,0),i=Du(o);++u<o;)i[u]=e[n+u];for(u=-1,o=Du(n+1);++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function lr(t,n,r,e){n=be(n,t)?[n]:Ar(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){ +var c=Oe(n[u]);if(cu(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):P;a===P&&(a=null==l?de(n[u+1])?[]:{}:l)}sn(f,c,a)}f=f[c]}return t}function sr(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Du(u);++e<u;)r[e]=t[e+n];return r}function hr(t,n){var r;return Vo(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function pr(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;e<u;){var o=e+u>>>1,i=t[o];null!==i&&!pu(i)&&(r?i<=n:i<n)?e=o+1:u=o; +}return u}return _r(t,n,Wu,r)}function _r(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=pu(n),a=n===P;u<o;){var l=po((u+o)/2),s=r(t[l]),h=s!==P,p=null===s,_=s===s,v=pu(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=n:s<n)?u=l+1:o=l}return wo(o,4294967294)}function vr(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r],f=n?n(i):i;if(!r||!tu(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function gr(t){return typeof t=="number"?t:pu(t)?q:+t}function dr(t){if(typeof t=="string")return t; +if(pu(t))return qo?qo.call(t):"";var n=t+"";return"0"==n&&1/t==-Z?"-0":n}function yr(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(200<=o){if(u=n?null:Qo(t))return $(u);i=false,u=I,l=new Yt}else l=n?[]:f;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function br(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?sr(t,e?0:o,e?o+1:u):sr(t,e?o+1:0,e?u:o); +}function xr(t,n){var r=t;return r instanceof Zt&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function jr(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(wn(o,t[e],n,r),wn(t[e],o,n,r)):t[e];return o&&o.length?yr(o,n,r):[]}function wr(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],e<o?n[e]:P);return i}function mr(t){return eu(t)?t:[]}function Ar(t){return Zi(t)?t:fi(t)}function Or(t,n,r){var e=t.length;return r=r===P?e:r,!n&&r>=e?t:sr(t,n,r)}function kr(t,n){ +if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Er(t){var n=new t.constructor(t.byteLength);return new oo(n).set(new oo(t)),n}function Sr(t,n){if(t!==n){var r=t!==P,e=null===t,u=t===t,o=pu(t),i=n!==P,f=null===n,c=n===n,a=pu(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&t<n||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function Rr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=jo(o-i,0),l=Du(c+a);for(e=!e;++f<c;)l[f]=n[f]; +for(;++u<i;)(e||u<o)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function Ir(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=jo(o-f,0),s=Du(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||u<o)&&(s[l+r[i]]=t[u++]);return s}function Wr(t,n){var r=-1,e=t.length;for(n||(n=Du(e));++r<e;)n[r]=t[r];return n}function Br(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):P;sn(r,i,f===P?t[i]:f)}return r}function Mr(t,n){return Br(t,ri(t),n); +}function Cr(t,n){return function(r,u){var o=Zi(r)?e:pn,i=n?n():{};return o(r,t,fe(u,2),i)}}function Lr(t){return ar(function(n,r){var e=-1,u=r.length,o=1<u?r[u-1]:P,i=2<u?r[2]:P,o=3<t.length&&typeof o=="function"?(u--,o):P;for(i&&ye(r[0],r[1],i)&&(o=3>u?P:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function zr(t,n){return function(r,e){if(null==r)return r;if(!ru(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function Ur(t){return function(n,r,e){ +var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function Dr(t,n,r){function e(){return(this&&this!==Vt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=Tr(t);return e}function $r(t){return function(n){n=xu(n);var r=Lt.test(n)?n.match(Mt):P,e=r?r[0]:n.charAt(0);return n=r?Or(r,1).join(""):n.slice(1),e[t]()+n}}function Fr(t){return function(n){return h(Ru(Su(n).replace(Wt,"")),t,"")}}function Tr(t){return function(){var n=arguments; +switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=xn(t.prototype),n=t.apply(r,n);return cu(n)?n:r}}function Nr(t,n,e){function u(){for(var i=arguments.length,f=Du(i),c=i,a=ie(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:D(f,a), +i-=c.length,i<e?Xr(t,n,qr,u.placeholder,P,f,c,P,P,e-i):r(this&&this!==Vt&&this instanceof u?o:t,this,f)}var o=Tr(t);return u}function Pr(t){return function(n,r,e){var u=Object(n);if(!ru(n)){var o=fe(r,3);n=mu(n),r=function(t){return o(u[t],t,u)}}return r=t(n,r,e),-1<r?u[o?n[r]:r]:P}}function Zr(t){return ar(function(n){n=kn(n,1);var r=n.length,e=r,u=Tt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new Pu("Expected a function");if(u&&!i&&"wrapper"==oe(o))var i=new Tt([],(true)); +}for(e=i?e:r;++e<r;)var o=n[e],u=oe(o),f="wrapper"==u?Xo(o):P,i=f&&xe(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[oe(f[0])].apply(i,f[3]):1==o.length&&xe(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&Zi(e)&&200<=e.length)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function qr(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=Du(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=ie(l),b=y.length;for(x=0;b--;)y[b]===j&&x++; +}if(e&&(y=Rr(y,e,u,_)),o&&(y=Ir(y,o,i,_)),d-=x,_&&d<a)return j=D(y,j),Xr(t,n,qr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=wo(f.length,x),m=Wr(y);w--;){var A=f[w];y[w]=de(A,x)?m[A]:P}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Vt&&this instanceof l&&(b=g||Tr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?P:Tr(t);return l}function Vr(t,n){return function(r,e){return zn(r,t,n(e))}}function Kr(t,n){return function(r,e){ +var u;if(r===P&&e===P)return n;if(r!==P&&(u=r),e!==P){if(u===P)return e;typeof r=="string"||typeof e=="string"?(r=dr(r),e=dr(e)):(r=gr(r),e=gr(e)),u=t(r,e)}return u}}function Gr(t){return ar(function(n){return n=1==n.length&&Zi(n[0])?l(n[0],S(fe())):l(kn(n,1),S(fe())),ar(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Jr(t,n){n=n===P?" ":dr(n);var r=n.length;return 2>r?r?cr(n,t):n:(r=cr(n,ho(t/T(n))),Lt.test(n)?Or(r.match(Mt),0,t).join(""):r.slice(0,t))}function Yr(t,n,e,u){ +function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Du(l+c),h=this&&this!==Vt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=Tr(t);return o}function Hr(t){return function(n,r,e){e&&typeof e!="number"&&ye(n,r,e)&&(r=e=P),n=vu(n),r===P?(r=n,n=0):r=vu(r),e=e===P?n<r?1:-1:vu(e);var u=-1;r=jo(ho((r-n)/(e||1)),0);for(var o=Du(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Qr(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=yu(n), +r=yu(r)),t(n,r)}}function Xr(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:P;i=l?P:i;var h=l?o:P;return o=l?P:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),u=[t,n,u,h,s,o,i,f,c,a],r=r.apply(P,u),xe(t)&&oi(r,u),r.placeholder=e,ii(r,t,n)}function te(t){var n=Tu[t];return function(t,r){if(t=yu(t),r=wo(gu(r),292)){var e=(xu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(xu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function ne(t){return function(n){var r=St(n);return"[object Map]"==r?z(n):"[object Set]"==r?F(n):E(n,t(n)); +}}function re(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new Pu("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=P),i=i===P?i:jo(gu(i),0),f=f===P?f:gu(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=P}var h=c?P:Xo(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&o[7].length<=h[8]||384==t&&h[7].length<=h[8]&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Rr(e,r,h[4]):r,o[4]=e?D(o[3],"__lodash_placeholder__"):h[4]), +(r=h[5])&&(e=o[5],o[5]=e?Ir(e,r,h[6]):r,o[6]=e?D(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:wo(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:jo(o[9]-a,0),!f&&24&n&&(n&=-25),ii((h?Ho:oi)(n&&1!=n?8==n||16==n?Nr(t,n,f):32!=n&&33!=n||u.length?qr.apply(P,o):Yr(t,n,r,e):Dr(t,n,r),o),t,n)}function ee(t,n,r,e,u,o){var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if((c=o.get(t))&&o.get(n))return c==n; +var c=-1,a=true,l=1&u?new Yt:P;for(o.set(t,n),o.set(n,t);++c<f;){var s=t[c],h=n[c];if(e)var p=i?e(h,s,c,n,t,o):e(s,h,c,t,n,o);if(p!==P){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){if(!l.has(n)&&(s===t||r(s,t,e,u,o)))return l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o.delete(t),o.delete(n),a}function ue(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]": +if(t.byteLength!=n.byteLength||!e(new oo(t),new oo(n)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return tu(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=z;case"[object Set]":if(f||(f=$),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),n=ee(f(t),f(n),e,u,o,i),i.delete(t),n);case"[object Symbol]":if(Zo)return Zo.call(t)==Zo.call(n)} +return false}function oe(t){for(var n=t.name+"",r=Uo[n],e=Yu.call(Uo,n)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function ie(t){return(Yu.call(It,"placeholder")?It:t).placeholder}function fe(){var t=It.iteratee||Bu,t=t===Bu?Kn:t;return arguments.length?t(arguments[0],arguments[1]):t}function ce(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map}function ae(t){ +for(var n=mu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!cu(u)]}return n}function le(t,n){var r=null==t?P:t[n];return Pn(r)?r:P}function se(t,n,r){n=be(n,t)?[n]:Ar(n);for(var e,u=-1,o=n.length;++u<o;){var i=Oe(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&fu(o)&&de(i,o)&&(Zi(t)||hu(t)||nu(t)))}function he(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Yu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function pe(t){return typeof t.constructor!="function"||je(t)?{}:xn(ni(t)); +}function _e(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return Er(r);case"[object Boolean]":case"[object Date]":return new i((+r));case"[object DataView]":return e=o?Er(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]": +return e=o?Er(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(z(r),true):z(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,yt.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u($(r),true):$(r),h(e,n,new r.constructor);case"[object Symbol]":return Zo?Object(Zo.call(r)):{}}}function ve(t){var n=t?t.length:P;return fu(n)&&(Zi(t)||hu(t)||nu(t))?k(n,String):null; +}function ge(t){return Zi(t)||nu(t)||!!(so&&t&&t[so])}function de(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||At.test(t))&&-1<t&&0==t%1&&t<n}function ye(t,n,r){if(!cu(r))return false;var e=typeof n;return!!("number"==e?ru(r)&&de(n,r.length):"string"==e&&n in r)&&tu(r[n],t)}function be(t,n){if(Zi(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!pu(t))||(ut.test(t)||!et.test(t)||null!=n&&t in Object(n))}function xe(t){var n=oe(t),r=It[n];return typeof r=="function"&&n in Zt.prototype&&(t===r||(n=Xo(r), +!!n&&t===n[0]))}function je(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||qu)}function we(t,n){return function(r){return null!=r&&(r[t]===n&&(n!==P||t in Object(r)))}}function me(t,n,r,e,u,o){return cu(t)&&cu(n)&&(o.set(n,t),Xn(t,n,P,me,o),o.delete(n)),t}function Ae(t,n){return 1==n.length?t:In(t,sr(n,0,-1))}function Oe(t){if(typeof t=="string"||pu(t))return t;var n=t+"";return"0"==n&&1/t==-Z?"-0":n}function ke(t){if(null!=t){try{return Ju.call(t)}catch(t){}return t+""} +return""}function Ee(t,n){return u(V,function(r){var e="_."+r[0];n&r[1]&&!c(t,e)&&t.push(e)}),t.sort()}function Se(t){if(t instanceof Zt)return t.clone();var n=new Tt(t.__wrapped__,t.__chain__);return n.__actions__=Wr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function Re(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:gu(n),sr(t,0>n?0:n,e)):[]}function Ie(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:gu(n),n=e-n,sr(t,0,0>n?0:n)):[]}function We(t,n,r){var e=t?t.length:0; +return e?(r=null==r?0:gu(r),0>r&&(r=jo(e+r,0)),g(t,fe(n,3),r)):-1}function Be(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==P&&(u=gu(r),u=0>r?jo(e+u,0):wo(u,e-1)),g(t,fe(n,3),u,true)}function Me(t){return t&&t.length?t[0]:P}function Ce(t){var n=t?t.length:0;return n?t[n-1]:P}function Le(t,n){return t&&t.length&&n&&n.length?or(t,n):t}function ze(t){return t?ko.call(t):t}function Ue(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){if(eu(t))return n=jo(t.length,n),true}),k(n,function(n){ +return l(t,j(n))})}function De(t,n){if(!t||!t.length)return[];var e=Ue(t);return null==n?e:l(e,function(t){return r(n,P,t)})}function $e(t){return t=It(t),t.__chain__=true,t}function Fe(t,n){return n(t)}function Te(){return this}function Ne(t,n){return(Zi(t)?u:Vo)(t,fe(n,3))}function Pe(t,n){return(Zi(t)?o:Ko)(t,fe(n,3))}function Ze(t,n){return(Zi(t)?l:Yn)(t,fe(n,3))}function qe(t,n,r){var e=-1,u=_u(t),o=u.length,i=o-1;for(n=(r?ye(t,n,r):n===P)?1:gn(gu(n),0,o);++e<n;)t=fr(e,i),r=u[t],u[t]=u[e],u[e]=r; +return u.length=n,u}function Ve(){return $u.now()}function Ke(t,n,r){return n=r?P:n,n=t&&null==n?t.length:n,re(t,128,P,P,P,P,n)}function Ge(t,n){var r;if(typeof n!="function")throw new Pu("Expected a function");return t=gu(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=P),r}}function Je(t,n,r){return n=r?P:n,t=re(t,8,P,P,P,P,P,n),t.placeholder=Je.placeholder,t}function Ye(t,n,r){return n=r?P:n,t=re(t,16,P,P,P,P,P,n),t.placeholder=Ye.placeholder,t}function He(t,n,r){function e(n){ +var r=c,e=a;return c=a=P,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,p===P||r>=n||0>r||g&&t>=l}function o(){var t=Ve();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?wo(t,l-r):t,h=Rt(o,r)}function i(t){return h=P,d&&c?e(t):(c=a=P,s)}function f(){var t=Ve(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===P)return _=t=p,h=Rt(o,n),v?e(t):s;if(g)return h=Rt(o,n),e(p)}return h===P&&(h=Rt(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Pu("Expected a function");return n=yu(n)||0, +cu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?jo(yu(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==P&&w.clearTimeout.call(Vt,h),_=0,c=p=a=h=P},f.flush=function(){return h===P?s:i(Ve())},f}function Qe(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Pu("Expected a function");return r.cache=new(Qe.Cache||Gt),r}function Xe(t){if(typeof t!="function")throw new Pu("Expected a function"); +return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function tu(t,n){return t===n||t!==t&&n!==n}function nu(t){return eu(t)&&Yu.call(t,"callee")&&(!ao.call(t,"callee")||"[object Arguments]"==Xu.call(t))}function ru(t){return null!=t&&fu(ti(t))&&!ou(t)}function eu(t){return au(t)&&ru(t)}function uu(t){return!!au(t)&&("[object Error]"==Xu.call(t)||typeof t.message=="string"&&typeof t.name=="string"); +}function ou(t){return t=cu(t)?Xu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function iu(t){return typeof t=="number"&&t==gu(t)}function fu(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function cu(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function au(t){return!!t&&typeof t=="object"}function lu(t){return typeof t=="number"||au(t)&&"[object Number]"==Xu.call(t)}function su(t){return!(!au(t)||"[object Object]"!=Xu.call(t)||C(t))&&(t=ni(t),null===t||(t=Yu.call(t,"constructor")&&t.constructor, +typeof t=="function"&&t instanceof t&&Ju.call(t)==Qu))}function hu(t){return typeof t=="string"||!Zi(t)&&au(t)&&"[object String]"==Xu.call(t)}function pu(t){return typeof t=="symbol"||au(t)&&"[object Symbol]"==Xu.call(t)}function _u(t){if(!t)return[];if(ru(t))return hu(t)?t.match(Mt):Wr(t);if(fo&&t[fo])return L(t[fo]());var n=St(t);return("[object Map]"==n?z:"[object Set]"==n?$:ku)(t)}function vu(t){return t?(t=yu(t),t===Z||t===-Z?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function gu(t){ +t=vu(t);var n=t%1;return t===t?n?t-n:t:0}function du(t){return t?gn(gu(t),0,4294967295):0}function yu(t){if(typeof t=="number")return t;if(pu(t))return q;if(cu(t)&&(t=ou(t.valueOf)?t.valueOf():t,t=cu(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(at,"");var n=jt.test(t);return n||mt.test(t)?Pt(t.slice(2),n?2:8):xt.test(t)?q:+t}function bu(t){return Br(t,Au(t))}function xu(t){return null==t?"":dr(t)}function ju(t,n,r){return t=null==t?P:In(t,n),t===P?r:t}function wu(t,n){return null!=t&&se(t,n,Cn); +}function mu(t){var n=je(t);if(!n&&!ru(t))return Yo(t);var r,e=ve(t),u=!!e,e=e||[],o=e.length;for(r in t)!Mn(t,r)||u&&("length"==r||de(r,o))||n&&"constructor"==r||e.push(r);return e}function Au(t){for(var n=-1,r=je(t),e=Gn(t),u=e.length,o=ve(t),i=!!o,o=o||[],f=o.length;++n<u;){var c=e[n];i&&("length"==c||de(c,f))||"constructor"==c&&(r||!Yu.call(t,c))||o.push(c)}return o}function Ou(t,n){return null==t?{}:er(t,Wn(t,Au,ei),fe(n))}function ku(t){return t?R(t,mu(t)):[]}function Eu(t){return Af(xu(t).toLowerCase()); +}function Su(t){return(t=xu(t))&&t.replace(Ot,en).replace(Bt,"")}function Ru(t,n,r){return t=xu(t),n=r?P:n,n===P&&(n=zt.test(t)?Ct:vt),t.match(n)||[]}function Iu(t){return function(){return t}}function Wu(t){return t}function Bu(t){return Kn(typeof t=="function"?t:dn(t,true))}function Mu(t,n,r){var e=mu(n),o=Rn(n,e);null!=r||cu(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=Rn(n,mu(n)));var i=!(cu(r)&&"chain"in r&&!r.chain),f=ou(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){ +var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=Wr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function Cu(){}function Lu(t){return be(t)?j(Oe(t)):ur(t)}function zu(){return[]}function Uu(){return false}w=w?fn.defaults({},w,fn.pick(Vt,Ut)):Vt;var Du=w.Array,$u=w.Date,Fu=w.Error,Tu=w.Math,Nu=w.RegExp,Pu=w.TypeError,Zu=w.Array.prototype,qu=w.Object.prototype,Vu=w.String.prototype,Ku=w["__core-js_shared__"],Gu=function(){ +var t=/[^.]+$/.exec(Ku&&Ku.keys&&Ku.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ju=w.Function.prototype.toString,Yu=qu.hasOwnProperty,Hu=0,Qu=Ju.call(Object),Xu=qu.toString,to=Vt._,no=Nu("^"+Ju.call(Yu).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ro=Jt?w.Buffer:P,eo=w.Reflect,uo=w.Symbol,oo=w.Uint8Array,io=eo?eo.g:P,fo=uo?uo.iterator:P,co=w.Object.create,ao=qu.propertyIsEnumerable,lo=Zu.splice,so=uo?uo.isConcatSpreadable:P,ho=Tu.ceil,po=Tu.floor,_o=Object.getPrototypeOf,vo=Object.getOwnPropertySymbols,go=ro?ro.isBuffer:P,yo=w.isFinite,bo=Zu.join,xo=Object.keys,jo=Tu.max,wo=Tu.min,mo=w.parseInt,Ao=Tu.random,Oo=Vu.replace,ko=Zu.reverse,Eo=Vu.split,So=le(w,"DataView"),Ro=le(w,"Map"),Io=le(w,"Promise"),Wo=le(w,"Set"),Bo=le(w,"WeakMap"),Mo=le(w.Object,"create"),Co=function(){ +var t=le(w.Object,"defineProperty"),n=le.name;return n&&2<n.length?t:P}(),Lo=Bo&&new Bo,zo=!ao.call({valueOf:1},"valueOf"),Uo={},Do=ke(So),$o=ke(Ro),Fo=ke(Io),To=ke(Wo),No=ke(Bo),Po=uo?uo.prototype:P,Zo=Po?Po.valueOf:P,qo=Po?Po.toString:P;It.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:It}},It.prototype=Ft.prototype,It.prototype.constructor=It,Tt.prototype=xn(Ft.prototype),Tt.prototype.constructor=Tt,Zt.prototype=xn(Ft.prototype),Zt.prototype.constructor=Zt,qt.prototype.clear=function(){ +this.__data__=Mo?Mo(null):{}},qt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},qt.prototype.get=function(t){var n=this.__data__;return Mo?(t=n[t],"__lodash_hash_undefined__"===t?P:t):Yu.call(n,t)?n[t]:P},qt.prototype.has=function(t){var n=this.__data__;return Mo?n[t]!==P:Yu.call(n,t)},qt.prototype.set=function(t,n){return this.__data__[t]=Mo&&n===P?"__lodash_hash_undefined__":n,this},Kt.prototype.clear=function(){this.__data__=[]},Kt.prototype.delete=function(t){var n=this.__data__; +return t=hn(n,t),!(0>t)&&(t==n.length-1?n.pop():lo.call(n,t,1),true)},Kt.prototype.get=function(t){var n=this.__data__;return t=hn(n,t),0>t?P:n[t][1]},Kt.prototype.has=function(t){return-1<hn(this.__data__,t)},Kt.prototype.set=function(t,n){var r=this.__data__,e=hn(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},Gt.prototype.clear=function(){this.__data__={hash:new qt,map:new(Ro||Kt),string:new qt}},Gt.prototype.delete=function(t){return ce(this,t).delete(t)},Gt.prototype.get=function(t){return ce(this,t).get(t); +},Gt.prototype.has=function(t){return ce(this,t).has(t)},Gt.prototype.set=function(t,n){return ce(this,t).set(t,n),this},Yt.prototype.add=Yt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Yt.prototype.has=function(t){return this.__data__.has(t)},cn.prototype.clear=function(){this.__data__=new Kt},cn.prototype.delete=function(t){return this.__data__.delete(t)},cn.prototype.get=function(t){return this.__data__.get(t)},cn.prototype.has=function(t){return this.__data__.has(t); +},cn.prototype.set=function(t,n){var r=this.__data__;if(r instanceof Kt){if(r=r.__data__,!Ro||199>r.length)return r.push([t,n]),this;r=this.__data__=new Gt(r)}return r.set(t,n),this};var Vo=zr(En),Ko=zr(Sn,true),Go=Ur(),Jo=Ur(true),Yo=U(xo);io&&!ao.call({valueOf:1},"valueOf")&&(Gn=function(t){return L(io(t))});var Ho=Lo?function(t,n){return Lo.set(t,n),t}:Wu,Qo=Wo&&1/$(new Wo([,-0]))[1]==Z?function(t){return new Wo(t)}:Cu,Xo=Lo?function(t){return Lo.get(t)}:Cu,ti=j("length"),ni=U(_o),ri=vo?U(vo):zu,ei=vo?function(t){ +for(var n=[];t;)s(n,ri(t)),t=ni(t);return n}:zu;(So&&"[object DataView]"!=St(new So(new ArrayBuffer(1)))||Ro&&"[object Map]"!=St(new Ro)||Io&&"[object Promise]"!=St(Io.resolve())||Wo&&"[object Set]"!=St(new Wo)||Bo&&"[object WeakMap]"!=St(new Bo))&&(St=function(t){var n=Xu.call(t);if(t=(t="[object Object]"==n?t.constructor:P)?ke(t):P)switch(t){case Do:return"[object DataView]";case $o:return"[object Map]";case Fo:return"[object Promise]";case To:return"[object Set]";case No:return"[object WeakMap]"; +}return n});var ui=Ku?ou:Uu,oi=function(){var t=0,n=0;return function(r,e){var u=Ve(),o=16-(u-n);if(n=u,0<o){if(150<=++t)return r}else t=0;return Ho(r,e)}}(),ii=Co?function(t,n,r){n+="";var e;e=(e=n.match(pt))?e[1].split(_t):[],r=Ee(e,r),e=r.length;var u=e-1;return r[u]=(1<e?"& ":"")+r[u],r=r.join(2<e?", ":" "),n=n.replace(ht,"{\n/* [wrapped with "+r+"] */\n"),Co(t,"toString",{configurable:true,enumerable:false,value:Iu(n)})}:Wu,fi=Qe(function(t){t=xu(t);var n=[];return ot.test(t)&&n.push(""),t.replace(it,function(t,r,e,u){ +n.push(e?u.replace(gt,"$1"):r||t)}),n}),ci=ar(function(t,n){return eu(t)?wn(t,kn(n,1,eu,true)):[]}),ai=ar(function(t,n){var r=Ce(n);return eu(r)&&(r=P),eu(t)?wn(t,kn(n,1,eu,true),fe(r,2)):[]}),li=ar(function(t,n){var r=Ce(n);return eu(r)&&(r=P),eu(t)?wn(t,kn(n,1,eu,true),P,r):[]}),si=ar(function(t){var n=l(t,mr);return n.length&&n[0]===t[0]?Ln(n):[]}),hi=ar(function(t){var n=Ce(t),r=l(t,mr);return n===Ce(r)?n=P:r.pop(),r.length&&r[0]===t[0]?Ln(r,fe(n,2)):[]}),pi=ar(function(t){var n=Ce(t),r=l(t,mr);return n===Ce(r)?n=P:r.pop(), +r.length&&r[0]===t[0]?Ln(r,P,n):[]}),_i=ar(Le),vi=ar(function(t,n){n=kn(n,1);var r=t?t.length:0,e=vn(t,n);return ir(t,l(n,function(t){return de(t,r)?+t:t}).sort(Sr)),e}),gi=ar(function(t){return yr(kn(t,1,eu,true))}),di=ar(function(t){var n=Ce(t);return eu(n)&&(n=P),yr(kn(t,1,eu,true),fe(n,2))}),yi=ar(function(t){var n=Ce(t);return eu(n)&&(n=P),yr(kn(t,1,eu,true),P,n)}),bi=ar(function(t,n){return eu(t)?wn(t,n):[]}),xi=ar(function(t){return jr(f(t,eu))}),ji=ar(function(t){var n=Ce(t);return eu(n)&&(n=P), +jr(f(t,eu),fe(n,2))}),wi=ar(function(t){var n=Ce(t);return eu(n)&&(n=P),jr(f(t,eu),P,n)}),mi=ar(Ue),Ai=ar(function(t){var n=t.length,n=1<n?t[n-1]:P,n=typeof n=="function"?(t.pop(),n):P;return De(t,n)}),Oi=ar(function(t){function n(n){return vn(n,t)}t=kn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Zt&&de(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:Fe,args:[n],thisArg:P}),new Tt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(P), +t})):this.thru(n)}),ki=Cr(function(t,n,r){Yu.call(t,r)?++t[r]:t[r]=1}),Ei=Pr(We),Si=Pr(Be),Ri=Cr(function(t,n,r){Yu.call(t,r)?t[r].push(n):t[r]=[n]}),Ii=ar(function(t,n,e){var u=-1,o=typeof n=="function",i=be(n),f=ru(t)?Du(t.length):[];return Vo(t,function(t){var c=o?n:i&&null!=t?t[n]:P;f[++u]=c?r(c,t,e):Un(t,n,e)}),f}),Wi=Cr(function(t,n,r){t[r]=n}),Bi=Cr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Mi=ar(function(t,n){if(null==t)return[];var r=n.length;return 1<r&&ye(t,n[0],n[1])?n=[]:2<r&&ye(n[0],n[1],n[2])&&(n=[n[0]]), +nr(t,kn(n,1),[])}),Ci=ar(function(t,n,r){var e=1;if(r.length)var u=D(r,ie(Ci)),e=32|e;return re(t,e,n,r,u)}),Li=ar(function(t,n,r){var e=3;if(r.length)var u=D(r,ie(Li)),e=32|e;return re(n,e,t,r,u)}),zi=ar(function(t,n){return jn(t,1,n)}),Ui=ar(function(t,n,r){return jn(t,yu(n)||0,r)});Qe.Cache=Gt;var Di=ar(function(t,n){n=1==n.length&&Zi(n[0])?l(n[0],S(fe())):l(kn(n,1),S(fe()));var e=n.length;return ar(function(u){for(var o=-1,i=wo(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)}); +}),$i=ar(function(t,n){var r=D(n,ie($i));return re(t,32,P,n,r)}),Fi=ar(function(t,n){var r=D(n,ie(Fi));return re(t,64,P,n,r)}),Ti=ar(function(t,n){return re(t,256,P,P,P,kn(n,1))}),Ni=Qr(Bn),Pi=Qr(function(t,n){return t>=n}),Zi=Du.isArray,qi=Ht?S(Ht):Dn,Vi=go||Uu,Ki=Qt?S(Qt):$n,Gi=Xt?S(Xt):Tn,Ji=tn?S(tn):Zn,Yi=nn?S(nn):qn,Hi=rn?S(rn):Vn,Qi=Qr(Jn),Xi=Qr(function(t,n){return t<=n}),tf=Lr(function(t,n){if(zo||je(n)||ru(n))Br(n,mu(n),t);else for(var r in n)Yu.call(n,r)&&sn(t,r,n[r])}),nf=Lr(function(t,n){ +if(zo||je(n)||ru(n))Br(n,Au(n),t);else for(var r in n)sn(t,r,n[r])}),rf=Lr(function(t,n,r,e){Br(n,Au(n),t,e)}),ef=Lr(function(t,n,r,e){Br(n,mu(n),t,e)}),uf=ar(function(t,n){return vn(t,kn(n,1))}),of=ar(function(t){return t.push(P,an),r(rf,P,t)}),ff=ar(function(t){return t.push(P,me),r(hf,P,t)}),cf=Vr(function(t,n,r){t[n]=r},Iu(Wu)),af=Vr(function(t,n,r){Yu.call(t,n)?t[n].push(r):t[n]=[r]},fe),lf=ar(Un),sf=Lr(function(t,n,r){Xn(t,n,r)}),hf=Lr(function(t,n,r,e){Xn(t,n,r,e)}),pf=ar(function(t,n){return null==t?{}:(n=l(kn(n,1),Oe), +rr(t,wn(Wn(t,Au,ei),n)))}),_f=ar(function(t,n){return null==t?{}:rr(t,l(kn(n,1),Oe))}),vf=ne(mu),gf=ne(Au),df=Fr(function(t,n,r){return n=n.toLowerCase(),t+(r?Eu(n):n)}),yf=Fr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),bf=Fr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),xf=$r("toLowerCase"),jf=Fr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),wf=Fr(function(t,n,r){return t+(r?" ":"")+Af(n)}),mf=Fr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Af=$r("toUpperCase"),Of=ar(function(t,n){ +try{return r(t,P,n)}catch(t){return uu(t)?t:new Fu(t)}}),kf=ar(function(t,n){return u(kn(n,1),function(n){n=Oe(n),t[n]=Ci(t[n],t)}),t}),Ef=Zr(),Sf=Zr(true),Rf=ar(function(t,n){return function(r){return Un(r,t,n)}}),If=ar(function(t,n){return function(r){return Un(t,r,n)}}),Wf=Gr(l),Bf=Gr(i),Mf=Gr(_),Cf=Hr(),Lf=Hr(true),zf=Kr(function(t,n){return t+n},0),Uf=te("ceil"),Df=Kr(function(t,n){return t/n},1),$f=te("floor"),Ff=Kr(function(t,n){return t*n},1),Tf=te("round"),Nf=Kr(function(t,n){return t-n},0);return It.after=function(t,n){ +if(typeof n!="function")throw new Pu("Expected a function");return t=gu(t),function(){if(1>--t)return n.apply(this,arguments)}},It.ary=Ke,It.assign=tf,It.assignIn=nf,It.assignInWith=rf,It.assignWith=ef,It.at=uf,It.before=Ge,It.bind=Ci,It.bindAll=kf,It.bindKey=Li,It.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Zi(t)?t:[t]},It.chain=$e,It.chunk=function(t,n,r){if(n=(r?ye(t,n,r):n===P)?1:jo(gu(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Du(ho(r/n));e<r;)o[u++]=sr(t,e,e+=n); +return o},It.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var o=t[n];o&&(u[e++]=o)}return u},It.concat=function(){for(var t=arguments.length,n=Du(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(Zi(r)?Wr(r):[r],kn(n,1)):[]},It.cond=function(t){var n=t?t.length:0,e=fe();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Pu("Expected a function");return[e(t[0]),t[1]]}):[],ar(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e); +}})},It.conforms=function(t){return yn(dn(t,true))},It.constant=Iu,It.countBy=ki,It.create=function(t,n){var r=xn(t);return n?_n(r,n):r},It.curry=Je,It.curryRight=Ye,It.debounce=He,It.defaults=of,It.defaultsDeep=ff,It.defer=zi,It.delay=Ui,It.difference=ci,It.differenceBy=ai,It.differenceWith=li,It.drop=Re,It.dropRight=Ie,It.dropRightWhile=function(t,n){return t&&t.length?br(t,fe(n,3),true,true):[]},It.dropWhile=function(t,n){return t&&t.length?br(t,fe(n,3),true):[]},It.fill=function(t,n,r,e){var u=t?t.length:0; +if(!u)return[];for(r&&typeof r!="number"&&ye(t,n,r)&&(r=0,e=u),u=t.length,r=gu(r),0>r&&(r=-r>u?0:u+r),e=e===P||e>u?u:gu(e),0>e&&(e+=u),e=r>e?0:du(e);r<e;)t[r++]=n;return t},It.filter=function(t,n){return(Zi(t)?f:On)(t,fe(n,3))},It.flatMap=function(t,n){return kn(Ze(t,n),1)},It.flatMapDeep=function(t,n){return kn(Ze(t,n),Z)},It.flatMapDepth=function(t,n,r){return r=r===P?1:gu(r),kn(Ze(t,n),r)},It.flatten=function(t){return t&&t.length?kn(t,1):[]},It.flattenDeep=function(t){return t&&t.length?kn(t,Z):[]; +},It.flattenDepth=function(t,n){return t&&t.length?(n=n===P?1:gu(n),kn(t,n)):[]},It.flip=function(t){return re(t,512)},It.flow=Ef,It.flowRight=Sf,It.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},It.functions=function(t){return null==t?[]:Rn(t,mu(t))},It.functionsIn=function(t){return null==t?[]:Rn(t,Au(t))},It.groupBy=Ri,It.initial=function(t){return Ie(t,1)},It.intersection=si,It.intersectionBy=hi,It.intersectionWith=pi,It.invert=cf,It.invertBy=af, +It.invokeMap=Ii,It.iteratee=Bu,It.keyBy=Wi,It.keys=mu,It.keysIn=Au,It.map=Ze,It.mapKeys=function(t,n){var r={};return n=fe(n,3),En(t,function(t,e,u){r[n(t,e,u)]=t}),r},It.mapValues=function(t,n){var r={};return n=fe(n,3),En(t,function(t,e,u){r[e]=n(t,e,u)}),r},It.matches=function(t){return Hn(dn(t,true))},It.matchesProperty=function(t,n){return Qn(t,dn(n,true))},It.memoize=Qe,It.merge=sf,It.mergeWith=hf,It.method=Rf,It.methodOf=If,It.mixin=Mu,It.negate=Xe,It.nthArg=function(t){return t=gu(t),ar(function(n){ +return tr(n,t)})},It.omit=pf,It.omitBy=function(t,n){return Ou(t,Xe(fe(n)))},It.once=function(t){return Ge(2,t)},It.orderBy=function(t,n,r,e){return null==t?[]:(Zi(n)||(n=null==n?[]:[n]),r=e?P:r,Zi(r)||(r=null==r?[]:[r]),nr(t,n,r))},It.over=Wf,It.overArgs=Di,It.overEvery=Bf,It.overSome=Mf,It.partial=$i,It.partialRight=Fi,It.partition=Bi,It.pick=_f,It.pickBy=Ou,It.property=Lu,It.propertyOf=function(t){return function(n){return null==t?P:In(t,n)}},It.pull=_i,It.pullAll=Le,It.pullAllBy=function(t,n,r){ +return t&&t.length&&n&&n.length?or(t,n,fe(r,2)):t},It.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?or(t,n,P,r):t},It.pullAt=vi,It.range=Cf,It.rangeRight=Lf,It.rearg=Ti,It.reject=function(t,n){return(Zi(t)?f:On)(t,Xe(fe(n,3)))},It.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=fe(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return ir(t,u),r},It.rest=function(t,n){if(typeof t!="function")throw new Pu("Expected a function");return n=n===P?n:gu(n), +ar(t,n)},It.reverse=ze,It.sampleSize=qe,It.set=function(t,n,r){return null==t?t:lr(t,n,r)},It.setWith=function(t,n,r,e){return e=typeof e=="function"?e:P,null==t?t:lr(t,n,r,e)},It.shuffle=function(t){return qe(t,4294967295)},It.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&ye(t,n,r)?(n=0,r=e):(n=null==n?0:gu(n),r=r===P?e:gu(r)),sr(t,n,r)):[]},It.sortBy=Mi,It.sortedUniq=function(t){return t&&t.length?vr(t):[]},It.sortedUniqBy=function(t,n){return t&&t.length?vr(t,fe(n,2)):[]; +},It.split=function(t,n,r){return r&&typeof r!="number"&&ye(t,n,r)&&(n=r=P),r=r===P?4294967295:r>>>0,r?(t=xu(t))&&(typeof n=="string"||null!=n&&!Ji(n))&&(n=dr(n),""==n&&Lt.test(t))?Or(t.match(Mt),0,r):Eo.call(t,n,r):[]},It.spread=function(t,n){if(typeof t!="function")throw new Pu("Expected a function");return n=n===P?0:jo(gu(n),0),ar(function(e){var u=e[n];return e=Or(e,0,n),u&&s(e,u),r(t,this,e)})},It.tail=function(t){return Re(t,1)},It.take=function(t,n,r){return t&&t.length?(n=r||n===P?1:gu(n), +sr(t,0,0>n?0:n)):[]},It.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:gu(n),n=e-n,sr(t,0>n?0:n,e)):[]},It.takeRightWhile=function(t,n){return t&&t.length?br(t,fe(n,3),false,true):[]},It.takeWhile=function(t,n){return t&&t.length?br(t,fe(n,3)):[]},It.tap=function(t,n){return n(t),t},It.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Pu("Expected a function");return cu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),He(t,n,{leading:e,maxWait:n, +trailing:u})},It.thru=Fe,It.toArray=_u,It.toPairs=vf,It.toPairsIn=gf,It.toPath=function(t){return Zi(t)?l(t,Oe):pu(t)?[t]:Wr(fi(t))},It.toPlainObject=bu,It.transform=function(t,n,r){var e=Zi(t)||Hi(t);if(n=fe(n,4),null==r)if(e||cu(t)){var o=t.constructor;r=e?Zi(t)?new o:[]:ou(o)?xn(ni(t)):{}}else r={};return(e?u:En)(t,function(t,e,u){return n(r,t,e,u)}),r},It.unary=function(t){return Ke(t,1)},It.union=gi,It.unionBy=di,It.unionWith=yi,It.uniq=function(t){return t&&t.length?yr(t):[]},It.uniqBy=function(t,n){ +return t&&t.length?yr(t,fe(n,2)):[]},It.uniqWith=function(t,n){return t&&t.length?yr(t,P,n):[]},It.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=be(e,r)?[e]:Ar(e);r=Ae(r,e),e=Oe(Ce(e)),r=!(null!=r&&Mn(r,e))||delete r[e]}return r},It.unzip=Ue,It.unzipWith=De,It.update=function(t,n,r){return null==t?t:lr(t,n,(typeof r=="function"?r:Wu)(In(t,n)),void 0)},It.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:P,null!=t&&(t=lr(t,n,(typeof r=="function"?r:Wu)(In(t,n)),e)),t},It.values=ku, +It.valuesIn=function(t){return null==t?[]:R(t,Au(t))},It.without=bi,It.words=Ru,It.wrap=function(t,n){return n=null==n?Wu:n,$i(n,t)},It.xor=xi,It.xorBy=ji,It.xorWith=wi,It.zip=mi,It.zipObject=function(t,n){return wr(t||[],n||[],sn)},It.zipObjectDeep=function(t,n){return wr(t||[],n||[],lr)},It.zipWith=Ai,It.entries=vf,It.entriesIn=gf,It.extend=nf,It.extendWith=rf,Mu(It,It),It.add=zf,It.attempt=Of,It.camelCase=df,It.capitalize=Eu,It.ceil=Uf,It.clamp=function(t,n,r){return r===P&&(r=n,n=P),r!==P&&(r=yu(r), +r=r===r?r:0),n!==P&&(n=yu(n),n=n===n?n:0),gn(yu(t),n,r)},It.clone=function(t){return dn(t,false,true)},It.cloneDeep=function(t){return dn(t,true,true)},It.cloneDeepWith=function(t,n){return dn(t,true,true,n)},It.cloneWith=function(t,n){return dn(t,false,true,n)},It.conformsTo=function(t,n){return null==n||bn(t,n,mu(n))},It.deburr=Su,It.defaultTo=function(t,n){return null==t||t!==t?n:t},It.divide=Df,It.endsWith=function(t,n,r){t=xu(t),n=dr(n);var e=t.length,e=r=r===P?e:gn(gu(r),0,e);return r-=n.length,0<=r&&t.slice(r,e)==n; +},It.eq=tu,It.escape=function(t){return(t=xu(t))&&X.test(t)?t.replace(H,un):t},It.escapeRegExp=function(t){return(t=xu(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},It.every=function(t,n,r){var e=Zi(t)?i:mn;return r&&ye(t,n,r)&&(n=P),e(t,fe(n,3))},It.find=Ei,It.findIndex=We,It.findKey=function(t,n){return v(t,fe(n,3),En)},It.findLast=Si,It.findLastIndex=Be,It.findLastKey=function(t,n){return v(t,fe(n,3),Sn)},It.floor=$f,It.forEach=Ne,It.forEachRight=Pe,It.forIn=function(t,n){return null==t?t:Go(t,fe(n,3),Au); +},It.forInRight=function(t,n){return null==t?t:Jo(t,fe(n,3),Au)},It.forOwn=function(t,n){return t&&En(t,fe(n,3))},It.forOwnRight=function(t,n){return t&&Sn(t,fe(n,3))},It.get=ju,It.gt=Ni,It.gte=Pi,It.has=function(t,n){return null!=t&&se(t,n,Mn)},It.hasIn=wu,It.head=Me,It.identity=Wu,It.includes=function(t,n,r,e){return t=ru(t)?t:ku(t),r=r&&!e?gu(r):0,e=t.length,0>r&&(r=jo(e+r,0)),hu(t)?r<=e&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},It.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:gu(r), +0>r&&(r=jo(e+r,0)),d(t,n,r)):-1},It.inRange=function(t,n,r){return n=vu(n),r===P?(r=n,n=0):r=vu(r),t=yu(t),t>=wo(n,r)&&t<jo(n,r)},It.invoke=lf,It.isArguments=nu,It.isArray=Zi,It.isArrayBuffer=qi,It.isArrayLike=ru,It.isArrayLikeObject=eu,It.isBoolean=function(t){return true===t||false===t||au(t)&&"[object Boolean]"==Xu.call(t)},It.isBuffer=Vi,It.isDate=Ki,It.isElement=function(t){return!!t&&1===t.nodeType&&au(t)&&!su(t)},It.isEmpty=function(t){if(ru(t)&&(Zi(t)||hu(t)||ou(t.splice)||nu(t)||Vi(t)))return!t.length; +if(au(t)){var n=St(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(Yu.call(t,r))return false;return!(zo&&mu(t).length)},It.isEqual=function(t,n){return Fn(t,n)},It.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:P)?r(t,n):P;return e===P?Fn(t,n,r):!!e},It.isError=uu,It.isFinite=function(t){return typeof t=="number"&&yo(t)},It.isFunction=ou,It.isInteger=iu,It.isLength=fu,It.isMap=Gi,It.isMatch=function(t,n){return t===n||Nn(t,n,ae(n))},It.isMatchWith=function(t,n,r){ +return r=typeof r=="function"?r:P,Nn(t,n,ae(n),r)},It.isNaN=function(t){return lu(t)&&t!=+t},It.isNative=function(t){if(ui(t))throw new Fu("This method is not supported with core-js. Try https://github.com/es-shims.");return Pn(t)},It.isNil=function(t){return null==t},It.isNull=function(t){return null===t},It.isNumber=lu,It.isObject=cu,It.isObjectLike=au,It.isPlainObject=su,It.isRegExp=Ji,It.isSafeInteger=function(t){return iu(t)&&-9007199254740991<=t&&9007199254740991>=t},It.isSet=Yi,It.isString=hu, +It.isSymbol=pu,It.isTypedArray=Hi,It.isUndefined=function(t){return t===P},It.isWeakMap=function(t){return au(t)&&"[object WeakMap]"==St(t)},It.isWeakSet=function(t){return au(t)&&"[object WeakSet]"==Xu.call(t)},It.join=function(t,n){return t?bo.call(t,n):""},It.kebabCase=yf,It.last=Ce,It.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==P&&(u=gu(r),u=(0>u?jo(e+u,0):wo(u,e-1))+1),n!==n)return g(t,b,u-1,true);for(;u--;)if(t[u]===n)return u;return-1},It.lowerCase=bf,It.lowerFirst=xf, +It.lt=Qi,It.lte=Xi,It.max=function(t){return t&&t.length?An(t,Wu,Bn):P},It.maxBy=function(t,n){return t&&t.length?An(t,fe(n,2),Bn):P},It.mean=function(t){return x(t,Wu)},It.meanBy=function(t,n){return x(t,fe(n,2))},It.min=function(t){return t&&t.length?An(t,Wu,Jn):P},It.minBy=function(t,n){return t&&t.length?An(t,fe(n,2),Jn):P},It.stubArray=zu,It.stubFalse=Uu,It.stubObject=function(){return{}},It.stubString=function(){return""},It.stubTrue=function(){return true},It.multiply=Ff,It.nth=function(t,n){ +return t&&t.length?tr(t,gu(n)):P},It.noConflict=function(){return Vt._===this&&(Vt._=to),this},It.noop=Cu,It.now=Ve,It.pad=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return!n||e>=n?t:(n=(n-e)/2,Jr(po(n),r)+t+Jr(ho(n),r))},It.padEnd=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return n&&e<n?t+Jr(n-e,r):t},It.padStart=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return n&&e<n?Jr(n-e,r)+t:t},It.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=xu(t).replace(at,""),mo(t,n||(bt.test(t)?16:10)); +},It.random=function(t,n,r){if(r&&typeof r!="boolean"&&ye(t,n,r)&&(n=r=P),r===P&&(typeof n=="boolean"?(r=n,n=P):typeof t=="boolean"&&(r=t,t=P)),t===P&&n===P?(t=0,n=1):(t=vu(t),n===P?(n=t,t=0):n=vu(n)),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Ao(),wo(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):fr(t,n)},It.reduce=function(t,n,r){var e=Zi(t)?h:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Vo)},It.reduceRight=function(t,n,r){var e=Zi(t)?p:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Ko)},It.repeat=function(t,n,r){ +return n=(r?ye(t,n,r):n===P)?1:gu(n),cr(xu(t),n)},It.replace=function(){var t=arguments,n=xu(t[0]);return 3>t.length?n:Oo.call(n,t[1],t[2])},It.result=function(t,n,r){n=be(n,t)?[n]:Ar(n);var e=-1,u=n.length;for(u||(t=P,u=1);++e<u;){var o=null==t?P:t[Oe(n[e])];o===P&&(e=u,o=r),t=ou(o)?o.call(t):o}return t},It.round=Tf,It.runInContext=N,It.sample=function(t){t=ru(t)?t:ku(t);var n=t.length;return 0<n?t[fr(0,n-1)]:P},It.size=function(t){if(null==t)return 0;if(ru(t)){var n=t.length;return n&&hu(t)?T(t):n; +}return au(t)&&(n=St(t),"[object Map]"==n||"[object Set]"==n)?t.size:mu(t).length},It.snakeCase=jf,It.some=function(t,n,r){var e=Zi(t)?_:hr;return r&&ye(t,n,r)&&(n=P),e(t,fe(n,3))},It.sortedIndex=function(t,n){return pr(t,n)},It.sortedIndexBy=function(t,n,r){return _r(t,n,fe(r,2))},It.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=pr(t,n);if(e<r&&tu(t[e],n))return e}return-1},It.sortedLastIndex=function(t,n){return pr(t,n,true)},It.sortedLastIndexBy=function(t,n,r){return _r(t,n,fe(r,2),true); +},It.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=pr(t,n,true)-1;if(tu(t[r],n))return r}return-1},It.startCase=wf,It.startsWith=function(t,n,r){return t=xu(t),r=gn(gu(r),0,t.length),n=dr(n),t.slice(r,r+n.length)==n},It.subtract=Nf,It.sum=function(t){return t&&t.length?O(t,Wu):0},It.sumBy=function(t,n){return t&&t.length?O(t,fe(n,2)):0},It.template=function(t,n,r){var e=It.templateSettings;r&&ye(t,n,r)&&(n=P),t=xu(t),n=rf({},n,e,an),r=rf({},n.imports,e.imports,an);var u,o,i=mu(r),f=R(r,i),c=0; +r=n.interpolate||kt;var a="__p+='";r=Nu((n.escape||kt).source+"|"+r.source+"|"+(r===rt?dt:kt).source+"|"+(n.evaluate||kt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(Et,M),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(K,""):a).replace(G,"$1").replace(J,"$1;"), +a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Of(function(){return Function(i,l+"return "+a).apply(P,f)}),n.source=a,uu(n))throw n;return n},It.times=function(t,n){if(t=gu(t),1>t||9007199254740991<t)return[];var r=4294967295,e=wo(t,4294967295);for(n=fe(n),t-=4294967295,e=k(e,n);++r<t;)n(r);return e},It.toFinite=vu,It.toInteger=gu,It.toLength=du,It.toLower=function(t){ +return xu(t).toLowerCase()},It.toNumber=yu,It.toSafeInteger=function(t){return gn(gu(t),-9007199254740991,9007199254740991)},It.toString=xu,It.toUpper=function(t){return xu(t).toUpperCase()},It.trim=function(t,n,r){return(t=xu(t))&&(r||n===P)?t.replace(at,""):t&&(n=dr(n))?(t=t.match(Mt),r=n.match(Mt),n=W(t,r),r=B(t,r)+1,Or(t,n,r).join("")):t},It.trimEnd=function(t,n,r){return(t=xu(t))&&(r||n===P)?t.replace(st,""):t&&(n=dr(n))?(t=t.match(Mt),n=B(t,n.match(Mt))+1,Or(t,0,n).join("")):t},It.trimStart=function(t,n,r){ +return(t=xu(t))&&(r||n===P)?t.replace(lt,""):t&&(n=dr(n))?(t=t.match(Mt),n=W(t,n.match(Mt)),Or(t,n).join("")):t},It.truncate=function(t,n){var r=30,e="...";if(cu(n))var u="separator"in n?n.separator:u,r="length"in n?gu(n.length):r,e="omission"in n?dr(n.omission):e;t=xu(t);var o=t.length;if(Lt.test(t))var i=t.match(Mt),o=i.length;if(r>=o)return t;if(o=r-T(e),1>o)return e;if(r=i?Or(i,0,o).join(""):t.slice(0,o),u===P)return r+e;if(i&&(o+=r.length-o),Ji(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=Nu(u.source,xu(yt.exec(u))+"g")), +u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===P?o:c)}}else t.indexOf(dr(u),o)!=o&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},It.unescape=function(t){return(t=xu(t))&&Q.test(t)?t.replace(Y,on):t},It.uniqueId=function(t){var n=++Hu;return xu(t)+n},It.upperCase=mf,It.upperFirst=Af,It.each=Ne,It.eachRight=Pe,It.first=Me,Mu(It,function(){var t={};return En(It,function(n,r){Yu.call(It.prototype,r)||(t[r]=n)}),t}(),{chain:false}),It.VERSION="4.14.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){ +It[t].placeholder=It}),u(["drop","take"],function(t,n){Zt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Zt(this);r=r===P?1:jo(gu(r),0);var u=this.clone();return e?u.__takeCount__=wo(r,u.__takeCount__):u.__views__.push({size:wo(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Zt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Zt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({ +iteratee:fe(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Zt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");Zt.prototype[t]=function(){return this.__filtered__?new Zt(this):this[r](1)}}),Zt.prototype.compact=function(){return this.filter(Wu)},Zt.prototype.find=function(t){return this.filter(t).head()},Zt.prototype.findLast=function(t){return this.reverse().find(t); +},Zt.prototype.invokeMap=ar(function(t,n){return typeof t=="function"?new Zt(this):this.map(function(r){return Un(r,t,n)})}),Zt.prototype.reject=function(t){return this.filter(Xe(fe(t)))},Zt.prototype.slice=function(t,n){t=gu(t);var r=this;return r.__filtered__&&(0<t||0>n)?new Zt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==P&&(n=gu(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Zt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Zt.prototype.toArray=function(){return this.take(4294967295); +},En(Zt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=It[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(It.prototype[n]=function(){function n(t){return t=u.apply(It,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Zt,a=f[0],l=c||Zi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new Zt(this),i=t.apply(i,f),i.__actions__.push({ +func:Fe,args:[n],thisArg:P}),new Tt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Zu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);It.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(Zi(u)?u:[],t)}return this[r](function(r){return n.apply(Zi(r)?r:[],t)})}}),En(Zt.prototype,function(t,n){var r=It[n];if(r){var e=r.name+""; +(Uo[e]||(Uo[e]=[])).push({name:n,func:r})}}),Uo[qr(P,2).name]=[{name:"wrapper",func:P}],Zt.prototype.clone=function(){var t=new Zt(this.__wrapped__);return t.__actions__=Wr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wr(this.__views__),t},Zt.prototype.reverse=function(){if(this.__filtered__){var t=new Zt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t; +},Zt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Zi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=wo(t,f+s);break;case"takeRight":f=jo(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=wo(t,this.__takeCount__),!e||200>o||o==t&&a==t)return xr(n,this.__actions__);e=[];t:for(;t--&&c<a;){ +for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},It.prototype.at=Oi,It.prototype.chain=function(){return $e(this)},It.prototype.commit=function(){return new Tt(this.value(),this.__chain__)},It.prototype.next=function(){this.__values__===P&&(this.__values__=_u(this.value()));var t=this.__index__>=this.__values__.length,n=t?P:this.__values__[this.__index__++];return{done:t,value:n}},It.prototype.plant=function(t){ +for(var n,r=this;r instanceof Ft;){var e=Se(r);e.__index__=0,e.__values__=P,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},It.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Zt?(this.__actions__.length&&(t=new Zt(this)),t=t.reverse(),t.__actions__.push({func:Fe,args:[ze],thisArg:P}),new Tt(t,this.__chain__)):this.thru(ze)},It.prototype.toJSON=It.prototype.valueOf=It.prototype.value=function(){return xr(this.__wrapped__,this.__actions__)},It.prototype.first=It.prototype.head, +fo&&(It.prototype[fo]=Te),It}var P,Z=1/0,q=NaN,V=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/^\./,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pt=/\{\n\/\* \[wrapped with (.+)\] \*/,_t=/,? & /,vt=/[a-zA-Z0-9]+/g,gt=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,bt=/^0x/i,xt=/^[-+]0x[0-9a-f]+$/i,jt=/^0b[01]+$/i,wt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,At=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,kt=/($^)/,Et=/['\n\r\u2028\u2029\\]/g,St="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Rt="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+St,It="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Wt=RegExp("['\u2019]","g"),Bt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),Mt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+It+St,"g"),Ct=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",Rt].join("|"),"g"),Lt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),zt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ut="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Dt={}; +Dt["[object Float32Array]"]=Dt["[object Float64Array]"]=Dt["[object Int8Array]"]=Dt["[object Int16Array]"]=Dt["[object Int32Array]"]=Dt["[object Uint8Array]"]=Dt["[object Uint8ClampedArray]"]=Dt["[object Uint16Array]"]=Dt["[object Uint32Array]"]=true,Dt["[object Arguments]"]=Dt["[object Array]"]=Dt["[object ArrayBuffer]"]=Dt["[object Boolean]"]=Dt["[object DataView]"]=Dt["[object Date]"]=Dt["[object Error]"]=Dt["[object Function]"]=Dt["[object Map]"]=Dt["[object Number]"]=Dt["[object Object]"]=Dt["[object RegExp]"]=Dt["[object Set]"]=Dt["[object String]"]=Dt["[object WeakMap]"]=false; +var $t={};$t["[object Arguments]"]=$t["[object Array]"]=$t["[object ArrayBuffer]"]=$t["[object DataView]"]=$t["[object Boolean]"]=$t["[object Date]"]=$t["[object Float32Array]"]=$t["[object Float64Array]"]=$t["[object Int8Array]"]=$t["[object Int16Array]"]=$t["[object Int32Array]"]=$t["[object Map]"]=$t["[object Number]"]=$t["[object Object]"]=$t["[object RegExp]"]=$t["[object Set]"]=$t["[object String]"]=$t["[object Symbol]"]=$t["[object Uint8Array]"]=$t["[object Uint8ClampedArray]"]=$t["[object Uint16Array]"]=$t["[object Uint32Array]"]=true, +$t["[object Error]"]=$t["[object Function]"]=$t["[object WeakMap]"]=false;var Ft,Tt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nt=parseFloat,Pt=parseInt,Zt=typeof global=="object"&&global&&global.Object===Object&&global,qt=typeof self=="object"&&self&&self.Object===Object&&self,Vt=Zt||qt||Function("return this")(),Kt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gt=Kt&&typeof module=="object"&&module&&!module.nodeType&&module,Jt=Gt&&Gt.exports===Kt,Yt=Jt&&Zt.h; +t:{try{Ft=Yt&&Yt.f("util");break t}catch(t){}Ft=void 0}var Ht=Ft&&Ft.isArrayBuffer,Qt=Ft&&Ft.isDate,Xt=Ft&&Ft.isMap,tn=Ft&&Ft.isRegExp,nn=Ft&&Ft.isSet,rn=Ft&&Ft.isTypedArray,en=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i", +"\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"}),un=w({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),on=w({"&":"&","<":"<",">":">",""":'"',"'":"'", +"`":"`"}),fn=N();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Vt._=fn, define(function(){return fn})):Gt?((Gt.exports=fn)._=fn,Kt._=fn):Vt._=fn}).call(this);
\ No newline at end of file diff --git a/tools/eslint/node_modules/lodash/map.js b/tools/eslint/node_modules/lodash/map.js index e9f9f22ebe..22efee7b35 100644 --- a/tools/eslint/node_modules/lodash/map.js +++ b/tools/eslint/node_modules/lodash/map.js @@ -22,8 +22,7 @@ var arrayMap = require('./_arrayMap'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * diff --git a/tools/eslint/node_modules/lodash/mapKeys.js b/tools/eslint/node_modules/lodash/mapKeys.js index 8af3ac5b42..ef73c5251a 100644 --- a/tools/eslint/node_modules/lodash/mapKeys.js +++ b/tools/eslint/node_modules/lodash/mapKeys.js @@ -12,8 +12,7 @@ var baseForOwn = require('./_baseForOwn'), * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example diff --git a/tools/eslint/node_modules/lodash/mapValues.js b/tools/eslint/node_modules/lodash/mapValues.js index 610f45810a..b2af211a73 100644 --- a/tools/eslint/node_modules/lodash/mapValues.js +++ b/tools/eslint/node_modules/lodash/mapValues.js @@ -12,8 +12,7 @@ var baseForOwn = require('./_baseForOwn'), * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example diff --git a/tools/eslint/node_modules/lodash/matches.js b/tools/eslint/node_modules/lodash/matches.js index 9e97961f0d..834d4729b2 100644 --- a/tools/eslint/node_modules/lodash/matches.js +++ b/tools/eslint/node_modules/lodash/matches.js @@ -4,10 +4,10 @@ var baseClone = require('./_baseClone'), /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** The created function supports comparing the same values as + * `_.isEqual` is equivalent to `_.isMatch` with `source` partially applied. * * @static * @memberOf _ @@ -17,13 +17,13 @@ var baseClone = require('./_baseClone'), * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, true)); diff --git a/tools/eslint/node_modules/lodash/matchesProperty.js b/tools/eslint/node_modules/lodash/matchesProperty.js index 13dbdd03a0..4496442cb2 100644 --- a/tools/eslint/node_modules/lodash/matchesProperty.js +++ b/tools/eslint/node_modules/lodash/matchesProperty.js @@ -17,13 +17,13 @@ var baseClone = require('./_baseClone'), * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.find(users, _.matchesProperty('user', 'fred')); - * // => { 'user': 'fred' } + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, true)); diff --git a/tools/eslint/node_modules/lodash/maxBy.js b/tools/eslint/node_modules/lodash/maxBy.js index 4627bac3ef..2eba9c06ff 100644 --- a/tools/eslint/node_modules/lodash/maxBy.js +++ b/tools/eslint/node_modules/lodash/maxBy.js @@ -12,8 +12,7 @@ var baseExtremum = require('./_baseExtremum'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * @@ -28,7 +27,7 @@ var baseExtremum = require('./_baseExtremum'), */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), baseGt) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt) : undefined; } diff --git a/tools/eslint/node_modules/lodash/meanBy.js b/tools/eslint/node_modules/lodash/meanBy.js index 970d798367..b0316716fe 100644 --- a/tools/eslint/node_modules/lodash/meanBy.js +++ b/tools/eslint/node_modules/lodash/meanBy.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.7.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the mean. * @example * @@ -26,7 +25,7 @@ var baseIteratee = require('./_baseIteratee'), * // => 5 */ function meanBy(array, iteratee) { - return baseMean(array, baseIteratee(iteratee)); + return baseMean(array, baseIteratee(iteratee, 2)); } module.exports = meanBy; diff --git a/tools/eslint/node_modules/lodash/merge.js b/tools/eslint/node_modules/lodash/merge.js index d5aac9ee54..4bbc3a181e 100644 --- a/tools/eslint/node_modules/lodash/merge.js +++ b/tools/eslint/node_modules/lodash/merge.js @@ -21,16 +21,16 @@ var baseMerge = require('./_baseMerge'), * @returns {Object} Returns `object`. * @example * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); diff --git a/tools/eslint/node_modules/lodash/mergeWith.js b/tools/eslint/node_modules/lodash/mergeWith.js index 8fada62dda..a621dca2fd 100644 --- a/tools/eslint/node_modules/lodash/mergeWith.js +++ b/tools/eslint/node_modules/lodash/mergeWith.js @@ -26,18 +26,11 @@ var baseMerge = require('./_baseMerge'), * } * } * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; * * _.mergeWith(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + * // => { 'a': [1, 3], 'b': [2, 4] } */ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { baseMerge(object, source, srcIndex, customizer); diff --git a/tools/eslint/node_modules/lodash/method.js b/tools/eslint/node_modules/lodash/method.js index a4da99bdf1..23ec32d557 100644 --- a/tools/eslint/node_modules/lodash/method.js +++ b/tools/eslint/node_modules/lodash/method.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Creates a function that invokes the method at `path` of a given object. @@ -25,7 +25,7 @@ var baseInvoke = require('./_baseInvoke'), * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ -var method = rest(function(path, args) { +var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; diff --git a/tools/eslint/node_modules/lodash/methodOf.js b/tools/eslint/node_modules/lodash/methodOf.js index 62b049787a..df59b57f31 100644 --- a/tools/eslint/node_modules/lodash/methodOf.js +++ b/tools/eslint/node_modules/lodash/methodOf.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * The opposite of `_.method`; this method creates a function that invokes @@ -24,7 +24,7 @@ var baseInvoke = require('./_baseInvoke'), * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); * // => [2, 0] */ -var methodOf = rest(function(object, args) { +var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; diff --git a/tools/eslint/node_modules/lodash/minBy.js b/tools/eslint/node_modules/lodash/minBy.js index d58084659a..b2697e49a4 100644 --- a/tools/eslint/node_modules/lodash/minBy.js +++ b/tools/eslint/node_modules/lodash/minBy.js @@ -12,8 +12,7 @@ var baseExtremum = require('./_baseExtremum'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * @@ -28,7 +27,7 @@ var baseExtremum = require('./_baseExtremum'), */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), baseLt) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) : undefined; } diff --git a/tools/eslint/node_modules/lodash/multiply.js b/tools/eslint/node_modules/lodash/multiply.js index 57ba939855..d7876e1391 100644 --- a/tools/eslint/node_modules/lodash/multiply.js +++ b/tools/eslint/node_modules/lodash/multiply.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; -}); +}, 1); module.exports = multiply; diff --git a/tools/eslint/node_modules/lodash/negate.js b/tools/eslint/node_modules/lodash/negate.js index f0049c6b74..330e65ac6a 100644 --- a/tools/eslint/node_modules/lodash/negate.js +++ b/tools/eslint/node_modules/lodash/negate.js @@ -26,7 +26,14 @@ function negate(predicate) { throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); }; } diff --git a/tools/eslint/node_modules/lodash/noop.js b/tools/eslint/node_modules/lodash/noop.js index a682a44653..3c0862ee62 100644 --- a/tools/eslint/node_modules/lodash/noop.js +++ b/tools/eslint/node_modules/lodash/noop.js @@ -1,5 +1,5 @@ /** - * A method that returns `undefined`. + * This method returns `undefined`. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/nthArg.js b/tools/eslint/node_modules/lodash/nthArg.js index 7557653aee..09406ddf49 100644 --- a/tools/eslint/node_modules/lodash/nthArg.js +++ b/tools/eslint/node_modules/lodash/nthArg.js @@ -1,5 +1,5 @@ var baseNth = require('./_baseNth'), - rest = require('./rest'), + baseRest = require('./_baseRest'), toInteger = require('./toInteger'); /** @@ -24,7 +24,7 @@ var baseNth = require('./_baseNth'), */ function nthArg(n) { n = toInteger(n); - return rest(function(args) { + return baseRest(function(args) { return baseNth(args, n); }); } diff --git a/tools/eslint/node_modules/lodash/object.js b/tools/eslint/node_modules/lodash/object.js index d6f51c8e1c..f046b05f75 100644 --- a/tools/eslint/node_modules/lodash/object.js +++ b/tools/eslint/node_modules/lodash/object.js @@ -3,6 +3,7 @@ module.exports = { 'assignIn': require('./assignIn'), 'assignInWith': require('./assignInWith'), 'assignWith': require('./assignWith'), + 'at': require('./at'), 'create': require('./create'), 'defaults': require('./defaults'), 'defaultsDeep': require('./defaultsDeep'), diff --git a/tools/eslint/node_modules/lodash/omit.js b/tools/eslint/node_modules/lodash/omit.js index a19974da77..4ef0cafe46 100644 --- a/tools/eslint/node_modules/lodash/omit.js +++ b/tools/eslint/node_modules/lodash/omit.js @@ -2,8 +2,8 @@ var arrayMap = require('./_arrayMap'), baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), basePick = require('./_basePick'), + baseRest = require('./_baseRest'), getAllKeysIn = require('./_getAllKeysIn'), - rest = require('./rest'), toKey = require('./_toKey'); /** @@ -25,7 +25,7 @@ var arrayMap = require('./_arrayMap'), * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ -var omit = rest(function(object, props) { +var omit = baseRest(function(object, props) { if (object == null) { return {}; } diff --git a/tools/eslint/node_modules/lodash/omitBy.js b/tools/eslint/node_modules/lodash/omitBy.js index 79505deafc..a064036eba 100644 --- a/tools/eslint/node_modules/lodash/omitBy.js +++ b/tools/eslint/node_modules/lodash/omitBy.js @@ -1,5 +1,6 @@ var baseIteratee = require('./_baseIteratee'), - basePickBy = require('./_basePickBy'); + negate = require('./negate'), + pickBy = require('./pickBy'); /** * The opposite of `_.pickBy`; this method creates an object composed of @@ -12,8 +13,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -23,10 +23,7 @@ var baseIteratee = require('./_baseIteratee'), * // => { 'b': '2' } */ function omitBy(object, predicate) { - predicate = baseIteratee(predicate); - return basePickBy(object, function(value, key) { - return !predicate(value, key); - }); + return pickBy(object, negate(baseIteratee(predicate))); } module.exports = omitBy; diff --git a/tools/eslint/node_modules/lodash/once.js b/tools/eslint/node_modules/lodash/once.js index 4f66808a16..0706fc3cbb 100644 --- a/tools/eslint/node_modules/lodash/once.js +++ b/tools/eslint/node_modules/lodash/once.js @@ -16,7 +16,7 @@ var before = require('./before'); * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); diff --git a/tools/eslint/node_modules/lodash/over.js b/tools/eslint/node_modules/lodash/over.js index 5301d57f78..bea2f91f8b 100644 --- a/tools/eslint/node_modules/lodash/over.js +++ b/tools/eslint/node_modules/lodash/over.js @@ -9,8 +9,8 @@ var arrayMap = require('./_arrayMap'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to invoke. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. * @returns {Function} Returns the new function. * @example * diff --git a/tools/eslint/node_modules/lodash/overArgs.js b/tools/eslint/node_modules/lodash/overArgs.js index 94f586b53f..56d253bc6d 100644 --- a/tools/eslint/node_modules/lodash/overArgs.js +++ b/tools/eslint/node_modules/lodash/overArgs.js @@ -2,25 +2,23 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUnary = require('./_baseUnary'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - rest = require('./rest'); + isArray = require('./isArray'); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** - * Creates a function that invokes `func` with arguments transformed by - * corresponding `transforms`. + * Creates a function that invokes `func` with its arguments transformed. * * @static * @since 4.0.0 * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [transforms[_.identity]] The functions to transform. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. * @returns {Function} Returns the new function. * @example * @@ -42,13 +40,13 @@ var nativeMin = Math.min; * func(10, 5); * // => [100, 10] */ -var overArgs = rest(function(func, transforms) { +var overArgs = baseRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(baseIteratee)) - : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(baseIteratee)); + : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee)); var funcsLength = transforms.length; - return rest(function(args) { + return baseRest(function(args) { var index = -1, length = nativeMin(args.length, funcsLength); diff --git a/tools/eslint/node_modules/lodash/overEvery.js b/tools/eslint/node_modules/lodash/overEvery.js index 1af6b7398e..c115d15384 100644 --- a/tools/eslint/node_modules/lodash/overEvery.js +++ b/tools/eslint/node_modules/lodash/overEvery.js @@ -9,8 +9,8 @@ var arrayEvery = require('./_arrayEvery'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * diff --git a/tools/eslint/node_modules/lodash/overSome.js b/tools/eslint/node_modules/lodash/overSome.js index 9e3fe95c65..f902907a95 100644 --- a/tools/eslint/node_modules/lodash/overSome.js +++ b/tools/eslint/node_modules/lodash/overSome.js @@ -9,8 +9,8 @@ var arraySome = require('./_arraySome'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * diff --git a/tools/eslint/node_modules/lodash/package.json b/tools/eslint/node_modules/lodash/package.json index a814bf2120..cd7116e4c7 100644 --- a/tools/eslint/node_modules/lodash/package.json +++ b/tools/eslint/node_modules/lodash/package.json @@ -1,31 +1,40 @@ { "_args": [ [ - "lodash@^4.0.0", + { + "raw": "lodash@^4.0.0", + "scope": null, + "escapedName": "lodash", + "name": "lodash", + "rawSpec": "^4.0.0", + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], "_from": "lodash@>=4.0.0 <5.0.0", - "_id": "lodash@4.13.1", + "_id": "lodash@4.14.1", "_inCache": true, "_installable": true, "_location": "/lodash", "_nodeVersion": "4.2.4", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash-4.13.1.tgz_1464019142054_0.5244540225248784" + "tmp": "tmp/lodash-4.14.1.tgz_1469803745646_0.5584656686987728" }, "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" + "name": "jdalton", + "email": "john.david.dalton@gmail.com" }, - "_npmVersion": "2.14.12", + "_npmVersion": "2.15.9", "_phantomChildren": {}, "_requested": { - "name": "lodash", "raw": "lodash@^4.0.0", - "rawSpec": "^4.0.0", "scope": null, + "escapedName": "lodash", + "name": "lodash", + "rawSpec": "^4.0.0", "spec": ">=4.0.0 <5.0.0", "type": "range" }, @@ -34,14 +43,14 @@ "/inquirer", "/table" ], - "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz", - "_shasum": "83e4b10913f48496d4d16fec4a560af2ee744b68", + "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.14.1.tgz", + "_shasum": "5b5d0a516ad3d46e12012d7f59ad66a5659bf408", "_shrinkwrap": null, "_spec": "lodash@^4.0.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", "url": "http://allyoucanleet.com/" }, "bugs": { @@ -49,18 +58,18 @@ }, "contributors": [ { - "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", "url": "http://allyoucanleet.com/" }, { - "email": "blaine.bublitz@gmail.com", "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", "url": "https://github.com/phated" }, { - "email": "mathias@qiwi.be", "name": "Mathias Bynens", + "email": "mathias@qiwi.be", "url": "https://mathiasbynens.be/" } ], @@ -69,8 +78,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "83e4b10913f48496d4d16fec4a560af2ee744b68", - "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz" + "shasum": "5b5d0a516ad3d46e12012d7f59ad66a5659bf408", + "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.14.1.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -83,16 +92,16 @@ "main": "lodash.js", "maintainers": [ { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" + "name": "jdalton", + "email": "john.david.dalton@gmail.com" }, { - "email": "mathias@qiwi.be", - "name": "mathias" + "name": "mathias", + "email": "mathias@qiwi.be" }, { - "email": "blaine.bublitz@gmail.com", - "name": "phated" + "name": "phated", + "email": "blaine.bublitz@gmail.com" } ], "name": "lodash", @@ -105,5 +114,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.13.1" + "version": "4.14.1" } diff --git a/tools/eslint/node_modules/lodash/partial.js b/tools/eslint/node_modules/lodash/partial.js index 916075d84c..85d6535533 100644 --- a/tools/eslint/node_modules/lodash/partial.js +++ b/tools/eslint/node_modules/lodash/partial.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var PARTIAL_FLAG = 32; /** @@ -26,9 +26,9 @@ var PARTIAL_FLAG = 32; * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); @@ -39,9 +39,9 @@ var PARTIAL_FLAG = 32; * greetFred('hi'); * // => 'hi fred' */ -var partial = rest(function(func, partials) { +var partial = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partial)); - return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); + return createWrap(func, PARTIAL_FLAG, undefined, partials, holders); }); // Assign default placeholders. diff --git a/tools/eslint/node_modules/lodash/partialRight.js b/tools/eslint/node_modules/lodash/partialRight.js index a80a34ab00..813aa57741 100644 --- a/tools/eslint/node_modules/lodash/partialRight.js +++ b/tools/eslint/node_modules/lodash/partialRight.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var PARTIAL_RIGHT_FLAG = 64; /** @@ -25,9 +25,9 @@ var PARTIAL_RIGHT_FLAG = 64; * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); @@ -38,9 +38,9 @@ var PARTIAL_RIGHT_FLAG = 64; * sayHelloTo('fred'); * // => 'hello fred' */ -var partialRight = rest(function(func, partials) { +var partialRight = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); + return createWrap(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); // Assign default placeholders. diff --git a/tools/eslint/node_modules/lodash/partition.js b/tools/eslint/node_modules/lodash/partition.js index 2e30e8b97b..6b814a9f2d 100644 --- a/tools/eslint/node_modules/lodash/partition.js +++ b/tools/eslint/node_modules/lodash/partition.js @@ -11,8 +11,7 @@ var createAggregator = require('./_createAggregator'); * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * diff --git a/tools/eslint/node_modules/lodash/pick.js b/tools/eslint/node_modules/lodash/pick.js index 28125865c2..464dd9f923 100644 --- a/tools/eslint/node_modules/lodash/pick.js +++ b/tools/eslint/node_modules/lodash/pick.js @@ -1,7 +1,7 @@ var arrayMap = require('./_arrayMap'), baseFlatten = require('./_baseFlatten'), basePick = require('./_basePick'), - rest = require('./rest'), + baseRest = require('./_baseRest'), toKey = require('./_toKey'); /** @@ -21,7 +21,7 @@ var arrayMap = require('./_arrayMap'), * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ -var pick = rest(function(object, props) { +var pick = baseRest(function(object, props) { return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); }); diff --git a/tools/eslint/node_modules/lodash/pickBy.js b/tools/eslint/node_modules/lodash/pickBy.js index d355442c9e..6e9e193ece 100644 --- a/tools/eslint/node_modules/lodash/pickBy.js +++ b/tools/eslint/node_modules/lodash/pickBy.js @@ -1,5 +1,6 @@ var baseIteratee = require('./_baseIteratee'), - basePickBy = require('./_basePickBy'); + basePickBy = require('./_basePickBy'), + getAllKeysIn = require('./_getAllKeysIn'); /** * Creates an object composed of the `object` properties `predicate` returns @@ -10,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -21,7 +21,7 @@ var baseIteratee = require('./_baseIteratee'), * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { - return object == null ? {} : basePickBy(object, baseIteratee(predicate)); + return object == null ? {} : basePickBy(object, getAllKeysIn(object), baseIteratee(predicate)); } module.exports = pickBy; diff --git a/tools/eslint/node_modules/lodash/pull.js b/tools/eslint/node_modules/lodash/pull.js index 74b2771da1..c136c06e84 100644 --- a/tools/eslint/node_modules/lodash/pull.js +++ b/tools/eslint/node_modules/lodash/pull.js @@ -1,5 +1,5 @@ -var pullAll = require('./pullAll'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + pullAll = require('./pullAll'); /** * Removes all given values from `array` using @@ -24,6 +24,6 @@ var pullAll = require('./pullAll'), * console.log(array); * // => ['b', 'b'] */ -var pull = rest(pullAll); +var pull = baseRest(pullAll); module.exports = pull; diff --git a/tools/eslint/node_modules/lodash/pullAllBy.js b/tools/eslint/node_modules/lodash/pullAllBy.js index 7192650c37..dbfe8647d9 100644 --- a/tools/eslint/node_modules/lodash/pullAllBy.js +++ b/tools/eslint/node_modules/lodash/pullAllBy.js @@ -14,7 +14,7 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns `array`. * @example @@ -27,7 +27,7 @@ var baseIteratee = require('./_baseIteratee'), */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAll(array, values, baseIteratee(iteratee)) + ? basePullAll(array, values, baseIteratee(iteratee, 2)) : array; } diff --git a/tools/eslint/node_modules/lodash/pullAt.js b/tools/eslint/node_modules/lodash/pullAt.js index 01e566e625..59b5fa35a1 100644 --- a/tools/eslint/node_modules/lodash/pullAt.js +++ b/tools/eslint/node_modules/lodash/pullAt.js @@ -2,9 +2,9 @@ var arrayMap = require('./_arrayMap'), baseAt = require('./_baseAt'), baseFlatten = require('./_baseFlatten'), basePullAt = require('./_basePullAt'), + baseRest = require('./_baseRest'), compareAscending = require('./_compareAscending'), - isIndex = require('./_isIndex'), - rest = require('./rest'); + isIndex = require('./_isIndex'); /** * Removes elements from `array` corresponding to `indexes` and returns an @@ -30,7 +30,7 @@ var arrayMap = require('./_arrayMap'), * console.log(pulled); * // => ['b', 'd'] */ -var pullAt = rest(function(array, indexes) { +var pullAt = baseRest(function(array, indexes) { indexes = baseFlatten(indexes, 1); var length = array ? array.length : 0, diff --git a/tools/eslint/node_modules/lodash/random.js b/tools/eslint/node_modules/lodash/random.js index 22e92594c0..8067711c23 100644 --- a/tools/eslint/node_modules/lodash/random.js +++ b/tools/eslint/node_modules/lodash/random.js @@ -1,6 +1,6 @@ var baseRandom = require('./_baseRandom'), isIterateeCall = require('./_isIterateeCall'), - toNumber = require('./toNumber'); + toFinite = require('./toFinite'); /** Built-in method references without a dependency on `root`. */ var freeParseFloat = parseFloat; @@ -59,12 +59,12 @@ function random(lower, upper, floating) { upper = 1; } else { - lower = toNumber(lower) || 0; + lower = toFinite(lower); if (upper === undefined) { upper = lower; lower = 0; } else { - upper = toNumber(upper) || 0; + upper = toFinite(upper); } } if (lower > upper) { diff --git a/tools/eslint/node_modules/lodash/rearg.js b/tools/eslint/node_modules/lodash/rearg.js index b098d80d38..fabe5a3830 100644 --- a/tools/eslint/node_modules/lodash/rearg.js +++ b/tools/eslint/node_modules/lodash/rearg.js @@ -1,8 +1,8 @@ var baseFlatten = require('./_baseFlatten'), - createWrapper = require('./_createWrapper'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var REARG_FLAG = 256; /** @@ -27,8 +27,8 @@ var REARG_FLAG = 256; * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ -var rearg = rest(function(func, indexes) { - return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); +var rearg = baseRest(function(func, indexes) { + return createWrap(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); }); module.exports = rearg; diff --git a/tools/eslint/node_modules/lodash/reject.js b/tools/eslint/node_modules/lodash/reject.js index 4ed47b3837..a13e554740 100644 --- a/tools/eslint/node_modules/lodash/reject.js +++ b/tools/eslint/node_modules/lodash/reject.js @@ -1,7 +1,8 @@ var arrayFilter = require('./_arrayFilter'), baseFilter = require('./_baseFilter'), baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); + isArray = require('./isArray'), + negate = require('./negate'); /** * The opposite of `_.filter`; this method returns the elements of `collection` @@ -12,8 +13,7 @@ var arrayFilter = require('./_arrayFilter'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example @@ -40,10 +40,7 @@ var arrayFilter = require('./_arrayFilter'), */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = baseIteratee(predicate, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); + return func(collection, negate(baseIteratee(predicate, 3))); } module.exports = reject; diff --git a/tools/eslint/node_modules/lodash/remove.js b/tools/eslint/node_modules/lodash/remove.js index ef3d68187d..925d318990 100644 --- a/tools/eslint/node_modules/lodash/remove.js +++ b/tools/eslint/node_modules/lodash/remove.js @@ -14,7 +14,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 2.0.0 * @category Array * @param {Array} array The array to modify. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example diff --git a/tools/eslint/node_modules/lodash/rest.js b/tools/eslint/node_modules/lodash/rest.js index ddb7326947..ab2d145b5f 100644 --- a/tools/eslint/node_modules/lodash/rest.js +++ b/tools/eslint/node_modules/lodash/rest.js @@ -1,12 +1,9 @@ -var apply = require('./_apply'), +var baseRest = require('./_baseRest'), toInteger = require('./toInteger'); /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - /** * Creates a function that invokes `func` with the `this` binding of the * created function and arguments from `start` and beyond provided as @@ -36,29 +33,8 @@ function rest(func, start) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, array); - case 1: return func.call(this, args[0], array); - case 2: return func.call(this, args[0], args[1], array); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } module.exports = rest; diff --git a/tools/eslint/node_modules/lodash/some.js b/tools/eslint/node_modules/lodash/some.js index eeb7c18ad2..9c1d08cc84 100644 --- a/tools/eslint/node_modules/lodash/some.js +++ b/tools/eslint/node_modules/lodash/some.js @@ -14,8 +14,7 @@ var arraySome = require('./_arraySome'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. diff --git a/tools/eslint/node_modules/lodash/sortBy.js b/tools/eslint/node_modules/lodash/sortBy.js index c6d40bbb70..5fbee44c73 100644 --- a/tools/eslint/node_modules/lodash/sortBy.js +++ b/tools/eslint/node_modules/lodash/sortBy.js @@ -1,9 +1,7 @@ var baseFlatten = require('./_baseFlatten'), baseOrderBy = require('./_baseOrderBy'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - isIterateeCall = require('./_isIterateeCall'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); /** * Creates an array of elements, sorted in ascending order by the results of @@ -16,8 +14,8 @@ var baseFlatten = require('./_baseFlatten'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -39,7 +37,7 @@ var baseFlatten = require('./_baseFlatten'), * }); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ -var sortBy = rest(function(collection, iteratees) { +var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } @@ -49,11 +47,7 @@ var sortBy = rest(function(collection, iteratees) { } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? iteratees[0] - : baseFlatten(iteratees, 1, isFlattenableIteratee); - - return baseOrderBy(collection, iteratees, []); + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); module.exports = sortBy; diff --git a/tools/eslint/node_modules/lodash/sortedIndexBy.js b/tools/eslint/node_modules/lodash/sortedIndexBy.js index 0326eb77fb..a1224e9845 100644 --- a/tools/eslint/node_modules/lodash/sortedIndexBy.js +++ b/tools/eslint/node_modules/lodash/sortedIndexBy.js @@ -12,7 +12,7 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. @@ -28,7 +28,7 @@ var baseIteratee = require('./_baseIteratee'), * // => 0 */ function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee)); + return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2)); } module.exports = sortedIndexBy; diff --git a/tools/eslint/node_modules/lodash/sortedLastIndexBy.js b/tools/eslint/node_modules/lodash/sortedLastIndexBy.js index f2ba954a31..94811fb0f1 100644 --- a/tools/eslint/node_modules/lodash/sortedLastIndexBy.js +++ b/tools/eslint/node_modules/lodash/sortedLastIndexBy.js @@ -12,7 +12,7 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. @@ -28,7 +28,7 @@ var baseIteratee = require('./_baseIteratee'), * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee), true); + return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true); } module.exports = sortedLastIndexBy; diff --git a/tools/eslint/node_modules/lodash/sortedUniqBy.js b/tools/eslint/node_modules/lodash/sortedUniqBy.js index 1cbdeafb47..4f05ebe91b 100644 --- a/tools/eslint/node_modules/lodash/sortedUniqBy.js +++ b/tools/eslint/node_modules/lodash/sortedUniqBy.js @@ -19,7 +19,7 @@ var baseIteratee = require('./_baseIteratee'), */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniq(array, baseIteratee(iteratee)) + ? baseSortedUniq(array, baseIteratee(iteratee, 2)) : []; } diff --git a/tools/eslint/node_modules/lodash/spread.js b/tools/eslint/node_modules/lodash/spread.js index 9d32bb96ed..c537dfa9bc 100644 --- a/tools/eslint/node_modules/lodash/spread.js +++ b/tools/eslint/node_modules/lodash/spread.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), arrayPush = require('./_arrayPush'), + baseRest = require('./_baseRest'), castSlice = require('./_castSlice'), - rest = require('./rest'), toInteger = require('./toInteger'); /** Used as the `TypeError` message for "Functions" methods. */ @@ -49,7 +49,7 @@ function spread(func, start) { throw new TypeError(FUNC_ERROR_TEXT); } start = start === undefined ? 0 : nativeMax(toInteger(start), 0); - return rest(function(args) { + return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); diff --git a/tools/eslint/node_modules/lodash/startsWith.js b/tools/eslint/node_modules/lodash/startsWith.js index 888185524b..04509f05dc 100644 --- a/tools/eslint/node_modules/lodash/startsWith.js +++ b/tools/eslint/node_modules/lodash/startsWith.js @@ -29,7 +29,8 @@ var baseClamp = require('./_baseClamp'), function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(baseToString(target), position) == position; + target = baseToString(target); + return string.slice(position, position + target.length) == target; } module.exports = startsWith; diff --git a/tools/eslint/node_modules/lodash/stubArray.js b/tools/eslint/node_modules/lodash/stubArray.js index 16cbf99567..f460c15e32 100644 --- a/tools/eslint/node_modules/lodash/stubArray.js +++ b/tools/eslint/node_modules/lodash/stubArray.js @@ -1,5 +1,5 @@ /** - * A method that returns a new empty array. + * This method returns a new empty array. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/stubFalse.js b/tools/eslint/node_modules/lodash/stubFalse.js index 4498027b31..9b346fce50 100644 --- a/tools/eslint/node_modules/lodash/stubFalse.js +++ b/tools/eslint/node_modules/lodash/stubFalse.js @@ -1,5 +1,5 @@ /** - * A method that returns `false`. + * This method returns `false`. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/stubObject.js b/tools/eslint/node_modules/lodash/stubObject.js index 9da12c209b..1d190a1d06 100644 --- a/tools/eslint/node_modules/lodash/stubObject.js +++ b/tools/eslint/node_modules/lodash/stubObject.js @@ -1,5 +1,5 @@ /** - * A method that returns a new empty object. + * This method returns a new empty object. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/stubString.js b/tools/eslint/node_modules/lodash/stubString.js index 2f14bcf5c9..2db0bed073 100644 --- a/tools/eslint/node_modules/lodash/stubString.js +++ b/tools/eslint/node_modules/lodash/stubString.js @@ -1,5 +1,5 @@ /** - * A method that returns an empty string. + * This method returns an empty string. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/stubTrue.js b/tools/eslint/node_modules/lodash/stubTrue.js index c166806e16..af3cc9edc7 100644 --- a/tools/eslint/node_modules/lodash/stubTrue.js +++ b/tools/eslint/node_modules/lodash/stubTrue.js @@ -1,5 +1,5 @@ /** - * A method that returns `true`. + * This method returns `true`. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/subtract.js b/tools/eslint/node_modules/lodash/subtract.js index bd4086a008..67207785d9 100644 --- a/tools/eslint/node_modules/lodash/subtract.js +++ b/tools/eslint/node_modules/lodash/subtract.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; -}); +}, 0); module.exports = subtract; diff --git a/tools/eslint/node_modules/lodash/sumBy.js b/tools/eslint/node_modules/lodash/sumBy.js index ce73c84490..00e36d00ed 100644 --- a/tools/eslint/node_modules/lodash/sumBy.js +++ b/tools/eslint/node_modules/lodash/sumBy.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * @@ -27,7 +26,7 @@ var baseIteratee = require('./_baseIteratee'), */ function sumBy(array, iteratee) { return (array && array.length) - ? baseSum(array, baseIteratee(iteratee)) + ? baseSum(array, baseIteratee(iteratee, 2)) : 0; } diff --git a/tools/eslint/node_modules/lodash/takeRightWhile.js b/tools/eslint/node_modules/lodash/takeRightWhile.js index 1d49750618..2a80871561 100644 --- a/tools/eslint/node_modules/lodash/takeRightWhile.js +++ b/tools/eslint/node_modules/lodash/takeRightWhile.js @@ -11,7 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example diff --git a/tools/eslint/node_modules/lodash/takeWhile.js b/tools/eslint/node_modules/lodash/takeWhile.js index 1283755923..f881d930fa 100644 --- a/tools/eslint/node_modules/lodash/takeWhile.js +++ b/tools/eslint/node_modules/lodash/takeWhile.js @@ -11,7 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] + * @param {Function} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example diff --git a/tools/eslint/node_modules/lodash/throttle.js b/tools/eslint/node_modules/lodash/throttle.js index d201885967..b2603c65d4 100644 --- a/tools/eslint/node_modules/lodash/throttle.js +++ b/tools/eslint/node_modules/lodash/throttle.js @@ -8,8 +8,8 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide an options object to indicate whether - * `func` should be invoked on the leading and/or trailing edge of the `wait` + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. @@ -18,6 +18,9 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * diff --git a/tools/eslint/node_modules/lodash/toArray.js b/tools/eslint/node_modules/lodash/toArray.js index 6675806bb4..8a1102d24e 100644 --- a/tools/eslint/node_modules/lodash/toArray.js +++ b/tools/eslint/node_modules/lodash/toArray.js @@ -14,7 +14,7 @@ var mapTag = '[object Map]', setTag = '[object Set]'; /** Built-in value references. */ -var iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined; +var iteratorSymbol = Symbol ? Symbol.iterator : undefined; /** * Converts `value` to an array. diff --git a/tools/eslint/node_modules/lodash/union.js b/tools/eslint/node_modules/lodash/union.js index 80e64b5eb5..d448d8be20 100644 --- a/tools/eslint/node_modules/lodash/union.js +++ b/tools/eslint/node_modules/lodash/union.js @@ -1,7 +1,7 @@ var baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array of unique values, in order, from all given arrays using @@ -19,7 +19,7 @@ var baseFlatten = require('./_baseFlatten'), * _.union([2], [1, 2]); * // => [2, 1] */ -var union = rest(function(arrays) { +var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); diff --git a/tools/eslint/node_modules/lodash/unionBy.js b/tools/eslint/node_modules/lodash/unionBy.js index 6d6fe2b03d..e082f62595 100644 --- a/tools/eslint/node_modules/lodash/unionBy.js +++ b/tools/eslint/node_modules/lodash/unionBy.js @@ -1,14 +1,15 @@ var baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. The iteratee is invoked with one argument: + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: * (value). * * @static @@ -16,7 +17,7 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns the new array of combined values. * @example @@ -28,12 +29,12 @@ var baseFlatten = require('./_baseFlatten'), * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ -var unionBy = rest(function(arrays) { +var unionBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)); }); module.exports = unionBy; diff --git a/tools/eslint/node_modules/lodash/unionWith.js b/tools/eslint/node_modules/lodash/unionWith.js index dad71f9f37..46348b9b6b 100644 --- a/tools/eslint/node_modules/lodash/unionWith.js +++ b/tools/eslint/node_modules/lodash/unionWith.js @@ -1,12 +1,13 @@ var baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static @@ -24,7 +25,7 @@ var baseFlatten = require('./_baseFlatten'), * _.unionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ -var unionWith = rest(function(arrays) { +var unionWith = baseRest(function(arrays) { var comparator = last(arrays); if (isArrayLikeObject(comparator)) { comparator = undefined; diff --git a/tools/eslint/node_modules/lodash/uniqBy.js b/tools/eslint/node_modules/lodash/uniqBy.js index 91cf9e0632..d67d4f161c 100644 --- a/tools/eslint/node_modules/lodash/uniqBy.js +++ b/tools/eslint/node_modules/lodash/uniqBy.js @@ -11,7 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example @@ -25,7 +25,7 @@ var baseIteratee = require('./_baseIteratee'), */ function uniqBy(array, iteratee) { return (array && array.length) - ? baseUniq(array, baseIteratee(iteratee)) + ? baseUniq(array, baseIteratee(iteratee, 2)) : []; } diff --git a/tools/eslint/node_modules/lodash/unzip.js b/tools/eslint/node_modules/lodash/unzip.js index 7990d26e85..fce0ec78d1 100644 --- a/tools/eslint/node_modules/lodash/unzip.js +++ b/tools/eslint/node_modules/lodash/unzip.js @@ -20,11 +20,11 @@ var nativeMax = Math.max; * @returns {Array} Returns the new array of regrouped elements. * @example * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] * * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] + * // => [['a', 'b'], [1, 2], [true, false]] */ function unzip(array) { if (!(array && array.length)) { diff --git a/tools/eslint/node_modules/lodash/util.js b/tools/eslint/node_modules/lodash/util.js index 156972273b..d244dc27ef 100644 --- a/tools/eslint/node_modules/lodash/util.js +++ b/tools/eslint/node_modules/lodash/util.js @@ -4,6 +4,7 @@ module.exports = { 'cond': require('./cond'), 'conforms': require('./conforms'), 'constant': require('./constant'), + 'defaultTo': require('./defaultTo'), 'flow': require('./flow'), 'flowRight': require('./flowRight'), 'identity': require('./identity'), diff --git a/tools/eslint/node_modules/lodash/without.js b/tools/eslint/node_modules/lodash/without.js index 6198490a3b..13cc11fc0f 100644 --- a/tools/eslint/node_modules/lodash/without.js +++ b/tools/eslint/node_modules/lodash/without.js @@ -1,12 +1,14 @@ var baseDifference = require('./_baseDifference'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array excluding all given values using * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * for equality comparisons. * + * **Note:** Unlike `_.pull`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 @@ -20,7 +22,7 @@ var baseDifference = require('./_baseDifference'), * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ -var without = rest(function(array, values) { +var without = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, values) : []; diff --git a/tools/eslint/node_modules/lodash/wrap.js b/tools/eslint/node_modules/lodash/wrap.js index 9a4542de31..205d7f46eb 100644 --- a/tools/eslint/node_modules/lodash/wrap.js +++ b/tools/eslint/node_modules/lodash/wrap.js @@ -2,10 +2,10 @@ var identity = require('./identity'), partial = require('./partial'); /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/wrapperAt.js b/tools/eslint/node_modules/lodash/wrapperAt.js index 4a3eacc35c..8298511258 100644 --- a/tools/eslint/node_modules/lodash/wrapperAt.js +++ b/tools/eslint/node_modules/lodash/wrapperAt.js @@ -2,8 +2,8 @@ var LazyWrapper = require('./_LazyWrapper'), LodashWrapper = require('./_LodashWrapper'), baseAt = require('./_baseAt'), baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), isIndex = require('./_isIndex'), - rest = require('./rest'), thru = require('./thru'); /** @@ -22,7 +22,7 @@ var LazyWrapper = require('./_LazyWrapper'), * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] */ -var wrapperAt = rest(function(paths) { +var wrapperAt = baseRest(function(paths) { paths = baseFlatten(paths, 1); var length = paths.length, start = length ? paths[0] : 0, diff --git a/tools/eslint/node_modules/lodash/wrapperLodash.js b/tools/eslint/node_modules/lodash/wrapperLodash.js index ef84f25192..bf27a3cbee 100644 --- a/tools/eslint/node_modules/lodash/wrapperLodash.js +++ b/tools/eslint/node_modules/lodash/wrapperLodash.js @@ -77,16 +77,16 @@ var hasOwnProperty = objectProto.hasOwnProperty; * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, - * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, - * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, - * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, diff --git a/tools/eslint/node_modules/lodash/xor.js b/tools/eslint/node_modules/lodash/xor.js index ad63b6254c..d4d286045f 100644 --- a/tools/eslint/node_modules/lodash/xor.js +++ b/tools/eslint/node_modules/lodash/xor.js @@ -1,7 +1,7 @@ var arrayFilter = require('./_arrayFilter'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array of unique values that is the @@ -21,7 +21,7 @@ var arrayFilter = require('./_arrayFilter'), * _.xor([2, 1], [2, 3]); * // => [1, 3] */ -var xor = rest(function(arrays) { +var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); diff --git a/tools/eslint/node_modules/lodash/xorBy.js b/tools/eslint/node_modules/lodash/xorBy.js index 924f82d2cf..00b03108bb 100644 --- a/tools/eslint/node_modules/lodash/xorBy.js +++ b/tools/eslint/node_modules/lodash/xorBy.js @@ -1,9 +1,9 @@ var arrayFilter = require('./_arrayFilter'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.xor` except that it accepts `iteratee` which is @@ -16,7 +16,7 @@ var arrayFilter = require('./_arrayFilter'), * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] + * @param {Function} [iteratee=_.identity] * The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example @@ -28,12 +28,12 @@ var arrayFilter = require('./_arrayFilter'), * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ -var xorBy = rest(function(arrays) { +var xorBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee)); + return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2)); }); module.exports = xorBy; diff --git a/tools/eslint/node_modules/lodash/xorWith.js b/tools/eslint/node_modules/lodash/xorWith.js index d03a4a303a..4bd9071d9f 100644 --- a/tools/eslint/node_modules/lodash/xorWith.js +++ b/tools/eslint/node_modules/lodash/xorWith.js @@ -1,8 +1,8 @@ var arrayFilter = require('./_arrayFilter'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.xor` except that it accepts `comparator` which is @@ -24,7 +24,7 @@ var arrayFilter = require('./_arrayFilter'), * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ -var xorWith = rest(function(arrays) { +var xorWith = baseRest(function(arrays) { var comparator = last(arrays); if (isArrayLikeObject(comparator)) { comparator = undefined; diff --git a/tools/eslint/node_modules/lodash/zip.js b/tools/eslint/node_modules/lodash/zip.js index e1cbbbbc51..c800ab3d10 100644 --- a/tools/eslint/node_modules/lodash/zip.js +++ b/tools/eslint/node_modules/lodash/zip.js @@ -1,4 +1,4 @@ -var rest = require('./rest'), +var baseRest = require('./_baseRest'), unzip = require('./unzip'); /** @@ -14,9 +14,9 @@ var rest = require('./rest'), * @returns {Array} Returns the new array of grouped elements. * @example * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ -var zip = rest(unzip); +var zip = baseRest(unzip); module.exports = zip; diff --git a/tools/eslint/node_modules/lodash/zipWith.js b/tools/eslint/node_modules/lodash/zipWith.js index d01b6388c5..18945ebc0c 100644 --- a/tools/eslint/node_modules/lodash/zipWith.js +++ b/tools/eslint/node_modules/lodash/zipWith.js @@ -1,4 +1,4 @@ -var rest = require('./rest'), +var baseRest = require('./_baseRest'), unzipWith = require('./unzipWith'); /** @@ -20,7 +20,7 @@ var rest = require('./rest'), * }); * // => [111, 222] */ -var zipWith = rest(function(arrays) { +var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined; diff --git a/tools/eslint/node_modules/minimatch/package.json b/tools/eslint/node_modules/minimatch/package.json index 76d39d5fe4..dc28942686 100644 --- a/tools/eslint/node_modules/minimatch/package.json +++ b/tools/eslint/node_modules/minimatch/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "minimatch@^3.0.2", + { + "raw": "minimatch@^3.0.2", + "scope": null, + "escapedName": "minimatch", + "name": "minimatch", + "rawSpec": "^3.0.2", + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/glob" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "3.9.1", "_phantomChildren": {}, "_requested": { - "name": "minimatch", "raw": "minimatch@^3.0.2", - "rawSpec": "^3.0.2", "scope": null, + "escapedName": "minimatch", + "name": "minimatch", + "rawSpec": "^3.0.2", "spec": ">=3.0.2 <4.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "minimatch@^3.0.2", "_where": "/Users/trott/io.js/tools/node_modules/glob", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me" }, "bugs": { @@ -70,8 +79,8 @@ "main": "minimatch.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "minimatch", diff --git a/tools/eslint/node_modules/minimist/package.json b/tools/eslint/node_modules/minimist/package.json index e5c12e88ac..be31b7b201 100644 --- a/tools/eslint/node_modules/minimist/package.json +++ b/tools/eslint/node_modules/minimist/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "minimist@0.0.8", + { + "raw": "minimist@0.0.8", + "scope": null, + "escapedName": "minimist", + "name": "minimist", + "rawSpec": "0.0.8", + "spec": "0.0.8", + "type": "version" + }, "/Users/trott/io.js/tools/node_modules/mkdirp" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/minimist", "_npmUser": { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" }, "_npmVersion": "1.4.3", "_phantomChildren": {}, "_requested": { - "name": "minimist", "raw": "minimist@0.0.8", - "rawSpec": "0.0.8", "scope": null, + "escapedName": "minimist", + "name": "minimist", + "rawSpec": "0.0.8", "spec": "0.0.8", "type": "version" }, @@ -33,8 +42,8 @@ "_spec": "minimist@0.0.8", "_where": "/Users/trott/io.js/tools/node_modules/mkdirp", "author": { - "email": "mail@substack.net", "name": "James Halliday", + "email": "mail@substack.net", "url": "http://substack.net" }, "bugs": { @@ -62,8 +71,8 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "minimist", @@ -77,6 +86,7 @@ "test": "tap test/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/6..latest", "ff/5", @@ -86,8 +96,7 @@ "safari/5.1", "safari/latest", "opera/12" - ], - "files": "test/*.js" + ] }, "version": "0.0.8" } diff --git a/tools/eslint/node_modules/mkdirp/package.json b/tools/eslint/node_modules/mkdirp/package.json index b30b978d47..fff25c84c5 100644 --- a/tools/eslint/node_modules/mkdirp/package.json +++ b/tools/eslint/node_modules/mkdirp/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "mkdirp@^0.5.0", + { + "raw": "mkdirp@^0.5.0", + "scope": null, + "escapedName": "mkdirp", + "name": "mkdirp", + "rawSpec": "^0.5.0", + "spec": ">=0.5.0 <0.6.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/mkdirp", "_nodeVersion": "2.0.0", "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" + "name": "substack", + "email": "substack@gmail.com" }, "_npmVersion": "2.9.0", "_phantomChildren": {}, "_requested": { - "name": "mkdirp", "raw": "mkdirp@^0.5.0", - "rawSpec": "^0.5.0", "scope": null, + "escapedName": "mkdirp", + "name": "mkdirp", + "rawSpec": "^0.5.0", "spec": ">=0.5.0 <0.6.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "mkdirp@^0.5.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "mail@substack.net", "name": "James Halliday", + "email": "mail@substack.net", "url": "http://substack.net" }, "bin": { @@ -68,8 +77,8 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "mkdirp", diff --git a/tools/eslint/node_modules/ms/package.json b/tools/eslint/node_modules/ms/package.json index 275f0b0ea8..13489e477f 100644 --- a/tools/eslint/node_modules/ms/package.json +++ b/tools/eslint/node_modules/ms/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "ms@0.7.1", + { + "raw": "ms@0.7.1", + "scope": null, + "escapedName": "ms", + "name": "ms", + "rawSpec": "0.7.1", + "spec": "0.7.1", + "type": "version" + }, "/Users/trott/io.js/tools/node_modules/debug" ] ], @@ -12,16 +20,17 @@ "_location": "/ms", "_nodeVersion": "0.12.2", "_npmUser": { - "email": "rauchg@gmail.com", - "name": "rauchg" + "name": "rauchg", + "email": "rauchg@gmail.com" }, "_npmVersion": "2.7.5", "_phantomChildren": {}, "_requested": { - "name": "ms", "raw": "ms@0.7.1", - "rawSpec": "0.7.1", "scope": null, + "escapedName": "ms", + "name": "ms", + "rawSpec": "0.7.1", "spec": "0.7.1", "type": "version" }, @@ -58,8 +67,8 @@ "main": "./index", "maintainers": [ { - "email": "rauchg@gmail.com", - "name": "rauchg" + "name": "rauchg", + "email": "rauchg@gmail.com" } ], "name": "ms", diff --git a/tools/eslint/node_modules/mute-stream/package.json b/tools/eslint/node_modules/mute-stream/package.json index 734ae4af44..6d1659b894 100644 --- a/tools/eslint/node_modules/mute-stream/package.json +++ b/tools/eslint/node_modules/mute-stream/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "mute-stream@0.0.5", + { + "raw": "mute-stream@0.0.5", + "scope": null, + "escapedName": "mute-stream", + "name": "mute-stream", + "rawSpec": "0.0.5", + "spec": "0.0.5", + "type": "version" + }, "/Users/trott/io.js/tools/node_modules/readline2" ] ], @@ -12,16 +20,17 @@ "_location": "/mute-stream", "_nodeVersion": "2.0.1", "_npmUser": { - "email": "isaacs@npmjs.com", - "name": "isaacs" + "name": "isaacs", + "email": "isaacs@npmjs.com" }, "_npmVersion": "2.10.0", "_phantomChildren": {}, "_requested": { - "name": "mute-stream", "raw": "mute-stream@0.0.5", - "rawSpec": "0.0.5", "scope": null, + "escapedName": "mute-stream", + "name": "mute-stream", + "rawSpec": "0.0.5", "spec": "0.0.5", "type": "version" }, @@ -34,8 +43,8 @@ "_spec": "mute-stream@0.0.5", "_where": "/Users/trott/io.js/tools/node_modules/readline2", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -51,7 +60,7 @@ }, "dist": { "shasum": "8fbfabb0a98a253d3184331f9e8deb7372fac6c0", - "tarball": "http://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz" + "tarball": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz" }, "gitHead": "17d9854a315f56088d039534f87b740e470a9af0", "homepage": "https://github.com/isaacs/mute-stream#readme", @@ -64,8 +73,8 @@ "main": "mute.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "mute-stream", diff --git a/tools/eslint/node_modules/number-is-nan/package.json b/tools/eslint/node_modules/number-is-nan/package.json index bcbbc5b194..71c495cbdb 100644 --- a/tools/eslint/node_modules/number-is-nan/package.json +++ b/tools/eslint/node_modules/number-is-nan/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "number-is-nan@^1.0.0", + { + "raw": "number-is-nan@^1.0.0", + "scope": null, + "escapedName": "number-is-nan", + "name": "number-is-nan", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/code-point-at" ] ], @@ -12,16 +20,17 @@ "_location": "/number-is-nan", "_nodeVersion": "0.12.3", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.10.0", "_phantomChildren": {}, "_requested": { - "name": "number-is-nan", "raw": "number-is-nan@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "number-is-nan", + "name": "number-is-nan", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "number-is-nan@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/code-point-at", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -76,8 +85,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "number-is-nan", diff --git a/tools/eslint/node_modules/object-assign/package.json b/tools/eslint/node_modules/object-assign/package.json index dad4869848..7cf9a6b3fa 100644 --- a/tools/eslint/node_modules/object-assign/package.json +++ b/tools/eslint/node_modules/object-assign/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "object-assign@^4.0.1", + { + "raw": "object-assign@^4.0.1", + "scope": null, + "escapedName": "object-assign", + "name": "object-assign", + "rawSpec": "^4.0.1", + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/esrecurse" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/object-assign-4.1.0.tgz_1462212593641_0.3332549517508596" }, "_npmUser": { - "email": "ben@benalpert.com", - "name": "spicyj" + "name": "spicyj", + "email": "ben@benalpert.com" }, "_npmVersion": "2.14.19", "_phantomChildren": {}, "_requested": { - "name": "object-assign", "raw": "object-assign@^4.0.1", - "rawSpec": "^4.0.1", "scope": null, + "escapedName": "object-assign", + "name": "object-assign", + "rawSpec": "^4.0.1", "spec": ">=4.0.1 <5.0.0", "type": "range" }, @@ -42,8 +51,8 @@ "_spec": "object-assign@^4.0.1", "_where": "/Users/trott/io.js/tools/node_modules/esrecurse", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -87,12 +96,12 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "ben@benalpert.com", - "name": "spicyj" + "name": "spicyj", + "email": "ben@benalpert.com" } ], "name": "object-assign", diff --git a/tools/eslint/node_modules/once/package.json b/tools/eslint/node_modules/once/package.json index 2a748a3c74..eaf822d525 100644 --- a/tools/eslint/node_modules/once/package.json +++ b/tools/eslint/node_modules/once/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "once@^1.3.0", + { + "raw": "once@^1.3.0", + "scope": null, + "escapedName": "once", + "name": "once", + "rawSpec": "^1.3.0", + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/glob" ] ], @@ -12,16 +20,17 @@ "_location": "/once", "_nodeVersion": "4.0.0", "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "3.3.2", "_phantomChildren": {}, "_requested": { - "name": "once", "raw": "once@^1.3.0", - "rawSpec": "^1.3.0", "scope": null, + "escapedName": "once", + "name": "once", + "rawSpec": "^1.3.0", "spec": ">=1.3.0 <2.0.0", "type": "range" }, @@ -36,8 +45,8 @@ "_spec": "once@^1.3.0", "_where": "/Users/trott/io.js/tools/node_modules/glob", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -72,8 +81,8 @@ "main": "once.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "once", diff --git a/tools/eslint/node_modules/onetime/package.json b/tools/eslint/node_modules/onetime/package.json index 7e33ccac94..ce4cf2019b 100644 --- a/tools/eslint/node_modules/onetime/package.json +++ b/tools/eslint/node_modules/onetime/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "onetime@^1.0.0", + { + "raw": "onetime@^1.0.0", + "scope": null, + "escapedName": "onetime", + "name": "onetime", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/restore-cursor" ] ], @@ -12,16 +20,17 @@ "_location": "/onetime", "_nodeVersion": "4.2.1", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.14.7", "_phantomChildren": {}, "_requested": { - "name": "onetime", "raw": "onetime@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "onetime", + "name": "onetime", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "onetime@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/restore-cursor", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -71,8 +80,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "onetime", diff --git a/tools/eslint/node_modules/optionator/package.json b/tools/eslint/node_modules/optionator/package.json index cfe560a238..a92beb3e61 100644 --- a/tools/eslint/node_modules/optionator/package.json +++ b/tools/eslint/node_modules/optionator/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "optionator@^0.8.1", + { + "raw": "optionator@^0.8.1", + "scope": null, + "escapedName": "optionator", + "name": "optionator", + "rawSpec": "^0.8.1", + "spec": ">=0.8.1 <0.9.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/optionator", "_nodeVersion": "5.3.0", "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" }, "_npmVersion": "3.5.3", "_phantomChildren": {}, "_requested": { - "name": "optionator", "raw": "optionator@^0.8.1", - "rawSpec": "^0.8.1", "scope": null, + "escapedName": "optionator", + "name": "optionator", + "rawSpec": "^0.8.1", "spec": ">=0.8.1 <0.9.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "optionator@^0.8.1", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" + "name": "George Zahariev", + "email": "z@georgezahariev.com" }, "bugs": { "url": "https://github.com/gkz/optionator/issues" @@ -79,8 +88,8 @@ "main": "./lib/", "maintainers": [ { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" } ], "name": "optionator", diff --git a/tools/eslint/node_modules/os-homedir/package.json b/tools/eslint/node_modules/os-homedir/package.json index c52db9372e..6844c00d49 100644 --- a/tools/eslint/node_modules/os-homedir/package.json +++ b/tools/eslint/node_modules/os-homedir/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "os-homedir@^1.0.0", + { + "raw": "os-homedir@^1.0.0", + "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/user-home" ] ], @@ -12,16 +20,17 @@ "_location": "/os-homedir", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "os-homedir", "raw": "os-homedir@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "os-homedir@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/user-home", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -78,8 +87,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "os-homedir", diff --git a/tools/eslint/node_modules/path-is-absolute/package.json b/tools/eslint/node_modules/path-is-absolute/package.json index 3bb58dfd0f..c070f4eda1 100644 --- a/tools/eslint/node_modules/path-is-absolute/package.json +++ b/tools/eslint/node_modules/path-is-absolute/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "path-is-absolute@^1.0.0", + { + "raw": "path-is-absolute@^1.0.0", + "scope": null, + "escapedName": "path-is-absolute", + "name": "path-is-absolute", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/glob" ] ], @@ -12,16 +20,17 @@ "_location": "/path-is-absolute", "_nodeVersion": "0.12.0", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.5.1", "_phantomChildren": {}, "_requested": { - "name": "path-is-absolute", "raw": "path-is-absolute@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "path-is-absolute", + "name": "path-is-absolute", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "path-is-absolute@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/glob", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -47,7 +56,7 @@ "directories": {}, "dist": { "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" }, "engines": { "node": ">=0.10.0" @@ -79,8 +88,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "path-is-absolute", diff --git a/tools/eslint/node_modules/path-is-inside/package.json b/tools/eslint/node_modules/path-is-inside/package.json index fdfb35ab1b..749166b80d 100644 --- a/tools/eslint/node_modules/path-is-inside/package.json +++ b/tools/eslint/node_modules/path-is-inside/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "path-is-inside@^1.0.1", + { + "raw": "path-is-inside@^1.0.1", + "scope": null, + "escapedName": "path-is-inside", + "name": "path-is-inside", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/path-is-inside", "_npmUser": { - "email": "domenic@domenicdenicola.com", - "name": "domenic" + "name": "domenic", + "email": "domenic@domenicdenicola.com" }, "_npmVersion": "1.3.25", "_phantomChildren": {}, "_requested": { - "name": "path-is-inside", "raw": "path-is-inside@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "path-is-inside", + "name": "path-is-inside", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "path-is-inside@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "domenic@domenicdenicola.com", "name": "Domenic Denicola", + "email": "domenic@domenicdenicola.com", "url": "http://domenic.me" }, "bugs": { @@ -50,7 +59,7 @@ "directories": {}, "dist": { "shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89", - "tarball": "http://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" + "tarball": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" }, "homepage": "https://github.com/domenic/path-is-inside", "keywords": [ @@ -64,8 +73,8 @@ "main": "lib/path-is-inside.js", "maintainers": [ { - "email": "domenic@domenicdenicola.com", - "name": "domenic" + "name": "domenic", + "email": "domenic@domenicdenicola.com" } ], "name": "path-is-inside", diff --git a/tools/eslint/node_modules/pify/package.json b/tools/eslint/node_modules/pify/package.json index bf8e9afa9b..47012485fd 100644 --- a/tools/eslint/node_modules/pify/package.json +++ b/tools/eslint/node_modules/pify/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "pify@^2.0.0", + { + "raw": "pify@^2.0.0", + "scope": null, + "escapedName": "pify", + "name": "pify", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/del" ] ], @@ -12,16 +20,17 @@ "_location": "/pify", "_nodeVersion": "4.2.1", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.14.7", "_phantomChildren": {}, "_requested": { - "name": "pify", "raw": "pify@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "pify", + "name": "pify", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "pify@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/del", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -86,8 +95,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "pify", diff --git a/tools/eslint/node_modules/pinkie-promise/package.json b/tools/eslint/node_modules/pinkie-promise/package.json index 91770fb785..e3bcfe5457 100644 --- a/tools/eslint/node_modules/pinkie-promise/package.json +++ b/tools/eslint/node_modules/pinkie-promise/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "pinkie-promise@^2.0.0", + { + "raw": "pinkie-promise@^2.0.0", + "scope": null, + "escapedName": "pinkie-promise", + "name": "pinkie-promise", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/del" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/pinkie-promise-2.0.1.tgz_1460309839126_0.3422858319245279" }, "_npmUser": { - "email": "floatdrop@gmail.com", - "name": "floatdrop" + "name": "floatdrop", + "email": "floatdrop@gmail.com" }, "_npmVersion": "2.14.20", "_phantomChildren": {}, "_requested": { - "name": "pinkie-promise", "raw": "pinkie-promise@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "pinkie-promise", + "name": "pinkie-promise", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -39,8 +48,8 @@ "_spec": "pinkie-promise@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/del", "author": { - "email": "floatdrop@gmail.com", "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", "url": "github.com/floatdrop" }, "bugs": { @@ -77,8 +86,8 @@ "license": "MIT", "maintainers": [ { - "email": "floatdrop@gmail.com", - "name": "floatdrop" + "name": "floatdrop", + "email": "floatdrop@gmail.com" } ], "name": "pinkie-promise", diff --git a/tools/eslint/node_modules/pinkie/package.json b/tools/eslint/node_modules/pinkie/package.json index a7a2a00b09..27b0b1b310 100644 --- a/tools/eslint/node_modules/pinkie/package.json +++ b/tools/eslint/node_modules/pinkie/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "pinkie@^2.0.0", + { + "raw": "pinkie@^2.0.0", + "scope": null, + "escapedName": "pinkie", + "name": "pinkie", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/pinkie-promise" ] ], @@ -12,16 +20,17 @@ "_location": "/pinkie", "_nodeVersion": "4.2.4", "_npmUser": { - "email": "floatdrop@gmail.com", - "name": "floatdrop" + "name": "floatdrop", + "email": "floatdrop@gmail.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { - "name": "pinkie", "raw": "pinkie@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "pinkie", + "name": "pinkie", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "pinkie@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/pinkie-promise", "author": { - "email": "floatdrop@gmail.com", "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", "url": "github.com/floatdrop" }, "bugs": { @@ -73,8 +82,8 @@ "license": "MIT", "maintainers": [ { - "email": "floatdrop@gmail.com", - "name": "floatdrop" + "name": "floatdrop", + "email": "floatdrop@gmail.com" } ], "name": "pinkie", diff --git a/tools/eslint/node_modules/pluralize/package.json b/tools/eslint/node_modules/pluralize/package.json index f4b7011095..24b5be2617 100644 --- a/tools/eslint/node_modules/pluralize/package.json +++ b/tools/eslint/node_modules/pluralize/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "pluralize@^1.2.1", + { + "raw": "pluralize@^1.2.1", + "scope": null, + "escapedName": "pluralize", + "name": "pluralize", + "rawSpec": "^1.2.1", + "spec": ">=1.2.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/pluralize", "_nodeVersion": "4.0.0", "_npmUser": { - "email": "hello@blakeembrey.com", - "name": "blakeembrey" + "name": "blakeembrey", + "email": "hello@blakeembrey.com" }, "_npmVersion": "2.14.2", "_phantomChildren": {}, "_requested": { - "name": "pluralize", "raw": "pluralize@^1.2.1", - "rawSpec": "^1.2.1", "scope": null, + "escapedName": "pluralize", + "name": "pluralize", + "rawSpec": "^1.2.1", "spec": ">=1.2.1 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "pluralize@^1.2.1", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "hello@blakeembrey.com", "name": "Blake Embrey", + "email": "hello@blakeembrey.com", "url": "http://blakeembrey.me" }, "bugs": { @@ -72,8 +81,8 @@ "main": "pluralize.js", "maintainers": [ { - "email": "me@blakeembrey.com", - "name": "blakeembrey" + "name": "blakeembrey", + "email": "me@blakeembrey.com" } ], "name": "pluralize", diff --git a/tools/eslint/node_modules/prelude-ls/package.json b/tools/eslint/node_modules/prelude-ls/package.json index ce984dbe72..6e7f9381e3 100644 --- a/tools/eslint/node_modules/prelude-ls/package.json +++ b/tools/eslint/node_modules/prelude-ls/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "prelude-ls@~1.1.2", + { + "raw": "prelude-ls@~1.1.2", + "scope": null, + "escapedName": "prelude-ls", + "name": "prelude-ls", + "rawSpec": "~1.1.2", + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/levn" ] ], @@ -12,16 +20,17 @@ "_location": "/prelude-ls", "_nodeVersion": "0.11.15", "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" }, "_npmVersion": "2.7.6", "_phantomChildren": {}, "_requested": { - "name": "prelude-ls", "raw": "prelude-ls@~1.1.2", - "rawSpec": "~1.1.2", "scope": null, + "escapedName": "prelude-ls", + "name": "prelude-ls", + "rawSpec": "~1.1.2", "spec": ">=1.1.2 <1.2.0", "type": "range" }, @@ -36,8 +45,8 @@ "_spec": "prelude-ls@~1.1.2", "_where": "/Users/trott/io.js/tools/node_modules/levn", "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" + "name": "George Zahariev", + "email": "z@georgezahariev.com" }, "bugs": { "url": "https://github.com/gkz/prelude-ls/issues" @@ -55,7 +64,7 @@ "directories": {}, "dist": { "shasum": "21932a549f5e52ffd9a827f570e04be62a97da54", - "tarball": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" + "tarball": "http://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" }, "engines": { "node": ">= 0.8.0" @@ -90,8 +99,8 @@ "main": "lib/", "maintainers": [ { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" } ], "name": "prelude-ls", diff --git a/tools/eslint/node_modules/process-nextick-args/package.json b/tools/eslint/node_modules/process-nextick-args/package.json index 2ab4a06665..5d6dcee589 100644 --- a/tools/eslint/node_modules/process-nextick-args/package.json +++ b/tools/eslint/node_modules/process-nextick-args/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "process-nextick-args@~1.0.6", + { + "raw": "process-nextick-args@~1.0.6", + "scope": null, + "escapedName": "process-nextick-args", + "name": "process-nextick-args", + "rawSpec": "~1.0.6", + "spec": ">=1.0.6 <1.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/readable-stream" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" }, "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" }, "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "name": "process-nextick-args", "raw": "process-nextick-args@~1.0.6", - "rawSpec": "~1.0.6", "scope": null, + "escapedName": "process-nextick-args", + "name": "process-nextick-args", + "rawSpec": "~1.0.6", "spec": ">=1.0.6 <1.1.0", "type": "range" }, @@ -57,8 +66,8 @@ "main": "index.js", "maintainers": [ { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" } ], "name": "process-nextick-args", diff --git a/tools/eslint/node_modules/progress/package.json b/tools/eslint/node_modules/progress/package.json index c8036599be..c7b1fb217a 100644 --- a/tools/eslint/node_modules/progress/package.json +++ b/tools/eslint/node_modules/progress/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "progress@^1.1.8", + { + "raw": "progress@^1.1.8", + "scope": null, + "escapedName": "progress", + "name": "progress", + "rawSpec": "^1.1.8", + "spec": ">=1.1.8 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/progress", "_npmUser": { - "email": "scalesjordan@gmail.com", - "name": "prezjordan" + "name": "prezjordan", + "email": "scalesjordan@gmail.com" }, "_npmVersion": "1.4.14", "_phantomChildren": {}, "_requested": { - "name": "progress", "raw": "progress@^1.1.8", - "rawSpec": "^1.1.8", "scope": null, + "escapedName": "progress", + "name": "progress", + "rawSpec": "^1.1.8", "spec": ">=1.1.8 <2.0.0", "type": "range" }, @@ -33,20 +42,20 @@ "_spec": "progress@^1.1.8", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "tj@vision-media.ca", - "name": "TJ Holowaychuk" + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" }, "bugs": { "url": "https://github.com/visionmedia/node-progress/issues" }, "contributors": [ { - "email": "christoffer.hallas@gmail.com", - "name": "Christoffer Hallas" + "name": "Christoffer Hallas", + "email": "christoffer.hallas@gmail.com" }, { - "email": "scalesjordan@gmail.com", - "name": "Jordan Scales" + "name": "Jordan Scales", + "email": "scalesjordan@gmail.com" } ], "dependencies": {}, @@ -69,16 +78,16 @@ "main": "index", "maintainers": [ { - "email": "tj@vision-media.ca", - "name": "tjholowaychuk" + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" }, { - "email": "christoffer.hallas@forsvikgroup.com", - "name": "hallas" + "name": "hallas", + "email": "christoffer.hallas@forsvikgroup.com" }, { - "email": "scalesjordan@gmail.com", - "name": "prezjordan" + "name": "prezjordan", + "email": "scalesjordan@gmail.com" } ], "name": "progress", diff --git a/tools/eslint/node_modules/read-json-sync/LICENSE b/tools/eslint/node_modules/read-json-sync/LICENSE deleted file mode 100755 index d9ef73fd74..0000000000 --- a/tools/eslint/node_modules/read-json-sync/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 - 2015 Shinnosuke Watanabe - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/eslint/node_modules/read-json-sync/README.md b/tools/eslint/node_modules/read-json-sync/README.md deleted file mode 100755 index 822c694d79..0000000000 --- a/tools/eslint/node_modules/read-json-sync/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# read-json-sync - -[![NPM version](https://img.shields.io/npm/v/read-json-sync.svg)](https://www.npmjs.com/package/read-json-sync) -[![Build Status](https://travis-ci.org/shinnn/read-json-sync.svg?branch=master)](https://travis-ci.org/shinnn/read-json-sync) -[![Build status](https://ci.appveyor.com/api/projects/status/t7sjgpku9on12d32?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/read-json-sync) -[![Coverage Status](https://img.shields.io/coveralls/shinnn/read-json-sync.svg)](https://david-dm.org/shinnn/read-json-sync) -[![Dependency Status](https://david-dm.org/shinnn/read-json-sync.svg)](https://david-dm.org/shinnn/read-json-sync) -[![devDependency Status](https://david-dm.org/shinnn/read-json-sync/dev-status.svg)](https://david-dm.org/shinnn/read-json-sync#info=devDependencies) - -A [Node](https://nodejs.org/) module to read and parse a [JSON](http://www.json.org/) file synchronously - -```javascript -const readJsonSync = require('read-json-sync'); - -readJsonSync('package.json'); //=> {name: 'read-json-sync', version: '1.0.0', ...} -``` - -Node's built-in [`require`](https://nodejs.org/api/globals.html#globals_require) can do almost the same thing, but this module doesn't [cache](https://nodejs.org/api/modules.html#modules_caching) results. - -## Installation - -[Use npm](https://docs.npmjs.com/cli/install). - -``` -npm install read-json-sync -``` - -## API - -```javascript -const readJsonSync = require('read-json-sync'); -``` - -### readJsonSync(*filePath* [, *options*]) - -*filePath*: `String` (path to a JSON file) -*options*: `Object` ([`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_filename_options_callback) options) -Return: `Object` (parsed [JSON](https://tools.ietf.org/html/rfc7159) data) - -## License - -Copyright (c) 2014 - 2015 [Shinnosuke Watanabe](https://github.com/shinnn) - -Licensed under [the MIT License](./LICENSE). diff --git a/tools/eslint/node_modules/read-json-sync/index.js b/tools/eslint/node_modules/read-json-sync/index.js deleted file mode 100755 index 0abc7a7d56..0000000000 --- a/tools/eslint/node_modules/read-json-sync/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * read-json-sync | MIT (c) Shinnosuke Watanabe - * https://github.com/shinnn/read-json-sync -*/ -'use strict'; - -var fs = require('graceful-fs'); - -module.exports = function readJsonSync(filePath, options) { - return JSON.parse(String(fs.readFileSync(filePath, options)).replace(/^\ufeff/g, '')); -}; diff --git a/tools/eslint/node_modules/read-json-sync/package.json b/tools/eslint/node_modules/read-json-sync/package.json deleted file mode 100644 index 520be60a53..0000000000 --- a/tools/eslint/node_modules/read-json-sync/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "read-json-sync@^1.1.0", - "/Users/trott/io.js/tools/node_modules/flat-cache" - ] - ], - "_from": "read-json-sync@>=1.1.0 <2.0.0", - "_id": "read-json-sync@1.1.1", - "_inCache": true, - "_installable": true, - "_location": "/read-json-sync", - "_nodeVersion": "5.1.0", - "_npmUser": { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "name": "read-json-sync", - "raw": "read-json-sync@^1.1.0", - "rawSpec": "^1.1.0", - "scope": null, - "spec": ">=1.1.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flat-cache" - ], - "_resolved": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz", - "_shasum": "43c669ae864aae308dfbbb2721a67e295ec8fff6", - "_shrinkwrap": null, - "_spec": "read-json-sync@^1.1.0", - "_where": "/Users/trott/io.js/tools/node_modules/flat-cache", - "author": { - "name": "Shinnosuke Watanabe", - "url": "https://github.com/shinnn" - }, - "bugs": { - "url": "https://github.com/shinnn/read-json-sync/issues" - }, - "dependencies": { - "graceful-fs": "^4.1.2" - }, - "description": "Read and parse a JSON file synchronously", - "devDependencies": { - "@shinnn/eslint-config-node-legacy": "^1.0.0", - "eslint": "^1.7.3", - "istanbul": "^0.4.0", - "tap-spec": "^4.1.0", - "tape": "^4.2.2" - }, - "directories": {}, - "dist": { - "shasum": "43c669ae864aae308dfbbb2721a67e295ec8fff6", - "tarball": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz" - }, - "files": [ - "index.js" - ], - "gitHead": "0999728ef395e327129fa5754c3f9d8d6040188b", - "homepage": "https://github.com/shinnn/read-json-sync#readme", - "keywords": [ - "data", - "json", - "file", - "read", - "load", - "parse", - "synchronous", - "synchronously", - "sync" - ], - "license": "MIT", - "maintainers": [ - { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" - } - ], - "name": "read-json-sync", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/shinnn/read-json-sync.git" - }, - "scripts": { - "coverage": "node --strong_mode node_modules/.bin/istanbul cover test/test.js", - "pretest": "eslint --config @shinnn/node-legacy index.js test/test.js", - "test": "node --strong_mode --throw-deprecation --track-heap-objects test/test.js | tap-spec" - }, - "version": "1.1.1" -} diff --git a/tools/eslint/node_modules/readable-stream/package.json b/tools/eslint/node_modules/readable-stream/package.json index 1bf4d021ae..5cad1a9445 100644 --- a/tools/eslint/node_modules/readable-stream/package.json +++ b/tools/eslint/node_modules/readable-stream/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "readable-stream@~2.0.0", + { + "raw": "readable-stream@~2.0.0", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "~2.0.0", + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/concat-stream" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/readable-stream-2.0.6.tgz_1457893507709_0.369257491780445" }, "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" }, "_npmVersion": "3.6.0", "_phantomChildren": {}, "_requested": { - "name": "readable-stream", "raw": "readable-stream@~2.0.0", - "rawSpec": "~2.0.0", "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "~2.0.0", "spec": ">=2.0.0 <2.1.0", "type": "range" }, @@ -73,20 +82,20 @@ "main": "readable.js", "maintainers": [ { - "email": "isaacs@npmjs.com", - "name": "isaacs" + "name": "isaacs", + "email": "isaacs@npmjs.com" }, { - "email": "nathan@tootallnate.net", - "name": "tootallnate" + "name": "tootallnate", + "email": "nathan@tootallnate.net" }, { - "email": "rod@vagg.org", - "name": "rvagg" + "name": "rvagg", + "email": "rod@vagg.org" }, { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" } ], "name": "readable-stream", diff --git a/tools/eslint/node_modules/readline2/package.json b/tools/eslint/node_modules/readline2/package.json index 86baba25ea..90bad8ede8 100644 --- a/tools/eslint/node_modules/readline2/package.json +++ b/tools/eslint/node_modules/readline2/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "readline2@^1.0.1", + { + "raw": "readline2@^1.0.1", + "scope": null, + "escapedName": "readline2", + "name": "readline2", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -12,16 +20,17 @@ "_location": "/readline2", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "admin@simonboudrias.com", - "name": "sboudrias" + "name": "sboudrias", + "email": "admin@simonboudrias.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "readline2", "raw": "readline2@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "readline2", + "name": "readline2", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "readline2@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "admin@simonboudrias.com", - "name": "Simon Boudrias" + "name": "Simon Boudrias", + "email": "admin@simonboudrias.com" }, "bugs": { "url": "https://github.com/sboudrias/readline2/issues" @@ -71,8 +80,8 @@ "license": "MIT", "maintainers": [ { - "email": "admin@simonboudrias.com", - "name": "sboudrias" + "name": "sboudrias", + "email": "admin@simonboudrias.com" } ], "name": "readline2", diff --git a/tools/eslint/node_modules/require-uncached/package.json b/tools/eslint/node_modules/require-uncached/package.json index 560f8c1875..626230a6ef 100644 --- a/tools/eslint/node_modules/require-uncached/package.json +++ b/tools/eslint/node_modules/require-uncached/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "require-uncached@^1.0.2", + { + "raw": "require-uncached@^1.0.2", + "scope": null, + "escapedName": "require-uncached", + "name": "require-uncached", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/require-uncached", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "1.4.9", "_phantomChildren": {}, "_requested": { - "name": "require-uncached", "raw": "require-uncached@^1.0.2", - "rawSpec": "^1.0.2", "scope": null, + "escapedName": "require-uncached", + "name": "require-uncached", + "rawSpec": "^1.0.2", "spec": ">=1.0.2 <2.0.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "require-uncached@^1.0.2", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -72,8 +81,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "require-uncached", diff --git a/tools/eslint/node_modules/resolve-from/package.json b/tools/eslint/node_modules/resolve-from/package.json index 6e3afa5c99..40f796f322 100644 --- a/tools/eslint/node_modules/resolve-from/package.json +++ b/tools/eslint/node_modules/resolve-from/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "resolve-from@^1.0.0", + { + "raw": "resolve-from@^1.0.0", + "scope": null, + "escapedName": "resolve-from", + "name": "resolve-from", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/require-uncached" ] ], @@ -12,16 +20,17 @@ "_location": "/resolve-from", "_nodeVersion": "4.1.1", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.14.4", "_phantomChildren": {}, "_requested": { - "name": "resolve-from", "raw": "resolve-from@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "escapedName": "resolve-from", + "name": "resolve-from", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "resolve-from@^1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/require-uncached", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -50,7 +59,7 @@ "directories": {}, "dist": { "shasum": "26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226", - "tarball": "http://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz" + "tarball": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz" }, "engines": { "node": ">=0.10.0" @@ -72,8 +81,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "resolve-from", diff --git a/tools/eslint/node_modules/restore-cursor/package.json b/tools/eslint/node_modules/restore-cursor/package.json index d44f05a6b0..d8e43f663c 100644 --- a/tools/eslint/node_modules/restore-cursor/package.json +++ b/tools/eslint/node_modules/restore-cursor/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "restore-cursor@^1.0.1", + { + "raw": "restore-cursor@^1.0.1", + "scope": null, + "escapedName": "restore-cursor", + "name": "restore-cursor", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/cli-cursor" ] ], @@ -12,16 +20,17 @@ "_location": "/restore-cursor", "_nodeVersion": "4.1.0", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.14.3", "_phantomChildren": {}, "_requested": { - "name": "restore-cursor", "raw": "restore-cursor@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "restore-cursor", + "name": "restore-cursor", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "restore-cursor@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/cli-cursor", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "bugs": { @@ -85,8 +94,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "restore-cursor", diff --git a/tools/eslint/node_modules/rimraf/package.json b/tools/eslint/node_modules/rimraf/package.json index 674bf879c8..4dda8cc137 100644 --- a/tools/eslint/node_modules/rimraf/package.json +++ b/tools/eslint/node_modules/rimraf/package.json @@ -1,45 +1,54 @@ { "_args": [ [ - "rimraf@^2.2.8", + { + "raw": "rimraf@^2.2.8", + "scope": null, + "escapedName": "rimraf", + "name": "rimraf", + "rawSpec": "^2.2.8", + "spec": ">=2.2.8 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/del" ] ], "_from": "rimraf@>=2.2.8 <3.0.0", - "_id": "rimraf@2.5.3", + "_id": "rimraf@2.5.4", "_inCache": true, "_installable": true, "_location": "/rimraf", "_nodeVersion": "4.4.4", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/rimraf-2.5.3.tgz_1467582915019_0.6380921453237534" + "tmp": "tmp/rimraf-2.5.4.tgz_1469206941888_0.8645927573088557" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, - "_npmVersion": "3.10.2", + "_npmVersion": "3.10.6", "_phantomChildren": {}, "_requested": { - "name": "rimraf", "raw": "rimraf@^2.2.8", - "rawSpec": "^2.2.8", "scope": null, + "escapedName": "rimraf", + "name": "rimraf", + "rawSpec": "^2.2.8", "spec": ">=2.2.8 <3.0.0", "type": "range" }, "_requiredBy": [ "/del" ], - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz", - "_shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705", + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "_shasum": "96800093cbf1a0c86bd95b4625467535c29dfa04", "_shrinkwrap": null, "_spec": "rimraf@^2.2.8", "_where": "/Users/trott/io.js/tools/node_modules/del", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bin": { @@ -58,8 +67,8 @@ }, "directories": {}, "dist": { - "shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705", - "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz" + "shasum": "96800093cbf1a0c86bd95b4625467535c29dfa04", + "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" }, "files": [ "LICENSE", @@ -67,14 +76,14 @@ "bin.js", "rimraf.js" ], - "gitHead": "7263a784e8f08d94dd6caf6ee934fceb525a6f3d", + "gitHead": "2af08bbbd0a03549b278414309dc5d8097699443", "homepage": "https://github.com/isaacs/rimraf#readme", "license": "ISC", "main": "rimraf.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "rimraf", @@ -87,5 +96,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "2.5.3" + "version": "2.5.4" } diff --git a/tools/eslint/node_modules/rimraf/rimraf.js b/tools/eslint/node_modules/rimraf/rimraf.js index db518a9d6c..5d9a5768a4 100644 --- a/tools/eslint/node_modules/rimraf/rimraf.js +++ b/tools/eslint/node_modules/rimraf/rimraf.js @@ -48,9 +48,9 @@ function rimraf (p, options, cb) { assert(p, 'rimraf: missing path') assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') assert.equal(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.equal(typeof options, 'object', 'rimraf: options should be object') defaults(options) diff --git a/tools/eslint/node_modules/run-async/package.json b/tools/eslint/node_modules/run-async/package.json index 603fbb7614..18601a76aa 100644 --- a/tools/eslint/node_modules/run-async/package.json +++ b/tools/eslint/node_modules/run-async/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "run-async@^0.1.0", + { + "raw": "run-async@^0.1.0", + "scope": null, + "escapedName": "run-async", + "name": "run-async", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/run-async", "_npmUser": { - "email": "admin@simonboudrias.com", - "name": "sboudrias" + "name": "sboudrias", + "email": "admin@simonboudrias.com" }, "_npmVersion": "1.4.6", "_phantomChildren": {}, "_requested": { - "name": "run-async", "raw": "run-async@^0.1.0", - "rawSpec": "^0.1.0", "scope": null, + "escapedName": "run-async", + "name": "run-async", + "rawSpec": "^0.1.0", "spec": ">=0.1.0 <0.2.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "run-async@^0.1.0", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "admin@simonboudrias.com", - "name": "Simon Boudrias" + "name": "Simon Boudrias", + "email": "admin@simonboudrias.com" }, "bugs": { "url": "https://github.com/SBoudrias/run-async/issues" @@ -61,8 +70,8 @@ "main": "index.js", "maintainers": [ { - "email": "admin@simonboudrias.com", - "name": "sboudrias" + "name": "sboudrias", + "email": "admin@simonboudrias.com" } ], "name": "run-async", diff --git a/tools/eslint/node_modules/rx-lite/package.json b/tools/eslint/node_modules/rx-lite/package.json index f951249748..9f3391f00d 100644 --- a/tools/eslint/node_modules/rx-lite/package.json +++ b/tools/eslint/node_modules/rx-lite/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "rx-lite@^3.1.2", + { + "raw": "rx-lite@^3.1.2", + "scope": null, + "escapedName": "rx-lite", + "name": "rx-lite", + "rawSpec": "^3.1.2", + "spec": ">=3.1.2 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -12,16 +20,17 @@ "_location": "/rx-lite", "_nodeVersion": "0.12.7", "_npmUser": { - "email": "matthew.podwysocki@gmail.com", - "name": "mattpodwysocki" + "name": "mattpodwysocki", + "email": "matthew.podwysocki@gmail.com" }, "_npmVersion": "3.1.1", "_phantomChildren": {}, "_requested": { - "name": "rx-lite", "raw": "rx-lite@^3.1.2", - "rawSpec": "^3.1.2", "scope": null, + "escapedName": "rx-lite", + "name": "rx-lite", + "rawSpec": "^3.1.2", "spec": ">=3.1.2 <4.0.0", "type": "range" }, @@ -71,8 +80,8 @@ "main": "rx.lite.js", "maintainers": [ { - "email": "matthew.podwysocki@gmail.com", - "name": "mattpodwysocki" + "name": "mattpodwysocki", + "email": "matthew.podwysocki@gmail.com" } ], "name": "rx-lite", diff --git a/tools/eslint/node_modules/shelljs/package.json b/tools/eslint/node_modules/shelljs/package.json index f366ad9b3a..b3928ac932 100644 --- a/tools/eslint/node_modules/shelljs/package.json +++ b/tools/eslint/node_modules/shelljs/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "shelljs@^0.6.0", + { + "raw": "shelljs@^0.6.0", + "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.6.0", + "spec": ">=0.6.0 <0.7.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/shelljs-0.6.0.tgz_1454632811074_0.5800695188809186" }, "_npmUser": { - "email": "ari@ariporad.com", - "name": "ariporad" + "name": "ariporad", + "email": "ari@ariporad.com" }, "_npmVersion": "3.6.0", "_phantomChildren": {}, "_requested": { - "name": "shelljs", "raw": "shelljs@^0.6.0", - "rawSpec": "^0.6.0", "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.6.0", "spec": ">=0.6.0 <0.7.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "shelljs@^0.6.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "arturadib@gmail.com", - "name": "Artur Adib" + "name": "Artur Adib", + "email": "arturadib@gmail.com" }, "bin": { "shjs": "./bin/shjs" @@ -49,13 +58,13 @@ }, "contributors": [ { - "email": "ari@ariporad.com", "name": "Ari Porad", + "email": "ari@ariporad.com", "url": "http://ariporad.com/" }, { - "email": "ntfschr@gmail.com", - "name": "Nate Fischer" + "name": "Nate Fischer", + "email": "ntfschr@gmail.com" } ], "dependencies": {}, @@ -86,16 +95,16 @@ "main": "./shell.js", "maintainers": [ { - "email": "ari@ariporad.com", - "name": "ariporad" + "name": "ariporad", + "email": "ari@ariporad.com" }, { - "email": "arturadib@gmail.com", - "name": "artur" + "name": "artur", + "email": "arturadib@gmail.com" }, { - "email": "ntfschr@gmail.com", - "name": "nfischer" + "name": "nfischer", + "email": "ntfschr@gmail.com" } ], "name": "shelljs", diff --git a/tools/eslint/node_modules/slice-ansi/package.json b/tools/eslint/node_modules/slice-ansi/package.json index b71d24f677..289179ad5c 100644 --- a/tools/eslint/node_modules/slice-ansi/package.json +++ b/tools/eslint/node_modules/slice-ansi/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "slice-ansi@0.0.4", + { + "raw": "slice-ansi@0.0.4", + "scope": null, + "escapedName": "slice-ansi", + "name": "slice-ansi", + "rawSpec": "0.0.4", + "spec": "0.0.4", + "type": "version" + }, "/Users/trott/io.js/tools/node_modules/table" ] ], @@ -12,16 +20,17 @@ "_location": "/slice-ansi", "_nodeVersion": "3.2.0", "_npmUser": { - "email": "threedeecee@gmail.com", - "name": "dthree" + "name": "dthree", + "email": "threedeecee@gmail.com" }, "_npmVersion": "2.13.3", "_phantomChildren": {}, "_requested": { - "name": "slice-ansi", "raw": "slice-ansi@0.0.4", - "rawSpec": "0.0.4", "scope": null, + "escapedName": "slice-ansi", + "name": "slice-ansi", + "rawSpec": "0.0.4", "spec": "0.0.4", "type": "version" }, @@ -34,8 +43,8 @@ "_spec": "slice-ansi@0.0.4", "_where": "/Users/trott/io.js/tools/node_modules/table", "author": { - "email": "threedeecee@gmail.com", - "name": "David Caccavella" + "name": "David Caccavella", + "email": "threedeecee@gmail.com" }, "bugs": { "url": "https://github.com/chalk/slice-ansi/issues" @@ -87,8 +96,8 @@ "license": "MIT", "maintainers": [ { - "email": "threedeecee@gmail.com", - "name": "dthree" + "name": "dthree", + "email": "threedeecee@gmail.com" } ], "name": "slice-ansi", diff --git a/tools/eslint/node_modules/sprintf-js/package.json b/tools/eslint/node_modules/sprintf-js/package.json index a6bc0bf008..1c5329e0a7 100644 --- a/tools/eslint/node_modules/sprintf-js/package.json +++ b/tools/eslint/node_modules/sprintf-js/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "sprintf-js@~1.0.2", + { + "raw": "sprintf-js@~1.0.2", + "scope": null, + "escapedName": "sprintf-js", + "name": "sprintf-js", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/argparse" ] ], @@ -12,16 +20,17 @@ "_location": "/sprintf-js", "_nodeVersion": "0.12.4", "_npmUser": { - "email": "hello@alexei.ro", - "name": "alexei" + "name": "alexei", + "email": "hello@alexei.ro" }, "_npmVersion": "2.10.1", "_phantomChildren": {}, "_requested": { - "name": "sprintf-js", "raw": "sprintf-js@~1.0.2", - "rawSpec": "~1.0.2", "scope": null, + "escapedName": "sprintf-js", + "name": "sprintf-js", + "rawSpec": "~1.0.2", "spec": ">=1.0.2 <1.1.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "sprintf-js@~1.0.2", "_where": "/Users/trott/io.js/tools/node_modules/argparse", "author": { - "email": "hello@alexei.ro", "name": "Alexandru Marasteanu", + "email": "hello@alexei.ro", "url": "http://alexei.ro/" }, "bugs": { @@ -60,8 +69,8 @@ "main": "src/sprintf.js", "maintainers": [ { - "email": "hello@alexei.ro", - "name": "alexei" + "name": "alexei", + "email": "hello@alexei.ro" } ], "name": "sprintf-js", diff --git a/tools/eslint/node_modules/string-width/package.json b/tools/eslint/node_modules/string-width/package.json index 8753104901..9a200671bc 100644 --- a/tools/eslint/node_modules/string-width/package.json +++ b/tools/eslint/node_modules/string-width/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "string-width@^1.0.1", + { + "raw": "string-width@^1.0.1", + "scope": null, + "escapedName": "string-width", + "name": "string-width", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -12,16 +20,17 @@ "_location": "/string-width", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "string-width", "raw": "string-width@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "string-width", + "name": "string-width", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "string-width@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -54,7 +63,7 @@ "directories": {}, "dist": { "shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", - "tarball": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" + "tarball": "http://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" }, "engines": { "node": ">=0.10.0" @@ -93,8 +102,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "string-width", diff --git a/tools/eslint/node_modules/string_decoder/package.json b/tools/eslint/node_modules/string_decoder/package.json index d4396ba28e..f18fb7ccc9 100644 --- a/tools/eslint/node_modules/string_decoder/package.json +++ b/tools/eslint/node_modules/string_decoder/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "string_decoder@~0.10.x", + { + "raw": "string_decoder@~0.10.x", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~0.10.x", + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/readable-stream" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/string_decoder", "_npmUser": { - "email": "rod@vagg.org", - "name": "rvagg" + "name": "rvagg", + "email": "rod@vagg.org" }, "_npmVersion": "1.4.23", "_phantomChildren": {}, "_requested": { - "name": "string_decoder", "raw": "string_decoder@~0.10.x", - "rawSpec": "~0.10.x", "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~0.10.x", "spec": ">=0.10.0 <0.11.0", "type": "range" }, @@ -57,12 +66,12 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" }, { - "email": "rod@vagg.org", - "name": "rvagg" + "name": "rvagg", + "email": "rod@vagg.org" } ], "name": "string_decoder", diff --git a/tools/eslint/node_modules/strip-ansi/package.json b/tools/eslint/node_modules/strip-ansi/package.json index 2e20a491e7..7b078b892b 100644 --- a/tools/eslint/node_modules/strip-ansi/package.json +++ b/tools/eslint/node_modules/strip-ansi/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "strip-ansi@^3.0.0", + { + "raw": "strip-ansi@^3.0.0", + "scope": null, + "escapedName": "strip-ansi", + "name": "strip-ansi", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/chalk" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/strip-ansi-3.0.1.tgz_1456057278183_0.28958667791448534" }, "_npmUser": { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "name": "jbnicolai", + "email": "jappelman@xebia.com" }, "_npmVersion": "2.11.3", "_phantomChildren": {}, "_requested": { - "name": "strip-ansi", "raw": "strip-ansi@^3.0.0", - "rawSpec": "^3.0.0", "scope": null, + "escapedName": "strip-ansi", + "name": "strip-ansi", + "rawSpec": "^3.0.0", "spec": ">=3.0.0 <4.0.0", "type": "range" }, @@ -41,8 +50,8 @@ "_spec": "strip-ansi@^3.0.0", "_where": "/Users/trott/io.js/tools/node_modules/chalk", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -96,12 +105,12 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "name": "jbnicolai", + "email": "jappelman@xebia.com" } ], "name": "strip-ansi", diff --git a/tools/eslint/node_modules/strip-bom/package.json b/tools/eslint/node_modules/strip-bom/package.json index 070c96cf4c..7f4f681d31 100644 --- a/tools/eslint/node_modules/strip-bom/package.json +++ b/tools/eslint/node_modules/strip-bom/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "strip-bom@^3.0.0", + { + "raw": "strip-bom@^3.0.0", + "scope": null, + "escapedName": "strip-bom", + "name": "strip-bom", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/strip-bom-3.0.0.tgz_1462032162626_0.6434765527956188" }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.0", "_phantomChildren": {}, "_requested": { - "name": "strip-bom", "raw": "strip-bom@^3.0.0", - "rawSpec": "^3.0.0", "scope": null, + "escapedName": "strip-bom", + "name": "strip-bom", + "rawSpec": "^3.0.0", "spec": ">=3.0.0 <4.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "strip-bom@^3.0.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -82,8 +91,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "strip-bom", diff --git a/tools/eslint/node_modules/strip-json-comments/package.json b/tools/eslint/node_modules/strip-json-comments/package.json index 7a01c73285..8cb657aa78 100644 --- a/tools/eslint/node_modules/strip-json-comments/package.json +++ b/tools/eslint/node_modules/strip-json-comments/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "strip-json-comments@~1.0.1", + { + "raw": "strip-json-comments@~1.0.1", + "scope": null, + "escapedName": "strip-json-comments", + "name": "strip-json-comments", + "rawSpec": "~1.0.1", + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/strip-json-comments", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "strip-json-comments", "raw": "strip-json-comments@~1.0.1", - "rawSpec": "~1.0.1", "scope": null, + "escapedName": "strip-json-comments", + "name": "strip-json-comments", + "rawSpec": "~1.0.1", "spec": ">=1.0.1 <1.1.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "strip-json-comments@~1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bin": { @@ -86,8 +95,8 @@ "main": "strip-json-comments", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "strip-json-comments", diff --git a/tools/eslint/node_modules/supports-color/package.json b/tools/eslint/node_modules/supports-color/package.json index beb619d1d3..8714cb5594 100644 --- a/tools/eslint/node_modules/supports-color/package.json +++ b/tools/eslint/node_modules/supports-color/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "supports-color@^2.0.0", + { + "raw": "supports-color@^2.0.0", + "scope": null, + "escapedName": "supports-color", + "name": "supports-color", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/chalk" ] ], @@ -12,16 +20,17 @@ "_location": "/supports-color", "_nodeVersion": "0.12.5", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { - "name": "supports-color", "raw": "supports-color@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "supports-color", + "name": "supports-color", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "supports-color@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/chalk", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -83,12 +92,12 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "name": "jbnicolai", + "email": "jappelman@xebia.com" } ], "name": "supports-color", diff --git a/tools/eslint/node_modules/table/package.json b/tools/eslint/node_modules/table/package.json index 1d8bca3d3f..cdb89c23fe 100644 --- a/tools/eslint/node_modules/table/package.json +++ b/tools/eslint/node_modules/table/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "table@^3.7.8", + { + "raw": "table@^3.7.8", + "scope": null, + "escapedName": "table", + "name": "table", + "rawSpec": "^3.7.8", + "spec": ">=3.7.8 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/table", "_nodeVersion": "5.3.0", "_npmUser": { - "email": "gajus@gajus.com", - "name": "gajus" + "name": "gajus", + "email": "gajus@gajus.com" }, "_npmVersion": "3.5.2", "_phantomChildren": {}, "_requested": { - "name": "table", "raw": "table@^3.7.8", - "rawSpec": "^3.7.8", "scope": null, + "escapedName": "table", + "name": "table", + "rawSpec": "^3.7.8", "spec": ">=3.7.8 <4.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "table@^3.7.8", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "gajus@gajus.com", "name": "Gajus Kuizinas", + "email": "gajus@gajus.com", "url": "http://gajus.com" }, "bugs": { @@ -77,8 +86,8 @@ "main": "./dist/index.js", "maintainers": [ { - "email": "gk@anuary.com", - "name": "gajus" + "name": "gajus", + "email": "gk@anuary.com" } ], "name": "table", diff --git a/tools/eslint/node_modules/text-table/package.json b/tools/eslint/node_modules/text-table/package.json index 05b25746ab..8495151d0d 100644 --- a/tools/eslint/node_modules/text-table/package.json +++ b/tools/eslint/node_modules/text-table/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "text-table@~0.2.0", + { + "raw": "text-table@~0.2.0", + "scope": null, + "escapedName": "text-table", + "name": "text-table", + "rawSpec": "~0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/text-table", "_npmUser": { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" }, "_npmVersion": "1.3.7", "_phantomChildren": {}, "_requested": { - "name": "text-table", "raw": "text-table@~0.2.0", - "rawSpec": "~0.2.0", "scope": null, + "escapedName": "text-table", + "name": "text-table", + "rawSpec": "~0.2.0", "spec": ">=0.2.0 <0.3.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "text-table@~0.2.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "mail@substack.net", "name": "James Halliday", + "email": "mail@substack.net", "url": "http://substack.net" }, "bugs": { @@ -65,8 +74,8 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "text-table", @@ -81,6 +90,7 @@ "test": "tap test/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/6..latest", "chrome/20..latest", @@ -89,8 +99,7 @@ "opera/11.0..latest", "iphone/6", "ipad/6" - ], - "files": "test/*.js" + ] }, "version": "0.2.0" } diff --git a/tools/eslint/node_modules/through/package.json b/tools/eslint/node_modules/through/package.json index b7446ea02b..bc1b1af6d4 100644 --- a/tools/eslint/node_modules/through/package.json +++ b/tools/eslint/node_modules/through/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "through@^2.3.6", + { + "raw": "through@^2.3.6", + "scope": null, + "escapedName": "through", + "name": "through", + "rawSpec": "^2.3.6", + "spec": ">=2.3.6 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inquirer" ] ], @@ -12,16 +20,17 @@ "_location": "/through", "_nodeVersion": "2.3.1", "_npmUser": { - "email": "dominic.tarr@gmail.com", - "name": "dominictarr" + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" }, "_npmVersion": "2.12.0", "_phantomChildren": {}, "_requested": { - "name": "through", "raw": "through@^2.3.6", - "rawSpec": "^2.3.6", "scope": null, + "escapedName": "through", + "name": "through", + "rawSpec": "^2.3.6", "spec": ">=2.3.6 <3.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "through@^2.3.6", "_where": "/Users/trott/io.js/tools/node_modules/inquirer", "author": { - "email": "dominic.tarr@gmail.com", "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", "url": "dominictarr.com" }, "bugs": { @@ -65,8 +74,8 @@ "main": "index.js", "maintainers": [ { - "email": "dominic.tarr@gmail.com", - "name": "dominictarr" + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" } ], "name": "through", diff --git a/tools/eslint/node_modules/tryit/package.json b/tools/eslint/node_modules/tryit/package.json index 56fd925cb5..a213cde54a 100644 --- a/tools/eslint/node_modules/tryit/package.json +++ b/tools/eslint/node_modules/tryit/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "tryit@^1.0.1", + { + "raw": "tryit@^1.0.1", + "scope": null, + "escapedName": "tryit", + "name": "tryit", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/is-resolvable" ] ], @@ -12,16 +20,17 @@ "_location": "/tryit", "_nodeVersion": "4.1.0", "_npmUser": { - "email": "henrik@joreteg.com", - "name": "henrikjoreteg" + "name": "henrikjoreteg", + "email": "henrik@joreteg.com" }, "_npmVersion": "3.3.8", "_phantomChildren": {}, "_requested": { - "name": "tryit", "raw": "tryit@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "tryit", + "name": "tryit", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "tryit@^1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/is-resolvable", "author": { - "email": "henrik@andyet.net", - "name": "Henrik Joreteg" + "name": "Henrik Joreteg", + "email": "henrik@andyet.net" }, "bugs": { "url": "https://github.com/HenrikJoreteg/tryit/issues" @@ -49,7 +58,7 @@ "directories": {}, "dist": { "shasum": "c196b0073e6b1c595d93c9c830855b7acc32a453", - "tarball": "http://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz" + "tarball": "https://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz" }, "gitHead": "b567b4feb491e2ee89addd3d06f66d6ec2217cf5", "homepage": "https://github.com/HenrikJoreteg/tryit#readme", @@ -62,8 +71,8 @@ "main": "tryit.js", "maintainers": [ { - "email": "henrik@andyet.net", - "name": "henrikjoreteg" + "name": "henrikjoreteg", + "email": "henrik@andyet.net" } ], "name": "tryit", diff --git a/tools/eslint/node_modules/tv4/package.json b/tools/eslint/node_modules/tv4/package.json index 587c38bb32..3ccb51c5f1 100644 --- a/tools/eslint/node_modules/tv4/package.json +++ b/tools/eslint/node_modules/tv4/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "tv4@^1.2.7", + { + "raw": "tv4@^1.2.7", + "scope": null, + "escapedName": "tv4", + "name": "tv4", + "rawSpec": "^1.2.7", + "spec": ">=1.2.7 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/table" ] ], @@ -12,16 +20,17 @@ "_location": "/tv4", "_nodeVersion": "0.12.4", "_npmUser": { - "email": "luffgd@gmail.com", - "name": "geraintluff" + "name": "geraintluff", + "email": "luffgd@gmail.com" }, "_npmVersion": "2.10.1", "_phantomChildren": {}, "_requested": { - "name": "tv4", "raw": "tv4@^1.2.7", - "rawSpec": "^1.2.7", "scope": null, + "escapedName": "tv4", + "name": "tv4", + "rawSpec": "^1.2.7", "spec": ">=1.2.7 <2.0.0", "type": "range" }, @@ -91,12 +100,12 @@ "main": "tv4.js", "maintainers": [ { - "email": "luffgd@gmail.com", - "name": "geraintluff" + "name": "geraintluff", + "email": "luffgd@gmail.com" }, { - "email": "bartvanderschoor@gmail.com", - "name": "bartvds" + "name": "bartvds", + "email": "bartvanderschoor@gmail.com" } ], "name": "tv4", diff --git a/tools/eslint/node_modules/type-check/package.json b/tools/eslint/node_modules/type-check/package.json index 6b2509bb8d..47d7f1ad0b 100644 --- a/tools/eslint/node_modules/type-check/package.json +++ b/tools/eslint/node_modules/type-check/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "type-check@~0.3.2", + { + "raw": "type-check@~0.3.2", + "scope": null, + "escapedName": "type-check", + "name": "type-check", + "rawSpec": "~0.3.2", + "spec": ">=0.3.2 <0.4.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/levn" ] ], @@ -12,16 +20,17 @@ "_location": "/type-check", "_nodeVersion": "4.2.4", "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { - "name": "type-check", "raw": "type-check@~0.3.2", - "rawSpec": "~0.3.2", "scope": null, + "escapedName": "type-check", + "name": "type-check", + "rawSpec": "~0.3.2", "spec": ">=0.3.2 <0.4.0", "type": "range" }, @@ -35,8 +44,8 @@ "_spec": "type-check@~0.3.2", "_where": "/Users/trott/io.js/tools/node_modules/levn", "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" + "name": "George Zahariev", + "email": "z@georgezahariev.com" }, "bugs": { "url": "https://github.com/gkz/type-check/issues" @@ -76,8 +85,8 @@ "main": "./lib/", "maintainers": [ { - "email": "z@georgezahariev.com", - "name": "gkz" + "name": "gkz", + "email": "z@georgezahariev.com" } ], "name": "type-check", diff --git a/tools/eslint/node_modules/typedarray/package.json b/tools/eslint/node_modules/typedarray/package.json index 08ddc62523..25d5276212 100644 --- a/tools/eslint/node_modules/typedarray/package.json +++ b/tools/eslint/node_modules/typedarray/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "typedarray@~0.0.5", + { + "raw": "typedarray@~0.0.5", + "scope": null, + "escapedName": "typedarray", + "name": "typedarray", + "rawSpec": "~0.0.5", + "spec": ">=0.0.5 <0.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/concat-stream" ] ], @@ -11,16 +19,17 @@ "_installable": true, "_location": "/typedarray", "_npmUser": { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" }, "_npmVersion": "1.4.3", "_phantomChildren": {}, "_requested": { - "name": "typedarray", "raw": "typedarray@~0.0.5", - "rawSpec": "~0.0.5", "scope": null, + "escapedName": "typedarray", + "name": "typedarray", + "rawSpec": "~0.0.5", "spec": ">=0.0.5 <0.1.0", "type": "range" }, @@ -33,8 +42,8 @@ "_spec": "typedarray@~0.0.5", "_where": "/Users/trott/io.js/tools/node_modules/concat-stream", "author": { - "email": "mail@substack.net", "name": "James Halliday", + "email": "mail@substack.net", "url": "http://substack.net" }, "bugs": { @@ -71,8 +80,8 @@ "main": "index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "typedarray", @@ -86,6 +95,7 @@ "test": "tape test/*.js test/server/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/6..latest", "firefox/16..latest", @@ -98,8 +108,7 @@ "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" - ], - "files": "test/*.js" + ] }, "version": "0.0.6" } diff --git a/tools/eslint/node_modules/user-home/package.json b/tools/eslint/node_modules/user-home/package.json index a4375f7bb1..b0f7d82980 100644 --- a/tools/eslint/node_modules/user-home/package.json +++ b/tools/eslint/node_modules/user-home/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "user-home@^2.0.0", + { + "raw": "user-home@^2.0.0", + "scope": null, + "escapedName": "user-home", + "name": "user-home", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/eslint" ] ], @@ -12,16 +20,17 @@ "_location": "/user-home", "_nodeVersion": "0.12.4", "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.10.1", "_phantomChildren": {}, "_requested": { - "name": "user-home", "raw": "user-home@^2.0.0", - "rawSpec": "^2.0.0", "scope": null, + "escapedName": "user-home", + "name": "user-home", + "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "user-home@^2.0.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -80,8 +89,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "user-home", diff --git a/tools/eslint/node_modules/util-deprecate/package.json b/tools/eslint/node_modules/util-deprecate/package.json index a8a2bb887f..437311b896 100644 --- a/tools/eslint/node_modules/util-deprecate/package.json +++ b/tools/eslint/node_modules/util-deprecate/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "util-deprecate@~1.0.1", + { + "raw": "util-deprecate@~1.0.1", + "scope": null, + "escapedName": "util-deprecate", + "name": "util-deprecate", + "rawSpec": "~1.0.1", + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/readable-stream" ] ], @@ -12,16 +20,17 @@ "_location": "/util-deprecate", "_nodeVersion": "4.1.2", "_npmUser": { - "email": "nathan@tootallnate.net", - "name": "tootallnate" + "name": "tootallnate", + "email": "nathan@tootallnate.net" }, "_npmVersion": "2.14.4", "_phantomChildren": {}, "_requested": { - "name": "util-deprecate", "raw": "util-deprecate@~1.0.1", - "rawSpec": "~1.0.1", "scope": null, + "escapedName": "util-deprecate", + "name": "util-deprecate", + "rawSpec": "~1.0.1", "spec": ">=1.0.1 <1.1.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "util-deprecate@~1.0.1", "_where": "/Users/trott/io.js/tools/node_modules/readable-stream", "author": { - "email": "nathan@tootallnate.net", "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", "url": "http://n8.io/" }, "browser": "browser.js", @@ -48,7 +57,7 @@ "directories": {}, "dist": { "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" }, "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", "homepage": "https://github.com/TooTallNate/util-deprecate", @@ -63,8 +72,8 @@ "main": "node.js", "maintainers": [ { - "email": "nathan@tootallnate.net", - "name": "tootallnate" + "name": "tootallnate", + "email": "nathan@tootallnate.net" } ], "name": "util-deprecate", diff --git a/tools/eslint/node_modules/wordwrap/package.json b/tools/eslint/node_modules/wordwrap/package.json index e9a904f62d..30966fe226 100644 --- a/tools/eslint/node_modules/wordwrap/package.json +++ b/tools/eslint/node_modules/wordwrap/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "wordwrap@~1.0.0", + { + "raw": "wordwrap@~1.0.0", + "scope": null, + "escapedName": "wordwrap", + "name": "wordwrap", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/optionator" ] ], @@ -12,16 +20,17 @@ "_location": "/wordwrap", "_nodeVersion": "2.0.0", "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" + "name": "substack", + "email": "substack@gmail.com" }, "_npmVersion": "2.9.0", "_phantomChildren": {}, "_requested": { - "name": "wordwrap", "raw": "wordwrap@~1.0.0", - "rawSpec": "~1.0.0", "scope": null, + "escapedName": "wordwrap", + "name": "wordwrap", + "rawSpec": "~1.0.0", "spec": ">=1.0.0 <1.1.0", "type": "range" }, @@ -34,8 +43,8 @@ "_spec": "wordwrap@~1.0.0", "_where": "/Users/trott/io.js/tools/node_modules/optionator", "author": { - "email": "mail@substack.net", "name": "James Halliday", + "email": "mail@substack.net", "url": "http://substack.net" }, "bugs": { @@ -47,13 +56,13 @@ "tape": "^4.0.0" }, "directories": { - "example": "example", "lib": ".", + "example": "example", "test": "test" }, "dist": { "shasum": "27584810891456a4171c8d0226441ade90cbcaeb", - "tarball": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" + "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" }, "gitHead": "9f02667e901f2f10d87c33f7093fcf94788ab2f8", "homepage": "https://github.com/substack/node-wordwrap#readme", @@ -68,8 +77,8 @@ "main": "./index.js", "maintainers": [ { - "email": "mail@substack.net", - "name": "substack" + "name": "substack", + "email": "mail@substack.net" } ], "name": "wordwrap", diff --git a/tools/eslint/node_modules/wrappy/package.json b/tools/eslint/node_modules/wrappy/package.json index 7014cb3a8b..ed3bd2abf4 100644 --- a/tools/eslint/node_modules/wrappy/package.json +++ b/tools/eslint/node_modules/wrappy/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "wrappy@1", + { + "raw": "wrappy@1", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/inflight" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" }, "_npmUser": { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "zkat", + "email": "kat@sykosomatic.org" }, "_npmVersion": "3.9.1", "_phantomChildren": {}, "_requested": { - "name": "wrappy", "raw": "wrappy@1", - "rawSpec": "1", "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "1", "spec": ">=1.0.0 <2.0.0", "type": "range" }, @@ -39,8 +48,8 @@ "_spec": "wrappy@1", "_where": "/Users/trott/io.js/tools/node_modules/inflight", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -67,12 +76,12 @@ "main": "wrappy.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "zkat", + "email": "kat@sykosomatic.org" } ], "name": "wrappy", diff --git a/tools/eslint/node_modules/write/package.json b/tools/eslint/node_modules/write/package.json index 7c0e2e07d1..bc88434110 100644 --- a/tools/eslint/node_modules/write/package.json +++ b/tools/eslint/node_modules/write/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "write@^0.2.1", + { + "raw": "write@^0.2.1", + "scope": null, + "escapedName": "write", + "name": "write", + "rawSpec": "^0.2.1", + "spec": ">=0.2.1 <0.3.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/flat-cache" ] ], @@ -12,16 +20,17 @@ "_location": "/write", "_nodeVersion": "0.12.4", "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" + "name": "jonschlinkert", + "email": "github@sellside.com" }, "_npmVersion": "2.10.1", "_phantomChildren": {}, "_requested": { - "name": "write", "raw": "write@^0.2.1", - "rawSpec": "^0.2.1", "scope": null, + "escapedName": "write", + "name": "write", + "rawSpec": "^0.2.1", "spec": ">=0.2.1 <0.3.0", "type": "range" }, @@ -79,8 +88,8 @@ "main": "index.js", "maintainers": [ { - "email": "github@sellside.com", - "name": "jonschlinkert" + "name": "jonschlinkert", + "email": "github@sellside.com" } ], "name": "write", diff --git a/tools/eslint/node_modules/xregexp/package.json b/tools/eslint/node_modules/xregexp/package.json index 8fe0d7f502..a26ef2067b 100644 --- a/tools/eslint/node_modules/xregexp/package.json +++ b/tools/eslint/node_modules/xregexp/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "xregexp@^3.0.0", + { + "raw": "xregexp@^3.0.0", + "scope": null, + "escapedName": "xregexp", + "name": "xregexp", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/table" ] ], @@ -16,16 +24,17 @@ "tmp": "tmp/xregexp-3.1.1.tgz_1463265906533_0.49629145418293774" }, "_npmUser": { - "email": "steves_list@hotmail.com", - "name": "slevithan" + "name": "slevithan", + "email": "steves_list@hotmail.com" }, "_npmVersion": "2.14.3", "_phantomChildren": {}, "_requested": { - "name": "xregexp", "raw": "xregexp@^3.0.0", - "rawSpec": "^3.0.0", "scope": null, + "escapedName": "xregexp", + "name": "xregexp", + "rawSpec": "^3.0.0", "spec": ">=3.0.0 <4.0.0", "type": "range" }, @@ -38,8 +47,8 @@ "_spec": "xregexp@^3.0.0", "_where": "/Users/trott/io.js/tools/node_modules/table", "author": { - "email": "steves_list@hotmail.com", - "name": "Steven Levithan" + "name": "Steven Levithan", + "email": "steves_list@hotmail.com" }, "bugs": { "url": "https://github.com/slevithan/xregexp/issues" @@ -69,8 +78,8 @@ "main": "./src/index.js", "maintainers": [ { - "email": "steves_list@hotmail.com", - "name": "slevithan" + "name": "slevithan", + "email": "steves_list@hotmail.com" } ], "name": "xregexp", diff --git a/tools/eslint/node_modules/xtend/package.json b/tools/eslint/node_modules/xtend/package.json index d1d256d3ea..e6a1c013a0 100644 --- a/tools/eslint/node_modules/xtend/package.json +++ b/tools/eslint/node_modules/xtend/package.json @@ -1,7 +1,15 @@ { "_args": [ [ - "xtend@^4.0.0", + { + "raw": "xtend@^4.0.0", + "scope": null, + "escapedName": "xtend", + "name": "xtend", + "rawSpec": "^4.0.0", + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, "/Users/trott/io.js/tools/node_modules/is-my-json-valid" ] ], @@ -12,16 +20,17 @@ "_location": "/xtend", "_nodeVersion": "0.10.32", "_npmUser": { - "email": "raynos2@gmail.com", - "name": "raynos" + "name": "raynos", + "email": "raynos2@gmail.com" }, "_npmVersion": "2.14.1", "_phantomChildren": {}, "_requested": { - "name": "xtend", "raw": "xtend@^4.0.0", - "rawSpec": "^4.0.0", "scope": null, + "escapedName": "xtend", + "name": "xtend", + "rawSpec": "^4.0.0", "spec": ">=4.0.0 <5.0.0", "type": "range" }, @@ -34,12 +43,12 @@ "_spec": "xtend@^4.0.0", "_where": "/Users/trott/io.js/tools/node_modules/is-my-json-valid", "author": { - "email": "raynos2@gmail.com", - "name": "Raynos" + "name": "Raynos", + "email": "raynos2@gmail.com" }, "bugs": { - "email": "raynos2@gmail.com", - "url": "https://github.com/Raynos/xtend/issues" + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" }, "contributors": [ { @@ -76,8 +85,8 @@ "main": "immutable", "maintainers": [ { - "email": "raynos2@gmail.com", - "name": "raynos" + "name": "raynos", + "email": "raynos2@gmail.com" } ], "name": "xtend", @@ -91,6 +100,7 @@ "test": "node test" }, "testling": { + "files": "test.js", "browsers": [ "ie/7..latest", "firefox/16..latest", @@ -102,8 +112,7 @@ "safari/5.1..latest", "ipad/6.0..latest", "iphone/6.0..latest" - ], - "files": "test.js" + ] }, "version": "4.0.1" } |