From d0d5b4bef17ed25aabcd70888f3ab4a90b6c7d80 Mon Sep 17 00:00:00 2001 From: Philipp von Weitershausen Date: Sat, 29 Oct 2016 01:03:41 -0700 Subject: [PATCH] babel-preset-silk-node6 with latest Babel plugins --- CONTRIBUTING.md | 2 +- babel-preset-silk-node4/package.json | 48 - .../.gitignore | 0 .../.npmignore | 0 .../.npmrc | 0 .../LICENSE.md | 0 .../README.md | 12 +- .../build/.gitignore | 0 .../build/compile | 1 + .../build/stage | 26 +- .../index.js | 48350 ++++++++-------- babel-preset-silk-node6/package.json | 33 + .../staging/.gitkeep | 0 .../test/fixtures/boots.js | 0 .../test/fixtures/import.js | 0 .../test/mocha.opts | 0 .../test/mocha_test.js | 0 .../test/setup.js | 0 .../webpack.config.js | 0 babel-run/node.js | 4 +- babel-run/package.json | 4 +- buildjs/package.json | 6 +- buildjs/webpack.config.js | 2 +- cli/babelconfig.js | 2 +- node_modules/babel-preset-silk-node4 | 1 - node_modules/babel-preset-silk-node6 | 1 + sdk/babelconfig.js | 2 +- silknpm.json | 2 +- 28 files changed, 24098 insertions(+), 24398 deletions(-) delete mode 100644 babel-preset-silk-node4/package.json rename {babel-preset-silk-node4 => babel-preset-silk-node6}/.gitignore (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/.npmignore (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/.npmrc (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/LICENSE.md (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/README.md (78%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/build/.gitignore (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/build/compile (95%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/build/stage (67%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/index.js (58%) create mode 100644 babel-preset-silk-node6/package.json rename {babel-preset-silk-node4 => babel-preset-silk-node6}/staging/.gitkeep (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/test/fixtures/boots.js (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/test/fixtures/import.js (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/test/mocha.opts (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/test/mocha_test.js (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/test/setup.js (100%) rename {babel-preset-silk-node4 => babel-preset-silk-node6}/webpack.config.js (100%) delete mode 120000 node_modules/babel-preset-silk-node4 create mode 120000 node_modules/babel-preset-silk-node6 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 295ead5f9..94a532340 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ Silk's key components are open source and we :heart: to receive contributions fr The repository generally consists of those parts: - `babel`: Babel utilities -- `babel-preset-silk-node4`: Standardized babel configuration +- `babel-preset-silk-node6`: Standardized babel configuration - `bsp-gonk`: Board support package for various Android-like devices - `cli`: Commandline tool - `device-main`: Device javascript entry point diff --git a/babel-preset-silk-node4/package.json b/babel-preset-silk-node4/package.json deleted file mode 100644 index d6d2a8ded..000000000 --- a/babel-preset-silk-node4/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "babel-preset-silk-node4", - "version": "1.5.0", - "description": "A very fast loading babel preset for node", - "repository": "silklabs/silk", - "main": "index.js", - "devDependencies": { - "babel-cli": "6.9.0", - "babel-features": "2.0.0", - "babel-plugin-syntax-flow": "6.5.0", - "babel-plugin-syntax-trailing-function-commas": "6.5.0", - "babel-plugin-transform-async-to-generator": "6.5.0", - "babel-plugin-transform-class-constructor-call": "6.5.0", - "babel-plugin-transform-class-properties": "6.5.0", - "babel-plugin-transform-es2015-destructuring": "6.5.0", - "babel-plugin-transform-es2015-function-name": "6.5.0", - "babel-plugin-transform-es2015-modules-commonjs": "6.5.0", - "babel-plugin-transform-es2015-parameters": "6.5.0", - "babel-plugin-transform-es2015-sticky-regex": "6.5.0", - "babel-plugin-transform-es2015-unicode-regex": "6.5.0", - "babel-plugin-transform-export-extensions": "6.5.0", - "babel-plugin-transform-flow-strip-types": "6.5.0", - "json-loader": "0.5.4", - "mocha": "2.4.5", - "webpack": "1.13.0", - "babel-plugin-transform-es2015-spread": "6.5.0", - "babel-plugin-transform-object-rest-spread": "6.5.0", - "babel-plugin-transform-decorators": "6.5.0", - "babel-plugin-transform-es2015-classes": "6.5.0" - }, - "scripts": { - "compile": "./build/compile", - "test": "time babel-node --presets $PWD --only test/fixtures/boots test/fixtures/boots && mocha" - }, - "keywords": [ - "babel", - "preset", - "babel-plugin", - "babel-preset", - "node4", - "silk" - ], - "author": "Silk Labs", - "license": "MIT", - "bugs": { - "url": "https://github.com/silklabs/silk/issues" - } -} diff --git a/babel-preset-silk-node4/.gitignore b/babel-preset-silk-node6/.gitignore similarity index 100% rename from babel-preset-silk-node4/.gitignore rename to babel-preset-silk-node6/.gitignore diff --git a/babel-preset-silk-node4/.npmignore b/babel-preset-silk-node6/.npmignore similarity index 100% rename from babel-preset-silk-node4/.npmignore rename to babel-preset-silk-node6/.npmignore diff --git a/babel-preset-silk-node4/.npmrc b/babel-preset-silk-node6/.npmrc similarity index 100% rename from babel-preset-silk-node4/.npmrc rename to babel-preset-silk-node6/.npmrc diff --git a/babel-preset-silk-node4/LICENSE.md b/babel-preset-silk-node6/LICENSE.md similarity index 100% rename from babel-preset-silk-node4/LICENSE.md rename to babel-preset-silk-node6/LICENSE.md diff --git a/babel-preset-silk-node4/README.md b/babel-preset-silk-node6/README.md similarity index 78% rename from babel-preset-silk-node4/README.md rename to babel-preset-silk-node6/README.md index c00ef388e..34492b2ba 100644 --- a/babel-preset-silk-node4/README.md +++ b/babel-preset-silk-node6/README.md @@ -1,6 +1,6 @@ -# Silk Babel Preset (Node 4) +# Silk Babel Preset (Node 6) -This is a flattened babel-preset for node 4 ... +This is a flattened babel-preset for node 6.x LTS ... This project does not ship with the entire set of babel plugins as npm dependencies instead it flattens all the dependencies into a single fast @@ -19,11 +19,9 @@ babel-node). ## How to build: -```js -npm run compile - -# Check in index.js to source tree ... -``` +1. Run `npm run compile` +2. Check in `index.js` to source tree +3. Ignore/revert changes to `package.json` # LICENSE diff --git a/babel-preset-silk-node4/build/.gitignore b/babel-preset-silk-node6/build/.gitignore similarity index 100% rename from babel-preset-silk-node4/build/.gitignore rename to babel-preset-silk-node6/build/.gitignore diff --git a/babel-preset-silk-node4/build/compile b/babel-preset-silk-node6/build/compile similarity index 95% rename from babel-preset-silk-node4/build/compile rename to babel-preset-silk-node6/build/compile index 2ddfb8f36..d420d7282 100755 --- a/babel-preset-silk-node4/build/compile +++ b/babel-preset-silk-node6/build/compile @@ -13,6 +13,7 @@ check_npm_version() { } main() { + npm install ./build/stage check_npm_version npm install diff --git a/babel-preset-silk-node4/build/stage b/babel-preset-silk-node6/build/stage similarity index 67% rename from babel-preset-silk-node4/build/stage rename to babel-preset-silk-node6/build/stage index 379af4e59..07e157fc6 100755 --- a/babel-preset-silk-node4/build/stage +++ b/babel-preset-silk-node6/build/stage @@ -18,13 +18,25 @@ const TARGET = path.join(__dirname, '..'); const PKG_PATH = path.join(TARGET, 'package.json'); const DEST = path.join(TARGET, 'staging/index.js'); -const DEFAULT_BABEL_VERSION = '6.5.0'; +const DEFAULT_BABEL_VERSION = '6.18.0'; const PLUGIN_VERSION_OVERRIDES = { - // 'transform-async-to-generator': 'MY_VER' + 'syntax-trailing-function-commas': '6.13.0', + 'transform-async-to-generator': '6.16.0', + 'transform-es2015-function-name': '6.9.0', + 'transform-es2015-unicode-regex': '6.11.0', + 'transform-es2015-spread': '6.8.0', + 'transform-export-extensions': '6.8.0', + 'transform-object-rest-spread': '6.16.0', + 'transform-decorators': '6.13.0', }; const PLUGIN_SKIP = new Set([ - 'transform-es2015-generator-return' + 'syntax-async-functions', + 'syntax-async-generators', + 'syntax-function-sent', + 'transform-es2015-generator-return', + 'transform-exponentiation-operator', + 'transform-regenerator', ]); const ADDITIONAL_PLUGINS = [ @@ -42,12 +54,16 @@ const ADDITIONAL_PLUGINS = [ 'transform-decorators', 'transform-export-extensions', - // XXX: v8 does not like you to use super.X syntax which is used in our - // codebase so we compile our modules down using es2015. + // Node does not support the super.X syntax in generators, but our + // codebase uses super in async methods (which are compiled down to + // generators.) See https://github.com/babel/babel/issues/3930. 'transform-es2015-classes', ]; const es2015Plugins = features.options().plugins.filter((name) => { + if (Array.isArray(name)) { + name = name[0]; + } return !PLUGIN_SKIP.has(name); }); diff --git a/babel-preset-silk-node4/index.js b/babel-preset-silk-node6/index.js similarity index 58% rename from babel-preset-silk-node4/index.js rename to babel-preset-silk-node6/index.js index 8021efa75..ff8f2d5eb 100644 --- a/babel-preset-silk-node4/index.js +++ b/babel-preset-silk-node6/index.js @@ -50,16739 +50,17870 @@ module.exports = module.exports = { plugins: [ __webpack_require__(1), - __webpack_require__(41), - __webpack_require__(238), - __webpack_require__(244), - __webpack_require__(245), - __webpack_require__(248), - __webpack_require__(255), - __webpack_require__(258), - __webpack_require__(259), - __webpack_require__(260), - __webpack_require__(263), - __webpack_require__(265), - __webpack_require__(266), - __webpack_require__(268), - __webpack_require__(270), - __webpack_require__(274), - __webpack_require__(276) + __webpack_require__(2), + __webpack_require__(57), + __webpack_require__(59), + __webpack_require__(379), + __webpack_require__(382), + __webpack_require__(383), + __webpack_require__(384), + __webpack_require__(389), + __webpack_require__(391), + __webpack_require__(393), + __webpack_require__(397), + __webpack_require__(399) ] }; /***/ }, /* 1 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { "use strict"; - var _classCallCheck = __webpack_require__(2)["default"]; + exports.__esModule = true; + + exports.default = function () { + return { + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("trailingFunctionCommas"); + } + }; + }; + + module.exports = exports["default"]; + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { - var _getIterator = __webpack_require__(3)["default"]; + "use strict"; exports.__esModule = true; - exports["default"] = function (_ref5) { - var t = _ref5.types; + var _getIterator2 = __webpack_require__(3); - /** - * Test if a VariableDeclaration's declarations contains any Patterns. - */ + var _getIterator3 = _interopRequireDefault(_getIterator2); - function variableDeclarationHasPattern(node) { - for (var _iterator = (node.declarations /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + exports.default = function (_ref) { + var t = _ref.types; + + function hasSpread(node) { + for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref2; if (_isArray) { if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; + _ref2 = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; - _ref = _i.value; + _ref2 = _i.value; } - var declar = _ref; + var prop = _ref2; - if (t.isPattern(declar.id)) { + if (t.isSpreadProperty(prop)) { return true; } } return false; } - /** - * Test if an ArrayPattern's elements contain any RestElements. - */ - - function hasRest(pattern) { - for (var _iterator2 = (pattern.elements /*: Array*/), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var elem = _ref2; + return { + inherits: __webpack_require__(56), - if (t.isRestElement(elem)) { - return true; - } - } - return false; - } + visitor: { + ObjectExpression: function ObjectExpression(path, file) { + if (!hasSpread(path.node)) return; - var arrayUnpackVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (state.bindings[path.node.name]) { - state.deopt = true; - path.stop(); - } - } - }; + var useBuiltIns = file.opts.useBuiltIns || false; + if (typeof useBuiltIns !== "boolean") { + throw new Error("transform-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)"); + } - var DestructuringTransformer = (function () { - function DestructuringTransformer(opts) { - _classCallCheck(this, DestructuringTransformer); + var args = []; + var props = []; - this.blockHoist = opts.blockHoist; - this.operator = opts.operator; - this.arrays = {}; - this.nodes = opts.nodes || []; - this.scope = opts.scope; - this.file = opts.file; - this.kind = opts.kind; - } + function push() { + if (!props.length) return; + args.push(t.objectExpression(props)); + props = []; + } - DestructuringTransformer.prototype.buildVariableAssignment = function buildVariableAssignment(id, init) { - var op = this.operator; - if (t.isMemberExpression(id)) op = "="; + for (var _iterator2 = path.node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref3; - var node = undefined; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } - if (op) { - node = t.expressionStatement(t.assignmentExpression(op, id, init)); - } else { - node = t.variableDeclaration(this.kind, [t.variableDeclarator(id, init)]); - } + var prop = _ref3; - node._blockHoist = this.blockHoist; + if (t.isSpreadProperty(prop)) { + push(); + args.push(prop.argument); + } else { + props.push(prop); + } + } - return node; - }; + push(); - DestructuringTransformer.prototype.buildVariableDeclaration = function buildVariableDeclaration(id, init) { - var declar = t.variableDeclaration("var", [t.variableDeclarator(id, init)]); - declar._blockHoist = this.blockHoist; - return declar; - }; + if (!t.isObjectExpression(args[0])) { + args.unshift(t.objectExpression([])); + } - DestructuringTransformer.prototype.push = function push(id, init) { - if (t.isObjectPattern(id)) { - this.pushObjectPattern(id, init); - } else if (t.isArrayPattern(id)) { - this.pushArrayPattern(id, init); - } else if (t.isAssignmentPattern(id)) { - this.pushAssignmentPattern(id, init); - } else { - this.nodes.push(this.buildVariableAssignment(id, init)); - } - }; + var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends"); - DestructuringTransformer.prototype.toArray = function toArray(node, count) { - if (this.file.opts.loose || t.isIdentifier(node) && this.arrays[node.name]) { - return node; - } else { - return this.scope.toArray(node, count); + path.replaceWith(t.callExpression(helper, args)); } - }; + } + }; + }; - DestructuringTransformer.prototype.pushAssignmentPattern = function pushAssignmentPattern(pattern, valueRef) { - // we need to assign the current value of the assignment to avoid evaluating - // it more than once + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var tempValueRef = this.scope.generateUidIdentifierBasedOnNode(valueRef); + module.exports = exports["default"]; - var declar = t.variableDeclaration("var", [t.variableDeclarator(tempValueRef, valueRef)]); - declar._blockHoist = this.blockHoist; - this.nodes.push(declar); +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { - // + module.exports = { "default": __webpack_require__(4), __esModule: true }; - var tempConditional = t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef); +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { - var left = pattern.left; - if (t.isPattern(left)) { - var tempValueDefault = t.expressionStatement(t.assignmentExpression("=", tempValueRef, tempConditional)); - tempValueDefault._blockHoist = this.blockHoist; + __webpack_require__(5); + __webpack_require__(51); + module.exports = __webpack_require__(53); - this.nodes.push(tempValueDefault); - this.push(left, tempValueRef); - } else { - this.nodes.push(this.buildVariableAssignment(left, tempConditional)); - } - }; +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { - DestructuringTransformer.prototype.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) { - // get all the keys that appear in this object before the current spread + __webpack_require__(6); + var global = __webpack_require__(17) + , hide = __webpack_require__(21) + , Iterators = __webpack_require__(9) + , TO_STRING_TAG = __webpack_require__(48)('toStringTag'); - var keys = []; + for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } - for (var i = 0; i < pattern.properties.length; i++) { - var prop = pattern.properties[i]; +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { - // we've exceeded the index of the spread property to all properties to the - // right need to be ignored - if (i >= spreadPropIndex) break; + 'use strict'; + var addToUnscopables = __webpack_require__(7) + , step = __webpack_require__(8) + , Iterators = __webpack_require__(9) + , toIObject = __webpack_require__(10); - // ignore other spread properties - if (t.isRestProperty(prop)) continue; + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(14)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); - var key = prop.key; - if (t.isIdentifier(key) && !prop.computed) key = t.stringLiteral(prop.key.name); - keys.push(key); - } + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; - keys = t.arrayExpression(keys); + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); - // +/***/ }, +/* 7 */ +/***/ function(module, exports) { - var value = t.callExpression(this.file.addHelper("objectWithoutProperties"), [objRef, keys]); - this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value)); - }; + module.exports = function(){ /* empty */ }; - DestructuringTransformer.prototype.pushObjectProperty = function pushObjectProperty(prop, propRef) { - if (t.isLiteral(prop.key)) prop.computed = true; +/***/ }, +/* 8 */ +/***/ function(module, exports) { - var pattern = prop.value; - var objRef = t.memberExpression(propRef, prop.key, prop.computed); + module.exports = function(done, value){ + return {value: value, done: !!done}; + }; - if (t.isPattern(pattern)) { - this.push(pattern, objRef); - } else { - this.nodes.push(this.buildVariableAssignment(pattern, objRef)); - } - }; +/***/ }, +/* 9 */ +/***/ function(module, exports) { - DestructuringTransformer.prototype.pushObjectPattern = function pushObjectPattern(pattern, objRef) { - // https://github.com/babel/babel/issues/681 + module.exports = {}; - if (!pattern.properties.length) { - this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("objectDestructuringEmpty"), [objRef]))); - } +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { - // if we have more than one properties in this pattern and the objectRef is a - // member expression then we need to assign it to a temporary variable so it's - // only evaluated once + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(11) + , defined = __webpack_require__(13); + module.exports = function(it){ + return IObject(defined(it)); + }; - if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) { - var temp = this.scope.generateUidIdentifierBasedOnNode(objRef); - this.nodes.push(this.buildVariableDeclaration(temp, objRef)); - objRef = temp; - } +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { - // - - for (var i = 0; i < pattern.properties.length; i++) { - var prop = pattern.properties[i]; - if (t.isRestProperty(prop)) { - this.pushObjectRest(pattern, objRef, prop, i); - } else { - this.pushObjectProperty(prop, objRef); - } - } - }; + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(12); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; - DestructuringTransformer.prototype.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) { - // not an array so there's no way we can deal with this - if (!t.isArrayExpression(arr)) return false; +/***/ }, +/* 12 */ +/***/ function(module, exports) { - // pattern has less elements than the array and doesn't have a rest so some - // elements wont be evaluated - if (pattern.elements.length > arr.elements.length) return; - if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) return false; + var toString = {}.toString; - for (var _iterator3 = (pattern.elements /*: Array*/), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; + module.exports = function(it){ + return toString.call(it).slice(8, -1); + }; - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } +/***/ }, +/* 13 */ +/***/ function(module, exports) { - var elem = _ref3; + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; - // deopt on holes - if (!elem) return false; +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { - // deopt on member expressions as they may be included in the RHS - if (t.isMemberExpression(elem)) return false; - } + 'use strict'; + var LIBRARY = __webpack_require__(15) + , $export = __webpack_require__(16) + , redefine = __webpack_require__(31) + , hide = __webpack_require__(21) + , has = __webpack_require__(32) + , Iterators = __webpack_require__(9) + , $iterCreate = __webpack_require__(33) + , setToStringTag = __webpack_require__(47) + , getPrototypeOf = __webpack_require__(49) + , ITERATOR = __webpack_require__(48)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; - for (var _iterator4 = (arr.elements /*: Array*/), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { - var _ref4; + var returnThis = function(){ return this; }; - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; - var elem = _ref4; +/***/ }, +/* 15 */ +/***/ function(module, exports) { - // deopt on spread elements - if (t.isSpreadElement(elem)) return false; - } + module.exports = true; - // deopt on reference to left side identifiers - var bindings = t.getBindingIdentifiers(pattern); - var state = { deopt: false, bindings: bindings }; - this.scope.traverse(arr, arrayUnpackVisitor, state); - return !state.deopt; - }; +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { - DestructuringTransformer.prototype.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) { - for (var i = 0; i < pattern.elements.length; i++) { - var elem = pattern.elements[i]; - if (t.isRestElement(elem)) { - this.push(elem.argument, t.arrayExpression(arr.elements.slice(i))); - } else { - this.push(elem, arr.elements[i]); - } - } - }; + var global = __webpack_require__(17) + , core = __webpack_require__(18) + , ctx = __webpack_require__(19) + , hide = __webpack_require__(21) + , PROTOTYPE = 'prototype'; - DestructuringTransformer.prototype.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) { - if (!pattern.elements) return; + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; - // optimise basic array destructuring of an array expression - // - // we can't do this to a pattern of unequal size to it's right hand - // array expression as then there will be values that wont be evaluated - // - // eg: let [a, b] = [1, 2]; +/***/ }, +/* 17 */ +/***/ function(module, exports) { - if (this.canUnpackArrayPattern(pattern, arrayRef)) { - return this.pushUnpackedArrayPattern(pattern, arrayRef); - } + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - // if we have a rest then we need all the elements so don't tell - // `scope.toArray` to only get a certain amount +/***/ }, +/* 18 */ +/***/ function(module, exports) { - var count = !hasRest(pattern) && pattern.elements.length; + var core = module.exports = {version: '2.4.0'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - // so we need to ensure that the `arrayRef` is an array, `scope.toArray` will - // return a locally bound identifier if it's been inferred to be an array, - // otherwise it'll be a call to a helper that will ensure it's one +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { - var toArray = this.toArray(arrayRef, count); + // optional / simple context binding + var aFunction = __webpack_require__(20); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; - if (t.isIdentifier(toArray)) { - // we've been given an identifier so it must have been inferred to be an - // array - arrayRef = toArray; - } else { - arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef); - this.arrays[arrayRef.name] = true; - this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray)); - } +/***/ }, +/* 20 */ +/***/ function(module, exports) { - // + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; - for (var i = 0; i < pattern.elements.length; i++) { - var elem = pattern.elements[i]; +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { - // hole - if (!elem) continue; + var dP = __webpack_require__(22) + , createDesc = __webpack_require__(30); + module.exports = __webpack_require__(26) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; + }; - var elemRef = undefined; +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { - if (t.isRestElement(elem)) { - elemRef = this.toArray(arrayRef); + var anObject = __webpack_require__(23) + , IE8_DOM_DEFINE = __webpack_require__(25) + , toPrimitive = __webpack_require__(29) + , dP = Object.defineProperty; - if (i > 0) { - elemRef = t.callExpression(t.memberExpression(elemRef, t.identifier("slice")), [t.numericLiteral(i)]); - } + exports.f = __webpack_require__(26) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; + }; - // set the element to the rest element argument since we've dealt with it - // being a rest already - elem = elem.argument; - } else { - elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true); - } +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { - this.push(elem, elemRef); - } - }; + var isObject = __webpack_require__(24); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; - DestructuringTransformer.prototype.init = function init(pattern, ref) { - // trying to destructure a value that we can't evaluate more than once so we - // need to save it to a variable +/***/ }, +/* 24 */ +/***/ function(module, exports) { - if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) { - var memo = this.scope.maybeGenerateMemoised(ref, true); - if (memo) { - this.nodes.push(this.buildVariableDeclaration(memo, ref)); - ref = memo; - } - } + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; - // +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { - this.push(pattern, ref); + module.exports = !__webpack_require__(26) && !__webpack_require__(27)(function(){ + return Object.defineProperty(__webpack_require__(28)('div'), 'a', {get: function(){ return 7; }}).a != 7; + }); - return this.nodes; - }; +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { - return DestructuringTransformer; - })(); + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(27)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); - return { - visitor: { - ExportNamedDeclaration: function ExportNamedDeclaration(path) { - var declaration = path.get("declaration"); - if (!declaration.isVariableDeclaration()) return; - if (!variableDeclarationHasPattern(declaration.node)) return; +/***/ }, +/* 27 */ +/***/ function(module, exports) { - var specifiers = []; + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; - for (var _name in path.getOuterBindingIdentifiers(path)) { - var id = t.identifier(_name); - specifiers.push(t.exportSpecifier(id, id)); - } +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { - // Split the declaration and export list into two declarations so that the variable - // declaration can be split up later without needing to worry about not being a - // top-level statement. - path.replaceWith(declaration.node); - path.insertAfter(t.exportNamedDeclaration(null, specifiers)); - }, + var isObject = __webpack_require__(24) + , document = __webpack_require__(17).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); + module.exports = function(it){ + return is ? document.createElement(it) : {}; + }; - ForXStatement: function ForXStatement(path, file) { - var node = path.node; - var scope = path.scope; +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { - var left = node.left; + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(24); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); + }; - if (t.isPattern(left)) { - // for ({ length: k } in { abc: 3 }); +/***/ }, +/* 30 */ +/***/ function(module, exports) { - var temp = scope.generateUidIdentifier("ref"); + module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; + }; - node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]); +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { - path.ensureBlock(); + module.exports = __webpack_require__(21); - node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)])); +/***/ }, +/* 32 */ +/***/ function(module, exports) { - return; - } + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; - if (!t.isVariableDeclaration(left)) return; +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { - var pattern = left.declarations[0].id; - if (!t.isPattern(pattern)) return; + 'use strict'; + var create = __webpack_require__(34) + , descriptor = __webpack_require__(30) + , setToStringTag = __webpack_require__(47) + , IteratorPrototype = {}; - var key = scope.generateUidIdentifier("ref"); - node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]); + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(21)(IteratorPrototype, __webpack_require__(48)('iterator'), function(){ return this; }); - var nodes = []; + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); + }; - var destructuring = new DestructuringTransformer({ - kind: left.kind, - file: file, - scope: scope, - nodes: nodes - }); +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { - destructuring.init(pattern, key); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(23) + , dPs = __webpack_require__(35) + , enumBugKeys = __webpack_require__(45) + , IE_PROTO = __webpack_require__(42)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(28)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(46).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; - path.ensureBlock(); - var block = node.body; - block.body = nodes.concat(block.body); - }, +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { - CatchClause: function CatchClause(_ref6, file) { - var node = _ref6.node; - var scope = _ref6.scope; + var dP = __webpack_require__(22) + , anObject = __webpack_require__(23) + , getKeys = __webpack_require__(36); - var pattern = node.param; - if (!t.isPattern(pattern)) return; + module.exports = __webpack_require__(26) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; + }; - var ref = scope.generateUidIdentifier("ref"); - node.param = ref; +/***/ }, +/* 36 */ +/***/ function(module, exports, __webpack_require__) { - var nodes = []; + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(37) + , enumBugKeys = __webpack_require__(45); - var destructuring = new DestructuringTransformer({ - kind: "let", - file: file, - scope: scope, - nodes: nodes - }); - destructuring.init(pattern, ref); + module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); + }; - node.body.body = nodes.concat(node.body.body); - }, +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { - AssignmentExpression: function AssignmentExpression(path, file) { - var node = path.node; - var scope = path.scope; + var has = __webpack_require__(32) + , toIObject = __webpack_require__(10) + , arrayIndexOf = __webpack_require__(38)(false) + , IE_PROTO = __webpack_require__(42)('IE_PROTO'); - if (!t.isPattern(node.left)) return; + module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; - var nodes = []; +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { - var destructuring = new DestructuringTransformer({ - operator: node.operator, - file: file, - scope: scope, - nodes: nodes - }); + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(10) + , toLength = __webpack_require__(39) + , toIndex = __webpack_require__(41); + module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; - var ref = undefined; - if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) { - ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref"); +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, node.right)])); + // 7.1.15 ToLength + var toInteger = __webpack_require__(40) + , min = Math.min; + module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; - if (t.isArrayExpression(node.right)) { - destructuring.arrays[ref.name] = true; - } - } +/***/ }, +/* 40 */ +/***/ function(module, exports) { - destructuring.init(node.left, ref || node.right); + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; - if (ref) { - nodes.push(t.expressionStatement(ref)); - } +/***/ }, +/* 41 */ +/***/ function(module, exports, __webpack_require__) { - path.replaceWithMultiple(nodes); - }, + var toInteger = __webpack_require__(40) + , max = Math.max + , min = Math.min; + module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; - VariableDeclaration: function VariableDeclaration(path, file) { - var node = path.node; - var scope = path.scope; - var parent = path.parent; +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { - if (t.isForXStatement(parent)) return; - if (!parent || !path.container) return; // i don't know why this is necessary - TODO - if (!variableDeclarationHasPattern(node)) return; + var shared = __webpack_require__(43)('keys') + , uid = __webpack_require__(44); + module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); + }; - var nodes = []; - var declar = undefined; +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { - for (var i = 0; i < node.declarations.length; i++) { - declar = node.declarations[i]; + var global = __webpack_require__(17) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); + module.exports = function(key){ + return store[key] || (store[key] = {}); + }; - var patternId = declar.init; - var pattern = declar.id; +/***/ }, +/* 44 */ +/***/ function(module, exports) { - var destructuring = new DestructuringTransformer({ - blockHoist: node._blockHoist, - nodes: nodes, - scope: scope, - kind: node.kind, - file: file - }); + var id = 0 + , px = Math.random(); + module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; - if (t.isPattern(pattern)) { - destructuring.init(pattern, patternId); +/***/ }, +/* 45 */ +/***/ function(module, exports) { - if (+i !== node.declarations.length - 1) { - // we aren't the last declarator so let's just make the - // last transformed node inherit from us - t.inherits(nodes[nodes.length - 1], declar); - } - } else { - nodes.push(t.inherits(destructuring.buildVariableAssignment(declar.id, declar.init), declar)); - } - } + // IE 8- don't enum bug keys + module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(','); - path.replaceWithMultiple(nodes); - } - } - }; - }; +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = exports["default"]; + module.exports = __webpack_require__(17).document && document.documentElement; /***/ }, -/* 2 */ -/***/ function(module, exports) { +/* 47 */ +/***/ function(module, exports, __webpack_require__) { - "use strict"; + var def = __webpack_require__(22).f + , has = __webpack_require__(32) + , TAG = __webpack_require__(48)('toStringTag'); - exports["default"] = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } + module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; - exports.__esModule = true; - /***/ }, -/* 3 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(4), __esModule: true }; + var store = __webpack_require__(43)('wks') + , uid = __webpack_require__(44) + , Symbol = __webpack_require__(17).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); + }; + + $exports.store = store; /***/ }, -/* 4 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(5); - __webpack_require__(33); - module.exports = __webpack_require__(36); + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(32) + , toObject = __webpack_require__(50) + , IE_PROTO = __webpack_require__(42)('IE_PROTO') + , ObjectProto = Object.prototype; + + module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }; /***/ }, -/* 5 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(6); - var Iterators = __webpack_require__(9); - Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(13); + module.exports = function(it){ + return Object(defined(it)); + }; /***/ }, -/* 6 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var addToUnscopables = __webpack_require__(7) - , step = __webpack_require__(8) - , Iterators = __webpack_require__(9) - , toIObject = __webpack_require__(10); + var $at = __webpack_require__(52)(true); - // 22.1.3.4 Array.prototype.entries() - // 22.1.3.13 Array.prototype.keys() - // 22.1.3.29 Array.prototype.values() - // 22.1.3.30 Array.prototype[@@iterator]() - module.exports = __webpack_require__(14)(Array, 'Array', function(iterated, kind){ - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind - // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(14)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t - , kind = this._k - , index = this._i++; - if(!O || index >= O.length){ - this._t = undefined; - return step(1); - } - if(kind == 'keys' )return step(0, index); - if(kind == 'values')return step(0, O[index]); - return step(0, [index, O[index]]); - }, 'values'); - - // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) - Iterators.Arguments = Iterators.Array; - - addToUnscopables('keys'); - addToUnscopables('values'); - addToUnscopables('entries'); - -/***/ }, -/* 7 */ -/***/ function(module, exports) { - - module.exports = function(){ /* empty */ }; + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; + }); /***/ }, -/* 8 */ -/***/ function(module, exports) { +/* 52 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = function(done, value){ - return {value: value, done: !!done}; + var toInteger = __webpack_require__(40) + , defined = __webpack_require__(13); + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; }; /***/ }, -/* 9 */ -/***/ function(module, exports) { - - module.exports = {}; - -/***/ }, -/* 10 */ +/* 53 */ /***/ function(module, exports, __webpack_require__) { - // to indexed object, toObject with fallback for non-array-like ES3 strings - var IObject = __webpack_require__(11) - , defined = __webpack_require__(13); - module.exports = function(it){ - return IObject(defined(it)); + var anObject = __webpack_require__(23) + , get = __webpack_require__(54); + module.exports = __webpack_require__(18).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); }; /***/ }, -/* 11 */ +/* 54 */ /***/ function(module, exports, __webpack_require__) { - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var cof = __webpack_require__(12); - module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ - return cof(it) == 'String' ? it.split('') : Object(it); + var classof = __webpack_require__(55) + , ITERATOR = __webpack_require__(48)('iterator') + , Iterators = __webpack_require__(9); + module.exports = __webpack_require__(18).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; }; /***/ }, -/* 12 */ -/***/ function(module, exports) { +/* 55 */ +/***/ function(module, exports, __webpack_require__) { - var toString = {}.toString; + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(12) + , TAG = __webpack_require__(48)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } + }; module.exports = function(it){ - return toString.call(it).slice(8, -1); + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }, -/* 13 */ +/* 56 */ /***/ function(module, exports) { - // 7.2.1 RequireObjectCoercible(argument) - module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; + "use strict"; + + exports.__esModule = true; + + exports.default = function () { + return { + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("objectRestSpread"); + } + }; }; + module.exports = exports["default"]; + /***/ }, -/* 14 */ +/* 57 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - var LIBRARY = __webpack_require__(15) - , $export = __webpack_require__(16) - , redefine = __webpack_require__(21) - , hide = __webpack_require__(22) - , has = __webpack_require__(27) - , Iterators = __webpack_require__(9) - , $iterCreate = __webpack_require__(28) - , setToStringTag = __webpack_require__(29) - , getProto = __webpack_require__(23).getProto - , ITERATOR = __webpack_require__(30)('iterator') - , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` - , FF_ITERATOR = '@@iterator' - , KEYS = 'keys' - , VALUES = 'values'; + "use strict"; - var returnThis = function(){ return this; }; + exports.__esModule = true; - module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ - $iterCreate(Constructor, NAME, next); - var getMethod = function(kind){ - if(!BUGGY && kind in proto)return proto[kind]; - switch(kind){ - case KEYS: return function keys(){ return new Constructor(this, kind); }; - case VALUES: return function values(){ return new Constructor(this, kind); }; - } return function entries(){ return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator' - , DEF_VALUES = DEFAULT == VALUES - , VALUES_BUG = false - , proto = Base.prototype - , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] - , $default = $native || getMethod(DEFAULT) - , methods, key; - // Fix native - if($native){ - var IteratorPrototype = getProto($default.call(new Base)); - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // FF fix - if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); - // fix Array#{values, @@iterator}.name in V8 / FF - if(DEF_VALUES && $native.name !== VALUES){ - VALUES_BUG = true; - $default = function values(){ return $native.call(this); }; - } - } - // Define iterator - if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if(DEFAULT){ - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: !DEF_VALUES ? $default : getMethod('entries') - }; - if(FORCED)for(key in methods){ - if(!(key in proto))redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; - }; + var _classCallCheck2 = __webpack_require__(58); -/***/ }, -/* 15 */ -/***/ function(module, exports) { + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - module.exports = true; + var _getIterator2 = __webpack_require__(3); -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { + var _getIterator3 = _interopRequireDefault(_getIterator2); - var global = __webpack_require__(17) - , core = __webpack_require__(18) - , ctx = __webpack_require__(19) - , PROTOTYPE = 'prototype'; + exports.default = function (_ref) { + var t = _ref.types; - var $export = function(type, name, source){ - var IS_FORCED = type & $export.F - , IS_GLOBAL = type & $export.G - , IS_STATIC = type & $export.S - , IS_PROTO = type & $export.P - , IS_BIND = type & $export.B - , IS_WRAP = type & $export.W - , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] - , key, own, out; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && key in target; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function(C){ - var F = function(param){ - return this instanceof C ? new C(param) : C(param); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; - } - }; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - module.exports = $export; -/***/ }, -/* 17 */ -/***/ function(module, exports) { + function variableDeclarationHasPattern(node) { + for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref2; - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); - if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } -/***/ }, -/* 18 */ -/***/ function(module, exports) { + var declar = _ref2; - var core = module.exports = {version: '1.2.6'}; - if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + if (t.isPattern(declar.id)) { + return true; + } + } + return false; + } -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { + function hasRest(pattern) { + for (var _iterator2 = pattern.elements, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref3; - // optional / simple context binding - var aFunction = __webpack_require__(20); - module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; - }; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } -/***/ }, -/* 20 */ -/***/ function(module, exports) { + var elem = _ref3; - module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; - }; + if (t.isRestElement(elem)) { + return true; + } + } + return false; + } -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { + var arrayUnpackVisitor = { + ReferencedIdentifier: function ReferencedIdentifier(path, state) { + if (state.bindings[path.node.name]) { + state.deopt = true; + path.stop(); + } + } + }; - module.exports = __webpack_require__(22); + var DestructuringTransformer = function () { + function DestructuringTransformer(opts) { + (0, _classCallCheck3.default)(this, DestructuringTransformer); -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { + this.blockHoist = opts.blockHoist; + this.operator = opts.operator; + this.arrays = {}; + this.nodes = opts.nodes || []; + this.scope = opts.scope; + this.file = opts.file; + this.kind = opts.kind; + } - var $ = __webpack_require__(23) - , createDesc = __webpack_require__(24); - module.exports = __webpack_require__(25) ? function(object, key, value){ - return $.setDesc(object, key, createDesc(1, value)); - } : function(object, key, value){ - object[key] = value; - return object; - }; + DestructuringTransformer.prototype.buildVariableAssignment = function buildVariableAssignment(id, init) { + var op = this.operator; + if (t.isMemberExpression(id)) op = "="; -/***/ }, -/* 23 */ -/***/ function(module, exports) { + var node = void 0; - var $Object = Object; - module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach - }; + if (op) { + node = t.expressionStatement(t.assignmentExpression(op, id, init)); + } else { + node = t.variableDeclaration(this.kind, [t.variableDeclarator(id, init)]); + } -/***/ }, -/* 24 */ -/***/ function(module, exports) { + node._blockHoist = this.blockHoist; - module.exports = function(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; - }; + return node; + }; -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { + DestructuringTransformer.prototype.buildVariableDeclaration = function buildVariableDeclaration(id, init) { + var declar = t.variableDeclaration("var", [t.variableDeclarator(id, init)]); + declar._blockHoist = this.blockHoist; + return declar; + }; - // Thank's IE8 for his funny defineProperty - module.exports = !__webpack_require__(26)(function(){ - return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; - }); + DestructuringTransformer.prototype.push = function push(id, init) { + if (t.isObjectPattern(id)) { + this.pushObjectPattern(id, init); + } else if (t.isArrayPattern(id)) { + this.pushArrayPattern(id, init); + } else if (t.isAssignmentPattern(id)) { + this.pushAssignmentPattern(id, init); + } else { + this.nodes.push(this.buildVariableAssignment(id, init)); + } + }; -/***/ }, -/* 26 */ -/***/ function(module, exports) { + DestructuringTransformer.prototype.toArray = function toArray(node, count) { + if (this.file.opts.loose || t.isIdentifier(node) && this.arrays[node.name]) { + return node; + } else { + return this.scope.toArray(node, count); + } + }; - module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } - }; + DestructuringTransformer.prototype.pushAssignmentPattern = function pushAssignmentPattern(pattern, valueRef) { -/***/ }, -/* 27 */ -/***/ function(module, exports) { + var tempValueRef = this.scope.generateUidIdentifierBasedOnNode(valueRef); - var hasOwnProperty = {}.hasOwnProperty; - module.exports = function(it, key){ - return hasOwnProperty.call(it, key); - }; + var declar = t.variableDeclaration("var", [t.variableDeclarator(tempValueRef, valueRef)]); + declar._blockHoist = this.blockHoist; + this.nodes.push(declar); -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { + var tempConditional = t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef); - 'use strict'; - var $ = __webpack_require__(23) - , descriptor = __webpack_require__(24) - , setToStringTag = __webpack_require__(29) - , IteratorPrototype = {}; + var left = pattern.left; + if (t.isPattern(left)) { + var tempValueDefault = t.expressionStatement(t.assignmentExpression("=", tempValueRef, tempConditional)); + tempValueDefault._blockHoist = this.blockHoist; - // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() - __webpack_require__(22)(IteratorPrototype, __webpack_require__(30)('iterator'), function(){ return this; }); + this.nodes.push(tempValueDefault); + this.push(left, tempValueRef); + } else { + this.nodes.push(this.buildVariableAssignment(left, tempConditional)); + } + }; - module.exports = function(Constructor, NAME, next){ - Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); - setToStringTag(Constructor, NAME + ' Iterator'); - }; + DestructuringTransformer.prototype.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) { -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { + var keys = []; - var def = __webpack_require__(23).setDesc - , has = __webpack_require__(27) - , TAG = __webpack_require__(30)('toStringTag'); + for (var i = 0; i < pattern.properties.length; i++) { + var prop = pattern.properties[i]; - module.exports = function(it, tag, stat){ - if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); - }; + if (i >= spreadPropIndex) break; -/***/ }, -/* 30 */ -/***/ function(module, exports, __webpack_require__) { + if (t.isRestProperty(prop)) continue; - var store = __webpack_require__(31)('wks') - , uid = __webpack_require__(32) - , Symbol = __webpack_require__(17).Symbol; - module.exports = function(name){ - return store[name] || (store[name] = - Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); - }; + var key = prop.key; + if (t.isIdentifier(key) && !prop.computed) key = t.stringLiteral(prop.key.name); + keys.push(key); + } -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { + keys = t.arrayExpression(keys); - var global = __webpack_require__(17) - , SHARED = '__core-js_shared__' - , store = global[SHARED] || (global[SHARED] = {}); - module.exports = function(key){ - return store[key] || (store[key] = {}); - }; + var value = t.callExpression(this.file.addHelper("objectWithoutProperties"), [objRef, keys]); + this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value)); + }; -/***/ }, -/* 32 */ -/***/ function(module, exports) { + DestructuringTransformer.prototype.pushObjectProperty = function pushObjectProperty(prop, propRef) { + if (t.isLiteral(prop.key)) prop.computed = true; - var id = 0 - , px = Math.random(); - module.exports = function(key){ - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); - }; + var pattern = prop.value; + var objRef = t.memberExpression(propRef, prop.key, prop.computed); -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { + if (t.isPattern(pattern)) { + this.push(pattern, objRef); + } else { + this.nodes.push(this.buildVariableAssignment(pattern, objRef)); + } + }; - 'use strict'; - var $at = __webpack_require__(34)(true); + DestructuringTransformer.prototype.pushObjectPattern = function pushObjectPattern(pattern, objRef) { - // 21.1.3.27 String.prototype[@@iterator]() - __webpack_require__(14)(String, 'String', function(iterated){ - this._t = String(iterated); // target - this._i = 0; // next index - // 21.1.5.2.1 %StringIteratorPrototype%.next() - }, function(){ - var O = this._t - , index = this._i - , point; - if(index >= O.length)return {value: undefined, done: true}; - point = $at(O, index); - this._i += point.length; - return {value: point, done: false}; - }); + if (!pattern.properties.length) { + this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("objectDestructuringEmpty"), [objRef]))); + } -/***/ }, -/* 34 */ -/***/ function(module, exports, __webpack_require__) { + if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) { + var temp = this.scope.generateUidIdentifierBasedOnNode(objRef); + this.nodes.push(this.buildVariableDeclaration(temp, objRef)); + objRef = temp; + } - var toInteger = __webpack_require__(35) - , defined = __webpack_require__(13); - // true -> String#at - // false -> String#codePointAt - module.exports = function(TO_STRING){ - return function(that, pos){ - var s = String(defined(that)) - , i = toInteger(pos) - , l = s.length - , a, b; - if(i < 0 || i >= l)return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; - }; + for (var i = 0; i < pattern.properties.length; i++) { + var prop = pattern.properties[i]; + if (t.isRestProperty(prop)) { + this.pushObjectRest(pattern, objRef, prop, i); + } else { + this.pushObjectProperty(prop, objRef); + } + } + }; -/***/ }, -/* 35 */ -/***/ function(module, exports) { + DestructuringTransformer.prototype.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) { + if (!t.isArrayExpression(arr)) return false; - // 7.1.4 ToInteger - var ceil = Math.ceil - , floor = Math.floor; - module.exports = function(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); - }; + if (pattern.elements.length > arr.elements.length) return; + if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) return false; -/***/ }, -/* 36 */ -/***/ function(module, exports, __webpack_require__) { + for (var _iterator3 = pattern.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref4; - var anObject = __webpack_require__(37) - , get = __webpack_require__(39); - module.exports = __webpack_require__(18).getIterator = function(it){ - var iterFn = get(it); - if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); - return anObject(iterFn.call(it)); - }; + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } -/***/ }, -/* 37 */ -/***/ function(module, exports, __webpack_require__) { + var elem = _ref4; - var isObject = __webpack_require__(38); - module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); - return it; - }; + if (!elem) return false; -/***/ }, -/* 38 */ -/***/ function(module, exports) { + if (t.isMemberExpression(elem)) return false; + } - module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; + for (var _iterator4 = arr.elements, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref5; -/***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref5 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref5 = _i4.value; + } - var classof = __webpack_require__(40) - , ITERATOR = __webpack_require__(30)('iterator') - , Iterators = __webpack_require__(9); - module.exports = __webpack_require__(18).getIteratorMethod = function(it){ - if(it != undefined)return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; - }; + var _elem = _ref5; -/***/ }, -/* 40 */ -/***/ function(module, exports, __webpack_require__) { + if (t.isSpreadElement(_elem)) return false; - // getting tag from 19.1.3.6 Object.prototype.toString() - var cof = __webpack_require__(12) - , TAG = __webpack_require__(30)('toStringTag') - // ES3 wrong here - , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + if (t.isCallExpression(_elem)) return false; - module.exports = function(it){ - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = (O = Object(it))[TAG]) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; - }; + if (t.isMemberExpression(_elem)) return false; + } -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { + var bindings = t.getBindingIdentifiers(pattern); + var state = { deopt: false, bindings: bindings }; + this.scope.traverse(arr, arrayUnpackVisitor, state); + return !state.deopt; + }; - "use strict"; + DestructuringTransformer.prototype.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) { + for (var i = 0; i < pattern.elements.length; i++) { + var elem = pattern.elements[i]; + if (t.isRestElement(elem)) { + this.push(elem.argument, t.arrayExpression(arr.elements.slice(i))); + } else { + this.push(elem, arr.elements[i]); + } + } + }; - var _interopRequireDefault = __webpack_require__(42)["default"]; + DestructuringTransformer.prototype.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) { + if (!pattern.elements) return; - exports.__esModule = true; + if (this.canUnpackArrayPattern(pattern, arrayRef)) { + return this.pushUnpackedArrayPattern(pattern, arrayRef); + } - var _babelHelperFunctionName = __webpack_require__(43); + var count = !hasRest(pattern) && pattern.elements.length; - var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); + var toArray = this.toArray(arrayRef, count); - exports["default"] = function () { - return { - visitor: { - "ArrowFunctionExpression|FunctionExpression": { - exit: function exit(path) { - if (path.key !== "value" && !path.parentPath.isObjectProperty()) { - var replacement = _babelHelperFunctionName2["default"](path); - if (replacement) path.replaceWith(replacement); + if (t.isIdentifier(toArray)) { + arrayRef = toArray; + } else { + arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef); + this.arrays[arrayRef.name] = true; + this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray)); + } + + for (var i = 0; i < pattern.elements.length; i++) { + var elem = pattern.elements[i]; + + if (!elem) continue; + + var elemRef = void 0; + + if (t.isRestElement(elem)) { + elemRef = this.toArray(arrayRef); + + if (i > 0) { + elemRef = t.callExpression(t.memberExpression(elemRef, t.identifier("slice")), [t.numericLiteral(i)]); } + + elem = elem.argument; + } else { + elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true); } - }, - ObjectProperty: function ObjectProperty(path) { - var value = path.get("value"); - if (value.isFunction()) { - var newNode = _babelHelperFunctionName2["default"](value); - if (newNode) value.replaceWith(newNode); + this.push(elem, elemRef); + } + }; + + DestructuringTransformer.prototype.init = function init(pattern, ref) { + + if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) { + var memo = this.scope.maybeGenerateMemoised(ref, true); + if (memo) { + this.nodes.push(this.buildVariableDeclaration(memo, ref)); + ref = memo; } } - } - }; - }; - module.exports = exports["default"]; + this.push(pattern, ref); -/***/ }, -/* 42 */ -/***/ function(module, exports) { + return this.nodes; + }; - "use strict"; + return DestructuringTransformer; + }(); - exports["default"] = function (obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - }; + return { + visitor: { + ExportNamedDeclaration: function ExportNamedDeclaration(path) { + var declaration = path.get("declaration"); + if (!declaration.isVariableDeclaration()) return; + if (!variableDeclarationHasPattern(declaration.node)) return; - exports.__esModule = true; + var specifiers = []; -/***/ }, -/* 43 */ -/***/ function(module, exports, __webpack_require__) { + for (var name in path.getOuterBindingIdentifiers(path)) { + var id = t.identifier(name); + specifiers.push(t.exportSpecifier(id, id)); + } - "use strict"; + path.replaceWith(declaration.node); + path.insertAfter(t.exportNamedDeclaration(null, specifiers)); + }, + ForXStatement: function ForXStatement(path, file) { + var node = path.node; + var scope = path.scope; - var _interopRequireDefault = __webpack_require__(42)["default"]; + var left = node.left; - var _interopRequireWildcard = __webpack_require__(44)["default"]; + if (t.isPattern(left)) { - exports.__esModule = true; + var temp = scope.generateUidIdentifier("ref"); - var _babelHelperGetFunctionArity = __webpack_require__(45); + node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]); - var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity); + path.ensureBlock(); - var _babelTemplate = __webpack_require__(235); + node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)])); - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); + return; + } - var _babelTypes = __webpack_require__(46); + if (!t.isVariableDeclaration(left)) return; - var t = _interopRequireWildcard(_babelTypes); + var pattern = left.declarations[0].id; + if (!t.isPattern(pattern)) return; - var buildPropertyMethodAssignmentWrapper = _babelTemplate2["default"]("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); + var key = scope.generateUidIdentifier("ref"); + node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]); - var buildGeneratorPropertyMethodAssignmentWrapper = _babelTemplate2["default"]("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); + var nodes = []; - var visitor = { - "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) { - // check if this node matches our function id - if (path.node.name !== state.name) return; + var destructuring = new DestructuringTransformer({ + kind: left.kind, + file: file, + scope: scope, + nodes: nodes + }); - // check that we don't have a local variable declared as that removes the need - // for the wrapper - var localDeclar = path.scope.getBindingIdentifier(state.name); - if (localDeclar !== state.outerDeclar) return; + destructuring.init(pattern, key); - state.selfReference = true; - path.stop(); - } - }; + path.ensureBlock(); - function wrap(state, method, id, scope) { - if (state.selfReference) { - if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { - // we can just munge the local binding - scope.rename(id.name); - } else { - // we don't currently support wrapping class expressions - if (!t.isFunction(method)) return; + var block = node.body; + block.body = nodes.concat(block.body); + }, + CatchClause: function CatchClause(_ref6, file) { + var node = _ref6.node; + var scope = _ref6.scope; - // need to add a wrapper since we can't change the references - var build = buildPropertyMethodAssignmentWrapper; - if (method.generator) build = buildGeneratorPropertyMethodAssignmentWrapper; - var _template = build({ - FUNCTION: method, - FUNCTION_ID: id, - FUNCTION_KEY: scope.generateUidIdentifier(id.name) - }).expression; - _template.callee._skipModulesRemap = true; + var pattern = node.param; + if (!t.isPattern(pattern)) return; - // shim in dummy params to retain function arity, if you try to read the - // source then you'll get the original since it's proxied so it's all good - var params = _template.callee.body.body[0].params; - for (var i = 0, len = _babelHelperGetFunctionArity2["default"](method); i < len; i++) { - params.push(scope.generateUidIdentifier("x")); - } + var ref = scope.generateUidIdentifier("ref"); + node.param = ref; - return _template; - } - } + var nodes = []; - method.id = id; - scope.getProgramParent().references[id.name] = true; - } + var destructuring = new DestructuringTransformer({ + kind: "let", + file: file, + scope: scope, + nodes: nodes + }); + destructuring.init(pattern, ref); - function visit(node, name, scope) { - var state = { - selfAssignment: false, - selfReference: false, - outerDeclar: scope.getBindingIdentifier(name), - references: [], - name: name - }; + node.body.body = nodes.concat(node.body.body); + }, + AssignmentExpression: function AssignmentExpression(path, file) { + var node = path.node; + var scope = path.scope; - // check to see if we have a local binding of the id we're setting inside of - // the function, this is important as there are caveats associated + if (!t.isPattern(node.left)) return; - var binding = scope.getOwnBinding(name); + var nodes = []; - if (binding) { - if (binding.kind === "param") { - // safari will blow up in strict mode with code like: - // - // let t = function t(t) {}; - // - // with the error: - // - // Cannot declare a parameter named 't' as it shadows the name of a - // strict mode function. - // - // this isn't to the spec and they've invented this behaviour which is - // **extremely** annoying so we avoid setting the name if it has a param - // with the same id - state.selfReference = true; - } else { - // otherwise it's defined somewhere in scope like: - // - // let t = function () { - // let t = 2; - // }; - // - // so we can safely just set the id and move along as it shadows the - // bound function id - } - } else if (state.outerDeclar || scope.hasGlobal(name)) { - scope.traverse(node, visitor, state); - } + var destructuring = new DestructuringTransformer({ + operator: node.operator, + file: file, + scope: scope, + nodes: nodes + }); - return state; - } + var ref = void 0; + if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) { + ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref"); - exports["default"] = function (_ref) { - var node = _ref.node; - var parent = _ref.parent; - var scope = _ref.scope; - var id = _ref.id; + nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, node.right)])); - // has an `id` so we don't need to infer one - if (node.id) return; + if (t.isArrayExpression(node.right)) { + destructuring.arrays[ref.name] = true; + } + } - if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, { kind: "method" })) && (!parent.computed || t.isLiteral(parent.key))) { - // { foo() {} }; - id = parent.key; - } else if (t.isVariableDeclarator(parent)) { - // let foo = function () {}; - id = parent.id; + destructuring.init(node.left, ref || node.right); - if (t.isIdentifier(id)) { - var binding = scope.parent.getBinding(id.name); - if (binding && binding.constant && scope.getBinding(id.name) === binding) { - // always going to reference this method - node.id = id; - node.id[t.NOT_LOCAL_BINDING] = true; - return; - } - } - } else if (t.isAssignmentExpression(parent)) { - // foo = function () {}; - id = parent.left; - } else if (!id) { - return; - } + if (ref) { + nodes.push(t.expressionStatement(ref)); + } - var name = undefined; - if (id && t.isLiteral(id)) { - name = id.value; - } else if (id && t.isIdentifier(id)) { - name = id.name; - } else { - return; - } + path.replaceWithMultiple(nodes); + }, + VariableDeclaration: function VariableDeclaration(path, file) { + var node = path.node; + var scope = path.scope; + var parent = path.parent; - name = t.toBindingIdentifierName(name); - id = t.identifier(name); + if (t.isForXStatement(parent)) return; + if (!parent || !path.container) return; + if (!variableDeclarationHasPattern(node)) return; - // The id shouldn't be considered a local binding to the function because - // we are simply trying to set the function name and not actually create - // a local binding. - id[t.NOT_LOCAL_BINDING] = true; + var nodes = []; + var declar = void 0; - var state = visit(node, name, scope); - return wrap(state, node, id, scope) || node; + for (var i = 0; i < node.declarations.length; i++) { + declar = node.declarations[i]; + + var patternId = declar.init; + var pattern = declar.id; + + var destructuring = new DestructuringTransformer({ + blockHoist: node._blockHoist, + nodes: nodes, + scope: scope, + kind: node.kind, + file: file + }); + + if (t.isPattern(pattern)) { + destructuring.init(pattern, patternId); + + if (+i !== node.declarations.length - 1) { + t.inherits(nodes[nodes.length - 1], declar); + } + } else { + nodes.push(t.inherits(destructuring.buildVariableAssignment(declar.id, declar.init), declar)); + } + } + + var nodesOut = []; + for (var _iterator5 = nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { + var _ref7; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref7 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref7 = _i5.value; + } + + var _node = _ref7; + + var tail = nodesOut[nodesOut.length - 1]; + if (tail && t.isVariableDeclaration(tail) && t.isVariableDeclaration(_node) && tail.kind === _node.kind) { + var _tail$declarations; + + (_tail$declarations = tail.declarations).push.apply(_tail$declarations, _node.declarations); + } else { + nodesOut.push(_node); + } + } + + if (nodesOut.length === 1) { + path.replaceWith(nodesOut[0]); + } else { + path.replaceWithMultiple(nodesOut); + } + } + } + }; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + module.exports = exports["default"]; /***/ }, -/* 44 */ +/* 58 */ /***/ function(module, exports) { "use strict"; - exports["default"] = function (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]; - } - } + exports.__esModule = true; - newObj["default"] = obj; - return newObj; + exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); } }; - exports.__esModule = true; - /***/ }, -/* 45 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _interopRequireWildcard = __webpack_require__(44)["default"]; - exports.__esModule = true; - var _babelTypes = __webpack_require__(46); + var _getIterator2 = __webpack_require__(3); - var t = _interopRequireWildcard(_babelTypes); + var _getIterator3 = _interopRequireDefault(_getIterator2); - exports["default"] = function (node) /*: number*/ { - var params /*: Array*/ = node.params; - for (var i = 0; i < params.length; i++) { - var param = params[i]; - if (t.isAssignmentPattern(param) || t.isRestElement(param)) { - return i; - } - } - return params.length; + exports.default = function () { + return { + visitor: _babelTraverse.visitors.merge([{ + ArrowFunctionExpression: function ArrowFunctionExpression(path) { + var params = path.get("params"); + for (var _iterator = params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var param = _ref; + + if (param.isRestElement() || param.isAssignmentPattern()) { + path.arrowFunctionToShadowed(); + break; + } + } + } + }, destructuring.visitor, rest.visitor, def.visitor]) + }; }; + var _babelTraverse = __webpack_require__(60); + + var _destructuring = __webpack_require__(369); + + var destructuring = _interopRequireWildcard(_destructuring); + + var _default = __webpack_require__(370); + + var def = _interopRequireWildcard(_default); + + var _rest = __webpack_require__(378); + + var rest = _interopRequireWildcard(_rest); + + 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; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + module.exports = exports["default"]; /***/ }, -/* 46 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ - "use strict"; - var _Object$keys = __webpack_require__(47)["default"]; + exports.__esModule = true; + exports.visitors = exports.Hub = exports.Scope = exports.NodePath = undefined; - var _getIterator = __webpack_require__(3)["default"]; + var _getIterator2 = __webpack_require__(3); - var _interopRequireDefault = __webpack_require__(42)["default"]; + var _getIterator3 = _interopRequireDefault(_getIterator2); - var _interopRequireWildcard = __webpack_require__(44)["default"]; + var _path = __webpack_require__(61); - var _defaults = __webpack_require__(52)["default"]; + Object.defineProperty(exports, "NodePath", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_path).default; + } + }); - var _interopExportWildcard = __webpack_require__(62)["default"]; + var _scope = __webpack_require__(298); - exports.__esModule = true; - exports.is = is; - exports.isType = isType; - exports.validate = validate; - exports.shallowEqual = shallowEqual; - exports.appendToMemberExpression = appendToMemberExpression; - exports.prependToMemberExpression = prependToMemberExpression; - exports.ensureBlock = ensureBlock; - exports.clone = clone; - exports.cloneWithoutLoc = cloneWithoutLoc; - exports.cloneDeep = cloneDeep; - exports.buildMatchMemberExpression = buildMatchMemberExpression; - exports.removeComments = removeComments; - exports.inheritsComments = inheritsComments; - exports.inheritTrailingComments = inheritTrailingComments; - exports.inheritLeadingComments = inheritLeadingComments; - exports.inheritInnerComments = inheritInnerComments; - exports.inherits = inherits; - exports.assertNode = assertNode; - exports.isNode = isNode; + Object.defineProperty(exports, "Scope", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_scope).default; + } + }); - var _toFastProperties = __webpack_require__(63); + var _hub = __webpack_require__(366); - var _toFastProperties2 = _interopRequireDefault(_toFastProperties); + Object.defineProperty(exports, "Hub", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_hub).default; + } + }); + exports.default = traverse; - var _lodashArrayCompact = __webpack_require__(64); + var _context = __webpack_require__(367); - var _lodashArrayCompact2 = _interopRequireDefault(_lodashArrayCompact); + var _context2 = _interopRequireDefault(_context); - var _lodashLangClone = __webpack_require__(65); + var _visitors = __webpack_require__(368); - var _lodashLangClone2 = _interopRequireDefault(_lodashLangClone); + var visitors = _interopRequireWildcard(_visitors); - var _lodashCollectionEach = __webpack_require__(97); + var _babelMessages = __webpack_require__(332); - var _lodashCollectionEach2 = _interopRequireDefault(_lodashCollectionEach); + var messages = _interopRequireWildcard(_babelMessages); - var _lodashArrayUniq = __webpack_require__(102); + var _includes = __webpack_require__(316); - var _lodashArrayUniq2 = _interopRequireDefault(_lodashArrayUniq); + var _includes2 = _interopRequireDefault(_includes); - __webpack_require__(133); + var _babelTypes = __webpack_require__(63); - var _definitions = __webpack_require__(134); + var t = _interopRequireWildcard(_babelTypes); - var _react2 = __webpack_require__(148); + var _cache = __webpack_require__(335); - var _react = _interopRequireWildcard(_react2); + var cache = _interopRequireWildcard(_cache); - var t = exports; + 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; } } - /** - * Registers `is[Type]` and `assert[Type]` generated functions for a given `type`. - * Pass `skipAliasCheck` to force it to directly compare `node.type` with `type`. - */ + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function registerType(type /*: string*/) { - var is = t["is" + type] = function (node, opts) { - return t.is(type, node, opts); - }; + exports.visitors = visitors; + function traverse(parent, opts, scope, state, parentPath) { + if (!parent) return; + if (!opts) opts = {}; - t["assert" + type] = function (node, opts) { - opts = opts || {}; - if (!is(node, opts)) { - throw new Error("Expected type " + JSON.stringify(type) + " with option " + JSON.stringify(opts)); + if (!opts.noScope && !scope) { + if (parent.type !== "Program" && parent.type !== "File") { + throw new Error(messages.get("traverseNeedsParent", parent.type)); } - }; - } - - // - - var _constants = __webpack_require__(136); + } - _defaults(exports, _interopExportWildcard(_constants, _defaults)); + visitors.explode(opts); - exports.VISITOR_KEYS = _definitions.VISITOR_KEYS; - exports.ALIAS_KEYS = _definitions.ALIAS_KEYS; - exports.NODE_FIELDS = _definitions.NODE_FIELDS; - exports.BUILDER_KEYS = _definitions.BUILDER_KEYS; - exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS; - exports.react = _react; + traverse.node(parent, opts, scope, state, parentPath); + } - /** - * Registers `is[Type]` and `assert[Type]` for all types. - */ + traverse.visitors = visitors; + traverse.verify = visitors.verify; + traverse.explode = visitors.explode; - for (var type in t.VISITOR_KEYS) { - registerType(type); - } + traverse.NodePath = __webpack_require__(61); + traverse.Scope = __webpack_require__(298); + traverse.Hub = __webpack_require__(366); - /** - * Flip `ALIAS_KEYS` for faster access in the reverse direction. - */ + traverse.cheap = function (node, enter) { + return t.traverseFast(node, enter); + }; - t.FLIPPED_ALIAS_KEYS = {}; + traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { + var keys = t.VISITOR_KEYS[node.type]; + if (!keys) return; - _lodashCollectionEach2["default"](t.ALIAS_KEYS, function (aliases, type) { - _lodashCollectionEach2["default"](aliases, function (alias) { - var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || []; - types.push(type); - }); - }); + var context = new _context2.default(scope, opts, state, parentPath); + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; - /** - * Registers `is[Alias]` and `assert[Alias]` functions for all aliases. - */ + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } - _lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS, function (types, type) { - t[type.toUpperCase() + "_TYPES"] = types; - registerType(type); - }); + var key = _ref; - var TYPES = _Object$keys(t.VISITOR_KEYS).concat(_Object$keys(t.FLIPPED_ALIAS_KEYS)).concat(_Object$keys(t.DEPRECATED_KEYS)); + if (skipKeys && skipKeys[key]) continue; + if (context.visit(node, key)) return; + } + }; - exports.TYPES = TYPES; - /** - * Returns whether `node` is of given `type`. - * - * For better performance, use this instead of `is[Type]` when `type` is unknown. - * Optionally, pass `skipAliasCheck` to directly compare `node.type` with `type`. - */ + traverse.clearNode = function (node, opts) { + t.removeProperties(node, opts); - function is(type /*: string*/, node /*: Object*/, opts /*:: ?: Object*/) /*: boolean*/ { - if (!node) return false; + cache.path.delete(node); + }; - var matches = isType(node.type, type); - if (!matches) return false; + traverse.removeProperties = function (tree, opts) { + t.traverseFast(tree, traverse.clearNode, opts); + return tree; + }; - if (typeof opts === "undefined") { - return true; - } else { - return t.shallowEqual(node, opts); + function hasBlacklistedType(path, state) { + if (path.node.type === state.type) { + state.has = true; + path.stop(); } } - /** - * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`. - */ + traverse.hasType = function (tree, scope, type, blacklistTypes) { + if ((0, _includes2.default)(blacklistTypes, tree.type)) return false; - function isType(nodeType /*: string*/, targetType /*: string*/) /*: boolean*/ { - if (nodeType === targetType) return true; + if (tree.type === type) return true; - var aliases /*: ?Array*/ = t.FLIPPED_ALIAS_KEYS[targetType]; - if (aliases) { - if (aliases[0] === nodeType) return true; + var state = { + has: false, + type: type + }; - for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + traverse(tree, { + blacklist: blacklistTypes, + enter: hasBlacklistedType + }, scope, state); - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } + return state.has; + }; - var alias = _ref; + traverse.clearCache = function () { + cache.clear(); + }; - if (nodeType === alias) return true; - } + traverse.copyCache = function (source, destination) { + if (cache.path.has(source)) { + cache.path.set(destination, cache.path.get(source)); } + }; - return false; - } - - /** - * Description - */ +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { - _lodashCollectionEach2["default"](t.BUILDER_KEYS, function (keys, type) { - function builder() { - if (arguments.length > keys.length) { - throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive no more than " + keys.length); - } + "use strict"; - var node = {}; - node.type = type; + exports.__esModule = true; - var i = 0; + var _getIterator2 = __webpack_require__(3); - for (var _iterator2 = (keys /*: Array*/), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + var _getIterator3 = _interopRequireDefault(_getIterator2); - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } + var _classCallCheck2 = __webpack_require__(58); - var key = _ref2; + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - var field = t.NODE_FIELDS[type][key]; + var _virtualTypes = __webpack_require__(62); - var arg = arguments[i++]; - if (arg === undefined) arg = _lodashLangClone2["default"](field["default"]); + var virtualTypes = _interopRequireWildcard(_virtualTypes); - node[key] = arg; - } + var _debug2 = __webpack_require__(280); - for (var key in node) { - validate(node, key, node[key]); - } + var _debug3 = _interopRequireDefault(_debug2); - return node; - } + var _invariant = __webpack_require__(287); - t[type] = builder; - t[type[0].toLowerCase() + type.slice(1)] = builder; - }); + var _invariant2 = _interopRequireDefault(_invariant); - /** - * Description - */ + var _index = __webpack_require__(60); - var _loop = function (type) { - var proxy = function proxy(fn) { - return function () { - console.trace("The node type " + type + " has been renamed to " + newType); - return fn.apply(this, arguments); - }; - }; + var _index2 = _interopRequireDefault(_index); - var newType = t.DEPRECATED_KEYS[type]; + var _assign = __webpack_require__(288); - t[type] = t[type[0].toLowerCase() + type.slice(1)] = proxy(t[newType]); - t["is" + type] = proxy(t["is" + newType]); - t["assert" + type] = proxy(t["assert" + newType]); - }; + var _assign2 = _interopRequireDefault(_assign); - for (var type in t.DEPRECATED_KEYS) { - _loop(type); - } + var _scope = __webpack_require__(298); - /** - * Description - */ + var _scope2 = _interopRequireDefault(_scope); - function validate(node /*:: ?: Object*/, key /*: string*/, val /*: any*/) { - if (!node) return; + var _babelTypes = __webpack_require__(63); - var fields = t.NODE_FIELDS[node.type]; - if (!fields) return; + var t = _interopRequireWildcard(_babelTypes); - var field = fields[key]; - if (!field || !field.validate) return; - if (field.optional && val == null) return; + var _cache = __webpack_require__(335); - field.validate(node, key, val); - } + 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; } } - /** - * Test if an object is shallowly equal. - */ + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function shallowEqual(actual /*: Object*/, expected /*: Object*/) /*: boolean*/ { - var keys = _Object$keys(expected); + var _debug = (0, _debug3.default)("babel"); - for (var _iterator3 = (keys /*: Array*/), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; + var NodePath = function () { + function NodePath(hub, parent) { + (0, _classCallCheck3.default)(this, NodePath); - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } + this.parent = parent; + this.hub = hub; + this.contexts = []; + this.data = {}; + this.shouldSkip = false; + this.shouldStop = false; + this.removed = false; + this.state = null; + this.opts = null; + this.skipKeys = null; + this.parentPath = null; + this.context = null; + this.container = null; + this.listKey = null; + this.inList = false; + this.parentKey = null; + this.key = null; + this.node = null; + this.scope = null; + this.type = null; + this.typeAnnotation = null; + } - var key = _ref3; + NodePath.get = function get(_ref) { + var hub = _ref.hub; + var parentPath = _ref.parentPath; + var parent = _ref.parent; + var container = _ref.container; + var listKey = _ref.listKey; + var key = _ref.key; - if (actual[key] !== expected[key]) { - return false; + if (!hub && parentPath) { + hub = parentPath.hub; } - } - return true; - } + (0, _invariant2.default)(parent, "To get a node path the parent needs to exist"); - /** - * Append a node to a member expression. - */ + var targetNode = container[key]; - function appendToMemberExpression(member /*: Object*/, append /*: Object*/, computed /*:: ?: boolean*/) /*: Object*/ { - member.object = t.memberExpression(member.object, member.property, member.computed); - member.property = append; - member.computed = !!computed; - return member; - } + var paths = _cache.path.get(parent) || []; + if (!_cache.path.has(parent)) { + _cache.path.set(parent, paths); + } - /** - * Prepend a node to a member expression. - */ + var path = void 0; - function prependToMemberExpression(member /*: Object*/, prepend /*: Object*/) /*: Object*/ { - member.object = t.memberExpression(prepend, member.object); - return member; - } - - /** - * Ensure the `key` (defaults to "body") of a `node` is a block. - * Casting it to a block if it is not. - */ + for (var i = 0; i < paths.length; i++) { + var pathCheck = paths[i]; + if (pathCheck.node === targetNode) { + path = pathCheck; + break; + } + } - function ensureBlock(node /*: Object*/) /*: Object*/ { - var key /*: string*/ = arguments.length <= 1 || arguments[1] === undefined ? "body" : arguments[1]; + if (!path) { + path = new NodePath(hub, parent); + paths.push(path); + } - return node[key] = t.toBlock(node[key], node); - } + path.setup(parentPath, container, listKey, key); - /** - * Create a shallow clone of a `node` excluding `_private` properties. - */ + return path; + }; - function clone(node /*: Object*/) /*: Object*/ { - var newNode = {}; - for (var key in node) { - if (key[0] === "_") continue; - newNode[key] = node[key]; - } - return newNode; - } + NodePath.prototype.getScope = function getScope(scope) { + var ourScope = scope; - /** - * Create a shallow clone of a `node` excluding `_private` and location properties. - */ + if (this.isScope()) { + ourScope = new _scope2.default(this, scope); + } - function cloneWithoutLoc(node /*: Object*/) /*: Object*/ { - var newNode = clone(node); - delete newNode.loc; - return newNode; - } + return ourScope; + }; - /** - * Create a deep clone of a `node` and all of it's child nodes - * exluding `_private` properties. - */ + NodePath.prototype.setData = function setData(key, val) { + return this.data[key] = val; + }; - function cloneDeep(node /*: Object*/) /*: Object*/ { - var newNode = {}; + NodePath.prototype.getData = function getData(key, def) { + var val = this.data[key]; + if (!val && def) val = this.data[key] = def; + return val; + }; - for (var key in node) { - if (key[0] === "_") continue; + NodePath.prototype.buildCodeFrameError = function buildCodeFrameError(msg) { + var Error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SyntaxError; - var val = node[key]; + return this.hub.file.buildCodeFrameError(this.node, msg, Error); + }; - if (val) { - if (val.type) { - val = t.cloneDeep(val); - } else if (Array.isArray(val)) { - val = val.map(t.cloneDeep); - } - } + NodePath.prototype.traverse = function traverse(visitor, state) { + (0, _index2.default)(this.node, visitor, this.scope, state, this); + }; - newNode[key] = val; - } + NodePath.prototype.mark = function mark(type, message) { + this.hub.file.metadata.marked.push({ + type: type, + message: message, + loc: this.node.loc + }); + }; - return newNode; - } + NodePath.prototype.set = function set(key, node) { + t.validate(this.node, key, node); + this.node[key] = node; + }; - /** - * Build a function that when called will return whether or not the - * input `node` `MemberExpression` matches the input `match`. - * - * For example, given the match `React.createClass` it would match the - * parsed nodes of `React.createClass` and `React["createClass"]`. - */ + NodePath.prototype.getPathLocation = function getPathLocation() { + var parts = []; + var path = this; + do { + var key = path.key; + if (path.inList) key = path.listKey + "[" + key + "]"; + parts.unshift(key); + } while (path = path.parentPath); + return parts.join("."); + }; - function buildMatchMemberExpression(match /*:string*/, allowPartial /*:: ?: boolean*/) /*: Function*/ { - var parts = match.split("."); + NodePath.prototype.debug = function debug(buildMessage) { + if (!_debug.enabled) return; + _debug(this.getPathLocation() + " " + this.type + ": " + buildMessage()); + }; - return function (member) { - // not a member expression - if (!t.isMemberExpression(member)) return false; + return NodePath; + }(); - var search = [member]; - var i = 0; + exports.default = NodePath; - while (search.length) { - var node = search.shift(); - if (allowPartial && i === parts.length) { - return true; - } + (0, _assign2.default)(NodePath.prototype, __webpack_require__(341)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(342)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(345)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(356)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(357)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(358)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(359)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(360)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(362)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(364)); + (0, _assign2.default)(NodePath.prototype, __webpack_require__(365)); - if (t.isIdentifier(node)) { - // this part doesn't match - if (parts[i] !== node.name) return false; - } else if (t.isStringLiteral(node)) { - // this part doesn't match - if (parts[i] !== node.value) return false; - } else if (t.isMemberExpression(node)) { - if (node.computed && !t.isStringLiteral(node.property)) { - // we can't deal with this - return false; - } else { - search.push(node.object); - search.push(node.property); - continue; - } - } else { - // we can't deal with this - return false; - } + var _loop2 = function _loop2() { + if (_isArray) { + if (_i >= _iterator.length) return "break"; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) return "break"; + _ref2 = _i.value; + } - // too many parts - if (++i > parts.length) { - return false; - } - } + var type = _ref2; - return true; + var typeKey = "is" + type; + NodePath.prototype[typeKey] = function (opts) { + return t[typeKey](this.node, opts); }; - } - - /** - * Remove comment properties from a node. - */ - - function removeComments(node /*: Object*/) /*: Object*/ { - for (var _iterator4 = t.COMMENT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { - var _ref4; - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; + NodePath.prototype["assert" + type] = function (opts) { + if (!this[typeKey](opts)) { + throw new TypeError("Expected node path of type " + type); } + }; + }; - var key = _ref4; + for (var _iterator = t.TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref2; - delete node[key]; - } - return node; + var _ret2 = _loop2(); + + if (_ret2 === "break") break; } - /** - * Inherit all unique comments from `parent` node to `child` node. - */ + var _loop = function _loop(type) { + if (type[0] === "_") return "continue"; + if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type); - function inheritsComments(child /*: Object*/, parent /*: Object*/) /*: Object*/ { - inheritTrailingComments(child, parent); - inheritLeadingComments(child, parent); - inheritInnerComments(child, parent); - return child; - } + var virtualType = virtualTypes[type]; - function inheritTrailingComments(child /*: Object*/, parent /*: Object*/) { - _inheritComments("trailingComments", child, parent); - } + NodePath.prototype["is" + type] = function (opts) { + return virtualType.checkPath(this, opts); + }; + }; - function inheritLeadingComments(child /*: Object*/, parent /*: Object*/) { - _inheritComments("leadingComments", child, parent); - } + for (var type in virtualTypes) { + var _ret = _loop(type); - function inheritInnerComments(child /*: Object*/, parent /*: Object*/) { - _inheritComments("innerComments", child, parent); + if (_ret === "continue") continue; } + module.exports = exports["default"]; - function _inheritComments(key, child, parent) { - if (child && parent) { - child[key] = _lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key], parent[key]))); - } - } +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Inherit all contextual properties from `parent` node to `child` node. - */ + "use strict"; - function inherits(child /*: Object*/, parent /*: Object*/) /*: Object*/ { - if (!child || !parent) return child; + exports.__esModule = true; + exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = undefined; - // optionally inherit specific properties if not null - for (var _iterator5 = (t.INHERIT_KEYS.optional /*: Array*/), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { - var _ref5; + var _babelTypes = __webpack_require__(63); - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } + var t = _interopRequireWildcard(_babelTypes); + + 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 key = _ref5; + var ReferencedIdentifier = exports.ReferencedIdentifier = { + types: ["Identifier", "JSXIdentifier"], + checkPath: function checkPath(_ref, opts) { + var node = _ref.node; + var parent = _ref.parent; - if (child[key] == null) { - child[key] = parent[key]; + if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) { + if (t.isJSXIdentifier(node, opts)) { + if (_babelTypes.react.isCompatTag(node.name)) return false; + } else { + return false; + } } - } - // force inherit "private" properties - for (var key in parent) { - if (key[0] === "_") child[key] = parent[key]; + return t.isReferenced(node, parent); } + }; - // force inherit select properties - for (var _iterator6 = (t.INHERIT_KEYS.force /*: Array*/), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _getIterator(_iterator6);;) { - var _ref6; + var ReferencedMemberExpression = exports.ReferencedMemberExpression = { + types: ["MemberExpression"], + checkPath: function checkPath(_ref2) { + var node = _ref2.node; + var parent = _ref2.parent; - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref6 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref6 = _i6.value; - } + return t.isMemberExpression(node) && t.isReferenced(node, parent); + } + }; - var key = _ref6; + var BindingIdentifier = exports.BindingIdentifier = { + types: ["Identifier"], + checkPath: function checkPath(_ref3) { + var node = _ref3.node; + var parent = _ref3.parent; - child[key] = parent[key]; + return t.isIdentifier(node) && t.isBinding(node, parent); } + }; - t.inheritsComments(child, parent); - - return child; - } + var Statement = exports.Statement = { + types: ["Statement"], + checkPath: function checkPath(_ref4) { + var node = _ref4.node; + var parent = _ref4.parent; - /** - * TODO - */ + if (t.isStatement(node)) { + if (t.isVariableDeclaration(node)) { + if (t.isForXStatement(parent, { left: node })) return false; + if (t.isForStatement(parent, { init: node })) return false; + } - function assertNode(node /*:: ?*/) { - if (!isNode(node)) { - // $FlowFixMe - throw new TypeError("Not a valid node " + (node && node.type)); + return true; + } else { + return false; + } } - } - - /** - * TODO - */ + }; - function isNode(node /*:: ?*/) /*: boolean*/ { - return !!(node && _definitions.VISITOR_KEYS[node.type]); - } - - // Optimize property access. - _toFastProperties2["default"](t); - _toFastProperties2["default"](t.VISITOR_KEYS); + var Expression = exports.Expression = { + types: ["Expression"], + checkPath: function checkPath(path) { + if (path.isIdentifier()) { + return path.isReferencedIdentifier(); + } else { + return t.isExpression(path.node); + } + } + }; - // + var Scope = exports.Scope = { + types: ["Scopable"], + checkPath: function checkPath(path) { + return t.isScope(path.node, path.parent); + } + }; - var _retrievers = __webpack_require__(149); + var Referenced = exports.Referenced = { + checkPath: function checkPath(path) { + return t.isReferenced(path.node, path.parent); + } + }; - _defaults(exports, _interopExportWildcard(_retrievers, _defaults)); + var BlockScoped = exports.BlockScoped = { + checkPath: function checkPath(path) { + return t.isBlockScoped(path.node); + } + }; - var _validators = __webpack_require__(152); + var Var = exports.Var = { + types: ["VariableDeclaration"], + checkPath: function checkPath(path) { + return t.isVar(path.node); + } + }; - _defaults(exports, _interopExportWildcard(_validators, _defaults)); + var User = exports.User = { + checkPath: function checkPath(path) { + return path.node && !!path.node.loc; + } + }; - var _converters = __webpack_require__(157); + var Generated = exports.Generated = { + checkPath: function checkPath(path) { + return !path.isUser(); + } + }; - _defaults(exports, _interopExportWildcard(_converters, _defaults)); + var Pure = exports.Pure = { + checkPath: function checkPath(path, opts) { + return path.scope.isPure(path.node, opts); + } + }; - var _flow = __webpack_require__(234); + var Flow = exports.Flow = { + types: ["Flow", "ImportDeclaration", "ExportDeclaration"], + checkPath: function checkPath(_ref5) { + var node = _ref5.node; - _defaults(exports, _interopExportWildcard(_flow, _defaults)); + if (t.isFlow(node)) { + return true; + } else if (t.isImportDeclaration(node)) { + return node.importKind === "type" || node.importKind === "typeof"; + } else if (t.isExportDeclaration(node)) { + return node.exportKind === "type"; + } else { + return false; + } + } + }; /***/ }, -/* 47 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(48), __esModule: true }; - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { + "use strict"; - __webpack_require__(49); - module.exports = __webpack_require__(18).Object.keys; + exports.__esModule = true; + exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined; -/***/ }, -/* 49 */ -/***/ function(module, exports, __webpack_require__) { + var _getOwnPropertySymbols = __webpack_require__(64); - // 19.1.2.14 Object.keys(O) - var toObject = __webpack_require__(50); + var _getOwnPropertySymbols2 = _interopRequireDefault(_getOwnPropertySymbols); - __webpack_require__(51)('keys', function($keys){ - return function keys(it){ - return $keys(toObject(it)); - }; - }); + var _getIterator2 = __webpack_require__(3); -/***/ }, -/* 50 */ -/***/ function(module, exports, __webpack_require__) { + var _getIterator3 = _interopRequireDefault(_getIterator2); - // 7.1.13 ToObject(argument) - var defined = __webpack_require__(13); - module.exports = function(it){ - return Object(defined(it)); - }; + var _keys = __webpack_require__(78); -/***/ }, -/* 51 */ -/***/ function(module, exports, __webpack_require__) { + var _keys2 = _interopRequireDefault(_keys); - // most Object methods by ES6 should accept primitives - var $export = __webpack_require__(16) - , core = __webpack_require__(18) - , fails = __webpack_require__(26); - module.exports = function(KEY, exec){ - var fn = (core.Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); - }; + var _stringify = __webpack_require__(82); -/***/ }, -/* 52 */ -/***/ function(module, exports, __webpack_require__) { + var _stringify2 = _interopRequireDefault(_stringify); - "use strict"; + var _constants = __webpack_require__(84); - var _Object$getOwnPropertyNames = __webpack_require__(53)["default"]; + Object.defineProperty(exports, "STATEMENT_OR_BLOCK_KEYS", { + enumerable: true, + get: function get() { + return _constants.STATEMENT_OR_BLOCK_KEYS; + } + }); + Object.defineProperty(exports, "FLATTENABLE_KEYS", { + enumerable: true, + get: function get() { + return _constants.FLATTENABLE_KEYS; + } + }); + Object.defineProperty(exports, "FOR_INIT_KEYS", { + enumerable: true, + get: function get() { + return _constants.FOR_INIT_KEYS; + } + }); + Object.defineProperty(exports, "COMMENT_KEYS", { + enumerable: true, + get: function get() { + return _constants.COMMENT_KEYS; + } + }); + Object.defineProperty(exports, "LOGICAL_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.LOGICAL_OPERATORS; + } + }); + Object.defineProperty(exports, "UPDATE_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.UPDATE_OPERATORS; + } + }); + Object.defineProperty(exports, "BOOLEAN_NUMBER_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BOOLEAN_NUMBER_BINARY_OPERATORS; + } + }); + Object.defineProperty(exports, "EQUALITY_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.EQUALITY_BINARY_OPERATORS; + } + }); + Object.defineProperty(exports, "COMPARISON_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.COMPARISON_BINARY_OPERATORS; + } + }); + Object.defineProperty(exports, "BOOLEAN_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BOOLEAN_BINARY_OPERATORS; + } + }); + Object.defineProperty(exports, "NUMBER_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.NUMBER_BINARY_OPERATORS; + } + }); + Object.defineProperty(exports, "BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BINARY_OPERATORS; + } + }); + Object.defineProperty(exports, "BOOLEAN_UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BOOLEAN_UNARY_OPERATORS; + } + }); + Object.defineProperty(exports, "NUMBER_UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.NUMBER_UNARY_OPERATORS; + } + }); + Object.defineProperty(exports, "STRING_UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.STRING_UNARY_OPERATORS; + } + }); + Object.defineProperty(exports, "UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.UNARY_OPERATORS; + } + }); + Object.defineProperty(exports, "INHERIT_KEYS", { + enumerable: true, + get: function get() { + return _constants.INHERIT_KEYS; + } + }); + Object.defineProperty(exports, "BLOCK_SCOPED_SYMBOL", { + enumerable: true, + get: function get() { + return _constants.BLOCK_SCOPED_SYMBOL; + } + }); + Object.defineProperty(exports, "NOT_LOCAL_BINDING", { + enumerable: true, + get: function get() { + return _constants.NOT_LOCAL_BINDING; + } + }); + exports.is = is; + exports.isType = isType; + exports.validate = validate; + exports.shallowEqual = shallowEqual; + exports.appendToMemberExpression = appendToMemberExpression; + exports.prependToMemberExpression = prependToMemberExpression; + exports.ensureBlock = ensureBlock; + exports.clone = clone; + exports.cloneWithoutLoc = cloneWithoutLoc; + exports.cloneDeep = cloneDeep; + exports.buildMatchMemberExpression = buildMatchMemberExpression; + exports.removeComments = removeComments; + exports.inheritsComments = inheritsComments; + exports.inheritTrailingComments = inheritTrailingComments; + exports.inheritLeadingComments = inheritLeadingComments; + exports.inheritInnerComments = inheritInnerComments; + exports.inherits = inherits; + exports.assertNode = assertNode; + exports.isNode = isNode; + exports.traverseFast = traverseFast; + exports.removeProperties = removeProperties; + exports.removePropertiesDeep = removePropertiesDeep; - var _Object$getOwnPropertyDescriptor = __webpack_require__(57)["default"]; + var _retrievers = __webpack_require__(87); - var _Object$defineProperty = __webpack_require__(60)["default"]; + Object.defineProperty(exports, "getBindingIdentifiers", { + enumerable: true, + get: function get() { + return _retrievers.getBindingIdentifiers; + } + }); + Object.defineProperty(exports, "getOuterBindingIdentifiers", { + enumerable: true, + get: function get() { + return _retrievers.getOuterBindingIdentifiers; + } + }); - exports["default"] = function (obj, defaults) { - var keys = _Object$getOwnPropertyNames(defaults); + var _validators = __webpack_require__(91); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; + Object.defineProperty(exports, "isBinding", { + enumerable: true, + get: function get() { + return _validators.isBinding; + } + }); + Object.defineProperty(exports, "isReferenced", { + enumerable: true, + get: function get() { + return _validators.isReferenced; + } + }); + Object.defineProperty(exports, "isValidIdentifier", { + enumerable: true, + get: function get() { + return _validators.isValidIdentifier; + } + }); + Object.defineProperty(exports, "isLet", { + enumerable: true, + get: function get() { + return _validators.isLet; + } + }); + Object.defineProperty(exports, "isBlockScoped", { + enumerable: true, + get: function get() { + return _validators.isBlockScoped; + } + }); + Object.defineProperty(exports, "isVar", { + enumerable: true, + get: function get() { + return _validators.isVar; + } + }); + Object.defineProperty(exports, "isSpecifierDefault", { + enumerable: true, + get: function get() { + return _validators.isSpecifierDefault; + } + }); + Object.defineProperty(exports, "isScope", { + enumerable: true, + get: function get() { + return _validators.isScope; + } + }); + Object.defineProperty(exports, "isImmutable", { + enumerable: true, + get: function get() { + return _validators.isImmutable; + } + }); - var value = _Object$getOwnPropertyDescriptor(defaults, key); + var _converters = __webpack_require__(96); - if (value && value.configurable && obj[key] === undefined) { - _Object$defineProperty(obj, key, value); - } + Object.defineProperty(exports, "toComputedKey", { + enumerable: true, + get: function get() { + return _converters.toComputedKey; + } + }); + Object.defineProperty(exports, "toSequenceExpression", { + enumerable: true, + get: function get() { + return _converters.toSequenceExpression; + } + }); + Object.defineProperty(exports, "toKeyAlias", { + enumerable: true, + get: function get() { + return _converters.toKeyAlias; + } + }); + Object.defineProperty(exports, "toIdentifier", { + enumerable: true, + get: function get() { + return _converters.toIdentifier; + } + }); + Object.defineProperty(exports, "toBindingIdentifierName", { + enumerable: true, + get: function get() { + return _converters.toBindingIdentifierName; + } + }); + Object.defineProperty(exports, "toStatement", { + enumerable: true, + get: function get() { + return _converters.toStatement; + } + }); + Object.defineProperty(exports, "toExpression", { + enumerable: true, + get: function get() { + return _converters.toExpression; + } + }); + Object.defineProperty(exports, "toBlock", { + enumerable: true, + get: function get() { + return _converters.toBlock; + } + }); + Object.defineProperty(exports, "valueToNode", { + enumerable: true, + get: function get() { + return _converters.valueToNode; } + }); - return obj; - }; + var _flow = __webpack_require__(114); - exports.__esModule = true; + Object.defineProperty(exports, "createUnionTypeAnnotation", { + enumerable: true, + get: function get() { + return _flow.createUnionTypeAnnotation; + } + }); + Object.defineProperty(exports, "removeTypeDuplicates", { + enumerable: true, + get: function get() { + return _flow.removeTypeDuplicates; + } + }); + Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { + enumerable: true, + get: function get() { + return _flow.createTypeAnnotationBasedOnTypeof; + } + }); -/***/ }, -/* 53 */ -/***/ function(module, exports, __webpack_require__) { + var _toFastProperties = __webpack_require__(115); - module.exports = { "default": __webpack_require__(54), __esModule: true }; + var _toFastProperties2 = _interopRequireDefault(_toFastProperties); -/***/ }, -/* 54 */ -/***/ function(module, exports, __webpack_require__) { + var _compact = __webpack_require__(116); - var $ = __webpack_require__(23); - __webpack_require__(55); - module.exports = function getOwnPropertyNames(it){ - return $.getNames(it); - }; + var _compact2 = _interopRequireDefault(_compact); -/***/ }, -/* 55 */ -/***/ function(module, exports, __webpack_require__) { + var _clone = __webpack_require__(117); - // 19.1.2.7 Object.getOwnPropertyNames(O) - __webpack_require__(51)('getOwnPropertyNames', function(){ - return __webpack_require__(56).get; - }); + var _clone2 = _interopRequireDefault(_clone); -/***/ }, -/* 56 */ -/***/ function(module, exports, __webpack_require__) { + var _each = __webpack_require__(210); - // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window - var toIObject = __webpack_require__(10) - , getNames = __webpack_require__(23).getNames - , toString = {}.toString; + var _each2 = _interopRequireDefault(_each); - var windowNames = typeof window == 'object' && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; + var _uniq = __webpack_require__(253); - var getWindowNames = function(it){ - try { - return getNames(it); - } catch(e){ - return windowNames.slice(); - } - }; + var _uniq2 = _interopRequireDefault(_uniq); - module.exports.get = function getOwnPropertyNames(it){ - if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); - return getNames(toIObject(it)); - }; + __webpack_require__(263); -/***/ }, -/* 57 */ -/***/ function(module, exports, __webpack_require__) { + var _definitions = __webpack_require__(264); - module.exports = { "default": __webpack_require__(58), __esModule: true }; + var _react2 = __webpack_require__(279); -/***/ }, -/* 58 */ -/***/ function(module, exports, __webpack_require__) { + var _react = _interopRequireWildcard(_react2); - var $ = __webpack_require__(23); - __webpack_require__(59); - module.exports = function getOwnPropertyDescriptor(it, key){ - return $.getDesc(it, key); - }; + 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; } } -/***/ }, -/* 59 */ -/***/ function(module, exports, __webpack_require__) { + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var t = exports; - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - var toIObject = __webpack_require__(10); + function registerType(type) { + var is = t["is" + type]; + if (!is) { + is = t["is" + type] = function (node, opts) { + return t.is(type, node, opts); + }; + } - __webpack_require__(51)('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){ - return function getOwnPropertyDescriptor(it, key){ - return $getOwnPropertyDescriptor(toIObject(it), key); + t["assert" + type] = function (node, opts) { + opts = opts || {}; + if (!is(node, opts)) { + throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts)); + } }; - }); + } -/***/ }, -/* 60 */ -/***/ function(module, exports, __webpack_require__) { + exports.VISITOR_KEYS = _definitions.VISITOR_KEYS; + exports.ALIAS_KEYS = _definitions.ALIAS_KEYS; + exports.NODE_FIELDS = _definitions.NODE_FIELDS; + exports.BUILDER_KEYS = _definitions.BUILDER_KEYS; + exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS; + exports.react = _react; - module.exports = { "default": __webpack_require__(61), __esModule: true }; -/***/ }, -/* 61 */ -/***/ function(module, exports, __webpack_require__) { + for (var type in t.VISITOR_KEYS) { + registerType(type); + } - var $ = __webpack_require__(23); - module.exports = function defineProperty(it, key, desc){ - return $.setDesc(it, key, desc); - }; + t.FLIPPED_ALIAS_KEYS = {}; -/***/ }, -/* 62 */ -/***/ function(module, exports) { + (0, _each2.default)(t.ALIAS_KEYS, function (aliases, type) { + (0, _each2.default)(aliases, function (alias) { + var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || []; + types.push(type); + }); + }); - "use strict"; + (0, _each2.default)(t.FLIPPED_ALIAS_KEYS, function (types, type) { + t[type.toUpperCase() + "_TYPES"] = types; + registerType(type); + }); - exports["default"] = function (obj, defaults) { - var newObj = defaults({}, obj); - delete newObj["default"]; - return newObj; - }; + var TYPES = exports.TYPES = (0, _keys2.default)(t.VISITOR_KEYS).concat((0, _keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0, _keys2.default)(t.DEPRECATED_KEYS)); - exports.__esModule = true; + function is(type, node, opts) { + if (!node) return false; -/***/ }, -/* 63 */ -/***/ function(module, exports) { + var matches = isType(node.type, type); + if (!matches) return false; - 'use strict'; - module.exports = function toFastProperties(obj) { - /*jshint -W027*/ - function f() {} - f.prototype = obj; - new f(); - return; - eval(obj); - }; + if (typeof opts === "undefined") { + return true; + } else { + return t.shallowEqual(node, opts); + } + } + function isType(nodeType, targetType) { + if (nodeType === targetType) return true; -/***/ }, -/* 64 */ -/***/ function(module, exports) { + if (t.ALIAS_KEYS[targetType]) return false; - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array ? array.length : 0, - resIndex = -1, - result = []; + var aliases = t.FLIPPED_ALIAS_KEYS[targetType]; + if (aliases) { + if (aliases[0] === nodeType) return true; - while (++index < length) { - var value = array[index]; - if (value) { - result[++resIndex] = value; + for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var alias = _ref; + + if (nodeType === alias) return true; } } - return result; + + return false; } - module.exports = compact; + (0, _each2.default)(t.BUILDER_KEYS, function (keys, type) { + function builder() { + if (arguments.length > keys.length) { + throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length)); + } + var node = {}; + node.type = type; -/***/ }, -/* 65 */ -/***/ function(module, exports, __webpack_require__) { + var i = 0; - var baseClone = __webpack_require__(66), - bindCallback = __webpack_require__(94), - isIterateeCall = __webpack_require__(96); + for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; - /** - * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, - * otherwise they are assigned by reference. If `customizer` is provided it's - * invoked to produce the cloned values. If `customizer` returns `undefined` - * cloning is handled by the method instead. The `customizer` is bound to - * `thisArg` and invoked with up to three argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var shallow = _.clone(users); - * shallow[0] === users[0]; - * // => true - * - * var deep = _.clone(users, true); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.clone(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 0 - */ - function clone(value, isDeep, customizer, thisArg) { - if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { - isDeep = false; - } - else if (typeof isDeep == 'function') { - thisArg = customizer; - customizer = isDeep; - isDeep = false; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _key = _ref2; + + var field = t.NODE_FIELDS[type][_key]; + + var arg = arguments[i++]; + if (arg === undefined) arg = (0, _clone2.default)(field.default); + + node[_key] = arg; + } + + for (var key in node) { + validate(node, key, node[key]); + } + + return node; } - return typeof customizer == 'function' - ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 3)) - : baseClone(value, isDeep); - } - module.exports = clone; + t[type] = builder; + t[type[0].toLowerCase() + type.slice(1)] = builder; + }); + var _loop = function _loop(_type) { + var newType = t.DEPRECATED_KEYS[_type]; -/***/ }, -/* 66 */ -/***/ function(module, exports, __webpack_require__) { + function proxy(fn) { + return function () { + console.trace("The node type " + _type + " has been renamed to " + newType); + return fn.apply(this, arguments); + }; + } - var arrayCopy = __webpack_require__(67), - arrayEach = __webpack_require__(68), - baseAssign = __webpack_require__(69), - baseForOwn = __webpack_require__(86), - initCloneArray = __webpack_require__(90), - initCloneByTag = __webpack_require__(91), - initCloneObject = __webpack_require__(93), - isArray = __webpack_require__(83), - isObject = __webpack_require__(75); + t[_type] = t[_type[0].toLowerCase() + _type.slice(1)] = proxy(t[newType]); + t["is" + _type] = proxy(t["is" + newType]); + t["assert" + _type] = proxy(t["assert" + newType]); + }; - /** `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]'; + for (var _type in t.DEPRECATED_KEYS) { + _loop(_type); + } - var arrayBufferTag = '[object ArrayBuffer]', - 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]'; + function validate(node, key, val) { + if (!node) return; - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = - cloneableTags[dateTag] = cloneableTags[float32Tag] = - cloneableTags[float64Tag] = cloneableTags[int8Tag] = - cloneableTags[int16Tag] = cloneableTags[int32Tag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[stringTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[mapTag] = cloneableTags[setTag] = - cloneableTags[weakMapTag] = false; + var fields = t.NODE_FIELDS[node.type]; + if (!fields) return; - /** Used for native method references. */ - var objectProto = Object.prototype; + var field = fields[key]; + if (!field || !field.validate) return; + if (field.optional && val == null) return; - /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; + field.validate(node, key, val); + } - /** - * The base implementation of `_.clone` without support for argument juggling - * and `this` binding `customizer` functions. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The object `value` belongs to. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {*} Returns the cloned value. - */ - function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { - var result; - if (customizer) { - result = object ? customizer(value, key, object) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return arrayCopy(value, result); - } - } else { - var tag = objToString.call(value), - isFunc = tag == funcTag; + function shallowEqual(actual, expected) { + var keys = (0, _keys2.default)(expected); - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return baseAssign(result, value); - } + for (var _iterator3 = keys, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; } else { - return cloneableTags[tag] - ? initCloneByTag(value, tag, isDeep) - : (object ? value : {}); + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; } - } - // Check for circular references and return its corresponding clone. - stackA || (stackA = []); - stackB || (stackB = []); - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; + var key = _ref3; + + if (actual[key] !== expected[key]) { + return false; } } - // Add the source value to the stack of traversed objects and associate it with its clone. - stackA.push(value); - stackB.push(result); - // Recursively populate clone (susceptible to call stack limits). - (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); - }); - return result; + return true; } - module.exports = baseClone; + function appendToMemberExpression(member, append, computed) { + member.object = t.memberExpression(member.object, member.property, member.computed); + member.property = append; + member.computed = !!computed; + return member; + } + function prependToMemberExpression(member, prepend) { + member.object = t.memberExpression(prepend, member.object); + return member; + } -/***/ }, -/* 67 */ -/***/ function(module, exports) { + function ensureBlock(node) { + var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "body"; - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function arrayCopy(source, array) { - var index = -1, - length = source.length; + return node[key] = t.toBlock(node[key], node); + } - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; + function clone(node) { + var newNode = {}; + for (var key in node) { + if (key[0] === "_") continue; + newNode[key] = node[key]; } - return array; + return newNode; } - module.exports = arrayCopy; + function cloneWithoutLoc(node) { + var newNode = clone(node); + delete newNode.loc; + return newNode; + } + function cloneDeep(node) { + var newNode = {}; -/***/ }, -/* 68 */ -/***/ function(module, exports) { + for (var key in node) { + if (key[0] === "_") continue; - /** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array.length; + var val = node[key]; - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; + if (val) { + if (val.type) { + val = t.cloneDeep(val); + } else if (Array.isArray(val)) { + val = val.map(t.cloneDeep); + } } + + newNode[key] = val; } - return array; + + return newNode; } - module.exports = arrayEach; + function buildMatchMemberExpression(match, allowPartial) { + var parts = match.split("."); + return function (member) { + if (!t.isMemberExpression(member)) return false; -/***/ }, -/* 69 */ -/***/ function(module, exports, __webpack_require__) { + var search = [member]; + var i = 0; + + while (search.length) { + var node = search.shift(); - var baseCopy = __webpack_require__(70), - keys = __webpack_require__(71); + if (allowPartial && i === parts.length) { + return true; + } - /** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssign(object, source) { - return source == null - ? object - : baseCopy(source, keys(source), object); - } + if (t.isIdentifier(node)) { + if (parts[i] !== node.name) return false; + } else if (t.isStringLiteral(node)) { + if (parts[i] !== node.value) return false; + } else if (t.isMemberExpression(node)) { + if (node.computed && !t.isStringLiteral(node.property)) { + return false; + } else { + search.push(node.object); + search.push(node.property); + continue; + } + } else { + return false; + } - module.exports = baseAssign; + if (++i > parts.length) { + return false; + } + } + return true; + }; + } -/***/ }, -/* 70 */ -/***/ function(module, exports) { + function removeComments(node) { + for (var _iterator4 = t.COMMENT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref4; - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ - function baseCopy(source, props, object) { - object || (object = {}); + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } - var index = -1, - length = props.length; + var key = _ref4; - while (++index < length) { - var key = props[index]; - object[key] = source[key]; + delete node[key]; } - return object; + return node; } - module.exports = baseCopy; - + function inheritsComments(child, parent) { + inheritTrailingComments(child, parent); + inheritLeadingComments(child, parent); + inheritInnerComments(child, parent); + return child; + } -/***/ }, -/* 71 */ -/***/ function(module, exports, __webpack_require__) { + function inheritTrailingComments(child, parent) { + _inheritComments("trailingComments", child, parent); + } - var getNative = __webpack_require__(72), - isArrayLike = __webpack_require__(77), - isObject = __webpack_require__(75), - shimKeys = __webpack_require__(81); + function inheritLeadingComments(child, parent) { + _inheritComments("leadingComments", child, parent); + } - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeKeys = getNative(Object, 'keys'); + function inheritInnerComments(child, parent) { + _inheritComments("innerComments", child, parent); + } - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? undefined : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && isArrayLike(object))) { - return shimKeys(object); + function _inheritComments(key, child, parent) { + if (child && parent) { + child[key] = (0, _uniq2.default)((0, _compact2.default)([].concat(child[key], parent[key]))); } - return isObject(object) ? nativeKeys(object) : []; - }; - - module.exports = keys; - + } -/***/ }, -/* 72 */ -/***/ function(module, exports, __webpack_require__) { + function inherits(child, parent) { + if (!child || !parent) return child; - var isNative = __webpack_require__(73); + for (var _iterator5 = t.INHERIT_KEYS.optional, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { + var _ref5; - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; - } + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } - module.exports = getNative; + var _key2 = _ref5; + if (child[_key2] == null) { + child[_key2] = parent[_key2]; + } + } -/***/ }, -/* 73 */ -/***/ function(module, exports, __webpack_require__) { + for (var key in parent) { + if (key[0] === "_") child[key] = parent[key]; + } - var isFunction = __webpack_require__(74), - isObjectLike = __webpack_require__(76); + for (var _iterator6 = t.INHERIT_KEYS.force, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { + var _ref6; - /** Used to detect host constructors (Safari > 5). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } - /** Used for native method references. */ - var objectProto = Object.prototype; + var _key3 = _ref6; - /** Used to resolve the decompiled source of functions. */ - var fnToString = Function.prototype.toString; + child[_key3] = parent[_key3]; + } - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + t.inheritsComments(child, parent); - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); + return child; + } - /** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ - function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); + function assertNode(node) { + if (!isNode(node)) { + throw new TypeError("Not a valid node " + (node && node.type)); } - return isObjectLike(value) && reIsHostCtor.test(value); } - module.exports = isNative; - + function isNode(node) { + return !!(node && _definitions.VISITOR_KEYS[node.type]); + } -/***/ }, -/* 74 */ -/***/ function(module, exports, __webpack_require__) { + (0, _toFastProperties2.default)(t); + (0, _toFastProperties2.default)(t.VISITOR_KEYS); - var isObject = __webpack_require__(75); + function traverseFast(node, enter, opts) { + if (!node) return; - /** `Object#toString` result references. */ - var funcTag = '[object Function]'; - - /** Used for native 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 objToString = objectProto.toString; + var keys = t.VISITOR_KEYS[node.type]; + if (!keys) return; - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 which returns 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; - } + opts = opts || {}; + enter(node, opts); - module.exports = isFunction; + for (var _iterator7 = keys, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { + var _ref7; + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } -/***/ }, -/* 75 */ -/***/ function(module, exports) { + var key = _ref7; - /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ - function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); - } + var subNode = node[key]; - module.exports = isObject; + if (Array.isArray(subNode)) { + for (var _iterator8 = subNode, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { + var _ref8; + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref8 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref8 = _i8.value; + } -/***/ }, -/* 76 */ -/***/ function(module, exports) { + var _node = _ref8; - /** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ - function isObjectLike(value) { - return !!value && typeof value == 'object'; + traverseFast(_node, enter, opts); + } + } else { + traverseFast(subNode, enter, opts); + } + } } - module.exports = isObjectLike; - - -/***/ }, -/* 77 */ -/***/ function(module, exports, __webpack_require__) { - - var getLength = __webpack_require__(78), - isLength = __webpack_require__(80); + var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; - /** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ - function isArrayLike(value) { - return value != null && isLength(getLength(value)); - } + var CLEAR_KEYS_PLUS_COMMENTS = t.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); - module.exports = isArrayLike; + function removeProperties(node, opts) { + opts = opts || {}; + var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; + for (var _iterator9 = map, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { + var _ref9; + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref9 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref9 = _i9.value; + } -/***/ }, -/* 78 */ -/***/ function(module, exports, __webpack_require__) { + var _key4 = _ref9; - var baseProperty = __webpack_require__(79); + if (node[_key4] != null) node[_key4] = undefined; + } - /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ - var getLength = baseProperty('length'); + for (var key in node) { + if (key[0] === "_" && node[key] != null) node[key] = undefined; + } - module.exports = getLength; + var syms = (0, _getOwnPropertySymbols2.default)(node); + for (var _iterator10 = syms, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) { + var _ref10; + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref10 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref10 = _i10.value; + } -/***/ }, -/* 79 */ -/***/ function(module, exports) { + var sym = _ref10; - /** - * 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 function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; + node[sym] = null; + } } - module.exports = baseProperty; - - -/***/ }, -/* 80 */ -/***/ function(module, exports) { - - /** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ - var MAX_SAFE_INTEGER = 9007199254740991; - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + function removePropertiesDeep(tree, opts) { + traverseFast(tree, removeProperties, opts); + return tree; } - module.exports = isLength; +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + module.exports = { "default": __webpack_require__(65), __esModule: true }; /***/ }, -/* 81 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { - var isArguments = __webpack_require__(82), - isArray = __webpack_require__(83), - isIndex = __webpack_require__(84), - isLength = __webpack_require__(80), - keysIn = __webpack_require__(85); + __webpack_require__(66); + module.exports = __webpack_require__(18).Object.getOwnPropertySymbols; - /** Used for native method references. */ - var objectProto = Object.prototype; +/***/ }, +/* 66 */ +/***/ function(module, exports, __webpack_require__) { - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + 'use strict'; + // ECMAScript 6 symbols shim + var global = __webpack_require__(17) + , has = __webpack_require__(32) + , DESCRIPTORS = __webpack_require__(26) + , $export = __webpack_require__(16) + , redefine = __webpack_require__(31) + , META = __webpack_require__(67).KEY + , $fails = __webpack_require__(27) + , shared = __webpack_require__(43) + , setToStringTag = __webpack_require__(47) + , uid = __webpack_require__(44) + , wks = __webpack_require__(48) + , wksExt = __webpack_require__(68) + , wksDefine = __webpack_require__(69) + , keyOf = __webpack_require__(70) + , enumKeys = __webpack_require__(71) + , isArray = __webpack_require__(74) + , anObject = __webpack_require__(23) + , toIObject = __webpack_require__(10) + , toPrimitive = __webpack_require__(29) + , createDesc = __webpack_require__(30) + , _create = __webpack_require__(34) + , gOPNExt = __webpack_require__(75) + , $GOPD = __webpack_require__(77) + , $DP = __webpack_require__(22) + , $keys = __webpack_require__(36) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; - /** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; + }) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); + } : dP; - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object)); + var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; + }; - var index = -1, - result = []; + var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; + } : function(it){ + return it instanceof $Symbol; + }; - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; - } + var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; + }; - module.exports = shimKeys; + // 19.4.1.1 Symbol([description]) + if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(76).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(73).f = $propertyIsEnumerable; + __webpack_require__(72).f = $getOwnPropertySymbols; -/***/ }, -/* 82 */ -/***/ function(module, exports, __webpack_require__) { + if(DESCRIPTORS && !__webpack_require__(15)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } - var isArrayLike = __webpack_require__(77), - isObjectLike = __webpack_require__(76); + wksExt.f = function(name){ + return wrap(wks(name)); + } + } - /** Used for native method references. */ - var objectProto = Object.prototype; + $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); - /** Native method references. */ - var propertyIsEnumerable = objectProto.propertyIsEnumerable; + for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); - /** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && - hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); - } + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } + }); - module.exports = isArguments; + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(21)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); /***/ }, -/* 83 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { - var getNative = __webpack_require__(72), - isLength = __webpack_require__(80), - isObjectLike = __webpack_require__(76); - - /** `Object#toString` result references. */ - var arrayTag = '[object Array]'; + var META = __webpack_require__(44)('meta') + , isObject = __webpack_require__(24) + , has = __webpack_require__(32) + , setDesc = __webpack_require__(22).f + , id = 0; + var isExtensible = Object.isExtensible || function(){ + return true; + }; + var FREEZE = !__webpack_require__(27)(function(){ + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); + }; + var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; + }; + var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; + }; + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; - /** Used for native method references. */ - var objectProto = Object.prototype; +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; + exports.f = __webpack_require__(48); - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeIsArray = getNative(Array, 'isArray'); +/***/ }, +/* 69 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ - var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + var global = __webpack_require__(17) + , core = __webpack_require__(18) + , LIBRARY = __webpack_require__(15) + , wksExt = __webpack_require__(68) + , defineProperty = __webpack_require__(22).f; + module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; - module.exports = isArray; +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + var getKeys = __webpack_require__(36) + , toIObject = __webpack_require__(10); + module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; + }; /***/ }, -/* 84 */ -/***/ function(module, exports) { +/* 71 */ +/***/ function(module, exports, __webpack_require__) { - /** Used to detect unsigned integer values. */ - var reIsUint = /^\d+$/; + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(36) + , gOPS = __webpack_require__(72) + , pIE = __webpack_require__(73); + module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; + }; - /** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ - var MAX_SAFE_INTEGER = 9007199254740991; +/***/ }, +/* 72 */ +/***/ function(module, exports) { - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; - } + exports.f = Object.getOwnPropertySymbols; - module.exports = isIndex; +/***/ }, +/* 73 */ +/***/ function(module, exports) { + exports.f = {}.propertyIsEnumerable; /***/ }, -/* 85 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { - var isArguments = __webpack_require__(82), - isArray = __webpack_require__(83), - isIndex = __webpack_require__(84), - isLength = __webpack_require__(80), - isObject = __webpack_require__(75); - - /** Used for native method references. */ - var objectProto = Object.prototype; + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(12); + module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; + }; - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(10) + , gOPN = __webpack_require__(76).f + , toString = {}.toString; - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } + var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); } - return result; - } + }; - module.exports = keysIn; + module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); + }; /***/ }, -/* 86 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { - var baseFor = __webpack_require__(87), - keys = __webpack_require__(71); - - /** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return baseFor(object, iteratee, keys); - } - - module.exports = baseForOwn; + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(37) + , hiddenKeys = __webpack_require__(45).concat('length', 'prototype'); + exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); + }; /***/ }, -/* 87 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { - var createBaseFor = __webpack_require__(88); - - /** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - module.exports = baseFor; + var pIE = __webpack_require__(73) + , createDesc = __webpack_require__(30) + , toIObject = __webpack_require__(10) + , toPrimitive = __webpack_require__(29) + , has = __webpack_require__(32) + , IE8_DOM_DEFINE = __webpack_require__(25) + , gOPD = Object.getOwnPropertyDescriptor; + exports.f = __webpack_require__(26) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); + }; /***/ }, -/* 88 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { - var toObject = __webpack_require__(89); - - /** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } + module.exports = { "default": __webpack_require__(79), __esModule: true }; - module.exports = createBaseFor; +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + __webpack_require__(80); + module.exports = __webpack_require__(18).Object.keys; /***/ }, -/* 89 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(75); - - /** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ - function toObject(value) { - return isObject(value) ? value : Object(value); - } - - module.exports = toObject; + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(50) + , $keys = __webpack_require__(36); + __webpack_require__(81)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; + }); /***/ }, -/* 90 */ -/***/ function(module, exports) { - - /** Used for native method references. */ - var objectProto = Object.prototype; +/* 81 */ +/***/ function(module, exports, __webpack_require__) { - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(16) + , core = __webpack_require__(18) + , fails = __webpack_require__(27); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; - /** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ - function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); +/***/ }, +/* 82 */ +/***/ function(module, exports, __webpack_require__) { - // Add array properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; - } + module.exports = { "default": __webpack_require__(83), __esModule: true }; - module.exports = initCloneArray; +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + var core = __webpack_require__(18) + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); + module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); + }; /***/ }, -/* 91 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { - var bufferClone = __webpack_require__(92); + "use strict"; - /** `Object#toString` result references. */ - var boolTag = '[object Boolean]', - dateTag = '[object Date]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; + exports.__esModule = true; + exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined; - var arrayBufferTag = '[object ArrayBuffer]', - 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]'; + var _for = __webpack_require__(85); - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; + var _for2 = _interopRequireDefault(_for); - /** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return bufferClone(object); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - case boolTag: - case dateTag: - return new Ctor(+object); + var STATEMENT_OR_BLOCK_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; + var FLATTENABLE_KEYS = exports.FLATTENABLE_KEYS = ["body", "expressions"]; + var FOR_INIT_KEYS = exports.FOR_INIT_KEYS = ["left", "init"]; + var COMMENT_KEYS = exports.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - var buffer = object.buffer; - return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + var LOGICAL_OPERATORS = exports.LOGICAL_OPERATORS = ["||", "&&"]; + var UPDATE_OPERATORS = exports.UPDATE_OPERATORS = ["++", "--"]; - case numberTag: - case stringTag: - return new Ctor(object); + var BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; + var EQUALITY_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; + var COMPARISON_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]); + var BOOLEAN_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS); + var NUMBER_BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; + var BINARY_OPERATORS = exports.BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS); - case regexpTag: - var result = new Ctor(object.source, reFlags.exec(object)); - result.lastIndex = object.lastIndex; - } - return result; - } + var BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; + var NUMBER_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = ["+", "-", "++", "--", "~"]; + var STRING_UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = ["typeof"]; + var UNARY_OPERATORS = exports.UNARY_OPERATORS = ["void"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS); - module.exports = initCloneByTag; + var INHERIT_KEYS = exports.INHERIT_KEYS = { + optional: ["typeAnnotation", "typeParameters", "returnType"], + force: ["start", "loc", "end"] + }; + var BLOCK_SCOPED_SYMBOL = exports.BLOCK_SCOPED_SYMBOL = (0, _for2.default)("var used to be block scoped"); + var NOT_LOCAL_BINDING = exports.NOT_LOCAL_BINDING = (0, _for2.default)("should not be considered a local binding"); /***/ }, -/* 92 */ -/***/ function(module, exports) { +/* 85 */ +/***/ function(module, exports, __webpack_require__) { - /** Native method references. */ - var ArrayBuffer = global.ArrayBuffer, - Uint8Array = global.Uint8Array; + module.exports = { "default": __webpack_require__(86), __esModule: true }; - /** - * Creates a clone of the given array buffer. - * - * @private - * @param {ArrayBuffer} buffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ - function bufferClone(buffer) { - var result = new ArrayBuffer(buffer.byteLength), - view = new Uint8Array(result); +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { - view.set(new Uint8Array(buffer)); - return result; - } + __webpack_require__(66); + module.exports = __webpack_require__(18).Symbol['for']; - module.exports = bufferClone; +/***/ }, +/* 87 */ +/***/ function(module, exports, __webpack_require__) { + "use strict"; -/***/ }, -/* 93 */ -/***/ function(module, exports) { + exports.__esModule = true; - /** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneObject(object) { - var Ctor = object.constructor; - if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { - Ctor = Object; - } - return new Ctor; - } + var _create = __webpack_require__(88); - module.exports = initCloneObject; + var _create2 = _interopRequireDefault(_create); + exports.getBindingIdentifiers = getBindingIdentifiers; + exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; -/***/ }, -/* 94 */ -/***/ function(module, exports, __webpack_require__) { + var _index = __webpack_require__(63); - var identity = __webpack_require__(95); + var t = _interopRequireWildcard(_index); - /** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ - function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (thisArg === undefined) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; - } + 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; } } - module.exports = bindCallback; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function getBindingIdentifiers(node, duplicates, outerOnly) { + var search = [].concat(node); + var ids = (0, _create2.default)(null); -/***/ }, -/* 95 */ -/***/ function(module, exports) { + while (search.length) { + var id = search.shift(); + if (!id) continue; - /** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * _.identity(object) === object; - * // => true - */ - function identity(value) { - return value; - } + var keys = t.getBindingIdentifiers.keys[id.type]; - module.exports = identity; + if (t.isIdentifier(id)) { + if (duplicates) { + var _ids = ids[id.name] = ids[id.name] || []; + _ids.push(id); + } else { + ids[id.name] = id; + } + continue; + } + if (t.isExportDeclaration(id)) { + if (t.isDeclaration(node.declaration)) { + search.push(node.declaration); + } + continue; + } -/***/ }, -/* 96 */ -/***/ function(module, exports, __webpack_require__) { + if (outerOnly) { + if (t.isFunctionDeclaration(id)) { + search.push(id.id); + continue; + } - var isArrayLike = __webpack_require__(77), - isIndex = __webpack_require__(84), - isObject = __webpack_require__(75); + if (t.isFunctionExpression(id)) { + continue; + } + } - /** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); + if (keys) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (id[key]) { + search = search.concat(id[key]); + } + } + } } - return false; + + return ids; } - module.exports = isIterateeCall; + getBindingIdentifiers.keys = { + DeclareClass: ["id"], + DeclareFunction: ["id"], + DeclareModule: ["id"], + DeclareVariable: ["id"], + InterfaceDeclaration: ["id"], + TypeAlias: ["id"], + CatchClause: ["param"], + LabeledStatement: ["label"], + UnaryExpression: ["argument"], + AssignmentExpression: ["left"], -/***/ }, -/* 97 */ -/***/ function(module, exports, __webpack_require__) { + ImportSpecifier: ["local"], + ImportNamespaceSpecifier: ["local"], + ImportDefaultSpecifier: ["local"], + ImportDeclaration: ["specifiers"], - module.exports = __webpack_require__(98); + ExportSpecifier: ["exported"], + ExportNamespaceSpecifier: ["exported"], + ExportDefaultSpecifier: ["exported"], + FunctionDeclaration: ["id", "params"], + FunctionExpression: ["id", "params"], -/***/ }, -/* 98 */ -/***/ function(module, exports, __webpack_require__) { + ClassDeclaration: ["id"], + ClassExpression: ["id"], - var arrayEach = __webpack_require__(68), - baseEach = __webpack_require__(99), - createForEach = __webpack_require__(101); + RestElement: ["argument"], + UpdateExpression: ["argument"], - /** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early - * by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" property - * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ - var forEach = createForEach(arrayEach, baseEach); + RestProperty: ["argument"], + ObjectProperty: ["value"], - module.exports = forEach; + AssignmentPattern: ["left"], + ArrayPattern: ["elements"], + ObjectPattern: ["properties"], + + VariableDeclaration: ["declarations"], + VariableDeclarator: ["id"] + }; + function getOuterBindingIdentifiers(node, duplicates) { + return getBindingIdentifiers(node, duplicates, true); + } /***/ }, -/* 99 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { - var baseForOwn = __webpack_require__(86), - createBaseEach = __webpack_require__(100); - - /** - * The base implementation of `_.forEach` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - module.exports = baseEach; - + module.exports = { "default": __webpack_require__(89), __esModule: true }; /***/ }, -/* 100 */ +/* 89 */ /***/ function(module, exports, __webpack_require__) { - var getLength = __webpack_require__(78), - isLength = __webpack_require__(80), - toObject = __webpack_require__(89); - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - return eachFunc(collection, iteratee); - } - var index = fromRight ? length : -1, - iterable = toObject(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } + __webpack_require__(90); + var $Object = __webpack_require__(18).Object; + module.exports = function create(P, D){ + return $Object.create(P, D); + }; - module.exports = createBaseEach; +/***/ }, +/* 90 */ +/***/ function(module, exports, __webpack_require__) { + var $export = __webpack_require__(16) + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', {create: __webpack_require__(34)}); /***/ }, -/* 101 */ +/* 91 */ /***/ function(module, exports, __webpack_require__) { - var bindCallback = __webpack_require__(94), - isArray = __webpack_require__(83); - - /** - * Creates a function for `_.forEach` or `_.forEachRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ - function createForEach(arrayFunc, eachFunc) { - return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee) - : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); - }; - } + "use strict"; - module.exports = createForEach; + exports.__esModule = true; + var _getIterator2 = __webpack_require__(3); -/***/ }, -/* 102 */ -/***/ function(module, exports, __webpack_require__) { + var _getIterator3 = _interopRequireDefault(_getIterator2); - var baseCallback = __webpack_require__(103), - baseUniq = __webpack_require__(125), - isIterateeCall = __webpack_require__(96), - sortedUniq = __webpack_require__(132); + exports.isBinding = isBinding; + exports.isReferenced = isReferenced; + exports.isValidIdentifier = isValidIdentifier; + exports.isLet = isLet; + exports.isBlockScoped = isBlockScoped; + exports.isVar = isVar; + exports.isSpecifierDefault = isSpecifierDefault; + exports.isScope = isScope; + exports.isImmutable = isImmutable; - /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurence of each element - * is kept. Providing `true` for `isSorted` performs a faster search algorithm - * for sorted arrays. If an iteratee function is provided it's invoked for - * each element in the array to generate the criterion by which uniqueness - * is computed. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index, array). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Array - * @param {Array} array The array to inspect. - * @param {boolean} [isSorted] Specify the array is sorted. - * @param {Function|Object|string} [iteratee] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new duplicate-value-free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - * - * // using `isSorted` - * _.uniq([1, 1, 2], true); - * // => [1, 2] - * - * // using an iteratee function - * _.uniq([1, 2.5, 1.5, 2], function(n) { - * return this.floor(n); - * }, Math); - * // => [1, 2.5] - * - * // using the `_.property` callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - function uniq(array, isSorted, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (isSorted != null && typeof isSorted != 'boolean') { - thisArg = iteratee; - iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; - isSorted = false; - } - iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); - return (isSorted) - ? sortedUniq(array, iteratee) - : baseUniq(array, iteratee); - } + var _retrievers = __webpack_require__(87); - module.exports = uniq; + var _esutils = __webpack_require__(92); + var _esutils2 = _interopRequireDefault(_esutils); -/***/ }, -/* 103 */ -/***/ function(module, exports, __webpack_require__) { + var _index = __webpack_require__(63); - var baseMatches = __webpack_require__(104), - baseMatchesProperty = __webpack_require__(116), - bindCallback = __webpack_require__(94), - identity = __webpack_require__(95), - property = __webpack_require__(123); + var t = _interopRequireWildcard(_index); - /** - * The base implementation of `_.callback` which supports specifying the - * number of arguments to provide to `func`. - * - * @private - * @param {*} [func=_.identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ - function baseCallback(func, thisArg, argCount) { - var type = typeof func; - if (type == 'function') { - return thisArg === undefined - ? func - : bindCallback(func, thisArg, argCount); - } - if (func == null) { - return identity; - } - if (type == 'object') { - return baseMatches(func); - } - return thisArg === undefined - ? property(func) - : baseMatchesProperty(func, thisArg); - } + var _constants = __webpack_require__(84); - module.exports = baseCallback; + 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; } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }, -/* 104 */ -/***/ function(module, exports, __webpack_require__) { + function isBinding(node, parent) { + var keys = _retrievers.getBindingIdentifiers.keys[parent.type]; + if (keys) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var val = parent[key]; + if (Array.isArray(val)) { + if (val.indexOf(node) >= 0) return true; + } else { + if (val === node) return true; + } + } + } - var baseIsMatch = __webpack_require__(105), - getMatchData = __webpack_require__(113), - toObject = __webpack_require__(89); + return false; + } - /** - * The base implementation of `_.matches` which does not clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - */ - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; + function isReferenced(node, parent) { + switch (parent.type) { + case "BindExpression": + return parent.object === node || parent.callee === node; - return function(object) { - if (object == null) { + case "MemberExpression": + case "JSXMemberExpression": + if (parent.property === node && parent.computed) { + return true; + } else if (parent.object === node) { + return true; + } else { return false; } - return object[key] === value && (value !== undefined || (key in toObject(object))); - }; - } - return function(object) { - return baseIsMatch(object, matchData); - }; - } - module.exports = baseMatches; + case "MetaProperty": + return false; + case "ObjectProperty": + if (parent.key === node) { + return parent.computed; + } -/***/ }, -/* 105 */ -/***/ function(module, exports, __webpack_require__) { + case "VariableDeclarator": + return parent.id !== node; - var baseIsEqual = __webpack_require__(106), - toObject = __webpack_require__(89); + case "ArrowFunctionExpression": + case "FunctionDeclaration": + case "FunctionExpression": + for (var _iterator = parent.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; - /** - * The base implementation of `_.isMatch` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} matchData The propery names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ - function baseIsMatch(object, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } - if (object == null) { - return !length; - } - object = toObject(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; + var param = _ref; - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; + if (param === node) return false; } - } else { - var result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + + return parent.id !== node; + + case "ExportSpecifier": + if (parent.source) { return false; + } else { + return parent.local === node; } - } - } - return true; - } - module.exports = baseIsMatch; + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + case "JSXAttribute": + return parent.name !== node; -/***/ }, -/* 106 */ -/***/ function(module, exports, __webpack_require__) { - - var baseIsEqualDeep = __webpack_require__(107), - isObject = __webpack_require__(75), - isObjectLike = __webpack_require__(76); - - /** - * The base implementation of `_.isEqual` without support for `this` binding - * `customizer` functions. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); - } - - module.exports = baseIsEqual; + case "ClassProperty": + if (parent.key === node) { + return parent.computed; + } else { + return parent.value === node; + } + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; -/***/ }, -/* 107 */ -/***/ function(module, exports, __webpack_require__) { + case "ClassDeclaration": + case "ClassExpression": + return parent.id !== node; - var equalArrays = __webpack_require__(108), - equalByTag = __webpack_require__(110), - equalObjects = __webpack_require__(111), - isArray = __webpack_require__(83), - isTypedArray = __webpack_require__(112); + case "ClassMethod": + case "ObjectMethod": + return parent.key === node && parent.computed; - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; + case "LabeledStatement": + return false; - /** Used for native method references. */ - var objectProto = Object.prototype; + case "CatchClause": + return parent.param !== node; - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + case "RestElement": + return false; - /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; + case "AssignmentExpression": + return parent.right === node; - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing objects. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `value` objects. - * @param {Array} [stackB=[]] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; + case "AssignmentPattern": + return parent.right === node; - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } + case "ObjectPattern": + case "ArrayPattern": + return false; } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (!isLoose) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + return true; + } - if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); - } - } - if (!isSameTag) { + function isValidIdentifier(name) { + if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) { return false; + } else { + return _esutils2.default.keyword.isIdentifierNameES6(name); } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == object) { - return stackB[length] == other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); - - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); - - stackA.pop(); - stackB.pop(); - - return result; } - module.exports = baseIsEqualDeep; - + function isLet(node) { + return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); + } -/***/ }, -/* 108 */ -/***/ function(module, exports, __webpack_require__) { + function isBlockScoped(node) { + return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node); + } - var arraySome = __webpack_require__(109); + function isVar(node) { + return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; + } - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing arrays. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length; + function isSpecifierDefault(specifier) { + return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" }); + } - if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + function isScope(node, parent) { + if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) { return false; } - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index], - result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; - if (result !== undefined) { - if (result) { - continue; - } - return false; - } - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - })) { - return false; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { - return false; - } - } - return true; + return t.isScopable(node); } - module.exports = equalArrays; - - -/***/ }, -/* 109 */ -/***/ function(module, exports) { - - /** - * A specialized version of `_.some` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array.length; + function isImmutable(node) { + if (t.isType(node.type, "Immutable")) return true; - while (++index < length) { - if (predicate(array[index], index, array)) { + if (t.isIdentifier(node)) { + if (node.name === "undefined") { return true; + } else { + return false; } } + return false; } - module.exports = arraySome; - - /***/ }, -/* 110 */ -/***/ function(module, exports) { +/* 92 */ +/***/ function(module, exports, __webpack_require__) { - /** `Object#toString` result references. */ - var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; + /* + Copyright (C) 2013 Yusuke Suzuki - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag) { - switch (tag) { - 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; + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: - case errorTag: - return object.name == other.name && object.message == other.message; + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) - ? other != +other - : object == +other; + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. - return object == (other + ''); - } - return false; - } - module.exports = equalByTag; + (function () { + 'use strict'; + + exports.ast = __webpack_require__(93); + exports.code = __webpack_require__(94); + exports.keyword = __webpack_require__(95); + }()); + /* vim: set sw=4 ts=4 et tw=80 : */ /***/ }, -/* 111 */ -/***/ function(module, exports, __webpack_require__) { +/* 93 */ +/***/ function(module, exports) { - var keys = __webpack_require__(71); + /* + Copyright (C) 2013 Yusuke Suzuki - /** Used for native method references. */ - var objectProto = Object.prototype; + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ - if (objLength != othLength && !isLoose) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var skipCtor = isLoose; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key], - result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + (function () { + 'use strict'; - // Recursively compare objects (susceptible to call stack limits). - if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { - return false; + function isExpression(node) { + if (node == null) { return false; } + switch (node.type) { + case 'ArrayExpression': + case 'AssignmentExpression': + case 'BinaryExpression': + case 'CallExpression': + case 'ConditionalExpression': + case 'FunctionExpression': + case 'Identifier': + case 'Literal': + case 'LogicalExpression': + case 'MemberExpression': + case 'NewExpression': + case 'ObjectExpression': + case 'SequenceExpression': + case 'ThisExpression': + case 'UnaryExpression': + case 'UpdateExpression': + return true; + } + return false; } - skipCtor || (skipCtor = key == 'constructor'); - } - if (!skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - return false; + function isIterationStatement(node) { + if (node == null) { return false; } + switch (node.type) { + case 'DoWhileStatement': + case 'ForInStatement': + case 'ForStatement': + case 'WhileStatement': + return true; + } + return false; } - } - return true; - } - - module.exports = equalObjects; + function isStatement(node) { + if (node == null) { return false; } + switch (node.type) { + case 'BlockStatement': + case 'BreakStatement': + case 'ContinueStatement': + case 'DebuggerStatement': + case 'DoWhileStatement': + case 'EmptyStatement': + case 'ExpressionStatement': + case 'ForInStatement': + case 'ForStatement': + case 'IfStatement': + case 'LabeledStatement': + case 'ReturnStatement': + case 'SwitchStatement': + case 'ThrowStatement': + case 'TryStatement': + case 'VariableDeclaration': + case 'WhileStatement': + case 'WithStatement': + return true; + } + return false; + } -/***/ }, -/* 112 */ -/***/ function(module, exports, __webpack_require__) { - - var isLength = __webpack_require__(80), - isObjectLike = __webpack_require__(76); + function isSourceElement(node) { + return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; + } - /** `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]'; + function trailingStatement(node) { + switch (node.type) { + case 'IfStatement': + if (node.alternate != null) { + return node.alternate; + } + return node.consequent; - var arrayBufferTag = '[object ArrayBuffer]', - 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]'; + case 'LabeledStatement': + case 'ForStatement': + case 'ForInStatement': + case 'WhileStatement': + case 'WithStatement': + return node.body; + } + return null; + } - /** 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[dateTag] = typedArrayTags[errorTag] = - typedArrayTags[funcTag] = typedArrayTags[mapTag] = - typedArrayTags[numberTag] = typedArrayTags[objectTag] = - typedArrayTags[regexpTag] = typedArrayTags[setTag] = - typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + function isProblematicIfStatement(node) { + var current; - /** Used for native method references. */ - var objectProto = Object.prototype; + if (node.type !== 'IfStatement') { + return false; + } + if (node.alternate == null) { + return false; + } + current = node.consequent; + do { + if (current.type === 'IfStatement') { + if (current.alternate == null) { + return true; + } + } + current = trailingStatement(current); + } while (current); - /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; + return false; + } - /** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ - function isTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; - } + module.exports = { + isExpression: isExpression, + isStatement: isStatement, + isIterationStatement: isIterationStatement, + isSourceElement: isSourceElement, + isProblematicIfStatement: isProblematicIfStatement, - module.exports = isTypedArray; + trailingStatement: trailingStatement + }; + }()); + /* vim: set sw=4 ts=4 et tw=80 : */ /***/ }, -/* 113 */ -/***/ function(module, exports, __webpack_require__) { - - var isStrictComparable = __webpack_require__(114), - pairs = __webpack_require__(115); +/* 94 */ +/***/ function(module, exports) { - /** - * Gets the propery names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ - function getMatchData(object) { - var result = pairs(object), - length = result.length; + /* + Copyright (C) 2013-2014 Yusuke Suzuki + Copyright (C) 2014 Ivan Nikulin - while (length--) { - result[length][2] = isStrictComparable(result[length][1]); - } - return result; - } + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: - module.exports = getMatchData; + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -/***/ }, -/* 114 */ -/***/ function(module, exports, __webpack_require__) { + (function () { + 'use strict'; - var isObject = __webpack_require__(75); + var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; - /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ - function isStrictComparable(value) { - return value === value && !isObject(value); - } + // See `tools/generate-identifier-regex.js`. + ES5Regex = { + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/, + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ + }; - module.exports = isStrictComparable; + ES6Regex = { + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\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-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + function isDecimalDigit(ch) { + return 0x30 <= ch && ch <= 0x39; // 0..9 + } -/***/ }, -/* 115 */ -/***/ function(module, exports, __webpack_require__) { + function isHexDigit(ch) { + return 0x30 <= ch && ch <= 0x39 || // 0..9 + 0x61 <= ch && ch <= 0x66 || // a..f + 0x41 <= ch && ch <= 0x46; // A..F + } - var keys = __webpack_require__(71), - toObject = __webpack_require__(89); + function isOctalDigit(ch) { + return ch >= 0x30 && ch <= 0x37; // 0..7 + } - /** - * Creates a two dimensional array of the key-value pairs for `object`, - * e.g. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. - * @example - * - * _.pairs({ 'barney': 36, 'fred': 40 }); - * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) - */ - function pairs(object) { - object = toObject(object); + // 7.2 White Space - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); + NON_ASCII_WHITESPACES = [ + 0x1680, 0x180E, + 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, + 0x202F, 0x205F, + 0x3000, + 0xFEFF + ]; - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; - } - return result; - } + function isWhiteSpace(ch) { + return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || + ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; + } - module.exports = pairs; + // 7.3 Line Terminators + function isLineTerminator(ch) { + return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; + } -/***/ }, -/* 116 */ -/***/ function(module, exports, __webpack_require__) { + // 7.6 Identifier Names and Identifiers - var baseGet = __webpack_require__(117), - baseIsEqual = __webpack_require__(106), - baseSlice = __webpack_require__(118), - isArray = __webpack_require__(83), - isKey = __webpack_require__(119), - isStrictComparable = __webpack_require__(114), - last = __webpack_require__(120), - toObject = __webpack_require__(89), - toPath = __webpack_require__(121); + function fromCodePoint(cp) { + if (cp <= 0xFFFF) { return String.fromCharCode(cp); } + var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); + var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00); + return cu1 + cu2; + } - /** - * The base implementation of `_.matchesProperty` which does not clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to compare. - * @returns {Function} Returns the new function. - */ - function baseMatchesProperty(path, srcValue) { - var isArr = isArray(path), - isCommon = isKey(path) && isStrictComparable(srcValue), - pathKey = (path + ''); + IDENTIFIER_START = new Array(0x80); + for(ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_START[ch] = + ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) + } - path = toPath(path); - return function(object) { - if (object == null) { - return false; + IDENTIFIER_PART = new Array(0x80); + for(ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_PART[ch] = + ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch >= 0x30 && ch <= 0x39 || // 0..9 + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) } - var key = pathKey; - object = toObject(object); - if ((isArr || !isCommon) && !(key in object)) { - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - key = last(path); - object = toObject(object); + + function isIdentifierStartES5(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); } - return object[key] === srcValue - ? (srcValue !== undefined || (key in object)) - : baseIsEqual(srcValue, object[key], undefined, true); - }; - } - module.exports = baseMatchesProperty; + function isIdentifierPartES5(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + function isIdentifierStartES6(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } -/***/ }, -/* 117 */ -/***/ function(module, exports, __webpack_require__) { + function isIdentifierPartES6(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } - var toObject = __webpack_require__(89); + module.exports = { + isDecimalDigit: isDecimalDigit, + isHexDigit: isHexDigit, + isOctalDigit: isOctalDigit, + isWhiteSpace: isWhiteSpace, + isLineTerminator: isLineTerminator, + isIdentifierStartES5: isIdentifierStartES5, + isIdentifierPartES5: isIdentifierPartES5, + isIdentifierStartES6: isIdentifierStartES6, + isIdentifierPartES6: isIdentifierPartES6 + }; + }()); + /* vim: set sw=4 ts=4 et tw=80 : */ - /** - * The base implementation of `get` without support for string paths - * and default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path of the property to get. - * @param {string} [pathKey] The key representation of path. - * @returns {*} Returns the resolved value. - */ - function baseGet(object, path, pathKey) { - if (object == null) { - return; - } - if (pathKey !== undefined && pathKey in toObject(object)) { - path = [pathKey]; - } - var index = 0, - length = path.length; - while (object != null && index < length) { - object = object[path[index++]]; - } - return (index && index == length) ? object : undefined; - } +/***/ }, +/* 95 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = baseGet; + /* + Copyright (C) 2013 Yusuke Suzuki + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: -/***/ }, -/* 118 */ -/***/ function(module, exports) { + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; + (function () { + 'use strict'; - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } + var code = __webpack_require__(94); - module.exports = baseSlice; + function isStrictModeReservedWordES6(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'let': + return true; + default: + return false; + } + } + function isKeywordES5(id, strict) { + // yield should not be treated as keyword under non-strict mode. + if (!strict && id === 'yield') { + return false; + } + return isKeywordES6(id, strict); + } -/***/ }, -/* 119 */ -/***/ function(module, exports, __webpack_require__) { + function isKeywordES6(id, strict) { + if (strict && isStrictModeReservedWordES6(id)) { + return true; + } - var isArray = __webpack_require__(83), - toObject = __webpack_require__(89); + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || (id === 'yield') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } + } - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; + function isReservedWordES5(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); + } - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); - } + function isReservedWordES6(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); + } - module.exports = isKey; + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + function isIdentifierNameES5(id) { + var i, iz, ch; -/***/ }, -/* 120 */ -/***/ function(module, exports) { + if (id.length === 0) { return false; } - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; - } + ch = id.charCodeAt(0); + if (!code.isIdentifierStartES5(ch)) { + return false; + } - module.exports = last; + for (i = 1, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + if (!code.isIdentifierPartES5(ch)) { + return false; + } + } + return true; + } + function decodeUtf16(lead, trail) { + return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + } -/***/ }, -/* 121 */ -/***/ function(module, exports, __webpack_require__) { + function isIdentifierNameES6(id) { + var i, iz, ch, lowCh, check; - var baseToString = __webpack_require__(122), - isArray = __webpack_require__(83); + if (id.length === 0) { return false; } - /** Used to match property names within property paths. */ - var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + check = code.isIdentifierStartES6; + for (i = 0, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + if (0xD800 <= ch && ch <= 0xDBFF) { + ++i; + if (i >= iz) { return false; } + lowCh = id.charCodeAt(i); + if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { + return false; + } + ch = decodeUtf16(ch, lowCh); + } + if (!check(ch)) { + return false; + } + check = code.isIdentifierPartES6; + } + return true; + } - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; + function isIdentifierES5(id, strict) { + return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); + } - /** - * Converts `value` to property path array if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array} Returns the property path array. - */ - function toPath(value) { - if (isArray(value)) { - return value; - } - var result = []; - baseToString(value).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - } + function isIdentifierES6(id, strict) { + return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); + } - module.exports = toPath; + module.exports = { + isKeywordES5: isKeywordES5, + isKeywordES6: isKeywordES6, + isReservedWordES5: isReservedWordES5, + isReservedWordES6: isReservedWordES6, + isRestrictedWord: isRestrictedWord, + isIdentifierNameES5: isIdentifierNameES5, + isIdentifierNameES6: isIdentifierNameES6, + isIdentifierES5: isIdentifierES5, + isIdentifierES6: isIdentifierES6 + }; + }()); + /* vim: set sw=4 ts=4 et tw=80 : */ /***/ }, -/* 122 */ -/***/ function(module, exports) { +/* 96 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - return value == null ? '' : (value + ''); - } + "use strict"; - module.exports = baseToString; + exports.__esModule = true; + var _maxSafeInteger = __webpack_require__(97); -/***/ }, -/* 123 */ -/***/ function(module, exports, __webpack_require__) { + var _maxSafeInteger2 = _interopRequireDefault(_maxSafeInteger); - var baseProperty = __webpack_require__(79), - basePropertyDeep = __webpack_require__(124), - isKey = __webpack_require__(119); + var _stringify = __webpack_require__(82); - /** - * Creates a function that returns the property value at `path` on a - * given object. - * - * @static - * @memberOf _ - * @category Utility - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - * @example - * - * var objects = [ - * { 'a': { 'b': { 'c': 2 } } }, - * { 'a': { 'b': { 'c': 1 } } } - * ]; - * - * _.map(objects, _.property('a.b.c')); - * // => [2, 1] - * - * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); - * // => [1, 2] - */ - function property(path) { - return isKey(path) ? baseProperty(path) : basePropertyDeep(path); - } + var _stringify2 = _interopRequireDefault(_stringify); - module.exports = property; + var _getIterator2 = __webpack_require__(3); + var _getIterator3 = _interopRequireDefault(_getIterator2); -/***/ }, -/* 124 */ -/***/ function(module, exports, __webpack_require__) { + exports.toComputedKey = toComputedKey; + exports.toSequenceExpression = toSequenceExpression; + exports.toKeyAlias = toKeyAlias; + exports.toIdentifier = toIdentifier; + exports.toBindingIdentifierName = toBindingIdentifierName; + exports.toStatement = toStatement; + exports.toExpression = toExpression; + exports.toBlock = toBlock; + exports.valueToNode = valueToNode; - var baseGet = __webpack_require__(117), - toPath = __webpack_require__(121); + var _isPlainObject = __webpack_require__(100); - /** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - */ - function basePropertyDeep(path) { - var pathKey = (path + ''); - path = toPath(path); - return function(object) { - return baseGet(object, path, pathKey); - }; - } + var _isPlainObject2 = _interopRequireDefault(_isPlainObject); - module.exports = basePropertyDeep; + var _isNumber = __webpack_require__(104); + var _isNumber2 = _interopRequireDefault(_isNumber); -/***/ }, -/* 125 */ -/***/ function(module, exports, __webpack_require__) { + var _isRegExp = __webpack_require__(105); - var baseIndexOf = __webpack_require__(126), - cacheIndexOf = __webpack_require__(128), - createCache = __webpack_require__(129); + var _isRegExp2 = _interopRequireDefault(_isRegExp); - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; + var _isString = __webpack_require__(112); - /** - * The base implementation of `_.uniq` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate free array. - */ - function baseUniq(array, iteratee) { - var index = -1, - indexOf = baseIndexOf, - length = array.length, - isCommon = true, - isLarge = isCommon && length >= LARGE_ARRAY_SIZE, - seen = isLarge ? createCache() : null, - result = []; + var _isString2 = _interopRequireDefault(_isString); - if (seen) { - indexOf = cacheIndexOf; - isCommon = false; - } else { - isLarge = false; - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; + var _index = __webpack_require__(63); - if (isCommon && value === value) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (indexOf(seen, computed, 0) < 0) { - if (iteratee || isLarge) { - seen.push(computed); - } - result.push(value); - } + var t = _interopRequireWildcard(_index); + + 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; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function toComputedKey(node) { + var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key || node.property; + + if (!node.computed) { + if (t.isIdentifier(key)) key = t.stringLiteral(key.name); } - return result; + return key; } - module.exports = baseUniq; - + function toSequenceExpression(nodes, scope) { + if (!nodes || !nodes.length) return; -/***/ }, -/* 126 */ -/***/ function(module, exports, __webpack_require__) { + var declars = []; + var bailed = false; - var indexOfNaN = __webpack_require__(127); + var result = convert(nodes); + if (bailed) return; - /** - * The base implementation of `_.indexOf` without support for binary searches. - * - * @private - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); + for (var i = 0; i < declars.length; i++) { + scope.push(declars[i]); } - var index = fromIndex - 1, - length = array.length; - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } + return result; - module.exports = baseIndexOf; + function convert(nodes) { + var ensureLastUndefined = false; + var exprs = []; + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; -/***/ }, -/* 127 */ -/***/ function(module, exports) { - - /** - * 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 ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; - } - - module.exports = indexOfNaN; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + var node = _ref; -/***/ }, -/* 128 */ -/***/ function(module, exports, __webpack_require__) { + if (t.isExpression(node)) { + exprs.push(node); + } else if (t.isExpressionStatement(node)) { + exprs.push(node.expression); + } else if (t.isVariableDeclaration(node)) { + if (node.kind !== "var") return bailed = true; - var isObject = __webpack_require__(75); + for (var _iterator2 = node.declarations, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; - /** - * Checks if `value` is in `cache` mimicking the return signature of - * `_.indexOf` by returning `0` if the value is found, else `-1`. - * - * @private - * @param {Object} cache The cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `0` if `value` is found, else `-1`. - */ - function cacheIndexOf(cache, value) { - var data = cache.data, - result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } - return result ? 0 : -1; - } + var declar = _ref2; - module.exports = cacheIndexOf; + var bindings = t.getBindingIdentifiers(declar); + for (var key in bindings) { + declars.push({ + kind: node.kind, + id: bindings[key] + }); + } + if (declar.init) { + exprs.push(t.assignmentExpression("=", declar.id, declar.init)); + } + } -/***/ }, -/* 129 */ -/***/ function(module, exports, __webpack_require__) { + ensureLastUndefined = true; + continue; + } else if (t.isIfStatement(node)) { + var consequent = node.consequent ? convert([node.consequent]) : scope.buildUndefinedNode(); + var alternate = node.alternate ? convert([node.alternate]) : scope.buildUndefinedNode(); + if (!consequent || !alternate) return bailed = true; - var SetCache = __webpack_require__(130), - getNative = __webpack_require__(72); + exprs.push(t.conditionalExpression(node.test, consequent, alternate)); + } else if (t.isBlockStatement(node)) { + exprs.push(convert(node.body)); + } else if (t.isEmptyStatement(node)) { + ensureLastUndefined = true; + continue; + } else { + return bailed = true; + } - /** Native method references. */ - var Set = getNative(global, 'Set'); + ensureLastUndefined = false; + } - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeCreate = getNative(Object, 'create'); + if (ensureLastUndefined || exprs.length === 0) { + exprs.push(scope.buildUndefinedNode()); + } - /** - * Creates a `Set` cache object to optimize linear searches of large arrays. - * - * @private - * @param {Array} [values] The values to cache. - * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. - */ - function createCache(values) { - return (nativeCreate && Set) ? new SetCache(values) : null; + if (exprs.length === 1) { + return exprs[0]; + } else { + return t.sequenceExpression(exprs); + } + } } - module.exports = createCache; + function toKeyAlias(node) { + var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key; + var alias = void 0; -/***/ }, -/* 130 */ -/***/ function(module, exports, __webpack_require__) { + if (node.kind === "method") { + return toKeyAlias.increment() + ""; + } else if (t.isIdentifier(key)) { + alias = key.name; + } else if (t.isStringLiteral(key)) { + alias = (0, _stringify2.default)(key.value); + } else { + alias = (0, _stringify2.default)(t.removePropertiesDeep(t.cloneDeep(key))); + } - var cachePush = __webpack_require__(131), - getNative = __webpack_require__(72); + if (node.computed) { + alias = "[" + alias + "]"; + } - /** Native method references. */ - var Set = getNative(global, 'Set'); + if (node.static) { + alias = "static:" + alias; + } - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeCreate = getNative(Object, 'create'); + return alias; + } - /** - * - * Creates a cache object to store unique values. - * - * @private - * @param {Array} [values] The values to cache. - */ - function SetCache(values) { - var length = values ? values.length : 0; + toKeyAlias.uid = 0; - this.data = { 'hash': nativeCreate(null), 'set': new Set }; - while (length--) { - this.push(values[length]); + toKeyAlias.increment = function () { + if (toKeyAlias.uid >= _maxSafeInteger2.default) { + return toKeyAlias.uid = 0; + } else { + return toKeyAlias.uid++; } - } - - // Add functions to the `Set` cache. - SetCache.prototype.push = cachePush; + }; - module.exports = SetCache; + function toIdentifier(name) { + name = name + ""; + name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); -/***/ }, -/* 131 */ -/***/ function(module, exports, __webpack_require__) { + name = name.replace(/^[-0-9]+/, ""); - var isObject = __webpack_require__(75); + name = name.replace(/[-\s]+(.)?/g, function (match, c) { + return c ? c.toUpperCase() : ""; + }); - /** - * Adds `value` to the cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ - function cachePush(value) { - var data = this.data; - if (typeof value == 'string' || isObject(value)) { - data.set.add(value); - } else { - data.hash[value] = true; + if (!t.isValidIdentifier(name)) { + name = "_" + name; } + + return name || "_"; } - module.exports = cachePush; + function toBindingIdentifierName(name) { + name = toIdentifier(name); + if (name === "eval" || name === "arguments") name = "_" + name; + return name; + } + function toStatement(node, ignore) { + if (t.isStatement(node)) { + return node; + } -/***/ }, -/* 132 */ -/***/ function(module, exports) { + var mustHaveId = false; + var newType = void 0; - /** - * An implementation of `_.uniq` optimized for sorted arrays without support - * for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate free array. - */ - function sortedUniq(array, iteratee) { - var seen, - index = -1, - length = array.length, - resIndex = -1, - result = []; + if (t.isClass(node)) { + mustHaveId = true; + newType = "ClassDeclaration"; + } else if (t.isFunction(node)) { + mustHaveId = true; + newType = "FunctionDeclaration"; + } else if (t.isAssignmentExpression(node)) { + return t.expressionStatement(node); + } - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; + if (mustHaveId && !node.id) { + newType = false; + } - if (!index || seen !== computed) { - seen = computed; - result[++resIndex] = value; + if (!newType) { + if (ignore) { + return false; + } else { + throw new Error("cannot turn " + node.type + " to a statement"); } } - return result; - } - module.exports = sortedUniq; + node.type = newType; + return node; + } -/***/ }, -/* 133 */ -/***/ function(module, exports, __webpack_require__) { + function toExpression(node) { + if (t.isExpressionStatement(node)) { + node = node.expression; + } - "use strict"; + if (t.isExpression(node)) { + return node; + } - __webpack_require__(134); + if (t.isClass(node)) { + node.type = "ClassExpression"; + } else if (t.isFunction(node)) { + node.type = "FunctionExpression"; + } - __webpack_require__(135); + if (!t.isExpression(node)) { + throw new Error("cannot turn " + node.type + " to an expression"); + } - __webpack_require__(143); + return node; + } - __webpack_require__(144); + function toBlock(node, parent) { + if (t.isBlockStatement(node)) { + return node; + } - __webpack_require__(145); + if (t.isEmptyStatement(node)) { + node = []; + } - __webpack_require__(146); + if (!Array.isArray(node)) { + if (!t.isStatement(node)) { + if (t.isFunction(parent)) { + node = t.returnStatement(node); + } else { + node = t.expressionStatement(node); + } + } - __webpack_require__(147); + node = [node]; + } -/***/ }, -/* 134 */ -/***/ function(module, exports, __webpack_require__) { + return t.blockStatement(node); + } - /* @noflow */ - "use strict"; + function valueToNode(value) { + if (value === undefined) { + return t.identifier("undefined"); + } - var _getIterator = __webpack_require__(3)["default"]; + if (value === true || value === false) { + return t.booleanLiteral(value); + } - var _interopRequireWildcard = __webpack_require__(44)["default"]; + if (value === null) { + return t.nullLiteral(); + } - exports.__esModule = true; - exports.assertEach = assertEach; - exports.assertOneOf = assertOneOf; - exports.assertNodeType = assertNodeType; - exports.assertNodeOrValueType = assertNodeOrValueType; - exports.assertValueType = assertValueType; - exports.chain = chain; - exports["default"] = defineType; + if ((0, _isString2.default)(value)) { + return t.stringLiteral(value); + } - var _index = __webpack_require__(46); + if ((0, _isNumber2.default)(value)) { + return t.numericLiteral(value); + } - var t = _interopRequireWildcard(_index); + if ((0, _isRegExp2.default)(value)) { + var pattern = value.source; + var flags = value.toString().match(/\/([a-z]+|)$/)[1]; + return t.regExpLiteral(pattern, flags); + } - var VISITOR_KEYS = {}; - exports.VISITOR_KEYS = VISITOR_KEYS; - var ALIAS_KEYS = {}; - exports.ALIAS_KEYS = ALIAS_KEYS; - var NODE_FIELDS = {}; - exports.NODE_FIELDS = NODE_FIELDS; - var BUILDER_KEYS = {}; - exports.BUILDER_KEYS = BUILDER_KEYS; - var DEPRECATED_KEYS = {}; - - exports.DEPRECATED_KEYS = DEPRECATED_KEYS; - function getType(val) { - if (Array.isArray(val)) { - return "array"; - } else if (val === null) { - return "null"; - } else if (val === undefined) { - return "undefined"; - } else { - return typeof val; - } - } - - function assertEach(callback /*: Function*/) /*: Function*/ { - function validator(node, key, val) { - if (!Array.isArray(val)) return; - - for (var i = 0; i < val.length; i++) { - callback(node, key + "[" + i + "]", val[i]); - } - } - validator.each = callback; - return validator; - } - - function assertOneOf() /*: Function*/ { - for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) { - vals[_key] = arguments[_key]; - } - - function validate(node, key, val) { - if (vals.indexOf(val) < 0) { - throw new TypeError("Property " + key + " expected value to be one of " + JSON.stringify(vals) + " but got " + JSON.stringify(val)); - } - } - - validate.oneOf = vals; - - return validate; - } - - function assertNodeType() /*: Function*/ { - for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - types[_key2] = arguments[_key2]; + if (Array.isArray(value)) { + return t.arrayExpression(value.map(t.valueToNode)); } - function validate(node, key, val) { - var valid = false; - - for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; + if ((0, _isPlainObject2.default)(value)) { + var props = []; + for (var key in value) { + var nodeKey = void 0; + if (t.isValidIdentifier(key)) { + nodeKey = t.identifier(key); } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var type = _ref; - - if (t.is(type, val)) { - valid = true; - break; + nodeKey = t.stringLiteral(key); } + props.push(t.objectProperty(nodeKey, t.valueToNode(value[key]))); } - - if (!valid) { - throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val && val.type)); - } + return t.objectExpression(props); } - validate.oneOfNodeTypes = types; - - return validate; + throw new Error("don't know how to turn this value into a node"); } - function assertNodeOrValueType() /*: Function*/ { - for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - types[_key3] = arguments[_key3]; - } - - function validate(node, key, val) { - var valid = false; - - for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; +/***/ }, +/* 97 */ +/***/ function(module, exports, __webpack_require__) { - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } + module.exports = { "default": __webpack_require__(98), __esModule: true }; - var type = _ref2; +/***/ }, +/* 98 */ +/***/ function(module, exports, __webpack_require__) { - if (getType(val) === type || t.is(type, val)) { - valid = true; - break; - } - } + __webpack_require__(99); + module.exports = 0x1fffffffffffff; - if (!valid) { - throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val && val.type)); - } - } +/***/ }, +/* 99 */ +/***/ function(module, exports, __webpack_require__) { - validate.oneOfNodeOrValueTypes = types; + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(16); - return validate; - } + $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); - function assertValueType(type /*: string*/) /*: Function*/ { - function validate(node, key, val) { - var valid = getType(val) === type; +/***/ }, +/* 100 */ +/***/ function(module, exports, __webpack_require__) { - if (!valid) { - throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val)); - } - } + var getPrototype = __webpack_require__(101), + isObjectLike = __webpack_require__(103); - validate.type = type; + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; - return validate; - } + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; - function chain() /*: Function*/ { - for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - fns[_key4] = arguments[_key4]; - } + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; - function validate() { - for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); - var fn = _ref3; + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; - fn.apply(undefined, arguments); - } + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || objectToString.call(value) != objectTag) { + return false; } - validate.chainOf = fns; - return validate; + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); } - function defineType(type /*: string*/) { - var opts /*: { - fields?: Object; - visitor?: Array; - aliases?: Array; - builder?: Array; - inherits?: string; - }*/ = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + module.exports = isPlainObject; - var inherits = opts.inherits && store[opts.inherits] || {}; - opts.fields = opts.fields || inherits.fields || {}; - opts.visitor = opts.visitor || inherits.visitor || []; - opts.aliases = opts.aliases || inherits.aliases || []; - opts.builder = opts.builder || inherits.builder || opts.visitor || []; +/***/ }, +/* 101 */ +/***/ function(module, exports, __webpack_require__) { - if (opts.deprecatedAlias) { - DEPRECATED_KEYS[opts.deprecatedAlias] = type; - } + var overArg = __webpack_require__(102); - // ensure all field keys are represented in `fields` - for (var _iterator4 = (opts.visitor.concat(opts.builder) /*: Array*/), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { - var _ref4; + /** Built-in value references. */ + var getPrototype = overArg(Object.getPrototypeOf, Object); - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } + module.exports = getPrototype; - var key = _ref4; - opts.fields[key] = opts.fields[key] || {}; - } +/***/ }, +/* 102 */ +/***/ function(module, exports) { - for (var key in opts.fields) { - var field = opts.fields[key]; + /** + * Creates a unary function that invokes `func` with its 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)); + }; + } - if (field["default"] === undefined) { - field["default"] = null; - } else if (!field.validate) { - field.validate = assertValueType(getType(field["default"])); - } - } + module.exports = overArg; - VISITOR_KEYS[type] = opts.visitor; - BUILDER_KEYS[type] = opts.builder; - NODE_FIELDS[type] = opts.fields; - ALIAS_KEYS[type] = opts.aliases; - store[type] = opts; +/***/ }, +/* 103 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; } - var store = {}; + module.exports = isObjectLike; + /***/ }, -/* 135 */ +/* 104 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ + var isObjectLike = __webpack_require__(103); - "use strict"; + /** `Object#toString` result references. */ + var numberTag = '[object Number]'; - var _interopRequireWildcard = __webpack_require__(44)["default"]; + /** Used for built-in method references. */ + var objectProto = Object.prototype; - var _interopRequireDefault = __webpack_require__(42)["default"]; + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; - var _index = __webpack_require__(46); + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && objectToString.call(value) == numberTag); + } - var t = _interopRequireWildcard(_index); + module.exports = isNumber; - var _constants = __webpack_require__(136); - var _index2 = __webpack_require__(134); +/***/ }, +/* 105 */ +/***/ function(module, exports, __webpack_require__) { - var _index3 = _interopRequireDefault(_index2); + var baseIsRegExp = __webpack_require__(106), + baseUnary = __webpack_require__(108), + nodeUtil = __webpack_require__(109); - _index3["default"]("ArrayExpression", { - fields: { - elements: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeOrValueType("null", "Expression", "SpreadElement"))), - "default": [] - } - }, - visitor: ["elements"], - aliases: ["Expression"] - }); + /* Node.js helper references. */ + var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; - _index3["default"]("AssignmentExpression", { - fields: { - operator: { - validate: _index2.assertValueType("string") - }, - left: { - validate: _index2.assertNodeType("LVal") - }, - right: { - validate: _index2.assertNodeType("Expression") - } - }, - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Expression"] - }); + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - _index3["default"]("BinaryExpression", { - builder: ["operator", "left", "right"], - fields: { - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS) - }, - left: { - validate: _index2.assertNodeType("Expression") - }, - right: { - validate: _index2.assertNodeType("Expression") - } - }, - visitor: ["left", "right"], - aliases: ["Binary", "Expression"] - }); + module.exports = isRegExp; - _index3["default"]("Directive", { - visitor: ["value"], - fields: { - value: { - validate: _index2.assertNodeType("DirectiveLiteral") - } - } - }); - _index3["default"]("DirectiveLiteral", { - builder: ["value"], - fields: { - value: { - validate: _index2.assertValueType("string") - } - } - }); +/***/ }, +/* 106 */ +/***/ function(module, exports, __webpack_require__) { - _index3["default"]("BlockStatement", { - builder: ["body", "directives"], - visitor: ["directives", "body"], - fields: { - directives: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Directive"))), - "default": [] - }, - body: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "Statement"] - }); + var isObject = __webpack_require__(107); - _index3["default"]("BreakStatement", { - visitor: ["label"], - fields: { - label: { - validate: _index2.assertNodeType("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] - }); + /** `Object#toString` result references. */ + var regexpTag = '[object RegExp]'; - _index3["default"]("CallExpression", { - visitor: ["callee", "arguments"], - fields: { - callee: { - validate: _index2.assertNodeType("Expression") - }, - arguments: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Expression", "SpreadElement"))) - } - }, - aliases: ["Expression"] - }); + /** Used for built-in method references. */ + var objectProto = Object.prototype; - _index3["default"]("CatchClause", { - visitor: ["param", "body"], - fields: { - param: { - validate: _index2.assertNodeType("Identifier") - }, - body: { - validate: _index2.assertNodeType("BlockStatement") - } - }, - aliases: ["Scopable"] - }); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; - _index3["default"]("ConditionalExpression", { - visitor: ["test", "consequent", "alternate"], - fields: { - test: { - validate: _index2.assertNodeType("Expression") - }, - consequent: { - validate: _index2.assertNodeType("Expression") - }, - alternate: { - validate: _index2.assertNodeType("Expression") - } - }, - aliases: ["Expression", "Conditional"] - }); + /** + * 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; + } - _index3["default"]("ContinueStatement", { - visitor: ["label"], - fields: { - label: { - validate: _index2.assertNodeType("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] - }); + module.exports = baseIsRegExp; - _index3["default"]("DebuggerStatement", { - aliases: ["Statement"] - }); - _index3["default"]("DoWhileStatement", { - visitor: ["test", "body"], - fields: { - test: { - validate: _index2.assertNodeType("Expression") - }, - body: { - validate: _index2.assertNodeType("Statement") - } - }, - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] - }); +/***/ }, +/* 107 */ +/***/ function(module, exports) { - _index3["default"]("EmptyStatement", { - aliases: ["Statement"] - }); + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } - _index3["default"]("ExpressionStatement", { - visitor: ["expression"], - fields: { - expression: { - validate: _index2.assertNodeType("Expression") - } - }, - aliases: ["Statement", "ExpressionWrapper"] - }); + module.exports = isObject; - _index3["default"]("File", { - builder: ["program", "comments", "tokens"], - visitor: ["program"], - fields: { - program: { - validate: _index2.assertNodeType("Program") - } - } - }); - _index3["default"]("ForInStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: _index2.assertNodeType("VariableDeclaration", "LVal") - }, - right: { - validate: _index2.assertNodeType("Expression") - }, - body: { - validate: _index2.assertNodeType("Statement") - } - } - }); +/***/ }, +/* 108 */ +/***/ function(module, exports) { - _index3["default"]("ForStatement", { - visitor: ["init", "test", "update", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], - fields: { - init: { - validate: _index2.assertNodeType("VariableDeclaration", "Expression"), - optional: true - }, - test: { - validate: _index2.assertNodeType("Expression"), - optional: true - }, - update: { - validate: _index2.assertNodeType("Expression"), - optional: true - }, - body: { - validate: _index2.assertNodeType("Statement") - } - } - }); + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } - _index3["default"]("FunctionDeclaration", { - builder: ["id", "params", "body", "generator", "async"], - visitor: ["id", "params", "body", "returnType", "typeParameters"], - fields: { - id: { - validate: _index2.assertNodeType("Identifier") - }, - params: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("LVal"))) - }, - body: { - validate: _index2.assertNodeType("BlockStatement") - }, - generator: { - "default": false, - validate: _index2.assertValueType("boolean") - }, - async: { - "default": false, - validate: _index2.assertValueType("boolean") - } - }, - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] - }); - - _index3["default"]("FunctionExpression", { - inherits: "FunctionDeclaration", - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: { - id: { - validate: _index2.assertNodeType("Identifier"), - optional: true - }, - params: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("LVal"))) - }, - body: { - validate: _index2.assertNodeType("BlockStatement") - }, - generator: { - "default": false, - validate: _index2.assertValueType("boolean") - }, - async: { - "default": false, - validate: _index2.assertValueType("boolean") - } - } - }); + module.exports = baseUnary; - _index3["default"]("Identifier", { - builder: ["name"], - visitor: ["typeAnnotation"], - aliases: ["Expression", "LVal"], - fields: { - name: { - validate: function validate(node, key, val) { - if (!t.isValidIdentifier(val)) { - // todo - } - } - } - } - }); - _index3["default"]("IfStatement", { - visitor: ["test", "consequent", "alternate"], - aliases: ["Statement", "Conditional"], - fields: { - test: { - validate: _index2.assertNodeType("Expression") - }, - consequent: { - validate: _index2.assertNodeType("Statement") - }, - alternate: { - optional: true, - validate: _index2.assertNodeType("Statement") - } - } - }); +/***/ }, +/* 109 */ +/***/ function(module, exports, __webpack_require__) { - _index3["default"]("LabeledStatement", { - visitor: ["label", "body"], - aliases: ["Statement"], - fields: { - label: { - validate: _index2.assertNodeType("Identifier") - }, - body: { - validate: _index2.assertNodeType("Statement") - } - } - }); + /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(111); - _index3["default"]("StringLiteral", { - builder: ["value"], - fields: { - value: { - validate: _index2.assertValueType("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] - }); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - _index3["default"]("NumericLiteral", { - builder: ["value"], - deprecatedAlias: "NumberLiteral", - fields: { - value: { - validate: _index2.assertValueType("number") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] - }); + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - _index3["default"]("NullLiteral", { - aliases: ["Expression", "Pureish", "Literal", "Immutable"] - }); + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; - _index3["default"]("BooleanLiteral", { - builder: ["value"], - fields: { - value: { - validate: _index2.assertValueType("boolean") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] - }); + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; - _index3["default"]("RegExpLiteral", { - builder: ["pattern", "flags"], - deprecatedAlias: "RegexLiteral", - aliases: ["Expression", "Literal"], - fields: { - pattern: { - validate: _index2.assertValueType("string") - }, - flags: { - validate: _index2.assertValueType("string"), - "default": "" - } - } - }); + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} + }()); - _index3["default"]("LogicalExpression", { - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Binary", "Expression"], - fields: { - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS) - }, - left: { - validate: _index2.assertNodeType("Expression") - }, - right: { - validate: _index2.assertNodeType("Expression") - } - } - }); + module.exports = nodeUtil; - _index3["default"]("MemberExpression", { - builder: ["object", "property", "computed"], - visitor: ["object", "property"], - aliases: ["Expression", "LVal"], - fields: { - object: { - validate: _index2.assertNodeType("Expression") - }, - property: { - validate: function validate(node, key, val) { - var expectedType = node.computed ? "Expression" : "Identifier"; - _index2.assertNodeType(expectedType)(node, key, val); - } - }, - computed: { - "default": false - } - } - }); + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(110)(module))) - _index3["default"]("NewExpression", { - visitor: ["callee", "arguments"], - aliases: ["Expression"], - fields: { - callee: { - validate: _index2.assertNodeType("Expression") - }, - arguments: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Expression", "SpreadElement"))) - } - } - }); +/***/ }, +/* 110 */ +/***/ function(module, exports) { - _index3["default"]("Program", { - visitor: ["directives", "body"], - builder: ["body", "directives"], - fields: { - directives: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Directive"))), - "default": [] - }, - body: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"] - }); + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } - _index3["default"]("ObjectExpression", { - visitor: ["properties"], - aliases: ["Expression"], - fields: { - properties: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("ObjectMethod", "ObjectProperty", "SpreadProperty"))) - } - } - }); - _index3["default"]("ObjectMethod", { - builder: ["kind", "key", "params", "body", "computed"], - fields: { - kind: { - validate: _index2.chain(_index2.assertValueType("string"), _index2.assertOneOf("method", "get", "set")), - "default": "method" - }, - computed: { - validate: _index2.assertValueType("boolean"), - "default": false - }, - key: { - validate: function validate(node, key, val) { - var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; - _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); - } - }, - decorators: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Decorator"))) - }, - body: { - validate: _index2.assertNodeType("BlockStatement") - }, - generator: { - "default": false, - validate: _index2.assertValueType("boolean") - }, - async: { - "default": false, - validate: _index2.assertValueType("boolean") - } - }, - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] - }); +/***/ }, +/* 111 */ +/***/ function(module, exports) { - _index3["default"]("ObjectProperty", { - builder: ["key", "value", "computed", "shorthand", "decorators"], - fields: { - computed: { - validate: _index2.assertValueType("boolean"), - "default": false - }, - key: { - validate: function validate(node, key, val) { - var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; - _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); - } - }, - value: { - validate: _index2.assertNodeType("Expression") - }, - shorthand: { - validate: _index2.assertValueType("boolean"), - "default": false - }, - decorators: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Decorator"))), - optional: true - } - }, - visitor: ["key", "value", "decorators"], - aliases: ["UserWhitespacable", "Property", "ObjectMember"] - }); + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - _index3["default"]("RestElement", { - visitor: ["argument", "typeAnnotation"], - aliases: ["LVal"], - fields: { - argument: { - validate: _index2.assertNodeType("LVal") - } - } - }); + module.exports = freeGlobal; - _index3["default"]("ReturnStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: _index2.assertNodeType("Expression"), - optional: true - } - } - }); - _index3["default"]("SequenceExpression", { - visitor: ["expressions"], - fields: { - expressions: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Expression"))) - } - }, - aliases: ["Expression"] - }); +/***/ }, +/* 112 */ +/***/ function(module, exports, __webpack_require__) { - _index3["default"]("SwitchCase", { - visitor: ["test", "consequent"], - fields: { - test: { - validate: _index2.assertNodeType("Expression"), - optional: true - }, - consequent: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Statement"))) - } - } - }); + var isArray = __webpack_require__(113), + isObjectLike = __webpack_require__(103); - _index3["default"]("SwitchStatement", { - visitor: ["discriminant", "cases"], - aliases: ["Statement", "BlockParent", "Scopable"], - fields: { - discriminant: { - validate: _index2.assertNodeType("Expression") - }, - cases: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("SwitchCase"))) - } - } - }); + /** `Object#toString` result references. */ + var stringTag = '[object String]'; - _index3["default"]("ThisExpression", { - aliases: ["Expression"] - }); + /** Used for built-in method references. */ + var objectProto = Object.prototype; - _index3["default"]("ThrowStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: _index2.assertNodeType("Expression") - } - } - }); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; - // todo: at least handler or finalizer should be set to be valid - _index3["default"]("TryStatement", { - visitor: ["block", "handler", "finalizer"], - aliases: ["Statement"], - fields: { - body: { - validate: _index2.assertNodeType("BlockStatement") - }, - handler: { - optional: true, - handler: _index2.assertNodeType("BlockStatement") - }, - finalizer: { - optional: true, - validate: _index2.assertNodeType("BlockStatement") - } - } - }); + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + } - _index3["default"]("UnaryExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - "default": true - }, - argument: { - validate: _index2.assertNodeType("Expression") - }, - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["UnaryLike", "Expression"] - }); + module.exports = isString; - _index3["default"]("UpdateExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - "default": false - }, - argument: { - validate: _index2.assertNodeType("Expression") - }, - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["Expression"] - }); - _index3["default"]("VariableDeclaration", { - builder: ["kind", "declarations"], - visitor: ["declarations"], - aliases: ["Statement", "Declaration"], - fields: { - kind: { - validate: _index2.chain(_index2.assertValueType("string"), _index2.assertOneOf("var", "let", "const")) - }, - declarations: { - validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("VariableDeclarator"))) - } - } - }); +/***/ }, +/* 113 */ +/***/ function(module, exports) { - _index3["default"]("VariableDeclarator", { - visitor: ["id", "init"], - fields: { - id: { - validate: _index2.assertNodeType("LVal") - }, - init: { - optional: true, - validate: _index2.assertNodeType("Expression") - } - } - }); + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; - _index3["default"]("WhileStatement", { - visitor: ["test", "body"], - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], - fields: { - test: { - validate: _index2.assertNodeType("Expression") - }, - body: { - validate: _index2.assertNodeType("BlockStatement", "Statement") - } - } - }); + module.exports = isArray; - _index3["default"]("WithStatement", { - visitor: ["object", "body"], - aliases: ["Statement"], - fields: { - object: { - object: _index2.assertNodeType("Expression") - }, - body: { - validate: _index2.assertNodeType("BlockStatement", "Statement") - } - } - }); /***/ }, -/* 136 */ +/* 114 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _Symbol$for = __webpack_require__(137)["default"]; - exports.__esModule = true; - var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; - exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; - var FLATTENABLE_KEYS = ["body", "expressions"]; - exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; - var FOR_INIT_KEYS = ["left", "init"]; - exports.FOR_INIT_KEYS = FOR_INIT_KEYS; - var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; - - exports.COMMENT_KEYS = COMMENT_KEYS; - var LOGICAL_OPERATORS = ["||", "&&"]; - exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; - var UPDATE_OPERATORS = ["++", "--"]; - - exports.UPDATE_OPERATORS = UPDATE_OPERATORS; - var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; - exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; - var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; - exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; - var COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]); - exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; - var BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS); - exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; - var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; - exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; - var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS); - - exports.BINARY_OPERATORS = BINARY_OPERATORS; - var BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; - exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; - var NUMBER_UNARY_OPERATORS = ["+", "-", "++", "--", "~"]; - exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; - var STRING_UNARY_OPERATORS = ["typeof"]; - exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; - var UNARY_OPERATORS = ["void"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS); - - exports.UNARY_OPERATORS = UNARY_OPERATORS; - var INHERIT_KEYS = { - optional: ["typeAnnotation", "typeParameters", "returnType"], - force: ["start", "loc", "end"] - }; + exports.createUnionTypeAnnotation = createUnionTypeAnnotation; + exports.removeTypeDuplicates = removeTypeDuplicates; + exports.createTypeAnnotationBasedOnTypeof = createTypeAnnotationBasedOnTypeof; - exports.INHERIT_KEYS = INHERIT_KEYS; - var BLOCK_SCOPED_SYMBOL = _Symbol$for("var used to be block scoped"); - exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; - var NOT_LOCAL_BINDING = _Symbol$for("should not be considered a local binding"); - exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; + var _index = __webpack_require__(63); -/***/ }, -/* 137 */ -/***/ function(module, exports, __webpack_require__) { + var t = _interopRequireWildcard(_index); - module.exports = { "default": __webpack_require__(138), __esModule: true }; + 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; } } -/***/ }, -/* 138 */ -/***/ function(module, exports, __webpack_require__) { + function createUnionTypeAnnotation(types) { + var flattened = removeTypeDuplicates(types); - __webpack_require__(139); - module.exports = __webpack_require__(18).Symbol['for']; + if (flattened.length === 1) { + return flattened[0]; + } else { + return t.unionTypeAnnotation(flattened); + } + } -/***/ }, -/* 139 */ -/***/ function(module, exports, __webpack_require__) { + function removeTypeDuplicates(nodes) { + var generics = {}; + var bases = {}; - 'use strict'; - // ECMAScript 6 symbols shim - var $ = __webpack_require__(23) - , global = __webpack_require__(17) - , has = __webpack_require__(27) - , DESCRIPTORS = __webpack_require__(25) - , $export = __webpack_require__(16) - , redefine = __webpack_require__(21) - , $fails = __webpack_require__(26) - , shared = __webpack_require__(31) - , setToStringTag = __webpack_require__(29) - , uid = __webpack_require__(32) - , wks = __webpack_require__(30) - , keyOf = __webpack_require__(140) - , $names = __webpack_require__(56) - , enumKeys = __webpack_require__(141) - , isArray = __webpack_require__(142) - , anObject = __webpack_require__(37) - , toIObject = __webpack_require__(10) - , createDesc = __webpack_require__(24) - , getDesc = $.getDesc - , setDesc = $.setDesc - , _create = $.create - , getNames = $names.get - , $Symbol = global.Symbol - , $JSON = global.JSON - , _stringify = $JSON && $JSON.stringify - , setter = false - , HIDDEN = wks('_hidden') - , isEnum = $.isEnum - , SymbolRegistry = shared('symbol-registry') - , AllSymbols = shared('symbols') - , useNative = typeof $Symbol == 'function' - , ObjectProto = Object.prototype; + var typeGroups = []; - // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 - var setSymbolDesc = DESCRIPTORS && $fails(function(){ - return _create(setDesc({}, 'a', { - get: function(){ return setDesc(this, 'a', {value: 7}).a; } - })).a != 7; - }) ? function(it, key, D){ - var protoDesc = getDesc(ObjectProto, key); - if(protoDesc)delete ObjectProto[key]; - setDesc(it, key, D); - if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc); - } : setDesc; + var types = []; - var wrap = function(tag){ - var sym = AllSymbols[tag] = _create($Symbol.prototype); - sym._k = tag; - DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, { - configurable: true, - set: function(value){ - if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, createDesc(1, value)); - } - }); - return sym; - }; + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (!node) continue; - var isSymbol = function(it){ - return typeof it == 'symbol'; - }; + if (types.indexOf(node) >= 0) { + continue; + } - var $defineProperty = function defineProperty(it, key, D){ - if(D && has(AllSymbols, key)){ - if(!D.enumerable){ - if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; - D = _create(D, {enumerable: createDesc(0, false)}); - } return setSymbolDesc(it, key, D); - } return setDesc(it, key, D); - }; - var $defineProperties = function defineProperties(it, P){ - anObject(it); - var keys = enumKeys(P = toIObject(P)) - , i = 0 - , l = keys.length - , key; - while(l > i)$defineProperty(it, key = keys[i++], P[key]); - return it; - }; - var $create = function create(it, P){ - return P === undefined ? _create(it) : $defineProperties(_create(it), P); - }; - var $propertyIsEnumerable = function propertyIsEnumerable(key){ - var E = isEnum.call(this, key); - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] - ? E : true; - }; - var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ - var D = getDesc(it = toIObject(it), key); - if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; - return D; - }; - var $getOwnPropertyNames = function getOwnPropertyNames(it){ - var names = getNames(toIObject(it)) - , result = [] - , i = 0 - , key; - while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); - return result; - }; - var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ - var names = getNames(toIObject(it)) - , result = [] - , i = 0 - , key; - while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); - return result; - }; - var $stringify = function stringify(it){ - if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined - var args = [it] - , i = 1 - , $$ = arguments - , replacer, $replacer; - while($$.length > i)args.push($$[i++]); - replacer = args[1]; - if(typeof replacer == 'function')$replacer = replacer; - if($replacer || !isArray(replacer))replacer = function(key, value){ - if($replacer)value = $replacer.call(this, key, value); - if(!isSymbol(value))return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - }; - var buggyJSON = $fails(function(){ - var S = $Symbol(); - // MS Edge converts symbol values to JSON as {} - // WebKit converts symbol values to JSON as null - // V8 throws on boxed symbols - return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; - }); + if (t.isAnyTypeAnnotation(node)) { + return [node]; + } - // 19.4.1.1 Symbol([description]) - if(!useNative){ - $Symbol = function Symbol(){ - if(isSymbol(this))throw TypeError('Symbol is not a constructor'); - return wrap(uid(arguments.length > 0 ? arguments[0] : undefined)); - }; - redefine($Symbol.prototype, 'toString', function toString(){ - return this._k; - }); + if (t.isFlowBaseAnnotation(node)) { + bases[node.type] = node; + continue; + } - isSymbol = function(it){ - return it instanceof $Symbol; - }; + if (t.isUnionTypeAnnotation(node)) { + if (typeGroups.indexOf(node.types) < 0) { + nodes = nodes.concat(node.types); + typeGroups.push(node.types); + } + continue; + } - $.create = $create; - $.isEnum = $propertyIsEnumerable; - $.getDesc = $getOwnPropertyDescriptor; - $.setDesc = $defineProperty; - $.setDescs = $defineProperties; - $.getNames = $names.get = $getOwnPropertyNames; - $.getSymbols = $getOwnPropertySymbols; + if (t.isGenericTypeAnnotation(node)) { + var name = node.id.name; - if(DESCRIPTORS && !__webpack_require__(15)){ - redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } - } - - var symbolStatics = { - // 19.4.2.1 Symbol.for(key) - 'for': function(key){ - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function keyFor(key){ - return keyOf(SymbolRegistry, key); - }, - useSetter: function(){ setter = true; }, - useSimple: function(){ setter = false; } - }; - // 19.4.2.2 Symbol.hasInstance - // 19.4.2.3 Symbol.isConcatSpreadable - // 19.4.2.4 Symbol.iterator - // 19.4.2.6 Symbol.match - // 19.4.2.8 Symbol.replace - // 19.4.2.9 Symbol.search - // 19.4.2.10 Symbol.species - // 19.4.2.11 Symbol.split - // 19.4.2.12 Symbol.toPrimitive - // 19.4.2.13 Symbol.toStringTag - // 19.4.2.14 Symbol.unscopables - $.each.call(( - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + - 'species,split,toPrimitive,toStringTag,unscopables' - ).split(','), function(it){ - var sym = wks(it); - symbolStatics[it] = useNative ? sym : wrap(sym); - }); + if (generics[name]) { + var existing = generics[name]; + if (existing.typeParameters) { + if (node.typeParameters) { + existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); + } + } else { + existing = node.typeParameters; + } + } else { + generics[name] = node; + } - setter = true; + continue; + } - $export($export.G + $export.W, {Symbol: $Symbol}); + types.push(node); + } - $export($export.S, 'Symbol', symbolStatics); + for (var type in bases) { + types.push(bases[type]); + } - $export($export.S + $export.F * !useNative, 'Object', { - // 19.1.2.2 Object.create(O [, Properties]) - create: $create, - // 19.1.2.4 Object.defineProperty(O, P, Attributes) - defineProperty: $defineProperty, - // 19.1.2.3 Object.defineProperties(O, Properties) - defineProperties: $defineProperties, - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $getOwnPropertyNames, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: $getOwnPropertySymbols - }); + for (var _name in generics) { + types.push(generics[_name]); + } - // 24.3.2 JSON.stringify(value [, replacer [, space]]) - $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); + return types; + } - // 19.4.3.5 Symbol.prototype[@@toStringTag] - setToStringTag($Symbol, 'Symbol'); - // 20.2.1.9 Math[@@toStringTag] - setToStringTag(Math, 'Math', true); - // 24.3.3 JSON[@@toStringTag] - setToStringTag(global.JSON, 'JSON', true); + function createTypeAnnotationBasedOnTypeof(type) { + if (type === "string") { + return t.stringTypeAnnotation(); + } else if (type === "number") { + return t.numberTypeAnnotation(); + } else if (type === "undefined") { + return t.voidTypeAnnotation(); + } else if (type === "boolean") { + return t.booleanTypeAnnotation(); + } else if (type === "function") { + return t.genericTypeAnnotation(t.identifier("Function")); + } else if (type === "object") { + return t.genericTypeAnnotation(t.identifier("Object")); + } else if (type === "symbol") { + return t.genericTypeAnnotation(t.identifier("Symbol")); + } else { + throw new Error("Invalid typeof value"); + } + } /***/ }, -/* 140 */ -/***/ function(module, exports, __webpack_require__) { +/* 115 */ +/***/ function(module, exports) { - var $ = __webpack_require__(23) - , toIObject = __webpack_require__(10); - module.exports = function(object, el){ - var O = toIObject(object) - , keys = $.getKeys(O) - , length = keys.length - , index = 0 - , key; - while(length > index)if(O[key = keys[index++]] === el)return key; + 'use strict'; + module.exports = function toFastProperties(obj) { + function f() {} + f.prototype = obj; + new f(); + return; + eval(obj); }; + /***/ }, -/* 141 */ -/***/ function(module, exports, __webpack_require__) { +/* 116 */ +/***/ function(module, exports) { - // all enumerable object keys, includes symbols - var $ = __webpack_require__(23); - module.exports = function(it){ - var keys = $.getKeys(it) - , getSymbols = $.getSymbols; - if(getSymbols){ - var symbols = getSymbols(it) - , isEnum = $.isEnum - , i = 0 - , key; - while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } } - return keys; - }; + return result; + } + + module.exports = compact; + /***/ }, -/* 142 */ +/* 117 */ /***/ function(module, exports, __webpack_require__) { - // 7.2.2 IsArray(argument) - var cof = __webpack_require__(12); - module.exports = Array.isArray || function(arg){ - return cof(arg) == 'Array'; - }; + var baseClone = __webpack_require__(118); + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, false, true); + } + + module.exports = clone; + /***/ }, -/* 143 */ +/* 118 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ + var Stack = __webpack_require__(119), + arrayEach = __webpack_require__(157), + assignValue = __webpack_require__(158), + baseAssign = __webpack_require__(161), + cloneBuffer = __webpack_require__(178), + copyArray = __webpack_require__(179), + copySymbols = __webpack_require__(180), + getAllKeys = __webpack_require__(183), + getTag = __webpack_require__(186), + initCloneArray = __webpack_require__(192), + initCloneByTag = __webpack_require__(193), + initCloneObject = __webpack_require__(208), + isArray = __webpack_require__(113), + isBuffer = __webpack_require__(168), + isObject = __webpack_require__(107), + keys = __webpack_require__(163); - "use strict"; - - var _interopRequireDefault = __webpack_require__(42)["default"]; + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; - var _index = __webpack_require__(134); + 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]'; - var _index2 = _interopRequireDefault(_index); + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; - _index2["default"]("AssignmentPattern", { - visitor: ["left", "right"], - aliases: ["Pattern", "LVal"], - fields: { - left: { - validate: _index.assertNodeType("Identifier") - }, - right: { - validate: _index.assertNodeType("Expression") - } + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); } - }); - - _index2["default"]("ArrayPattern", { - visitor: ["elements", "typeAnnotation"], - aliases: ["Pattern", "LVal"], - fields: { - elements: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Expression"))) - } + if (result !== undefined) { + return result; } - }); - - _index2["default"]("ArrowFunctionExpression", { - builder: ["params", "body", "async"], - visitor: ["params", "body", "returnType"], - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: { - params: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("LVal"))) - }, - body: { - validate: _index.assertNodeType("BlockStatement", "Expression") - }, - async: { - validate: _index.assertValueType("boolean"), - "default": false - } + if (!isObject(value)) { + return value; } - }); + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; - _index2["default"]("ClassBody", { - visitor: ["body"], - fields: { - body: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("ClassMethod", "ClassProperty"))) + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); } } - }); + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); - _index2["default"]("ClassDeclaration", { - builder: ["id", "superClass", "body", "decorators"], - visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], - aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], - fields: { - id: { - validate: _index.assertNodeType("Identifier") - }, - body: { - validate: _index.assertNodeType("ClassBody") - }, - superClass: { - optional: true, - validate: _index.assertNodeType("Expression") - }, - decorators: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Decorator"))) + var props = isArr ? undefined : (isFull ? getAllKeys : keys)(value); + 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; + } - _index2["default"]("ClassExpression", { - inherits: "ClassDeclaration", - aliases: ["Scopable", "Class", "Expression", "Pureish"], - fields: { - id: { - optional: true, - validate: _index.assertNodeType("Identifier") - }, - body: { - validate: _index.assertNodeType("ClassBody") - }, - superClass: { - optional: true, - validate: _index.assertNodeType("Expression") - }, - decorators: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Decorator"))) - } - } - }); + module.exports = baseClone; - _index2["default"]("ExportAllDeclaration", { - visitor: ["source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - source: { - validate: _index.assertNodeType("StringLiteral") - } - } - }); - _index2["default"]("ExportDefaultDeclaration", { - visitor: ["declaration"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: _index.assertNodeType("FunctionDeclaration", "ClassDeclaration", "Expression") - } - } - }); +/***/ }, +/* 119 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("ExportNamedDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: _index.assertNodeType("Declaration"), - optional: true - }, - specifiers: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("ExportSpecifier"))) - }, - source: { - validate: _index.assertNodeType("StringLiteral"), - optional: true - } - } - }); + var ListCache = __webpack_require__(120), + stackClear = __webpack_require__(128), + stackDelete = __webpack_require__(129), + stackGet = __webpack_require__(130), + stackHas = __webpack_require__(131), + stackSet = __webpack_require__(132); - _index2["default"]("ExportSpecifier", { - visitor: ["local", "exported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: _index.assertNodeType("Identifier") - }, - exported: { - validate: _index.assertNodeType("Identifier") - } - } - }); + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } - _index2["default"]("ForOfStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: _index.assertNodeType("VariableDeclaration", "LVal") - }, - right: { - validate: _index.assertNodeType("Expression") - }, - body: { - validate: _index.assertNodeType("Statement") - } - } - }); + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; - _index2["default"]("ImportDeclaration", { - visitor: ["specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration"], - fields: { - specifiers: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) - }, - source: { - validate: _index.assertNodeType("StringLiteral") - } - } - }); + module.exports = Stack; - _index2["default"]("ImportDefaultSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: _index.assertNodeType("Identifier") - } - } - }); - _index2["default"]("ImportNamespaceSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: _index.assertNodeType("Identifier") - } - } - }); +/***/ }, +/* 120 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("ImportSpecifier", { - visitor: ["local", "imported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: _index.assertNodeType("Identifier") - }, - imported: { - validate: _index.assertNodeType("Identifier") - } - } - }); + var listCacheClear = __webpack_require__(121), + listCacheDelete = __webpack_require__(122), + listCacheGet = __webpack_require__(125), + listCacheHas = __webpack_require__(126), + listCacheSet = __webpack_require__(127); - _index2["default"]("MetaProperty", { - visitor: ["meta", "property"], - aliases: ["Expression"], - fields: { - // todo: limit to new.target - meta: { - validate: _index.assertValueType("string") - }, - property: { - validate: _index.assertValueType("string") - } - } - }); + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; - _index2["default"]("ClassMethod", { - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], - builder: ["kind", "key", "params", "body", "computed", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - fields: { - kind: { - validate: _index.chain(_index.assertValueType("string"), _index.assertOneOf("get", "set", "method", "constructor")), - "default": "method" - }, - computed: { - "default": false, - validate: _index.assertValueType("boolean") - }, - "static": { - "default": false, - validate: _index.assertValueType("boolean") - }, - key: { - validate: function validate(node, key, val) { - var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; - _index.assertNodeType.apply(undefined, expectedTypes)(node, key, val); - } - }, - params: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("LVal"))) - }, - body: { - validate: _index.assertNodeType("BlockStatement") - }, - generator: { - "default": false, - validate: _index.assertValueType("boolean") - }, - async: { - "default": false, - validate: _index.assertValueType("boolean") - } + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); } - }); + } - _index2["default"]("ObjectPattern", { - visitor: ["properties", "typeAnnotation"], - aliases: ["Pattern", "LVal"], - fields: { - properties: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("RestProperty", "Property"))) - } - } - }); + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; - _index2["default"]("SpreadElement", { - visitor: ["argument"], - aliases: ["UnaryLike"], - fields: { - argument: { - validate: _index.assertNodeType("Expression") - } - } - }); + module.exports = ListCache; - _index2["default"]("Super", { - aliases: ["Expression"] - }); - _index2["default"]("TaggedTemplateExpression", { - visitor: ["tag", "quasi"], - aliases: ["Expression"], - fields: { - tag: { - validate: _index.assertNodeType("Expression") - }, - quasi: { - validate: _index.assertNodeType("TemplateLiteral") - } - } - }); +/***/ }, +/* 121 */ +/***/ function(module, exports) { - _index2["default"]("TemplateElement", { - builder: ["value", "tail"], - fields: { - value: { - // todo: flatten `raw` into main node - }, - tail: { - validate: _index.assertValueType("boolean"), - "default": false - } - } - }); + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } - _index2["default"]("TemplateLiteral", { - visitor: ["quasis", "expressions"], - aliases: ["Expression", "Literal"], - fields: { - quasis: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("TemplateElement"))) - }, - expressions: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Expression"))) - } - } - }); + module.exports = listCacheClear; - _index2["default"]("YieldExpression", { - builder: ["argument", "delegate"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - delegate: { - validate: _index.assertValueType("boolean"), - "default": false - }, - argument: { - optional: true, - validate: _index.assertNodeType("Expression") - } - } - }); /***/ }, -/* 144 */ +/* 122 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ + var assocIndexOf = __webpack_require__(123); - "use strict"; - - var _interopRequireDefault = __webpack_require__(42)["default"]; - - var _index = __webpack_require__(134); + /** Used for built-in method references. */ + var arrayProto = Array.prototype; - var _index2 = _interopRequireDefault(_index); + /** Built-in value references. */ + var splice = arrayProto.splice; - _index2["default"]("AnyTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: { - // todo - } - }); + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - _index2["default"]("ArrayTypeAnnotation", { - visitor: ["elementType"], - aliases: ["Flow"], - fields: { - // todo + if (index < 0) { + return false; } - }); - - _index2["default"]("BooleanTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: { - // todo + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); } - }); + --this.size; + return true; + } - _index2["default"]("BooleanLiteralTypeAnnotation", { - aliases: ["Flow"], - fields: {} - }); + module.exports = listCacheDelete; - _index2["default"]("NullLiteralTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} - }); - _index2["default"]("ClassImplements", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - // todo - } - }); +/***/ }, +/* 123 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("ClassProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], - aliases: ["Flow", "Property"], - fields: { - // todo - } - }); + var eq = __webpack_require__(124); - _index2["default"]("DeclareClass", { - visitor: ["id", "typeParameters", "extends", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } } - }); + return -1; + } - _index2["default"]("DeclareFunction", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo - } - }); + module.exports = assocIndexOf; - _index2["default"]("DeclareInterface", { - visitor: ["id", "typeParameters", "extends", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo - } - }); - _index2["default"]("DeclareModule", { - visitor: ["id", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo - } - }); +/***/ }, +/* 124 */ +/***/ function(module, exports) { - _index2["default"]("DeclareTypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo - } - }); + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } - _index2["default"]("DeclareVariable", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo - } - }); + module.exports = eq; - _index2["default"]("ExistentialTypeParam", { - aliases: ["Flow"] - }); - _index2["default"]("FunctionTypeAnnotation", { - visitor: ["typeParameters", "params", "rest", "returnType"], - aliases: ["Flow"], - fields: { - // todo - } - }); +/***/ }, +/* 125 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("FunctionTypeParam", { - visitor: ["name", "typeAnnotation"], - aliases: ["Flow"], - fields: { - // todo - } - }); + var assocIndexOf = __webpack_require__(123); - _index2["default"]("GenericTypeAnnotation", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - // todo - } - }); + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - _index2["default"]("InterfaceExtends", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - // todo - } - }); + return index < 0 ? undefined : data[index][1]; + } - _index2["default"]("InterfaceDeclaration", { - visitor: ["id", "typeParameters", "extends", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo - } - }); + module.exports = listCacheGet; - _index2["default"]("IntersectionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow"], - fields: { - // todo - } - }); - _index2["default"]("MixedTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"] - }); +/***/ }, +/* 126 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("NullableTypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow"], - fields: { - // todo - } - }); + var assocIndexOf = __webpack_require__(123); - _index2["default"]("NumericLiteralTypeAnnotation", { - aliases: ["Flow"], - fields: { - // todo - } - }); + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } - _index2["default"]("NumberTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: { - // todo - } - }); + module.exports = listCacheHas; - _index2["default"]("StringLiteralTypeAnnotation", { - aliases: ["Flow"], - fields: { - // todo - } - }); - _index2["default"]("StringTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: { - // todo - } - }); +/***/ }, +/* 127 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("ThisTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} - }); + var assocIndexOf = __webpack_require__(123); - _index2["default"]("TupleTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow"], - fields: { - // todo - } - }); + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); - _index2["default"]("TypeofTypeAnnotation", { - visitor: ["argument"], - aliases: ["Flow"], - fields: { - // todo + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; } - }); + return this; + } - _index2["default"]("TypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - // todo - } - }); + module.exports = listCacheSet; - _index2["default"]("TypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow"], - fields: { - // todo - } - }); - _index2["default"]("TypeCastExpression", { - visitor: ["expression", "typeAnnotation"], - aliases: ["Flow", "ExpressionWrapper", "Expression"], - fields: { - // todo - } - }); +/***/ }, +/* 128 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("TypeParameterDeclaration", { - visitor: ["params"], - aliases: ["Flow"], - fields: { - // todo - } - }); + var ListCache = __webpack_require__(120); - _index2["default"]("TypeParameterInstantiation", { - visitor: ["params"], - aliases: ["Flow"], - fields: { - // todo - } - }); + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } - _index2["default"]("ObjectTypeAnnotation", { - visitor: ["properties", "indexers", "callProperties"], - aliases: ["Flow"], - fields: { - // todo - } - }); + module.exports = stackClear; - _index2["default"]("ObjectTypeCallProperty", { - visitor: ["value"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - // todo - } - }); - _index2["default"]("ObjectTypeIndexer", { - visitor: ["id", "key", "value"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - // todo - } - }); +/***/ }, +/* 129 */ +/***/ function(module, exports) { - _index2["default"]("ObjectTypeProperty", { - visitor: ["key", "value"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - // todo - } - }); + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); - _index2["default"]("QualifiedTypeIdentifier", { - visitor: ["id", "qualification"], - aliases: ["Flow"], - fields: { - // todo - } - }); + this.size = data.size; + return result; + } - _index2["default"]("UnionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow"], - fields: { - // todo - } - }); + module.exports = stackDelete; - _index2["default"]("VoidTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: { - // todo - } - }); /***/ }, -/* 145 */ -/***/ function(module, exports, __webpack_require__) { - - /* @flow */ +/* 130 */ +/***/ function(module, exports) { - "use strict"; + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } - var _interopRequireDefault = __webpack_require__(42)["default"]; + module.exports = stackGet; - var _index = __webpack_require__(134); - var _index2 = _interopRequireDefault(_index); - - _index2["default"]("JSXAttribute", { - visitor: ["name", "value"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: _index.assertNodeType("JSXIdentifier", "JSXNamespacedName") - }, - value: { - optional: true, - validate: _index.assertNodeType("JSXElement", "StringLiteral", "JSXExpressionContainer") - } - } - }); - - _index2["default"]("JSXClosingElement", { - visitor: ["name"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: _index.assertNodeType("JSXIdentifier", "JSXMemberExpression") - } - } - }); +/***/ }, +/* 131 */ +/***/ function(module, exports) { - _index2["default"]("JSXElement", { - builder: ["openingElement", "closingElement", "children", "selfClosing"], - visitor: ["openingElement", "children", "closingElement"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingElement: { - validate: _index.assertNodeType("JSXOpeningElement") - }, - closingElement: { - optional: true, - validate: _index.assertNodeType("JSXClosingElement") - }, - children: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("JSXText", "JSXExpressionContainer", "JSXElement"))) - } - } - }); + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } - _index2["default"]("JSXEmptyExpression", { - aliases: ["JSX", "Expression"] - }); + module.exports = stackHas; - _index2["default"]("JSXExpressionContainer", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: _index.assertNodeType("Expression") - } - } - }); - _index2["default"]("JSXIdentifier", { - builder: ["name"], - aliases: ["JSX", "Expression"], - fields: { - name: { - validate: _index.assertValueType("string") - } - } - }); +/***/ }, +/* 132 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("JSXMemberExpression", { - visitor: ["object", "property"], - aliases: ["JSX", "Expression"], - fields: { - object: { - validate: _index.assertNodeType("JSXMemberExpression", "JSXIdentifier") - }, - property: { - validate: _index.assertNodeType("JSXIdentifier") - } - } - }); + var ListCache = __webpack_require__(120), + Map = __webpack_require__(133), + MapCache = __webpack_require__(142); - _index2["default"]("JSXNamespacedName", { - visitor: ["namespace", "name"], - aliases: ["JSX"], - fields: { - namespace: { - validate: _index.assertNodeType("JSXIdentifier") - }, - name: { - validate: _index.assertNodeType("JSXIdentifier") - } - } - }); + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; - _index2["default"]("JSXOpeningElement", { - builder: ["name", "attributes", "selfClosing"], - visitor: ["name", "attributes"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: _index.assertNodeType("JSXIdentifier", "JSXMemberExpression") - }, - selfClosing: { - "default": false, - validate: _index.assertValueType("boolean") - }, - attributes: { - validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("JSXAttribute", "JSXSpreadAttribute"))) - } - } - }); + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } - _index2["default"]("JSXSpreadAttribute", { - visitor: ["argument"], - aliases: ["JSX"], - fields: { - argument: { - validate: _index.assertNodeType("Expression") - } - } - }); + module.exports = stackSet; - _index2["default"]("JSXText", { - aliases: ["JSX"], - builder: ["value"], - fields: { - value: { - validate: _index.assertValueType("string") - } - } - }); /***/ }, -/* 146 */ +/* 133 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ - - "use strict"; - - var _interopRequireDefault = __webpack_require__(42)["default"]; - - var _index = __webpack_require__(134); + var getNative = __webpack_require__(134), + root = __webpack_require__(139); - var _index2 = _interopRequireDefault(_index); + /* Built-in method references that are verified to be native. */ + var Map = getNative(root, 'Map'); - _index2["default"]("Noop", { - visitor: [] - }); + module.exports = Map; - _index2["default"]("ParenthesizedExpression", { - visitor: ["expression"], - aliases: ["Expression", "ExpressionWrapper"], - fields: { - expression: { - validate: _index.assertNodeType("Expression") - } - } - }); /***/ }, -/* 147 */ +/* 134 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ + var baseIsNative = __webpack_require__(135), + getValue = __webpack_require__(141); - "use strict"; + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } - var _interopRequireDefault = __webpack_require__(42)["default"]; + module.exports = getNative; - var _index = __webpack_require__(134); - var _index2 = _interopRequireDefault(_index); +/***/ }, +/* 135 */ +/***/ function(module, exports, __webpack_require__) { - _index2["default"]("AwaitExpression", { - builder: ["argument"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - argument: { - validate: _index.assertNodeType("Expression") - } - } - }); + var isFunction = __webpack_require__(136), + isMasked = __webpack_require__(137), + isObject = __webpack_require__(107), + toSource = __webpack_require__(140); - _index2["default"]("BindExpression", { - visitor: ["object", "callee"], - aliases: ["Expression"], - fields: { - // todo - } - }); + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - _index2["default"]("Decorator", { - visitor: ["expression"], - fields: { - expression: { - validate: _index.assertNodeType("Expression") - } - } - }); + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; - _index2["default"]("DoExpression", { - visitor: ["body"], - aliases: ["Expression"], - fields: { - body: { - validate: _index.assertNodeType("BlockStatement") - } - } - }); + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; - _index2["default"]("ExportDefaultSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: _index.assertNodeType("Identifier") - } - } - }); + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; - _index2["default"]("ExportNamespaceSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: _index.assertNodeType("Identifier") - } - } - }); + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - _index2["default"]("RestProperty", { - visitor: ["argument"], - aliases: ["UnaryLike"], - fields: { - argument: { - validate: _index.assertNodeType("LVal") - } - } - }); + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); - _index2["default"]("SpreadProperty", { - visitor: ["argument"], - aliases: ["UnaryLike"], - fields: { - argument: { - validate: _index.assertNodeType("Expression") - } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; } - }); + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + module.exports = baseIsNative; + /***/ }, -/* 148 */ +/* 136 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ + var isObject = __webpack_require__(107); - "use strict"; + /** `Object#toString` result references. */ + var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; - var _interopRequireWildcard = __webpack_require__(44)["default"]; + /** Used for built-in method references. */ + var objectProto = Object.prototype; - exports.__esModule = true; - exports.isCompatTag = isCompatTag; - exports.buildChildren = buildChildren; + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; - var _index = __webpack_require__(46); + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag || tag == proxyTag; + } - var t = _interopRequireWildcard(_index); + module.exports = isFunction; - var isReactComponent = t.buildMatchMemberExpression("React.Component"); - exports.isReactComponent = isReactComponent; +/***/ }, +/* 137 */ +/***/ function(module, exports, __webpack_require__) { - function isCompatTag(tagName /*:: ?: string*/) /*: boolean*/ { - return !!tagName && /^[a-z]|\-/.test(tagName); - } + var coreJsData = __webpack_require__(138); - function cleanJSXElementLiteralChild(child /*: { value: string }*/, args /*: Array*/) { - var lines = child.value.split(/\r\n|\n|\r/); + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); - var lastNonEmptyLine = 0; + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } - for (var i = 0; i < lines.length; i++) { - if (lines[i].match(/[^ \t]/)) { - lastNonEmptyLine = i; - } - } + module.exports = isMasked; - var str = ""; - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; +/***/ }, +/* 138 */ +/***/ function(module, exports, __webpack_require__) { - var isFirstLine = i === 0; - var isLastLine = i === lines.length - 1; - var isLastNonEmptyLine = i === lastNonEmptyLine; + var root = __webpack_require__(139); - // replace rendered whitespace tabs with spaces - var trimmedLine = line.replace(/\t/g, " "); + /** Used to detect overreaching core-js shims. */ + var coreJsData = root['__core-js_shared__']; - // trim whitespace touching a newline - if (!isFirstLine) { - trimmedLine = trimmedLine.replace(/^[ ]+/, ""); - } + module.exports = coreJsData; - // trim whitespace touching an endline - if (!isLastLine) { - trimmedLine = trimmedLine.replace(/[ ]+$/, ""); - } - if (trimmedLine) { - if (!isLastNonEmptyLine) { - trimmedLine += " "; - } +/***/ }, +/* 139 */ +/***/ function(module, exports, __webpack_require__) { - str += trimmedLine; - } - } + var freeGlobal = __webpack_require__(111); - if (str) args.push(t.stringLiteral(str)); - } + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - function buildChildren(node /*: Object*/) /*: Array*/ { - var elems = []; + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - for (var i = 0; i < node.children.length; i++) { - var child = node.children[i]; + module.exports = root; - if (t.isJSXText(child)) { - cleanJSXElementLiteralChild(child, elems); - continue; - } - if (t.isJSXExpressionContainer(child)) child = child.expression; - if (t.isJSXEmptyExpression(child)) continue; +/***/ }, +/* 140 */ +/***/ function(module, exports) { - elems.push(child); + /** Used for built-in method references. */ + var funcProto = Function.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} } + return ''; + } - return elems; + module.exports = toSource; + + +/***/ }, +/* 141 */ +/***/ function(module, exports) { + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; } + module.exports = getValue; + + /***/ }, -/* 149 */ +/* 142 */ /***/ function(module, exports, __webpack_require__) { - /* @flow */ + var mapCacheClear = __webpack_require__(143), + mapCacheDelete = __webpack_require__(151), + mapCacheGet = __webpack_require__(154), + mapCacheHas = __webpack_require__(155), + mapCacheSet = __webpack_require__(156); - "use strict"; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; - var _Object$create = __webpack_require__(150)["default"]; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } - var _interopRequireWildcard = __webpack_require__(44)["default"]; + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; - exports.__esModule = true; - exports.getBindingIdentifiers = getBindingIdentifiers; - exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; + module.exports = MapCache; - var _index = __webpack_require__(46); - var t = _interopRequireWildcard(_index); +/***/ }, +/* 143 */ +/***/ function(module, exports, __webpack_require__) { + + var Hash = __webpack_require__(144), + ListCache = __webpack_require__(120), + Map = __webpack_require__(133); /** - * Return a list of binding identifiers associated with the input `node`. + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } - function getBindingIdentifiers(node /*: Object*/, duplicates /*:: ?: boolean*/, outerOnly /*:: ?: boolean*/) /*: Object*/ { - var search = [].concat(node); - var ids = _Object$create(null); + module.exports = mapCacheClear; - while (search.length) { - var id = search.shift(); - if (!id) continue; - var keys = t.getBindingIdentifiers.keys[id.type]; +/***/ }, +/* 144 */ +/***/ function(module, exports, __webpack_require__) { - if (t.isIdentifier(id)) { - if (duplicates) { - var _ids = ids[id.name] = ids[id.name] || []; - _ids.push(id); - } else { - ids[id.name] = id; - } - continue; - } + var hashClear = __webpack_require__(145), + hashDelete = __webpack_require__(147), + hashGet = __webpack_require__(148), + hashHas = __webpack_require__(149), + hashSet = __webpack_require__(150); - if (t.isExportDeclaration(id)) { - if (t.isDeclaration(node.declaration)) { - search.push(node.declaration); - } - continue; - } + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; - if (outerOnly) { - if (t.isFunctionDeclaration(id)) { - search.push(id.id); - continue; - } + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } - if (t.isFunctionExpression(id)) { - continue; - } - } + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (id[key]) { - search = search.concat(id[key]); - } - } - } - } + module.exports = Hash; - return ids; - } + +/***/ }, +/* 145 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(146); /** - * Mapping of types to their identifier keys. + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } - getBindingIdentifiers.keys = { - DeclareClass: ["id"], - DeclareFunction: ["id"], - DeclareModule: ["id"], - DeclareVariable: ["id"], - InterfaceDeclaration: ["id"], - TypeAlias: ["id"], + module.exports = hashClear; - CatchClause: ["param"], - LabeledStatement: ["label"], - UnaryExpression: ["argument"], - AssignmentExpression: ["left"], - ImportSpecifier: ["local"], - ImportNamespaceSpecifier: ["local"], - ImportDefaultSpecifier: ["local"], - ImportDeclaration: ["specifiers"], +/***/ }, +/* 146 */ +/***/ function(module, exports, __webpack_require__) { - ExportSpecifier: ["exported"], - ExportNamespaceSpecifier: ["exported"], - ExportDefaultSpecifier: ["exported"], + var getNative = __webpack_require__(134); - FunctionDeclaration: ["id", "params"], - FunctionExpression: ["id", "params"], + /* Built-in method references that are verified to be native. */ + var nativeCreate = getNative(Object, 'create'); - ClassDeclaration: ["id"], - ClassExpression: ["id"], + module.exports = nativeCreate; - RestElement: ["argument"], - UpdateExpression: ["argument"], - SpreadProperty: ["argument"], - ObjectProperty: ["value"], +/***/ }, +/* 147 */ +/***/ function(module, exports) { - AssignmentPattern: ["left"], - ArrayPattern: ["elements"], - ObjectPattern: ["properties"], + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } - VariableDeclaration: ["declarations"], - VariableDeclarator: ["id"] - }; + module.exports = hashDelete; - function getOuterBindingIdentifiers(node /*: Object*/, duplicates /*:: ?: boolean*/) /*: Object*/ { - return getBindingIdentifiers(node, duplicates, true); - } /***/ }, -/* 150 */ +/* 148 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(151), __esModule: true }; + var nativeCreate = __webpack_require__(146); -/***/ }, -/* 151 */ -/***/ function(module, exports, __webpack_require__) { + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; - var $ = __webpack_require__(23); - module.exports = function create(P, D){ - return $.create(P, D); - }; + /** Used for built-in method references. */ + var objectProto = Object.prototype; -/***/ }, -/* 152 */ -/***/ function(module, exports, __webpack_require__) { + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } - /* @flow */ + module.exports = hashGet; - "use strict"; - var _getIterator = __webpack_require__(3)["default"]; +/***/ }, +/* 149 */ +/***/ function(module, exports, __webpack_require__) { - var _interopRequireDefault = __webpack_require__(42)["default"]; + var nativeCreate = __webpack_require__(146); - var _interopRequireWildcard = __webpack_require__(44)["default"]; + /** Used for built-in method references. */ + var objectProto = Object.prototype; - exports.__esModule = true; - exports.isBinding = isBinding; - exports.isReferenced = isReferenced; - exports.isValidIdentifier = isValidIdentifier; - exports.isLet = isLet; - exports.isBlockScoped = isBlockScoped; - exports.isVar = isVar; - exports.isSpecifierDefault = isSpecifierDefault; - exports.isScope = isScope; - exports.isImmutable = isImmutable; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - var _retrievers = __webpack_require__(149); + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } - var _esutils = __webpack_require__(153); + module.exports = hashHas; - var _esutils2 = _interopRequireDefault(_esutils); - var _index = __webpack_require__(46); +/***/ }, +/* 150 */ +/***/ function(module, exports, __webpack_require__) { - var t = _interopRequireWildcard(_index); + var nativeCreate = __webpack_require__(146); - var _constants = __webpack_require__(136); + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** - * Check if the input `node` is a binding identifier. + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } - function isBinding(node /*: Object*/, parent /*: Object*/) /*: boolean*/ { - var keys = _retrievers.getBindingIdentifiers.keys[parent.type]; - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var val = parent[key]; - if (Array.isArray(val)) { - if (val.indexOf(node) >= 0) return true; - } else { - if (val === node) return true; - } - } - } + module.exports = hashSet; - return false; - } + +/***/ }, +/* 151 */ +/***/ function(module, exports, __webpack_require__) { + + var getMapData = __webpack_require__(152); /** - * Check if the input `node` is a reference to a bound variable. + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } - function isReferenced(node /*: Object*/, parent /*: Object*/) /*: boolean*/ { - switch (parent.type) { - // yes: PARENT[NODE] - // yes: NODE.child - // no: parent.NODE - case "MemberExpression": - case "JSXMemberExpression": - case "BindExpression": - if (parent.property === node && parent.computed) { - return true; - } else if (parent.object === node) { - return true; - } else { - return false; - } + module.exports = mapCacheDelete; - // no: new.NODE - // no: NODE.target - case "MetaProperty": - return false; - // yes: { [NODE]: "" } - // yes: { NODE } - // no: { NODE: "" } - case "ObjectProperty": - if (parent.key === node) { - return parent.computed; - } +/***/ }, +/* 152 */ +/***/ function(module, exports, __webpack_require__) { - // no: let NODE = init; - // yes: let id = NODE; - case "VariableDeclarator": - return parent.id !== node; + var isKeyable = __webpack_require__(153); - // no: function NODE() {} - // no: function foo(NODE) {} - case "ArrowFunctionExpression": - case "FunctionDeclaration": - case "FunctionExpression": - for (var _iterator = (parent.params /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } + module.exports = getMapData; - var param = _ref; - if (param === node) return false; - } +/***/ }, +/* 153 */ +/***/ function(module, exports) { - return parent.id !== node; + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } - // no: export { foo as NODE }; - // yes: export { NODE as foo }; - // no: export { NODE as foo } from "foo"; - case "ExportSpecifier": - if (parent.source) { - return false; - } else { - return parent.local === node; - } + module.exports = isKeyable; - // no: export NODE from "foo"; - // no: export * as NODE from "foo"; - case "ExportNamespaceSpecifier": - case "ExportDefaultSpecifier": - return false; - // no:
- case "JSXAttribute": - return parent.name !== node; +/***/ }, +/* 154 */ +/***/ function(module, exports, __webpack_require__) { - // no: class { NODE = value; } - // yes: class { key = NODE; } - case "ClassProperty": - return parent.value === node; + var getMapData = __webpack_require__(152); - // no: import NODE from "foo"; - // no: import * as NODE from "foo"; - // no: import { NODE as foo } from "foo"; - // no: import { foo as NODE } from "foo"; - // no: import NODE from "bar"; - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "ImportSpecifier": - return false; + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } - // no: class NODE {} - case "ClassDeclaration": - case "ClassExpression": - return parent.id !== node; + module.exports = mapCacheGet; - // yes: class { [NODE](){} } - case "ClassMethod": - case "ObjectMethod": - return parent.key === node && parent.computed; - // no: NODE: for (;;) {} - case "LabeledStatement": - return false; +/***/ }, +/* 155 */ +/***/ function(module, exports, __webpack_require__) { - // no: try {} catch (NODE) {} - case "CatchClause": - return parent.param !== node; + var getMapData = __webpack_require__(152); - // no: function foo(...NODE) {} - case "RestElement": - return false; + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } - // yes: left = NODE; - // no: NODE = right; - case "AssignmentExpression": - return parent.right === node; + module.exports = mapCacheHas; - // no: [NODE = foo] = []; - // yes: [foo = NODE] = []; - case "AssignmentPattern": - return parent.right === node; - // no: [NODE] = []; - // no: ({ NODE }) = []; - case "ObjectPattern": - case "ArrayPattern": - return false; - } +/***/ }, +/* 156 */ +/***/ function(module, exports, __webpack_require__) { - return true; - } + var getMapData = __webpack_require__(152); /** - * Check if the input `name` is a valid identifier name - * and isn't a reserved word. + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; - function isValidIdentifier(name /*: string*/) /*: boolean*/ { - if (typeof name !== "string" || _esutils2["default"].keyword.isReservedWordES6(name, true)) { - return false; - } else { - return _esutils2["default"].keyword.isIdentifierNameES6(name); - } + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; } - /** - * Check if the input `node` is a `let` variable declaration. - */ + module.exports = mapCacheSet; - function isLet(node /*: Object*/) /*: boolean*/ { - return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); - } + +/***/ }, +/* 157 */ +/***/ function(module, exports) { /** - * Check if the input `node` is block scoped. + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. */ + function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; - function isBlockScoped(node /*: Object*/) /*: boolean*/ { - return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node); + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; } - /** - * Check if the input `node` is a variable declaration. - */ + module.exports = arrayEach; - function isVar(node /*: Object*/) /*: boolean*/ { - return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; - } - /** - * Check if the input `specifier` is a `default` import or export. - */ +/***/ }, +/* 158 */ +/***/ function(module, exports, __webpack_require__) { - function isSpecifierDefault(specifier /*: Object*/) /*: boolean*/ { - return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" }); - } + var baseAssignValue = __webpack_require__(159), + eq = __webpack_require__(124); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * Check if the input `node` is a scope. + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - - function isScope(node /*: Object*/, parent /*: Object*/) /*: boolean*/ { - if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) { - return false; + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } - - return t.isScopable(node); } - /** - * Check if the input `node` is definitely immutable. - */ + module.exports = assignValue; - function isImmutable(node /*: Object*/) /*: boolean*/ { - if (t.isType(node.type, "Immutable")) return true; - if (t.isIdentifier(node)) { - if (node.name === "undefined") { - // immutable! - return true; - } else { - // no idea... - return false; - } - } +/***/ }, +/* 159 */ +/***/ function(module, exports, __webpack_require__) { - return false; + var defineProperty = __webpack_require__(160); + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } } + module.exports = baseAssignValue; + + /***/ }, -/* 153 */ +/* 160 */ /***/ function(module, exports, __webpack_require__) { - /* - Copyright (C) 2013 Yusuke Suzuki + var getNative = __webpack_require__(134); - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + module.exports = defineProperty; - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ +/***/ }, +/* 161 */ +/***/ function(module, exports, __webpack_require__) { - (function () { - 'use strict'; + var copyObject = __webpack_require__(162), + keys = __webpack_require__(163); - exports.ast = __webpack_require__(154); - exports.code = __webpack_require__(155); - exports.keyword = __webpack_require__(156); - }()); - /* vim: set sw=4 ts=4 et tw=80 : */ + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + module.exports = baseAssign; /***/ }, -/* 154 */ -/***/ function(module, exports) { +/* 162 */ +/***/ function(module, exports, __webpack_require__) { - /* - Copyright (C) 2013 Yusuke Suzuki + var assignValue = __webpack_require__(158), + baseAssignValue = __webpack_require__(159); - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + var index = -1, + length = props.length; - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + while (++index < length) { + var key = props[index]; - (function () { - 'use strict'; + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; - function isExpression(node) { - if (node == null) { return false; } - switch (node.type) { - case 'ArrayExpression': - case 'AssignmentExpression': - case 'BinaryExpression': - case 'CallExpression': - case 'ConditionalExpression': - case 'FunctionExpression': - case 'Identifier': - case 'Literal': - case 'LogicalExpression': - case 'MemberExpression': - case 'NewExpression': - case 'ObjectExpression': - case 'SequenceExpression': - case 'ThisExpression': - case 'UnaryExpression': - case 'UpdateExpression': - return true; - } - return false; + if (newValue === undefined) { + newValue = source[key]; } - - function isIterationStatement(node) { - if (node == null) { return false; } - switch (node.type) { - case 'DoWhileStatement': - case 'ForInStatement': - case 'ForStatement': - case 'WhileStatement': - return true; - } - return false; + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); } + } + return object; + } - function isStatement(node) { - if (node == null) { return false; } - switch (node.type) { - case 'BlockStatement': - case 'BreakStatement': - case 'ContinueStatement': - case 'DebuggerStatement': - case 'DoWhileStatement': - case 'EmptyStatement': - case 'ExpressionStatement': - case 'ForInStatement': - case 'ForStatement': - case 'IfStatement': - case 'LabeledStatement': - case 'ReturnStatement': - case 'SwitchStatement': - case 'ThrowStatement': - case 'TryStatement': - case 'VariableDeclaration': - case 'WhileStatement': - case 'WithStatement': - return true; - } - return false; - } + module.exports = copyObject; - function isSourceElement(node) { - return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; - } - function trailingStatement(node) { - switch (node.type) { - case 'IfStatement': - if (node.alternate != null) { - return node.alternate; - } - return node.consequent; +/***/ }, +/* 163 */ +/***/ function(module, exports, __webpack_require__) { - case 'LabeledStatement': - case 'ForStatement': - case 'ForInStatement': - case 'WhileStatement': - case 'WithStatement': - return node.body; - } - return null; - } + var arrayLikeKeys = __webpack_require__(164), + baseKeys = __webpack_require__(174), + isArrayLike = __webpack_require__(177); - function isProblematicIfStatement(node) { - var current; + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } - if (node.type !== 'IfStatement') { - return false; - } - if (node.alternate == null) { - return false; - } - current = node.consequent; - do { - if (current.type === 'IfStatement') { - if (current.alternate == null) { - return true; - } - } - current = trailingStatement(current); - } while (current); + module.exports = keys; - return false; - } - module.exports = { - isExpression: isExpression, - isStatement: isStatement, - isIterationStatement: isIterationStatement, - isSourceElement: isSourceElement, - isProblematicIfStatement: isProblematicIfStatement, +/***/ }, +/* 164 */ +/***/ function(module, exports, __webpack_require__) { - trailingStatement: trailingStatement - }; - }()); - /* vim: set sw=4 ts=4 et tw=80 : */ + var baseTimes = __webpack_require__(165), + isArguments = __webpack_require__(166), + isArray = __webpack_require__(113), + isBuffer = __webpack_require__(168), + isIndex = __webpack_require__(170), + isTypedArray = __webpack_require__(171); + /** Used for built-in method references. */ + var objectProto = Object.prototype; -/***/ }, -/* 155 */ -/***/ function(module, exports) { + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - /* - Copyright (C) 2013-2014 Yusuke Suzuki - Copyright (C) 2014 Ivan Nikulin + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + module.exports = arrayLikeKeys; - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - (function () { - 'use strict'; +/***/ }, +/* 165 */ +/***/ function(module, exports) { - var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); - // See `tools/generate-identifier-regex.js`. - ES5Regex = { - // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart: - NonAsciiIdentifierStart: /[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/, - // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart: - NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ - }; + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } - ES6Regex = { - // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: - NonAsciiIdentifierStart: /[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, - // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: - NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\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-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ - }; + module.exports = baseTimes; - function isDecimalDigit(ch) { - return 0x30 <= ch && ch <= 0x39; // 0..9 - } - function isHexDigit(ch) { - return 0x30 <= ch && ch <= 0x39 || // 0..9 - 0x61 <= ch && ch <= 0x66 || // a..f - 0x41 <= ch && ch <= 0x46; // A..F - } +/***/ }, +/* 166 */ +/***/ function(module, exports, __webpack_require__) { - function isOctalDigit(ch) { - return ch >= 0x30 && ch <= 0x37; // 0..7 - } + var baseIsArguments = __webpack_require__(167), + isObjectLike = __webpack_require__(103); - // 7.2 White Space - - NON_ASCII_WHITESPACES = [ - 0x1680, 0x180E, - 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, - 0x202F, 0x205F, - 0x3000, - 0xFEFF - ]; + /** Used for built-in method references. */ + var objectProto = Object.prototype; - function isWhiteSpace(ch) { - return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || - ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; - } + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - // 7.3 Line Terminators + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; - function isLineTerminator(ch) { - return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; - } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; - // 7.6 Identifier Names and Identifiers + module.exports = isArguments; - function fromCodePoint(cp) { - if (cp <= 0xFFFF) { return String.fromCharCode(cp); } - var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); - var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00); - return cu1 + cu2; - } - IDENTIFIER_START = new Array(0x80); - for(ch = 0; ch < 0x80; ++ch) { - IDENTIFIER_START[ch] = - ch >= 0x61 && ch <= 0x7A || // a..z - ch >= 0x41 && ch <= 0x5A || // A..Z - ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) - } +/***/ }, +/* 167 */ +/***/ function(module, exports, __webpack_require__) { - IDENTIFIER_PART = new Array(0x80); - for(ch = 0; ch < 0x80; ++ch) { - IDENTIFIER_PART[ch] = - ch >= 0x61 && ch <= 0x7A || // a..z - ch >= 0x41 && ch <= 0x5A || // A..Z - ch >= 0x30 && ch <= 0x39 || // 0..9 - ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) - } + var isObjectLike = __webpack_require__(103); - function isIdentifierStartES5(ch) { - return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); - } + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]'; - function isIdentifierPartES5(ch) { - return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); - } + /** Used for built-in method references. */ + var objectProto = Object.prototype; - function isIdentifierStartES6(ch) { - return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); - } + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; - function isIdentifierPartES6(ch) { - return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); - } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && objectToString.call(value) == argsTag; + } - module.exports = { - isDecimalDigit: isDecimalDigit, - isHexDigit: isHexDigit, - isOctalDigit: isOctalDigit, - isWhiteSpace: isWhiteSpace, - isLineTerminator: isLineTerminator, - isIdentifierStartES5: isIdentifierStartES5, - isIdentifierPartES5: isIdentifierPartES5, - isIdentifierStartES6: isIdentifierStartES6, - isIdentifierPartES6: isIdentifierPartES6 - }; - }()); - /* vim: set sw=4 ts=4 et tw=80 : */ + module.exports = baseIsArguments; /***/ }, -/* 156 */ +/* 168 */ /***/ function(module, exports, __webpack_require__) { - /* - Copyright (C) 2013 Yusuke Suzuki + /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(139), + stubFalse = __webpack_require__(169); - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; - (function () { - 'use strict'; + /** Built-in value references. */ + var Buffer = moduleExports ? root.Buffer : undefined; - var code = __webpack_require__(155); + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - function isStrictModeReservedWordES6(id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'let': - return true; - default: - return false; - } - } + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; - function isKeywordES5(id, strict) { - // yield should not be treated as keyword under non-strict mode. - if (!strict && id === 'yield') { - return false; - } - return isKeywordES6(id, strict); - } + module.exports = isBuffer; - function isKeywordES6(id, strict) { - if (strict && isStrictModeReservedWordES6(id)) { - return true; - } + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(110)(module))) - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || (id === 'yield') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; - } - } +/***/ }, +/* 169 */ +/***/ function(module, exports) { - function isReservedWordES5(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); - } + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } - function isReservedWordES6(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); - } + module.exports = stubFalse; - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - function isIdentifierNameES5(id) { - var i, iz, ch; +/***/ }, +/* 170 */ +/***/ function(module, exports) { - if (id.length === 0) { return false; } + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; - ch = id.charCodeAt(0); - if (!code.isIdentifierStartES5(ch)) { - return false; - } + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; - for (i = 1, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - if (!code.isIdentifierPartES5(ch)) { - return false; - } - } - return true; - } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } - function decodeUtf16(lead, trail) { - return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - } + module.exports = isIndex; - function isIdentifierNameES6(id) { - var i, iz, ch, lowCh, check; - if (id.length === 0) { return false; } +/***/ }, +/* 171 */ +/***/ function(module, exports, __webpack_require__) { - check = code.isIdentifierStartES6; - for (i = 0, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - if (0xD800 <= ch && ch <= 0xDBFF) { - ++i; - if (i >= iz) { return false; } - lowCh = id.charCodeAt(i); - if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { - return false; - } - ch = decodeUtf16(ch, lowCh); - } - if (!check(ch)) { - return false; - } - check = code.isIdentifierPartES6; - } - return true; - } + var baseIsTypedArray = __webpack_require__(172), + baseUnary = __webpack_require__(108), + nodeUtil = __webpack_require__(109); - function isIdentifierES5(id, strict) { - return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); - } + /* Node.js helper references. */ + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - function isIdentifierES6(id, strict) { - return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); - } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - module.exports = { - isKeywordES5: isKeywordES5, - isKeywordES6: isKeywordES6, - isReservedWordES5: isReservedWordES5, - isReservedWordES6: isReservedWordES6, - isRestrictedWord: isRestrictedWord, - isIdentifierNameES5: isIdentifierNameES5, - isIdentifierNameES6: isIdentifierNameES6, - isIdentifierES5: isIdentifierES5, - isIdentifierES6: isIdentifierES6 - }; - }()); - /* vim: set sw=4 ts=4 et tw=80 : */ + module.exports = isTypedArray; /***/ }, -/* 157 */ +/* 172 */ /***/ function(module, exports, __webpack_require__) { - /* @noflow */ - - "use strict"; - - var _getIterator = __webpack_require__(3)["default"]; + var isLength = __webpack_require__(173), + isObjectLike = __webpack_require__(103); - var _Number$MAX_SAFE_INTEGER = __webpack_require__(158)["default"]; + /** `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 _interopRequireDefault = __webpack_require__(42)["default"]; + 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]'; - var _interopRequireWildcard = __webpack_require__(44)["default"]; + /** 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; - exports.__esModule = true; - exports.toComputedKey = toComputedKey; - exports.toSequenceExpression = toSequenceExpression; - exports.toKeyAlias = toKeyAlias; - exports.toIdentifier = toIdentifier; - exports.toBindingIdentifierName = toBindingIdentifierName; - exports.toStatement = toStatement; - exports.toExpression = toExpression; - exports.toBlock = toBlock; - exports.valueToNode = valueToNode; + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; - var _lodashLangIsPlainObject = __webpack_require__(161); + /** + * 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)]; + } - var _lodashLangIsPlainObject2 = _interopRequireDefault(_lodashLangIsPlainObject); + module.exports = baseIsTypedArray; - var _lodashLangIsNumber = __webpack_require__(163); - var _lodashLangIsNumber2 = _interopRequireDefault(_lodashLangIsNumber); +/***/ }, +/* 173 */ +/***/ function(module, exports) { - var _lodashLangIsRegExp = __webpack_require__(164); + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; - var _lodashLangIsRegExp2 = _interopRequireDefault(_lodashLangIsRegExp); + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } - var _lodashLangIsString = __webpack_require__(165); + module.exports = isLength; - var _lodashLangIsString2 = _interopRequireDefault(_lodashLangIsString); - var _babelTraverse = __webpack_require__(166); +/***/ }, +/* 174 */ +/***/ function(module, exports, __webpack_require__) { - var _babelTraverse2 = _interopRequireDefault(_babelTraverse); + var isPrototype = __webpack_require__(175), + nativeKeys = __webpack_require__(176); - var _index = __webpack_require__(46); + /** Used for built-in method references. */ + var objectProto = Object.prototype; - var t = _interopRequireWildcard(_index); + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - /*:: import type { Scope } from "babel-traverse";*/ - function toComputedKey(node /*: Object*/) /*: Object*/ { - var key /*: Object*/ = arguments.length <= 1 || arguments[1] === undefined ? node.key || node.property : arguments[1]; - return (function () { - if (!node.computed) { - if (t.isIdentifier(key)) key = t.stringLiteral(key.name); + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); } - return key; - })(); + } + return result; } + module.exports = baseKeys; + + +/***/ }, +/* 175 */ +/***/ function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + /** - * Turn an array of statement `nodes` into a `SequenceExpression`. - * - * Variable declarations are turned into simple assignments and their - * declarations hoisted to the top of the current scope. + * Checks if `value` is likely a prototype object. * - * Expression statements are just resolved to their expression. + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - function toSequenceExpression(nodes /*: Array*/, scope /*: Scope*/) /*: ?Object*/ { - if (!nodes || !nodes.length) return; + return value === proto; + } - var declars = []; - var bailed = false; + module.exports = isPrototype; - var result = convert(nodes); - if (bailed) return; - for (var i = 0; i < declars.length; i++) { - scope.push(declars[i]); - } +/***/ }, +/* 176 */ +/***/ function(module, exports, __webpack_require__) { - return result; + var overArg = __webpack_require__(102); - function convert(nodes) { - var ensureLastUndefined = false; - var exprs = []; + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = overArg(Object.keys, Object); - for (var _iterator = (nodes /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + module.exports = nativeKeys; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - var node = _ref; +/***/ }, +/* 177 */ +/***/ function(module, exports, __webpack_require__) { - if (t.isExpression(node)) { - exprs.push(node); - } else if (t.isExpressionStatement(node)) { - exprs.push(node.expression); - } else if (t.isVariableDeclaration(node)) { - if (node.kind !== "var") return bailed = true; // bailed + var isFunction = __webpack_require__(136), + isLength = __webpack_require__(173); - for (var _iterator2 = (node.declarations /*: Array*/), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } + module.exports = isArrayLike; - var declar = _ref2; - var bindings = t.getBindingIdentifiers(declar); - for (var key in bindings) { - declars.push({ - kind: node.kind, - id: bindings[key] - }); - } +/***/ }, +/* 178 */ +/***/ function(module, exports, __webpack_require__) { - if (declar.init) { - exprs.push(t.assignmentExpression("=", declar.id, declar.init)); - } - } + /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(139); - ensureLastUndefined = true; - continue; - } else if (t.isIfStatement(node)) { - var consequent = node.consequent ? convert([node.consequent]) : scope.buildUndefinedNode(); - var alternate = node.alternate ? convert([node.alternate]) : scope.buildUndefinedNode(); - if (!consequent || !alternate) return bailed = true; + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - exprs.push(t.conditionalExpression(node.test, consequent, alternate)); - } else if (t.isBlockStatement(node)) { - exprs.push(convert(node.body)); - } else if (t.isEmptyStatement(node)) { - // empty statement so ensure the last item is undefined if we're last - ensureLastUndefined = true; - continue; - } else { - // bailed, we can't turn this statement into an expression - return bailed = true; - } + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - ensureLastUndefined = false; - } + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; - if (ensureLastUndefined || exprs.length === 0) { - exprs.push(scope.buildUndefinedNode()); - } + /** Built-in value references. */ + var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; - // - - if (exprs.length === 1) { - return exprs[0]; - } else { - return t.sequenceExpression(exprs); - } + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; } - function toKeyAlias(node /*: Object*/) /*: string*/ { - var key /*: Object*/ = arguments.length <= 1 || arguments[1] === undefined ? node.key : arguments[1]; - return (function () { - var alias = undefined; + module.exports = cloneBuffer; - if (node.kind === "method") { - return toKeyAlias.increment() + ""; - } else if (t.isIdentifier(key)) { - alias = key.name; - } else if (t.isStringLiteral(key)) { - alias = JSON.stringify(key.value); - } else { - alias = JSON.stringify(_babelTraverse2["default"].removeProperties(t.cloneDeep(key))); - } + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(110)(module))) - if (node.computed) { - alias = "[" + alias + "]"; - } +/***/ }, +/* 179 */ +/***/ function(module, exports) { - if (node["static"]) { - alias = "static:" + alias; - } + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; - return alias; - })(); + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; } - toKeyAlias.uid = 0; + module.exports = copyArray; - toKeyAlias.increment = function () { - if (toKeyAlias.uid >= _Number$MAX_SAFE_INTEGER) { - return toKeyAlias.uid = 0; - } else { - return toKeyAlias.uid++; - } - }; - function toIdentifier(name /*: string*/) /*: string*/ { - name = name + ""; +/***/ }, +/* 180 */ +/***/ function(module, exports, __webpack_require__) { - // replace all non-valid identifiers with dashes - name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); + var copyObject = __webpack_require__(162), + getSymbols = __webpack_require__(181); - // remove all dashes and numbers from start of name - name = name.replace(/^[-0-9]+/, ""); + /** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } - // camel case - name = name.replace(/[-\s]+(.)?/g, function (match, c) { - return c ? c.toUpperCase() : ""; - }); + module.exports = copySymbols; - if (!t.isValidIdentifier(name)) { - name = "_" + name; - } - return name || "_"; - } +/***/ }, +/* 181 */ +/***/ function(module, exports, __webpack_require__) { - function toBindingIdentifierName(name /*: string*/) /*: string*/ { - name = toIdentifier(name); - if (name === "eval" || name === "arguments") name = "_" + name; - return name; - } + var overArg = __webpack_require__(102), + stubArray = __webpack_require__(182); + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols = Object.getOwnPropertySymbols; /** - * [Please add a description.] - * @returns {Object|Boolean} + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ + var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; - function toStatement(node /*: Object*/, ignore /*:: ?: boolean*/) { - if (t.isStatement(node)) { - return node; - } + module.exports = getSymbols; - var mustHaveId = false; - var newType = undefined; - if (t.isClass(node)) { - mustHaveId = true; - newType = "ClassDeclaration"; - } else if (t.isFunction(node)) { - mustHaveId = true; - newType = "FunctionDeclaration"; - } else if (t.isAssignmentExpression(node)) { - return t.expressionStatement(node); - } +/***/ }, +/* 182 */ +/***/ function(module, exports) { - if (mustHaveId && !node.id) { - newType = false; - } + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } - if (!newType) { - if (ignore) { - return false; - } else { - throw new Error("cannot turn " + node.type + " to a statement"); - } - } + module.exports = stubArray; - node.type = newType; - return node; +/***/ }, +/* 183 */ +/***/ function(module, exports, __webpack_require__) { + + var baseGetAllKeys = __webpack_require__(184), + getSymbols = __webpack_require__(181), + keys = __webpack_require__(163); + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); } - function toExpression(node /*: Object*/) /*: Object*/ { - if (t.isExpressionStatement(node)) { - node = node.expression; - } + module.exports = getAllKeys; - if (t.isClass(node)) { - node.type = "ClassExpression"; - } else if (t.isFunction(node)) { - node.type = "FunctionExpression"; - } - if (t.isExpression(node)) { - return node; - } else { - throw new Error("cannot turn " + node.type + " to an expression"); - } +/***/ }, +/* 184 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayPush = __webpack_require__(185), + isArray = __webpack_require__(113); + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } - function toBlock(node /*: Object*/, parent /*: Object*/) /*: Object*/ { - if (t.isBlockStatement(node)) { - return node; - } + module.exports = baseGetAllKeys; - if (t.isEmptyStatement(node)) { - node = []; - } - if (!Array.isArray(node)) { - if (!t.isStatement(node)) { - if (t.isFunction(parent)) { - node = t.returnStatement(node); - } else { - node = t.expressionStatement(node); - } - } +/***/ }, +/* 185 */ +/***/ function(module, exports) { - node = [node]; - } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; - return t.blockStatement(node); + while (++index < length) { + array[offset + index] = values[index]; + } + return array; } - function valueToNode(value /*: any*/) /*: Object*/ { - // undefined - if (value === undefined) { - return t.identifier("undefined"); - } + module.exports = arrayPush; - // boolean - if (value === true || value === false) { - return t.booleanLiteral(value); - } - // null - if (value === null) { - return t.nullLiteral(); - } +/***/ }, +/* 186 */ +/***/ function(module, exports, __webpack_require__) { - // strings - if (_lodashLangIsString2["default"](value)) { - return t.stringLiteral(value); - } + var DataView = __webpack_require__(187), + Map = __webpack_require__(133), + Promise = __webpack_require__(188), + Set = __webpack_require__(189), + WeakMap = __webpack_require__(190), + baseGetTag = __webpack_require__(191), + toSource = __webpack_require__(140); - // numbers - if (_lodashLangIsNumber2["default"](value)) { - return t.numericLiteral(value); - } + /** `Object#toString` result references. */ + var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; - // regexes - if (_lodashLangIsRegExp2["default"](value)) { - var pattern = value.source; - var flags = value.toString().match(/\/([a-z]+|)$/)[1]; - return t.regExpLiteral(pattern, flags); - } + var dataViewTag = '[object DataView]'; - // array - if (Array.isArray(value)) { - return t.arrayExpression(value.map(t.valueToNode)); - } + /** Used for built-in method references. */ + var objectProto = Object.prototype; - // object - if (_lodashLangIsPlainObject2["default"](value)) { - var props = []; - for (var key in value) { - var nodeKey = undefined; - if (t.isValidIdentifier(key)) { - nodeKey = t.identifier(key); - } else { - nodeKey = t.stringLiteral(key); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; } - props.push(t.objectProperty(nodeKey, t.valueToNode(value[key]))); } - return t.objectExpression(props); - } - - throw new Error("don't know how to turn this value into a node"); + return result; + }; } + module.exports = getTag; + + /***/ }, -/* 158 */ +/* 187 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(159), __esModule: true }; + var getNative = __webpack_require__(134), + root = __webpack_require__(139); + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(root, 'DataView'); + + module.exports = DataView; + /***/ }, -/* 159 */ +/* 188 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(160); - module.exports = 0x1fffffffffffff; + var getNative = __webpack_require__(134), + root = __webpack_require__(139); + + /* Built-in method references that are verified to be native. */ + var Promise = getNative(root, 'Promise'); + + module.exports = Promise; + /***/ }, -/* 160 */ +/* 189 */ /***/ function(module, exports, __webpack_require__) { - // 20.1.2.6 Number.MAX_SAFE_INTEGER - var $export = __webpack_require__(16); + var getNative = __webpack_require__(134), + root = __webpack_require__(139); + + /* Built-in method references that are verified to be native. */ + var Set = getNative(root, 'Set'); + + module.exports = Set; - $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); /***/ }, -/* 161 */ +/* 190 */ /***/ function(module, exports, __webpack_require__) { - var baseForIn = __webpack_require__(162), - isArguments = __webpack_require__(82), - isObjectLike = __webpack_require__(76); + var getNative = __webpack_require__(134), + root = __webpack_require__(139); - /** `Object#toString` result references. */ - var objectTag = '[object Object]'; + /* Built-in method references that are verified to be native. */ + var WeakMap = getNative(root, 'WeakMap'); - /** Used for native method references. */ - var objectProto = Object.prototype; + module.exports = WeakMap; - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + +/***/ }, +/* 191 */ +/***/ function(module, exports) { + + /** 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) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - var objToString = objectProto.toString; + var objectToString = objectProto.toString; /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * **Note:** This method assumes objects created by the `Object` constructor - * have no inherited enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example + * The base implementation of `getTag`. * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ - function isPlainObject(value) { - var Ctor; - - // Exit early for non `Object` objects. - if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || - (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { - return false; - } - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - var result; - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - baseForIn(value, function(subValue, key) { - result = key; - }); - return result === undefined || hasOwnProperty.call(value, result); + function baseGetTag(value) { + return objectToString.call(value); } - module.exports = isPlainObject; + module.exports = baseGetTag; /***/ }, -/* 162 */ -/***/ function(module, exports, __webpack_require__) { +/* 192 */ +/***/ function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; - var baseFor = __webpack_require__(87), - keysIn = __webpack_require__(85); + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. + * Initializes an array clone. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. */ - function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); + function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; } - module.exports = baseForIn; + module.exports = initCloneArray; /***/ }, -/* 163 */ +/* 193 */ /***/ function(module, exports, __webpack_require__) { - var isObjectLike = __webpack_require__(76); + var cloneArrayBuffer = __webpack_require__(194), + cloneDataView = __webpack_require__(196), + cloneMap = __webpack_require__(197), + cloneRegExp = __webpack_require__(201), + cloneSet = __webpack_require__(202), + cloneSymbol = __webpack_require__(205), + cloneTypedArray = __webpack_require__(207); /** `Object#toString` result references. */ - var numberTag = '[object Number]'; - - /** Used for native method references. */ - var objectProto = Object.prototype; + var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; - /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; + 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]'; /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified - * as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isNumber(8.4); - * // => true + * Initializes an object clone based on its `toStringTag`. * - * _.isNumber(NaN); - * // => true + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * - * _.isNumber('8.4'); - * // => false + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. */ - function isNumber(value) { - return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); - } + function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); - module.exports = isNumber; + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); -/***/ }, -/* 164 */ -/***/ function(module, exports, __webpack_require__) { + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); - var isObject = __webpack_require__(75); + case mapTag: + return cloneMap(object, isDeep, cloneFunc); - /** `Object#toString` result references. */ - var regexpTag = '[object RegExp]'; + case numberTag: + case stringTag: + return new Ctor(object); - /** Used for native method references. */ - var objectProto = Object.prototype; + case regexpTag: + return cloneRegExp(object); - /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; + case setTag: + return cloneSet(object, isDeep, cloneFunc); - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - function isRegExp(value) { - return isObject(value) && objToString.call(value) == regexpTag; + case symbolTag: + return cloneSymbol(object); + } } - module.exports = isRegExp; + module.exports = initCloneByTag; /***/ }, -/* 165 */ +/* 194 */ /***/ function(module, exports, __webpack_require__) { - var isObjectLike = __webpack_require__(76); - - /** `Object#toString` result references. */ - var stringTag = '[object String]'; - - /** Used for native 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 objToString = objectProto.toString; + var Uint8Array = __webpack_require__(195); /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example + * Creates a clone of `arrayBuffer`. * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ - function isString(value) { - return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; } - module.exports = isString; + module.exports = cloneArrayBuffer; /***/ }, -/* 166 */ +/* 195 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; - - var _getIterator = __webpack_require__(3)["default"]; + var root = __webpack_require__(139); - var _Object$getOwnPropertySymbols = __webpack_require__(167)["default"]; + /** Built-in value references. */ + var Uint8Array = root.Uint8Array; - var _interopRequireDefault = __webpack_require__(42)["default"]; + module.exports = Uint8Array; - var _interopRequireWildcard = __webpack_require__(44)["default"]; - var _interopRequire = __webpack_require__(169)["default"]; +/***/ }, +/* 196 */ +/***/ function(module, exports, __webpack_require__) { - exports.__esModule = true; - exports["default"] = traverse; + var cloneArrayBuffer = __webpack_require__(194); - var _context = __webpack_require__(170); + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } - var _context2 = _interopRequireDefault(_context); + module.exports = cloneDataView; - var _visitors = __webpack_require__(232); - var visitors = _interopRequireWildcard(_visitors); +/***/ }, +/* 197 */ +/***/ function(module, exports, __webpack_require__) { - var _babelMessages = __webpack_require__(201); + var addMapEntry = __webpack_require__(198), + arrayReduce = __webpack_require__(199), + mapToArray = __webpack_require__(200); - var messages = _interopRequireWildcard(_babelMessages); + /** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ + function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); + } - var _lodashCollectionIncludes = __webpack_require__(190); + module.exports = cloneMap; - var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionIncludes); - var _babelTypes = __webpack_require__(46); +/***/ }, +/* 198 */ +/***/ function(module, exports) { - var t = _interopRequireWildcard(_babelTypes); + /** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ + function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; + } - var _path = __webpack_require__(171); + module.exports = addMapEntry; - exports.NodePath = _interopRequire(_path); - var _scope = __webpack_require__(186); +/***/ }, +/* 199 */ +/***/ function(module, exports) { - exports.Scope = _interopRequire(_scope); + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; - var _hub = __webpack_require__(233); + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } - exports.Hub = _interopRequire(_hub); - exports.visitors = visitors; + module.exports = arrayReduce; - function traverse(parent /*: Object | Array*/, opts /*:: ?: Object*/, scope /*:: ?: Object*/, state /*: Object*/, parentPath /*: Object*/) { - if (!parent) return; - if (!opts) opts = {}; - if (!opts.noScope && !scope) { - if (parent.type !== "Program" && parent.type !== "File") { - throw new Error(messages.get("traverseNeedsParent", parent.type)); - } - } +/***/ }, +/* 200 */ +/***/ function(module, exports) { - visitors.explode(opts); + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); - traverse.node(parent, opts, scope, state, parentPath); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; } - traverse.visitors = visitors; - traverse.verify = visitors.verify; - traverse.explode = visitors.explode; + module.exports = mapToArray; - traverse.NodePath = __webpack_require__(171); - traverse.Scope = __webpack_require__(186); - traverse.Hub = __webpack_require__(233); - traverse.cheap = function (node, enter) { - if (!node) return; +/***/ }, +/* 201 */ +/***/ function(module, exports) { - var keys = t.VISITOR_KEYS[node.type]; - if (!keys) return; + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; - enter(node); + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + module.exports = cloneRegExp; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - var key = _ref; +/***/ }, +/* 202 */ +/***/ function(module, exports, __webpack_require__) { - var subNode = node[key]; + var addSetEntry = __webpack_require__(203), + arrayReduce = __webpack_require__(199), + setToArray = __webpack_require__(204); - if (Array.isArray(subNode)) { - for (var _iterator2 = subNode, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + /** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ + function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); + } - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } + module.exports = cloneSet; - var _node = _ref2; - traverse.cheap(_node, enter); - } - } else { - traverse.cheap(subNode, enter); - } - } - }; +/***/ }, +/* 203 */ +/***/ function(module, exports) { - traverse.node = function (node /*: Object*/, opts /*: Object*/, scope /*: Object*/, state /*: Object*/, parentPath /*: Object*/, skipKeys /*:: ?*/) { - var keys /*: Array*/ = t.VISITOR_KEYS[node.type]; - if (!keys) return; + /** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @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; + } - var context = new _context2["default"](scope, opts, state, parentPath); - for (var _iterator3 = keys, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; + module.exports = addSetEntry; - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - var key = _ref3; +/***/ }, +/* 204 */ +/***/ function(module, exports) { - if (skipKeys && skipKeys[key]) continue; - if (context.visit(node, key)) return; - } - }; + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); - var CLEAR_KEYS /*: Array*/ = t.COMMENT_KEYS.concat(["tokens", "comments", "start", "end", "loc", "raw", "rawValue"]); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } - traverse.clearNode = function (node) { - for (var _iterator4 = CLEAR_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { - var _ref4; + module.exports = setToArray; - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - var key = _ref4; +/***/ }, +/* 205 */ +/***/ function(module, exports, __webpack_require__) { - if (node[key] != null) node[key] = undefined; - } + var Symbol = __webpack_require__(206); - for (var key in node) { - if (key[0] === "_" && node[key] != null) node[key] = undefined; - } + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - var syms /*: Array*/ = _Object$getOwnPropertySymbols(node); - for (var _iterator5 = syms, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { - var _ref5; + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } + module.exports = cloneSymbol; - var sym = _ref5; - node[sym] = null; - } - }; +/***/ }, +/* 206 */ +/***/ function(module, exports, __webpack_require__) { - traverse.removeProperties = function (tree) { - traverse.cheap(tree, traverse.clearNode); - return tree; - }; + var root = __webpack_require__(139); - function hasBlacklistedType(path, state) { - if (path.node.type === state.type) { - state.has = true; - path.skip(); - } - } + /** Built-in value references. */ + var Symbol = root.Symbol; - traverse.hasType = function (tree /*: Object*/, scope /*: Object*/, type /*: Object*/, blacklistTypes /*: Array*/) /*: boolean*/ { - // the node we're searching in is blacklisted - if (_lodashCollectionIncludes2["default"](blacklistTypes, tree.type)) return false; + module.exports = Symbol; - // the type we're looking for is the same as the passed node - if (tree.type === type) return true; - var state = { - has: false, - type: type - }; +/***/ }, +/* 207 */ +/***/ function(module, exports, __webpack_require__) { - traverse(tree, { - blacklist: blacklistTypes, - enter: hasBlacklistedType - }, scope, state); + var cloneArrayBuffer = __webpack_require__(194); - return state.has; - }; + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } -/***/ }, -/* 167 */ -/***/ function(module, exports, __webpack_require__) { + module.exports = cloneTypedArray; - module.exports = { "default": __webpack_require__(168), __esModule: true }; /***/ }, -/* 168 */ +/* 208 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(139); - module.exports = __webpack_require__(18).Object.getOwnPropertySymbols; - -/***/ }, -/* 169 */ -/***/ function(module, exports) { + var baseCreate = __webpack_require__(209), + getPrototype = __webpack_require__(101), + isPrototype = __webpack_require__(175); - "use strict"; + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } - exports["default"] = function (obj) { - return obj && obj.__esModule ? obj["default"] : obj; - }; + module.exports = initCloneObject; - exports.__esModule = true; /***/ }, -/* 170 */ +/* 209 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; + var isObject = __webpack_require__(107); - var _classCallCheck = __webpack_require__(2)["default"]; + /** Built-in value references. */ + var objectCreate = Object.create; - var _getIterator = __webpack_require__(3)["default"]; + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); - var _interopRequireDefault = __webpack_require__(42)["default"]; + module.exports = baseCreate; - var _interopRequireWildcard = __webpack_require__(44)["default"]; - exports.__esModule = true; +/***/ }, +/* 210 */ +/***/ function(module, exports, __webpack_require__) { - var _path = __webpack_require__(171); + module.exports = __webpack_require__(211); - var _path2 = _interopRequireDefault(_path); - var _babelTypes = __webpack_require__(46); +/***/ }, +/* 211 */ +/***/ function(module, exports, __webpack_require__) { - var t = _interopRequireWildcard(_babelTypes); + var arrayEach = __webpack_require__(157), + baseEach = __webpack_require__(212), + baseIteratee = __webpack_require__(217), + isArray = __webpack_require__(113); - var testing = process.env.NODE_ENV === "test"; + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, baseIteratee(iteratee, 3)); + } - var TraversalContext = (function () { - function TraversalContext(scope, opts, state, parentPath) { - _classCallCheck(this, TraversalContext); + module.exports = forEach; - this.parentPath = parentPath; - this.scope = scope; - this.state = state; - this.opts = opts; - } - /** - * This method does a simple check to determine whether or not we really need to attempt - * visit a node. This will prevent us from constructing a NodePath. - */ +/***/ }, +/* 212 */ +/***/ function(module, exports, __webpack_require__) { - TraversalContext.prototype.shouldVisit = function shouldVisit(node) /*: boolean*/ { - var opts = this.opts; - if (opts.enter || opts.exit) return true; + var baseForOwn = __webpack_require__(213), + createBaseEach = __webpack_require__(216); - // check if we have a visitor for this node - if (opts[node.type]) return true; + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); - // check if we're going to traverse into this node - var keys /*: ?Array*/ = t.VISITOR_KEYS[node.type]; - if (!keys || !keys.length) return false; + module.exports = baseEach; - // we need to traverse into this node so ensure that it has children to traverse into! - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } +/***/ }, +/* 213 */ +/***/ function(module, exports, __webpack_require__) { - var key = _ref; + var baseFor = __webpack_require__(214), + keys = __webpack_require__(163); - if (node[key]) return true; - } + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } - return false; - }; + module.exports = baseForOwn; - TraversalContext.prototype.create = function create(node, obj, key, listKey) /*: NodePath*/ { - return _path2["default"].get({ - parentPath: this.parentPath, - parent: node, - container: obj, - key: key, - listKey: listKey - }); - }; - TraversalContext.prototype.maybeQueue = function maybeQueue(path, notPriority /*:: ?: boolean*/) { - if (this.trap) { - throw new Error("Infinite cycle detected"); - } - - if (this.queue) { - if (notPriority) { - this.queue.push(path); - } else { - this.priorityQueue.push(path); - } - } - }; - - TraversalContext.prototype.visitMultiple = function visitMultiple(container, parent, listKey) { - // nothing to traverse! - if (container.length === 0) return false; - - var queue = []; +/***/ }, +/* 214 */ +/***/ function(module, exports, __webpack_require__) { - // build up initial queue - for (var key = 0; key < container.length; key++) { - var node = container[key]; - if (node && this.shouldVisit(node)) { - queue.push(this.create(parent, container, key, listKey)); - } - } + var createBaseFor = __webpack_require__(215); - return this.visitQueue(queue); - }; + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); - TraversalContext.prototype.visitSingle = function visitSingle(node, key) /*: boolean*/ { - if (this.shouldVisit(node[key])) { - return this.visitQueue([this.create(node, node, key)]); - } else { - return false; - } - }; + module.exports = baseFor; - TraversalContext.prototype.visitQueue = function visitQueue(queue /*: Array*/) { - // set queue - this.queue = queue; - this.priorityQueue = []; - var visited = []; - var stop = false; +/***/ }, +/* 215 */ +/***/ function(module, exports) { - // visit the queue - for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; } + } + return object; + }; + } - var path = _ref2; + module.exports = createBaseFor; - path.resync(); - path.pushContext(this); - // this path no longer belongs to the tree - if (path.key === null) continue; +/***/ }, +/* 216 */ +/***/ function(module, exports, __webpack_require__) { - if (testing && queue.length >= 1000) { - this.trap = true; - } + var isArrayLike = __webpack_require__(177); - // ensure we don't visit the same node twice - if (visited.indexOf(path.node) >= 0) continue; - visited.push(path.node); + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); - if (path.visit()) { - stop = true; + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { break; } - - if (this.priorityQueue.length) { - stop = this.visitQueue(this.priorityQueue); - this.priorityQueue = []; - this.queue = queue; - if (stop) break; - } } + return collection; + }; + } - // clear queue - for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var path = _ref3; - - path.popContext(); - } + module.exports = createBaseEach; - // clear queue - this.queue = null; - return stop; - }; +/***/ }, +/* 217 */ +/***/ function(module, exports, __webpack_require__) { - TraversalContext.prototype.visit = function visit(node, key) { - var nodes = node[key]; - if (!nodes) return false; + var baseMatches = __webpack_require__(218), + baseMatchesProperty = __webpack_require__(233), + identity = __webpack_require__(249), + isArray = __webpack_require__(113), + property = __webpack_require__(250); - if (Array.isArray(nodes)) { - return this.visitMultiple(nodes, node, key); - } else { - return this.visitSingle(node, key); - } - }; + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } - return TraversalContext; - })(); + module.exports = baseIteratee; - exports["default"] = TraversalContext; - module.exports = exports["default"]; /***/ }, -/* 171 */ +/* 218 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; - - var _classCallCheck = __webpack_require__(2)["default"]; + var baseIsMatch = __webpack_require__(219), + getMatchData = __webpack_require__(230), + matchesStrictComparable = __webpack_require__(232); - var _getIterator = __webpack_require__(3)["default"]; + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } - var _interopRequireWildcard = __webpack_require__(44)["default"]; + module.exports = baseMatches; - var _interopRequireDefault = __webpack_require__(42)["default"]; - exports.__esModule = true; +/***/ }, +/* 219 */ +/***/ function(module, exports, __webpack_require__) { - var _libVirtualTypes = __webpack_require__(172); + var Stack = __webpack_require__(119), + baseIsEqual = __webpack_require__(220); - var virtualTypes = _interopRequireWildcard(_libVirtualTypes); + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; - var _debug2 = __webpack_require__(173); + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; - var _debug3 = _interopRequireDefault(_debug2); + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; - var _constants = __webpack_require__(180); + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) + : result + )) { + return false; + } + } + } + return true; + } - var _invariant = __webpack_require__(181); + module.exports = baseIsMatch; - var _invariant2 = _interopRequireDefault(_invariant); - var _index = __webpack_require__(166); +/***/ }, +/* 220 */ +/***/ function(module, exports, __webpack_require__) { - var _index2 = _interopRequireDefault(_index); + var baseIsEqualDeep = __webpack_require__(221), + isObject = __webpack_require__(107), + isObjectLike = __webpack_require__(103); - var _lodashObjectAssign = __webpack_require__(182); + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @param {boolean} [bitmask] The bitmask of comparison flags. + * The bitmask may be composed of the following flags: + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + } - var _lodashObjectAssign2 = _interopRequireDefault(_lodashObjectAssign); + module.exports = baseIsEqual; - var _scope = __webpack_require__(186); - var _scope2 = _interopRequireDefault(_scope); +/***/ }, +/* 221 */ +/***/ function(module, exports, __webpack_require__) { - var _babelTypes = __webpack_require__(46); + var Stack = __webpack_require__(119), + equalArrays = __webpack_require__(222), + equalByTag = __webpack_require__(228), + equalObjects = __webpack_require__(229), + getTag = __webpack_require__(186), + isArray = __webpack_require__(113), + isBuffer = __webpack_require__(168), + isTypedArray = __webpack_require__(171); - var t = _interopRequireWildcard(_babelTypes); + /** Used to compose bitmasks for comparison styles. */ + var PARTIAL_COMPARE_FLAG = 2; - /*:: import type Hub from "../hub";*/ - /*:: import type TraversalContext from "../context";*/ + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; - var _debug = _debug3["default"]("babel"); + /** Used for built-in method references. */ + var objectProto = Object.prototype; - var NodePath = (function () { - function NodePath(hub /*: Hub*/, parent /*: Object*/) { - _classCallCheck(this, NodePath); + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - this.parent = parent; - this.hub = hub; - this.contexts = []; - this.data = {}; - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.state = null; - this.opts = null; - this.skipKeys = null; - this.parentPath = null; - this.context = null; - this.container = null; - this.listKey = null; - this.inList = false; - this.parentKey = null; - this.key = null; - this.node = null; - this.scope = null; - this.type = null; - this.typeAnnotation = null; - } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; - NodePath.get = function get(_ref2) /*: NodePath*/ { - var hub = _ref2.hub; - var parentPath = _ref2.parentPath; - var parent = _ref2.parent; - var container = _ref2.container; - var listKey = _ref2.listKey; - var key = _ref2.key; + if (!objIsArr) { + objTag = getTag(object); + objTag = objTag == argsTag ? objectTag : objTag; + } + if (!othIsArr) { + othTag = getTag(other); + othTag = othTag == argsTag ? objectTag : othTag; + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; - if (!hub && parentPath) { - hub = parentPath.hub; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) + : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + } + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - _invariant2["default"](parent, "To get a node path the parent needs to exist"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; - var targetNode = container[key]; + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + } - var paths = parent[_constants.PATH_CACHE_KEY] = parent[_constants.PATH_CACHE_KEY] || []; - var path = undefined; + module.exports = baseIsEqualDeep; - for (var i = 0; i < paths.length; i++) { - var pathCheck = paths[i]; - if (pathCheck.node === targetNode) { - path = pathCheck; - break; - } - } - if (path && !(path instanceof NodePath)) { - if (path.constructor.name === "NodePath") { - // we're going to absolutley thrash the tree and allocate way too many node paths - // than is necessary but there's no way around this as the node module resolution - // algorithm is ridiculous - path = null; - } else { - // badly deserialised probably - throw new Error("We found a path that isn't a NodePath instance. Possiblly due to bad serialisation."); - } - } +/***/ }, +/* 222 */ +/***/ function(module, exports, __webpack_require__) { - if (!path) { - path = new NodePath(hub, parent); - paths.push(path); - } + var SetCache = __webpack_require__(223), + arraySome = __webpack_require__(226), + cacheHas = __webpack_require__(227); - path.setup(parentPath, container, listKey, key); + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; - return path; - }; + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + arrLength = array.length, + othLength = other.length; - NodePath.prototype.getScope = function getScope(scope /*: Scope*/) { - var ourScope = scope; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; - // we're entering a new scope so let's construct it! - if (this.isScope()) { - ourScope = new _scope2["default"](this, scope); - } + stack.set(array, other); + stack.set(other, array); - return ourScope; - }; + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; - NodePath.prototype.setData = function setData(key /*: string*/, val /*: any*/) /*: any*/ { - return this.data[key] = val; - }; + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } - NodePath.prototype.getData = function getData(key /*: string*/, def /*:: ?: any*/) /*: any*/ { - var val = this.data[key]; - if (!val && def) val = this.data[key] = def; - return val; - }; + module.exports = equalArrays; - NodePath.prototype.buildCodeFrameError = function buildCodeFrameError(msg /*: string*/) /*: Error*/ { - var Error /*: typeof Error*/ = arguments.length <= 1 || arguments[1] === undefined ? SyntaxError : arguments[1]; - return this.hub.file.buildCodeFrameError(this.node, msg, Error); - }; +/***/ }, +/* 223 */ +/***/ function(module, exports, __webpack_require__) { - NodePath.prototype.traverse = function traverse(visitor /*: Object*/, state /*:: ?: any*/) { - _index2["default"](this.node, visitor, this.scope, state, this); - }; + var MapCache = __webpack_require__(142), + setCacheAdd = __webpack_require__(224), + setCacheHas = __webpack_require__(225); - NodePath.prototype.mark = function mark(type /*: string*/, message /*: string*/) { - this.hub.file.metadata.marked.push({ - type: type, - message: message, - loc: this.node.loc - }); - }; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values ? values.length : 0; - NodePath.prototype.set = function set(key /*: string*/, node /*: Object*/) { - t.validate(this.node, key, node); - this.node[key] = node; - }; + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } - NodePath.prototype.getPathLocation = function getPathLocation() /*: string*/ { - var parts = []; - var path = this; - do { - var key = path.key; - if (path.inList) key = path.listKey + "[" + key + "]"; - parts.unshift(key); - } while (path = path.parentPath); - return parts.join("."); - }; + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; - NodePath.prototype.debug = function debug(buildMessage /*: Function*/) { - if (!_debug.enabled) return; - _debug(this.getPathLocation() + " " + this.type + ": " + buildMessage()); - }; + module.exports = SetCache; - return NodePath; - })(); - exports["default"] = NodePath; - - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(204)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(205)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(208)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(222)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(223)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(224)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(225)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(226)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(228)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(230)); - _lodashObjectAssign2["default"](NodePath.prototype, __webpack_require__(231)); - - var _loop = function () { - if (_isArray) { - if (_i >= _iterator.length) return "break"; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) return "break"; - _ref = _i.value; - } +/***/ }, +/* 224 */ +/***/ function(module, exports) { - var type = _ref; + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; - var typeKey = "is" + type; - NodePath.prototype[typeKey] = function (opts) { - return t[typeKey](this.node, opts); - }; + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } - NodePath.prototype["assert" + type] = function (opts) { - if (!this[typeKey](opts)) { - throw new TypeError("Expected node path of type " + type); - } - }; - }; + module.exports = setCacheAdd; - for (var _iterator = (t.TYPES /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; - var _ret = _loop(); +/***/ }, +/* 225 */ +/***/ function(module, exports) { - // istanbul ignore next - if (_ret === "break") break; + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); } - var _loop2 = function (type) { - if (type[0] === "_") return "continue"; - if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type); + module.exports = setCacheHas; - var virtualType = virtualTypes[type]; - NodePath.prototype["is" + type] = function (opts) { - return virtualType.checkPath(this, opts); - }; - }; +/***/ }, +/* 226 */ +/***/ function(module, exports) { - for (var type in virtualTypes) { - var _ret2 = _loop2(type); + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array ? array.length : 0; - // istanbul ignore next - if (_ret2 === "continue") continue; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; } - module.exports = exports["default"]; -/***/ }, -/* 172 */ -/***/ function(module, exports, __webpack_require__) { + module.exports = arraySome; - "use strict"; - var _interopRequireWildcard = __webpack_require__(44)["default"]; +/***/ }, +/* 227 */ +/***/ function(module, exports) { - exports.__esModule = true; + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } - var _babelTypes = __webpack_require__(46); + module.exports = cacheHas; - var t = _interopRequireWildcard(_babelTypes); - /*:: import type NodePath from "../index";*/var ReferencedIdentifier = { - types: ["Identifier", "JSXIdentifier"], - checkPath: function checkPath(_ref /*: NodePath*/, opts /*:: ?: Object*/) /*: boolean*/ { - var node = _ref.node; - var parent = _ref.parent; +/***/ }, +/* 228 */ +/***/ function(module, exports, __webpack_require__) { - if (!t.isIdentifier(node, opts)) { - if (t.isJSXIdentifier(node, opts)) { - if (_babelTypes.react.isCompatTag(node.name)) return false; - } else { - // not a JSXIdentifier or an Identifier - return false; - } - } + var Symbol = __webpack_require__(206), + Uint8Array = __webpack_require__(195), + eq = __webpack_require__(124), + equalArrays = __webpack_require__(222), + mapToArray = __webpack_require__(200), + setToArray = __webpack_require__(204); - // check if node is referenced - return t.isReferenced(node, parent); - } - }; + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; - exports.ReferencedIdentifier = ReferencedIdentifier; - var ReferencedMemberExpression = { - types: ["MemberExpression"], - checkPath: function checkPath(_ref2) { - var node = _ref2.node; - var parent = _ref2.parent; - - return t.isMemberExpression(node) && t.isReferenced(node, parent); - } - }; - - exports.ReferencedMemberExpression = ReferencedMemberExpression; - var BindingIdentifier = { - types: ["Identifier"], - checkPath: function checkPath(_ref3 /*: NodePath*/) /*: boolean*/ { - var node = _ref3.node; - var parent = _ref3.parent; + /** `Object#toString` result references. */ + var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; - return t.isIdentifier(node) && t.isBinding(node, parent); - } - }; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; - exports.BindingIdentifier = BindingIdentifier; - var Statement = { - types: ["Statement"], - checkPath: function checkPath(_ref4 /*: NodePath*/) /*: boolean*/ { - var node = _ref4.node; - var parent = _ref4.parent; + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - if (t.isStatement(node)) { - if (t.isVariableDeclaration(node)) { - if (t.isForXStatement(parent, { left: node })) return false; - if (t.isForStatement(parent, { init: node })) return false; + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } return true; - } else { - return false; - } - } - }; - exports.Statement = Statement; - var Expression = { - types: ["Expression"], - checkPath: function checkPath(path /*: NodePath*/) /*: boolean*/ { - if (path.isIdentifier()) { - return path.isReferencedIdentifier(); - } else { - return t.isExpression(path.node); - } - } - }; + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); - exports.Expression = Expression; - var Scope = { - types: ["Scopable"], - checkPath: function checkPath(path) { - return t.isScope(path.node, path.parent); - } - }; + case errorTag: + return object.name == other.name && object.message == other.message; - exports.Scope = Scope; - var Referenced = { - checkPath: function checkPath(path /*: NodePath*/) /*: boolean*/ { - return t.isReferenced(path.node, path.parent); - } - }; + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); - exports.Referenced = Referenced; - var BlockScoped = { - checkPath: function checkPath(path /*: NodePath*/) /*: boolean*/ { - return t.isBlockScoped(path.node); - } - }; + case mapTag: + var convert = mapToArray; - exports.BlockScoped = BlockScoped; - var Var = { - types: ["VariableDeclaration"], - checkPath: function checkPath(path /*: NodePath*/) /*: boolean*/ { - return t.isVar(path.node); - } - }; + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); - exports.Var = Var; - var User = { - checkPath: function checkPath(path /*: NodePath*/) /*: boolean*/ { - return path.node && !!path.node.loc; - } - }; + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= UNORDERED_COMPARE_FLAG; - exports.User = User; - var Generated = { - checkPath: function checkPath(path /*: NodePath*/) /*: boolean*/ { - return !path.isUser(); - } - }; + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; - exports.Generated = Generated; - var Pure = { - checkPath: function checkPath(path /*: NodePath*/, opts /*:: ?*/) /*: boolean*/ { - return path.scope.isPure(path.node, opts); + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } } - }; + return false; + } - exports.Pure = Pure; - var Flow = { - types: ["Flow", "ImportDeclaration", "ExportDeclaration"], - checkPath: function checkPath(_ref5 /*: NodePath*/) /*: boolean*/ { - var node = _ref5.node; + module.exports = equalByTag; - if (t.isFlow(node)) { - return true; - } else if (t.isImportDeclaration(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else if (t.isExportDeclaration(node)) { - return node.exportKind === "type"; - } else { - return false; - } - } - }; - exports.Flow = Flow; /***/ }, -/* 173 */ +/* 229 */ /***/ function(module, exports, __webpack_require__) { - - /** - * Module dependencies. - */ - - var tty = __webpack_require__(174); - var util = __webpack_require__(175); - - /** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ + var keys = __webpack_require__(163); - exports = module.exports = __webpack_require__(176); - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; + /** Used to compose bitmasks for comparison styles. */ + var PARTIAL_COMPARE_FLAG = 2; - /** - * Colors. - */ + /** Used for built-in method references. */ + var objectProto = Object.prototype; - exports.colors = [6, 2, 3, 4, 5, 1]; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. * - * $ DEBUG_FD=3 node script.js 3>debug.log + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ + function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; - var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); - /** - * Is stdout a TTY? Colored output is enabled when `true`. - */ + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; - function useColors() { - var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase(); - if (0 === debugColors.length) { - return tty.isatty(fd); - } else { - return '0' !== debugColors - && 'no' !== debugColors - && 'false' !== debugColors - && 'disabled' !== debugColors; + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } } + stack['delete'](object); + stack['delete'](other); + return result; } - /** - * Map %o to `util.inspect()`, since Node doesn't do that out of the box. - */ + module.exports = equalObjects; - var inspect = (4 === util.inspect.length ? - // node <= 0.8.x - function (v, colors) { - return util.inspect(v, void 0, void 0, colors); - } : - // node > 0.8.x - function (v, colors) { - return util.inspect(v, { colors: colors }); - } - ); - exports.formatters.o = function(v) { - return inspect(v, this.useColors) - .replace(/\s*\n\s*/g, ' '); - }; +/***/ }, +/* 230 */ +/***/ function(module, exports, __webpack_require__) { + + var isStrictComparable = __webpack_require__(231), + keys = __webpack_require__(163); /** - * Adds ANSI color escape codes if enabled. + * Gets the property names, values, and compare flags of `object`. * - * @api public + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. */ + function getMatchData(object) { + var result = keys(object), + length = result.length; - function formatArgs() { - var args = arguments; - var useColors = this.useColors; - var name = this.namespace; - - if (useColors) { - var c = this.color; + while (length--) { + var key = result[length], + value = object[key]; - args[0] = ' \u001b[3' + c + ';1m' + name + ' ' - + '\u001b[0m' - + args[0] + '\u001b[3' + c + 'm' - + ' +' + exports.humanize(this.diff) + '\u001b[0m'; - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; + result[length] = [key, value, isStrictComparable(value)]; } - return args; + return result; } - /** - * Invokes `console.error()` with the specified arguments. - */ + module.exports = getMatchData; - function log() { - return stream.write(util.format.apply(this, arguments) + '\n'); - } + +/***/ }, +/* 231 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(107); /** - * Save `namespaces`. + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * - * @param {String} namespaces - * @api private + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. */ - - function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } + function isStrictComparable(value) { + return value === value && !isObject(value); } - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ + module.exports = isStrictComparable; - function load() { - return process.env.DEBUG; - } + +/***/ }, +/* 232 */ +/***/ function(module, exports) { /** - * Copied from `node/src/node.js`. + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } - function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; + module.exports = matchesStrictComparable; - case 'FILE': - var fs = __webpack_require__(178); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - case 'PIPE': - case 'TCP': - var net = __webpack_require__(179); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); +/***/ }, +/* 233 */ +/***/ function(module, exports, __webpack_require__) { - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; + var baseIsEqual = __webpack_require__(220), + get = __webpack_require__(234), + hasIn = __webpack_require__(246), + isKey = __webpack_require__(244), + isStrictComparable = __webpack_require__(231), + matchesStrictComparable = __webpack_require__(232), + toKey = __webpack_require__(245); - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; + } - // For supporting legacy API we put the FD here. - stream.fd = fd; + module.exports = baseMatchesProperty; - stream._isStdio = true; - return stream; - } +/***/ }, +/* 234 */ +/***/ function(module, exports, __webpack_require__) { + + var baseGet = __webpack_require__(235); /** - * Enable namespaces listed in `process.env.DEBUG` initially. + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } - exports.enable(load()); + module.exports = get; /***/ }, -/* 174 */ -/***/ function(module, exports) { +/* 235 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = require("tty"); + var castPath = __webpack_require__(236), + isKey = __webpack_require__(244), + toKey = __webpack_require__(245); -/***/ }, -/* 175 */ -/***/ function(module, exports) { + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + module.exports = baseGet; - module.exports = require("util"); /***/ }, -/* 176 */ +/* 236 */ /***/ function(module, exports, __webpack_require__) { - + var isArray = __webpack_require__(113), + stringToPath = __webpack_require__(237); + /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. + * Casts `value` to a path array if it's not one. * - * Expose `debug()` as the module. + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. */ + function castPath(value) { + return isArray(value) ? value : stringToPath(value); + } - exports = module.exports = debug; - exports.coerce = coerce; - exports.disable = disable; - exports.enable = enable; - exports.enabled = enabled; - exports.humanize = __webpack_require__(177); + module.exports = castPath; - /** - * The currently active debug mode names, and names to skip. - */ - exports.names = []; - exports.skips = []; +/***/ }, +/* 237 */ +/***/ function(module, exports, __webpack_require__) { + + var memoizeCapped = __webpack_require__(238), + toString = __webpack_require__(240); + + /** Used to match property names within property paths. */ + var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; /** - * Map of special "%n" handling functions, for the debug "format" argument. + * Converts `string` to a property path array. * - * Valid key names are a single, lowercased letter, i.e. "n". + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. */ + var stringToPath = memoizeCapped(function(string) { + string = toString(string); - exports.formatters = {}; + var result = []; + 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; + }); - /** - * Previously assigned color. - */ + module.exports = stringToPath; - var prevColor = 0; - /** - * Previous log timestamp. - */ +/***/ }, +/* 238 */ +/***/ function(module, exports, __webpack_require__) { - var prevTime; + var memoize = __webpack_require__(239); + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; /** - * Select a color. + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. * - * @return {Number} - * @api private + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); - function selectColor() { - return exports.colors[prevColor++ % exports.colors.length]; + var cache = result.cache; + return result; } + module.exports = memoizeCapped; + + +/***/ }, +/* 239 */ +/***/ function(module, exports, __webpack_require__) { + + var MapCache = __webpack_require__(142); + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + /** - * Create a debugger with the given `namespace`. + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. * - * @param {String} namespace - * @return {Function} - * @api public + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; - function debug(namespace) { + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } - // define the `disabled` version - function disabled() { - } - disabled.enabled = false; + // Expose `MapCache`. + memoize.Cache = MapCache; - // define the `enabled` version - function enabled() { + module.exports = memoize; - var self = enabled; - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; +/***/ }, +/* 240 */ +/***/ function(module, exports, __webpack_require__) { - // add the `color` if not set - if (null == self.useColors) self.useColors = exports.useColors(); - if (null == self.color && self.useColors) self.color = selectColor(); + var baseToString = __webpack_require__(241); - var args = Array.prototype.slice.call(arguments); + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } - args[0] = exports.coerce(args[0]); + module.exports = toString; - if ('string' !== typeof args[0]) { - // anything else let's inspect with %o - args = ['%o'].concat(args); - } - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); +/***/ }, +/* 241 */ +/***/ function(module, exports, __webpack_require__) { - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); + var Symbol = __webpack_require__(206), + arrayMap = __webpack_require__(242), + isArray = __webpack_require__(113), + isSymbol = __webpack_require__(243); - if ('function' === typeof exports.formatArgs) { - args = exports.formatArgs.apply(self, args); - } - var logFn = enabled.log || exports.log || console.log.bind(console); - logFn.apply(self, args); + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; } - enabled.enabled = true; + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } - var fn = exports.enabled(namespace) ? enabled : disabled; + module.exports = baseToString; - fn.namespace = namespace; - return fn; - } +/***/ }, +/* 242 */ +/***/ function(module, exports) { /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. * - * @param {String} namespaces - * @api public + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. */ + function arrayMap(array, iteratee) { + var index = -1, + length = array ? array.length : 0, + result = Array(length); - function enable(namespaces) { - exports.save(namespaces); - - var split = (namespaces || '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } + while (++index < length) { + result[index] = iteratee(array[index], index, array); } + return result; } + module.exports = arrayMap; + + +/***/ }, +/* 243 */ +/***/ function(module, exports, __webpack_require__) { + + var isObjectLike = __webpack_require__(103); + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + /** - * Disable debug output. - * - * @api public + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. */ + var objectToString = objectProto.toString; - function disable() { - exports.enable(''); + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); } + module.exports = isSymbol; + + +/***/ }, +/* 244 */ +/***/ function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(113), + isSymbol = __webpack_require__(243); + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + /** - * Returns true if the given mode name is enabled, false otherwise. + * Checks if `value` is a property name and not a property path. * - * @param {String} name - * @return {Boolean} - * @api public + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ - - function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } + function isKey(value, object) { + if (isArray(value)) { + return false; } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; } - return false; + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } + module.exports = isKey; + + +/***/ }, +/* 245 */ +/***/ function(module, exports, __webpack_require__) { + + var isSymbol = __webpack_require__(243); + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + /** - * Coerce `val`. + * Converts `value` to a string key if it's not a string or symbol. * - * @param {Mixed} val - * @return {Mixed} - * @api private + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. */ - - function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } + module.exports = toKey; + /***/ }, -/* 177 */ -/***/ function(module, exports) { +/* 246 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHasIn = __webpack_require__(247), + hasPath = __webpack_require__(248); /** - * Helpers. + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var y = d * 365.25; + module.exports = hasIn; + + +/***/ }, +/* 247 */ +/***/ function(module, exports) { /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] + * The base implementation of `_.hasIn` without support for deep paths. * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } - module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); - }; + module.exports = baseHasIn; + + +/***/ }, +/* 248 */ +/***/ function(module, exports, __webpack_require__) { + + var castPath = __webpack_require__(236), + isArguments = __webpack_require__(166), + isArray = __webpack_require__(113), + isIndex = __webpack_require__(170), + isKey = __webpack_require__(244), + isLength = __webpack_require__(173), + toKey = __webpack_require__(245); /** - * Parse the given `str` and return milliseconds. + * Checks if `path` exists on `object`. * - * @param {String} str - * @return {Number} - * @api private + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. */ + function hasPath(object, path, hasFunc) { + path = isKey(path, object) ? [path] : castPath(path); - function parse(str) { - str = '' + str; - if (str.length > 10000) return; - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; } + length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; - } + module.exports = hasPath; - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; - } +/***/ }, +/* 249 */ +/***/ function(module, exports) { /** - * Pluralization helper. + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true */ - - function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; + function identity(value) { + return value; } + module.exports = identity; -/***/ }, -/* 178 */ -/***/ function(module, exports) { - - module.exports = require("fs"); /***/ }, -/* 179 */ -/***/ function(module, exports) { +/* 250 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = require("net"); + var baseProperty = __webpack_require__(251), + basePropertyDeep = __webpack_require__(252), + isKey = __webpack_require__(244), + toKey = __webpack_require__(245); -/***/ }, -/* 180 */ -/***/ function(module, exports) { + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } - "use strict"; + module.exports = property; - exports.__esModule = true; - var PATH_CACHE_KEY = "_paths";exports.PATH_CACHE_KEY = PATH_CACHE_KEY; - //Symbol(); /***/ }, -/* 181 */ +/* 251 */ /***/ function(module, exports) { /** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. + * The base implementation of `_.property` without support for deep paths. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * @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]; + }; + } - 'use strict'; - - /** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ + module.exports = baseProperty; - var __DEV__ = process.env.NODE_ENV !== 'production'; - var invariant = function(condition, format, a, b, c, d, e, f) { - if (__DEV__) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } +/***/ }, +/* 252 */ +/***/ function(module, exports, __webpack_require__) { - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; - } + var baseGet = __webpack_require__(235); - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } - }; + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } - module.exports = invariant; + module.exports = basePropertyDeep; /***/ }, -/* 182 */ +/* 253 */ /***/ function(module, exports, __webpack_require__) { - var assignWith = __webpack_require__(183), - baseAssign = __webpack_require__(69), - createAssigner = __webpack_require__(184); + var baseUniq = __webpack_require__(254); /** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources overwrite property assignments of previous sources. - * If `customizer` is provided it's invoked to produce the assigned values. - * The `customizer` is bound to `thisArg` and invoked with five arguments: - * (objectValue, sourceValue, key, object, source). - * - * **Note:** This method mutates `object` and is based on - * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. * @example * - * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); - * // => { 'user': 'fred', 'age': 40 } - * - * // using a customizer callback - * var defaults = _.partialRight(_.assign, function(value, other) { - * return _.isUndefined(value) ? other : value; - * }); - * - * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.uniq([2, 1, 2]); + * // => [2, 1] */ - var assign = createAssigner(function(object, source, customizer) { - return customizer - ? assignWith(object, source, customizer) - : baseAssign(object, source); - }); + function uniq(array) { + return (array && array.length) + ? baseUniq(array) + : []; + } - module.exports = assign; + module.exports = uniq; /***/ }, -/* 183 */ +/* 254 */ /***/ function(module, exports, __webpack_require__) { - var keys = __webpack_require__(71); + var SetCache = __webpack_require__(223), + arrayIncludes = __webpack_require__(255), + arrayIncludesWith = __webpack_require__(260), + cacheHas = __webpack_require__(227), + createSet = __webpack_require__(261), + setToArray = __webpack_require__(204); + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; /** - * A specialized version of `_.assign` for customizing assigned values without - * support for argument juggling, multiple sources, and `this` binding `customizer` - * functions. + * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. */ - function assignWith(object, source, customizer) { + function baseUniq(array, iteratee, comparator) { var index = -1, - props = keys(source), - length = props.length; + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: while (++index < length) { - var key = props[index], - value = object[key], - result = customizer(value, source[key], key, object, source); + var value = array[index], + computed = iteratee ? iteratee(value) : value; - if ((result === result ? (result !== value) : (value === value)) || - (value === undefined && !(key in object))) { - object[key] = result; + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); } } - return object; + return result; } - module.exports = assignWith; + module.exports = baseUniq; /***/ }, -/* 184 */ +/* 255 */ /***/ function(module, exports, __webpack_require__) { - var bindCallback = __webpack_require__(94), - isIterateeCall = __webpack_require__(96), - restParam = __webpack_require__(185); + var baseIndexOf = __webpack_require__(256); /** - * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. * * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. */ - function createAssigner(assigner) { - return restParam(function(object, sources) { - var index = -1, - length = object == null ? 0 : sources.length, - customizer = length > 2 ? sources[length - 2] : undefined, - guard = length > 2 ? sources[2] : undefined, - thisArg = length > 1 ? sources[length - 1] : undefined; - - if (typeof customizer == 'function') { - customizer = bindCallback(customizer, thisArg, 5); - length -= 2; - } else { - customizer = typeof thisArg == 'function' ? thisArg : undefined; - length -= (customizer ? 1 : 0); - } - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, customizer); - } - } - return object; - }); + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; } - module.exports = createAssigner; + module.exports = arrayIncludes; /***/ }, -/* 185 */ -/***/ function(module, exports) { - - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; +/* 256 */ +/***/ function(module, exports, __webpack_require__) { - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeMax = Math.max; + var baseFindIndex = __webpack_require__(257), + baseIsNaN = __webpack_require__(258), + strictIndexOf = __webpack_require__(259); /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + module.exports = baseIndexOf; + + +/***/ }, +/* 257 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. * - * @static - * @memberOf _ - * @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 + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @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 value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + module.exports = baseFindIndex; + + +/***/ }, +/* 258 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.isNaN` without support for number objects. * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); + * @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; + + +/***/ }, +/* 259 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. */ - function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); + while (++index < length) { + if (array[index] === value) { + return index; } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; + } + return -1; + } + + module.exports = strictIndexOf; + + +/***/ }, +/* 260 */ +/***/ function(module, exports) { + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; + } + return false; } - module.exports = restParam; + module.exports = arrayIncludesWith; /***/ }, -/* 186 */ +/* 261 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; + var Set = __webpack_require__(189), + noop = __webpack_require__(262), + setToArray = __webpack_require__(204); + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; - var _classCallCheck = __webpack_require__(2)["default"]; + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; - var _Symbol = __webpack_require__(187)["default"]; + module.exports = createSet; - var _getIterator = __webpack_require__(3)["default"]; - var _Object$create = __webpack_require__(150)["default"]; +/***/ }, +/* 262 */ +/***/ function(module, exports) { - var _interopRequireDefault = __webpack_require__(42)["default"]; + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } - var _interopRequireWildcard = __webpack_require__(44)["default"]; + module.exports = noop; - exports.__esModule = true; - var _lodashCollectionIncludes = __webpack_require__(190); +/***/ }, +/* 263 */ +/***/ function(module, exports, __webpack_require__) { - var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionIncludes); + "use strict"; - var _repeating = __webpack_require__(193); + __webpack_require__(264); - var _repeating2 = _interopRequireDefault(_repeating); + __webpack_require__(273); - var _libRenamer = __webpack_require__(196); + __webpack_require__(274); - var _libRenamer2 = _interopRequireDefault(_libRenamer); + __webpack_require__(275); - var _index = __webpack_require__(166); + __webpack_require__(276); - var _index2 = _interopRequireDefault(_index); + __webpack_require__(277); - var _lodashObjectDefaults = __webpack_require__(198); + __webpack_require__(278); - var _lodashObjectDefaults2 = _interopRequireDefault(_lodashObjectDefaults); +/***/ }, +/* 264 */ +/***/ function(module, exports, __webpack_require__) { - var _babelMessages = __webpack_require__(201); + "use strict"; - var messages = _interopRequireWildcard(_babelMessages); + exports.__esModule = true; + exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = undefined; - var _binding = __webpack_require__(197); + var _getIterator2 = __webpack_require__(3); - var _binding2 = _interopRequireDefault(_binding); + var _getIterator3 = _interopRequireDefault(_getIterator2); - var _globals = __webpack_require__(202); + var _stringify = __webpack_require__(82); - var _globals2 = _interopRequireDefault(_globals); + var _stringify2 = _interopRequireDefault(_stringify); - var _babelTypes = __webpack_require__(46); + var _typeof2 = __webpack_require__(265); - var t = _interopRequireWildcard(_babelTypes); + var _typeof3 = _interopRequireDefault(_typeof2); - // + exports.assertEach = assertEach; + exports.assertOneOf = assertOneOf; + exports.assertNodeType = assertNodeType; + exports.assertNodeOrValueType = assertNodeOrValueType; + exports.assertValueType = assertValueType; + exports.chain = chain; + exports.default = defineType; - /*:: import type NodePath from "../path";*/var CACHE_SINGLE_KEY = _Symbol(); - var CACHE_MULTIPLE_KEY = _Symbol(); + var _index = __webpack_require__(63); - /** - * To avoid creating a new Scope instance for each traversal, we maintain a cache on the - * node itself containing all scopes it has been associated with. - * - * We also optimise for the case of there being only a single scope associated with a node. - */ + var t = _interopRequireWildcard(_index); - function getCache(node, parentScope, self) { - var singleCache = node[CACHE_SINGLE_KEY]; + 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; } } - if (singleCache) { - // we've only ever associated one scope with this node so let's check it - if (matchesParent(singleCache, parentScope)) { - return singleCache; - } - } else if (!node[CACHE_MULTIPLE_KEY]) { - // no scope has ever been associated with this node - node[CACHE_SINGLE_KEY] = self; - return; - } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // looks like we have either a single scope association that was never matched or - // multiple assocations, let's find the right one! - return getCacheMultiple(node, parentScope, self, singleCache); - } + var VISITOR_KEYS = exports.VISITOR_KEYS = {}; + var ALIAS_KEYS = exports.ALIAS_KEYS = {}; + var NODE_FIELDS = exports.NODE_FIELDS = {}; + var BUILDER_KEYS = exports.BUILDER_KEYS = {}; + var DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {}; - function matchesParent(scope, parentScope) { - if (scope.parent === parentScope) { - return true; + function getType(val) { + if (Array.isArray(val)) { + return "array"; + } else if (val === null) { + return "null"; + } else if (val === undefined) { + return "undefined"; + } else { + return typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val); } } - function getCacheMultiple(node, parentScope, self, singleCache) { - var scopes /*: Array*/ = node[CACHE_MULTIPLE_KEY] = node[CACHE_MULTIPLE_KEY] || []; + function assertEach(callback) { + function validator(node, key, val) { + if (!Array.isArray(val)) return; - if (singleCache) { - // we have a scope assocation miss so push it onto our scopes - scopes.push(singleCache); - node[CACHE_SINGLE_KEY] = null; + for (var i = 0; i < val.length; i++) { + callback(node, key + "[" + i + "]", val[i]); + } } + validator.each = callback; + return validator; + } - // loop through and check each scope to see if it matches our parent - for (var _iterator = scopes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + function assertOneOf() { + for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) { + vals[_key] = arguments[_key]; + } - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; + function validate(node, key, val) { + if (vals.indexOf(val) < 0) { + throw new TypeError("Property " + key + " expected value to be one of " + (0, _stringify2.default)(vals) + " but got " + (0, _stringify2.default)(val)); } - - var scope = _ref; - - if (matchesParent(scope, parentScope)) return scope; } - scopes.push(self); + validate.oneOf = vals; + + return validate; } - // + function assertNodeType() { + for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + types[_key2] = arguments[_key2]; + } - var collectorVisitor = { - For: function For(path) { - for (var _iterator2 = (t.FOR_INIT_KEYS /*: Array*/), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + function validate(node, key, val) { + var valid = false; - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; + for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; } - var key = _ref2; + var type = _ref; - var declar = path.get(key); - if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar); + if (t.is(type, val)) { + valid = true; + break; + } } - }, - Declaration: function Declaration(path) { - // delegate block scope handling to the `blockVariableVisitor` - if (path.isBlockScoped()) return; + if (!valid) { + throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type))); + } + } - // this will be hit again once we traverse into it after this iteration - if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) return; - - // we've ran into a declaration! - path.scope.getFunctionParent().registerDeclaration(path); - }, - - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - state.references.push(path); - }, + validate.oneOfNodeTypes = types; - ForXStatement: function ForXStatement(path, state) { - var left = path.get("left"); - if (left.isPattern() || left.isIdentifier()) { - state.constantViolations.push(left); - } - }, + return validate; + } - ExportDeclaration: { - exit: function exit(_ref20) { - var node = _ref20.node; - var scope = _ref20.scope; + function assertNodeOrValueType() { + for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + types[_key3] = arguments[_key3]; + } - var declar = node.declaration; - if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) { - var _id = declar.id; - if (!_id) return; + function validate(node, key, val) { + var valid = false; - var binding = scope.getBinding(_id.name); - if (binding) binding.reference(); - } else if (t.isVariableDeclaration(declar)) { - for (var _iterator3 = (declar.declarations /*: Array*/), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; + for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } - var decl = _ref3; + var type = _ref2; - var ids = t.getBindingIdentifiers(decl); - for (var _name in ids) { - var binding = scope.getBinding(_name); - if (binding) binding.reference(); - } - } + if (getType(val) === type || t.is(type, val)) { + valid = true; + break; } } - }, - LabeledStatement: function LabeledStatement(path) { - path.scope.getProgramParent().addGlobal(path.node); - path.scope.getBlockParent().registerDeclaration(path); - }, + if (!valid) { + throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type))); + } + } - AssignmentExpression: function AssignmentExpression(path, state) { - state.assignments.push(path); - }, + validate.oneOfNodeOrValueTypes = types; - UpdateExpression: function UpdateExpression(path, state) { - state.constantViolations.push(path.get("argument")); - }, + return validate; + } - UnaryExpression: function UnaryExpression(path, state) { - if (path.node.operator === "delete") { - state.constantViolations.push(path.get("argument")); + function assertValueType(type) { + function validate(node, key, val) { + var valid = getType(val) === type; + + if (!valid) { + throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val)); } - }, + } - BlockScoped: function BlockScoped(path) { - var scope = path.scope; - if (scope.path === path) scope = scope.parent; - scope.getBlockParent().registerDeclaration(path); - }, + validate.type = type; - ClassDeclaration: function ClassDeclaration(path) { - var id = path.node.id; - if (!id) return; + return validate; + } - var name = id.name; - path.scope.bindings[name] = path.scope.getBinding(name); - }, + function chain() { + for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + fns[_key4] = arguments[_key4]; + } - Block: function Block(path) { - var paths = path.get("body"); - for (var _iterator4 = (paths /*: Array*/), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { - var _ref4; + function validate() { + for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; } - var bodyPath = _ref4; + var fn = _ref3; - if (bodyPath.isFunctionDeclaration()) { - path.scope.getBlockParent().registerDeclaration(bodyPath); - } + fn.apply(undefined, arguments); } } - }; + validate.chainOf = fns; + return validate; + } - var uid = 0; + function defineType(type) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var inherits = opts.inherits && store[opts.inherits] || {}; - var Scope = (function () { + opts.fields = opts.fields || inherits.fields || {}; + opts.visitor = opts.visitor || inherits.visitor || []; + opts.aliases = opts.aliases || inherits.aliases || []; + opts.builder = opts.builder || inherits.builder || opts.visitor || []; - /** - * This searches the current "scope" and collects all references/bindings - * within. - */ + if (opts.deprecatedAlias) { + DEPRECATED_KEYS[opts.deprecatedAlias] = type; + } - function Scope(path /*: NodePath*/, parentScope /*:: ?: Scope*/) { - _classCallCheck(this, Scope); + for (var _iterator4 = opts.visitor.concat(opts.builder), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref4; - if (parentScope && parentScope.block === path.node) { - return parentScope; + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; } - var cached = getCache(path.node, parentScope, this); - if (cached) return cached; + var _key5 = _ref4; - this.uid = uid++; - this.parent = parentScope; - this.hub = path.hub; + opts.fields[_key5] = opts.fields[_key5] || {}; + } - this.parentBlock = path.parent; - this.block = path.node; - this.path = path; + for (var key in opts.fields) { + var field = opts.fields[key]; + + if (opts.builder.indexOf(key) === -1) { + field.optional = true; + } + if (field.default === undefined) { + field.default = null; + } else if (!field.validate) { + field.validate = assertValueType(getType(field.default)); + } } - /** - * Globals. - */ + VISITOR_KEYS[type] = opts.visitor; + BUILDER_KEYS[type] = opts.builder; + NODE_FIELDS[type] = opts.fields; + ALIAS_KEYS[type] = opts.aliases; - /** - * Traverse node with current scope and path. - */ + store[type] = opts; + } - Scope.prototype.traverse = function traverse(node /*: Object*/, opts /*: Object*/, state /*:: ?*/) { - _index2["default"](node, opts, this, state, this.path); - }; + var store = {}; - /** - * Generate a unique identifier and add it to the current scope. - */ +/***/ }, +/* 265 */ +/***/ function(module, exports, __webpack_require__) { - Scope.prototype.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier() { - var name /*: string*/ = arguments.length <= 0 || arguments[0] === undefined ? "temp" : arguments[0]; + "use strict"; - var id = this.generateUidIdentifier(name); - this.push({ id: id }); - return id; - }; + exports.__esModule = true; - /** - * Generate a unique identifier. - */ + var _iterator = __webpack_require__(266); - Scope.prototype.generateUidIdentifier = function generateUidIdentifier() { - var name /*: string*/ = arguments.length <= 0 || arguments[0] === undefined ? "temp" : arguments[0]; + var _iterator2 = _interopRequireDefault(_iterator); - return t.identifier(this.generateUid(name)); - }; + var _symbol = __webpack_require__(268); - /** - * Generate a unique `_id1` binding. - */ + var _symbol2 = _interopRequireDefault(_symbol); - Scope.prototype.generateUid = function generateUid() { - var name /*: string*/ = arguments.length <= 0 || arguments[0] === undefined ? "temp" : arguments[0]; + var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; - name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var uid = undefined; - var i = 0; - do { - uid = this._generateUid(name, i); - i++; - } while (this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); + exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); + } : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); + }; - var program = this.getProgramParent(); - program.references[uid] = true; - program.uids[uid] = true; +/***/ }, +/* 266 */ +/***/ function(module, exports, __webpack_require__) { - return uid; - }; + module.exports = { "default": __webpack_require__(267), __esModule: true }; - /** - * Generate an `_id1`. - */ +/***/ }, +/* 267 */ +/***/ function(module, exports, __webpack_require__) { - Scope.prototype._generateUid = function _generateUid(name, i) { - var id = name; - if (i > 1) id += i; - return "_" + id; - }; + __webpack_require__(51); + __webpack_require__(5); + module.exports = __webpack_require__(68).f('iterator'); - /** - * Generate a unique identifier based on a node. - */ +/***/ }, +/* 268 */ +/***/ function(module, exports, __webpack_require__) { - Scope.prototype.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent /*: Object*/, defaultName /*:: ?: String*/) /*: Object*/ { - var node = parent; + module.exports = { "default": __webpack_require__(269), __esModule: true }; - if (t.isAssignmentExpression(parent)) { - node = parent.left; - } else if (t.isVariableDeclarator(parent)) { - node = parent.id; - } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) { - node = node.key; - } +/***/ }, +/* 269 */ +/***/ function(module, exports, __webpack_require__) { - var parts = []; + __webpack_require__(66); + __webpack_require__(270); + __webpack_require__(271); + __webpack_require__(272); + module.exports = __webpack_require__(18).Symbol; - var add = function add(node) { - if (t.isModuleDeclaration(node)) { - if (node.source) { - add(node.source); - } else if (node.specifiers && node.specifiers.length) { - for (var _iterator5 = (node.specifiers /*: Array*/), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { - var _ref5; +/***/ }, +/* 270 */ +/***/ function(module, exports) { - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } + - var specifier = _ref5; +/***/ }, +/* 271 */ +/***/ function(module, exports, __webpack_require__) { - add(specifier); - } - } else if (node.declaration) { - add(node.declaration); - } - } else if (t.isModuleSpecifier(node)) { - add(node.local); - } else if (t.isMemberExpression(node)) { - add(node.object); - add(node.property); - } else if (t.isIdentifier(node)) { - parts.push(node.name); - } else if (t.isLiteral(node)) { - parts.push(node.value); - } else if (t.isCallExpression(node)) { - add(node.callee); - } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) { - for (var _iterator6 = (node.properties /*: Array*/), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _getIterator(_iterator6);;) { - var _ref6; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref6 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref6 = _i6.value; - } - - var prop = _ref6; + __webpack_require__(69)('asyncIterator'); - add(prop.key || prop.argument); - } - } - }; - - add(node); - - var id = parts.join("$"); - id = id.replace(/^_/, "") || defaultName || "ref"; - - return this.generateUidIdentifier(id.slice(0, 20)); - }; +/***/ }, +/* 272 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Determine whether evaluating the specific input `node` is a consequenceless reference. ie. - * evaluating it wont result in potentially arbitrary code from being ran. The following are - * whitelisted and determined not to cause side effects: - * - * - `this` expressions - * - `super` expressions - * - Bound identifiers - */ - - Scope.prototype.isStatic = function isStatic(node /*: Object*/) /*: boolean*/ { - if (t.isThisExpression(node) || t.isSuper(node)) { - return true; - } + __webpack_require__(69)('observable'); - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (binding) { - return binding.constant; - } else { - return this.hasBinding(node.name); - } - } +/***/ }, +/* 273 */ +/***/ function(module, exports, __webpack_require__) { - return false; - }; + "use strict"; - /** - * Possibly generate a memoised identifier if it is not static and has consequences. - */ + var _index = __webpack_require__(63); - Scope.prototype.maybeGenerateMemoised = function maybeGenerateMemoised(node /*: Object*/, dontPush /*:: ?: boolean*/) /*: ?Object*/ { - if (this.isStatic(node)) { - return null; - } else { - var _id2 = this.generateUidIdentifierBasedOnNode(node); - if (!dontPush) this.push({ id: _id2 }); - return _id2; - } - }; + var t = _interopRequireWildcard(_index); - Scope.prototype.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind /*: string*/, name /*: string*/, id /*: Object*/) { - // ignore parameters - if (kind === "param") return; + var _constants = __webpack_require__(84); - // ignore hoisted functions if there's also a local let - if (kind === "hoisted" && local.kind === "let") return; + var _index2 = __webpack_require__(264); - var duplicate = false; + var _index3 = _interopRequireDefault(_index2); - // don't allow duplicate bindings to exist alongside - if (!duplicate) duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module"; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // don't allow a local of param with a kind of let - if (!duplicate) duplicate = local.kind === "param" && (kind === "let" || kind === "const"); + 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; } } - if (duplicate) { - throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError); + (0, _index3.default)("ArrayExpression", { + fields: { + elements: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: [] } - }; + }, + visitor: ["elements"], + aliases: ["Expression"] + }); - Scope.prototype.rename = function rename(oldName /*: string*/, newName /*: string*/, block /*:: ?*/) { - var binding = this.getBinding(oldName); - if (binding) { - newName = newName || this.generateUidIdentifier(oldName).name; - return new _libRenamer2["default"](binding, oldName, newName).rename(block); + (0, _index3.default)("AssignmentExpression", { + fields: { + operator: { + validate: (0, _index2.assertValueType)("string") + }, + left: { + validate: (0, _index2.assertNodeType)("LVal") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") } - }; + }, + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Expression"] + }); - Scope.prototype._renameFromMap = function _renameFromMap(map, oldName, newName, value) { - if (map[oldName]) { - map[newName] = value; - map[oldName] = null; + (0, _index3.default)("BinaryExpression", { + builder: ["operator", "left", "right"], + fields: { + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS) + }, + left: { + validate: (0, _index2.assertNodeType)("Expression") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") } - }; - - Scope.prototype.dump = function dump() { - var sep = _repeating2["default"]("-", 60); - console.log(sep); - var scope = this; - do { - console.log("#", scope.block.type); - for (var _name2 in scope.bindings) { - var binding = scope.bindings[_name2]; - console.log(" -", _name2, { - constant: binding.constant, - references: binding.references, - violations: binding.constantViolations.length, - kind: binding.kind - }); - } - } while (scope = scope.parent); - console.log(sep); - }; + }, + visitor: ["left", "right"], + aliases: ["Binary", "Expression"] + }); - Scope.prototype.toArray = function toArray(node /*: Object*/, i /*:: ?: number*/) { - var file = this.hub.file; + (0, _index3.default)("Directive", { + visitor: ["value"], + fields: { + value: { + validate: (0, _index2.assertNodeType)("DirectiveLiteral") + } + } + }); - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (binding && binding.constant && binding.path.isGenericType("Array")) return node; + (0, _index3.default)("DirectiveLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _index2.assertValueType)("string") } + } + }); - if (t.isArrayExpression(node)) { - return node; + (0, _index3.default)("BlockStatement", { + builder: ["body", "directives"], + visitor: ["directives", "body"], + fields: { + directives: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) } + }, + aliases: ["Scopable", "BlockParent", "Block", "Statement"] + }); - if (t.isIdentifier(node, { name: "arguments" })) { - return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]); + (0, _index3.default)("BreakStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _index2.assertNodeType)("Identifier"), + optional: true } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] + }); - var helperName = "toArray"; - var args = [node]; - if (i === true) { - helperName = "toConsumableArray"; - } else if (i) { - args.push(t.numericLiteral(i)); - helperName = "slicedToArray"; - // TODO if (this.hub.file.isLoose("es6.forOf")) helperName += "-loose"; + (0, _index3.default)("CallExpression", { + visitor: ["callee", "arguments"], + fields: { + callee: { + validate: (0, _index2.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement"))) } - return t.callExpression(file.addHelper(helperName), args); - }; + }, + aliases: ["Expression"] + }); - Scope.prototype.registerDeclaration = function registerDeclaration(path /*: NodePath*/) { - if (path.isLabeledStatement()) { - this.registerBinding("label", path); - } else if (path.isFunctionDeclaration()) { - this.registerBinding("hoisted", path.get("id"), path); - } else if (path.isVariableDeclaration()) { - var declarations = path.get("declarations"); - for (var _iterator7 = (declarations /*: Array*/), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _getIterator(_iterator7);;) { - var _ref7; + (0, _index3.default)("CatchClause", { + visitor: ["param", "body"], + fields: { + param: { + validate: (0, _index2.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + } + }, + aliases: ["Scopable"] + }); - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref7 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref7 = _i7.value; - } + (0, _index3.default)("ConditionalExpression", { + visitor: ["test", "consequent", "alternate"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _index2.assertNodeType)("Expression") + }, + alternate: { + validate: (0, _index2.assertNodeType)("Expression") + } + }, + aliases: ["Expression", "Conditional"] + }); - var declar = _ref7; + (0, _index3.default)("ContinueStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _index2.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] + }); - this.registerBinding(path.node.kind, declar); - } - } else if (path.isClassDeclaration()) { - this.registerBinding("let", path); - } else if (path.isImportDeclaration()) { - var specifiers = path.get("specifiers"); - for (var _iterator8 = (specifiers /*: Array*/), _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _getIterator(_iterator8);;) { - var _ref8; + (0, _index3.default)("DebuggerStatement", { + aliases: ["Statement"] + }); - if (_isArray8) { - if (_i8 >= _iterator8.length) break; - _ref8 = _iterator8[_i8++]; - } else { - _i8 = _iterator8.next(); - if (_i8.done) break; - _ref8 = _i8.value; - } + (0, _index3.default)("DoWhileStatement", { + visitor: ["test", "body"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") + } + }, + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] + }); - var specifier = _ref8; + (0, _index3.default)("EmptyStatement", { + aliases: ["Statement"] + }); - this.registerBinding("module", specifier); - } - } else if (path.isExportDeclaration()) { - var declar = path.get("declaration"); - if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) { - this.registerDeclaration(declar); - } - } else { - this.registerBinding("unknown", path); + (0, _index3.default)("ExpressionStatement", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _index2.assertNodeType)("Expression") } - }; + }, + aliases: ["Statement", "ExpressionWrapper"] + }); - Scope.prototype.buildUndefinedNode = function buildUndefinedNode() { - if (this.hasBinding("undefined")) { - return t.unaryExpression("void", t.numericLiteral(0), true); - } else { - return t.identifier("undefined"); + (0, _index3.default)("File", { + builder: ["program", "comments", "tokens"], + visitor: ["program"], + fields: { + program: { + validate: (0, _index2.assertNodeType)("Program") } - }; + } + }); - Scope.prototype.registerConstantViolation = function registerConstantViolation(path /*: NodePath*/) { - var ids = path.getBindingIdentifiers(); - for (var _name3 in ids) { - var binding = this.getBinding(_name3); - if (binding) binding.reassign(path); + (0, _index3.default)("ForInStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _index2.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") } - }; - - Scope.prototype.registerBinding = function registerBinding(kind /*: string*/, path /*: NodePath*/) { - var bindingPath = arguments.length <= 2 || arguments[2] === undefined ? path : arguments[2]; - return (function () { - if (!kind) throw new ReferenceError("no `kind`"); + } + }); - if (path.isVariableDeclaration()) { - var declarators /*: Array*/ = path.get("declarations"); - for (var _iterator9 = declarators, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _getIterator(_iterator9);;) { - var _ref9; + (0, _index3.default)("ForStatement", { + visitor: ["init", "test", "update", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], + fields: { + init: { + validate: (0, _index2.assertNodeType)("VariableDeclaration", "Expression"), + optional: true + }, + test: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + }, + update: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") + } + } + }); - if (_isArray9) { - if (_i9 >= _iterator9.length) break; - _ref9 = _iterator9[_i9++]; - } else { - _i9 = _iterator9.next(); - if (_i9.done) break; - _ref9 = _i9.value; - } + (0, _index3.default)("FunctionDeclaration", { + builder: ["id", "params", "body", "generator", "async"], + visitor: ["id", "params", "body", "returnType", "typeParameters"], + fields: { + id: { + validate: (0, _index2.assertNodeType)("Identifier") + }, + params: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + } + }, + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] + }); - var declar = _ref9; + (0, _index3.default)("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: { + id: { + validate: (0, _index2.assertNodeType)("Identifier"), + optional: true + }, + params: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + } + } + }); - this.registerBinding(kind, declar); - } - return; + (0, _index3.default)("Identifier", { + builder: ["name"], + visitor: ["typeAnnotation"], + aliases: ["Expression", "LVal"], + fields: { + name: { + validate: function validate(node, key, val) { + if (!t.isValidIdentifier(val)) {} } + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) + } + } + }); - var parent = this.getProgramParent(); - var ids = path.getBindingIdentifiers(true); - - for (var _name4 in ids) { - for (var _iterator10 = (ids[_name4] /*: Array*/), _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _getIterator(_iterator10);;) { - var _ref10; - - if (_isArray10) { - if (_i10 >= _iterator10.length) break; - _ref10 = _iterator10[_i10++]; - } else { - _i10 = _iterator10.next(); - if (_i10.done) break; - _ref10 = _i10.value; - } - - var _id3 = _ref10; - - var local = this.getOwnBinding(_name4); - if (local) { - // same identifier so continue safely as we're likely trying to register it - // multiple times - if (local.identifier === _id3) continue; - - this.checkBlockScopedCollisions(local, kind, _name4, _id3); - } + (0, _index3.default)("IfStatement", { + visitor: ["test", "consequent", "alternate"], + aliases: ["Statement", "Conditional"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _index2.assertNodeType)("Statement") + }, + alternate: { + optional: true, + validate: (0, _index2.assertNodeType)("Statement") + } + } + }); - parent.references[_name4] = true; + (0, _index3.default)("LabeledStatement", { + visitor: ["label", "body"], + aliases: ["Statement"], + fields: { + label: { + validate: (0, _index2.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") + } + } + }); - this.bindings[_name4] = new _binding2["default"]({ - identifier: _id3, - existing: local, - scope: this, - path: bindingPath, - kind: kind - }); - } - } - }).apply(this, arguments); - }; + (0, _index3.default)("StringLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _index2.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }); - Scope.prototype.addGlobal = function addGlobal(node /*: Object*/) { - this.globals[node.name] = node; - }; + (0, _index3.default)("NumericLiteral", { + builder: ["value"], + deprecatedAlias: "NumberLiteral", + fields: { + value: { + validate: (0, _index2.assertValueType)("number") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }); - Scope.prototype.hasUid = function hasUid(name) /*: boolean*/ { - var scope = this; + (0, _index3.default)("NullLiteral", { + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }); - do { - if (scope.uids[name]) return true; - } while (scope = scope.parent); + (0, _index3.default)("BooleanLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _index2.assertValueType)("boolean") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }); - return false; - }; + (0, _index3.default)("RegExpLiteral", { + builder: ["pattern", "flags"], + deprecatedAlias: "RegexLiteral", + aliases: ["Expression", "Literal"], + fields: { + pattern: { + validate: (0, _index2.assertValueType)("string") + }, + flags: { + validate: (0, _index2.assertValueType)("string"), + default: "" + } + } + }); - Scope.prototype.hasGlobal = function hasGlobal(name /*: string*/) /*: boolean*/ { - var scope = this; + (0, _index3.default)("LogicalExpression", { + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Binary", "Expression"], + fields: { + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS) + }, + left: { + validate: (0, _index2.assertNodeType)("Expression") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") + } + } + }); - do { - if (scope.globals[name]) return true; - } while (scope = scope.parent); + (0, _index3.default)("MemberExpression", { + builder: ["object", "property", "computed"], + visitor: ["object", "property"], + aliases: ["Expression", "LVal"], + fields: { + object: { + validate: (0, _index2.assertNodeType)("Expression") + }, + property: { + validate: function validate(node, key, val) { + var expectedType = node.computed ? "Expression" : "Identifier"; + (0, _index2.assertNodeType)(expectedType)(node, key, val); + } + }, + computed: { + default: false + } + } + }); - return false; - }; + (0, _index3.default)("NewExpression", { + visitor: ["callee", "arguments"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _index2.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement"))) + } + } + }); - Scope.prototype.hasReference = function hasReference(name /*: string*/) /*: boolean*/ { - var scope = this; + (0, _index3.default)("Program", { + visitor: ["directives", "body"], + builder: ["body", "directives"], + fields: { + directives: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"] + }); - do { - if (scope.references[name]) return true; - } while (scope = scope.parent); + (0, _index3.default)("ObjectExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadProperty"))) + } + } + }); - return false; - }; + (0, _index3.default)("ObjectMethod", { + builder: ["kind", "key", "params", "body", "computed"], + fields: { + kind: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("method", "get", "set")), + default: "method" + }, + computed: { + validate: (0, _index2.assertValueType)("boolean"), + default: false + }, + key: { + validate: function validate(node, key, val) { + var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; + _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); + } + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + } + }, + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] + }); - Scope.prototype.isPure = function isPure(node, constantsOnly /*:: ?: boolean*/) { - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (!binding) return false; - if (constantsOnly) return binding.constant; - return true; - } else if (t.isClass(node)) { - if (node.superClass && !this.isPure(node.superClass, constantsOnly)) return false; - return this.isPure(node.body, constantsOnly); - } else if (t.isClassBody(node)) { - for (var _iterator11 = node.body, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _getIterator(_iterator11);;) { - var _ref11; - - if (_isArray11) { - if (_i11 >= _iterator11.length) break; - _ref11 = _iterator11[_i11++]; - } else { - _i11 = _iterator11.next(); - if (_i11.done) break; - _ref11 = _i11.value; - } - - var method = _ref11; - - if (!this.isPure(method, constantsOnly)) return false; - } - return true; - } else if (t.isBinary(node)) { - return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); - } else if (t.isArrayExpression(node)) { - for (var _iterator12 = (node.elements /*: Array*/), _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _getIterator(_iterator12);;) { - var _ref12; - - if (_isArray12) { - if (_i12 >= _iterator12.length) break; - _ref12 = _iterator12[_i12++]; - } else { - _i12 = _iterator12.next(); - if (_i12.done) break; - _ref12 = _i12.value; - } - - var elem = _ref12; - - if (!this.isPure(elem, constantsOnly)) return false; + (0, _index3.default)("ObjectProperty", { + builder: ["key", "value", "computed", "shorthand", "decorators"], + fields: { + computed: { + validate: (0, _index2.assertValueType)("boolean"), + default: false + }, + key: { + validate: function validate(node, key, val) { + var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; + _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); } - return true; - } else if (t.isObjectExpression(node)) { - for (var _iterator13 = (node.properties /*: Array*/), _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _getIterator(_iterator13);;) { - var _ref13; + }, + value: { + validate: (0, _index2.assertNodeType)("Expression") + }, + shorthand: { + validate: (0, _index2.assertValueType)("boolean"), + default: false + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))), + optional: true + } + }, + visitor: ["key", "value", "decorators"], + aliases: ["UserWhitespacable", "Property", "ObjectMember"] + }); - if (_isArray13) { - if (_i13 >= _iterator13.length) break; - _ref13 = _iterator13[_i13++]; - } else { - _i13 = _iterator13.next(); - if (_i13.done) break; - _ref13 = _i13.value; - } + (0, _index3.default)("RestElement", { + visitor: ["argument", "typeAnnotation"], + aliases: ["LVal"], + fields: { + argument: { + validate: (0, _index2.assertNodeType)("LVal") + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) + } + } + }); - var prop = _ref13; + (0, _index3.default)("ReturnStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + } + } + }); - if (!this.isPure(prop, constantsOnly)) return false; - } - return true; - } else if (t.isClassMethod(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - if (node.kind === "get" || node.kind === "set") return false; - return true; - } else if (t.isClassProperty(node) || t.isObjectProperty(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - return this.isPure(node.value, constantsOnly); - } else if (t.isUnaryExpression(node)) { - return this.isPure(node.argument, constantsOnly); - } else { - return t.isPureish(node); + (0, _index3.default)("SequenceExpression", { + visitor: ["expressions"], + fields: { + expressions: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression"))) } - }; + }, + aliases: ["Expression"] + }); - /** - * Set some arbitrary data on the current scope. - */ + (0, _index3.default)("SwitchCase", { + visitor: ["test", "consequent"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + }, + consequent: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) + } + } + }); - Scope.prototype.setData = function setData(key, val) { - return this.data[key] = val; - }; + (0, _index3.default)("SwitchStatement", { + visitor: ["discriminant", "cases"], + aliases: ["Statement", "BlockParent", "Scopable"], + fields: { + discriminant: { + validate: (0, _index2.assertNodeType)("Expression") + }, + cases: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("SwitchCase"))) + } + } + }); - /** - * Recursively walk up scope tree looking for the data `key`. - */ + (0, _index3.default)("ThisExpression", { + aliases: ["Expression"] + }); - Scope.prototype.getData = function getData(key) { - var scope = this; - do { - var data = scope.data[key]; - if (data != null) return data; - } while (scope = scope.parent); - }; + (0, _index3.default)("ThrowStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _index2.assertNodeType)("Expression") + } + } + }); - /** - * Recursively walk up scope tree looking for the data `key` and if it exists, - * remove it. - */ + (0, _index3.default)("TryStatement", { + visitor: ["block", "handler", "finalizer"], + aliases: ["Statement"], + fields: { + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + handler: { + optional: true, + handler: (0, _index2.assertNodeType)("BlockStatement") + }, + finalizer: { + optional: true, + validate: (0, _index2.assertNodeType)("BlockStatement") + } + } + }); - Scope.prototype.removeData = function removeData(key) { - var scope = this; - do { - var data = scope.data[key]; - if (data != null) scope.data[key] = null; - } while (scope = scope.parent); - }; + (0, _index3.default)("UnaryExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: true + }, + argument: { + validate: (0, _index2.assertNodeType)("Expression") + }, + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["UnaryLike", "Expression"] + }); - Scope.prototype.init = function init() { - if (!this.references) this.crawl(); - }; + (0, _index3.default)("UpdateExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: false + }, + argument: { + validate: (0, _index2.assertNodeType)("Expression") + }, + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["Expression"] + }); - Scope.prototype.crawl = function crawl() { - var path = this.path; + (0, _index3.default)("VariableDeclaration", { + builder: ["kind", "declarations"], + visitor: ["declarations"], + aliases: ["Statement", "Declaration"], + fields: { + kind: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("var", "let", "const")) + }, + declarations: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("VariableDeclarator"))) + } + } + }); - // + (0, _index3.default)("VariableDeclarator", { + visitor: ["id", "init"], + fields: { + id: { + validate: (0, _index2.assertNodeType)("LVal") + }, + init: { + optional: true, + validate: (0, _index2.assertNodeType)("Expression") + } + } + }); - this.references = _Object$create(null); - this.bindings = _Object$create(null); - this.globals = _Object$create(null); - this.uids = _Object$create(null); - this.data = _Object$create(null); + (0, _index3.default)("WhileStatement", { + visitor: ["test", "body"], + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement", "Statement") + } + } + }); - // ForStatement - left, init + (0, _index3.default)("WithStatement", { + visitor: ["object", "body"], + aliases: ["Statement"], + fields: { + object: { + object: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement", "Statement") + } + } + }); - if (path.isLoop()) { - for (var _iterator14 = (t.FOR_INIT_KEYS /*: Array*/), _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _getIterator(_iterator14);;) { - var _ref14; +/***/ }, +/* 274 */ +/***/ function(module, exports, __webpack_require__) { - if (_isArray14) { - if (_i14 >= _iterator14.length) break; - _ref14 = _iterator14[_i14++]; - } else { - _i14 = _iterator14.next(); - if (_i14.done) break; - _ref14 = _i14.value; - } + "use strict"; - var key = _ref14; + var _index = __webpack_require__(264); - var node = path.get(key); - if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); - } - } + var _index2 = _interopRequireDefault(_index); - // FunctionExpression - id + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (path.isFunctionExpression() && path.has("id")) { - if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { - this.registerBinding("local", path.get("id"), path); - } + (0, _index2.default)("AssignmentPattern", { + visitor: ["left", "right"], + aliases: ["Pattern", "LVal"], + fields: { + left: { + validate: (0, _index.assertNodeType)("Identifier") + }, + right: { + validate: (0, _index.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) } + } + }); - // Class + (0, _index2.default)("ArrayPattern", { + visitor: ["elements", "typeAnnotation"], + aliases: ["Pattern", "LVal"], + fields: { + elements: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Expression"))) + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } + }); - if (path.isClassExpression() && path.has("id")) { - if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { - this.registerBinding("local", path); - } + (0, _index2.default)("ArrowFunctionExpression", { + builder: ["params", "body", "async"], + visitor: ["params", "body", "returnType", "typeParameters"], + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: { + params: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index.assertNodeType)("BlockStatement", "Expression") + }, + async: { + validate: (0, _index.assertValueType)("boolean"), + default: false } + } + }); - // Function - params, rest + (0, _index2.default)("ClassBody", { + visitor: ["body"], + fields: { + body: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ClassMethod", "ClassProperty"))) + } + } + }); - if (path.isFunction()) { - var params /*: Array*/ = path.get("params"); - for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _getIterator(_iterator15);;) { - var _ref15; + (0, _index2.default)("ClassDeclaration", { + builder: ["id", "superClass", "body", "decorators"], + visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], + aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], + fields: { + id: { + validate: (0, _index.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _index.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } + }); - if (_isArray15) { - if (_i15 >= _iterator15.length) break; - _ref15 = _iterator15[_i15++]; - } else { - _i15 = _iterator15.next(); - if (_i15.done) break; - _ref15 = _i15.value; - } + (0, _index2.default)("ClassExpression", { + inherits: "ClassDeclaration", + aliases: ["Scopable", "Class", "Expression", "Pureish"], + fields: { + id: { + optional: true, + validate: (0, _index.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _index.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } + }); - var param = _ref15; + (0, _index2.default)("ExportAllDeclaration", { + visitor: ["source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + source: { + validate: (0, _index.assertNodeType)("StringLiteral") + } + } + }); - this.registerBinding("param", param); - } + (0, _index2.default)("ExportDefaultDeclaration", { + visitor: ["declaration"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _index.assertNodeType)("FunctionDeclaration", "ClassDeclaration", "Expression") } + } + }); - // CatchClause - param + (0, _index2.default)("ExportNamedDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _index.assertNodeType)("Declaration"), + optional: true + }, + specifiers: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ExportSpecifier"))) + }, + source: { + validate: (0, _index.assertNodeType)("StringLiteral"), + optional: true + } + } + }); - if (path.isCatchClause()) { - this.registerBinding("let", path); + (0, _index2.default)("ExportSpecifier", { + visitor: ["local", "exported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + }, + exported: { + validate: (0, _index.assertNodeType)("Identifier") + } + } + }); + + (0, _index2.default)("ForOfStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _index.assertNodeType)("Expression") + }, + body: { + validate: (0, _index.assertNodeType)("Statement") } + } + }); - // Program + (0, _index2.default)("ImportDeclaration", { + visitor: ["specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration"], + fields: { + specifiers: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) + }, + source: { + validate: (0, _index.assertNodeType)("StringLiteral") + } + } + }); - var parent = this.getProgramParent(); - if (parent.crawling) return; + (0, _index2.default)("ImportDefaultSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + } + } + }); - var state = { - references: [], - constantViolations: [], - assignments: [] - }; + (0, _index2.default)("ImportNamespaceSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + } + } + }); - this.crawling = true; - path.traverse(collectorVisitor, state); - this.crawling = false; + (0, _index2.default)("ImportSpecifier", { + visitor: ["local", "imported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + }, + imported: { + validate: (0, _index.assertNodeType)("Identifier") + } + } + }); - // register assignments - for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _getIterator(_iterator16);;) { - var _ref16; + (0, _index2.default)("MetaProperty", { + visitor: ["meta", "property"], + aliases: ["Expression"], + fields: { + meta: { + validate: (0, _index.assertValueType)("string") + }, + property: { + validate: (0, _index.assertValueType)("string") + } + } + }); - if (_isArray16) { - if (_i16 >= _iterator16.length) break; - _ref16 = _iterator16[_i16++]; - } else { - _i16 = _iterator16.next(); - if (_i16.done) break; - _ref16 = _i16.value; + (0, _index2.default)("ClassMethod", { + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], + builder: ["kind", "key", "params", "body", "computed", "static"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + fields: { + kind: { + validate: (0, _index.chain)((0, _index.assertValueType)("string"), (0, _index.assertOneOf)("get", "set", "method", "constructor")), + default: "method" + }, + computed: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + static: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + key: { + validate: function validate(node, key, val) { + var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; + _index.assertNodeType.apply(undefined, expectedTypes)(node, key, val); } + }, + params: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index.assertValueType)("boolean") + } + } + }); - var _path = _ref16; + (0, _index2.default)("ObjectPattern", { + visitor: ["properties", "typeAnnotation"], + aliases: ["Pattern", "LVal"], + fields: { + properties: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("RestProperty", "Property"))) + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } + }); - // register undeclared bindings as globals - var ids = _path.getBindingIdentifiers(); - var programParent = undefined; - for (var _name5 in ids) { - if (_path.scope.getBinding(_name5)) continue; + (0, _index2.default)("SpreadElement", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } + }); - programParent = programParent || _path.scope.getProgramParent(); - programParent.addGlobal(ids[_name5]); - } + (0, _index2.default)("Super", { + aliases: ["Expression"] + }); - // register as constant violation - _path.scope.registerConstantViolation(_path); + (0, _index2.default)("TaggedTemplateExpression", { + visitor: ["tag", "quasi"], + aliases: ["Expression"], + fields: { + tag: { + validate: (0, _index.assertNodeType)("Expression") + }, + quasi: { + validate: (0, _index.assertNodeType)("TemplateLiteral") } + } + }); - // register references - for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : _getIterator(_iterator17);;) { - var _ref17; + (0, _index2.default)("TemplateElement", { + builder: ["value", "tail"], + fields: { + value: {}, + tail: { + validate: (0, _index.assertValueType)("boolean"), + default: false + } + } + }); - if (_isArray17) { - if (_i17 >= _iterator17.length) break; - _ref17 = _iterator17[_i17++]; - } else { - _i17 = _iterator17.next(); - if (_i17.done) break; - _ref17 = _i17.value; - } - - var ref = _ref17; - - var binding = ref.scope.getBinding(ref.node.name); - if (binding) { - binding.reference(ref); - } else { - ref.scope.getProgramParent().addGlobal(ref.node); - } + (0, _index2.default)("TemplateLiteral", { + visitor: ["quasis", "expressions"], + aliases: ["Expression", "Literal"], + fields: { + quasis: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("TemplateElement"))) + }, + expressions: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Expression"))) } + } + }); - // register constant violations - for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : _getIterator(_iterator18);;) { - var _ref18; - - if (_isArray18) { - if (_i18 >= _iterator18.length) break; - _ref18 = _iterator18[_i18++]; - } else { - _i18 = _iterator18.next(); - if (_i18.done) break; - _ref18 = _i18.value; - } + (0, _index2.default)("YieldExpression", { + builder: ["argument", "delegate"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + delegate: { + validate: (0, _index.assertValueType)("boolean"), + default: false + }, + argument: { + optional: true, + validate: (0, _index.assertNodeType)("Expression") + } + } + }); - var _path2 = _ref18; +/***/ }, +/* 275 */ +/***/ function(module, exports, __webpack_require__) { - _path2.scope.registerConstantViolation(_path2); - } - }; + "use strict"; - Scope.prototype.push = function push(opts /*: { - id: Object; - init: ?Object; - unique: ?boolean; - _blockHoist: ?number; - kind: "var" | "let"; - }*/) { - var path = this.path; + var _index = __webpack_require__(264); - if (!path.isBlockStatement() && !path.isProgram()) { - path = this.getBlockParent().path; - } + var _index2 = _interopRequireDefault(_index); - if (path.isSwitchStatement()) { - path = this.getFunctionParent().path; - } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (path.isLoop() || path.isCatchClause() || path.isFunction()) { - t.ensureBlock(path.node); - path = path.get("body"); - } + (0, _index2.default)("AnyTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }); - var unique = opts.unique; - var kind = opts.kind || "var"; - var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; + (0, _index2.default)("ArrayTypeAnnotation", { + visitor: ["elementType"], + aliases: ["Flow"], + fields: {} + }); - var dataKey = "declaration:" + kind + ":" + blockHoist; - var declarPath = !unique && path.getData(dataKey); + (0, _index2.default)("BooleanTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }); - if (!declarPath) { - var declar = t.variableDeclaration(kind, []); - declar._generated = true; - declar._blockHoist = blockHoist; + (0, _index2.default)("BooleanLiteralTypeAnnotation", { + aliases: ["Flow"], + fields: {} + }); - var _path$unshiftContainer = path.unshiftContainer("body", [declar]); + (0, _index2.default)("NullLiteralTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }); - declarPath = _path$unshiftContainer[0]; + (0, _index2.default)("ClassImplements", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} + }); - if (!unique) path.setData(dataKey, declarPath); + (0, _index2.default)("ClassProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + builder: ["key", "value", "typeAnnotation", "decorators", "computed"], + aliases: ["Property"], + fields: { + computed: { + validate: (0, _index.assertValueType)("boolean"), + default: false } + } + }); - var declarator = t.variableDeclarator(opts.id, opts.init); - declarPath.node.declarations.push(declarator); - this.registerBinding(kind, declarPath.get("declarations").pop()); - }; - - /** - * Walk up to the top of the scope tree and get the `Program`. - */ + (0, _index2.default)("DeclareClass", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - Scope.prototype.getProgramParent = function getProgramParent() { - var scope = this; - do { - if (scope.path.isProgram()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a Function or Program..."); - }; + (0, _index2.default)("DeclareFunction", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - /** - * Walk up the scope tree until we hit either a Function or reach the - * very top and hit Program. - */ + (0, _index2.default)("DeclareInterface", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - Scope.prototype.getFunctionParent = function getFunctionParent() { - var scope = this; - do { - if (scope.path.isFunctionParent()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a Function or Program..."); - }; + (0, _index2.default)("DeclareModule", { + visitor: ["id", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - /** - * Walk up the scope tree until we hit either a BlockStatement/Loop/Program/Function/Switch or reach the - * very top and hit Program. - */ + (0, _index2.default)("DeclareModuleExports", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - Scope.prototype.getBlockParent = function getBlockParent() { - var scope = this; - do { - if (scope.path.isBlockParent()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); - }; + (0, _index2.default)("DeclareTypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - /** - * Walks the scope tree and gathers **all** bindings. - */ + (0, _index2.default)("DeclareVariable", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - Scope.prototype.getAllBindings = function getAllBindings() /*: Object*/ { - var ids = _Object$create(null); + (0, _index2.default)("ExistentialTypeParam", { + aliases: ["Flow"] + }); - var scope = this; - do { - _lodashObjectDefaults2["default"](ids, scope.bindings); - scope = scope.parent; - } while (scope); + (0, _index2.default)("FunctionTypeAnnotation", { + visitor: ["typeParameters", "params", "rest", "returnType"], + aliases: ["Flow"], + fields: {} + }); - return ids; - }; + (0, _index2.default)("FunctionTypeParam", { + visitor: ["name", "typeAnnotation"], + aliases: ["Flow"], + fields: {} + }); - /** - * Walks the scope tree and gathers all declarations of `kind`. - */ + (0, _index2.default)("GenericTypeAnnotation", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() /*: Object*/ { - var ids = _Object$create(null); + (0, _index2.default)("InterfaceExtends", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} + }); - for (var _iterator19 = (arguments /*: Array*/), _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : _getIterator(_iterator19);;) { - var _ref19; + (0, _index2.default)("InterfaceDeclaration", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - if (_isArray19) { - if (_i19 >= _iterator19.length) break; - _ref19 = _iterator19[_i19++]; - } else { - _i19 = _iterator19.next(); - if (_i19.done) break; - _ref19 = _i19.value; - } + (0, _index2.default)("IntersectionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} + }); - var kind = _ref19; + (0, _index2.default)("MixedTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"] + }); - var scope = this; - do { - for (var _name6 in scope.bindings) { - var binding = scope.bindings[_name6]; - if (binding.kind === kind) ids[_name6] = binding; - } - scope = scope.parent; - } while (scope); - } + (0, _index2.default)("EmptyTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"] + }); - return ids; - }; + (0, _index2.default)("NullableTypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.bindingIdentifierEquals = function bindingIdentifierEquals(name /*: string*/, node /*: Object*/) /*: boolean*/ { - return this.getBindingIdentifier(name) === node; - }; + (0, _index2.default)("NumericLiteralTypeAnnotation", { + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.getBinding = function getBinding(name /*: string*/) { - var scope = this; + (0, _index2.default)("NumberTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }); - do { - var binding = scope.getOwnBinding(name); - if (binding) return binding; - } while (scope = scope.parent); - }; + (0, _index2.default)("StringLiteralTypeAnnotation", { + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.getOwnBinding = function getOwnBinding(name /*: string*/) { - return this.bindings[name]; - }; + (0, _index2.default)("StringTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }); - Scope.prototype.getBindingIdentifier = function getBindingIdentifier(name /*: string*/) { - var info = this.getBinding(name); - return info && info.identifier; - }; + (0, _index2.default)("ThisTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }); - Scope.prototype.getOwnBindingIdentifier = function getOwnBindingIdentifier(name /*: string*/) { - var binding = this.bindings[name]; - return binding && binding.identifier; - }; + (0, _index2.default)("TupleTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.hasOwnBinding = function hasOwnBinding(name /*: string*/) { - return !!this.getOwnBinding(name); - }; + (0, _index2.default)("TypeofTypeAnnotation", { + visitor: ["argument"], + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.hasBinding = function hasBinding(name /*: string*/, noGlobals /*:: ?*/) { - if (!name) return false; - if (this.hasOwnBinding(name)) return true; - if (this.parentHasBinding(name, noGlobals)) return true; - if (this.hasUid(name)) return true; - if (!noGlobals && _lodashCollectionIncludes2["default"](Scope.globals, name)) return true; - if (!noGlobals && _lodashCollectionIncludes2["default"](Scope.contextVariables, name)) return true; - return false; - }; + (0, _index2.default)("TypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }); - Scope.prototype.parentHasBinding = function parentHasBinding(name /*: string*/, noGlobals /*:: ?*/) { - return this.parent && this.parent.hasBinding(name, noGlobals); - }; + (0, _index2.default)("TypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow"], + fields: {} + }); - /** - * Move a binding of `name` to another `scope`. - */ + (0, _index2.default)("TypeCastExpression", { + visitor: ["expression", "typeAnnotation"], + aliases: ["Flow", "ExpressionWrapper", "Expression"], + fields: {} + }); - Scope.prototype.moveBindingTo = function moveBindingTo(name, scope) { - var info = this.getBinding(name); - if (info) { - info.scope.removeOwnBinding(name); - info.scope = scope; - scope.bindings[name] = info; - } - }; + (0, _index2.default)("TypeParameter", { + visitor: ["bound"], + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.removeOwnBinding = function removeOwnBinding(name /*: string*/) { - delete this.bindings[name]; - }; + (0, _index2.default)("TypeParameterDeclaration", { + visitor: ["params"], + aliases: ["Flow"], + fields: {} + }); - Scope.prototype.removeBinding = function removeBinding(name /*: string*/) { - // clear literal binding - var info = this.getBinding(name); - if (info) { - info.scope.removeOwnBinding(name); - } + (0, _index2.default)("TypeParameterInstantiation", { + visitor: ["params"], + aliases: ["Flow"], + fields: {} + }); - // clear uids with this name - https://github.com/babel/babel/issues/2101 - var scope = this; - do { - if (scope.uids[name]) { - scope.uids[name] = false; - } - } while (scope = scope.parent); - }; + (0, _index2.default)("ObjectTypeAnnotation", { + visitor: ["properties", "indexers", "callProperties"], + aliases: ["Flow"], + fields: {} + }); - return Scope; - })(); + (0, _index2.default)("ObjectTypeCallProperty", { + visitor: ["value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} + }); - exports["default"] = Scope; - module.exports = exports["default"]; + (0, _index2.default)("ObjectTypeIndexer", { + visitor: ["id", "key", "value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} + }); - /** - * Variables available in current context. - */ + (0, _index2.default)("ObjectTypeProperty", { + visitor: ["key", "value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} + }); -/***/ }, -/* 187 */ -/***/ function(module, exports, __webpack_require__) { + (0, _index2.default)("QualifiedTypeIdentifier", { + visitor: ["id", "qualification"], + aliases: ["Flow"], + fields: {} + }); - module.exports = { "default": __webpack_require__(188), __esModule: true }; + (0, _index2.default)("UnionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} + }); + + (0, _index2.default)("VoidTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }); /***/ }, -/* 188 */ +/* 276 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(139); - __webpack_require__(189); - module.exports = __webpack_require__(18).Symbol; + "use strict"; -/***/ }, -/* 189 */ -/***/ function(module, exports) { + var _index = __webpack_require__(264); - + var _index2 = _interopRequireDefault(_index); -/***/ }, -/* 190 */ -/***/ function(module, exports, __webpack_require__) { + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var baseIndexOf = __webpack_require__(126), - getLength = __webpack_require__(78), - isArray = __webpack_require__(83), - isIterateeCall = __webpack_require__(96), - isLength = __webpack_require__(80), - isString = __webpack_require__(165), - values = __webpack_require__(191); + (0, _index2.default)("JSXAttribute", { + visitor: ["name", "value"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXNamespacedName") + }, + value: { + optional: true, + validate: (0, _index.assertNodeType)("JSXElement", "StringLiteral", "JSXExpressionContainer") + } + } + }); - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeMax = Math.max; + (0, _index2.default)("JSXClosingElement", { + visitor: ["name"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + } + } + }); - /** - * Checks if `target` is in `collection` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); - * // => true - * - * _.includes('pebbles', 'eb'); - * // => true - */ - function includes(collection, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + (0, _index2.default)("JSXElement", { + builder: ["openingElement", "closingElement", "children", "selfClosing"], + visitor: ["openingElement", "children", "closingElement"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingElement: { + validate: (0, _index.assertNodeType)("JSXOpeningElement") + }, + closingElement: { + optional: true, + validate: (0, _index.assertNodeType)("JSXClosingElement") + }, + children: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXElement"))) + } } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) - : (!!length && baseIndexOf(collection, target, fromIndex) > -1); - } + }); - module.exports = includes; + (0, _index2.default)("JSXEmptyExpression", { + aliases: ["JSX", "Expression"] + }); + + (0, _index2.default)("JSXExpressionContainer", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _index.assertNodeType)("Expression") + } + } + }); + + (0, _index2.default)("JSXIdentifier", { + builder: ["name"], + aliases: ["JSX", "Expression"], + fields: { + name: { + validate: (0, _index.assertValueType)("string") + } + } + }); + + (0, _index2.default)("JSXMemberExpression", { + visitor: ["object", "property"], + aliases: ["JSX", "Expression"], + fields: { + object: { + validate: (0, _index.assertNodeType)("JSXMemberExpression", "JSXIdentifier") + }, + property: { + validate: (0, _index.assertNodeType)("JSXIdentifier") + } + } + }); + + (0, _index2.default)("JSXNamespacedName", { + visitor: ["namespace", "name"], + aliases: ["JSX"], + fields: { + namespace: { + validate: (0, _index.assertNodeType)("JSXIdentifier") + }, + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier") + } + } + }); + + (0, _index2.default)("JSXOpeningElement", { + builder: ["name", "attributes", "selfClosing"], + visitor: ["name", "attributes"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + }, + selfClosing: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + attributes: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) + } + } + }); + + (0, _index2.default)("JSXSpreadAttribute", { + visitor: ["argument"], + aliases: ["JSX"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } + }); + (0, _index2.default)("JSXText", { + aliases: ["JSX", "Immutable"], + builder: ["value"], + fields: { + value: { + validate: (0, _index.assertValueType)("string") + } + } + }); /***/ }, -/* 191 */ +/* 277 */ /***/ function(module, exports, __webpack_require__) { - var baseValues = __webpack_require__(192), - keys = __webpack_require__(71); + "use strict"; - /** - * Creates an array of the own enumerable property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return baseValues(object, keys(object)); - } + var _index = __webpack_require__(264); - module.exports = values; + var _index2 = _interopRequireDefault(_index); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }, -/* 192 */ -/***/ function(module, exports) { + (0, _index2.default)("Noop", { + visitor: [] + }); - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - var index = -1, - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; + (0, _index2.default)("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { + expression: { + validate: (0, _index.assertNodeType)("Expression") + } } - return result; - } - - module.exports = baseValues; - + }); /***/ }, -/* 193 */ +/* 278 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - var isFinite = __webpack_require__(194); - - module.exports = function (str, n) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string as the first argument'); - } - - if (n < 0 || !isFinite(n)) { - throw new TypeError('Expected a finite positive number'); - } + "use strict"; - var ret = ''; + var _index = __webpack_require__(264); - do { - if (n & 1) { - ret += str; - } + var _index2 = _interopRequireDefault(_index); - str += str; - } while (n = n >> 1); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return ret; - }; + (0, _index2.default)("AwaitExpression", { + builder: ["argument"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } + }); + (0, _index2.default)("ForAwaitStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _index.assertNodeType)("Expression") + }, + body: { + validate: (0, _index.assertNodeType)("Statement") + } + } + }); -/***/ }, -/* 194 */ -/***/ function(module, exports, __webpack_require__) { + (0, _index2.default)("BindExpression", { + visitor: ["object", "callee"], + aliases: ["Expression"], + fields: {} + }); - 'use strict'; - var numberIsNan = __webpack_require__(195); + (0, _index2.default)("Decorator", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _index.assertNodeType)("Expression") + } + } + }); - module.exports = Number.isFinite || function (val) { - return !(typeof val !== 'number' || numberIsNan(val) || val === Infinity || val === -Infinity); - }; + (0, _index2.default)("DoExpression", { + visitor: ["body"], + aliases: ["Expression"], + fields: { + body: { + validate: (0, _index.assertNodeType)("BlockStatement") + } + } + }); + (0, _index2.default)("ExportDefaultSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _index.assertNodeType)("Identifier") + } + } + }); -/***/ }, -/* 195 */ -/***/ function(module, exports) { + (0, _index2.default)("ExportNamespaceSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _index.assertNodeType)("Identifier") + } + } + }); - 'use strict'; - module.exports = Number.isNaN || function (x) { - return x !== x; - }; + (0, _index2.default)("RestProperty", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("LVal") + } + } + }); + (0, _index2.default)("SpreadProperty", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } + }); /***/ }, -/* 196 */ +/* 279 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _classCallCheck = __webpack_require__(2)["default"]; - - var _interopRequireDefault = __webpack_require__(42)["default"]; - - var _interopRequireWildcard = __webpack_require__(44)["default"]; - exports.__esModule = true; + exports.isReactComponent = undefined; + exports.isCompatTag = isCompatTag; + exports.buildChildren = buildChildren; - var _binding = __webpack_require__(197); - - var _binding2 = _interopRequireDefault(_binding); + var _index = __webpack_require__(63); - var _babelTypes = __webpack_require__(46); + var t = _interopRequireWildcard(_index); - var t = _interopRequireWildcard(_babelTypes); + 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 renameVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { - var node = _ref.node; + var isReactComponent = exports.isReactComponent = t.buildMatchMemberExpression("React.Component"); - if (node.name === state.oldName) { - node.name = state.newName; - } - }, + function isCompatTag(tagName) { + return !!tagName && /^[a-z]|\-/.test(tagName); + } - Scope: function Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { - path.skip(); - } - }, + function cleanJSXElementLiteralChild(child, args) { + var lines = child.value.split(/\r\n|\n|\r/); - "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) { - var ids = path.getOuterBindingIdentifiers(); + var lastNonEmptyLine = 0; - for (var _name in ids) { - if (_name === state.oldName) ids[_name].name = state.newName; + for (var i = 0; i < lines.length; i++) { + if (lines[i].match(/[^ \t]/)) { + lastNonEmptyLine = i; } } - }; - var Renamer = (function () { - function Renamer(binding /*: Binding*/, oldName /*: string*/, newName /*: string*/) { - _classCallCheck(this, Renamer); + var str = ""; - this.newName = newName; - this.oldName = oldName; - this.binding = binding; - } + for (var _i = 0; _i < lines.length; _i++) { + var line = lines[_i]; - Renamer.prototype.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { - var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath; - if (!exportDeclar) return; + var isFirstLine = _i === 0; + var isLastLine = _i === lines.length - 1; + var isLastNonEmptyLine = _i === lastNonEmptyLine; - // build specifiers that point back to this export declaration - var isDefault = exportDeclar.isExportDefaultDeclaration(); + var trimmedLine = line.replace(/\t/g, " "); - if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) { - // Ensure that default class and function exports have a name so they have a identifier to - // reference from the export specifier list. - parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default"); + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ""); } - var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers(); - var specifiers = []; - - for (var _name2 in bindingIdentifiers) { - var localName = _name2 === this.oldName ? this.newName : _name2; - var exportedName = isDefault ? "default" : _name2; - specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName))); + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ""); } - var aliasDeclar = t.exportNamedDeclaration(null, specifiers); + if (trimmedLine) { + if (!isLastNonEmptyLine) { + trimmedLine += " "; + } - // hoist to the top if it's a function - if (parentDeclar.isFunctionDeclaration()) { - aliasDeclar._blockHoist = 3; + str += trimmedLine; } + } - exportDeclar.insertAfter(aliasDeclar); - exportDeclar.replaceWith(parentDeclar.node); - }; - - Renamer.prototype.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) { - return; // TODO - - // retain the `name` of a class/function declaration - - if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; - if (this.binding.kind !== "hoisted") return; - - path.node.id = t.identifier(this.oldName); - path.node._blockHoist = 3; - - path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.identifier(this.newName), t.toExpression(path.node))])); - }; - - Renamer.prototype.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) { - return; // TODO - - // retain the `name` of a class/function expression - - if (!path.isFunctionExpression() && !path.isClassExpression()) return; - if (this.binding.kind !== "local") return; - - path.node.id = t.identifier(this.oldName); - - this.binding.scope.parent.push({ - id: t.identifier(this.newName) - }); - - path.replaceWith(t.assignmentExpression("=", t.identifier(this.newName), path.node)); - }; - - Renamer.prototype.rename = function rename(block /*:: ?*/) { - var binding = this.binding; - var oldName = this.oldName; - var newName = this.newName; - var scope = binding.scope; - var path = binding.path; - - var parentDeclar = path.find(function (path) { - return path.isDeclaration() || path.isFunctionExpression(); - }); - if (parentDeclar) { - this.maybeConvertFromExportDeclaration(parentDeclar); - } + if (str) args.push(t.stringLiteral(str)); + } - scope.traverse(block || scope.block, renameVisitor, this); + function buildChildren(node) { + var elems = []; - if (!block) { - scope.removeOwnBinding(oldName); - scope.bindings[newName] = binding; - this.binding.identifier.name = newName; - } + for (var i = 0; i < node.children.length; i++) { + var child = node.children[i]; - if (binding.type === "hoisted") { - // https://github.com/babel/babel/issues/2435 - // todo: hoist and convert function to a let + if (t.isJSXText(child)) { + cleanJSXElementLiteralChild(child, elems); + continue; } - if (parentDeclar) { - this.maybeConvertFromClassFunctionDeclaration(parentDeclar); - this.maybeConvertFromClassFunctionExpression(parentDeclar); - } - }; + if (t.isJSXExpressionContainer(child)) child = child.expression; + if (t.isJSXEmptyExpression(child)) continue; - return Renamer; - })(); + elems.push(child); + } - exports["default"] = Renamer; - module.exports = exports["default"]; + return elems; + } /***/ }, -/* 197 */ +/* 280 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; - - var _classCallCheck = __webpack_require__(2)["default"]; + + /** + * Module dependencies. + */ - exports.__esModule = true; + var tty = __webpack_require__(281); + var util = __webpack_require__(282); /** - * This class is responsible for a binding inside of a scope. - * - * It tracks the following: + * This is the Node.js implementation of `debug()`. * - * * Node path. - * * Amount of times referenced by other nodes. - * * Paths to nodes that reassign or modify this binding. - * * The kind of binding. (Is it a parameter, declaration etc) + * Expose `debug()` as the module. */ - /*:: import type NodePath from "../path";*/ - var Binding = (function () { - function Binding(_ref) { - var existing = _ref.existing; - var identifier = _ref.identifier; - var scope = _ref.scope; - var path = _ref.path; - var kind = _ref.kind; + exports = module.exports = __webpack_require__(283); + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; - _classCallCheck(this, Binding); + /** + * Colors. + */ - this.identifier = identifier; - this.scope = scope; - this.path = path; - this.kind = kind; + exports.colors = [6, 2, 3, 4, 5, 1]; - this.constantViolations = []; - this.constant = true; + /** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ - this.referencePaths = []; - this.referenced = false; - this.references = 0; + var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); - this.clearValue(); + /** + * Is stdout a TTY? Colored output is enabled when `true`. + */ - if (existing) { - this.constantViolations = [].concat(existing.path, existing.constantViolations, this.constantViolations); - } + function useColors() { + var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase(); + if (0 === debugColors.length) { + return tty.isatty(fd); + } else { + return '0' !== debugColors + && 'no' !== debugColors + && 'false' !== debugColors + && 'disabled' !== debugColors; } + } - Binding.prototype.deoptValue = function deoptValue() { - this.clearValue(); - this.hasDeoptedValue = true; - }; + /** + * Map %o to `util.inspect()`, since Node doesn't do that out of the box. + */ - Binding.prototype.setValue = function setValue(value /*: any*/) { - if (this.hasDeoptedValue) return; - this.hasValue = true; - this.value = value; - }; + var inspect = (4 === util.inspect.length ? + // node <= 0.8.x + function (v, colors) { + return util.inspect(v, void 0, void 0, colors); + } : + // node > 0.8.x + function (v, colors) { + return util.inspect(v, { colors: colors }); + } + ); - Binding.prototype.clearValue = function clearValue() { - this.hasDeoptedValue = false; - this.hasValue = false; - this.value = null; - }; + exports.formatters.o = function(v) { + return inspect(v, this.useColors) + .replace(/\s*\n\s*/g, ' '); + }; - /** - * Register a constant violation with the provided `path`. - */ + /** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ - Binding.prototype.reassign = function reassign(path /*: Object*/) { - this.constant = false; - this.constantViolations.push(path); - }; + function formatArgs() { + var args = arguments; + var useColors = this.useColors; + var name = this.namespace; - /** - * Increment the amount of references to this binding. - */ + if (useColors) { + var c = this.color; - Binding.prototype.reference = function reference(path /*: NodePath*/) { - this.referenced = true; - this.references++; - this.referencePaths.push(path); - }; + args[0] = ' \u001b[3' + c + ';1m' + name + ' ' + + '\u001b[0m' + + args[0] + '\u001b[3' + c + 'm' + + ' +' + exports.humanize(this.diff) + '\u001b[0m'; + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } + return args; + } - /** - * Decrement the amount of references to this binding. - */ + /** + * Invokes `console.error()` with the specified arguments. + */ - Binding.prototype.dereference = function dereference() { - this.references--; - this.referenced = !!this.references; - }; + function log() { + return stream.write(util.format.apply(this, arguments) + '\n'); + } - return Binding; - })(); + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ - exports["default"] = Binding; - module.exports = exports["default"]; + function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } + } -/***/ }, -/* 198 */ -/***/ function(module, exports, __webpack_require__) { + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ - var assign = __webpack_require__(182), - assignDefaults = __webpack_require__(199), - createDefaults = __webpack_require__(200); + function load() { + return process.env.DEBUG; + } /** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example + * Copied from `node/src/node.js`. * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. */ - var defaults = createDefaults(assign, assignDefaults); - module.exports = defaults; + function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + // Note stream._type is used for test-module-load-list.js -/***/ }, -/* 199 */ -/***/ function(module, exports) { + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; - /** - * Used by `_.defaults` to customize its `_.assign` use. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @returns {*} Returns the value to assign to the destination object. - */ - function assignDefaults(objectValue, sourceValue) { - return objectValue === undefined ? sourceValue : objectValue; - } + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; - module.exports = assignDefaults; + case 'FILE': + var fs = __webpack_require__(285); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + case 'PIPE': + case 'TCP': + var net = __webpack_require__(286); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); -/***/ }, -/* 200 */ -/***/ function(module, exports, __webpack_require__) { + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; - var restParam = __webpack_require__(185); + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; + } /** - * Creates a `_.defaults` or `_.defaultsDeep` function. - * - * @private - * @param {Function} assigner The function to assign values. - * @param {Function} customizer The function to customize assigned values. - * @returns {Function} Returns the new defaults function. + * Enable namespaces listed in `process.env.DEBUG` initially. */ - function createDefaults(assigner, customizer) { - return restParam(function(args) { - var object = args[0]; - if (object == null) { - return object; - } - args.push(customizer); - return assigner.apply(undefined, args); - }); - } - module.exports = createDefaults; + exports.enable(load()); /***/ }, -/* 201 */ -/***/ function(module, exports, __webpack_require__) { - - /* @flow */ - - "use strict"; +/* 281 */ +/***/ function(module, exports) { - var _interopRequireWildcard = __webpack_require__(44)["default"]; + module.exports = require("tty"); - exports.__esModule = true; - exports.get = get; - exports.parseArgs = parseArgs; +/***/ }, +/* 282 */ +/***/ function(module, exports) { - var _util = __webpack_require__(175); + module.exports = require("util"); - var util = _interopRequireWildcard(_util); +/***/ }, +/* 283 */ +/***/ function(module, exports, __webpack_require__) { + /** - * Mapping of messages to be used in Babel. - * Messages can include $0-style placeholders. + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. */ - var MESSAGES = { - tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence", - classesIllegalBareSuper: "Illegal use of bare super", - classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead", - scopeDuplicateDeclaration: "Duplicate declaration $1", - settersNoRest: "Setters aren't allowed to have a rest", - noAssignmentsInForHead: "No assignments allowed in for-in/of head", - expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier", - invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue", - readOnly: "$1 is read-only", - unknownForHead: "Unknown node type $1 in ForStatement", - didYouMean: "Did you mean $1?", - codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.", - missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", - unsupportedOutputType: "Unsupported output type $1", - illegalMethodName: "Illegal method name $1", - lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated", + exports = module.exports = debug; + exports.coerce = coerce; + exports.disable = disable; + exports.enable = enable; + exports.enabled = enabled; + exports.humanize = __webpack_require__(284); - modulesIllegalExportName: "Illegal export $1", - modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes", + /** + * The currently active debug mode names, and names to skip. + */ - undeclaredVariable: "Reference to undeclared variable $1", - undeclaredVariableType: "Referencing a type alias outside of a type annotation", - undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?", + exports.names = []; + exports.skips = []; - traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.", - traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", - traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2", - traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type", + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lowercased letter, i.e. "n". + */ - pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3", - pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3", - pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4", - pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3" - }; + exports.formatters = {}; - exports.MESSAGES = MESSAGES; /** - * Get a message with $0 placeholders replaced by arguments. + * Previously assigned color. */ - function get(key /*: string*/) /*: string*/ { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; + var prevColor = 0; + + /** + * Previous log timestamp. + */ + + var prevTime; + + /** + * Select a color. + * + * @return {Number} + * @api private + */ + + function selectColor() { + return exports.colors[prevColor++ % exports.colors.length]; + } + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function debug(namespace) { + + // define the `disabled` version + function disabled() { } + disabled.enabled = false; - var msg = MESSAGES[key]; - if (!msg) throw new ReferenceError("Unknown message " + JSON.stringify(key)); + // define the `enabled` version + function enabled() { - // stringify args - args = parseArgs(args); + var self = enabled; - // replace $0 placeholders with args - return msg.replace(/\$(\d+)/g, function (str, i) { - return args[i - 1]; - }); + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // add the `color` if not set + if (null == self.useColors) self.useColors = exports.useColors(); + if (null == self.color && self.useColors) self.color = selectColor(); + + var args = Array.prototype.slice.call(arguments); + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %o + args = ['%o'].concat(args); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + if ('function' === typeof exports.formatArgs) { + args = exports.formatArgs.apply(self, args); + } + var logFn = enabled.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + enabled.enabled = true; + + var fn = exports.enabled(namespace) ? enabled : disabled; + + fn.namespace = namespace; + + return fn; } /** - * Stingify arguments to be used inside messages. + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public */ - function parseArgs(args /*: Array*/) /*: Array*/ { - return args.map(function (val) { - if (val != null && val.inspect) { - return val.inspect(); + function enable(namespaces) { + exports.save(namespaces); + + var split = (namespaces || '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { - try { - return JSON.stringify(val) || val + ""; - } catch (e) { - return util.inspect(val); - } + exports.names.push(new RegExp('^' + namespaces + '$')); } - }); + } } -/***/ }, -/* 202 */ -/***/ function(module, exports, __webpack_require__) { + /** + * Disable debug output. + * + * @api public + */ + + function disable() { + exports.enable(''); + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ - module.exports = __webpack_require__(203); + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } /***/ }, -/* 203 */ +/* 284 */ /***/ function(module, exports) { - module.exports = { - "builtin": { - "Array": false, - "ArrayBuffer": false, - "Boolean": false, - "constructor": false, - "DataView": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "Int16Array": false, - "Int32Array": false, - "Int8Array": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Map": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "Promise": false, - "propertyIsEnumerable": false, - "Proxy": false, - "RangeError": false, - "ReferenceError": false, - "Reflect": false, - "RegExp": false, - "Set": false, - "String": false, - "Symbol": false, - "SyntaxError": false, - "System": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "Uint16Array": false, - "Uint32Array": false, - "Uint8Array": false, - "Uint8ClampedArray": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "es5": { - "Array": false, - "Boolean": false, - "constructor": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "propertyIsEnumerable": false, - "RangeError": false, - "ReferenceError": false, - "RegExp": false, - "String": false, - "SyntaxError": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false - }, - "es6": { - "Array": false, - "ArrayBuffer": false, - "Boolean": false, - "constructor": false, - "DataView": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "Int16Array": false, - "Int32Array": false, - "Int8Array": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Map": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "Promise": false, - "propertyIsEnumerable": false, - "Proxy": false, - "RangeError": false, - "ReferenceError": false, - "Reflect": false, - "RegExp": false, - "Set": false, - "String": false, - "Symbol": false, - "SyntaxError": false, - "System": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "Uint16Array": false, - "Uint32Array": false, - "Uint8Array": false, - "Uint8ClampedArray": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "browser": { - "addEventListener": false, - "alert": false, - "AnalyserNode": false, - "AnimationEvent": false, - "applicationCache": false, - "ApplicationCache": false, - "ApplicationCacheErrorEvent": false, - "atob": false, - "Attr": false, - "Audio": false, - "AudioBuffer": false, - "AudioBufferSourceNode": false, - "AudioContext": false, - "AudioDestinationNode": false, - "AudioListener": false, - "AudioNode": false, - "AudioParam": false, - "AudioProcessingEvent": false, - "AutocompleteErrorEvent": false, - "BarProp": false, - "BatteryManager": false, - "BeforeUnloadEvent": false, - "BiquadFilterNode": false, - "Blob": false, - "blur": false, - "btoa": false, - "Cache": false, - "caches": false, - "CacheStorage": false, - "cancelAnimationFrame": false, - "CanvasGradient": false, - "CanvasPattern": false, - "CanvasRenderingContext2D": false, - "CDATASection": false, - "ChannelMergerNode": false, - "ChannelSplitterNode": false, - "CharacterData": false, - "clearInterval": false, - "clearTimeout": false, - "clientInformation": false, - "ClientRect": false, - "ClientRectList": false, - "ClipboardEvent": false, - "close": false, - "closed": false, - "CloseEvent": false, - "Comment": false, - "CompositionEvent": false, - "confirm": false, - "console": false, - "ConvolverNode": false, - "crypto": false, - "Crypto": false, - "CryptoKey": false, - "CSS": false, - "CSSFontFaceRule": false, - "CSSImportRule": false, - "CSSKeyframeRule": false, - "CSSKeyframesRule": false, - "CSSMediaRule": false, - "CSSPageRule": false, - "CSSRule": false, - "CSSRuleList": false, - "CSSStyleDeclaration": false, - "CSSStyleRule": false, - "CSSStyleSheet": false, - "CSSSupportsRule": false, - "CSSUnknownRule": false, - "CSSViewportRule": false, - "CustomEvent": false, - "DataTransfer": false, - "DataTransferItem": false, - "DataTransferItemList": false, - "Debug": false, - "defaultStatus": false, - "defaultstatus": false, - "DelayNode": false, - "DeviceMotionEvent": false, - "DeviceOrientationEvent": false, - "devicePixelRatio": false, - "dispatchEvent": false, - "document": false, - "Document": false, - "DocumentFragment": false, - "DocumentType": false, - "DOMError": false, - "DOMException": false, - "DOMImplementation": false, - "DOMParser": false, - "DOMSettableTokenList": false, - "DOMStringList": false, - "DOMStringMap": false, - "DOMTokenList": false, - "DragEvent": false, - "DynamicsCompressorNode": false, - "Element": false, - "ElementTimeControl": false, - "ErrorEvent": false, - "event": false, - "Event": false, - "EventSource": false, - "EventTarget": false, - "external": false, - "fetch": false, - "File": false, - "FileError": false, - "FileList": false, - "FileReader": false, - "find": false, - "focus": false, - "FocusEvent": false, - "FontFace": false, - "FormData": false, - "frameElement": false, - "frames": false, - "GainNode": false, - "Gamepad": false, - "GamepadButton": false, - "GamepadEvent": false, - "getComputedStyle": false, - "getSelection": false, - "HashChangeEvent": false, - "Headers": false, - "history": false, - "History": false, - "HTMLAllCollection": false, - "HTMLAnchorElement": false, - "HTMLAppletElement": false, - "HTMLAreaElement": false, - "HTMLAudioElement": false, - "HTMLBaseElement": false, - "HTMLBlockquoteElement": false, - "HTMLBodyElement": false, - "HTMLBRElement": false, - "HTMLButtonElement": false, - "HTMLCanvasElement": false, - "HTMLCollection": false, - "HTMLContentElement": false, - "HTMLDataListElement": false, - "HTMLDetailsElement": false, - "HTMLDialogElement": false, - "HTMLDirectoryElement": false, - "HTMLDivElement": false, - "HTMLDListElement": false, - "HTMLDocument": false, - "HTMLElement": false, - "HTMLEmbedElement": false, - "HTMLFieldSetElement": false, - "HTMLFontElement": false, - "HTMLFormControlsCollection": false, - "HTMLFormElement": false, - "HTMLFrameElement": false, - "HTMLFrameSetElement": false, - "HTMLHeadElement": false, - "HTMLHeadingElement": false, - "HTMLHRElement": false, - "HTMLHtmlElement": false, - "HTMLIFrameElement": false, - "HTMLImageElement": false, - "HTMLInputElement": false, - "HTMLIsIndexElement": false, - "HTMLKeygenElement": false, - "HTMLLabelElement": false, - "HTMLLayerElement": false, - "HTMLLegendElement": false, - "HTMLLIElement": false, - "HTMLLinkElement": false, - "HTMLMapElement": false, - "HTMLMarqueeElement": false, - "HTMLMediaElement": false, - "HTMLMenuElement": false, - "HTMLMetaElement": false, - "HTMLMeterElement": false, - "HTMLModElement": false, - "HTMLObjectElement": false, - "HTMLOListElement": false, - "HTMLOptGroupElement": false, - "HTMLOptionElement": false, - "HTMLOptionsCollection": false, - "HTMLOutputElement": false, - "HTMLParagraphElement": false, - "HTMLParamElement": false, - "HTMLPictureElement": false, - "HTMLPreElement": false, - "HTMLProgressElement": false, - "HTMLQuoteElement": false, - "HTMLScriptElement": false, - "HTMLSelectElement": false, - "HTMLShadowElement": false, - "HTMLSourceElement": false, - "HTMLSpanElement": false, - "HTMLStyleElement": false, - "HTMLTableCaptionElement": false, - "HTMLTableCellElement": false, - "HTMLTableColElement": false, - "HTMLTableElement": false, - "HTMLTableRowElement": false, - "HTMLTableSectionElement": false, - "HTMLTemplateElement": false, - "HTMLTextAreaElement": false, - "HTMLTitleElement": false, - "HTMLTrackElement": false, - "HTMLUListElement": false, - "HTMLUnknownElement": false, - "HTMLVideoElement": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBEnvironment": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "Image": false, - "ImageBitmap": false, - "ImageData": false, - "indexedDB": false, - "innerHeight": false, - "innerWidth": false, - "InputEvent": false, - "InputMethodContext": false, - "Intl": false, - "KeyboardEvent": false, - "length": false, - "localStorage": false, - "location": false, - "Location": false, - "locationbar": false, - "matchMedia": false, - "MediaElementAudioSourceNode": false, - "MediaEncryptedEvent": false, - "MediaError": false, - "MediaKeyError": false, - "MediaKeyEvent": false, - "MediaKeyMessageEvent": false, - "MediaKeys": false, - "MediaKeySession": false, - "MediaKeyStatusMap": false, - "MediaKeySystemAccess": false, - "MediaList": false, - "MediaQueryList": false, - "MediaQueryListEvent": false, - "MediaSource": false, - "MediaStreamAudioDestinationNode": false, - "MediaStreamAudioSourceNode": false, - "MediaStreamEvent": false, - "MediaStreamTrack": false, - "menubar": false, - "MessageChannel": false, - "MessageEvent": false, - "MessagePort": false, - "MIDIAccess": false, - "MIDIConnectionEvent": false, - "MIDIInput": false, - "MIDIInputMap": false, - "MIDIMessageEvent": false, - "MIDIOutput": false, - "MIDIOutputMap": false, - "MIDIPort": false, - "MimeType": false, - "MimeTypeArray": false, - "MouseEvent": false, - "moveBy": false, - "moveTo": false, - "MutationEvent": false, - "MutationObserver": false, - "MutationRecord": false, - "name": false, - "NamedNodeMap": false, - "navigator": false, - "Navigator": false, - "Node": false, - "NodeFilter": false, - "NodeIterator": false, - "NodeList": false, - "Notification": false, - "OfflineAudioCompletionEvent": false, - "OfflineAudioContext": false, - "offscreenBuffering": false, - "onbeforeunload": true, - "onblur": true, - "onerror": true, - "onfocus": true, - "onload": true, - "onresize": true, - "onunload": true, - "open": false, - "openDatabase": false, - "opener": false, - "opera": false, - "Option": false, - "OscillatorNode": false, - "outerHeight": false, - "outerWidth": false, - "PageTransitionEvent": false, - "pageXOffset": false, - "pageYOffset": false, - "parent": false, - "Path2D": false, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "PeriodicWave": false, - "Permissions": false, - "PermissionStatus": false, - "personalbar": false, - "Plugin": false, - "PluginArray": false, - "PopStateEvent": false, - "postMessage": false, - "print": false, - "ProcessingInstruction": false, - "ProgressEvent": false, - "prompt": false, - "PushManager": false, - "PushSubscription": false, - "RadioNodeList": false, - "Range": false, - "ReadableByteStream": false, - "ReadableStream": false, - "removeEventListener": false, - "Request": false, - "requestAnimationFrame": false, - "resizeBy": false, - "resizeTo": false, - "Response": false, - "RTCIceCandidate": false, - "RTCSessionDescription": false, - "screen": false, - "Screen": false, - "screenLeft": false, - "ScreenOrientation": false, - "screenTop": false, - "screenX": false, - "screenY": false, - "ScriptProcessorNode": false, - "scroll": false, - "scrollbars": false, - "scrollBy": false, - "scrollTo": false, - "scrollX": false, - "scrollY": false, - "SecurityPolicyViolationEvent": false, - "Selection": false, - "self": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerRegistration": false, - "sessionStorage": false, - "setInterval": false, - "setTimeout": false, - "ShadowRoot": false, - "SharedWorker": false, - "showModalDialog": false, - "speechSynthesis": false, - "SpeechSynthesisEvent": false, - "SpeechSynthesisUtterance": false, - "status": false, - "statusbar": false, - "stop": false, - "Storage": false, - "StorageEvent": false, - "styleMedia": false, - "StyleSheet": false, - "StyleSheetList": false, - "SubtleCrypto": false, - "SVGAElement": false, - "SVGAltGlyphDefElement": false, - "SVGAltGlyphElement": false, - "SVGAltGlyphItemElement": false, - "SVGAngle": false, - "SVGAnimateColorElement": false, - "SVGAnimatedAngle": false, - "SVGAnimatedBoolean": false, - "SVGAnimatedEnumeration": false, - "SVGAnimatedInteger": false, - "SVGAnimatedLength": false, - "SVGAnimatedLengthList": false, - "SVGAnimatedNumber": false, - "SVGAnimatedNumberList": false, - "SVGAnimatedPathData": false, - "SVGAnimatedPoints": false, - "SVGAnimatedPreserveAspectRatio": false, - "SVGAnimatedRect": false, - "SVGAnimatedString": false, - "SVGAnimatedTransformList": false, - "SVGAnimateElement": false, - "SVGAnimateMotionElement": false, - "SVGAnimateTransformElement": false, - "SVGAnimationElement": false, - "SVGCircleElement": false, - "SVGClipPathElement": false, - "SVGColor": false, - "SVGColorProfileElement": false, - "SVGColorProfileRule": false, - "SVGComponentTransferFunctionElement": false, - "SVGCSSRule": false, - "SVGCursorElement": false, - "SVGDefsElement": false, - "SVGDescElement": false, - "SVGDiscardElement": false, - "SVGDocument": false, - "SVGElement": false, - "SVGElementInstance": false, - "SVGElementInstanceList": false, - "SVGEllipseElement": false, - "SVGEvent": false, - "SVGExternalResourcesRequired": false, - "SVGFEBlendElement": false, - "SVGFEColorMatrixElement": false, - "SVGFEComponentTransferElement": false, - "SVGFECompositeElement": false, - "SVGFEConvolveMatrixElement": false, - "SVGFEDiffuseLightingElement": false, - "SVGFEDisplacementMapElement": false, - "SVGFEDistantLightElement": false, - "SVGFEDropShadowElement": false, - "SVGFEFloodElement": false, - "SVGFEFuncAElement": false, - "SVGFEFuncBElement": false, - "SVGFEFuncGElement": false, - "SVGFEFuncRElement": false, - "SVGFEGaussianBlurElement": false, - "SVGFEImageElement": false, - "SVGFEMergeElement": false, - "SVGFEMergeNodeElement": false, - "SVGFEMorphologyElement": false, - "SVGFEOffsetElement": false, - "SVGFEPointLightElement": false, - "SVGFESpecularLightingElement": false, - "SVGFESpotLightElement": false, - "SVGFETileElement": false, - "SVGFETurbulenceElement": false, - "SVGFilterElement": false, - "SVGFilterPrimitiveStandardAttributes": false, - "SVGFitToViewBox": false, - "SVGFontElement": false, - "SVGFontFaceElement": false, - "SVGFontFaceFormatElement": false, - "SVGFontFaceNameElement": false, - "SVGFontFaceSrcElement": false, - "SVGFontFaceUriElement": false, - "SVGForeignObjectElement": false, - "SVGGElement": false, - "SVGGeometryElement": false, - "SVGGlyphElement": false, - "SVGGlyphRefElement": false, - "SVGGradientElement": false, - "SVGGraphicsElement": false, - "SVGHKernElement": false, - "SVGICCColor": false, - "SVGImageElement": false, - "SVGLangSpace": false, - "SVGLength": false, - "SVGLengthList": false, - "SVGLinearGradientElement": false, - "SVGLineElement": false, - "SVGLocatable": false, - "SVGMarkerElement": false, - "SVGMaskElement": false, - "SVGMatrix": false, - "SVGMetadataElement": false, - "SVGMissingGlyphElement": false, - "SVGMPathElement": false, - "SVGNumber": false, - "SVGNumberList": false, - "SVGPaint": false, - "SVGPathElement": false, - "SVGPathSeg": false, - "SVGPathSegArcAbs": false, - "SVGPathSegArcRel": false, - "SVGPathSegClosePath": false, - "SVGPathSegCurvetoCubicAbs": false, - "SVGPathSegCurvetoCubicRel": false, - "SVGPathSegCurvetoCubicSmoothAbs": false, - "SVGPathSegCurvetoCubicSmoothRel": false, - "SVGPathSegCurvetoQuadraticAbs": false, - "SVGPathSegCurvetoQuadraticRel": false, - "SVGPathSegCurvetoQuadraticSmoothAbs": false, - "SVGPathSegCurvetoQuadraticSmoothRel": false, - "SVGPathSegLinetoAbs": false, - "SVGPathSegLinetoHorizontalAbs": false, - "SVGPathSegLinetoHorizontalRel": false, - "SVGPathSegLinetoRel": false, - "SVGPathSegLinetoVerticalAbs": false, - "SVGPathSegLinetoVerticalRel": false, - "SVGPathSegList": false, - "SVGPathSegMovetoAbs": false, - "SVGPathSegMovetoRel": false, - "SVGPatternElement": false, - "SVGPoint": false, - "SVGPointList": false, - "SVGPolygonElement": false, - "SVGPolylineElement": false, - "SVGPreserveAspectRatio": false, - "SVGRadialGradientElement": false, - "SVGRect": false, - "SVGRectElement": false, - "SVGRenderingIntent": false, - "SVGScriptElement": false, - "SVGSetElement": false, - "SVGStopElement": false, - "SVGStringList": false, - "SVGStylable": false, - "SVGStyleElement": false, - "SVGSVGElement": false, - "SVGSwitchElement": false, - "SVGSymbolElement": false, - "SVGTests": false, - "SVGTextContentElement": false, - "SVGTextElement": false, - "SVGTextPathElement": false, - "SVGTextPositioningElement": false, - "SVGTitleElement": false, - "SVGTransform": false, - "SVGTransformable": false, - "SVGTransformList": false, - "SVGTRefElement": false, - "SVGTSpanElement": false, - "SVGUnitTypes": false, - "SVGURIReference": false, - "SVGUseElement": false, - "SVGViewElement": false, - "SVGViewSpec": false, - "SVGVKernElement": false, - "SVGZoomAndPan": false, - "SVGZoomEvent": false, - "Text": false, - "TextDecoder": false, - "TextEncoder": false, - "TextEvent": false, - "TextMetrics": false, - "TextTrack": false, - "TextTrackCue": false, - "TextTrackCueList": false, - "TextTrackList": false, - "TimeEvent": false, - "TimeRanges": false, - "toolbar": false, - "top": false, - "Touch": false, - "TouchEvent": false, - "TouchList": false, - "TrackEvent": false, - "TransitionEvent": false, - "TreeWalker": false, - "UIEvent": false, - "URL": false, - "ValidityState": false, - "VTTCue": false, - "WaveShaperNode": false, - "WebGLActiveInfo": false, - "WebGLBuffer": false, - "WebGLContextEvent": false, - "WebGLFramebuffer": false, - "WebGLProgram": false, - "WebGLRenderbuffer": false, - "WebGLRenderingContext": false, - "WebGLShader": false, - "WebGLShaderPrecisionFormat": false, - "WebGLTexture": false, - "WebGLUniformLocation": false, - "WebSocket": false, - "WheelEvent": false, - "window": false, - "Window": false, - "Worker": false, - "XDomainRequest": false, - "XMLDocument": false, - "XMLHttpRequest": false, - "XMLHttpRequestEventTarget": false, - "XMLHttpRequestProgressEvent": false, - "XMLHttpRequestUpload": false, - "XMLSerializer": false, - "XPathEvaluator": false, - "XPathException": false, - "XPathExpression": false, - "XPathNamespace": false, - "XPathNSResolver": false, - "XPathResult": false, - "XSLTProcessor": false - }, - "worker": { - "applicationCache": false, - "atob": false, - "Blob": false, - "BroadcastChannel": false, - "btoa": false, - "Cache": false, - "caches": false, - "clearInterval": false, - "clearTimeout": false, - "close": true, - "console": false, - "fetch": false, - "FileReaderSync": false, - "FormData": false, - "Headers": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "ImageData": false, - "importScripts": true, - "indexedDB": false, - "location": false, - "MessageChannel": false, - "MessagePort": false, - "name": false, - "navigator": false, - "Notification": false, - "onclose": true, - "onconnect": true, - "onerror": true, - "onlanguagechange": true, - "onmessage": true, - "onoffline": true, - "ononline": true, - "onrejectionhandled": true, - "onunhandledrejection": true, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "postMessage": true, - "Promise": false, - "Request": false, - "Response": false, - "self": true, - "ServiceWorkerRegistration": false, - "setInterval": false, - "setTimeout": false, - "TextDecoder": false, - "TextEncoder": false, - "URL": false, - "WebSocket": false, - "Worker": false, - "XMLHttpRequest": false - }, - "node": { - "__dirname": false, - "__filename": false, - "arguments": false, - "Buffer": false, - "clearImmediate": false, - "clearInterval": false, - "clearTimeout": false, - "console": false, - "exports": true, - "GLOBAL": false, - "global": false, - "module": false, - "process": false, - "require": false, - "root": false, - "setImmediate": false, - "setInterval": false, - "setTimeout": false - }, - "commonjs": { - "exports": true, - "module": false, - "require": false, - "global": false - }, - "amd": { - "define": false, - "require": false - }, - "mocha": { - "after": false, - "afterEach": false, - "before": false, - "beforeEach": false, - "context": false, - "describe": false, - "it": false, - "mocha": false, - "setup": false, - "specify": false, - "suite": false, - "suiteSetup": false, - "suiteTeardown": false, - "teardown": false, - "test": false, - "xcontext": false, - "xdescribe": false, - "xit": false, - "xspecify": false - }, - "jasmine": { - "afterAll": false, - "afterEach": false, - "beforeAll": false, - "beforeEach": false, - "describe": false, - "expect": false, - "fail": false, - "fdescribe": false, - "fit": false, - "it": false, - "jasmine": false, - "pending": false, - "runs": false, - "spyOn": false, - "waits": false, - "waitsFor": false, - "xdescribe": false, - "xit": false - }, - "jest": { - "afterEach": false, - "beforeEach": false, - "describe": false, - "expect": false, - "it": false, - "jest": false, - "pit": false, - "require": false, - "xdescribe": false, - "xit": false - }, - "qunit": { - "asyncTest": false, - "deepEqual": false, - "equal": false, - "expect": false, - "module": false, - "notDeepEqual": false, - "notEqual": false, - "notOk": false, - "notPropEqual": false, - "notStrictEqual": false, - "ok": false, - "propEqual": false, - "QUnit": false, - "raises": false, - "start": false, - "stop": false, - "strictEqual": false, - "test": false, - "throws": false - }, - "phantomjs": { - "console": true, - "exports": true, - "phantom": true, - "require": true, - "WebPage": true - }, - "couch": { - "emit": false, - "exports": false, - "getRow": false, - "log": false, - "module": false, - "provides": false, - "require": false, - "respond": false, - "send": false, - "start": false, - "sum": false - }, - "rhino": { - "defineClass": false, - "deserialize": false, - "gc": false, - "help": false, - "importClass": false, - "importPackage": false, - "java": false, - "load": false, - "loadClass": false, - "Packages": false, - "print": false, - "quit": false, - "readFile": false, - "readUrl": false, - "runCommand": false, - "seal": false, - "serialize": false, - "spawn": false, - "sync": false, - "toint32": false, - "version": false - }, - "nashorn": { - "__DIR__": false, - "__FILE__": false, - "__LINE__": false, - "com": false, - "edu": false, - "exit": false, - "Java": false, - "java": false, - "javafx": false, - "JavaImporter": false, - "javax": false, - "JSAdapter": false, - "load": false, - "loadWithNewGlobal": false, - "org": false, - "Packages": false, - "print": false, - "quit": false - }, - "wsh": { - "ActiveXObject": true, - "Enumerator": true, - "GetObject": true, - "ScriptEngine": true, - "ScriptEngineBuildVersion": true, - "ScriptEngineMajorVersion": true, - "ScriptEngineMinorVersion": true, - "VBArray": true, - "WScript": true, - "WSH": true, - "XDomainRequest": true - }, - "jquery": { - "$": false, - "jQuery": false - }, - "yui": { - "Y": false, - "YUI": false, - "YUI_config": false - }, - "shelljs": { - "cat": false, - "cd": false, - "chmod": false, - "config": false, - "cp": false, - "dirs": false, - "echo": false, - "env": false, - "error": false, - "exec": false, - "exit": false, - "find": false, - "grep": false, - "ls": false, - "ln": false, - "mkdir": false, - "mv": false, - "popd": false, - "pushd": false, - "pwd": false, - "rm": false, - "sed": false, - "target": false, - "tempdir": false, - "test": false, - "which": false - }, - "prototypejs": { - "$": false, - "$$": false, - "$A": false, - "$break": false, - "$continue": false, - "$F": false, - "$H": false, - "$R": false, - "$w": false, - "Abstract": false, - "Ajax": false, - "Autocompleter": false, - "Builder": false, - "Class": false, - "Control": false, - "Draggable": false, - "Draggables": false, - "Droppables": false, - "Effect": false, - "Element": false, - "Enumerable": false, - "Event": false, - "Field": false, - "Form": false, - "Hash": false, - "Insertion": false, - "ObjectRange": false, - "PeriodicalExecuter": false, - "Position": false, - "Prototype": false, - "Scriptaculous": false, - "Selector": false, - "Sortable": false, - "SortableObserver": false, - "Sound": false, - "Template": false, - "Toggle": false, - "Try": false - }, - "meteor": { - "$": false, - "_": false, - "Accounts": false, - "App": false, - "Assets": false, - "Blaze": false, - "check": false, - "Cordova": false, - "DDP": false, - "DDPServer": false, - "Deps": false, - "EJSON": false, - "Email": false, - "HTTP": false, - "Log": false, - "Match": false, - "Meteor": false, - "Mongo": false, - "MongoInternals": false, - "Npm": false, - "Package": false, - "Plugin": false, - "process": false, - "Random": false, - "ReactiveDict": false, - "ReactiveVar": false, - "Router": false, - "Session": false, - "share": false, - "Spacebars": false, - "Template": false, - "Tinytest": false, - "Tracker": false, - "UI": false, - "Utils": false, - "WebApp": false, - "WebAppInternals": false - }, - "mongo": { - "_isWindows": false, - "_rand": false, - "BulkWriteResult": false, - "cat": false, - "cd": false, - "connect": false, - "db": false, - "getHostName": false, - "getMemInfo": false, - "hostname": false, - "listFiles": false, - "load": false, - "ls": false, - "md5sumFile": false, - "mkdir": false, - "Mongo": false, - "ObjectId": false, - "PlanCache": false, - "print": false, - "printjson": false, - "pwd": false, - "quit": false, - "removeFile": false, - "rs": false, - "sh": false, - "UUID": false, - "version": false, - "WriteResult": false - }, - "applescript": { - "$": false, - "Application": false, - "Automation": false, - "console": false, - "delay": false, - "Library": false, - "ObjC": false, - "ObjectSpecifier": false, - "Path": false, - "Progress": false, - "Ref": false - }, - "serviceworker": { - "caches": false, - "Cache": false, - "CacheStorage": false, - "Client": false, - "clients": false, - "Clients": false, - "ExtendableEvent": false, - "ExtendableMessageEvent": false, - "FetchEvent": false, - "importScripts": false, - "registration": false, - "self": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerGlobalScope": false, - "ServiceWorkerMessageEvent": false, - "ServiceWorkerRegistration": false, - "skipWaiting": false, - "WindowClient": false - }, - "atomtest": { - "advanceClock": false, - "fakeClearInterval": false, - "fakeClearTimeout": false, - "fakeSetInterval": false, - "fakeSetTimeout": false, - "resetTimeouts": false, - "waitsForPromise": false - }, - "embertest": { - "andThen": false, - "click": false, - "currentPath": false, - "currentRouteName": false, - "currentURL": false, - "fillIn": false, - "find": false, - "findWithAssert": false, - "keyEvent": false, - "pauseTest": false, - "triggerEvent": false, - "visit": false - }, - "protractor": { - "$": false, - "$$": false, - "browser": false, - "By": false, - "by": false, - "DartObject": false, - "element": false, - "protractor": false - }, - "shared-node-browser": { - "clearInterval": false, - "clearTimeout": false, - "console": false, - "setInterval": false, - "setTimeout": false - }, - "webextensions": { - "browser": false, - "chrome": false, - "opr": false - }, - "greasemonkey": { - "GM_addStyle": false, - "GM_deleteValue": false, - "GM_getResourceText": false, - "GM_getResourceURL": false, - "GM_getValue": false, - "GM_info": false, - "GM_listValues": false, - "GM_log": false, - "GM_openInTab": false, - "GM_registerMenuCommand": false, - "GM_setClipboard": false, - "GM_setValue": false, - "GM_xmlhttpRequest": false, - "unsafeWindow": false - } + /** + * Helpers. + */ + + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var y = d * 365.25; + + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} options + * @return {String|Number} + * @api public + */ + + module.exports = function(val, options){ + options = options || {}; + if ('string' == typeof val) return parse(val); + return options.long + ? long(val) + : short(val); + }; + + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = '' + str; + if (str.length > 10000) return; + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); + if (!match) return; + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + } + } + + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function short(ms) { + if (ms >= d) return Math.round(ms / d) + 'd'; + if (ms >= h) return Math.round(ms / h) + 'h'; + if (ms >= m) return Math.round(ms / m) + 'm'; + if (ms >= s) return Math.round(ms / s) + 's'; + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function long(ms) { + return plural(ms, d, 'day') + || plural(ms, h, 'hour') + || plural(ms, m, 'minute') + || plural(ms, s, 'second') + || ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural(ms, n, name) { + if (ms < n) return; + if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; + return Math.ceil(ms / n) + ' ' + name + 's'; + } + + +/***/ }, +/* 285 */ +/***/ function(module, exports) { + + module.exports = require("fs"); + +/***/ }, +/* 286 */ +/***/ function(module, exports) { + + module.exports = require("net"); + +/***/ }, +/* 287 */ +/***/ function(module, exports) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var NODE_ENV = process.env.NODE_ENV; + + var invariant = function(condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } }; + module.exports = invariant; + + /***/ }, -/* 204 */ +/* 288 */ /***/ function(module, exports, __webpack_require__) { - // This file contains that retrieve or validate anything related to the current paths ancestry. + var assignValue = __webpack_require__(158), + copyObject = __webpack_require__(162), + createAssigner = __webpack_require__(289), + isArrayLike = __webpack_require__(177), + isPrototype = __webpack_require__(175), + keys = __webpack_require__(163); - "use strict"; + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); - var _getIterator = __webpack_require__(3)["default"]; + module.exports = assign; - var _interopRequireWildcard = __webpack_require__(44)["default"]; - var _interopRequireDefault = __webpack_require__(42)["default"]; +/***/ }, +/* 289 */ +/***/ function(module, exports, __webpack_require__) { - exports.__esModule = true; - exports.findParent = findParent; - exports.find = find; - exports.getFunctionParent = getFunctionParent; - exports.getStatementParent = getStatementParent; - exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; - exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; - exports.getAncestry = getAncestry; - exports.inType = inType; - exports.inShadow = inShadow; + var baseRest = __webpack_require__(290), + isIterateeCall = __webpack_require__(297); - var _babelTypes = __webpack_require__(46); + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; - var t = _interopRequireWildcard(_babelTypes); + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + module.exports = createAssigner; - var _index = __webpack_require__(171); - var _index2 = _interopRequireDefault(_index); +/***/ }, +/* 290 */ +/***/ function(module, exports, __webpack_require__) { + + var identity = __webpack_require__(249), + overRest = __webpack_require__(291), + setToString = __webpack_require__(293); + + /** + * 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) { + return setToString(overRest(func, start, identity), func + ''); + } + + module.exports = baseRest; + + +/***/ }, +/* 291 */ +/***/ function(module, exports, __webpack_require__) { + + var apply = __webpack_require__(292); + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; /** - * Call the provided `callback` with the `NodePath`s of all the parents. - * When the `callback` returns a truthy value, we return that node path. + * A specialized version of `baseRest` which transforms the rest array. + * + * @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. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ + function overRest(func, start, transform) { + 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); - function findParent(callback) { - var path = this; - while (path = path.parentPath) { - if (callback(path)) return path; - } - return null; + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; } + module.exports = overRest; + + +/***/ }, +/* 292 */ +/***/ function(module, exports) { + /** - * Description + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. */ - - function find(callback) { - var path = this; - do { - if (callback(path)) return path; - } while (path = path.parentPath); - return null; + function apply(func, thisArg, args) { + 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]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); } + module.exports = apply; + + +/***/ }, +/* 293 */ +/***/ function(module, exports, __webpack_require__) { + + var baseSetToString = __webpack_require__(294), + shortOut = __webpack_require__(296); + /** - * Get the parent function of the current path. + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ + var setToString = shortOut(baseSetToString); - function getFunctionParent() { - return this.findParent(function (path) { - return path.isFunction() || path.isProgram(); - }); - } + module.exports = setToString; + + +/***/ }, +/* 294 */ +/***/ function(module, exports, __webpack_require__) { + + var constant = __webpack_require__(295), + defineProperty = __webpack_require__(160), + identity = __webpack_require__(249); /** - * Walk up the tree until we hit a parent node path in a list. + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + module.exports = baseSetToString; - function getStatementParent() { - var path = this; - do { - if (Array.isArray(path.container)) { - return path; - } - } while (path = path.parentPath); - } + +/***/ }, +/* 295 */ +/***/ function(module, exports) { /** - * Get the deepest common ancestor and then from it, get the earliest relationship path - * to that ancestor. + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * Earliest is defined as being "before" all the other nodes in terms of list container - * position and visiting key. + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true */ + function constant(value) { + return function() { + return value; + }; + } - function getEarliestCommonAncestorFrom(paths /*: Array*/) /*: NodePath*/ { - return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { - var earliest = undefined; - var keys = t.VISITOR_KEYS[deepest.type]; + module.exports = constant; - for (var _iterator = (ancestries /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } +/***/ }, +/* 296 */ +/***/ function(module, exports) { - var ancestry = _ref; + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 500, + HOT_SPAN = 16; - var path = ancestry[i + 1]; + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeNow = Date.now; - // first path - if (!earliest) { - earliest = path; - continue; - } + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; - // handle containers - if (path.listKey && earliest.listKey === path.listKey) { - // we're in the same container so check if we're earlier - if (path.key < earliest.key) { - earliest = path; - continue; - } - } + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); - // handle keys - var earliestKeyIndex = keys.indexOf(earliest.parentKey); - var currentKeyIndex = keys.indexOf(path.parentKey); - if (earliestKeyIndex > currentKeyIndex) { - // key appears before so it's earlier - earliest = path; + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; } + } else { + count = 0; } - - return earliest; - }); + return func.apply(undefined, arguments); + }; } - /** - * Get the earliest path in the tree where the provided `paths` intersect. - * - * TODO: Possible optimisation target. - */ + module.exports = shortOut; - function getDeepestCommonAncestorFrom(paths /*: Array*/, filter /*:: ?: Function*/) /*: NodePath*/ { - // istanbul ignore next - var _this = this; +/***/ }, +/* 297 */ +/***/ function(module, exports, __webpack_require__) { - if (!paths.length) { - return this; - } + var eq = __webpack_require__(124), + isArrayLike = __webpack_require__(177), + isIndex = __webpack_require__(170), + isObject = __webpack_require__(107); - if (paths.length === 1) { - return paths[0]; + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); } + return false; + } - // minimum depth of the tree so we know the highest node - var minDepth = Infinity; + module.exports = isIterateeCall; - // last common ancestor - var lastCommonIndex = undefined, - lastCommon = undefined; - // get the ancestors of the path, breaking when the parent exceeds ourselves - var ancestries = paths.map(function (path) { - var ancestry = []; +/***/ }, +/* 298 */ +/***/ function(module, exports, __webpack_require__) { - do { - ancestry.unshift(path); - } while ((path = path.parentPath) && path !== _this); + "use strict"; - // save min depth to avoid going too far in - if (ancestry.length < minDepth) { - minDepth = ancestry.length; - } + exports.__esModule = true; - return ancestry; - }); + var _keys = __webpack_require__(78); - // get the first ancestry so we have a seed to assess all other ancestries with - var first = ancestries[0]; + var _keys2 = _interopRequireDefault(_keys); - // check ancestor equality - depthLoop: for (var i = 0; i < minDepth; i++) { - var shouldMatch = first[i]; + var _create = __webpack_require__(88); - for (var _iterator2 = (ancestries /*: Array*/), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + var _create2 = _interopRequireDefault(_create); - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } + var _map = __webpack_require__(299); - var ancestry = _ref2; + var _map2 = _interopRequireDefault(_map); - if (ancestry[i] !== shouldMatch) { - // we've hit a snag - break depthLoop; - } - } + var _classCallCheck2 = __webpack_require__(58); - // next iteration may break so store these so they can be returned - lastCommonIndex = i; - lastCommon = shouldMatch; - } + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - if (lastCommon) { - if (filter) { - return filter(lastCommon, lastCommonIndex, ancestries); - } else { - return lastCommon; - } - } else { - throw new Error("Couldn't find intersection"); - } - } + var _getIterator2 = __webpack_require__(3); - /** - * Build an array of node paths containing the entire ancestry of the current node path. - * - * NOTE: The current node path is included in this. - */ + var _getIterator3 = _interopRequireDefault(_getIterator2); - function getAncestry() { - var path = this; - var paths = []; - do { - paths.push(path); - } while (path = path.parentPath); - return paths; - } + var _includes = __webpack_require__(316); - function inType() { - var path = this; - while (path) { - for (var _iterator3 = (arguments /*: Array*/), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; + var _includes2 = _interopRequireDefault(_includes); - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } + var _repeat = __webpack_require__(322); - var type = _ref3; + var _repeat2 = _interopRequireDefault(_repeat); - if (path.node.type === type) return true; - } - path = path.parentPath; - } + var _renamer = __webpack_require__(324); - return false; - } + var _renamer2 = _interopRequireDefault(_renamer); - /** - * Check if we're inside a shadowed function. - */ + var _index = __webpack_require__(60); - function inShadow(key /*:: ?*/) { - var path = this; - do { - if (path.isFunction()) { - var shadow = path.node.shadow; - if (shadow) { - // this is because sometimes we may have a `shadow` value of: - // - // { this: false } - // - // we need to catch this case if `inShadow` has been passed a `key` - if (!key || shadow[key] !== false) { - return path; - } - } else if (path.isArrowFunctionExpression()) { - return path; - } + var _index2 = _interopRequireDefault(_index); - // normal function, we've found our function context - return null; - } - } while (path = path.parentPath); - return null; - } + var _defaults = __webpack_require__(326); -/***/ }, -/* 205 */ -/***/ function(module, exports, __webpack_require__) { + var _defaults2 = _interopRequireDefault(_defaults); - "use strict"; + var _babelMessages = __webpack_require__(332); - var _getIterator = __webpack_require__(3)["default"]; + var messages = _interopRequireWildcard(_babelMessages); - var _interopRequireWildcard = __webpack_require__(44)["default"]; + var _binding2 = __webpack_require__(325); - exports.__esModule = true; - exports.getTypeAnnotation = getTypeAnnotation; - exports._getTypeAnnotation = _getTypeAnnotation; - exports.isBaseType = isBaseType; - exports.couldBeBaseType = couldBeBaseType; - exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; - exports.isGenericType = isGenericType; + var _binding3 = _interopRequireDefault(_binding2); - var _inferers = __webpack_require__(206); + var _globals = __webpack_require__(333); - var inferers = _interopRequireWildcard(_inferers); + var _globals2 = _interopRequireDefault(_globals); - var _babelTypes = __webpack_require__(46); + var _babelTypes = __webpack_require__(63); var t = _interopRequireWildcard(_babelTypes); - /** - * Infer the type of the current `NodePath`. - */ - - /*:: import type NodePath from "./index";*/ - function getTypeAnnotation() /*: Object*/ { - if (this.typeAnnotation) return this.typeAnnotation; - - var type = this._getTypeAnnotation() || t.anyTypeAnnotation(); - if (t.isTypeAnnotation(type)) type = type.typeAnnotation; - return this.typeAnnotation = type; - } + var _cache = __webpack_require__(335); - /** - * todo: split up this method - */ + 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; } } - function _getTypeAnnotation() /*: ?Object*/ { - var node = this.node; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (!node) { - // handle initializerless variables, add in checks for loop initializers too - if (this.key === "init" && this.parentPath.isVariableDeclarator()) { - var declar = this.parentPath.parentPath; - var declarParent = declar.parentPath; + var _crawlCallsCount = 0; - // for (let NODE in bar) {} - if (declar.key === "left" && declarParent.isForInStatement()) { - return t.stringTypeAnnotation(); - } + function getCache(path, parentScope, self) { + var scopes = _cache.scope.get(path.node) || []; - // for (let NODE of bar) {} - if (declar.key === "left" && declarParent.isForOfStatement()) { - return t.anyTypeAnnotation(); - } + for (var _iterator = scopes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; - return t.voidTypeAnnotation(); + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; } else { - return; + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; } - } - - if (node.typeAnnotation) { - return node.typeAnnotation; - } - var inferer = inferers[node.type]; - if (inferer) { - return inferer.call(this, node); - } + var scope = _ref; - inferer = inferers[this.parentPath.type]; - if (inferer && inferer.validParent) { - return this.parentPath.getTypeAnnotation(); + if (scope.parent === parentScope && scope.path === path) return scope; } - } - function isBaseType(baseName /*: string*/, soft /*:: ?: boolean*/) /*: boolean*/ { - return _isBaseType(baseName, this.getTypeAnnotation(), soft); - } + scopes.push(self); - function _isBaseType(baseName /*: string*/, type, /*:: ?*/soft /*:: ?*/) /*: boolean*/ { - if (baseName === "string") { - return t.isStringTypeAnnotation(type); - } else if (baseName === "number") { - return t.isNumberTypeAnnotation(type); - } else if (baseName === "boolean") { - return t.isBooleanTypeAnnotation(type); - } else if (baseName === "any") { - return t.isAnyTypeAnnotation(type); - } else if (baseName === "mixed") { - return t.isMixedTypeAnnotation(type); - } else if (baseName === "void") { - return t.isVoidTypeAnnotation(type); - } else { - if (soft) { - return false; - } else { - throw new Error("Unknown base type " + baseName); - } + if (!_cache.scope.has(path.node)) { + _cache.scope.set(path.node, scopes); } } - function couldBeBaseType(name /*: string*/) /*: boolean*/ { - var type = this.getTypeAnnotation(); - if (t.isAnyTypeAnnotation(type)) return true; - - if (t.isUnionTypeAnnotation(type)) { - for (var _iterator = (type.types /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + var collectorVisitor = { + For: function For(path) { + for (var _iterator2 = t.FOR_INIT_KEYS, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; } - var type2 = _ref; + var key = _ref2; - if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { - return true; - } + var declar = path.get(key); + if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar); } - return false; - } else { - return _isBaseType(name, type, true); - } - } + }, + Declaration: function Declaration(path) { + if (path.isBlockScoped()) return; - function baseTypeStrictlyMatches(right /*: NodePath*/) { - var left = this.getTypeAnnotation(); - right = right.getTypeAnnotation(); + if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) return; - if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) { - return right.type === left.type; - } - } + path.scope.getFunctionParent().registerDeclaration(path); + }, + ReferencedIdentifier: function ReferencedIdentifier(path, state) { + state.references.push(path); + }, + ForXStatement: function ForXStatement(path, state) { + var left = path.get("left"); + if (left.isPattern() || left.isIdentifier()) { + state.constantViolations.push(left); + } + }, - function isGenericType(genericName /*: string*/) /*: boolean*/ { - var type = this.getTypeAnnotation(); - return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, { name: genericName }); - } -/***/ }, -/* 206 */ -/***/ function(module, exports, __webpack_require__) { + ExportDeclaration: { + exit: function exit(path) { + var node = path.node; + var scope = path.scope; - "use strict"; + var declar = node.declaration; + if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) { + var _id = declar.id; + if (!_id) return; - var _interopRequireWildcard = __webpack_require__(44)["default"]; + var binding = scope.getBinding(_id.name); + if (binding) binding.reference(path); + } else if (t.isVariableDeclaration(declar)) { + for (var _iterator3 = declar.declarations, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; - var _interopRequire = __webpack_require__(169)["default"]; + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } - exports.__esModule = true; - exports.VariableDeclarator = VariableDeclarator; - exports.TypeCastExpression = TypeCastExpression; - exports.NewExpression = NewExpression; - exports.TemplateLiteral = TemplateLiteral; - exports.UnaryExpression = UnaryExpression; - exports.BinaryExpression = BinaryExpression; - exports.LogicalExpression = LogicalExpression; - exports.ConditionalExpression = ConditionalExpression; - exports.SequenceExpression = SequenceExpression; - exports.AssignmentExpression = AssignmentExpression; - exports.UpdateExpression = UpdateExpression; - exports.StringLiteral = StringLiteral; - exports.NumericLiteral = NumericLiteral; - exports.BooleanLiteral = BooleanLiteral; - exports.NullLiteral = NullLiteral; - exports.RegExpLiteral = RegExpLiteral; - exports.ObjectExpression = ObjectExpression; - exports.ArrayExpression = ArrayExpression; - exports.RestElement = RestElement; - exports.CallExpression = CallExpression; - exports.TaggedTemplateExpression = TaggedTemplateExpression; + var decl = _ref3; - var _babelTypes = __webpack_require__(46); + var ids = t.getBindingIdentifiers(decl); + for (var name in ids) { + var _binding = scope.getBinding(name); + if (_binding) _binding.reference(path); + } + } + } + } + }, - var t = _interopRequireWildcard(_babelTypes); + LabeledStatement: function LabeledStatement(path) { + path.scope.getProgramParent().addGlobal(path.node); + path.scope.getBlockParent().registerDeclaration(path); + }, + AssignmentExpression: function AssignmentExpression(path, state) { + state.assignments.push(path); + }, + UpdateExpression: function UpdateExpression(path, state) { + state.constantViolations.push(path.get("argument")); + }, + UnaryExpression: function UnaryExpression(path, state) { + if (path.node.operator === "delete") { + state.constantViolations.push(path.get("argument")); + } + }, + BlockScoped: function BlockScoped(path) { + var scope = path.scope; + if (scope.path === path) scope = scope.parent; + scope.getBlockParent().registerDeclaration(path); + }, + ClassDeclaration: function ClassDeclaration(path) { + var id = path.node.id; + if (!id) return; - var _infererReference = __webpack_require__(207); + var name = id.name; + path.scope.bindings[name] = path.scope.getBinding(name); + }, + Block: function Block(path) { + var paths = path.get("body"); + for (var _iterator4 = paths, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref4; - exports.Identifier = _interopRequire(_infererReference); + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } - function VariableDeclarator() { - var id = this.get("id"); + var bodyPath = _ref4; - if (id.isIdentifier()) { - return this.get("init").getTypeAnnotation(); - } else { - return; + if (bodyPath.isFunctionDeclaration()) { + path.scope.getBlockParent().registerDeclaration(bodyPath); + } + } } - } + }; - function TypeCastExpression(node) { - return node.typeAnnotation; - } + var uid = 0; - TypeCastExpression.validParent = true; + var Scope = function () { + function Scope(path, parentScope) { + (0, _classCallCheck3.default)(this, Scope); - function NewExpression(node) { - if (this.get("callee").isIdentifier()) { - // only resolve identifier callee - return t.genericTypeAnnotation(node.callee); - } - } + if (parentScope && parentScope.block === path.node) { + return parentScope; + } - function TemplateLiteral() { - return t.stringTypeAnnotation(); - } + var cached = getCache(path, parentScope, this); + if (cached) return cached; - function UnaryExpression(node) { - var operator = node.operator; + this.uid = uid++; + this.parent = parentScope; + this.hub = path.hub; - if (operator === "void") { - return t.voidTypeAnnotation(); - } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.stringTypeAnnotation(); - } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.booleanTypeAnnotation(); + this.parentBlock = path.parent; + this.block = path.node; + this.path = path; + + this.labels = new _map2.default(); } - } - function BinaryExpression(node) { - var operator = node.operator; + Scope.prototype.traverse = function traverse(node, opts, state) { + (0, _index2.default)(node, opts, this, state, this.path); + }; - if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.booleanTypeAnnotation(); - } else if (operator === "+") { - var right = this.get("right"); - var left = this.get("left"); + Scope.prototype.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - if (left.isBaseType("number") && right.isBaseType("number")) { - // both numbers so this will be a number - return t.numberTypeAnnotation(); - } else if (left.isBaseType("string") || right.isBaseType("string")) { - // one is a string so the result will be a string - return t.stringTypeAnnotation(); - } + var id = this.generateUidIdentifier(name); + this.push({ id: id }); + return id; + }; - // unsure if left and right are strings or numbers so stay on the safe side - return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]); - } - } + Scope.prototype.generateUidIdentifier = function generateUidIdentifier() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - function LogicalExpression() { - return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]); - } + return t.identifier(this.generateUid(name)); + }; - function ConditionalExpression() { - return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]); - } + Scope.prototype.generateUid = function generateUid() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - function SequenceExpression() { - return this.get("expressions").pop().getTypeAnnotation(); - } + name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); - function AssignmentExpression() { - return this.get("right").getTypeAnnotation(); - } + var uid = void 0; + var i = 0; + do { + uid = this._generateUid(name, i); + i++; + } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); - function UpdateExpression(node) { - var operator = node.operator; - if (operator === "++" || operator === "--") { - return t.numberTypeAnnotation(); - } - } + var program = this.getProgramParent(); + program.references[uid] = true; + program.uids[uid] = true; - function StringLiteral() { - return t.stringTypeAnnotation(); - } + return uid; + }; - function NumericLiteral() { - return t.numberTypeAnnotation(); - } + Scope.prototype._generateUid = function _generateUid(name, i) { + var id = name; + if (i > 1) id += i; + return "_" + id; + }; - function BooleanLiteral() { - return t.booleanTypeAnnotation(); - } + Scope.prototype.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) { + var node = parent; - function NullLiteral() { - return t.nullLiteralTypeAnnotation(); - } + if (t.isAssignmentExpression(parent)) { + node = parent.left; + } else if (t.isVariableDeclarator(parent)) { + node = parent.id; + } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) { + node = node.key; + } - function RegExpLiteral() { - return t.genericTypeAnnotation(t.identifier("RegExp")); - } + var parts = []; - function ObjectExpression() { - return t.genericTypeAnnotation(t.identifier("Object")); - } + var add = function add(node) { + if (t.isModuleDeclaration(node)) { + if (node.source) { + add(node.source); + } else if (node.specifiers && node.specifiers.length) { + for (var _iterator5 = node.specifiers, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { + var _ref5; - function ArrayExpression() { - return t.genericTypeAnnotation(t.identifier("Array")); - } + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var specifier = _ref5; + + add(specifier); + } + } else if (node.declaration) { + add(node.declaration); + } + } else if (t.isModuleSpecifier(node)) { + add(node.local); + } else if (t.isMemberExpression(node)) { + add(node.object); + add(node.property); + } else if (t.isIdentifier(node)) { + parts.push(node.name); + } else if (t.isLiteral(node)) { + parts.push(node.value); + } else if (t.isCallExpression(node)) { + add(node.callee); + } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) { + for (var _iterator6 = node.properties, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { + var _ref6; - function RestElement() { - return ArrayExpression(); - } + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } - RestElement.validParent = true; + var prop = _ref6; - function Func() { - return t.genericTypeAnnotation(t.identifier("Function")); - } + add(prop.key || prop.argument); + } + } + }; - exports.Function = Func; - exports.Class = Func; + add(node); - function CallExpression() { - return resolveCall(this.get("callee")); - } + var id = parts.join("$"); + id = id.replace(/^_/, "") || defaultName || "ref"; - function TaggedTemplateExpression() { - return resolveCall(this.get("tag")); - } + return this.generateUidIdentifier(id.slice(0, 20)); + }; - function resolveCall(callee) { - callee = callee.resolve(); + Scope.prototype.isStatic = function isStatic(node) { + if (t.isThisExpression(node) || t.isSuper(node)) { + return true; + } - if (callee.isFunction()) { - if (callee.is("async")) { - if (callee.is("generator")) { - return t.genericTypeAnnotation(t.identifier("AsyncIterator")); - } else { - return t.genericTypeAnnotation(t.identifier("Promise")); - } - } else { - if (callee.node.returnType) { - return callee.node.returnType; + if (t.isIdentifier(node)) { + var binding = this.getBinding(node.name); + if (binding) { + return binding.constant; } else { - // todo: get union type of all return arguments + return this.hasBinding(node.name); } } - } - } -/***/ }, -/* 207 */ -/***/ function(module, exports, __webpack_require__) { + return false; + }; - "use strict"; + Scope.prototype.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) { + if (this.isStatic(node)) { + return null; + } else { + var _id2 = this.generateUidIdentifierBasedOnNode(node); + if (!dontPush) this.push({ id: _id2 }); + return _id2; + } + }; - var _getIterator = __webpack_require__(3)["default"]; + Scope.prototype.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) { + if (kind === "param") return; - var _interopRequireWildcard = __webpack_require__(44)["default"]; + if (kind === "hoisted" && local.kind === "let") return; - exports.__esModule = true; + var duplicate = false; - var _babelTypes = __webpack_require__(46); + if (!duplicate) duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module"; - var t = _interopRequireWildcard(_babelTypes); + if (!duplicate) duplicate = local.kind === "param" && (kind === "let" || kind === "const"); - /*:: import type NodePath from "../index";*/ - exports["default"] = function (node /*: Object*/) { - if (!this.isReferenced()) return; + if (duplicate) { + throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError); + } + }; - // check if a binding exists of this value and if so then return a union type of all - // possible types that the binding could be - var binding = this.scope.getBinding(node.name); - if (binding) { - if (binding.identifier.typeAnnotation) { - return binding.identifier.typeAnnotation; - } else { - return getTypeAnnotationBindingConstantViolations(this, node.name); + Scope.prototype.rename = function rename(oldName, newName, block) { + var binding = this.getBinding(oldName); + if (binding) { + newName = newName || this.generateUidIdentifier(oldName).name; + return new _renamer2.default(binding, oldName, newName).rename(block); } - } + }; - // built-in values - if (node.name === "undefined") { - return t.voidTypeAnnotation(); - } else if (node.name === "NaN" || node.name === "Infinity") { - return t.numberTypeAnnotation(); - } else if (node.name === "arguments") { - // todo - } - }; + Scope.prototype._renameFromMap = function _renameFromMap(map, oldName, newName, value) { + if (map[oldName]) { + map[newName] = value; + map[oldName] = null; + } + }; - function getTypeAnnotationBindingConstantViolations(path, name) { - var binding = path.scope.getBinding(name); + Scope.prototype.dump = function dump() { + var sep = (0, _repeat2.default)("-", 60); + console.log(sep); + var scope = this; + do { + console.log("#", scope.block.type); + for (var name in scope.bindings) { + var binding = scope.bindings[name]; + console.log(" -", name, { + constant: binding.constant, + references: binding.references, + violations: binding.constantViolations.length, + kind: binding.kind + }); + } + } while (scope = scope.parent); + console.log(sep); + }; - var types = []; - path.typeAnnotation = t.unionTypeAnnotation(types); + Scope.prototype.toArray = function toArray(node, i) { + var file = this.hub.file; - var functionConstantViolations = []; - var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); + if (t.isIdentifier(node)) { + var binding = this.getBinding(node.name); + if (binding && binding.constant && binding.path.isGenericType("Array")) return node; + } - var testType = getConditionalAnnotation(path, name); - if (testType) { - (function () { - var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); + if (t.isArrayExpression(node)) { + return node; + } - // remove constant violations observed before the IfStatement - constantViolations = constantViolations.filter(function (path) { - return testConstantViolations.indexOf(path) < 0; - }); + if (t.isIdentifier(node, { name: "arguments" })) { + return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]); + } - // clear current types and add in observed test type - types.push(testType.typeAnnotation); - })(); - } + var helperName = "toArray"; + var args = [node]; + if (i === true) { + helperName = "toConsumableArray"; + } else if (i) { + args.push(t.numericLiteral(i)); + helperName = "slicedToArray"; + } + return t.callExpression(file.addHelper(helperName), args); + }; - if (constantViolations.length) { - // pick one constant from each scope which will represent the last possible - // control flow path that it could've taken/been - /* This code is broken for the following problems: - * It thinks that assignments can only happen in scopes. - * What about conditionals, if statements without block, - * or guarded assignments. - * It also checks to see if one of the assignments is in the - * same scope and uses that as the only "violation". However, - * the binding is returned by `getConstantViolationsBefore` so we for - * sure always going to return that as the only "violation". - let rawConstantViolations = constantViolations.reverse(); - let visitedScopes = []; - constantViolations = []; - for (let violation of (rawConstantViolations: Array)) { - let violationScope = violation.scope; - if (visitedScopes.indexOf(violationScope) >= 0) continue; - visitedScopes.push(violationScope); - constantViolations.push(violation); - if (violationScope === path.scope) { - constantViolations = [violation]; - break; - } - }*/ + Scope.prototype.hasLabel = function hasLabel(name) { + return !!this.getLabel(name); + }; - // add back on function constant violations since we can't track calls - constantViolations = constantViolations.concat(functionConstantViolations); + Scope.prototype.getLabel = function getLabel(name) { + return this.labels.get(name); + }; - // push on inferred types of violated paths - for (var _iterator = (constantViolations /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + Scope.prototype.registerLabel = function registerLabel(path) { + this.labels.set(path.node.label.name, path); + }; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } + Scope.prototype.registerDeclaration = function registerDeclaration(path) { + if (path.isLabeledStatement()) { + this.registerLabel(path); + } else if (path.isFunctionDeclaration()) { + this.registerBinding("hoisted", path.get("id"), path); + } else if (path.isVariableDeclaration()) { + var declarations = path.get("declarations"); + for (var _iterator7 = declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { + var _ref7; - var violation = _ref; + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } - types.push(violation.getTypeAnnotation()); - } - } + var declar = _ref7; - if (types.length) { - return t.createUnionTypeAnnotation(types); - } - } + this.registerBinding(path.node.kind, declar); + } + } else if (path.isClassDeclaration()) { + this.registerBinding("let", path); + } else if (path.isImportDeclaration()) { + var specifiers = path.get("specifiers"); + for (var _iterator8 = specifiers, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { + var _ref8; - function getConstantViolationsBefore(binding, path, functions) { - var violations = binding.constantViolations.slice(); - violations.unshift(binding.path); - return violations.filter(function (violation) { - violation = violation.resolve(); - var status = violation._guessExecutionStatusRelativeTo(path); - if (functions && status === "function") functions.push(violation); - return status === "before"; - }); - } + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref8 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref8 = _i8.value; + } - function inferAnnotationFromBinaryExpression(name, path) { - var operator = path.node.operator; + var specifier = _ref8; - var right = path.get("right").resolve(); - var left = path.get("left").resolve(); + this.registerBinding("module", specifier); + } + } else if (path.isExportDeclaration()) { + var _declar = path.get("declaration"); + if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) { + this.registerDeclaration(_declar); + } + } else { + this.registerBinding("unknown", path); + } + }; - var target = undefined; - if (left.isIdentifier({ name: name })) { - target = right; - } else if (right.isIdentifier({ name: name })) { - target = left; - } - if (target) { - if (operator === "===") { - return target.getTypeAnnotation(); - } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); + Scope.prototype.buildUndefinedNode = function buildUndefinedNode() { + if (this.hasBinding("undefined")) { + return t.unaryExpression("void", t.numericLiteral(0), true); } else { - return; + return t.identifier("undefined"); } - } else { - if (operator !== "===") return; - } + }; - // - var typeofPath = undefined; - var typePath = undefined; - if (left.isUnaryExpression({ operator: "typeof" })) { - typeofPath = left; - typePath = right; - } else if (right.isUnaryExpression({ operator: "typeof" })) { - typeofPath = right; - typePath = left; - } - if (!typePath && !typeofPath) return; + Scope.prototype.registerConstantViolation = function registerConstantViolation(path) { + var ids = path.getBindingIdentifiers(); + for (var name in ids) { + var binding = this.getBinding(name); + if (binding) binding.reassign(path); + } + }; - // ensure that the type path is a Literal - typePath = typePath.resolve(); - if (!typePath.isLiteral()) return; + Scope.prototype.registerBinding = function registerBinding(kind, path) { + var bindingPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : path; - // and that it's a string so we can infer it - var typeValue = typePath.node.value; - if (typeof typeValue !== "string") return; + if (!kind) throw new ReferenceError("no `kind`"); - // and that the argument of the typeof path references us! - if (!typeofPath.get("argument").isIdentifier({ name: name })) return; + if (path.isVariableDeclaration()) { + var declarators = path.get("declarations"); + for (var _iterator9 = declarators, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { + var _ref9; - // turn type value into a type annotation - return t.createTypeAnnotationBasedOnTypeof(typePath.node.value); - } + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref9 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref9 = _i9.value; + } - function getParentConditionalPath(path) { - var parentPath = undefined; - while (parentPath = path.parentPath) { - if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { - if (path.key === "test") { - return; - } else { - return parentPath; + var declar = _ref9; + + this.registerBinding(kind, declar); } - } else { - path = parentPath; + return; } - } - } - function getConditionalAnnotation(path, name) { - var ifStatement = getParentConditionalPath(path); - if (!ifStatement) return; + var parent = this.getProgramParent(); + var ids = path.getBindingIdentifiers(true); - var test = ifStatement.get("test"); - var paths = [test]; - var types = []; + for (var name in ids) { + for (var _iterator10 = ids[name], _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) { + var _ref10; - do { - var _path = paths.shift().resolve(); + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref10 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref10 = _i10.value; + } - if (_path.isLogicalExpression()) { - paths.push(_path.get("left")); - paths.push(_path.get("right")); - } + var _id3 = _ref10; - if (_path.isBinaryExpression()) { - var type = inferAnnotationFromBinaryExpression(name, _path); - if (type) types.push(type); + var local = this.getOwnBinding(name); + if (local) { + if (local.identifier === _id3) continue; + + this.checkBlockScopedCollisions(local, kind, name, _id3); + } + + if (local && local.path.isFlow()) local = null; + + parent.references[name] = true; + + this.bindings[name] = new _binding3.default({ + identifier: _id3, + existing: local, + scope: this, + path: bindingPath, + kind: kind + }); + } } - } while (paths.length); + }; - if (types.length) { - return { - typeAnnotation: t.createUnionTypeAnnotation(types), - ifStatement: ifStatement - }; - } else { - return getConditionalAnnotation(ifStatement, name); - } - } - module.exports = exports["default"]; + Scope.prototype.addGlobal = function addGlobal(node) { + this.globals[node.name] = node; + }; -/***/ }, -/* 208 */ -/***/ function(module, exports, __webpack_require__) { + Scope.prototype.hasUid = function hasUid(name) { + var scope = this; - // This file contains methods responsible for replacing a node with another. + do { + if (scope.uids[name]) return true; + } while (scope = scope.parent); - "use strict"; + return false; + }; - var _getIterator = __webpack_require__(3)["default"]; + Scope.prototype.hasGlobal = function hasGlobal(name) { + var scope = this; - var _interopRequireDefault = __webpack_require__(42)["default"]; + do { + if (scope.globals[name]) return true; + } while (scope = scope.parent); - var _interopRequireWildcard = __webpack_require__(44)["default"]; + return false; + }; - exports.__esModule = true; - exports.replaceWithMultiple = replaceWithMultiple; - exports.replaceWithSourceString = replaceWithSourceString; - exports.replaceWith = replaceWith; - exports._replaceWith = _replaceWith; - exports.replaceExpressionWithStatements = replaceExpressionWithStatements; - exports.replaceInline = replaceInline; + Scope.prototype.hasReference = function hasReference(name) { + var scope = this; - var _babelCodeFrame = __webpack_require__(209); + do { + if (scope.references[name]) return true; + } while (scope = scope.parent); - var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame); + return false; + }; - var _index = __webpack_require__(166); + Scope.prototype.isPure = function isPure(node, constantsOnly) { + if (t.isIdentifier(node)) { + var binding = this.getBinding(node.name); + if (!binding) return false; + if (constantsOnly) return binding.constant; + return true; + } else if (t.isClass(node)) { + if (node.superClass && !this.isPure(node.superClass, constantsOnly)) return false; + return this.isPure(node.body, constantsOnly); + } else if (t.isClassBody(node)) { + for (var _iterator11 = node.body, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, _getIterator3.default)(_iterator11);;) { + var _ref11; - var _index2 = _interopRequireDefault(_index); + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref11 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref11 = _i11.value; + } - var _index3 = __webpack_require__(171); + var method = _ref11; - var _index4 = _interopRequireDefault(_index3); + if (!this.isPure(method, constantsOnly)) return false; + } + return true; + } else if (t.isBinary(node)) { + return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); + } else if (t.isArrayExpression(node)) { + for (var _iterator12 = node.elements, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, _getIterator3.default)(_iterator12);;) { + var _ref12; - var _babylon = __webpack_require__(221); + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref12 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref12 = _i12.value; + } - var _babelTypes = __webpack_require__(46); + var elem = _ref12; - var t = _interopRequireWildcard(_babelTypes); + if (!this.isPure(elem, constantsOnly)) return false; + } + return true; + } else if (t.isObjectExpression(node)) { + for (var _iterator13 = node.properties, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, _getIterator3.default)(_iterator13);;) { + var _ref13; - var hoistVariablesVisitor = { - Function: function Function(path) { - path.skip(); - }, + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref13 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref13 = _i13.value; + } - VariableDeclaration: function VariableDeclaration(path) { - if (path.node.kind !== "var") return; + var prop = _ref13; - var bindings = path.getBindingIdentifiers(); - for (var key in bindings) { - path.scope.push({ id: bindings[key] }); + if (!this.isPure(prop, constantsOnly)) return false; + } + return true; + } else if (t.isClassMethod(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + if (node.kind === "get" || node.kind === "set") return false; + return true; + } else if (t.isClassProperty(node) || t.isObjectProperty(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + return this.isPure(node.value, constantsOnly); + } else if (t.isUnaryExpression(node)) { + return this.isPure(node.argument, constantsOnly); + } else { + return t.isPureish(node); } + }; - var exprs = []; + Scope.prototype.setData = function setData(key, val) { + return this.data[key] = val; + }; - for (var _iterator = (path.node.declarations /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + Scope.prototype.getData = function getData(key) { + var scope = this; + do { + var data = scope.data[key]; + if (data != null) return data; + } while (scope = scope.parent); + }; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } + Scope.prototype.removeData = function removeData(key) { + var scope = this; + do { + var data = scope.data[key]; + if (data != null) scope.data[key] = null; + } while (scope = scope.parent); + }; - var declar = _ref; + Scope.prototype.init = function init() { + if (!this.references) this.crawl(); + }; - if (declar.init) { - exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init))); + Scope.prototype.crawl = function crawl() { + _crawlCallsCount++; + this._crawl(); + _crawlCallsCount--; + }; + + Scope.prototype._crawl = function _crawl() { + var path = this.path; + + this.references = (0, _create2.default)(null); + this.bindings = (0, _create2.default)(null); + this.globals = (0, _create2.default)(null); + this.uids = (0, _create2.default)(null); + this.data = (0, _create2.default)(null); + + if (path.isLoop()) { + for (var _iterator14 = t.FOR_INIT_KEYS, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, _getIterator3.default)(_iterator14);;) { + var _ref14; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref14 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref14 = _i14.value; + } + + var key = _ref14; + + var node = path.get(key); + if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); } } - path.replaceWithMultiple(exprs); - } - }; - - /** - * Replace a node with an array of multiple. This method performs the following steps: - * - * - Inherit the comments of first provided node with that of the current node. - * - Insert the provided nodes after the current node. - * - Remove the current node. - */ + if (path.isFunctionExpression() && path.has("id")) { + if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { + this.registerBinding("local", path.get("id"), path); + } + } - function replaceWithMultiple(nodes /*: Array*/) { - this.resync(); + if (path.isClassExpression() && path.has("id")) { + if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { + this.registerBinding("local", path); + } + } - nodes = this._verifyNodeList(nodes); - t.inheritLeadingComments(nodes[0], this.node); - t.inheritTrailingComments(nodes[nodes.length - 1], this.node); - this.node = this.container[this.key] = null; - this.insertAfter(nodes); + if (path.isFunction()) { + var params = path.get("params"); + for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, _getIterator3.default)(_iterator15);;) { + var _ref15; - if (this.node) { - this.requeue(); - } else { - this.remove(); - } - } + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref15 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref15 = _i15.value; + } - /** - * Parse a string as an expression and replace the current node with the result. - * - * NOTE: This is typically not a good idea to use. Building source strings when - * transforming ASTs is an antipattern and SHOULD NOT be encouraged. Even if it's - * easier to use, your transforms will be extremely brittle. - */ + var param = _ref15; - function replaceWithSourceString(replacement) { - this.resync(); + this.registerBinding("param", param); + } + } - try { - replacement = "(" + replacement + ")"; - replacement = _babylon.parse(replacement); - } catch (err) { - var loc = err.loc; - if (loc) { - err.message += " - make sure this is an expression."; - err.message += "\n" + _babelCodeFrame2["default"](replacement, loc.line, loc.column + 1); + if (path.isCatchClause()) { + this.registerBinding("let", path); } - throw err; - } - replacement = replacement.program.body[0].expression; - _index2["default"].removeProperties(replacement); - return this.replaceWith(replacement); - } + var parent = this.getProgramParent(); + if (parent.crawling) return; - /** - * Replace the current node with another. - */ + var state = { + references: [], + constantViolations: [], + assignments: [] + }; - function replaceWith(replacement) { - this.resync(); + this.crawling = true; + path.traverse(collectorVisitor, state); + this.crawling = false; - if (this.removed) { - throw new Error("You can't replace this node, we've already removed it"); - } + for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, _getIterator3.default)(_iterator16);;) { + var _ref16; - if (replacement instanceof _index4["default"]) { - replacement = replacement.node; - } + if (_isArray16) { + if (_i16 >= _iterator16.length) break; + _ref16 = _iterator16[_i16++]; + } else { + _i16 = _iterator16.next(); + if (_i16.done) break; + _ref16 = _i16.value; + } - if (!replacement) { - throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); - } + var _path = _ref16; - if (this.node === replacement) { - return; - } + var ids = _path.getBindingIdentifiers(); + var programParent = void 0; + for (var name in ids) { + if (_path.scope.getBinding(name)) continue; - if (this.isProgram() && !t.isProgram(replacement)) { - throw new Error("You can only replace a Program root node with another Program node"); - } + programParent = programParent || _path.scope.getProgramParent(); + programParent.addGlobal(ids[name]); + } - if (Array.isArray(replacement)) { - throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); - } + _path.scope.registerConstantViolation(_path); + } - if (typeof replacement === "string") { - throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); - } + for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : (0, _getIterator3.default)(_iterator17);;) { + var _ref17; - // replacing a statement with an expression so wrap it in an expression statement - if (this.isNodeType("Statement") && t.isExpression(replacement) && !this.canHaveVariableDeclarationOrExpression()) { - replacement = t.expressionStatement(replacement); - } + if (_isArray17) { + if (_i17 >= _iterator17.length) break; + _ref17 = _iterator17[_i17++]; + } else { + _i17 = _iterator17.next(); + if (_i17.done) break; + _ref17 = _i17.value; + } - // replacing an expression with a statement so let's explode it - if (this.isNodeType("Expression") && t.isStatement(replacement)) { - return this.replaceExpressionWithStatements([replacement]); - } + var ref = _ref17; - var oldNode = this.node; - if (oldNode) { - t.inheritsComments(replacement, oldNode); - t.removeComments(oldNode); - } + var binding = ref.scope.getBinding(ref.node.name); + if (binding) { + binding.reference(ref); + } else { + ref.scope.getProgramParent().addGlobal(ref.node); + } + } - // replace the node - this._replaceWith(replacement); - this.type = replacement.type; + for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : (0, _getIterator3.default)(_iterator18);;) { + var _ref18; - // potentially create new scope - this.setScope(); + if (_isArray18) { + if (_i18 >= _iterator18.length) break; + _ref18 = _iterator18[_i18++]; + } else { + _i18 = _iterator18.next(); + if (_i18.done) break; + _ref18 = _i18.value; + } - // requeue for visiting - this.requeue(); - } + var _path2 = _ref18; - /** - * Description - */ + _path2.scope.registerConstantViolation(_path2); + } + }; - function _replaceWith(node) { - if (!this.container) { - throw new ReferenceError("Container is falsy"); - } + Scope.prototype.push = function push(opts) { + var path = this.path; - if (this.inList) { - t.validate(this.parent, this.key, [node]); - } else { - t.validate(this.parent, this.key, node); - } + if (!path.isBlockStatement() && !path.isProgram()) { + path = this.getBlockParent().path; + } - this.debug(function () { - return "Replace with " + (node && node.type); - }); + if (path.isSwitchStatement()) { + path = this.getFunctionParent().path; + } - this.node = this.container[this.key] = node; - } + if (path.isLoop() || path.isCatchClause() || path.isFunction()) { + t.ensureBlock(path.node); + path = path.get("body"); + } - /** - * This method takes an array of statements nodes and then explodes it - * into expressions. This method retains completion records which is - * extremely important to retain original semantics. - */ + var unique = opts.unique; + var kind = opts.kind || "var"; + var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; - function replaceExpressionWithStatements(nodes /*: Array*/) { - this.resync(); + var dataKey = "declaration:" + kind + ":" + blockHoist; + var declarPath = !unique && path.getData(dataKey); - var toSequenceExpression = t.toSequenceExpression(nodes, this.scope); + if (!declarPath) { + var declar = t.variableDeclaration(kind, []); + declar._generated = true; + declar._blockHoist = blockHoist; - if (t.isSequenceExpression(toSequenceExpression)) { - var exprs = toSequenceExpression.expressions; + var _path$unshiftContaine = path.unshiftContainer("body", [declar]); - if (exprs.length >= 2 && this.parentPath.isExpressionStatement()) { - this._maybePopFromStatements(exprs); - } + declarPath = _path$unshiftContaine[0]; - // could be just one element due to the previous maybe popping - if (exprs.length === 1) { - this.replaceWith(exprs[0]); - } else { - this.replaceWith(toSequenceExpression); + if (!unique) path.setData(dataKey, declarPath); } - } else if (toSequenceExpression) { - this.replaceWith(toSequenceExpression); - } else { - var container = t.functionExpression(null, [], t.blockStatement(nodes)); - container.shadow = true; - this.replaceWith(t.callExpression(container, [])); - this.traverse(hoistVariablesVisitor); + var declarator = t.variableDeclarator(opts.id, opts.init); + declarPath.node.declarations.push(declarator); + this.registerBinding(kind, declarPath.get("declarations").pop()); + }; - // add implicit returns to all ending expression statements - var completionRecords /*: Array*/ = this.get("callee").getCompletionRecords(); - for (var _iterator2 = completionRecords, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + Scope.prototype.getProgramParent = function getProgramParent() { + var scope = this; + do { + if (scope.path.isProgram()) { + return scope; + } + } while (scope = scope.parent); + throw new Error("We couldn't find a Function or Program..."); + }; - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; + Scope.prototype.getFunctionParent = function getFunctionParent() { + var scope = this; + do { + if (scope.path.isFunctionParent()) { + return scope; + } + } while (scope = scope.parent); + throw new Error("We couldn't find a Function or Program..."); + }; + + Scope.prototype.getBlockParent = function getBlockParent() { + var scope = this; + do { + if (scope.path.isBlockParent()) { + return scope; } + } while (scope = scope.parent); + throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); + }; - var path = _ref2; + Scope.prototype.getAllBindings = function getAllBindings() { + var ids = (0, _create2.default)(null); - if (!path.isExpressionStatement()) continue; + var scope = this; + do { + (0, _defaults2.default)(ids, scope.bindings); + scope = scope.parent; + } while (scope); - var loop = path.findParent(function (path) { - return path.isLoop(); - }); - if (loop) { - var callee = this.get("callee"); + return ids; + }; - var uid = callee.scope.generateDeclaredUidIdentifier("ret"); - callee.get("body").pushContainer("body", t.returnStatement(uid)); + Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() { + var ids = (0, _create2.default)(null); - path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression)); + for (var _iterator19 = arguments, _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : (0, _getIterator3.default)(_iterator19);;) { + var _ref19; + + if (_isArray19) { + if (_i19 >= _iterator19.length) break; + _ref19 = _iterator19[_i19++]; } else { - path.replaceWith(t.returnStatement(path.node.expression)); + _i19 = _iterator19.next(); + if (_i19.done) break; + _ref19 = _i19.value; } + + var kind = _ref19; + + var scope = this; + do { + for (var name in scope.bindings) { + var binding = scope.bindings[name]; + if (binding.kind === kind) ids[name] = binding; + } + scope = scope.parent; + } while (scope); } - return this.node; - } - } + return ids; + }; - function replaceInline(nodes /*: Object | Array*/) { - this.resync(); + Scope.prototype.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) { + return this.getBindingIdentifier(name) === node; + }; - if (Array.isArray(nodes)) { - if (Array.isArray(this.container)) { - nodes = this._verifyNodeList(nodes); - this._containerInsertAfter(nodes); - return this.remove(); - } else { - return this.replaceWithMultiple(nodes); + Scope.prototype.warnOnFlowBinding = function warnOnFlowBinding(binding) { + if (_crawlCallsCount === 0 && binding && binding.path.isFlow()) { + console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "); } - } else { - return this.replaceWith(nodes); - } - } - -/***/ }, -/* 209 */ -/***/ function(module, exports, __webpack_require__) { + return binding; + }; - /* @flow */ + Scope.prototype.getBinding = function getBinding(name) { + var scope = this; - "use strict"; + do { + var binding = scope.getOwnBinding(name); + if (binding) return this.warnOnFlowBinding(binding); + } while (scope = scope.parent); + }; - var _interopRequireDefault = __webpack_require__(42)["default"]; + Scope.prototype.getOwnBinding = function getOwnBinding(name) { + return this.warnOnFlowBinding(this.bindings[name]); + }; - exports.__esModule = true; + Scope.prototype.getBindingIdentifier = function getBindingIdentifier(name) { + var info = this.getBinding(name); + return info && info.identifier; + }; - var _lineNumbers = __webpack_require__(210); + Scope.prototype.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) { + var binding = this.bindings[name]; + return binding && binding.identifier; + }; - var _lineNumbers2 = _interopRequireDefault(_lineNumbers); + Scope.prototype.hasOwnBinding = function hasOwnBinding(name) { + return !!this.getOwnBinding(name); + }; - var _repeating = __webpack_require__(193); + Scope.prototype.hasBinding = function hasBinding(name, noGlobals) { + if (!name) return false; + if (this.hasOwnBinding(name)) return true; + if (this.parentHasBinding(name, noGlobals)) return true; + if (this.hasUid(name)) return true; + if (!noGlobals && (0, _includes2.default)(Scope.globals, name)) return true; + if (!noGlobals && (0, _includes2.default)(Scope.contextVariables, name)) return true; + return false; + }; - var _repeating2 = _interopRequireDefault(_repeating); + Scope.prototype.parentHasBinding = function parentHasBinding(name, noGlobals) { + return this.parent && this.parent.hasBinding(name, noGlobals); + }; - var _jsTokens = __webpack_require__(212); + Scope.prototype.moveBindingTo = function moveBindingTo(name, scope) { + var info = this.getBinding(name); + if (info) { + info.scope.removeOwnBinding(name); + info.scope = scope; + scope.bindings[name] = info; + } + }; - var _jsTokens2 = _interopRequireDefault(_jsTokens); + Scope.prototype.removeOwnBinding = function removeOwnBinding(name) { + delete this.bindings[name]; + }; - var _esutils = __webpack_require__(153); + Scope.prototype.removeBinding = function removeBinding(name) { + var info = this.getBinding(name); + if (info) { + info.scope.removeOwnBinding(name); + } - var _esutils2 = _interopRequireDefault(_esutils); + var scope = this; + do { + if (scope.uids[name]) { + scope.uids[name] = false; + } + } while (scope = scope.parent); + }; - var _chalk = __webpack_require__(213); + return Scope; + }(); - var _chalk2 = _interopRequireDefault(_chalk); + Scope.globals = (0, _keys2.default)(_globals2.default.builtin); + Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; + exports.default = Scope; + module.exports = exports["default"]; - /** - * Chalk styles for token types. - */ +/***/ }, +/* 299 */ +/***/ function(module, exports, __webpack_require__) { - var defs = { - string: _chalk2["default"].red, - punctuator: _chalk2["default"].bold, - curly: _chalk2["default"].green, - parens: _chalk2["default"].blue.bold, - square: _chalk2["default"].yellow, - keyword: _chalk2["default"].cyan, - number: _chalk2["default"].magenta, - regex: _chalk2["default"].magenta, - comment: _chalk2["default"].grey, - invalid: _chalk2["default"].inverse - }; + module.exports = { "default": __webpack_require__(300), __esModule: true }; - /** - * RegExp to test for newlines in terminal. - */ +/***/ }, +/* 300 */ +/***/ function(module, exports, __webpack_require__) { - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + __webpack_require__(270); + __webpack_require__(51); + __webpack_require__(5); + __webpack_require__(301); + __webpack_require__(313); + module.exports = __webpack_require__(18).Map; - /** - * Get the type of token, specifying punctuator type. - */ +/***/ }, +/* 301 */ +/***/ function(module, exports, __webpack_require__) { - function getTokenType(match) { - var token = _jsTokens2["default"].matchToToken(match); - if (token.type === "name" && _esutils2["default"].keyword.isReservedWordES6(token.value)) { - return "keyword"; + 'use strict'; + var strong = __webpack_require__(302); + + // 23.1 Map Objects + module.exports = __webpack_require__(309)('Map', function(get){ + return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); } + }, strong, true); - if (token.type === "punctuator") { - switch (token.value) { - case "{": - case "}": - return "curly"; - case "(": - case ")": - return "parens"; - case "[": - case "]": - return "square"; - } +/***/ }, +/* 302 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var dP = __webpack_require__(22).f + , create = __webpack_require__(34) + , redefineAll = __webpack_require__(303) + , ctx = __webpack_require__(19) + , anInstance = __webpack_require__(304) + , defined = __webpack_require__(13) + , forOf = __webpack_require__(305) + , $iterDefine = __webpack_require__(14) + , step = __webpack_require__(8) + , setSpecies = __webpack_require__(308) + , DESCRIPTORS = __webpack_require__(26) + , fastKey = __webpack_require__(67).fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that._i[index]; + // frozen object case + for(entry = that._f; entry; entry = entry.n){ + if(entry.k == key)return entry; } + }; - return token.type; - } + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that._f == entry)that._f = next; + if(that._l == entry)that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + , entry; + while(entry = entry ? entry.n : this._f){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if(DESCRIPTORS)dP(C.prototype, 'size', { + get: function(){ + return defined(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that._f)that._f = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function(C, NAME, IS_MAP){ + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function(iterated, kind){ + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, function(){ + var that = this + , kind = that._k + , entry = that._l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } + }; + +/***/ }, +/* 303 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Highlight `text`. - */ + var hide = __webpack_require__(21); + module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; + }; - function highlight(text /*: string*/) { - return text.replace(_jsTokens2["default"], function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +/***/ }, +/* 304 */ +/***/ function(module, exports) { - var type = getTokenType(args); - var colorize = defs[type]; - if (colorize) { - return args[0].split(NEWLINE).map(function (str) { - return colorize(str); - }).join("\n"); - } else { - return args[0]; - } - }); - } + module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; + }; - /** - * Create a code frame, adding line numbers, code highlighting, and pointing to a given position. - */ +/***/ }, +/* 305 */ +/***/ function(module, exports, __webpack_require__) { - exports["default"] = function (rawLines /*: string*/, lineNumber /*: number*/, colNumber /*: number*/) /*: string*/ { - var opts /*: Object*/ = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; + var ctx = __webpack_require__(19) + , call = __webpack_require__(306) + , isArrayIter = __webpack_require__(307) + , anObject = __webpack_require__(23) + , toLength = __webpack_require__(39) + , getIterFn = __webpack_require__(54) + , BREAK = {} + , RETURN = {}; + var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } + }; + exports.BREAK = BREAK; + exports.RETURN = RETURN; - colNumber = Math.max(colNumber, 0); +/***/ }, +/* 306 */ +/***/ function(module, exports, __webpack_require__) { - var highlighted = opts.highlightCode && _chalk2["default"].supportsColor; - if (highlighted) rawLines = highlight(rawLines); + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(23); + module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } + }; - var lines = rawLines.split(NEWLINE); - var start = Math.max(lineNumber - 3, 0); - var end = Math.min(lines.length, lineNumber + 3); +/***/ }, +/* 307 */ +/***/ function(module, exports, __webpack_require__) { - if (!lineNumber && !colNumber) { - start = 0; - end = lines.length; - } + // check on default Array iterator + var Iterators = __webpack_require__(9) + , ITERATOR = __webpack_require__(48)('iterator') + , ArrayProto = Array.prototype; - var frame = _lineNumbers2["default"](lines.slice(start, end), { - start: start + 1, - before: " ", - after: " | ", - transform: function transform(params) { - if (params.number !== lineNumber) { - return; - } + module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; - if (colNumber) { - params.line += "\n" + params.before + _repeating2["default"](" ", params.width) + params.after + _repeating2["default"](" ", colNumber - 1) + "^"; - } +/***/ }, +/* 308 */ +/***/ function(module, exports, __webpack_require__) { - params.before = params.before.replace(/^./, ">"); - } - }).join("\n"); + 'use strict'; + var global = __webpack_require__(17) + , core = __webpack_require__(18) + , dP = __webpack_require__(22) + , DESCRIPTORS = __webpack_require__(26) + , SPECIES = __webpack_require__(48)('species'); + + module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); + }; - if (highlighted) { - return _chalk2["default"].reset(frame); +/***/ }, +/* 309 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(17) + , $export = __webpack_require__(16) + , meta = __webpack_require__(67) + , fails = __webpack_require__(27) + , hide = __webpack_require__(21) + , redefineAll = __webpack_require__(303) + , forOf = __webpack_require__(305) + , anInstance = __webpack_require__(304) + , isObject = __webpack_require__(24) + , setToStringTag = __webpack_require__(47) + , dP = __webpack_require__(22).f + , each = __webpack_require__(310)(0) + , DESCRIPTORS = __webpack_require__(26); + + module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; } else { - return frame; + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME, '_c'); + target._c = new Base; + if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ + anInstance(this, C, KEY); + if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + if('size' in proto)dP(C.prototype, 'size', { + get: function(){ + return this._c.size; + } + }); } - }; - module.exports = exports["default"]; + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; + }; /***/ }, -/* 210 */ +/* 310 */ /***/ function(module, exports, __webpack_require__) { - // Copyright 2014, 2015 Simon Lydell - // X11 (“MIT”) Licensed. (See LICENSE.) + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(19) + , IObject = __webpack_require__(11) + , toObject = __webpack_require__(50) + , toLength = __webpack_require__(39) + , asc = __webpack_require__(311); + module.exports = function(TYPE, $create){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; + return function($this, callbackfn, that){ + var O = toObject($this) + , self = IObject(O) + , f = ctx(callbackfn, that, 3) + , length = toLength(self.length) + , index = 0 + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + +/***/ }, +/* 311 */ +/***/ function(module, exports, __webpack_require__) { - var leftPad = __webpack_require__(211) + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(312); - function get(options, key, defaultValue) { - return (key in options ? options[key] : defaultValue) - } + module.exports = function(original, length){ + return new (speciesConstructor(original))(length); + }; - function lineNumbers(code, options) { - var getOption = get.bind(null, options || {}) - var transform = getOption("transform", Function.prototype) - var padding = getOption("padding", " ") - var before = getOption("before", " ") - var after = getOption("after", " | ") - var start = getOption("start", 1) - var isArray = Array.isArray(code) - var lines = (isArray ? code : code.split("\n")) - var end = start + lines.length - 1 - var width = String(end).length - var numbered = lines.map(function(line, index) { - var number = start + index - var params = {before: before, number: number, width: width, after: after, - line: line} - transform(params) - return params.before + leftPad(params.number, width, padding) + - params.after + params.line - }) - return (isArray ? numbered : numbered.join("\n")) - } +/***/ }, +/* 312 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = lineNumbers + var isObject = __webpack_require__(24) + , isArray = __webpack_require__(74) + , SPECIES = __webpack_require__(48)('species'); + module.exports = function(original){ + var C; + if(isArray(original)){ + C = original.constructor; + // cross-realm fallback + if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; + if(isObject(C)){ + C = C[SPECIES]; + if(C === null)C = undefined; + } + } return C === undefined ? Array : C; + }; /***/ }, -/* 211 */ -/***/ function(module, exports) { +/* 313 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = leftpad; + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(16); - function leftpad (str, len, ch) { - str = String(str); + $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(314)('Map')}); - var i = -1; +/***/ }, +/* 314 */ +/***/ function(module, exports, __webpack_require__) { - ch || (ch = ' '); - len = len - str.length; + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(55) + , from = __webpack_require__(315); + module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; +/***/ }, +/* 315 */ +/***/ function(module, exports, __webpack_require__) { - while (++i < len) { - str = ch + str; - } + var forOf = __webpack_require__(305); - return str; - } + module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; /***/ }, -/* 212 */ -/***/ function(module, exports) { +/* 316 */ +/***/ function(module, exports, __webpack_require__) { - // Copyright 2014, 2015 Simon Lydell - // X11 (“MIT”) Licensed. (See LICENSE.) + var baseIndexOf = __webpack_require__(256), + isArrayLike = __webpack_require__(177), + isString = __webpack_require__(112), + toInteger = __webpack_require__(317), + values = __webpack_require__(320); - // This regex comes from regex.coffee, and is inserted here by generate-index.js - // (run `npm run build`). - module.exports = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - module.exports.matchToToken = function(match) { - var token = {type: "invalid", value: match[0]} - if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4]) - else if (match[ 5]) token.type = "comment" - else if (match[ 6]) token.type = "comment", token.closed = !!match[7] - else if (match[ 8]) token.type = "regex" - else if (match[ 9]) token.type = "number" - else if (match[10]) token.type = "name" - else if (match[11]) token.type = "punctuator" - else if (match[12]) token.type = "whitespace" - return token + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } + module.exports = includes; + /***/ }, -/* 213 */ +/* 317 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - var escapeStringRegexp = __webpack_require__(214); - var ansiStyles = __webpack_require__(215); - var stripAnsi = __webpack_require__(217); - var hasAnsi = __webpack_require__(219); - var supportsColor = __webpack_require__(220); - var defineProps = Object.defineProperties; - var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + var toFinite = __webpack_require__(318); - function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; - } + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; - // use bright blue on Windows as the normal blue color is illegible - if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001b[94m'; + return result === result ? (remainder ? result - remainder : result) : 0; } - var styles = (function () { - var ret = {}; + module.exports = toInteger; - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; - }); +/***/ }, +/* 318 */ +/***/ function(module, exports, __webpack_require__) { - return ret; - })(); + var toNumber = __webpack_require__(319); - var proto = defineProps(function chalk() {}, styles); + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; - function build(_styles) { - var builder = function () { - return applyStyle.apply(builder, arguments); - }; + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - /* eslint-disable no-proto */ - builder.__proto__ = proto; + module.exports = toFinite; - return builder; - } - function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); +/***/ }, +/* 319 */ +/***/ function(module, exports, __webpack_require__) { - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } + var isObject = __webpack_require__(107), + isSymbol = __webpack_require__(243); - if (!this.enabled || !str) { - return str; - } + /** Used as references for various `Number` constants. */ + var NAN = 0 / 0; - var nestedStyles = this._styles; - var i = nestedStyles.length; + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g; - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - var originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { - ansiStyles.dim.open = ''; - } + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - while (i--) { - var code = ansiStyles[nestedStyles[i]]; + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. - ansiStyles.dim.open = originalDim; + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; - return str; + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); } - function init() { - var ret = {}; + module.exports = toNumber; - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); - return ret; - } +/***/ }, +/* 320 */ +/***/ function(module, exports, __webpack_require__) { - defineProps(Chalk.prototype, init()); + var baseValues = __webpack_require__(321), + keys = __webpack_require__(163); - module.exports = new Chalk(); - module.exports.styles = ansiStyles; - module.exports.hasColor = hasAnsi; - module.exports.stripColor = stripAnsi; - module.exports.supportsColor = supportsColor; + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object ? baseValues(object, keys(object)) : []; + } + module.exports = values; -/***/ }, -/* 214 */ -/***/ function(module, exports) { - 'use strict'; +/***/ }, +/* 321 */ +/***/ function(module, exports, __webpack_require__) { - var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + var arrayMap = __webpack_require__(242); - module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } - return str.replace(matchOperatorsRe, '\\$&'); - }; + module.exports = baseValues; /***/ }, -/* 215 */ +/* 322 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(module) {'use strict'; + var baseRepeat = __webpack_require__(323), + isIterateeCall = __webpack_require__(297), + toInteger = __webpack_require__(317), + toString = __webpack_require__(240); - function assembleStyles () { - var styles = { - modifiers: { - reset: [0, 0], - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - colors: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39] - }, - bgColors: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] - } - }; + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } - // fix humans - styles.colors.grey = styles.colors.gray; + module.exports = repeat; - Object.keys(styles).forEach(function (groupName) { - var group = styles[groupName]; - Object.keys(group).forEach(function (styleName) { - var style = group[styleName]; +/***/ }, +/* 323 */ +/***/ function(module, exports) { - styles[styleName] = group[styleName] = { - open: '\u001b[' + style[0] + 'm', - close: '\u001b[' + style[1] + 'm' - }; - }); + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - }); + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeFloor = Math.floor; - return styles; + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; } - Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles - }); + module.exports = baseRepeat; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(216)(module))) /***/ }, -/* 216 */ -/***/ function(module, exports) { +/* 324 */ +/***/ function(module, exports, __webpack_require__) { - module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - module.children = []; - module.webpackPolyfill = 1; - } - return module; - } + "use strict"; + exports.__esModule = true; -/***/ }, -/* 217 */ -/***/ function(module, exports, __webpack_require__) { + var _classCallCheck2 = __webpack_require__(58); - 'use strict'; - var ansiRegex = __webpack_require__(218)(); + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; - }; + var _binding = __webpack_require__(325); + var _binding2 = _interopRequireDefault(_binding); -/***/ }, -/* 218 */ -/***/ function(module, exports) { + var _babelTypes = __webpack_require__(63); - 'use strict'; - module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; + var t = _interopRequireWildcard(_babelTypes); + + 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; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var renameVisitor = { + ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { + var node = _ref.node; + + if (node.name === state.oldName) { + node.name = state.newName; + } + }, + Scope: function Scope(path, state) { + if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { + path.skip(); + } + }, + "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) { + var ids = path.getOuterBindingIdentifiers(); + + for (var name in ids) { + if (name === state.oldName) ids[name].name = state.newName; + } + } }; + var Renamer = function () { + function Renamer(binding, oldName, newName) { + (0, _classCallCheck3.default)(this, Renamer); -/***/ }, -/* 219 */ -/***/ function(module, exports, __webpack_require__) { + this.newName = newName; + this.oldName = oldName; + this.binding = binding; + } - 'use strict'; - var ansiRegex = __webpack_require__(218); - var re = new RegExp(ansiRegex().source); // remove the `g` flag - module.exports = re.test.bind(re); + Renamer.prototype.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { + var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath; + if (!exportDeclar) return; + var isDefault = exportDeclar.isExportDefaultDeclaration(); -/***/ }, -/* 220 */ -/***/ function(module, exports) { + if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) { + parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default"); + } - 'use strict'; - var argv = process.argv; + var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers(); + var specifiers = []; - var terminator = argv.indexOf('--'); - var hasFlag = function (flag) { - flag = '--' + flag; - var pos = argv.indexOf(flag); - return pos !== -1 && (terminator !== -1 ? pos < terminator : true); - }; + for (var name in bindingIdentifiers) { + var localName = name === this.oldName ? this.newName : name; + var exportedName = isDefault ? "default" : name; + specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName))); + } - module.exports = (function () { - if ('FORCE_COLOR' in process.env) { - return true; - } + if (specifiers.length) { + var aliasDeclar = t.exportNamedDeclaration(null, specifiers); - if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - return false; - } + if (parentDeclar.isFunctionDeclaration()) { + aliasDeclar._blockHoist = 3; + } - if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - return true; - } + exportDeclar.insertAfter(aliasDeclar); + exportDeclar.replaceWith(parentDeclar.node); + } + }; - if (process.stdout && !process.stdout.isTTY) { - return false; - } + Renamer.prototype.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) { + return; - if (process.platform === 'win32') { - return true; - } + if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; + if (this.binding.kind !== "hoisted") return; - if ('COLORTERM' in process.env) { - return true; - } + path.node.id = t.identifier(this.oldName); + path.node._blockHoist = 3; - if (process.env.TERM === 'dumb') { - return false; - } + path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.identifier(this.newName), t.toExpression(path.node))])); + }; - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } + Renamer.prototype.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) { + return; - return false; - })(); + if (!path.isFunctionExpression() && !path.isClassExpression()) return; + if (this.binding.kind !== "local") return; + + path.node.id = t.identifier(this.oldName); + + this.binding.scope.parent.push({ + id: t.identifier(this.newName) + }); + + path.replaceWith(t.assignmentExpression("=", t.identifier(this.newName), path.node)); + }; + + Renamer.prototype.rename = function rename(block) { + var binding = this.binding; + var oldName = this.oldName; + var newName = this.newName; + var scope = binding.scope; + var path = binding.path; + + + var parentDeclar = path.find(function (path) { + return path.isDeclaration() || path.isFunctionExpression(); + }); + if (parentDeclar) { + this.maybeConvertFromExportDeclaration(parentDeclar); + } + + scope.traverse(block || scope.block, renameVisitor, this); + + if (!block) { + scope.removeOwnBinding(oldName); + scope.bindings[newName] = binding; + this.binding.identifier.name = newName; + } + + if (binding.type === "hoisted") {} + + if (parentDeclar) { + this.maybeConvertFromClassFunctionDeclaration(parentDeclar); + this.maybeConvertFromClassFunctionExpression(parentDeclar); + } + }; + + return Renamer; + }(); + exports.default = Renamer; + module.exports = exports["default"]; /***/ }, -/* 221 */ +/* 325 */ /***/ function(module, exports, __webpack_require__) { - var require;var require;(function(f){if(true){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.babylon = 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 require(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 { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(args) { + args.push(undefined, assignInDefaults); + return apply(assignInWith, undefined, args); + }); - require("./tokenizer/context"); + module.exports = defaults; - var _pluginsFlow = require("./plugins/flow"); - var _pluginsFlow2 = _interopRequireDefault(_pluginsFlow); +/***/ }, +/* 327 */ +/***/ function(module, exports, __webpack_require__) { - var _pluginsJsx = require("./plugins/jsx"); + var eq = __webpack_require__(124); - var _pluginsJsx2 = _interopRequireDefault(_pluginsJsx); + /** Used for built-in method references. */ + var objectProto = Object.prototype; - _parser.plugins.flow = _pluginsFlow2["default"]; - _parser.plugins.jsx = _pluginsJsx2["default"]; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - function parse(input, options) { - return new _parser2["default"](options, input).parse(); + /** + * Used by `_.defaults` to customize its `_.assignIn` use. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function assignInDefaults(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; } - exports.tokTypes = _tokenizerTypes.types; - },{"./parser":5,"./parser/comments":3,"./parser/expression":4,"./parser/location":6,"./parser/lval":7,"./parser/node":8,"./parser/statement":9,"./parser/util":10,"./plugins/flow":11,"./plugins/jsx":12,"./tokenizer":15,"./tokenizer/context":14,"./tokenizer/types":17,"babel-runtime/helpers/interop-require-default":26}],2:[function(require,module,exports){ - /* @flow */ - // A second optional argument can be given to further configure - "use strict"; - - exports.__esModule = true; - exports.getOptions = getOptions; - var defaultOptions /*: { - sourceType: string, - allowReturnOutsideFunction: boolean, - allowImportExportEverywhere: boolean, - allowSuperOutsideMethod: boolean, - plugins: Array, - strictMode: any - }*/ = { - // Source type ("script" or "module") for different semantics - sourceType: "script", - // 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, - // TODO - allowSuperOutsideMethod: false, - // An array of plugins to enable - plugins: [], - // TODO - strictMode: null - }; + module.exports = assignInDefaults; - exports.defaultOptions = defaultOptions; - // Interpret and default an options object - function getOptions(opts /*:: ?: Object*/) /*: Object*/ { - var options = {}; - for (var key in defaultOptions) { - options[key] = opts && key in opts ? opts[key] : defaultOptions[key]; - } - return options; - } +/***/ }, +/* 328 */ +/***/ function(module, exports, __webpack_require__) { - // the parser process. These options are recognized: - },{}],3:[function(require,module,exports){ - /* @flow */ + var copyObject = __webpack_require__(162), + createAssigner = __webpack_require__(289), + keysIn = __webpack_require__(329); /** - * Based on the comment attachment algorithm used in espree and estraverse. + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * **Note:** This method mutates `object`. * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); - "use strict"; + module.exports = assignInWith; - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; - var _index = require("./index"); +/***/ }, +/* 329 */ +/***/ function(module, exports, __webpack_require__) { - var _index2 = _interopRequireDefault(_index); + var arrayLikeKeys = __webpack_require__(164), + baseKeysIn = __webpack_require__(330), + isArrayLike = __webpack_require__(177); - function last(stack) { - return stack[stack.length - 1]; + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } - var pp = _index2["default"].prototype; - - pp.addComment = function (comment) { - this.state.trailingComments.push(comment); - this.state.leadingComments.push(comment); - }; - - pp.processComment = function (node) { - if (node.type === "Program" && node.body.length > 0) return; - - var stack = this.state.commentStack; + module.exports = keysIn; - var lastChild = undefined, - trailingComments = undefined, - i = undefined; - if (this.state.trailingComments.length > 0) { - // If the first comment in trailingComments comes after the - // current node, then we're good - all comments in the array will - // come after the node and so it's safe to add them as official - // trailingComments. - if (this.state.trailingComments[0].start >= node.end) { - trailingComments = this.state.trailingComments; - this.state.trailingComments = []; - } else { - // Otherwise, if the first comment doesn't come after the - // current node, that means we have a mix of leading and trailing - // comments in the array and that leadingComments contains the - // same items as trailingComments. Reset trailingComments to - // zero items and we'll handle this by evaluating leadingComments - // later. - this.state.trailingComments.length = 0; - } - } else { - var lastInStack = last(stack); - if (stack.length > 0 && lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { - trailingComments = lastInStack.trailingComments; - lastInStack.trailingComments = null; - } - } +/***/ }, +/* 330 */ +/***/ function(module, exports, __webpack_require__) { - // Eating the stack. - while (stack.length > 0 && last(stack).start >= node.start) { - lastChild = stack.pop(); - } + var isObject = __webpack_require__(107), + isPrototype = __webpack_require__(175), + nativeKeysIn = __webpack_require__(331); - if (lastChild) { - if (lastChild.leadingComments) { - if (lastChild !== node && last(lastChild.leadingComments).end <= node.start) { - node.leadingComments = lastChild.leadingComments; - lastChild.leadingComments = null; - } else { - // A leading comment for an anonymous class had been stolen by its first ClassMethod, - // so this takes back the leading comment. - // See also: https://github.com/eslint/espree/issues/158 - for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { - if (lastChild.leadingComments[i].end <= node.start) { - node.leadingComments = lastChild.leadingComments.splice(0, i + 1); - break; - } - } - } - } - } else if (this.state.leadingComments.length > 0) { - if (last(this.state.leadingComments).end <= node.start) { - node.leadingComments = this.state.leadingComments; - this.state.leadingComments = []; - } else { - // https://github.com/eslint/espree/issues/2 - // - // In special cases, such as return (without a value) and - // debugger, all comments will end up as leadingComments and - // will otherwise be eliminated. This step runs when the - // commentStack is empty and there are comments left - // in leadingComments. - // - // This loop figures out the stopping point between the actual - // leading and trailing comments by finding the location of the - // first comment that comes after the given node. - for (i = 0; i < this.state.leadingComments.length; i++) { - if (this.state.leadingComments[i].end > node.start) { - break; - } - } + /** Used for built-in method references. */ + var objectProto = Object.prototype; - // Split the array based on the location of the first comment - // that comes after the node. Keep in mind that this could - // result in an empty array, and if so, the array must be - // deleted. - node.leadingComments = this.state.leadingComments.slice(0, i); - if ((node.leadingComments /*: Array*/).length === 0) { - node.leadingComments = null; - } + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - // Similarly, trailing comments are attached later. The variable - // must be reset to null if there are no trailing comments. - trailingComments = this.state.leadingComments.slice(i); - if (trailingComments.length === 0) { - trailingComments = null; - } - } + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); } + var isProto = isPrototype(object), + result = []; - if (trailingComments) { - if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { - node.innerComments = trailingComments; - } else { - node.trailingComments = trailingComments; + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); } } + return result; + } - stack.push(node); - }; - },{"./index":5,"babel-runtime/helpers/interop-require-default":26}],4:[function(require,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 _Object$create = require("babel-runtime/core-js/object/create")["default"]; - - var _getIterator = require("babel-runtime/core-js/get-iterator")["default"]; - - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + module.exports = baseKeysIn; - var _tokenizerTypes = require("../tokenizer/types"); - var _index = require("./index"); +/***/ }, +/* 331 */ +/***/ function(module, exports) { - var _index2 = _interopRequireDefault(_index); + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } - var _utilIdentifier = require("../util/identifier"); + module.exports = nativeKeysIn; - var pp = _index2["default"].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. +/***/ }, +/* 332 */ +/***/ function(module, exports, __webpack_require__) { - pp.checkPropClash = function (prop, propHash) { - if (prop.computed) return; + /*istanbul ignore next*/"use strict"; - var key = prop.key; - var name = undefined; - switch (key.type) { - case "Identifier": - name = key.name; - break; + exports.__esModule = true; + exports.MESSAGES = undefined; - case "StringLiteral": - case "NumericLiteral": - name = String(key.value); - break; + var _stringify = __webpack_require__(82); - default: - return; - } + var _stringify2 = _interopRequireDefault(_stringify); - if (name === "__proto__" && prop.kind === "init") { - if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property"); - propHash.proto = true; - } - }; + exports.get = get; + /*istanbul ignore next*/exports.parseArgs = parseArgs; - // ### Expression parsing + var /*istanbul ignore next*/_util = __webpack_require__(282); - // 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. + /*istanbul ignore next*/ + var util = _interopRequireWildcard(_util); - // 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). + /*istanbul ignore next*/ + 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; } } - pp.parseExpression = function (noIn, refShorthandDefaultPos) { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.match(_tokenizerTypes.types.comma)) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(_tokenizerTypes.types.comma)) { - node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - } - this.toReferencedList(node.expressions); - return this.finishNode(node, "SequenceExpression"); - } - return expr; - }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // Parse an assignment expression. This includes applications of - // operators like `+=`. + /** + * Mapping of messages to be used in Babel. + * Messages can include $0-style placeholders. + */ - pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.match(_tokenizerTypes.types._yield) && this.state.inGenerator) { - return this.parseYield(); - } + var MESSAGES = /*istanbul ignore next*/exports.MESSAGES = { + tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence", + classesIllegalBareSuper: "Illegal use of bare super", + classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead", + scopeDuplicateDeclaration: "Duplicate declaration $1", + settersNoRest: "Setters aren't allowed to have a rest", + noAssignmentsInForHead: "No assignments allowed in for-in/of head", + expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier", + invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue", + readOnly: "$1 is read-only", + unknownForHead: "Unknown node type $1 in ForStatement", + didYouMean: "Did you mean $1?", + codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.", + missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", + unsupportedOutputType: "Unsupported output type $1", + illegalMethodName: "Illegal method name $1", + lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated", - var failOnShorthandAssign = undefined; - if (refShorthandDefaultPos) { - failOnShorthandAssign = false; - } else { - refShorthandDefaultPos = { start: 0 }; - failOnShorthandAssign = true; - } + modulesIllegalExportName: "Illegal export $1", + modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes", - var startPos = this.state.start; - var startLoc = this.state.startLoc; + undeclaredVariable: "Reference to undeclared variable $1", + undeclaredVariableType: "Referencing a type alias outside of a type annotation", + undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?", - if (this.match(_tokenizerTypes.types.parenL) || this.match(_tokenizerTypes.types.name)) { - this.state.potentialArrowAt = this.state.start; - } + traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.", + traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", + traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2", + traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type", - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); - if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); - if (this.state.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.state.value; - node.left = this.match(_tokenizerTypes.types.eq) ? this.toAssignable(left) : left; - refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly + pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3", + pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3", + pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4", + pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3" + }; - this.checkLVal(left); + /** + * Get a message with $0 placeholders replaced by arguments. + */ - if (left.extra && left.extra.parenthesized) { - var errorMsg = undefined; - if (left.type === "ObjectPattern") { - errorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { - errorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - if (errorMsg) { - this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); - } - } + /* eslint max-len: 0 */ - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); + function get(key) { + /*istanbul ignore next*/ + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; } - return left; - }; - - // Parse a ternary conditional (`?:`) operator. + var msg = MESSAGES[key]; + if (!msg) throw new ReferenceError( /*istanbul ignore next*/"Unknown message " + /*istanbul ignore next*/(0, _stringify2.default)(key)); - pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(_tokenizerTypes.types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(_tokenizerTypes.types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; - }; + // stringify args + args = parseArgs(args); - // Start the precedence parser. + // replace $0 placeholders with args + return msg.replace(/\$(\d+)/g, function (str, i) { + return args[i - 1]; + }); + } - pp.parseExprOps = function (noIn, refShorthandDefaultPos) { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } else { - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); - } - }; + /** + * Stingify arguments to be used inside messages. + */ - // 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. + function parseArgs(args) { + return args.map(function (val) { + if (val != null && val.inspect) { + return val.inspect(); + } else { + try { + return (/*istanbul ignore next*/(0, _stringify2.default)(val) || val + "" + ); + } catch (e) { + return util.inspect(val); + } + } + }); + } - pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.state.type.binop; - if (prec != null && (!noIn || !this.match(_tokenizerTypes.types._in))) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.left = left; - node.operator = this.state.value; +/***/ }, +/* 333 */ +/***/ function(module, exports, __webpack_require__) { - if (node.operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument) { - this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); - } + module.exports = __webpack_require__(334); - var op = this.state.type; - this.next(); - var startPos = this.state.start; - var startLoc = this.state.startLoc; - node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); +/***/ }, +/* 334 */ +/***/ function(module, exports) { - this.finishNode(node, op === _tokenizerTypes.types.logicalOR || op === _tokenizerTypes.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - return left; + module.exports = { + "builtin": { + "Array": false, + "ArrayBuffer": false, + "Boolean": false, + "constructor": false, + "DataView": false, + "Date": false, + "decodeURI": false, + "decodeURIComponent": false, + "encodeURI": false, + "encodeURIComponent": false, + "Error": false, + "escape": false, + "eval": false, + "EvalError": false, + "Float32Array": false, + "Float64Array": false, + "Function": false, + "hasOwnProperty": false, + "Infinity": false, + "Int16Array": false, + "Int32Array": false, + "Int8Array": false, + "isFinite": false, + "isNaN": false, + "isPrototypeOf": false, + "JSON": false, + "Map": false, + "Math": false, + "NaN": false, + "Number": false, + "Object": false, + "parseFloat": false, + "parseInt": false, + "Promise": false, + "propertyIsEnumerable": false, + "Proxy": false, + "RangeError": false, + "ReferenceError": false, + "Reflect": false, + "RegExp": false, + "Set": false, + "String": false, + "Symbol": false, + "SyntaxError": false, + "System": false, + "toLocaleString": false, + "toString": false, + "TypeError": false, + "Uint16Array": false, + "Uint32Array": false, + "Uint8Array": false, + "Uint8ClampedArray": false, + "undefined": false, + "unescape": false, + "URIError": false, + "valueOf": false, + "WeakMap": false, + "WeakSet": false + }, + "es5": { + "Array": false, + "Boolean": false, + "constructor": false, + "Date": false, + "decodeURI": false, + "decodeURIComponent": false, + "encodeURI": false, + "encodeURIComponent": false, + "Error": false, + "escape": false, + "eval": false, + "EvalError": false, + "Function": false, + "hasOwnProperty": false, + "Infinity": false, + "isFinite": false, + "isNaN": false, + "isPrototypeOf": false, + "JSON": false, + "Math": false, + "NaN": false, + "Number": false, + "Object": false, + "parseFloat": false, + "parseInt": false, + "propertyIsEnumerable": false, + "RangeError": false, + "ReferenceError": false, + "RegExp": false, + "String": false, + "SyntaxError": false, + "toLocaleString": false, + "toString": false, + "TypeError": false, + "undefined": false, + "unescape": false, + "URIError": false, + "valueOf": false + }, + "es6": { + "Array": false, + "ArrayBuffer": false, + "Boolean": false, + "constructor": false, + "DataView": false, + "Date": false, + "decodeURI": false, + "decodeURIComponent": false, + "encodeURI": false, + "encodeURIComponent": false, + "Error": false, + "escape": false, + "eval": false, + "EvalError": false, + "Float32Array": false, + "Float64Array": false, + "Function": false, + "hasOwnProperty": false, + "Infinity": false, + "Int16Array": false, + "Int32Array": false, + "Int8Array": false, + "isFinite": false, + "isNaN": false, + "isPrototypeOf": false, + "JSON": false, + "Map": false, + "Math": false, + "NaN": false, + "Number": false, + "Object": false, + "parseFloat": false, + "parseInt": false, + "Promise": false, + "propertyIsEnumerable": false, + "Proxy": false, + "RangeError": false, + "ReferenceError": false, + "Reflect": false, + "RegExp": false, + "Set": false, + "String": false, + "Symbol": false, + "SyntaxError": false, + "System": false, + "toLocaleString": false, + "toString": false, + "TypeError": false, + "Uint16Array": false, + "Uint32Array": false, + "Uint8Array": false, + "Uint8ClampedArray": false, + "undefined": false, + "unescape": false, + "URIError": false, + "valueOf": false, + "WeakMap": false, + "WeakSet": false + }, + "browser": { + "addEventListener": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffectReadOnly": false, + "AnimationEffectTiming": false, + "AnimationEffectTimingReadOnly": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "applicationCache": false, + "ApplicationCache": false, + "ApplicationCacheErrorEvent": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioDestinationNode": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioProcessingEvent": false, + "AutocompleteErrorEvent": false, + "BarProp": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "blur": false, + "btoa": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "ClientRect": false, + "ClientRectList": false, + "ClipboardEvent": false, + "close": false, + "closed": false, + "CloseEvent": false, + "Comment": false, + "CompositionEvent": false, + "confirm": false, + "console": false, + "ConvolverNode": false, + "Credential": false, + "CredentialsContainer": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSS": false, + "CSSAnimation": false, + "CSSFontFaceRule": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSMediaRule": false, + "CSSPageRule": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSSupportsRule": false, + "CSSTransition": false, + "CSSUnknownRule": false, + "CSSViewportRule": false, + "CustomEvent": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "Debug": false, + "defaultStatus": false, + "defaultstatus": false, + "DelayNode": false, + "DeviceMotionEvent": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "dispatchEvent": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMParser": false, + "DOMSettableTokenList": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "Element": false, + "ElementTimeControl": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "FederatedCredential": false, + "fetch": false, + "File": false, + "FileError": false, + "FileList": false, + "FileReader": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontFace": false, + "FormData": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadButton": false, + "GamepadEvent": false, + "getComputedStyle": false, + "getSelection": false, + "HashChangeEvent": false, + "Headers": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAppletElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBlockquoteElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLContentElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLIsIndexElement": false, + "HTMLKeygenElement": false, + "HTMLLabelElement": false, + "HTMLLayerElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectElement": false, + "HTMLShadowElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBEnvironment": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "Image": false, + "ImageBitmap": false, + "ImageData": false, + "indexedDB": false, + "innerHeight": false, + "innerWidth": false, + "InputEvent": false, + "InputMethodContext": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "Intl": false, + "KeyboardEvent": false, + "KeyframeEffect": false, + "KeyframeEffectReadOnly": false, + "length": false, + "localStorage": false, + "location": false, + "Location": false, + "locationbar": false, + "matchMedia": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyEvent": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaSource": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "navigator": false, + "Navigator": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "onbeforeunload": true, + "onblur": true, + "onerror": true, + "onfocus": true, + "onload": true, + "onresize": true, + "onunload": true, + "open": false, + "openDatabase": false, + "opener": false, + "opera": false, + "Option": false, + "OscillatorNode": false, + "outerHeight": false, + "outerWidth": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "performance": false, + "Performance": false, + "PerformanceEntry": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceResourceTiming": false, + "PerformanceTiming": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "personalbar": false, + "Plugin": false, + "PluginArray": false, + "PopStateEvent": false, + "postMessage": false, + "print": false, + "ProcessingInstruction": false, + "ProgressEvent": false, + "prompt": false, + "PushManager": false, + "PushSubscription": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStream": false, + "ReadableStream": false, + "removeEventListener": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "resizeTo": false, + "Response": false, + "RTCIceCandidate": false, + "RTCSessionDescription": false, + "RTCPeerConnection": false, + "screen": false, + "Screen": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "SharedKeyframeList": false, + "SharedWorker": false, + "showModalDialog": false, + "SiteBoundCredential": false, + "speechSynthesis": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "status": false, + "statusbar": false, + "stop": false, + "Storage": false, + "StorageEvent": false, + "styleMedia": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubtleCrypto": false, + "SVGAElement": false, + "SVGAltGlyphDefElement": false, + "SVGAltGlyphElement": false, + "SVGAltGlyphItemElement": false, + "SVGAngle": false, + "SVGAnimateColorElement": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPathData": false, + "SVGAnimatedPoints": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGColor": false, + "SVGColorProfileElement": false, + "SVGColorProfileRule": false, + "SVGComponentTransferFunctionElement": false, + "SVGCSSRule": false, + "SVGCursorElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGDiscardElement": false, + "SVGDocument": false, + "SVGElement": false, + "SVGElementInstance": false, + "SVGElementInstanceList": false, + "SVGEllipseElement": false, + "SVGEvent": false, + "SVGExternalResourcesRequired": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGFilterPrimitiveStandardAttributes": false, + "SVGFitToViewBox": false, + "SVGFontElement": false, + "SVGFontFaceElement": false, + "SVGFontFaceFormatElement": false, + "SVGFontFaceNameElement": false, + "SVGFontFaceSrcElement": false, + "SVGFontFaceUriElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGlyphElement": false, + "SVGGlyphRefElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGHKernElement": false, + "SVGICCColor": false, + "SVGImageElement": false, + "SVGLangSpace": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGLocatable": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMissingGlyphElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPaint": false, + "SVGPathElement": false, + "SVGPathSeg": false, + "SVGPathSegArcAbs": false, + "SVGPathSegArcRel": false, + "SVGPathSegClosePath": false, + "SVGPathSegCurvetoCubicAbs": false, + "SVGPathSegCurvetoCubicRel": false, + "SVGPathSegCurvetoCubicSmoothAbs": false, + "SVGPathSegCurvetoCubicSmoothRel": false, + "SVGPathSegCurvetoQuadraticAbs": false, + "SVGPathSegCurvetoQuadraticRel": false, + "SVGPathSegCurvetoQuadraticSmoothAbs": false, + "SVGPathSegCurvetoQuadraticSmoothRel": false, + "SVGPathSegLinetoAbs": false, + "SVGPathSegLinetoHorizontalAbs": false, + "SVGPathSegLinetoHorizontalRel": false, + "SVGPathSegLinetoRel": false, + "SVGPathSegLinetoVerticalAbs": false, + "SVGPathSegLinetoVerticalRel": false, + "SVGPathSegList": false, + "SVGPathSegMovetoAbs": false, + "SVGPathSegMovetoRel": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGRenderingIntent": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStylable": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTests": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformable": false, + "SVGTransformList": false, + "SVGTRefElement": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGURIReference": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SVGViewSpec": false, + "SVGVKernElement": false, + "SVGZoomAndPan": false, + "SVGZoomEvent": false, + "Text": false, + "TextDecoder": false, + "TextEncoder": false, + "TextEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TimeEvent": false, + "TimeRanges": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransitionEvent": false, + "TreeWalker": false, + "UIEvent": false, + "URL": false, + "URLSearchParams": false, + "ValidityState": false, + "VTTCue": false, + "WaveShaperNode": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLProgram": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLTexture": false, + "WebGLUniformLocation": false, + "WebSocket": false, + "WheelEvent": false, + "window": false, + "Window": false, + "Worker": false, + "XDomainRequest": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestProgressEvent": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathException": false, + "XPathExpression": false, + "XPathNamespace": false, + "XPathNSResolver": false, + "XPathResult": false, + "XSLTProcessor": false + }, + "worker": { + "applicationCache": false, + "atob": false, + "Blob": false, + "BroadcastChannel": false, + "btoa": false, + "Cache": false, + "caches": false, + "clearInterval": false, + "clearTimeout": false, + "close": true, + "console": false, + "fetch": false, + "FileReaderSync": false, + "FormData": false, + "Headers": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "ImageData": false, + "importScripts": true, + "indexedDB": false, + "location": false, + "MessageChannel": false, + "MessagePort": false, + "name": false, + "navigator": false, + "Notification": false, + "onclose": true, + "onconnect": true, + "onerror": true, + "onlanguagechange": true, + "onmessage": true, + "onoffline": true, + "ononline": true, + "onrejectionhandled": true, + "onunhandledrejection": true, + "performance": false, + "Performance": false, + "PerformanceEntry": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceResourceTiming": false, + "PerformanceTiming": false, + "postMessage": true, + "Promise": false, + "Request": false, + "Response": false, + "self": true, + "ServiceWorkerRegistration": false, + "setInterval": false, + "setTimeout": false, + "TextDecoder": false, + "TextEncoder": false, + "URL": false, + "URLSearchParams": false, + "WebSocket": false, + "Worker": false, + "XMLHttpRequest": false + }, + "node": { + "__dirname": false, + "__filename": false, + "arguments": false, + "Buffer": false, + "clearImmediate": false, + "clearInterval": false, + "clearTimeout": false, + "console": false, + "exports": true, + "GLOBAL": false, + "global": false, + "Intl": false, + "module": false, + "process": false, + "require": false, + "root": false, + "setImmediate": false, + "setInterval": false, + "setTimeout": false + }, + "commonjs": { + "exports": true, + "module": false, + "require": false, + "global": false + }, + "amd": { + "define": false, + "require": false + }, + "mocha": { + "after": false, + "afterEach": false, + "before": false, + "beforeEach": false, + "context": false, + "describe": false, + "it": false, + "mocha": false, + "run": false, + "setup": false, + "specify": false, + "suite": false, + "suiteSetup": false, + "suiteTeardown": false, + "teardown": false, + "test": false, + "xcontext": false, + "xdescribe": false, + "xit": false, + "xspecify": false + }, + "jasmine": { + "afterAll": false, + "afterEach": false, + "beforeAll": false, + "beforeEach": false, + "describe": false, + "expect": false, + "fail": false, + "fdescribe": false, + "fit": false, + "it": false, + "jasmine": false, + "pending": false, + "runs": false, + "spyOn": false, + "waits": false, + "waitsFor": false, + "xdescribe": false, + "xit": false + }, + "jest": { + "afterAll": false, + "afterEach": false, + "beforeAll": false, + "beforeEach": false, + "check": false, + "describe": false, + "expect": false, + "gen": false, + "it": false, + "fit": false, + "jest": false, + "pit": false, + "require": false, + "test": false, + "xdescribe": false, + "xit": false, + "xtest": false + }, + "qunit": { + "asyncTest": false, + "deepEqual": false, + "equal": false, + "expect": false, + "module": false, + "notDeepEqual": false, + "notEqual": false, + "notOk": false, + "notPropEqual": false, + "notStrictEqual": false, + "ok": false, + "propEqual": false, + "QUnit": false, + "raises": false, + "start": false, + "stop": false, + "strictEqual": false, + "test": false, + "throws": false + }, + "phantomjs": { + "console": true, + "exports": true, + "phantom": true, + "require": true, + "WebPage": true + }, + "couch": { + "emit": false, + "exports": false, + "getRow": false, + "log": false, + "module": false, + "provides": false, + "require": false, + "respond": false, + "send": false, + "start": false, + "sum": false + }, + "rhino": { + "defineClass": false, + "deserialize": false, + "gc": false, + "help": false, + "importClass": false, + "importPackage": false, + "java": false, + "load": false, + "loadClass": false, + "Packages": false, + "print": false, + "quit": false, + "readFile": false, + "readUrl": false, + "runCommand": false, + "seal": false, + "serialize": false, + "spawn": false, + "sync": false, + "toint32": false, + "version": false + }, + "nashorn": { + "__DIR__": false, + "__FILE__": false, + "__LINE__": false, + "com": false, + "edu": false, + "exit": false, + "Java": false, + "java": false, + "javafx": false, + "JavaImporter": false, + "javax": false, + "JSAdapter": false, + "load": false, + "loadWithNewGlobal": false, + "org": false, + "Packages": false, + "print": false, + "quit": false + }, + "wsh": { + "ActiveXObject": true, + "Enumerator": true, + "GetObject": true, + "ScriptEngine": true, + "ScriptEngineBuildVersion": true, + "ScriptEngineMajorVersion": true, + "ScriptEngineMinorVersion": true, + "VBArray": true, + "WScript": true, + "WSH": true, + "XDomainRequest": true + }, + "jquery": { + "$": false, + "jQuery": false + }, + "yui": { + "Y": false, + "YUI": false, + "YUI_config": false + }, + "shelljs": { + "cat": false, + "cd": false, + "chmod": false, + "config": false, + "cp": false, + "dirs": false, + "echo": false, + "env": false, + "error": false, + "exec": false, + "exit": false, + "find": false, + "grep": false, + "ls": false, + "ln": false, + "mkdir": false, + "mv": false, + "popd": false, + "pushd": false, + "pwd": false, + "rm": false, + "sed": false, + "set": false, + "target": false, + "tempdir": false, + "test": false, + "touch": false, + "which": false + }, + "prototypejs": { + "$": false, + "$$": false, + "$A": false, + "$break": false, + "$continue": false, + "$F": false, + "$H": false, + "$R": false, + "$w": false, + "Abstract": false, + "Ajax": false, + "Autocompleter": false, + "Builder": false, + "Class": false, + "Control": false, + "Draggable": false, + "Draggables": false, + "Droppables": false, + "Effect": false, + "Element": false, + "Enumerable": false, + "Event": false, + "Field": false, + "Form": false, + "Hash": false, + "Insertion": false, + "ObjectRange": false, + "PeriodicalExecuter": false, + "Position": false, + "Prototype": false, + "Scriptaculous": false, + "Selector": false, + "Sortable": false, + "SortableObserver": false, + "Sound": false, + "Template": false, + "Toggle": false, + "Try": false + }, + "meteor": { + "$": false, + "_": false, + "Accounts": false, + "AccountsClient": false, + "AccountsServer": false, + "AccountsCommon": false, + "App": false, + "Assets": false, + "Blaze": false, + "check": false, + "Cordova": false, + "DDP": false, + "DDPServer": false, + "DDPRateLimiter": false, + "Deps": false, + "EJSON": false, + "Email": false, + "HTTP": false, + "Log": false, + "Match": false, + "Meteor": false, + "Mongo": false, + "MongoInternals": false, + "Npm": false, + "Package": false, + "Plugin": false, + "process": false, + "Random": false, + "ReactiveDict": false, + "ReactiveVar": false, + "Router": false, + "ServiceConfiguration": false, + "Session": false, + "share": false, + "Spacebars": false, + "Template": false, + "Tinytest": false, + "Tracker": false, + "UI": false, + "Utils": false, + "WebApp": false, + "WebAppInternals": false + }, + "mongo": { + "_isWindows": false, + "_rand": false, + "BulkWriteResult": false, + "cat": false, + "cd": false, + "connect": false, + "db": false, + "getHostName": false, + "getMemInfo": false, + "hostname": false, + "ISODate": false, + "listFiles": false, + "load": false, + "ls": false, + "md5sumFile": false, + "mkdir": false, + "Mongo": false, + "NumberInt": false, + "NumberLong": false, + "ObjectId": false, + "PlanCache": false, + "print": false, + "printjson": false, + "pwd": false, + "quit": false, + "removeFile": false, + "rs": false, + "sh": false, + "UUID": false, + "version": false, + "WriteResult": false + }, + "applescript": { + "$": false, + "Application": false, + "Automation": false, + "console": false, + "delay": false, + "Library": false, + "ObjC": false, + "ObjectSpecifier": false, + "Path": false, + "Progress": false, + "Ref": false + }, + "serviceworker": { + "caches": false, + "Cache": false, + "CacheStorage": false, + "Client": false, + "clients": false, + "Clients": false, + "ExtendableEvent": false, + "ExtendableMessageEvent": false, + "FetchEvent": false, + "importScripts": false, + "registration": false, + "self": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerGlobalScope": false, + "ServiceWorkerMessageEvent": false, + "ServiceWorkerRegistration": false, + "skipWaiting": false, + "WindowClient": false + }, + "atomtest": { + "advanceClock": false, + "fakeClearInterval": false, + "fakeClearTimeout": false, + "fakeSetInterval": false, + "fakeSetTimeout": false, + "resetTimeouts": false, + "waitsForPromise": false + }, + "embertest": { + "andThen": false, + "click": false, + "currentPath": false, + "currentRouteName": false, + "currentURL": false, + "fillIn": false, + "find": false, + "findWithAssert": false, + "keyEvent": false, + "pauseTest": false, + "triggerEvent": false, + "visit": false + }, + "protractor": { + "$": false, + "$$": false, + "browser": false, + "By": false, + "by": false, + "DartObject": false, + "element": false, + "protractor": false + }, + "shared-node-browser": { + "clearInterval": false, + "clearTimeout": false, + "console": false, + "setInterval": false, + "setTimeout": false + }, + "webextensions": { + "browser": false, + "chrome": false, + "opr": false + }, + "greasemonkey": { + "GM_addStyle": false, + "GM_deleteValue": false, + "GM_getResourceText": false, + "GM_getResourceURL": false, + "GM_getValue": false, + "GM_info": false, + "GM_listValues": false, + "GM_log": false, + "GM_openInTab": false, + "GM_registerMenuCommand": false, + "GM_setClipboard": false, + "GM_setValue": false, + "GM_xmlhttpRequest": false, + "unsafeWindow": false + } }; - // Parse unary operators, both prefix and postfix. - - pp.parseMaybeUnary = function (refShorthandDefaultPos) { - if (this.state.type.prefix) { - var node = this.startNode(); - var update = this.match(_tokenizerTypes.types.incDec); - node.operator = this.state.value; - node.prefix = true; - this.next(); +/***/ }, +/* 335 */ +/***/ function(module, exports, __webpack_require__) { - var argType = this.state.type; - this.addExtra(node, "parenthesizedArgument", argType === _tokenizerTypes.types.parenL); - node.argument = this.parseMaybeUnary(); + "use strict"; - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } + exports.__esModule = true; + exports.scope = exports.path = undefined; - if (update) { - this.checkLVal(node.argument); - } else if (this.state.strict && node.operator === "delete" && node.argument.type === "Identifier") { - this.raise(node.start, "Deleting local variable in strict mode"); - } + var _weakMap = __webpack_require__(336); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } + var _weakMap2 = _interopRequireDefault(_weakMap); - var startPos = this.state.start, - startLoc = this.state.startLoc; - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - while (this.state.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.state.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; - }; + exports.clear = clear; - // Parse call, dot, and `[]`-subscript expressions. + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - pp.parseExprSubscripts = function (refShorthandDefaultPos) { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseExprAtom(refShorthandDefaultPos); + var path = exports.path = new _weakMap2.default(); + var scope = exports.scope = new _weakMap2.default(); - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } + function clear() { + exports.path = path = new _weakMap2.default(); + exports.scope = scope = new _weakMap2.default(); + } - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } +/***/ }, +/* 336 */ +/***/ function(module, exports, __webpack_require__) { - return this.parseSubscripts(expr, startPos, startLoc); - }; + module.exports = { "default": __webpack_require__(337), __esModule: true }; - pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { - for (;;) { - if (!noCalls && this.eat(_tokenizerTypes.types.doubleColon)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.callee = this.parseNoCallExpr(); - return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls); - } else if (this.eat(_tokenizerTypes.types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseIdentifier(true); - node.computed = false; - base = this.finishNode(node, "MemberExpression"); - } else if (this.eat(_tokenizerTypes.types.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(_tokenizerTypes.types.bracketR); - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.match(_tokenizerTypes.types.parenL)) { - var possibleAsync = this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon(); - this.next(); +/***/ }, +/* 337 */ +/***/ function(module, exports, __webpack_require__) { - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(_tokenizerTypes.types.parenR, this.hasPlugin("trailingFunctionCommas"), possibleAsync); - base = this.finishNode(node, "CallExpression"); + __webpack_require__(270); + __webpack_require__(5); + __webpack_require__(338); + module.exports = __webpack_require__(18).WeakMap; - if (possibleAsync && this.shouldParseAsyncArrow()) { - return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); - } else { - this.toReferencedList(node.arguments); - } - } else if (this.match(_tokenizerTypes.types.backQuote)) { - var node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(); - base = this.finishNode(node, "TaggedTemplateExpression"); - } else { - return base; - } - } - }; +/***/ }, +/* 338 */ +/***/ function(module, exports, __webpack_require__) { - pp.parseCallExpressionArguments = function (close, allowTrailingComma, possibleAsyncArrow) { - var innerParenStart = undefined; + 'use strict'; + var each = __webpack_require__(310)(0) + , redefine = __webpack_require__(31) + , meta = __webpack_require__(67) + , assign = __webpack_require__(339) + , weak = __webpack_require__(340) + , isObject = __webpack_require__(24) + , getWeak = meta.getWeak + , isExtensible = Object.isExtensible + , uncaughtFrozenStore = weak.ufstore + , tmp = {} + , InternalMap; + + var wrapper = function(get){ + return function WeakMap(){ + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(_tokenizerTypes.types.comma); - if (allowTrailingComma && this.eat(close)) break; + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key){ + if(isObject(key)){ + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value){ + return weak.def(this, key, value); + } + }; + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = __webpack_require__(309)('WeakMap', wrapper, methods, weak, true, true); + + // IE11 WeakMap frozen keys fix + if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function(key){ + var proto = $WeakMap.prototype + , method = proto[key]; + redefine(proto, key, function(a, b){ + // store frozen objects on internal weakmap shim + if(isObject(a) && !isExtensible(a)){ + if(!this._f)this._f = new InternalMap; + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); + } - // we need to make sure that if this is an async arrow functions, that we don't allow inner parens inside the params - if (this.match(_tokenizerTypes.types.parenL) && !innerParenStart) { - innerParenStart = this.state.start; - } +/***/ }, +/* 339 */ +/***/ function(module, exports, __webpack_require__) { - elts.push(this.parseExprListItem()); - } + 'use strict'; + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(36) + , gOPS = __webpack_require__(72) + , pIE = __webpack_require__(73) + , toObject = __webpack_require__(50) + , IObject = __webpack_require__(11) + , $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = !$assign || __webpack_require__(27)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; + } : $assign; - // we found an async arrow function so let's not allow any inner parens - if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { - this.unexpected(); - } +/***/ }, +/* 340 */ +/***/ function(module, exports, __webpack_require__) { - return elts; + 'use strict'; + var redefineAll = __webpack_require__(303) + , getWeak = __webpack_require__(67).getWeak + , anObject = __webpack_require__(23) + , isObject = __webpack_require__(24) + , anInstance = __webpack_require__(304) + , forOf = __webpack_require__(305) + , createArrayMethod = __webpack_require__(310) + , $has = __webpack_require__(32) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); + }; + var UncaughtFrozenStore = function(){ + this.a = []; + }; + var findUncaughtFrozen = function(store, key){ + return arrayFind(store.a, function(it){ + return it[0] === key; + }); }; - - pp.shouldParseAsyncArrow = function () { - return this.match(_tokenizerTypes.types.arrow); + UncaughtFrozenStore.prototype = { + get: function(key){ + var entry = findUncaughtFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findUncaughtFrozen(this, key); + }, + set: function(key, value){ + var entry = findUncaughtFrozen(this, key); + if(entry)entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function(key){ + var index = arrayFindIndex(this.a, function(it){ + return it[0] === key; + }); + if(~index)this.a.splice(index, 1); + return !!~index; + } }; - pp.parseAsyncArrowFromCallExpression = function (node, call) { - if (!this.hasPlugin("asyncFunctions")) this.unexpected(); - this.expect(_tokenizerTypes.types.arrow); - return this.parseArrowExpression(node, call.arguments, true); + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function(that, key, value){ + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore }; - // Parse a no-call expression (like argument of `new` or `::` operators). +/***/ }, +/* 341 */ +/***/ function(module, exports, __webpack_require__) { - pp.parseNoCallExpr = function () { - var startPos = this.state.start, - startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - }; + "use strict"; - // 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 `{}`. + exports.__esModule = true; - pp.parseExprAtom = function (refShorthandDefaultPos) { - var node = undefined, - canBeArrow = this.state.potentialArrowAt === this.state.start; - switch (this.state.type) { - case _tokenizerTypes.types._super: - if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) { - this.raise(this.state.start, "'super' outside of function or class"); - } + var _getIterator2 = __webpack_require__(3); - node = this.startNode(); - this.next(); - if (!this.match(_tokenizerTypes.types.parenL) && !this.match(_tokenizerTypes.types.bracketL) && !this.match(_tokenizerTypes.types.dot)) { - this.unexpected(); - } - if (this.match(_tokenizerTypes.types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, "super() outside of class constructor"); - } - return this.finishNode(node, "Super"); + var _getIterator3 = _interopRequireDefault(_getIterator2); - case _tokenizerTypes.types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); + exports.findParent = findParent; + exports.find = find; + exports.getFunctionParent = getFunctionParent; + exports.getStatementParent = getStatementParent; + exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; + exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; + exports.getAncestry = getAncestry; + exports.inType = inType; + exports.inShadow = inShadow; - case _tokenizerTypes.types._yield: - if (this.state.inGenerator) this.unexpected(); + var _babelTypes = __webpack_require__(63); - case _tokenizerTypes.types.name: - node = this.startNode(); - var allowAwait = this.hasPlugin("asyncFunctions") && this.state.value === "await" && this.state.inAsync; - var allowYield = this.shouldAllowYieldIdentifier(); - var id = this.parseIdentifier(allowAwait || allowYield); + var t = _interopRequireWildcard(_babelTypes); - if (this.hasPlugin("asyncFunctions")) { - if (id.name === "await") { - if (this.state.inAsync || this.inModule) { - return this.parseAwait(node); - } - } else if (id.name === "async" && this.match(_tokenizerTypes.types._function) && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, false, false, true); - } else if (canBeArrow && id.name === "async" && this.match(_tokenizerTypes.types.name)) { - var params = [this.parseIdentifier()]; - this.expect(_tokenizerTypes.types.arrow); - // let foo = bar => {}; - return this.parseArrowExpression(node, params, true); - } - } + var _index = __webpack_require__(61); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokenizerTypes.types.arrow)) { - return this.parseArrowExpression(node, [id]); - } + var _index2 = _interopRequireDefault(_index); - return id; + 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; } } - case _tokenizerTypes.types._do: - if (this.hasPlugin("doExpressions")) { - var _node = this.startNode(); - this.next(); - var oldInFunction = this.state.inFunction; - var oldLabels = this.state.labels; - this.state.labels = []; - this.state.inFunction = false; - _node.body = this.parseBlock(false, true); - this.state.inFunction = oldInFunction; - this.state.labels = oldLabels; - return this.finishNode(_node, "DoExpression"); - } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - case _tokenizerTypes.types.regexp: - var value = this.state.value; - node = this.parseLiteral(value.value, "RegExpLiteral"); - node.pattern = value.pattern; - node.flags = value.flags; - return node; + function findParent(callback) { + var path = this; + while (path = path.parentPath) { + if (callback(path)) return path; + } + return null; + } - case _tokenizerTypes.types.num: - return this.parseLiteral(this.state.value, "NumericLiteral"); + function find(callback) { + var path = this; + do { + if (callback(path)) return path; + } while (path = path.parentPath); + return null; + } - case _tokenizerTypes.types.string: - return this.parseLiteral(this.state.value, "StringLiteral"); + function getFunctionParent() { + return this.findParent(function (path) { + return path.isFunction() || path.isProgram(); + }); + } - case _tokenizerTypes.types._null: - node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); + function getStatementParent() { + var path = this; + do { + if (Array.isArray(path.container)) { + return path; + } + } while (path = path.parentPath); + } - case _tokenizerTypes.types._true:case _tokenizerTypes.types._false: - node = this.startNode(); - node.value = this.match(_tokenizerTypes.types._true); - this.next(); - return this.finishNode(node, "BooleanLiteral"); + function getEarliestCommonAncestorFrom(paths) { + return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { + var earliest = void 0; + var keys = t.VISITOR_KEYS[deepest.type]; - case _tokenizerTypes.types.parenL: - return this.parseParenAndDistinguishExpression(null, null, canBeArrow); + for (var _iterator = ancestries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; - case _tokenizerTypes.types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(_tokenizerTypes.types.bracketR, true, true, refShorthandDefaultPos); - this.toReferencedList(node.elements); - return this.finishNode(node, "ArrayExpression"); + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } - case _tokenizerTypes.types.braceL: - return this.parseObj(false, refShorthandDefaultPos); + var ancestry = _ref; - case _tokenizerTypes.types._function: - return this.parseFunctionExpression(); + var path = ancestry[i + 1]; - case _tokenizerTypes.types.at: - this.parseDecorators(); + if (!earliest) { + earliest = path; + continue; + } - case _tokenizerTypes.types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); + if (path.listKey && earliest.listKey === path.listKey) { + if (path.key < earliest.key) { + earliest = path; + continue; + } + } - case _tokenizerTypes.types._new: - return this.parseNew(); + var earliestKeyIndex = keys.indexOf(earliest.parentKey); + var currentKeyIndex = keys.indexOf(path.parentKey); + if (earliestKeyIndex > currentKeyIndex) { + earliest = path; + } + } - case _tokenizerTypes.types.backQuote: - return this.parseTemplate(); + return earliest; + }); + } - case _tokenizerTypes.types.doubleColon: - node = this.startNode(); - this.next(); - node.object = null; - var callee = node.callee = this.parseNoCallExpr(); - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - this.raise(callee.start, "Binding should be performed on object property."); - } + function getDeepestCommonAncestorFrom(paths, filter) { + var _this = this; - default: - this.unexpected(); + if (!paths.length) { + return this; } - }; - pp.parseFunctionExpression = function () { - var node = this.startNode(); - var meta = this.parseIdentifier(true); - if (this.state.inGenerator && this.eat(_tokenizerTypes.types.dot) && this.hasPlugin("functionSent")) { - return this.parseMetaProperty(node, meta, "sent"); - } else { - return this.parseFunction(node, false); + if (paths.length === 1) { + return paths[0]; } - }; - pp.parseMetaProperty = function (node, meta, propertyName) { - node.meta = meta; - node.property = this.parseIdentifier(true); + var minDepth = Infinity; - if (node.property.name !== propertyName) { - this.raise(node.property.start, "The only valid meta property for new is " + meta.name + "." + propertyName); - } + var lastCommonIndex = void 0, + lastCommon = void 0; - return this.finishNode(node, "MetaProperty"); - }; + var ancestries = paths.map(function (path) { + var ancestry = []; - pp.parseLiteral = function (value, type) { - var node = this.startNode(); - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - }; + do { + ancestry.unshift(path); + } while ((path = path.parentPath) && path !== _this); - pp.parseParenExpression = function () { - this.expect(_tokenizerTypes.types.parenL); - var val = this.parseExpression(); - this.expect(_tokenizerTypes.types.parenR); - return val; - }; + if (ancestry.length < minDepth) { + minDepth = ancestry.length; + } - pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow, isAsync, allowOptionalCommaStart) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; + return ancestry; + }); - var val = undefined; - this.next(); + var first = ancestries[0]; - var innerStartPos = this.state.start, - innerStartLoc = this.state.startLoc; - var exprList = [], - first = true; - var refShorthandDefaultPos = { start: 0 }, - spreadStart = undefined, - optionalCommaStart = undefined; - while (!this.match(_tokenizerTypes.types.parenR)) { - if (first) { - first = false; - } else { - this.expect(_tokenizerTypes.types.comma); - if (this.match(_tokenizerTypes.types.parenR) && this.hasPlugin("trailingFunctionCommas")) { - optionalCommaStart = this.state.start; - break; - } - } + depthLoop: for (var i = 0; i < minDepth; i++) { + var shouldMatch = first[i]; - if (this.match(_tokenizerTypes.types.ellipsis)) { - var spreadNodeStartPos = this.state.start, - spreadNodeStartLoc = this.state.startLoc; - spreadStart = this.state.start; - exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartLoc, spreadNodeStartPos)); - break; - } else { - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); - } - } + for (var _iterator2 = ancestries, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; - var innerEndPos = this.state.start; - var innerEndLoc = this.state.startLoc; - this.expect(_tokenizerTypes.types.parenR); + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokenizerTypes.types.arrow)) { - for (var _i = 0; _i < exprList.length; _i++) { - var param = exprList[_i]; - if (param.extra && param.extra.parenthesized) this.unexpected(param.extra.parenStart); + var ancestry = _ref2; + + if (ancestry[i] !== shouldMatch) { + break depthLoop; + } } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, isAsync); + lastCommonIndex = i; + lastCommon = shouldMatch; } - if (!exprList.length) { - if (isAsync) { - return; + if (lastCommon) { + if (filter) { + return filter(lastCommon, lastCommonIndex, ancestries); } else { - this.unexpected(this.state.lastTokStart); + return lastCommon; } - } - if (optionalCommaStart && !allowOptionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); - if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.toReferencedList(val.expressions); - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); } else { - val = exprList[0]; + throw new Error("Couldn't find intersection"); } + } - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); - - return val; - }; + function getAncestry() { + var path = this; + var paths = []; + do { + paths.push(path); + } while (path = path.parentPath); + return paths; + } - pp.parseParenItem = function (node) { - return node; - }; + function inType() { + var path = this; + while (path) { + for (var _iterator3 = arguments, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; - // 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 + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } - pp.parseNew = function () { - var node = this.startNode(); - var meta = this.parseIdentifier(true); + var type = _ref3; - if (this.eat(_tokenizerTypes.types.dot)) { - return this.parseMetaProperty(node, meta, "target"); + if (path.node.type === type) return true; + } + path = path.parentPath; } - node.callee = this.parseNoCallExpr(); + return false; + } - if (this.eat(_tokenizerTypes.types.parenL)) { - node.arguments = this.parseExprList(_tokenizerTypes.types.parenR, this.hasPlugin("trailingFunctionCommas")); - this.toReferencedList(node.arguments); - } else { - node.arguments = []; + function inShadow(key) { + var parentFn = this.isFunction() ? this : this.findParent(function (p) { + return p.isFunction(); + }); + if (!parentFn) return; + + if (parentFn.isFunctionExpression() || parentFn.isFunctionDeclaration()) { + var shadow = parentFn.node.shadow; + + if (shadow && (!key || shadow[key] !== false)) { + return parentFn; + } + } else if (parentFn.isArrowFunctionExpression()) { + return parentFn; } - return this.finishNode(node, "NewExpression"); - }; + return null; + } - // Parse template expression. +/***/ }, +/* 342 */ +/***/ function(module, exports, __webpack_require__) { - pp.parseTemplateElement = function () { - var elem = this.startNode(); - elem.value = { - raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), - cooked: this.state.value - }; - this.next(); - elem.tail = this.match(_tokenizerTypes.types.backQuote); - return this.finishNode(elem, "TemplateElement"); - }; + "use strict"; - pp.parseTemplate = function () { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(); - node.quasis = [curElt]; - while (!curElt.tail) { - this.expect(_tokenizerTypes.types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(_tokenizerTypes.types.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); - }; + exports.__esModule = true; - // Parse an object literal or binding pattern. + var _getIterator2 = __webpack_require__(3); - pp.parseObj = function (isPattern, refShorthandDefaultPos) { - var decorators = []; - var propHash = _Object$create(null); - var first = true; - var node = this.startNode(); + var _getIterator3 = _interopRequireDefault(_getIterator2); - node.properties = []; - this.next(); + exports.getTypeAnnotation = getTypeAnnotation; + exports._getTypeAnnotation = _getTypeAnnotation; + exports.isBaseType = isBaseType; + exports.couldBeBaseType = couldBeBaseType; + exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; + exports.isGenericType = isGenericType; - while (!this.eat(_tokenizerTypes.types.braceR)) { - if (first) { - first = false; - } else { - this.expect(_tokenizerTypes.types.comma); - if (this.eat(_tokenizerTypes.types.braceR)) break; - } + var _inferers = __webpack_require__(343); - while (this.match(_tokenizerTypes.types.at)) { - decorators.push(this.parseDecorator()); - } + var inferers = _interopRequireWildcard(_inferers); - var prop = this.startNode(), - isGenerator = false, - isAsync = false, - startPos = undefined, - startLoc = undefined; - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } + var _babelTypes = __webpack_require__(63); - if (this.hasPlugin("objectRestSpread") && this.match(_tokenizerTypes.types.ellipsis)) { - prop = this.parseSpread(); - prop.type = isPattern ? "RestProperty" : "SpreadProperty"; - node.properties.push(prop); - continue; - } + var t = _interopRequireWildcard(_babelTypes); - prop.method = false; - prop.shorthand = false; + 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; } } - if (isPattern || refShorthandDefaultPos) { - startPos = this.state.start; - startLoc = this.state.startLoc; - } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (!isPattern) { - isGenerator = this.eat(_tokenizerTypes.types.star); - } + function getTypeAnnotation() { + if (this.typeAnnotation) return this.typeAnnotation; - if (!isPattern && this.hasPlugin("asyncFunctions") && this.isContextual("async")) { - if (isGenerator) this.unexpected(); + var type = this._getTypeAnnotation() || t.anyTypeAnnotation(); + if (t.isTypeAnnotation(type)) type = type.typeAnnotation; + return this.typeAnnotation = type; + } - var asyncId = this.parseIdentifier(); - if (this.match(_tokenizerTypes.types.colon) || this.match(_tokenizerTypes.types.parenL) || this.match(_tokenizerTypes.types.braceR)) { - prop.key = asyncId; - } else { - isAsync = true; - if (this.hasPlugin("asyncGenerators")) isGenerator = this.eat(_tokenizerTypes.types.star); - this.parsePropertyName(prop); + function _getTypeAnnotation() { + var node = this.node; + + if (!node) { + if (this.key === "init" && this.parentPath.isVariableDeclarator()) { + var declar = this.parentPath.parentPath; + var declarParent = declar.parentPath; + + if (declar.key === "left" && declarParent.isForInStatement()) { + return t.stringTypeAnnotation(); } - } else { - this.parsePropertyName(prop); - } - this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos); - this.checkPropClash(prop, propHash); + if (declar.key === "left" && declarParent.isForOfStatement()) { + return t.anyTypeAnnotation(); + } - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); + return t.voidTypeAnnotation(); + } else { + return; } - - node.properties.push(prop); } - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no property"); + if (node.typeAnnotation) { + return node.typeAnnotation; } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); - }; + var inferer = inferers[node.type]; + if (inferer) { + return inferer.call(this, node); + } - pp.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) { - if (isAsync || isGenerator || this.match(_tokenizerTypes.types.parenL)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - this.parseMethod(prop, isGenerator, isAsync); - return this.finishNode(prop, "ObjectMethod"); + inferer = inferers[this.parentPath.type]; + if (inferer && inferer.validParent) { + return this.parentPath.getTypeAnnotation(); } + } - if (this.eat(_tokenizerTypes.types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - return this.finishNode(prop, "ObjectProperty"); + function isBaseType(baseName, soft) { + return _isBaseType(baseName, this.getTypeAnnotation(), soft); + } + + function _isBaseType(baseName, type, soft) { + if (baseName === "string") { + return t.isStringTypeAnnotation(type); + } else if (baseName === "number") { + return t.isNumberTypeAnnotation(type); + } else if (baseName === "boolean") { + return t.isBooleanTypeAnnotation(type); + } else if (baseName === "any") { + return t.isAnyTypeAnnotation(type); + } else if (baseName === "mixed") { + return t.isMixedTypeAnnotation(type); + } else if (baseName === "empty") { + return t.isEmptyTypeAnnotation(type); + } else if (baseName === "void") { + return t.isVoidTypeAnnotation(type); + } else { + if (soft) { + return false; + } else { + throw new Error("Unknown base type " + baseName); + } } + } - if (!prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && !this.match(_tokenizerTypes.types.comma) && !this.match(_tokenizerTypes.types.braceR)) { - if (isGenerator || isAsync || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - this.parseMethod(prop, false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.params.length !== paramCount) { - var start = prop.start; - if (prop.kind === "get") { - this.raise(start, "getter should have no params"); + function couldBeBaseType(name) { + var type = this.getTypeAnnotation(); + if (t.isAnyTypeAnnotation(type)) return true; + + if (t.isUnionTypeAnnotation(type)) { + for (var _iterator = type.types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; } else { - this.raise(start, "setter should have exactly one param"); + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; } - } - return this.finishNode(prop, "ObjectMethod"); - } - if (!prop.computed && prop.key.type === "Identifier") { - if (isPattern) { - var illegalBinding = this.isKeyword(prop.key.name); - if (!illegalBinding && this.state.strict) { - illegalBinding = _utilIdentifier.reservedWords.strictBind(prop.key.name) || _utilIdentifier.reservedWords.strict(prop.key.name); - } - if (illegalBinding) { - this.raise(prop.key.start, "Binding " + prop.key.name); - } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else if (this.match(_tokenizerTypes.types.eq) && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) { - refShorthandDefaultPos.start = this.state.start; + var type2 = _ref; + + if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { + return true; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else { - prop.value = prop.key.__clone(); } - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); + return false; + } else { + return _isBaseType(name, type, true); } + } - this.unexpected(); - }; + function baseTypeStrictlyMatches(right) { + var left = this.getTypeAnnotation(); + right = right.getTypeAnnotation(); - pp.parsePropertyName = function (prop) { - if (this.eat(_tokenizerTypes.types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(_tokenizerTypes.types.bracketR); - return prop.key; - } else { - prop.computed = false; - return prop.key = this.match(_tokenizerTypes.types.num) || this.match(_tokenizerTypes.types.string) ? this.parseExprAtom() : this.parseIdentifier(true); + if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) { + return right.type === left.type; } - }; + } - // Initialize empty function node. + function isGenericType(genericName) { + var type = this.getTypeAnnotation(); + return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, { name: genericName }); + } - pp.initFunction = function (node, isAsync) { - node.id = null; - node.generator = false; - node.expression = false; - if (this.hasPlugin("asyncFunctions")) { - node.async = !!isAsync; - } - }; +/***/ }, +/* 343 */ +/***/ function(module, exports, __webpack_require__) { - // Parse object or class method. + "use strict"; - pp.parseMethod = function (node, isGenerator, isAsync) { - var oldInMethod = this.state.inMethod; - this.state.inMethod = node.kind || true; - this.initFunction(node, isAsync); - this.expect(_tokenizerTypes.types.parenL); - node.params = this.parseBindingList(_tokenizerTypes.types.parenR, false, this.hasPlugin("trailingFunctionCommas")); - node.generator = isGenerator; - this.parseFunctionBody(node); - this.state.inMethod = oldInMethod; - return node; - }; + exports.__esModule = true; + exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = exports.Identifier = undefined; - // Parse arrow function expression with given parameters. + var _infererReference = __webpack_require__(344); - pp.parseArrowExpression = function (node, params, isAsync) { - this.initFunction(node, isAsync); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); - }; + Object.defineProperty(exports, "Identifier", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_infererReference).default; + } + }); + exports.VariableDeclarator = VariableDeclarator; + exports.TypeCastExpression = TypeCastExpression; + exports.NewExpression = NewExpression; + exports.TemplateLiteral = TemplateLiteral; + exports.UnaryExpression = UnaryExpression; + exports.BinaryExpression = BinaryExpression; + exports.LogicalExpression = LogicalExpression; + exports.ConditionalExpression = ConditionalExpression; + exports.SequenceExpression = SequenceExpression; + exports.AssignmentExpression = AssignmentExpression; + exports.UpdateExpression = UpdateExpression; + exports.StringLiteral = StringLiteral; + exports.NumericLiteral = NumericLiteral; + exports.BooleanLiteral = BooleanLiteral; + exports.NullLiteral = NullLiteral; + exports.RegExpLiteral = RegExpLiteral; + exports.ObjectExpression = ObjectExpression; + exports.ArrayExpression = ArrayExpression; + exports.RestElement = RestElement; + exports.CallExpression = CallExpression; + exports.TaggedTemplateExpression = TaggedTemplateExpression; - // Parse function body and check parameters. + var _babelTypes = __webpack_require__(63); - pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && !this.match(_tokenizerTypes.types.braceL); + var t = _interopRequireWildcard(_babelTypes); - var oldInAsync = this.state.inAsync; - this.state.inAsync = node.async; - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; + 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; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function VariableDeclarator() { + var id = this.get("id"); + + if (id.isIdentifier()) { + return this.get("init").getTypeAnnotation(); } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.state.inFunction, - oldInGen = this.state.inGenerator, - oldLabels = this.state.labels; - this.state.inFunction = true;this.state.inGenerator = node.generator;this.state.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.state.inFunction = oldInFunc;this.state.inGenerator = oldInGen;this.state.labels = oldLabels; + return; } - this.state.inAsync = oldInAsync; + } - // 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 checkLVal = this.state.strict; - var checkLValStrict = false; - var isStrict = false; + function TypeCastExpression(node) { + return node.typeAnnotation; + } - // arrow function - if (allowExpression) checkLVal = true; + TypeCastExpression.validParent = true; - // normal function - if (!isExpression && node.body.directives.length) { - for (var _iterator = (node.body.directives /*: Array*/), _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + function NewExpression(node) { + if (this.get("callee").isIdentifier()) { + return t.genericTypeAnnotation(node.callee); + } + } - if (_isArray) { - if (_i2 >= _iterator.length) break; - _ref = _iterator[_i2++]; - } else { - _i2 = _iterator.next(); - if (_i2.done) break; - _ref = _i2.value; - } + function TemplateLiteral() { + return t.stringTypeAnnotation(); + } - var directive = _ref; + function UnaryExpression(node) { + var operator = node.operator; - if (directive.value.value === "use strict") { - isStrict = true; - checkLVal = true; - checkLValStrict = true; - break; - } - } + if (operator === "void") { + return t.voidTypeAnnotation(); + } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) { + return t.numberTypeAnnotation(); + } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) { + return t.stringTypeAnnotation(); + } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) { + return t.booleanTypeAnnotation(); } + } - // - if (isStrict && node.id && node.id.type === "Identifier" && node.id.name === "yield") { - this.raise(node.id.start, "Binding yield in strict mode"); - } + function BinaryExpression(node) { + var operator = node.operator; - if (checkLVal) { - var nameHash = _Object$create(null); - var oldStrict = this.state.strict; - if (checkLValStrict) this.state.strict = true; - if (node.id) { - this.checkLVal(node.id, true); + if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { + return t.numberTypeAnnotation(); + } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { + return t.booleanTypeAnnotation(); + } else if (operator === "+") { + var right = this.get("right"); + var left = this.get("left"); + + if (left.isBaseType("number") && right.isBaseType("number")) { + return t.numberTypeAnnotation(); + } else if (left.isBaseType("string") || right.isBaseType("string")) { + return t.stringTypeAnnotation(); } - for (var _iterator2 = (node.params /*: Array*/), _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; - if (_isArray2) { - if (_i3 >= _iterator2.length) break; - _ref2 = _iterator2[_i3++]; - } else { - _i3 = _iterator2.next(); - if (_i3.done) break; - _ref2 = _i3.value; - } + return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]); + } + } - var param = _ref2; + function LogicalExpression() { + return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]); + } - this.checkLVal(param, true, nameHash); - } - this.state.strict = oldStrict; - } - }; + function ConditionalExpression() { + return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]); + } - // 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). + function SequenceExpression() { + return this.get("expressions").pop().getTypeAnnotation(); + } - pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(_tokenizerTypes.types.comma); - if (allowTrailingComma && this.eat(close)) break; - } + function AssignmentExpression() { + return this.get("right").getTypeAnnotation(); + } - elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); + function UpdateExpression(node) { + var operator = node.operator; + if (operator === "++" || operator === "--") { + return t.numberTypeAnnotation(); } - return elts; - }; + } - pp.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) { - var elt = undefined; - if (allowEmpty && this.match(_tokenizerTypes.types.comma)) { - elt = null; - } else if (this.match(_tokenizerTypes.types.ellipsis)) { - elt = this.parseSpread(refShorthandDefaultPos); - } else { - elt = this.parseMaybeAssign(false, refShorthandDefaultPos); - } - return elt; - }; + function StringLiteral() { + return t.stringTypeAnnotation(); + } - // Parse the next token as an identifier. If `liberal` is true (used - // when parsing properties), it will also convert keywords into - // identifiers. + function NumericLiteral() { + return t.numberTypeAnnotation(); + } + + function BooleanLiteral() { + return t.booleanTypeAnnotation(); + } + + function NullLiteral() { + return t.nullLiteralTypeAnnotation(); + } + + function RegExpLiteral() { + return t.genericTypeAnnotation(t.identifier("RegExp")); + } - pp.parseIdentifier = function (liberal) { - var node = this.startNode(); + function ObjectExpression() { + return t.genericTypeAnnotation(t.identifier("Object")); + } - if (this.match(_tokenizerTypes.types.name)) { - if (!liberal && this.state.strict && _utilIdentifier.reservedWords.strict(this.state.value)) { - this.raise(this.state.start, "The keyword '" + this.state.value + "' is reserved"); - } + function ArrayExpression() { + return t.genericTypeAnnotation(t.identifier("Array")); + } - node.name = this.state.value; - } else if (liberal && this.state.type.keyword) { - node.name = this.state.type.keyword; - } else { - this.unexpected(); - } + function RestElement() { + return ArrayExpression(); + } - if (!liberal && node.name === "await" && this.state.inAsync) { - this.raise(node.start, "invalid use of await inside of an async function"); - } + RestElement.validParent = true; - this.next(); - return this.finishNode(node, "Identifier"); - }; + function Func() { + return t.genericTypeAnnotation(t.identifier("Function")); + } - // Parses await expression inside async function. + exports.FunctionExpression = Func; + exports.ArrowFunctionExpression = Func; + exports.FunctionDeclaration = Func; + exports.ClassExpression = Func; + exports.ClassDeclaration = Func; + function CallExpression() { + return resolveCall(this.get("callee")); + } - pp.parseAwait = function (node) { - if (!this.state.inAsync) { - this.unexpected(); - } - if (this.isLineTerminator()) { - this.unexpected(); - } - if (this.match(_tokenizerTypes.types.star)) { - this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); - } - node.argument = this.parseMaybeUnary(); - return this.finishNode(node, "AwaitExpression"); - }; + function TaggedTemplateExpression() { + return resolveCall(this.get("tag")); + } - // Parses yield expression inside generator. + function resolveCall(callee) { + callee = callee.resolve(); - pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.match(_tokenizerTypes.types.semi) || this.canInsertSemicolon() || !this.match(_tokenizerTypes.types.star) && !this.state.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(_tokenizerTypes.types.star); - node.argument = this.parseMaybeAssign(); + if (callee.isFunction()) { + if (callee.is("async")) { + if (callee.is("generator")) { + return t.genericTypeAnnotation(t.identifier("AsyncIterator")); + } else { + return t.genericTypeAnnotation(t.identifier("Promise")); + } + } else { + if (callee.node.returnType) { + return callee.node.returnType; + } else {} + } } - return this.finishNode(node, "YieldExpression"); - }; - },{"../tokenizer/types":17,"../util/identifier":18,"./index":5,"babel-runtime/core-js/get-iterator":21,"babel-runtime/core-js/object/create":22,"babel-runtime/helpers/interop-require-default":26}],5:[function(require,module,exports){ - /* @flow */ + } + +/***/ }, +/* 344 */ +/***/ function(module, exports, __webpack_require__) { "use strict"; - var _inherits = require("babel-runtime/helpers/inherits")["default"]; + exports.__esModule = true; - var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; + var _getIterator2 = __webpack_require__(3); - var _getIterator = require("babel-runtime/core-js/get-iterator")["default"]; + var _getIterator3 = _interopRequireDefault(_getIterator2); - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + exports.default = function (node) { + if (!this.isReferenced()) return; - exports.__esModule = true; + var binding = this.scope.getBinding(node.name); + if (binding) { + if (binding.identifier.typeAnnotation) { + return binding.identifier.typeAnnotation; + } else { + return getTypeAnnotationBindingConstantViolations(this, node.name); + } + } - var _utilIdentifier = require("../util/identifier"); + if (node.name === "undefined") { + return t.voidTypeAnnotation(); + } else if (node.name === "NaN" || node.name === "Infinity") { + return t.numberTypeAnnotation(); + } else if (node.name === "arguments") {} + }; - var _options = require("../options"); + var _babelTypes = __webpack_require__(63); - var _tokenizer = require("../tokenizer"); + var t = _interopRequireWildcard(_babelTypes); - var _tokenizer2 = _interopRequireDefault(_tokenizer); + 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 plugins = {}; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - exports.plugins = plugins; + function getTypeAnnotationBindingConstantViolations(path, name) { + var binding = path.scope.getBinding(name); - var Parser = (function (_Tokenizer) { - _inherits(Parser, _Tokenizer); + var types = []; + path.typeAnnotation = t.unionTypeAnnotation(types); - function Parser(options /*: Object*/, input /*: string*/) { - _classCallCheck(this, Parser); + var functionConstantViolations = []; + var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); - options = _options.getOptions(options); - _Tokenizer.call(this, options, input); + var testType = getConditionalAnnotation(path, name); + if (testType) { + (function () { + var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); - this.options = options; - this.inModule = this.options.sourceType === "module"; - this.isReservedWord = _utilIdentifier.reservedWords[6]; - this.input = input; - this.plugins = this.loadPlugins(this.options.plugins); + constantViolations = constantViolations.filter(function (path) { + return testConstantViolations.indexOf(path) < 0; + }); - // If enabled, skip leading hashbang line. - if (this.state.pos === 0 && this.input[0] === "#" && this.input[1] === "!") { - this.skipLineComment(2); - } + types.push(testType.typeAnnotation); + })(); } - Parser.prototype.hasPlugin = function hasPlugin(name /*: string*/) /*: boolean*/ { - return !!(this.plugins["*"] || this.plugins[name]); - }; - - Parser.prototype.extend = function extend(name /*: string*/, f /*: Function*/) { - this[name] = f(this[name]); - }; - - Parser.prototype.loadPlugins = function loadPlugins(plugins /*: Array*/) /*: Object*/ { - var pluginMap = {}; - - if (plugins.indexOf("flow") >= 0) { - // ensure flow plugin loads last - plugins = plugins.filter(function (plugin) { - return plugin !== "flow"; - }); - plugins.push("flow"); - } + if (constantViolations.length) { + constantViolations = constantViolations.concat(functionConstantViolations); - for (var _iterator = plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + for (var _iterator = constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { var _ref; if (_isArray) { @@ -16794,6951 +17925,7337 @@ module.exports = _ref = _i.value; } - var _name = _ref; + var violation = _ref; + + types.push(violation.getTypeAnnotation()); + } + } + + if (types.length) { + return t.createUnionTypeAnnotation(types); + } + } + + function getConstantViolationsBefore(binding, path, functions) { + var violations = binding.constantViolations.slice(); + violations.unshift(binding.path); + return violations.filter(function (violation) { + violation = violation.resolve(); + var status = violation._guessExecutionStatusRelativeTo(path); + if (functions && status === "function") functions.push(violation); + return status === "before"; + }); + } + + function inferAnnotationFromBinaryExpression(name, path) { + var operator = path.node.operator; - if (!pluginMap[_name]) { - pluginMap[_name] = true; + var right = path.get("right").resolve(); + var left = path.get("left").resolve(); - var plugin = exports.plugins[_name]; - if (plugin) plugin(this); - } + var target = void 0; + if (left.isIdentifier({ name: name })) { + target = right; + } else if (right.isIdentifier({ name: name })) { + target = left; + } + if (target) { + if (operator === "===") { + return target.getTypeAnnotation(); + } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { + return t.numberTypeAnnotation(); + } else { + return; } + } else { + if (operator !== "===") return; + } - return pluginMap; - }; + var typeofPath = void 0; + var typePath = void 0; + if (left.isUnaryExpression({ operator: "typeof" })) { + typeofPath = left; + typePath = right; + } else if (right.isUnaryExpression({ operator: "typeof" })) { + typeofPath = right; + typePath = left; + } + if (!typePath && !typeofPath) return; - Parser.prototype.parse = function parse() /*: { - type: "File", - program: { - type: "Program", - body: Array - } - }*/ { - var file = this.startNode(); - var program = this.startNode(); - this.nextToken(); - return this.parseTopLevel(file, program); - }; + typePath = typePath.resolve(); + if (!typePath.isLiteral()) return; - return Parser; - })(_tokenizer2["default"]); + var typeValue = typePath.node.value; + if (typeof typeValue !== "string") return; - exports["default"] = Parser; - },{"../options":2,"../tokenizer":15,"../util/identifier":18,"babel-runtime/core-js/get-iterator":21,"babel-runtime/helpers/class-call-check":24,"babel-runtime/helpers/inherits":25,"babel-runtime/helpers/interop-require-default":26}],6:[function(require,module,exports){ - "use strict"; + if (!typeofPath.get("argument").isIdentifier({ name: name })) return; + + return t.createTypeAnnotationBasedOnTypeof(typePath.node.value); + } - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + function getParentConditionalPath(path) { + var parentPath = void 0; + while (parentPath = path.parentPath) { + if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { + if (path.key === "test") { + return; + } else { + return parentPath; + } + } else { + path = parentPath; + } + } + } - var _utilLocation = require("../util/location"); + function getConditionalAnnotation(path, name) { + var ifStatement = getParentConditionalPath(path); + if (!ifStatement) return; - var _index = require("./index"); + var test = ifStatement.get("test"); + var paths = [test]; + var types = []; - var _index2 = _interopRequireDefault(_index); + do { + var _path = paths.shift().resolve(); - var pp = _index2["default"].prototype; + if (_path.isLogicalExpression()) { + paths.push(_path.get("left")); + paths.push(_path.get("right")); + } - // 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. + if (_path.isBinaryExpression()) { + var type = inferAnnotationFromBinaryExpression(name, _path); + if (type) types.push(type); + } + } while (paths.length); - pp.raise = function (pos, message) { - var loc = _utilLocation.getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; - err.loc = loc; - throw err; - }; - },{"../util/location":19,"./index":5,"babel-runtime/helpers/interop-require-default":26}],7:[function(require,module,exports){ - "use strict"; + if (types.length) { + return { + typeAnnotation: t.createUnionTypeAnnotation(types), + ifStatement: ifStatement + }; + } else { + return getConditionalAnnotation(ifStatement, name); + } + } + module.exports = exports["default"]; - var _getIterator = require("babel-runtime/core-js/get-iterator")["default"]; +/***/ }, +/* 345 */ +/***/ function(module, exports, __webpack_require__) { - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + "use strict"; - var _tokenizerTypes = require("../tokenizer/types"); + exports.__esModule = true; - var _index = require("./index"); + var _getIterator2 = __webpack_require__(3); - var _index2 = _interopRequireDefault(_index); + var _getIterator3 = _interopRequireDefault(_getIterator2); - var _utilIdentifier = require("../util/identifier"); + exports.replaceWithMultiple = replaceWithMultiple; + exports.replaceWithSourceString = replaceWithSourceString; + exports.replaceWith = replaceWith; + exports._replaceWith = _replaceWith; + exports.replaceExpressionWithStatements = replaceExpressionWithStatements; + exports.replaceInline = replaceInline; - var pp = _index2["default"].prototype; + var _babelCodeFrame = __webpack_require__(346); - // Convert existing expression atom to assignable pattern - // if possible. + var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame); - pp.toAssignable = function (node, isBinding) { - if (node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; + var _index = __webpack_require__(60); - case "ObjectExpression": - node.type = "ObjectPattern"; - for (var _iterator = (node.properties /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; + var _index2 = _interopRequireDefault(_index); - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } + var _index3 = __webpack_require__(61); - var prop = _ref; + var _index4 = _interopRequireDefault(_index3); - if (prop.type === "ObjectMethod") { - if (prop.kind === "get" || prop.kind === "set") { - this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - } else { - this.raise(prop.key.start, "Object pattern can't contain methods"); - } - } else { - this.toAssignable(prop, isBinding); - } - } - break; + var _babylon = __webpack_require__(355); - case "ObjectProperty": - this.toAssignable(node.value, isBinding); - break; + var _babelTypes = __webpack_require__(63); - case "SpreadProperty": - node.type = "RestProperty"; - break; + var t = _interopRequireWildcard(_babelTypes); - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding); - break; + 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; } } - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - break; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - case "MemberExpression": - if (!isBinding) break; + var hoistVariablesVisitor = { + Function: function Function(path) { + path.skip(); + }, + VariableDeclaration: function VariableDeclaration(path) { + if (path.node.kind !== "var") return; - default: - this.raise(node.start, "Assigning to rvalue"); + var bindings = path.getBindingIdentifiers(); + for (var key in bindings) { + path.scope.push({ id: bindings[key] }); } - } - return node; - }; - - // Convert list of expression atoms to binding list. - 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; - } - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; - }; + var exprs = []; - // Convert list of expression atoms to a list of + for (var _iterator = path.node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; - pp.toReferencedList = function (exprList) { - return exprList; - }; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } - // Parses spread element. + var declar = _ref; - pp.parseSpread = function (refShorthandDefaultPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refShorthandDefaultPos); - return this.finishNode(node, "SpreadElement"); - }; + if (declar.init) { + exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init))); + } + } - pp.parseRest = function () { - var node = this.startNode(); - this.next(); - node.argument = this.parseBindingIdentifier(); - return this.finishNode(node, "RestElement"); + path.replaceWithMultiple(exprs); + } }; - pp.shouldAllowYieldIdentifier = function () { - return this.match(_tokenizerTypes.types._yield) && !this.state.strict && !this.state.inGenerator; - }; + function replaceWithMultiple(nodes) { + this.resync(); - pp.parseBindingIdentifier = function () { - return this.parseIdentifier(this.shouldAllowYieldIdentifier()); - }; + nodes = this._verifyNodeList(nodes); + t.inheritLeadingComments(nodes[0], this.node); + t.inheritTrailingComments(nodes[nodes.length - 1], this.node); + this.node = this.container[this.key] = null; + this.insertAfter(nodes); - // Parses lvalue (assignable) atom. + if (this.node) { + this.requeue(); + } else { + this.remove(); + } + } - pp.parseBindingAtom = function () { - switch (this.state.type) { - case _tokenizerTypes.types._yield: - if (this.state.strict || this.state.inGenerator) this.unexpected(); + function replaceWithSourceString(replacement) { + this.resync(); - case _tokenizerTypes.types.name: - return this.parseIdentifier(true); + try { + replacement = "(" + replacement + ")"; + replacement = (0, _babylon.parse)(replacement); + } catch (err) { + var loc = err.loc; + if (loc) { + err.message += " - make sure this is an expression."; + err.message += "\n" + (0, _babelCodeFrame2.default)(replacement, loc.line, loc.column + 1); + } + throw err; + } - case _tokenizerTypes.types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(_tokenizerTypes.types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); + replacement = replacement.program.body[0].expression; + _index2.default.removeProperties(replacement); + return this.replaceWith(replacement); + } - case _tokenizerTypes.types.braceL: - return this.parseObj(true); + function replaceWith(replacement) { + this.resync(); - default: - this.unexpected(); + if (this.removed) { + throw new Error("You can't replace this node, we've already removed it"); } - }; - pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { - var elts = []; - var first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(_tokenizerTypes.types.comma); - } - if (allowEmpty && this.match(_tokenizerTypes.types.comma)) { - elts.push(null); - } else if (allowTrailingComma && this.eat(close)) { - break; - } else if (this.match(_tokenizerTypes.types.ellipsis)) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.expect(close); - break; - } else { - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - elts.push(this.parseMaybeDefault(null, null, left)); - } + if (replacement instanceof _index4.default) { + replacement = replacement.node; } - return elts; - }; - - pp.parseAssignableListItemTypes = function (param) { - return param; - }; - - // Parses assignment pattern around given atom if possible. - pp.parseMaybeDefault = function (startPos, startLoc, left) { - startLoc = startLoc || this.state.startLoc; - startPos = startPos || this.state.start; - left = left || this.parseBindingAtom(); - if (!this.eat(_tokenizerTypes.types.eq)) return left; + if (!replacement) { + throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); + } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); - }; + if (this.node === replacement) { + return; + } - // Verify that a node is an lval — something that can be assigned - // to. + if (this.isProgram() && !t.isProgram(replacement)) { + throw new Error("You can only replace a Program root node with another Program node"); + } - pp.checkLVal = function (expr, isBinding, checkClashes) { - switch (expr.type) { - case "Identifier": - if (this.state.strict && (_utilIdentifier.reservedWords.strictBind(expr.name) || _utilIdentifier.reservedWords.strict(expr.name))) { - this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - } + if (Array.isArray(replacement)) { + throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); + } - if (checkClashes) { - // we need to prefix this with an underscore for the cases where we have a key of - // `__proto__`. there's a bug in old V8 where the following wouldn't work: - // - // > var obj = Object.create(null); - // undefined - // > obj.__proto__ - // null - // > obj.__proto__ = true; - // true - // > obj.__proto__ - // null - var key = "_" + expr.name; + if (typeof replacement === "string") { + throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); + } - if (checkClashes[key]) { - this.raise(expr.start, "Argument name clash in strict mode"); - } else { - checkClashes[key] = true; - } - } - break; + if (this.isNodeType("Statement") && t.isExpression(replacement)) { + if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { + replacement = t.expressionStatement(replacement); + } + } - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; + if (this.isNodeType("Expression") && t.isStatement(replacement)) { + if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { + return this.replaceExpressionWithStatements([replacement]); + } + } - case "ObjectPattern": - for (var _iterator2 = (expr.properties /*: Array*/), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { - var _ref2; + var oldNode = this.node; + if (oldNode) { + t.inheritsComments(replacement, oldNode); + t.removeComments(oldNode); + } - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } + this._replaceWith(replacement); + this.type = replacement.type; - var prop = _ref2; + this.setScope(); - if (prop.type === "ObjectProperty") prop = prop.value; - this.checkLVal(prop, isBinding, checkClashes); - } - break; + this.requeue(); + } - case "ArrayPattern": - for (var _iterator3 = (expr.elements /*: Array*/), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { - var _ref3; + function _replaceWith(node) { + if (!this.container) { + throw new ReferenceError("Container is falsy"); + } - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } + if (this.inList) { + t.validate(this.parent, this.key, [node]); + } else { + t.validate(this.parent, this.key, node); + } - var elem = _ref3; + this.debug(function () { + return "Replace with " + (node && node.type); + }); - if (elem) this.checkLVal(elem, isBinding, checkClashes); - } - break; + this.node = this.container[this.key] = node; + } - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes); - break; + function replaceExpressionWithStatements(nodes) { + this.resync(); - case "RestProperty": - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; + var toSequenceExpression = t.toSequenceExpression(nodes, this.scope); - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } - }; - },{"../tokenizer/types":17,"../util/identifier":18,"./index":5,"babel-runtime/core-js/get-iterator":21,"babel-runtime/helpers/interop-require-default":26}],8:[function(require,module,exports){ - "use strict"; + if (t.isSequenceExpression(toSequenceExpression)) { + var exprs = toSequenceExpression.expressions; + + if (exprs.length >= 2 && this.parentPath.isExpressionStatement()) { + this._maybePopFromStatements(exprs); + } + + if (exprs.length === 1) { + this.replaceWith(exprs[0]); + } else { + this.replaceWith(toSequenceExpression); + } + } else if (toSequenceExpression) { + this.replaceWith(toSequenceExpression); + } else { + var container = t.functionExpression(null, [], t.blockStatement(nodes)); + container.shadow = true; - var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; + this.replaceWith(t.callExpression(container, [])); + this.traverse(hoistVariablesVisitor); - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + var completionRecords = this.get("callee").getCompletionRecords(); + for (var _iterator2 = completionRecords, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; - var _index = require("./index"); + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } - var _index2 = _interopRequireDefault(_index); + var path = _ref2; - var _utilLocation = require("../util/location"); + if (!path.isExpressionStatement()) continue; - // Start an AST node, attaching a start offset. + var loop = path.findParent(function (path) { + return path.isLoop(); + }); + if (loop) { + var callee = this.get("callee"); - var pp = _index2["default"].prototype; + var uid = callee.scope.generateDeclaredUidIdentifier("ret"); + callee.get("body").pushContainer("body", t.returnStatement(uid)); - var Node = (function () { - function Node(pos /*:: ?: number*/, loc /*:: ?: SourceLocation*/) { - _classCallCheck(this, Node); + path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression)); + } else { + path.replaceWith(t.returnStatement(path.node.expression)); + } + } - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new _utilLocation.SourceLocation(loc); + return this.node; } + } - Node.prototype.__clone = function __clone() /*: Node*/ { - var node2 = new Node(); - for (var key in this) { - node2[key] = this[key]; - }return node2; - }; + function replaceInline(nodes) { + this.resync(); - return Node; - })(); + if (Array.isArray(nodes)) { + if (Array.isArray(this.container)) { + nodes = this._verifyNodeList(nodes); + this._containerInsertAfter(nodes); + return this.remove(); + } else { + return this.replaceWithMultiple(nodes); + } + } else { + return this.replaceWith(nodes); + } + } - pp.startNode = function () { - return new Node(this.state.start, this.state.startLoc); - }; +/***/ }, +/* 346 */ +/***/ function(module, exports, __webpack_require__) { - pp.startNodeAt = function (pos, loc) { - return new Node(pos, loc); - }; + "use strict"; - function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - node.loc.end = loc; - this.processComment(node); - return node; - } + exports.__esModule = true; - // Finish an AST node, adding `type` and `end` properties. + exports.default = function (rawLines, lineNumber, colNumber) { + var opts = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; - pp.finishNode = function (node, type) { - return finishNodeAt.call(this, node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); - }; + colNumber = Math.max(colNumber, 0); - // Finish node at given position + var highlighted = opts.highlightCode && _chalk2.default.supportsColor; + var maybeHighlight = function maybeHighlight(chalkFn, string) { + return highlighted ? chalkFn(string) : string; + }; + if (highlighted) rawLines = highlight(rawLines); - pp.finishNodeAt = function (node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc); - }; - },{"../util/location":19,"./index":5,"babel-runtime/helpers/class-call-check":24,"babel-runtime/helpers/interop-require-default":26}],9:[function(require,module,exports){ - "use strict"; + var linesAbove = opts.linesAbove || 2; + var linesBelow = opts.linesBelow || 3; - var _Object$create = require("babel-runtime/core-js/object/create")["default"]; + var lines = rawLines.split(NEWLINE); + var start = Math.max(lineNumber - (linesAbove + 1), 0); + var end = Math.min(lines.length, lineNumber + linesBelow); - var _getIterator = require("babel-runtime/core-js/get-iterator")["default"]; + if (!lineNumber && !colNumber) { + start = 0; + end = lines.length; + } - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + var numberMaxWidth = String(end).length; - var _tokenizerTypes = require("../tokenizer/types"); + var frame = lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var paddedNumber = (" " + number).slice(-numberMaxWidth); + var gutter = " " + paddedNumber + " | "; + if (number === lineNumber) { + var markerLine = ""; + if (colNumber) { + var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " "); + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join(""); + } + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); - var _index = require("./index"); + if (highlighted) { + return _chalk2.default.reset(frame); + } else { + return frame; + } + }; - var _index2 = _interopRequireDefault(_index); + var _jsTokens = __webpack_require__(347); - var _utilWhitespace = require("../util/whitespace"); + var _jsTokens2 = _interopRequireDefault(_jsTokens); - var pp = _index2["default"].prototype; + var _esutils = __webpack_require__(92); - // ### Statement parsing + var _esutils2 = _interopRequireDefault(_esutils); - // 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. + var _chalk = __webpack_require__(348); - pp.parseTopLevel = function (file, program) { - program.sourceType = this.options.sourceType; + var _chalk2 = _interopRequireDefault(_chalk); - this.parseBlockBody(program, true, true, _tokenizerTypes.types.eof); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - file.program = this.finishNode(program, "Program"); - file.comments = this.state.comments; - file.tokens = this.state.tokens; + var defs = { + keyword: _chalk2.default.cyan, + capitalized: _chalk2.default.yellow, + jsx_tag: _chalk2.default.yellow, + punctuator: _chalk2.default.yellow, - return this.finishNode(file, "File"); + number: _chalk2.default.magenta, + string: _chalk2.default.green, + regex: _chalk2.default.magenta, + comment: _chalk2.default.grey, + invalid: _chalk2.default.white.bgRed.bold, + gutter: _chalk2.default.grey, + marker: _chalk2.default.red.bold }; - var loopLabel = { kind: "loop" }, - switchLabel = { kind: "switch" }; + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - // TODO + var JSX_TAG = /^[a-z][\w-]*$/i; - pp.stmtToDirective = function (stmt) { - var expr = stmt.expression; + var BRACKET = /^[()\[\]{}]$/; - var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); - var directive = this.startNodeAt(stmt.start, stmt.loc.start); + function getTokenType(match) { + var _match$slice = match.slice(-2); - var raw = this.input.slice(expr.start, expr.end); - var val = directiveLiteral.value = raw.slice(1, -1); // remove quotes + var offset = _match$slice[0]; + var text = _match$slice[1]; - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); + var token = _jsTokens2.default.matchToToken(match); - directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); + if (token.type === "name") { + if (_esutils2.default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } - return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); - }; + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g + + module.exports.matchToToken = function(match) { + var token = {type: "invalid", value: match[0]} + if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4]) + else if (match[ 5]) token.type = "comment" + else if (match[ 6]) token.type = "comment", token.closed = !!match[7] + else if (match[ 8]) token.type = "regex" + else if (match[ 9]) token.type = "number" + else if (match[10]) token.type = "name" + else if (match[11]) token.type = "punctuator" + else if (match[12]) token.type = "whitespace" + return token + } - case _tokenizerTypes.types._while: - return this.parseWhileStatement(node); - case _tokenizerTypes.types._with: - return this.parseWithStatement(node); - case _tokenizerTypes.types.braceL: - return this.parseBlock(); - case _tokenizerTypes.types.semi: - return this.parseEmptyStatement(node); - case _tokenizerTypes.types._export: - case _tokenizerTypes.types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) { - this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); - } - if (!this.inModule) { - this.raise(this.state.start, "'import' and 'export' may appear only with 'sourceType: module'"); - } - } - return starttype === _tokenizerTypes.types._import ? this.parseImport(node) : this.parseExport(node); +/***/ }, +/* 348 */ +/***/ function(module, exports, __webpack_require__) { - case _tokenizerTypes.types.name: - if (this.hasPlugin("asyncFunctions") && this.state.value === "async") { - // peek ahead and see if next token is a function - var state = this.state.clone(); - this.next(); - if (this.match(_tokenizerTypes.types._function) && !this.canInsertSemicolon()) { - this.expect(_tokenizerTypes.types._function); - return this.parseFunction(node, true, false, true); - } else { - this.state = state; - } - } - } + 'use strict'; + var escapeStringRegexp = __webpack_require__(349); + var ansiStyles = __webpack_require__(350); + var stripAnsi = __webpack_require__(351); + var hasAnsi = __webpack_require__(353); + var supportsColor = __webpack_require__(354); + var defineProps = Object.defineProperties; + var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); - // 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. - var maybeName = this.state.value; - var expr = this.parseExpression(); + function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; + } - if (starttype === _tokenizerTypes.types.name && expr.type === "Identifier" && this.eat(_tokenizerTypes.types.colon)) { - return this.parseLabeledStatement(node, maybeName, expr); - } else { - return this.parseExpressionStatement(node, expr); - } - }; + // use bright blue on Windows as the normal blue color is illegible + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; + } - pp.takeDecorators = function (node) { - if (this.state.decorators.length) { - node.decorators = this.state.decorators; - this.state.decorators = []; - } - }; + var styles = (function () { + var ret = {}; - pp.parseDecorators = function (allowExport) { - while (this.match(_tokenizerTypes.types.at)) { - this.state.decorators.push(this.parseDecorator()); - } + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - if (allowExport && this.match(_tokenizerTypes.types._export)) { - return; - } + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); - if (!this.match(_tokenizerTypes.types._class)) { - this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); - } - }; + return ret; + })(); - pp.parseDecorator = function () { - if (!this.hasPlugin("decorators")) { - this.unexpected(); - } - var node = this.startNode(); - this.next(); - node.expression = this.parseMaybeAssign(); - return this.finishNode(node, "Decorator"); - }; + var proto = defineProps(function chalk() {}, styles); - pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword === "break"; - this.next(); + function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; - if (this.isLineTerminator()) { - node.label = null; - } else if (!this.match(_tokenizerTypes.types.name)) { - this.unexpected(); - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; - // Verify that there is an actual destination to break or - // continue to. - var i = undefined; - for (i = 0; i < this.state.labels.length; ++i) { - var lab = this.state.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.state.labels.length) this.raise(node.start, "Unsyntactic " + keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - }; + return builder; + } - pp.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - }; + function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); - pp.parseDoStatement = function (node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - this.expect(_tokenizerTypes.types._while); - node.test = this.parseParenExpression(); - this.eat(_tokenizerTypes.types.semi); - return this.finishNode(node, "DoWhileStatement"); - }; + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } - // 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. + if (!this.enabled || !str) { + return str; + } - pp.parseForStatement = function (node) { - this.next(); - this.state.labels.push(loopLabel); - this.expect(_tokenizerTypes.types.parenL); + var nestedStyles = this._styles; + var i = nestedStyles.length; - if (this.match(_tokenizerTypes.types.semi)) { - return this.parseFor(node, null); - } + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } - if (this.match(_tokenizerTypes.types._var) || this.match(_tokenizerTypes.types._let) || this.match(_tokenizerTypes.types._const)) { - var _init = this.startNode(), - varKind = this.state.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); + while (i--) { + var code = ansiStyles[nestedStyles[i]]; - if (this.match(_tokenizerTypes.types._in) || this.isContextual("of")) { - if (_init.declarations.length === 1 && !_init.declarations[0].init) { - return this.parseForIn(node, _init); - } - } + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } - return this.parseFor(node, _init); - } + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; - var refShorthandDefaultPos = { start: 0 }; - var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.match(_tokenizerTypes.types._in) || this.isContextual("of")) { - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return this.parseFor(node, init); - }; + return str; + } - pp.parseFunctionStatement = function (node) { - this.next(); - return this.parseFunction(node, true); - }; + function init() { + var ret = {}; - pp.parseIfStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(_tokenizerTypes.types._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); - }; + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); - pp.parseReturnStatement = function (node) { - if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) { - this.raise(this.state.start, "'return' outside of function"); - } + return ret; + } - this.next(); + defineProps(Chalk.prototype, init()); - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. + module.exports = new Chalk(); + module.exports.styles = ansiStyles; + module.exports.hasColor = hasAnsi; + module.exports.stripColor = stripAnsi; + module.exports.supportsColor = supportsColor; - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); - }; +/***/ }, +/* 349 */ +/***/ function(module, exports) { - pp.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(_tokenizerTypes.types.braceL); - this.state.labels.push(switchLabel); + 'use strict'; - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. + var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - var cur = undefined; - for (var sawDefault = undefined; !this.match(_tokenizerTypes.types.braceR);) { - if (this.match(_tokenizerTypes.types._case) || this.match(_tokenizerTypes.types._default)) { - var isCase = this.match(_tokenizerTypes.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.raise(this.state.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; - } - this.expect(_tokenizerTypes.types.colon); - } else { - if (cur) { - cur.consequent.push(this.parseStatement(true)); - } else { - this.unexpected(); - } - } - } - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); // Closing brace - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - }; + module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } - pp.parseThrowStatement = function (node) { - this.next(); - if (_utilWhitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) this.raise(this.state.lastTokEnd, "Illegal newline after throw"); - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); + return str.replace(matchOperatorsRe, '\\$&'); }; - // Reused empty array added for node fields that are always empty. - var empty = []; +/***/ }, +/* 350 */ +/***/ function(module, exports, __webpack_require__) { - pp.parseTryStatement = function (node) { - this.next(); + /* WEBPACK VAR INJECTION */(function(module) {'use strict'; - node.block = this.parseBlock(); - node.handler = null; + function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; - if (this.match(_tokenizerTypes.types._catch)) { - var clause = this.startNode(); - this.next(); + // fix humans + styles.colors.grey = styles.colors.gray; - this.expect(_tokenizerTypes.types.parenL); - clause.param = this.parseBindingAtom(); - this.checkLVal(clause.param, true, _Object$create(null)); - this.expect(_tokenizerTypes.types.parenR); + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; - node.guardedHandlers = empty; - node.finalizer = this.eat(_tokenizerTypes.types._finally) ? this.parseBlock() : null; + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); - if (!node.handler && !node.finalizer) { - this.raise(node.start, "Missing catch or finally clause"); - } + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); - return this.finishNode(node, "TryStatement"); - }; + return styles; + } - pp.parseVarStatement = function (node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - }; + Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles + }); - pp.parseWhileStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - }; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(110)(module))) - pp.parseWithStatement = function (node) { - if (this.state.strict) this.raise(this.state.start, "'with' in strict mode"); - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); - }; +/***/ }, +/* 351 */ +/***/ function(module, exports, __webpack_require__) { - pp.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); + 'use strict'; + var ansiRegex = __webpack_require__(352)(); + + module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; }; - pp.parseLabeledStatement = function (node, maybeName, expr) { - for (var _iterator = (this.state.labels /*: Array*/), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { - var _ref; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } +/***/ }, +/* 352 */ +/***/ function(module, exports) { - var label = _ref; + 'use strict'; + module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; + }; - if (label.name === maybeName) { - this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } - } - var kind = this.state.type.isLoop ? "loop" : this.match(_tokenizerTypes.types._switch) ? "switch" : null; - for (var i = this.state.labels.length - 1; i >= 0; i--) { - var label = this.state.labels[i]; - if (label.statementStart === node.start) { - label.statementStart = this.state.start; - label.kind = kind; - } else { - break; - } - } +/***/ }, +/* 353 */ +/***/ function(module, exports, __webpack_require__) { - this.state.labels.push({ name: maybeName, kind: kind, statementStart: this.state.start }); - node.body = this.parseStatement(true); - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - }; + 'use strict'; + var ansiRegex = __webpack_require__(352); + var re = new RegExp(ansiRegex().source); // remove the `g` flag + module.exports = re.test.bind(re); - 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). +/***/ }, +/* 354 */ +/***/ function(module, exports) { - pp.parseBlock = function (allowDirectives /*:: ?*/) { - var node = this.startNode(); - this.expect(_tokenizerTypes.types.braceL); - this.parseBlockBody(node, allowDirectives, false, _tokenizerTypes.types.braceR); - return this.finishNode(node, "BlockStatement"); + 'use strict'; + var argv = process.argv; + + var terminator = argv.indexOf('--'); + var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); }; - // TODO + module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } - pp.parseBlockBody = function (node, allowDirectives, topLevel, end) { - node.body = []; - node.directives = []; + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } - var parsedNonDirective = false; - var oldStrict = undefined; - var octalPosition = undefined; + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } - while (!this.eat(end)) { - if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { - octalPosition = this.state.octalPosition; - } + if (process.stdout && !process.stdout.isTTY) { + return false; + } - var stmt = this.parseStatement(true, topLevel); + if (process.platform === 'win32') { + return true; + } - if (allowDirectives && !parsedNonDirective && stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized) { - var directive = this.stmtToDirective(stmt); - node.directives.push(directive); + if ('COLORTERM' in process.env) { + return true; + } - if (oldStrict === undefined && directive.value.value === "use strict") { - oldStrict = this.state.strict; - this.setStrict(true); + if (process.env.TERM === 'dumb') { + return false; + } - if (octalPosition) { - this.raise(octalPosition, "Octal literal in strict mode"); - } - } + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } - continue; - } + return false; + })(); - parsedNonDirective = true; - node.body.push(stmt); - } - if (oldStrict === false) { - this.setStrict(false); - } - }; +/***/ }, +/* 355 */ +/***/ function(module, exports) { - // Parse a regular `for` loop. The disambiguation code in - // `parseStatement` will already have parsed the init statement or - // expression. + 'use strict'; - pp.parseFor = function (node, init) { - node.init = init; - this.expect(_tokenizerTypes.types.semi); - node.test = this.match(_tokenizerTypes.types.semi) ? null : this.parseExpression(); - this.expect(_tokenizerTypes.types.semi); - node.update = this.match(_tokenizerTypes.types.parenR) ? null : this.parseExpression(); - this.expect(_tokenizerTypes.types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - }; + Object.defineProperty(exports, '__esModule', { value: true }); - // Parse a `for`/`in` and `for`/`of` loop, which are almost - // same from parser's perspective. + /* eslint max-len: 0 */ - pp.parseForIn = function (node, init) { - var type = this.match(_tokenizerTypes.types._in) ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.expect(_tokenizerTypes.types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, type); - }; + // This is a trick taken from Esprima. It turns out that, on + // non-Chrome browsers, to check whether a string is in a set, a + // predicate containing a big ugly `switch` statement is faster than + // a regular expression, and on Chrome the two are about on par. + // This function uses `eval` (non-lexical) to produce such a + // predicate from a space-separated string of words. + // + // It starts by sorting the words by length. - // Parse a list of variable declarations. + function makePredicate(words) { + words = words.split(" "); + return function (str) { + return words.indexOf(str) >= 0; + }; + } - pp.parseVar = function (node, isFor, kind) { - node.declarations = []; - node.kind = kind.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarHead(decl); - if (this.eat(_tokenizerTypes.types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === _tokenizerTypes.types._const && !(this.match(_tokenizerTypes.types._in) || this.isContextual("of"))) { - this.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(_tokenizerTypes.types._in) || this.isContextual("of")))) { - this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(_tokenizerTypes.types.comma)) break; - } - return node; - }; + // Reserved word lists for various dialects of the language - pp.parseVarHead = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); + var reservedWords = { + 6: makePredicate("enum await"), + strict: makePredicate("implements interface let package private protected public static yield"), + strictBind: makePredicate("eval arguments") }; - // Parse a function declaration or literal (depending on the - // `isStatement` parameter). + // And the keywords - pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) { - var oldInMethod = this.state.inMethod; - this.state.inMethod = false; + var isKeyword$1 = makePredicate("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 let const class extends export import yield super"); - this.initFunction(node, isAsync); + // ## Character categories - if (this.match(_tokenizerTypes.types.star)) { - if (node.async && !this.hasPlugin("asyncGenerators")) { - this.unexpected(); - } else { - node.generator = true; - this.next(); - } - } + // 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`. - if (isStatement && !optionalId && !this.match(_tokenizerTypes.types.name) && !this.match(_tokenizerTypes.types._yield)) { - this.unexpected(); - } + 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"; - if (this.match(_tokenizerTypes.types.name) || this.match(_tokenizerTypes.types._yield)) { - node.id = this.parseBindingIdentifier(); - } + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - this.state.inMethod = oldInMethod; + // 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]; - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); - }; + // 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; - pp.parseFunctionParams = function (node) { - this.expect(_tokenizerTypes.types.parenL); - node.params = this.parseBindingList(_tokenizerTypes.types.parenR, false, this.hasPlugin("trailingFunctionCommas")); - }; + pos += set[i + 1]; + if (pos >= code) return true; + } + } - // Parse a class declaration or literal (depending on the - // `isStatement` parameter). + // Test whether a given character code starts an identifier. - pp.parseClass = function (node, isStatement, optionalId) { - this.next(); - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - this.parseClassBody(node); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - }; + function isIdentifierStart(code) { + 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)); + return isInAstralSet(code, astralIdentifierStartCodes); + } - pp.isClassProperty = function () { - return this.match(_tokenizerTypes.types.eq) || this.match(_tokenizerTypes.types.semi) || this.canInsertSemicolon(); - }; + // Test whether a given character is part of an identifier. - pp.parseClassBody = function (node) { - // class bodies are implicitly strict - var oldStrict = this.state.strict; - this.state.strict = true; + function isIdentifierChar(code) { + 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)); + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } - var hadConstructorCall = false; - var hadConstructor = false; - var decorators = []; - var classBody = this.startNode(); + // A second optional argument can be given to further configure + var defaultOptions = { + // Source type ("script" or "module") for different semantics + sourceType: "script", + // Source filename. + sourceFilename: undefined, + // 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, + // TODO + allowSuperOutsideMethod: false, + // An array of plugins to enable + plugins: [], + // TODO + strictMode: null + }; - classBody.body = []; + // Interpret and default an options object - this.expect(_tokenizerTypes.types.braceL); + function getOptions(opts) { + var options = {}; + for (var key in defaultOptions) { + options[key] = opts && key in opts ? opts[key] : defaultOptions[key]; + } + return options; + } - while (!this.eat(_tokenizerTypes.types.braceR)) { - if (this.eat(_tokenizerTypes.types.semi)) { - continue; - } + function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - if (this.match(_tokenizerTypes.types.at)) { - decorators.push(this.parseDecorator()); - continue; - } + // ## Token types - var method = this.startNode(); + // 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. - // steal the decorators if there are any - if (decorators.length) { - method.decorators = decorators; - decorators = []; - } + // All token type variables start with an underscore, to make them + // easy to recognize. - var isConstructorCall = false; - var isMaybeStatic = this.match(_tokenizerTypes.types.name) && this.state.value === "static"; - var isGenerator = this.eat(_tokenizerTypes.types.star); - var isGetSet = false; - var isAsync = false; + // 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). + // + // `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. - this.parsePropertyName(method); + var TokenType = function TokenType(label) { + var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - method["static"] = isMaybeStatic && !this.match(_tokenizerTypes.types.parenL); - if (method["static"]) { - if (isGenerator) this.unexpected(); - isGenerator = this.eat(_tokenizerTypes.types.star); - this.parsePropertyName(method); - } + _classCallCheck$2(this, TokenType); - if (!isGenerator && method.key.type === "Identifier" && !method.computed) { - if (this.isClassProperty()) { - classBody.body.push(this.parseClassProperty(method)); - continue; - } + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.rightAssociative = !!conf.rightAssociative; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; - if (this.hasPlugin("classConstructorCall") && method.key.name === "call" && this.match(_tokenizerTypes.types.name) && this.state.value === "constructor") { - isConstructorCall = true; - this.parsePropertyName(method); - } - } + function binop(name, prec) { + return new TokenType(name, { beforeExpr: true, binop: prec }); + } + var beforeExpr = { beforeExpr: true }; + var startsExpr = { startsExpr: true }; - var isAsyncMethod = this.hasPlugin("asyncFunctions") && !this.match(_tokenizerTypes.types.parenL) && !method.computed && method.key.type === "Identifier" && method.key.name === "async"; - if (isAsyncMethod) { - if (this.hasPlugin("asyncGenerators") && this.eat(_tokenizerTypes.types.star)) isGenerator = true; - isAsync = true; - this.parsePropertyName(method); - } + 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"), - method.kind = "method"; + // Punctuation token types. + bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }), + bracketR: new TokenType("]"), + braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }), + braceBarL: new TokenType("{|", { beforeExpr: true, startsExpr: true }), + braceR: new TokenType("}"), + braceBarR: new TokenType("|}"), + parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + doubleColon: 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 }), + at: new TokenType("@"), - if (!method.computed) { - var key = method.key; + // 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. - // handle get/set methods - // eg. class Foo { get bar() {} set bar() {} } - if (!isAsync && !isGenerator && key.type === "Identifier" && !this.match(_tokenizerTypes.types.parenL) && (key.name === "get" || key.name === "set")) { - isGetSet = true; - method.kind = key.name; - key = this.parsePropertyName(method); - } + 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), + exponent: new TokenType("**", { beforeExpr: true, binop: 11, rightAssociative: true }) + }; - // disallow invalid constructors - var isConstructor = !isConstructorCall && !method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor"); - if (isConstructor) { - 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"); - if (isAsync) this.raise(key.start, "Constructor can't be an async function"); - method.kind = "constructor"; - hadConstructor = true; - } + // Map keyword names to token types. - // disallow static prototype method - var isStaticPrototype = method["static"] && (key.type === "Identifier" && key.name === "prototype" || key.type === "StringLiteral" && key.value === "prototype"); - if (isStaticPrototype) { - this.raise(key.start, "Classes may not have static property named prototype"); - } - } + var keywords = {}; - // convert constructor to a constructor call - if (isConstructorCall) { - if (hadConstructorCall) this.raise(method.start, "Duplicate constructor call in the same class"); - method.kind = "constructorCall"; - hadConstructorCall = true; - } + // Succinct definitions of keyword token types + function kw(name) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - // disallow decorators on class constructors - if ((method.kind === "constructor" || method.kind === "constructorCall") && method.decorators) { - this.raise(method.start, "You can't attach decorators to a class constructor"); - } + options.keyword = name; + keywords[name] = types["_" + name] = new TokenType(name, options); + } - this.parseClassMethod(classBody, method, isGenerator, isAsync); + 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("let"); + 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("yield", { beforeExpr: true, startsExpr: true }); + 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 }); - // get methods aren't allowed to have any parameters - // set methods must have exactly 1 parameter - if (isGetSet) { - var paramCount = method.kind === "get" ? 0 : 1; - if (method.params.length !== paramCount) { - var start = method.start; - if (method.kind === "get") { - this.raise(start, "getter should have no params"); - } else { - this.raise(start, "setter should have exactly one param"); - } - } - } - } + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no method"); - } + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); - node.body = this.finishNode(classBody, "ClassBody"); + function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; + } - this.state.strict = oldStrict; - }; + var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - pp.parseClassProperty = function (node) { - if (this.match(_tokenizerTypes.types.eq)) { - if (!this.hasPlugin("classProperties")) this.unexpected(); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - if (!this.eat(_tokenizerTypes.types.semi)) { - this.raise(node.value && node.value.end || node.key.end, "A semicolon is required after a class property"); - } - return this.finishNode(node, "ClassProperty"); - }; + function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { - this.parseMethod(method, isGenerator, isAsync); - classBody.body.push(this.finishNode(method, "ClassMethod")); - }; + // 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 - pp.parseClassId = function (node, isStatement, optionalId) { - if (this.match(_tokenizerTypes.types.name)) { - node.id = this.parseIdentifier(); - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - this.unexpected(); - } - } - }; + var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + _classCallCheck$3(this, TokContext); - pp.parseClassSuper = function (node) { - node.superClass = this.eat(_tokenizerTypes.types._extends) ? this.parseExprSubscripts() : null; + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; }; - // Parses module export declaration. - - pp.parseExport = function (node) { - this.next(); - // export * from '...' - if (this.match(_tokenizerTypes.types.star)) { - var specifier = this.startNode(); - this.next(); - if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) { - specifier.exported = this.parseIdentifier(); - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; - this.parseExportSpecifiersMaybe(node); - this.parseExportFrom(node, true); - } else { - this.parseExportFrom(node, true); - return this.finishNode(node, "ExportAllDeclaration"); - } - } else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) { - var specifier = this.startNode(); - specifier.exported = this.parseIdentifier(true); - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - if (this.match(_tokenizerTypes.types.comma) && this.lookahead().type === _tokenizerTypes.types.star) { - this.expect(_tokenizerTypes.types.comma); - var _specifier = this.startNode(); - this.expect(_tokenizerTypes.types.star); - this.expectContextual("as"); - _specifier.exported = this.parseIdentifier(); - node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); - } else { - this.parseExportSpecifiersMaybe(node); - } - this.parseExportFrom(node, true); - } else if (this.eat(_tokenizerTypes.types._default)) { - // export default ... - var expr = this.startNode(); - var needsSemi = false; - if (this.eat(_tokenizerTypes.types._function)) { - expr = this.parseFunction(expr, true, false, false, true); - } else if (this.match(_tokenizerTypes.types._class)) { - expr = this.parseClass(expr, true, true); - } else { - needsSemi = true; - expr = this.parseMaybeAssign(); - } - node.declaration = expr; - if (needsSemi) this.semicolon(); - this.checkExport(node); - return this.finishNode(node, "ExportDefaultDeclaration"); - } else if (this.state.type.keyword || this.shouldParseExportDeclaration()) { - node.specifiers = []; - node.source = null; - node.declaration = this.parseExportDeclaration(node); - } else { - // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - } - this.checkExport(node); - return this.finishNode(node, "ExportNamedDeclaration"); + var types$1 = { + braceStatement: new TokContext("{", false), + braceExpression: new TokContext("{", true), + templateQuasi: new TokContext("${", true), + parenStatement: new TokContext("(", false), + parenExpression: new TokContext("(", true), + template: new TokContext("`", true, true, function (p) { + return p.readTmplToken(); + }), + functionExpression: new TokContext("function", true) }; - pp.parseExportDeclaration = function () { - return this.parseStatement(true); - }; + // Token-specific context update code - pp.isExportDefaultSpecifier = function () { - if (this.match(_tokenizerTypes.types.name)) { - return this.state.value !== "type" && this.state.value !== "async" && this.state.value !== "interface"; + types.parenR.updateContext = types.braceR.updateContext = function () { + if (this.state.context.length === 1) { + this.state.exprAllowed = true; + return; } - if (!this.match(_tokenizerTypes.types._default)) { - return false; + var out = this.state.context.pop(); + if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) { + this.state.context.pop(); + this.state.exprAllowed = false; + } else if (out === types$1.templateQuasi) { + this.state.exprAllowed = true; + } else { + this.state.exprAllowed = !out.isExpr; } - - var lookahead = this.lookahead(); - return lookahead.type === _tokenizerTypes.types.comma || lookahead.type === _tokenizerTypes.types.name && lookahead.value === "from"; }; - pp.parseExportSpecifiersMaybe = function (node) { - if (this.eat(_tokenizerTypes.types.comma)) { - node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); - } - }; + types.name.updateContext = function (prevType) { + this.state.exprAllowed = false; - pp.parseExportFrom = function (node, expect /*:: ?*/) { - if (this.eatContextual("from")) { - node.source = this.match(_tokenizerTypes.types.string) ? this.parseExprAtom() : this.unexpected(); - this.checkExport(node); - } else { - if (expect) { - this.unexpected(); - } else { - node.source = null; + if (prevType === types._let || prevType === types._const || prevType === types._var) { + if (lineBreak.test(this.input.slice(this.state.end))) { + this.state.exprAllowed = true; } } - - this.semicolon(); }; - pp.shouldParseExportDeclaration = function () { - return this.hasPlugin("asyncFunctions") && this.isContextual("async"); + types.braceL.updateContext = function (prevType) { + this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); + this.state.exprAllowed = true; }; - pp.checkExport = function (node) { - if (this.state.decorators.length) { - var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - if (!node.declaration || !isClass) { - this.raise(node.start, "You can only use decorators on an export when exporting a class"); - } - this.takeDecorators(node.declaration); - } + types.dollarBraceL.updateContext = function () { + this.state.context.push(types$1.templateQuasi); + this.state.exprAllowed = true; }; - // Parses a comma-separated list of module exports. - - pp.parseExportSpecifiers = function () { - var nodes = []; - var first = true; - var needsFrom = undefined; - - // export { x, y as z } [from '...'] - this.expect(_tokenizerTypes.types.braceL); - - while (!this.eat(_tokenizerTypes.types.braceR)) { - if (first) { - first = false; - } else { - this.expect(_tokenizerTypes.types.comma); - if (this.eat(_tokenizerTypes.types.braceR)) break; - } - - var isDefault = this.match(_tokenizerTypes.types._default); - if (isDefault && !needsFrom) needsFrom = true; + types.parenL.updateContext = function (prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); + this.state.exprAllowed = true; + }; - var node = this.startNode(); - node.local = this.parseIdentifier(isDefault); - node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } + types.incDec.updateContext = function () { + // tokExprAllowed stays unchanged + }; - // https://github.com/ember-cli/ember-cli/pull/3739 - if (needsFrom && !this.isContextual("from")) { - this.unexpected(); + types._function.updateContext = function () { + if (this.curContext() !== types$1.braceStatement) { + this.state.context.push(types$1.functionExpression); } - return nodes; + this.state.exprAllowed = false; }; - // Parses import declaration. - - pp.parseImport = function (node) { - this.next(); - - // import '...' - if (this.match(_tokenizerTypes.types.string)) { - node.specifiers = []; - node.source = this.parseExprAtom(); + types.backQuote.updateContext = function () { + if (this.curContext() === types$1.template) { + this.state.context.pop(); } else { - node.specifiers = []; - this.parseImportSpecifiers(node); - this.expectContextual("from"); - node.source = this.match(_tokenizerTypes.types.string) ? this.parseExprAtom() : this.unexpected(); + this.state.context.push(types$1.template); } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); + this.state.exprAllowed = false; + }; + + function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. + + var Position = function Position(line, col) { + _classCallCheck$4(this, Position); + + this.line = line; + this.column = col; }; - // Parses a comma-separated list of module imports. + var SourceLocation = function SourceLocation(start, end) { + _classCallCheck$4(this, SourceLocation); - pp.parseImportSpecifiers = function (node) { - var first = true; - if (this.match(_tokenizerTypes.types.name)) { - // import defaultObj, { x, y as z } from '...' - var startPos = this.state.start, - startLoc = this.state.startLoc; - node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc)); - if (!this.eat(_tokenizerTypes.types.comma)) return; - } + this.start = start; + this.end = end; + }; - if (this.match(_tokenizerTypes.types.star)) { - var specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier")); - return; - } + // 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. - this.expect(_tokenizerTypes.types.braceL); - while (!this.eat(_tokenizerTypes.types.braceR)) { - if (first) { - first = false; + 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 { - this.expect(_tokenizerTypes.types.comma); - if (this.eat(_tokenizerTypes.types.braceR)) break; + return new Position(line, offset - cur); } + } + } - var specifier = this.startNode(); - specifier.imported = this.parseIdentifier(true); - specifier.local = this.eatContextual("as") ? this.parseIdentifier() : specifier.imported.__clone(); - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + function _classCallCheck$5(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var State = function () { + function State() { + _classCallCheck$5(this, State); } - }; - pp.parseImportSpecifierDefault = function (id, startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - node.local = id; - this.checkLVal(node.local, true); - return this.finishNode(node, "ImportDefaultSpecifier"); - }; - },{"../tokenizer/types":17,"../util/whitespace":20,"./index":5,"babel-runtime/core-js/get-iterator":21,"babel-runtime/core-js/object/create":22,"babel-runtime/helpers/interop-require-default":26}],10:[function(require,module,exports){ - /* @flow */ + State.prototype.init = function init(options, input) { + this.strict = options.strictMode === false ? false : options.sourceType === "module"; - "use strict"; + this.input = input; - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + this.potentialArrowAt = -1; - var _tokenizerTypes = require("../tokenizer/types"); + this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inType = false; - var _index = require("./index"); + this.labels = []; - var _index2 = _interopRequireDefault(_index); + this.decorators = []; - var _utilWhitespace = require("../util/whitespace"); + this.tokens = []; - var pp = _index2["default"].prototype; + this.comments = []; - // ## Parser utilities + this.trailingComments = []; + this.leadingComments = []; + this.commentStack = []; - // TODO + this.pos = this.lineStart = 0; + this.curLine = 1; - pp.addExtra = function (node, key, val) { - if (!node) return; + this.type = types.eof; + this.value = null; + this.start = this.end = this.pos; + this.startLoc = this.endLoc = this.curPosition(); - var extra = node.extra = node.extra || {}; - extra[key] = val; - }; + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; - // TODO + this.context = [types$1.braceStatement]; + this.exprAllowed = true; - pp.isRelational = function (op) { - return this.match(_tokenizerTypes.types.relational) && this.state.value === op; - }; + this.containsEsc = this.containsOctal = false; + this.octalPosition = null; - // TODO + this.exportedIdentifiers = []; - pp.expectRelational = function (op) { - if (this.isRelational(op)) { - this.next(); - } else { - this.unexpected(); - } - }; + return this; + }; - // Tests whether parsed token is a contextual keyword. + // TODO - pp.isContextual = function (name) { - return this.match(_tokenizerTypes.types.name) && this.state.value === name; - }; - // Consumes contextual keyword if possible. + // TODO - pp.eatContextual = function (name) { - return this.state.value === name && this.eat(_tokenizerTypes.types.name); - }; - // Asserts that following token is given contextual keyword. + // Used to signify the start of a potential arrow function - pp.expectContextual = function (name) { - if (!this.eatContextual(name)) this.unexpected(); - }; - // Test whether a semicolon can be inserted at the current position. + // Flags to track whether we are in a function, a generator. - pp.canInsertSemicolon = function () { - return this.match(_tokenizerTypes.types.eof) || this.match(_tokenizerTypes.types.braceR) || _utilWhitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - }; - // TODO + // Labels in scope. - pp.isLineTerminator = function () { - return this.eat(_tokenizerTypes.types.semi) || this.canInsertSemicolon(); - }; - // Consume a semicolon, or, failing that, see if we are allowed to - // pretend that there is a semicolon at this position. + // Leading decorators. - pp.semicolon = function () { - if (!this.isLineTerminator()) this.unexpected(); - }; - // Expect a token of a given type. If found, consume it, otherwise, - // raise an unexpected token error. + // Token store. - pp.expect = function (type) { - return this.eat(type) || this.unexpected(); - }; - // Raise an unexpected token error. + // Comment store. - pp.unexpected = function (pos) { - this.raise(pos != null ? pos : this.state.start, "Unexpected token"); - }; - },{"../tokenizer/types":17,"../util/whitespace":20,"./index":5,"babel-runtime/helpers/interop-require-default":26}],11:[function(require,module,exports){ - "use strict"; - var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; + // Comment attachment store - exports.__esModule = true; - var _tokenizerTypes = require("../tokenizer/types"); + // The current position of the tokenizer in the input. - var _parser = require("../parser"); - var _parser2 = _interopRequireDefault(_parser); + // Properties of the current token: + // Its type - var pp = _parser2["default"].prototype; - pp.flowParseTypeInitialiser = function (tok, allowLeadingPipeOrAnd) { - var oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || _tokenizerTypes.types.colon); - if (allowLeadingPipeOrAnd) { - if (this.match(_tokenizerTypes.types.bitwiseAND) || this.match(_tokenizerTypes.types.bitwiseOR)) { - this.next(); - } - } - var type = this.flowParseType(); - this.state.inType = oldInType; - return type; - }; + // For tokens that include more information than their type, the value - pp.flowParseDeclareClass = function (node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - }; - pp.flowParseDeclareFunction = function (node) { - this.next(); + // Its start and end offset - var id = node.id = this.parseIdentifier(); - var typeNode = this.startNode(); - var typeContainer = this.startNode(); + // And, if locations are used, the {line, column} object + // corresponding to those offsets - if (this.isRelational("<")) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - this.expect(_tokenizerTypes.types.parenL); - var tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - this.expect(_tokenizerTypes.types.parenR); - typeNode.returnType = this.flowParseTypeInitialiser(); + // Position information for the previous token - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.finishNode(id, id.type); + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. - this.semicolon(); - return this.finishNode(node, "DeclareFunction"); - }; + // 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. - pp.flowParseDeclare = function (node) { - if (this.match(_tokenizerTypes.types._class)) { - return this.flowParseDeclareClass(node); - } else if (this.match(_tokenizerTypes.types._function)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(_tokenizerTypes.types._var)) { - return this.flowParseDeclareVariable(node); - } else if (this.isContextual("module")) { - return this.flowParseDeclareModule(node); - } else if (this.isContextual("type")) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual("interface")) { - return this.flowParseDeclareInterface(node); - } else { - this.unexpected(); - } - }; - pp.flowParseDeclareVariable = function (node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - }; + // TODO - pp.flowParseDeclareModule = function (node) { - this.next(); - if (this.match(_tokenizerTypes.types.string)) { - node.id = this.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } + // Names of exports store. `default` is stored as a name for both + // `export default foo;` and `export { foo as default };`. - var bodyNode = node.body = this.startNode(); - var body = bodyNode.body = []; - this.expect(_tokenizerTypes.types.braceL); - while (!this.match(_tokenizerTypes.types.braceR)) { - var node2 = this.startNode(); - // todo: declare check - this.next(); + State.prototype.curPosition = function curPosition() { + return new Position(this.curLine, this.pos - this.lineStart); + }; - body.push(this.flowParseDeclare(node2)); - } - this.expect(_tokenizerTypes.types.braceR); + State.prototype.clone = function clone(skipArrays) { + var state = new State(); + for (var key in this) { + var val = this[key]; - this.finishNode(bodyNode, "BlockStatement"); - return this.finishNode(node, "DeclareModule"); - }; + if ((!skipArrays || key === "context") && Array.isArray(val)) { + val = val.slice(); + } - pp.flowParseDeclareTypeAlias = function (node) { - this.next(); - this.flowParseTypeAlias(node); - return this.finishNode(node, "DeclareTypeAlias"); - }; + state[key] = val; + } + return state; + }; - pp.flowParseDeclareInterface = function (node) { - this.next(); - this.flowParseInterfaceish(node); - return this.finishNode(node, "DeclareInterface"); - }; + return State; + }(); - // Interfaces + function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - pp.flowParseInterfaceish = function (node, allowStatic) { - node.id = this.parseIdentifier(); + /* eslint indent: 0 */ - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); + // 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(state) { + _classCallCheck$1(this, Token); + + this.type = state.type; + this.value = state.value; + this.start = state.start; + this.end = state.end; + this.loc = new SourceLocation(state.startLoc, state.endLoc); + }; + + // ## Tokenizer + + function codePointToString(code) { + // UTF-16 Decoding + if (code <= 0xFFFF) { + return String.fromCharCode(code); } else { - node.typeParameters = null; + return String.fromCharCode((code - 0x10000 >> 10) + 0xD800, (code - 0x10000 & 1023) + 0xDC00); } + } - node["extends"] = []; - node.mixins = []; + var Tokenizer = function () { + function Tokenizer(options, input) { + _classCallCheck$1(this, Tokenizer); - if (this.eat(_tokenizerTypes.types._extends)) { - do { - node["extends"].push(this.flowParseInterfaceExtends()); - } while (this.eat(_tokenizerTypes.types.comma)); + this.state = new State(); + this.state.init(options, input); } - if (this.isContextual("mixins")) { - this.next(); - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(_tokenizerTypes.types.comma)); - } + // Move to the next token - node.body = this.flowParseObjectType(allowStatic); - }; + Tokenizer.prototype.next = function next() { + if (!this.isLookahead) { + this.state.tokens.push(new Token(this.state)); + } - pp.flowParseInterfaceExtends = function () { - var node = this.startNode(); + this.state.lastTokEnd = this.state.end; + this.state.lastTokStart = this.state.start; + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + }; - node.id = this.parseIdentifier(); - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } + // TODO - return this.finishNode(node, "InterfaceExtends"); - }; + Tokenizer.prototype.eat = function eat(type) { + if (this.match(type)) { + this.next(); + return true; + } else { + return false; + } + }; - pp.flowParseInterface = function (node) { - this.flowParseInterfaceish(node, false); - return this.finishNode(node, "InterfaceDeclaration"); - }; + // TODO - // Type aliases + Tokenizer.prototype.match = function match(type) { + return this.state.type === type; + }; - pp.flowParseTypeAlias = function (node) { - node.id = this.parseIdentifier(); + // TODO - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } + Tokenizer.prototype.isKeyword = function isKeyword(word) { + return isKeyword$1(word); + }; - node.right = this.flowParseTypeInitialiser(_tokenizerTypes.types.eq, - /*allowLeadingPipeOrAnd*/true); - this.semicolon(); + // TODO - return this.finishNode(node, "TypeAlias"); - }; + Tokenizer.prototype.lookahead = function lookahead() { + var old = this.state; + this.state = old.clone(true); - // Type annotations + this.isLookahead = true; + this.next(); + this.isLookahead = false; - pp.flowParseTypeParameterDeclaration = function () { - var node = this.startNode(); - node.params = []; + var curr = this.state.clone(true); + this.state = old; + return curr; + }; - this.expectRelational("<"); - while (!this.isRelational(">")) { - node.params.push(this.flowParseExistentialTypeParam() || this.flowParseTypeAnnotatableIdentifier()); - if (!this.isRelational(">")) { - this.expect(_tokenizerTypes.types.comma); + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). + + Tokenizer.prototype.setStrict = function setStrict(strict) { + this.state.strict = strict; + if (!this.match(types.num) && !this.match(types.string)) return; + this.state.pos = this.state.start; + while (this.state.pos < this.state.lineStart) { + this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; + --this.state.curLine; } - } - this.expectRelational(">"); + this.nextToken(); + }; - return this.finishNode(node, "TypeParameterDeclaration"); - }; + Tokenizer.prototype.curContext = function curContext() { + return this.state.context[this.state.context.length - 1]; + }; - pp.flowParseExistentialTypeParam = function () { - if (this.match(_tokenizerTypes.types.star)) { - var node = this.startNode(); - this.next(); - return this.finishNode(node, "ExistentialTypeParam"); - } - }; + // Read a single token, updating the parser object's token-related + // properties. - pp.flowParseTypeParameterInstantiation = function () { - var node = this.startNode(), - oldInType = this.state.inType; - node.params = []; + Tokenizer.prototype.nextToken = function nextToken() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) this.skipSpace(); - this.state.inType = true; + this.state.containsOctal = false; + this.state.octalPosition = null; + this.state.start = this.state.pos; + this.state.startLoc = this.state.curPosition(); + if (this.state.pos >= this.input.length) return this.finishToken(types.eof); - this.expectRelational("<"); - while (!this.isRelational(">")) { - node.params.push(this.flowParseExistentialTypeParam() || this.flowParseType()); - if (!this.isRelational(">")) { - this.expect(_tokenizerTypes.types.comma); + if (curContext.override) { + return curContext.override(this); + } else { + return this.readToken(this.fullCharCodeAtPos()); } - } - this.expectRelational(">"); + }; - this.state.inType = oldInType; + Tokenizer.prototype.readToken = function readToken(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code) || code === 92 /* '\' */) { + return this.readWord(); + } else { + return this.getTokenFromCode(code); + } + }; - return this.finishNode(node, "TypeParameterInstantiation"); - }; + Tokenizer.prototype.fullCharCodeAtPos = function fullCharCodeAtPos() { + var code = this.input.charCodeAt(this.state.pos); + if (code <= 0xd7ff || code >= 0xe000) return code; - pp.flowParseObjectPropertyKey = function () { - return this.match(_tokenizerTypes.types.num) || this.match(_tokenizerTypes.types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - }; + var next = this.input.charCodeAt(this.state.pos + 1); + return (code << 10) + next - 0x35fdc00; + }; - pp.flowParseObjectTypeIndexer = function (node, isStatic) { - node["static"] = isStatic; + Tokenizer.prototype.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "CommentBlock" : "CommentLine", + value: text, + start: start, + end: end, + loc: new SourceLocation(startLoc, endLoc) + }; - this.expect(_tokenizerTypes.types.bracketL); - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - this.expect(_tokenizerTypes.types.bracketR); - node.value = this.flowParseTypeInitialiser(); + if (!this.isLookahead) { + this.state.tokens.push(comment); + this.state.comments.push(comment); + this.addComment(comment); + } + }; - this.flowObjectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeIndexer"); - }; + Tokenizer.prototype.skipBlockComment = function skipBlockComment() { + var startLoc = this.state.curPosition(); + var start = this.state.pos, + end = this.input.indexOf("*/", this.state.pos += 2); + if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - pp.flowParseObjectTypeMethodish = function (node) { - node.params = []; - node.rest = null; - node.typeParameters = null; + this.state.pos = end + 2; + lineBreakG.lastIndex = start; + var match = void 0; + while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { + ++this.state.curLine; + this.state.lineStart = match.index + match[0].length; + } - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } + this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); + }; - this.expect(_tokenizerTypes.types.parenL); - while (this.match(_tokenizerTypes.types.name)) { - node.params.push(this.flowParseFunctionTypeParam()); - if (!this.match(_tokenizerTypes.types.parenR)) { - this.expect(_tokenizerTypes.types.comma); + Tokenizer.prototype.skipLineComment = function skipLineComment(startSkip) { + var start = this.state.pos; + var startLoc = this.state.curPosition(); + var ch = this.input.charCodeAt(this.state.pos += startSkip); + while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this.state.pos; + ch = this.input.charCodeAt(this.state.pos); } - } - if (this.eat(_tokenizerTypes.types.ellipsis)) { - node.rest = this.flowParseFunctionTypeParam(); - } - this.expect(_tokenizerTypes.types.parenR); - node.returnType = this.flowParseTypeInitialiser(); + this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); + }; - return this.finishNode(node, "FunctionTypeAnnotation"); - }; + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. - pp.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) { - var node = this.startNodeAt(startPos, startLoc); - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc)); - node["static"] = isStatic; - node.key = key; - node.optional = false; - this.flowObjectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeProperty"); - }; + Tokenizer.prototype.skipSpace = function skipSpace() { + loop: while (this.state.pos < this.input.length) { + var ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 32:case 160: + // ' ' + ++this.state.pos; + break; - pp.flowParseObjectTypeCallProperty = function (node, isStatic) { - var valueNode = this.startNode(); - node["static"] = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - this.flowObjectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeCallProperty"); - }; + case 13: + if (this.input.charCodeAt(this.state.pos + 1) === 10) { + ++this.state.pos; + } - pp.flowParseObjectType = function (allowStatic) { - var nodeStart = this.startNode(); - var node = undefined; - var propertyKey = undefined; - var isStatic = undefined; + case 10:case 8232:case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; + case 47: + // '/' + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + // '*' + this.skipBlockComment(); + break; - this.expect(_tokenizerTypes.types.braceL); + case 47: + this.skipLineComment(2); + break; - while (!this.match(_tokenizerTypes.types.braceR)) { - var optional = false; - var startPos = this.state.start, - startLoc = this.state.startLoc; - node = this.startNode(); - if (allowStatic && this.isContextual("static")) { - this.next(); - isStatic = true; - } + default: + break loop; + } + break; - if (this.match(_tokenizerTypes.types.bracketL)) { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic)); - } else if (this.match(_tokenizerTypes.types.parenL) || this.isRelational("<")) { - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, allowStatic)); - } else { - if (isStatic && this.match(_tokenizerTypes.types.colon)) { - propertyKey = this.parseIdentifier(); - } else { - propertyKey = this.flowParseObjectPropertyKey(); - } - if (this.isRelational("<") || this.match(_tokenizerTypes.types.parenL)) { - // This is a method property - nodeStart.properties.push(this.flowParseObjectTypeMethod(startPos, startLoc, isStatic, propertyKey)); - } else { - if (this.eat(_tokenizerTypes.types.question)) { - optional = true; - } - node.key = propertyKey; - node.value = this.flowParseTypeInitialiser(); - node.optional = optional; - node["static"] = isStatic; - this.flowObjectTypeSemicolon(); - nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty")); + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.state.pos; + } else { + break loop; + } } } - } - - this.expect(_tokenizerTypes.types.braceR); - - return this.finishNode(nodeStart, "ObjectTypeAnnotation"); - }; + }; - pp.flowObjectTypeSemicolon = function () { - if (!this.eat(_tokenizerTypes.types.semi) && !this.eat(_tokenizerTypes.types.comma) && !this.match(_tokenizerTypes.types.braceR)) { - this.unexpected(); - } - }; + // 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.flowParseGenericType = function (startPos, startLoc, id) { - var node = this.startNodeAt(startPos, startLoc); + Tokenizer.prototype.finishToken = function finishToken(type, val) { + this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); + var prevType = this.state.type; + this.state.type = type; + this.state.value = val; - node.typeParameters = null; - node.id = id; + this.updateContext(prevType); + }; - while (this.eat(_tokenizerTypes.types.dot)) { - var node2 = this.startNodeAt(startPos, startLoc); - node2.qualification = node.id; - node2.id = this.parseIdentifier(); - node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); - } + // ### Token reading - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } + // 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. + // - return this.finishNode(node, "GenericTypeAnnotation"); - }; - pp.flowParseTypeofType = function () { - var node = this.startNode(); - this.expect(_tokenizerTypes.types._typeof); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - }; + Tokenizer.prototype.readToken_dot = function readToken_dot() { + var next = this.input.charCodeAt(this.state.pos + 1); + if (next >= 48 && next <= 57) { + return this.readNumber(true); + } - pp.flowParseTupleType = function () { - var node = this.startNode(); - node.types = []; - this.expect(_tokenizerTypes.types.bracketL); - // We allow trailing commas - while (this.state.pos < this.input.length && !this.match(_tokenizerTypes.types.bracketR)) { - node.types.push(this.flowParseType()); - if (this.match(_tokenizerTypes.types.bracketR)) break; - this.expect(_tokenizerTypes.types.comma); - } - this.expect(_tokenizerTypes.types.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); - }; + var next2 = this.input.charCodeAt(this.state.pos + 2); + if (next === 46 && next2 === 46) { + // 46 = dot '.' + this.state.pos += 3; + return this.finishToken(types.ellipsis); + } else { + ++this.state.pos; + return this.finishToken(types.dot); + } + }; - pp.flowParseFunctionTypeParam = function () { - var optional = false; - var node = this.startNode(); - node.name = this.parseIdentifier(); - if (this.eat(_tokenizerTypes.types.question)) { - optional = true; - } - node.optional = optional; - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeParam"); - }; + Tokenizer.prototype.readToken_slash = function readToken_slash() { + // '/' + if (this.state.exprAllowed) { + ++this.state.pos; + return this.readRegexp(); + } - pp.flowParseFunctionTypeParams = function () { - var ret = { params: [], rest: null }; - while (this.match(_tokenizerTypes.types.name)) { - ret.params.push(this.flowParseFunctionTypeParam()); - if (!this.match(_tokenizerTypes.types.parenR)) { - this.expect(_tokenizerTypes.types.comma); + var next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + return this.finishOp(types.assign, 2); + } else { + return this.finishOp(types.slash, 1); } - } - if (this.eat(_tokenizerTypes.types.ellipsis)) { - ret.rest = this.flowParseFunctionTypeParam(); - } - return ret; - }; + }; - pp.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); + Tokenizer.prototype.readToken_mult_modulo = function readToken_mult_modulo(code) { + // '%*' + var type = code === 42 ? types.star : types.modulo; + var width = 1; + var next = this.input.charCodeAt(this.state.pos + 1); - case "void": - return this.finishNode(node, "VoidTypeAnnotation"); + if (next === 42) { + // '*' + width++; + next = this.input.charCodeAt(this.state.pos + 2); + type = types.exponent; + } - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); + if (next === 61) { + width++; + type = types.assign; + } - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); + return this.finishOp(type, width); + }; - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); + Tokenizer.prototype.readToken_pipe_amp = function readToken_pipe_amp(code) { + // '|&' + var next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); + if (next === 61) return this.finishOp(types.assign, 2); + if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(types.braceBarR, 2); + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); + }; - case "string": - return this.finishNode(node, "StringTypeAnnotation"); + Tokenizer.prototype.readToken_caret = function readToken_caret() { + // '^' + var next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + return this.finishOp(types.assign, 2); + } else { + return this.finishOp(types.bitwiseXOR, 1); + } + }; - default: - return this.flowParseGenericType(startPos, startLoc, id); - } - }; + Tokenizer.prototype.readToken_plus_min = function readToken_plus_min(code) { + // '+-' + var next = this.input.charCodeAt(this.state.pos + 1); - // The parsing of types roughly parallels the parsing of expressions, and - // primary types are kind of like primary expressions...they're the - // primitives with which other types are constructed. - pp.flowParsePrimaryType = function () { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var node = this.startNode(); - var tmp = undefined; - var type = undefined; - var isGroupedType = false; + if (next === code) { + if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); + } + return this.finishOp(types.incDec, 2); + } - switch (this.state.type) { - case _tokenizerTypes.types.name: - return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); + if (next === 61) { + return this.finishOp(types.assign, 2); + } else { + return this.finishOp(types.plusMin, 1); + } + }; - case _tokenizerTypes.types.braceL: - return this.flowParseObjectType(); + Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) { + // '<>' + var next = this.input.charCodeAt(this.state.pos + 1); + var size = 1; - case _tokenizerTypes.types.bracketL: - return this.flowParseTupleType(); + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(types.assign, size + 1); + return this.finishOp(types.bitShift, size); + } - case _tokenizerTypes.types.relational: - if (this.state.value === "<") { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(_tokenizerTypes.types.parenL); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(_tokenizerTypes.types.parenR); + if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { + if (this.inModule) this.unexpected(); + // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(_types.types.incDec, 2); + // Parses module export declaration. + + pp$1.parseExport = function (node) { + this.next(); + // export * from '...' + if (this.match(types.star)) { + var specifier = this.startNode(); + this.next(); + if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) { + specifier.exported = this.parseIdentifier(); + node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; + this.parseExportSpecifiersMaybe(node); + this.parseExportFrom(node, true); + } else { + this.parseExportFrom(node, true); + return this.finishNode(node, "ExportAllDeclaration"); } - - if (next === 61) { - return this.finishOp(_types.types.assign, 2); + } else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) { + var _specifier = this.startNode(); + _specifier.exported = this.parseIdentifier(true); + node.specifiers = [this.finishNode(_specifier, "ExportDefaultSpecifier")]; + if (this.match(types.comma) && this.lookahead().type === types.star) { + this.expect(types.comma); + var _specifier2 = this.startNode(); + this.expect(types.star); + this.expectContextual("as"); + _specifier2.exported = this.parseIdentifier(); + node.specifiers.push(this.finishNode(_specifier2, "ExportNamespaceSpecifier")); } else { - return this.finishOp(_types.types.plusMin, 1); + this.parseExportSpecifiersMaybe(node); } - }; + this.parseExportFrom(node, true); + } else if (this.eat(types._default)) { + // export default ... + var expr = this.startNode(); + var needsSemi = false; + if (this.eat(types._function)) { + expr = this.parseFunction(expr, true, false, false, true); + } else if (this.match(types._class)) { + expr = this.parseClass(expr, true, true); + } else { + needsSemi = true; + expr = this.parseMaybeAssign(); + } + node.declaration = expr; + if (needsSemi) this.semicolon(); + this.checkExport(node, true, true); + return this.finishNode(node, "ExportDefaultDeclaration"); + } else if (this.state.type.keyword || this.shouldParseExportDeclaration()) { + node.specifiers = []; + node.source = null; + node.declaration = this.parseExportDeclaration(node); + } else { + // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(); + this.parseExportFrom(node); + } + this.checkExport(node, true); + return this.finishNode(node, "ExportNamedDeclaration"); + }; - Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) { - // '<>' - var next = this.input.charCodeAt(this.state.pos + 1); - var size = 1; + pp$1.parseExportDeclaration = function () { + return this.parseStatement(true); + }; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(_types.types.assign, size + 1); - return this.finishOp(_types.types.bitShift, size); - } + pp$1.isExportDefaultSpecifier = function () { + if (this.match(types.name)) { + return this.state.value !== "type" && this.state.value !== "async" && this.state.value !== "interface"; + } - if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - if (this.inModule) this.unexpected(); - // `