babel-source 5.8.0 → 5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/babel.js +518 -490
  3. data/lib/babel/source.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzdlMmM5ODJjODY3NjVjODQwZWVmNmE3MGI2YjczNjU1MzAyMzY1Nw==
4
+ MmQ3NWU2N2JjODVlMGM1ZjY4ZDRjMTAyNDRkY2I3OTRkYzRkYjE3ZA==
5
5
  data.tar.gz: !binary |-
6
- ODIwNWRmODY0YzM1NDQ1NmIzMjk5MjkzY2YwYzIxNzNkNjg1ZGUwNw==
6
+ OWMzMmRlZTg0YzM0YjliYmY1ZjQzMjZjOTQwMjVkMWFiZWYzYzliMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDg5YjkyMWVkOTAzNmIzMmY3YzU2ZmNhMWViZDQ3NjE3Yzg5ODg3MTg3NGJi
10
- ZGU5MTQ5ZDhmMWJmMTIzMmE5OGNjMWJmNmU5ZjZlN2U3NTJhYTcxMzk2MWMw
11
- MGU5MTM1NzRlNzA3MTBjMzFlMGM3OGJhZTA4ZWYxMDJjN2ZmNmY=
9
+ NjUzMWY2NzZjNzcyZGIyZTBjOWMxN2E1MGRmNGM5ZDUzNjg3MWI2NjQ1MWI5
10
+ YjM4ZTA0Mjg5Yzk2ZjJlYjFiMjg3NTJlODNiZmRlNTJkMzhmZjRlYjlkMGZk
11
+ ZWViNDJmM2M3MjRjZjIxZmRmOGU4MWVkZjhmZTRhY2ZkZmQzNjc=
12
12
  data.tar.gz: !binary |-
13
- MTE3ZWMzZTZkN2I4ODMyYTA1NWFjYThiY2QyOWM0ODgzMWYzMTQzYTY1ZTg4
14
- NjI0NjcwNDM1MTVjYjU4M2Q5MWNkY2I1ZTUyMjljOGM3MmM4MjY4OWJlZThm
15
- Y2M0NzllNjljZjgzNmEzMzA1ZTMxNjAzMGU5NmEyOWIwMzYyYmE=
13
+ NTA5OGYwMjExYzcxYjIzNGE4YmFjMTdmYmJmNjVhNzUzMzE0ZDlkYjAzNmY3
14
+ ZTQxZTRkMDFlZmQ5YmZmOTIwYjRiMjRmZDQ3NjgwYWI4MDgyNjljZWZhOTRj
15
+ NTkxMzQxOGIxMjE0Mzg5NDQxN2QwZjI3OWNmMDgwNDlkY2Q1NTg=
data/lib/babel.js CHANGED
@@ -5852,6 +5852,14 @@ function parse(code) {
5852
5852
  (_opts$onToken = opts.onToken).push.apply(_opts$onToken, ast.tokens);
5853
5853
  }
5854
5854
 
5855
+ if (opts.onComment) {
5856
+ // istanbul ignore next
5857
+
5858
+ var _opts$onComment;
5859
+
5860
+ (_opts$onComment = opts.onComment).push.apply(_opts$onComment, ast.comments);
5861
+ }
5862
+
5855
5863
  return ast.program;
5856
5864
  }
5857
5865
  },{"../../package":551,"../polyfill":59,"../tools/build-external-helpers":60,"../transformation":81,"../transformation/file/options/config":63,"../transformation/pipeline":94,"../transformation/plugin":96,"../transformation/transformer":97,"../traversal":160,"../types":191,"../util":194,"./register/node-polyfill":32,"babylon":215,"fs":1,"lodash/lang/isFunction":446}],31:[function(require,module,exports){
@@ -5910,12 +5918,12 @@ var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionInclude
5910
5918
 
5911
5919
  var _lodashLangIsNumber = require("lodash/lang/isNumber");
5912
5920
 
5913
- var _lodashLangIsNumber2 = _interopRequireDefault(_lodashLangIsNumber);
5914
-
5915
5921
  /**
5916
5922
  * Buffer for collecting generated output.
5917
5923
  */
5918
5924
 
5925
+ var _lodashLangIsNumber2 = _interopRequireDefault(_lodashLangIsNumber);
5926
+
5919
5927
  var Buffer = (function () {
5920
5928
  function Buffer(position, format) {
5921
5929
  _classCallCheck(this, Buffer);
@@ -6397,12 +6405,12 @@ var _lodashLangIsNumber2 = _interopRequireDefault(_lodashLangIsNumber);
6397
6405
 
6398
6406
  var _types = require("../../types");
6399
6407
 
6400
- var t = _interopRequireWildcard(_types);
6401
-
6402
6408
  /**
6403
6409
  * RegExp for testing scientific notation in literals.
6404
6410
  */
6405
6411
 
6412
+ var t = _interopRequireWildcard(_types);
6413
+
6406
6414
  var SCIENTIFIC_NOTATION = /e/i;
6407
6415
 
6408
6416
  /**
@@ -6578,11 +6586,12 @@ var YieldExpression = buildYieldAwait("yield");
6578
6586
  exports.YieldExpression = YieldExpression;
6579
6587
  var AwaitExpression = buildYieldAwait("await");
6580
6588
 
6581
- exports.AwaitExpression = AwaitExpression;
6582
6589
  /**
6583
6590
  * Prints EmptyStatement.
6584
6591
  */
6585
6592
 
6593
+ exports.AwaitExpression = AwaitExpression;
6594
+
6586
6595
  function EmptyStatement() {
6587
6596
  this.semicolon();
6588
6597
  }
@@ -6647,12 +6656,13 @@ function BindExpression(node, print) {
6647
6656
  */
6648
6657
 
6649
6658
  exports.BinaryExpression = AssignmentExpression;
6650
- exports.LogicalExpression = AssignmentExpression;
6651
6659
 
6652
6660
  /**
6653
6661
  * Print MemberExpression, prints object, property, and value. Handles computed.
6654
6662
  */
6655
6663
 
6664
+ exports.LogicalExpression = AssignmentExpression;
6665
+
6656
6666
  function MemberExpression(node, print) {
6657
6667
  var obj = node.object;
6658
6668
  print.plain(obj);
@@ -6733,12 +6743,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
6733
6743
 
6734
6744
  var _types = require("../../types");
6735
6745
 
6736
- var t = _interopRequireWildcard(_types);
6737
-
6738
6746
  /**
6739
6747
  * Prints AnyTypeAnnotation.
6740
6748
  */
6741
6749
 
6750
+ var t = _interopRequireWildcard(_types);
6751
+
6742
6752
  function AnyTypeAnnotation() {
6743
6753
  this.push("any");
6744
6754
  }
@@ -6862,12 +6872,13 @@ function InterfaceExtends(node, print) {
6862
6872
  */
6863
6873
 
6864
6874
  exports.ClassImplements = InterfaceExtends;
6865
- exports.GenericTypeAnnotation = InterfaceExtends;
6866
6875
 
6867
6876
  /**
6868
6877
  * Prints interface-like node, prints id, typeParameters, extends, and body.
6869
6878
  */
6870
6879
 
6880
+ exports.GenericTypeAnnotation = InterfaceExtends;
6881
+
6871
6882
  function _interfaceish(node, print) {
6872
6883
  print.plain(node.id);
6873
6884
  print.plain(node.typeParameters);
@@ -6919,12 +6930,12 @@ function NullableTypeAnnotation(node, print) {
6919
6930
 
6920
6931
  var _types2 = require("./types");
6921
6932
 
6922
- exports.NumberLiteralTypeAnnotation = _types2.Literal;
6923
-
6924
6933
  /**
6925
6934
  * Prints NumberTypeAnnotation.
6926
6935
  */
6927
6936
 
6937
+ exports.NumberLiteralTypeAnnotation = _types2.Literal;
6938
+
6928
6939
  function NumberTypeAnnotation() {
6929
6940
  this.push("number");
6930
6941
  }
@@ -7140,12 +7151,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
7140
7151
 
7141
7152
  var _types = require("../../types");
7142
7153
 
7143
- var t = _interopRequireWildcard(_types);
7144
-
7145
7154
  /**
7146
7155
  * Prints JSXAttribute, prints name and value.
7147
7156
  */
7148
7157
 
7158
+ var t = _interopRequireWildcard(_types);
7159
+
7149
7160
  function JSXAttribute(node, print) {
7150
7161
  print.plain(node.name);
7151
7162
  if (node.value) {
@@ -7269,12 +7280,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
7269
7280
 
7270
7281
  var _types = require("../../types");
7271
7282
 
7272
- var t = _interopRequireWildcard(_types);
7273
-
7274
7283
  /**
7275
7284
  * Prints nodes with params, prints typeParameters, params, and returnType, handles optional params.
7276
7285
  */
7277
7286
 
7287
+ var t = _interopRequireWildcard(_types);
7288
+
7278
7289
  function _params(node, print) {
7279
7290
  // istanbul ignore next
7280
7291
 
@@ -7404,12 +7415,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
7404
7415
 
7405
7416
  var _types = require("../../types");
7406
7417
 
7407
- var t = _interopRequireWildcard(_types);
7408
-
7409
7418
  /**
7410
7419
  * Prints ImportSpecifier, prints imported and local.
7411
7420
  */
7412
7421
 
7422
+ var t = _interopRequireWildcard(_types);
7423
+
7413
7424
  function ImportSpecifier(node, print) {
7414
7425
  print.plain(node.imported);
7415
7426
  if (node.local && node.local.name !== node.imported.name) {
@@ -7605,12 +7616,12 @@ var _repeating2 = _interopRequireDefault(_repeating);
7605
7616
 
7606
7617
  var _types = require("../../types");
7607
7618
 
7608
- var t = _interopRequireWildcard(_types);
7609
-
7610
7619
  /**
7611
7620
  * Prints WithStatement, prints object and body.
7612
7621
  */
7613
7622
 
7623
+ var t = _interopRequireWildcard(_types);
7624
+
7614
7625
  function WithStatement(node, print) {
7615
7626
  this.keyword("with");
7616
7627
  this.push("(");
@@ -7702,11 +7713,12 @@ var ForInStatement = buildForXStatement("in");
7702
7713
  exports.ForInStatement = ForInStatement;
7703
7714
  var ForOfStatement = buildForXStatement("of");
7704
7715
 
7705
- exports.ForOfStatement = ForOfStatement;
7706
7716
  /**
7707
7717
  * Prints DoWhileStatement, prints body and test.
7708
7718
  */
7709
7719
 
7720
+ exports.ForOfStatement = ForOfStatement;
7721
+
7710
7722
  function DoWhileStatement(node, print) {
7711
7723
  this.push("do ");
7712
7724
  print.plain(node.body);
@@ -7746,11 +7758,12 @@ var ReturnStatement = buildLabelStatement("return", "argument");
7746
7758
  exports.ReturnStatement = ReturnStatement;
7747
7759
  var BreakStatement = buildLabelStatement("break");
7748
7760
 
7749
- exports.BreakStatement = BreakStatement;
7750
7761
  /**
7751
7762
  * Prints LabeledStatement, prints label and body.
7752
7763
  */
7753
7764
 
7765
+ exports.BreakStatement = BreakStatement;
7766
+
7754
7767
  function LabeledStatement(node, print) {
7755
7768
  print.plain(node.label);
7756
7769
  this.push(": ");
@@ -7984,12 +7997,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
7984
7997
 
7985
7998
  var _types = require("../../types");
7986
7999
 
7987
- var t = _interopRequireWildcard(_types);
7988
-
7989
8000
  /**
7990
8001
  * Prints Identifier, prints name.
7991
8002
  */
7992
8003
 
8004
+ var t = _interopRequireWildcard(_types);
8005
+
7993
8006
  function Identifier(node) {
7994
8007
  this.push(node.name);
7995
8008
  }
@@ -8009,12 +8022,13 @@ function RestElement(node, print) {
8009
8022
  */
8010
8023
 
8011
8024
  exports.SpreadElement = RestElement;
8012
- exports.SpreadProperty = RestElement;
8013
8025
 
8014
8026
  /**
8015
8027
  * Prints ObjectExpression, prints properties.
8016
8028
  */
8017
8029
 
8030
+ exports.SpreadProperty = RestElement;
8031
+
8018
8032
  function ObjectExpression(node, print) {
8019
8033
  var props = node.properties;
8020
8034
 
@@ -8165,7 +8179,7 @@ function _stringLiteral(val) {
8165
8179
  val = val.slice(1, -1);
8166
8180
 
8167
8181
  // unescape double quotes
8168
- val = val.replace(/\\"/g, "\"");
8182
+ val = val.replace(/\\"/g, '"');
8169
8183
 
8170
8184
  // escape single quotes
8171
8185
  val = val.replace(/'/g, "\\'");
@@ -8241,13 +8255,13 @@ var _node3 = _interopRequireDefault(_node2);
8241
8255
 
8242
8256
  var _types = require("../types");
8243
8257
 
8244
- var t = _interopRequireWildcard(_types);
8245
-
8246
8258
  /**
8247
8259
  * Babel's code generator, turns an ast into code, maintaining sourcemaps,
8248
8260
  * user preferences, and valid output.
8249
8261
  */
8250
8262
 
8263
+ var t = _interopRequireWildcard(_types);
8264
+
8251
8265
  var CodeGenerator = (function () {
8252
8266
  function CodeGenerator(ast, opts, code) {
8253
8267
  _classCallCheck(this, CodeGenerator);
@@ -8341,6 +8355,10 @@ var CodeGenerator = (function () {
8341
8355
  }
8342
8356
  };
8343
8357
 
8358
+ /**
8359
+ * All node generators.
8360
+ */
8361
+
8344
8362
  /**
8345
8363
  * Generate code and sourcemap from ast.
8346
8364
  *
@@ -8686,11 +8704,6 @@ var CodeGenerator = (function () {
8686
8704
 
8687
8705
  _createClass(CodeGenerator, null, [{
8688
8706
  key: "generators",
8689
-
8690
- /**
8691
- * All node generators.
8692
- */
8693
-
8694
8707
  value: {
8695
8708
  templateLiterals: require("./generators/template-literals"),
8696
8709
  comprehensions: require("./generators/comprehensions"),
@@ -8708,12 +8721,14 @@ var CodeGenerator = (function () {
8708
8721
  }]);
8709
8722
 
8710
8723
  return CodeGenerator;
8711
- })();
8724
+ })()
8712
8725
 
8713
8726
  /**
8714
8727
  * [Please add a description.]
8715
8728
  */
8716
8729
 
8730
+ ;
8731
+
8717
8732
  _lodashCollectionEach2["default"](_buffer2["default"].prototype, function (fn, key) {
8718
8733
  CodeGenerator.prototype[key] = function () {
8719
8734
  return fn.apply(this.buffer, arguments);
@@ -8772,8 +8787,6 @@ var _lodashCollectionSome2 = _interopRequireDefault(_lodashCollectionSome);
8772
8787
 
8773
8788
  var _types = require("../../types");
8774
8789
 
8775
- var t = _interopRequireWildcard(_types);
8776
-
8777
8790
  /**
8778
8791
  * Test if node matches a set of type-matcher pairs.
8779
8792
  * @example
@@ -8784,6 +8797,8 @@ var t = _interopRequireWildcard(_types);
8784
8797
  * }, node, parent);
8785
8798
  */
8786
8799
 
8800
+ var t = _interopRequireWildcard(_types);
8801
+
8787
8802
  var find = function find(obj, node, parent) {
8788
8803
  if (!obj) return;
8789
8804
  var result;
@@ -8899,14 +8914,15 @@ var Node = (function () {
8899
8914
  };
8900
8915
 
8901
8916
  return Node;
8902
- })();
8903
-
8904
- exports["default"] = Node;
8917
+ })()
8905
8918
 
8906
8919
  /**
8907
8920
  * Add all static methods from `Node` to `Node.prototype`.
8908
8921
  */
8909
8922
 
8923
+ ;
8924
+
8925
+ exports["default"] = Node;
8910
8926
  _lodashCollectionEach2["default"](Node, function (fn, key) {
8911
8927
  Node.prototype[key] = function () {
8912
8928
  // Avoid leaking arguments to prevent deoptimization
@@ -8953,14 +8969,15 @@ var _lodashCollectionEach2 = _interopRequireDefault(_lodashCollectionEach);
8953
8969
 
8954
8970
  var _types = require("../../types");
8955
8971
 
8956
- var t = _interopRequireWildcard(_types);
8957
-
8958
8972
  /**
8959
8973
  * Create a mapping of operators to precendence.
8960
8974
  *
8961
8975
  * @example
8962
8976
  * { "==": 6, "+": 9 }
8963
8977
  */
8978
+
8979
+ var t = _interopRequireWildcard(_types);
8980
+
8964
8981
  var PRECEDENCE = {};
8965
8982
 
8966
8983
  _lodashCollectionEach2["default"]([["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]], function (tier, i) {
@@ -9292,8 +9309,6 @@ var _lodashCollectionMap2 = _interopRequireDefault(_lodashCollectionMap);
9292
9309
 
9293
9310
  var _types = require("../../types");
9294
9311
 
9295
- var t = _interopRequireWildcard(_types);
9296
-
9297
9312
  /**
9298
9313
  * Crawl a node to test if it contains a CallExpression, a Function, or a Helper.
9299
9314
  *
@@ -9302,6 +9317,8 @@ var t = _interopRequireWildcard(_types);
9302
9317
  * // { hasCall: false, hasFunction: true, hasHelper: false }
9303
9318
  */
9304
9319
 
9320
+ var t = _interopRequireWildcard(_types);
9321
+
9305
9322
  function crawl(node) {
9306
9323
  var state = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
9307
9324
 
@@ -9594,12 +9611,12 @@ var _sourceMap2 = _interopRequireDefault(_sourceMap);
9594
9611
 
9595
9612
  var _types = require("../types");
9596
9613
 
9597
- var t = _interopRequireWildcard(_types);
9598
-
9599
9614
  /**
9600
9615
  * Build a sourcemap.
9601
9616
  */
9602
9617
 
9618
+ var t = _interopRequireWildcard(_types);
9619
+
9603
9620
  var SourceMap = (function () {
9604
9621
  function SourceMap(position, opts, code) {
9605
9622
  _classCallCheck(this, SourceMap);
@@ -9833,12 +9850,12 @@ var _esutils2 = _interopRequireDefault(_esutils);
9833
9850
 
9834
9851
  var _chalk = require("chalk");
9835
9852
 
9836
- var _chalk2 = _interopRequireDefault(_chalk);
9837
-
9838
9853
  /**
9839
9854
  * Chalk styles for token types.
9840
9855
  */
9841
9856
 
9857
+ var _chalk2 = _interopRequireDefault(_chalk);
9858
+
9842
9859
  var defs = {
9843
9860
  string: _chalk2["default"].red,
9844
9861
  punctuator: _chalk2["default"].bold,
@@ -9959,12 +9976,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
9959
9976
 
9960
9977
  var _lodashObjectMerge = require("lodash/object/merge");
9961
9978
 
9962
- var _lodashObjectMerge2 = _interopRequireDefault(_lodashObjectMerge);
9963
-
9964
9979
  /**
9965
9980
  * Merge options.
9966
9981
  */
9967
9982
 
9983
+ var _lodashObjectMerge2 = _interopRequireDefault(_lodashObjectMerge);
9984
+
9968
9985
  exports["default"] = function (dest, src) {
9969
9986
  if (!dest || !src) return;
9970
9987
 
@@ -10005,14 +10022,14 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
10005
10022
 
10006
10023
  var _types = require("../types");
10007
10024
 
10008
- var t = _interopRequireWildcard(_types);
10009
-
10010
10025
  /**
10011
10026
  * Normalize an AST.
10012
10027
  *
10013
10028
  * - Wrap `Program` node with a `File` node.
10014
10029
  */
10015
10030
 
10031
+ var t = _interopRequireWildcard(_types);
10032
+
10016
10033
  exports["default"] = function (ast, comments, tokens) {
10017
10034
  if (ast && ast.type === "Program") {
10018
10035
  return t.file(ast, comments || [], tokens || []);
@@ -10046,12 +10063,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
10046
10063
 
10047
10064
  var _babylon = require("babylon");
10048
10065
 
10049
- var babylon = _interopRequireWildcard(_babylon);
10050
-
10051
10066
  /**
10052
10067
  * Parse `code` with normalized options, collecting tokens and comments.
10053
10068
  */
10054
10069
 
10070
+ var babylon = _interopRequireWildcard(_babylon);
10071
+
10055
10072
  exports["default"] = function (code) {
10056
10073
  var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
10057
10074
 
@@ -10089,13 +10106,13 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
10089
10106
 
10090
10107
  var _util = require("util");
10091
10108
 
10092
- var util = _interopRequireWildcard(_util);
10093
-
10094
10109
  /**
10095
10110
  * Mapping of messages to be used in Babel.
10096
10111
  * Messages can include $0-style placeholders.
10097
10112
  */
10098
10113
 
10114
+ var util = _interopRequireWildcard(_util);
10115
+
10099
10116
  var MESSAGES = {
10100
10117
  tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",
10101
10118
  JSXNamespacedTags: "Namespace tags are not supported. ReactJSX is not XML.",
@@ -10139,11 +10156,12 @@ var MESSAGES = {
10139
10156
  pluginInvalidPropertyVisitor: "Define your visitor methods inside a `visitor` property like so:\n\n new Plugin(\"foobar\", {\n visitor: {\n // define your visitor methods here!\n }\n });\n"
10140
10157
  };
10141
10158
 
10142
- exports.MESSAGES = MESSAGES;
10143
10159
  /**
10144
10160
  * Get a message with $0 placeholders replaced by arguments.
10145
10161
  */
10146
10162
 
10163
+ exports.MESSAGES = MESSAGES;
10164
+
10147
10165
  function get(key) {
10148
10166
  for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10149
10167
  args[_key - 1] = arguments[_key];
@@ -10225,12 +10243,12 @@ var _lodashCollectionEach2 = _interopRequireDefault(_lodashCollectionEach);
10225
10243
 
10226
10244
  var _types = require("../types");
10227
10245
 
10228
- var t = _interopRequireWildcard(_types);
10229
-
10230
10246
  /**
10231
10247
  * [Please add a description.]
10232
10248
  */
10233
10249
 
10250
+ var t = _interopRequireWildcard(_types);
10251
+
10234
10252
  function buildGlobal(namespace, builder) {
10235
10253
  var body = [];
10236
10254
  var container = t.functionExpression(null, [t.identifier("global")], t.blockStatement(body));
@@ -10417,12 +10435,12 @@ var _path2 = _interopRequireDefault(_path);
10417
10435
 
10418
10436
  var _types = require("../../types");
10419
10437
 
10420
- var t = _interopRequireWildcard(_types);
10421
-
10422
10438
  /**
10423
10439
  * [Please add a description.]
10424
10440
  */
10425
10441
 
10442
+ var t = _interopRequireWildcard(_types);
10443
+
10426
10444
  var File = (function () {
10427
10445
  function File(opts, pipeline) {
10428
10446
  if (opts === undefined) opts = {};
@@ -10460,6 +10478,10 @@ var File = (function () {
10460
10478
  this.hub = new _traversalHub2["default"](this);
10461
10479
  }
10462
10480
 
10481
+ /**
10482
+ * [Please add a description.]
10483
+ */
10484
+
10463
10485
  /**
10464
10486
  * [Please add a description.]
10465
10487
  */
@@ -10564,6 +10586,8 @@ var File = (function () {
10564
10586
 
10565
10587
  // build dependency graph
10566
10588
  var _arr = stack;
10589
+
10590
+ // collapse stack categories
10567
10591
  for (var _i = 0; _i < _arr.length; _i++) {
10568
10592
  var pass = _arr[_i];var _arr2 = pass.plugin.dependencies;
10569
10593
 
@@ -10571,10 +10595,7 @@ var File = (function () {
10571
10595
  var dep = _arr2[_i2];
10572
10596
  this.transformerDependencies[dep] = pass.key;
10573
10597
  }
10574
- }
10575
-
10576
- // collapse stack categories
10577
- this.transformerStack = this.collapseStack(stack);
10598
+ }this.transformerStack = this.collapseStack(stack);
10578
10599
  };
10579
10600
 
10580
10601
  /**
@@ -10978,7 +10999,9 @@ var File = (function () {
10978
10999
  var newStack = err.stack.replace(err.message, message);
10979
11000
  try {
10980
11001
  err.stack = newStack;
10981
- } catch (e) {}
11002
+ } catch (e) {
11003
+ // `err.stack` may be a readonly property in some environments
11004
+ }
10982
11005
  }
10983
11006
 
10984
11007
  throw err;
@@ -11134,23 +11157,18 @@ var File = (function () {
11134
11157
 
11135
11158
  _createClass(File, null, [{
11136
11159
  key: "helpers",
11137
-
11138
- /**
11139
- * [Please add a description.]
11140
- */
11141
-
11142
11160
  value: ["inherits", "defaults", "create-class", "create-decorated-class", "create-decorated-object", "define-decorated-property-descriptor", "tagged-template-literal", "tagged-template-literal-loose", "to-array", "to-consumable-array", "sliced-to-array", "sliced-to-array-loose", "object-without-properties", "has-own", "slice", "bind", "define-property", "async-to-generator", "interop-require-wildcard", "interop-require-default", "typeof", "extends", "get", "set", "class-call-check", "object-destructuring-empty", "temporal-undefined", "temporal-assert-defined", "self-global", "default-props", "instanceof",
11143
11161
 
11144
11162
  // legacy
11145
11163
  "interop-require"],
11146
- enumerable: true
11147
- }, {
11148
- key: "soloHelpers",
11149
11164
 
11150
11165
  /**
11151
11166
  * [Please add a description.]
11152
11167
  */
11153
11168
 
11169
+ enumerable: true
11170
+ }, {
11171
+ key: "soloHelpers",
11154
11172
  value: [],
11155
11173
  enumerable: true
11156
11174
  }]);
@@ -11160,8 +11178,6 @@ var File = (function () {
11160
11178
 
11161
11179
  exports["default"] = File;
11162
11180
  module.exports = exports["default"];
11163
-
11164
- // `err.stack` may be a readonly property in some environments
11165
11181
  },{"../../generation":45,"../../helpers/code-frame":53,"../../helpers/parse":57,"../../traversal":160,"../../traversal/hub":159,"../../traversal/path":167,"../../types":191,"../../util":194,"../modules":89,"../plugin":96,"./logger":62,"./options/option-manager":65,"./plugin-manager":67,"convert-source-map":240,"lodash/collection/includes":359,"lodash/lang/isFunction":446,"lodash/object/defaults":456,"path":11,"shebang-regex":534,"source-map":536}],62:[function(require,module,exports){
11166
11182
  "use strict";
11167
11183
 
@@ -11868,12 +11884,12 @@ var _slash2 = _interopRequireDefault(_slash);
11868
11884
 
11869
11885
  var _util = require("../../../util");
11870
11886
 
11871
- var util = _interopRequireWildcard(_util);
11872
-
11873
11887
  /**
11874
11888
  * Get a transformer list from a value.
11875
11889
  */
11876
11890
 
11891
+ var util = _interopRequireWildcard(_util);
11892
+
11877
11893
  function transformerList(val) {
11878
11894
  return util.arrayify(val);
11879
11895
  }
@@ -11904,11 +11920,12 @@ function number(val) {
11904
11920
 
11905
11921
  var filename = _slash2["default"];
11906
11922
 
11907
- exports.filename = filename;
11908
11923
  /**
11909
11924
  * [Please add a description.]
11910
11925
  */
11911
11926
 
11927
+ exports.filename = filename;
11928
+
11912
11929
  function boolean(val) {
11913
11930
  return !!val;
11914
11931
  }
@@ -11970,16 +11987,20 @@ var _traversal2 = _interopRequireDefault(_traversal);
11970
11987
 
11971
11988
  var _helpersParse = require("../../helpers/parse");
11972
11989
 
11990
+ /**
11991
+ * [Please add a description.]
11992
+ */
11993
+
11973
11994
  var _helpersParse2 = _interopRequireDefault(_helpersParse);
11974
11995
 
11975
11996
  var _util = require("../../util");
11976
11997
 
11977
- var util = _interopRequireWildcard(_util);
11978
-
11979
11998
  /**
11980
11999
  * [Please add a description.]
11981
12000
  */
11982
12001
 
12002
+ var util = _interopRequireWildcard(_util);
12003
+
11983
12004
  var context = {
11984
12005
  messages: messages,
11985
12006
  Transformer: _transformer2["default"],
@@ -11989,10 +12010,6 @@ var context = {
11989
12010
  traverse: _traversal2["default"]
11990
12011
  };
11991
12012
 
11992
- /**
11993
- * [Please add a description.]
11994
- */
11995
-
11996
12013
  var PluginManager = (function () {
11997
12014
 
11998
12015
  /**
@@ -12013,6 +12030,10 @@ var PluginManager = (function () {
12013
12030
  return transformer;
12014
12031
  };
12015
12032
 
12033
+ /**
12034
+ * [Please add a description.]
12035
+ */
12036
+
12016
12037
  _createClass(PluginManager, null, [{
12017
12038
  key: "memoisedPlugins",
12018
12039
 
@@ -12024,19 +12045,15 @@ var PluginManager = (function () {
12024
12045
  enumerable: true
12025
12046
  }, {
12026
12047
  key: "positions",
12048
+ value: ["before", "after"],
12027
12049
 
12028
12050
  /**
12029
12051
  * [Please add a description.]
12030
12052
  */
12031
12053
 
12032
- value: ["before", "after"],
12033
12054
  enumerable: true
12034
12055
  }]);
12035
12056
 
12036
- /**
12037
- * [Please add a description.]
12038
- */
12039
-
12040
12057
  function PluginManager() {
12041
12058
  var _ref = arguments.length <= 0 || arguments[0] === undefined ? { transformers: {}, before: [], after: [] } : arguments[0];
12042
12059
 
@@ -12174,12 +12191,12 @@ var _explodeAssignableExpression2 = _interopRequireDefault(_explodeAssignableExp
12174
12191
 
12175
12192
  var _types = require("../../types");
12176
12193
 
12177
- var t = _interopRequireWildcard(_types);
12178
-
12179
12194
  /**
12180
12195
  * [Please add a description.]
12181
12196
  */
12182
12197
 
12198
+ var t = _interopRequireWildcard(_types);
12199
+
12183
12200
  exports["default"] = function (opts) {
12184
12201
  var exports = {};
12185
12202
 
@@ -12255,12 +12272,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
12255
12272
 
12256
12273
  var _types = require("../../types");
12257
12274
 
12258
- var t = _interopRequireWildcard(_types);
12259
-
12260
12275
  /**
12261
12276
  * [Please add a description.]
12262
12277
  */
12263
12278
 
12279
+ var t = _interopRequireWildcard(_types);
12280
+
12264
12281
  function build(node, buildBody) {
12265
12282
  var self = node.blocks.shift();
12266
12283
  if (!self) return;
@@ -12315,12 +12332,12 @@ var react = _interopRequireWildcard(_react);
12315
12332
 
12316
12333
  var _types = require("../../types");
12317
12334
 
12318
- var t = _interopRequireWildcard(_types);
12319
-
12320
12335
  /**
12321
12336
  * [Please add a description.]
12322
12337
  */
12323
12338
 
12339
+ var t = _interopRequireWildcard(_types);
12340
+
12324
12341
  exports["default"] = function (opts) {
12325
12342
  var visitor = {};
12326
12343
 
@@ -12506,12 +12523,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
12506
12523
 
12507
12524
  var _types = require("../../types");
12508
12525
 
12509
- var t = _interopRequireWildcard(_types);
12510
-
12511
12526
  /**
12512
12527
  * [Please add a description.]
12513
12528
  */
12514
12529
 
12530
+ var t = _interopRequireWildcard(_types);
12531
+
12515
12532
  var visitor = {
12516
12533
 
12517
12534
  /**
@@ -12585,12 +12602,12 @@ var _lodashObjectHas2 = _interopRequireDefault(_lodashObjectHas);
12585
12602
 
12586
12603
  var _types = require("../../types");
12587
12604
 
12588
- var t = _interopRequireWildcard(_types);
12589
-
12590
12605
  /**
12591
12606
  * [Please add a description.]
12592
12607
  */
12593
12608
 
12609
+ var t = _interopRequireWildcard(_types);
12610
+
12594
12611
  function push(mutatorMap, node, kind, file) {
12595
12612
  var alias = t.toKeyAlias(node);
12596
12613
 
@@ -12718,12 +12735,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
12718
12735
 
12719
12736
  var _types = require("../../types");
12720
12737
 
12721
- var t = _interopRequireWildcard(_types);
12722
-
12723
12738
  /**
12724
12739
  * [Please add a description.]
12725
12740
  */
12726
12741
 
12742
+ var t = _interopRequireWildcard(_types);
12743
+
12727
12744
  var getObjRef = function getObjRef(node, nodes, file, scope) {
12728
12745
  var ref;
12729
12746
  if (t.isIdentifier(node)) {
@@ -12809,12 +12826,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
12809
12826
 
12810
12827
  var _types = require("../../types");
12811
12828
 
12812
- var t = _interopRequireWildcard(_types);
12813
-
12814
12829
  /**
12815
12830
  * [Please add a description.]
12816
12831
  */
12817
12832
 
12833
+ var t = _interopRequireWildcard(_types);
12834
+
12818
12835
  exports["default"] = function (node) {
12819
12836
  var lastNonDefault = 0;
12820
12837
  for (var i = 0; i < node.params.length; i++) {
@@ -12837,12 +12854,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
12837
12854
 
12838
12855
  var _types = require("../../types");
12839
12856
 
12840
- var t = _interopRequireWildcard(_types);
12841
-
12842
12857
  /**
12843
12858
  * [Please add a description.]
12844
12859
  */
12845
12860
 
12861
+ var t = _interopRequireWildcard(_types);
12862
+
12846
12863
  exports["default"] = function (decorators, scope) {
12847
12864
  for (var i = 0; i < decorators.length; i++) {
12848
12865
  var decorator = decorators[i];
@@ -12899,12 +12916,12 @@ var util = _interopRequireWildcard(_util);
12899
12916
 
12900
12917
  var _types = require("../../types");
12901
12918
 
12902
- var t = _interopRequireWildcard(_types);
12903
-
12904
12919
  /**
12905
12920
  * [Please add a description.]
12906
12921
  */
12907
12922
 
12923
+ var t = _interopRequireWildcard(_types);
12924
+
12908
12925
  function visitIdentifier(context, node, scope, state) {
12909
12926
  // check if this node matches our function id
12910
12927
  if (node.name !== state.name) return;
@@ -13009,10 +13026,19 @@ var visit = function visit(node, name, scope) {
13009
13026
  // **extremely** annoying so we avoid setting the name if it has a param
13010
13027
  // with the same id
13011
13028
  state.selfReference = true;
13012
- } else {}
13029
+ } else {
13030
+ // otherwise it's defined somewhere in scope like:
13031
+ //
13032
+ // var t = function () {
13033
+ // var t = 2;
13034
+ // };
13035
+ //
13036
+ // so we can safely just set the id and move along as it shadows the
13037
+ // bound function id
13038
+ }
13013
13039
  } else if (state.outerDeclar || scope.hasGlobal(name)) {
13014
- scope.traverse(node, visitor, state);
13015
- }
13040
+ scope.traverse(node, visitor, state);
13041
+ }
13016
13042
 
13017
13043
  return state;
13018
13044
  };
@@ -13085,15 +13111,6 @@ function bare(node, parent, scope) {
13085
13111
  var state = visit(node, name, scope);
13086
13112
  return wrap(state, node, id, scope);
13087
13113
  }
13088
-
13089
- // otherwise it's defined somewhere in scope like:
13090
- //
13091
- // var t = function () {
13092
- // var t = 2;
13093
- // };
13094
- //
13095
- // so we can safely just set the id and move along as it shadows the
13096
- // bound function id
13097
13114
  },{"../../types":191,"../../util":194,"./get-function-arity":74}],77:[function(require,module,exports){
13098
13115
  "use strict";
13099
13116
 
@@ -13110,11 +13127,12 @@ var t = _interopRequireWildcard(_types);
13110
13127
 
13111
13128
  var isReactComponent = t.buildMatchMemberExpression("React.Component");
13112
13129
 
13113
- exports.isReactComponent = isReactComponent;
13114
13130
  /**
13115
13131
  * [Please add a description.]
13116
13132
  */
13117
13133
 
13134
+ exports.isReactComponent = isReactComponent;
13135
+
13118
13136
  function isCompatTag(tagName) {
13119
13137
  return tagName && /^[a-z]|\-/.test(tagName);
13120
13138
  }
@@ -13211,12 +13229,12 @@ var _lodashArrayPull2 = _interopRequireDefault(_lodashArrayPull);
13211
13229
 
13212
13230
  var _types = require("../../types");
13213
13231
 
13214
- var t = _interopRequireWildcard(_types);
13215
-
13216
13232
  /**
13217
13233
  * [Please add a description.]
13218
13234
  */
13219
13235
 
13236
+ var t = _interopRequireWildcard(_types);
13237
+
13220
13238
  function is(node, flag) {
13221
13239
  return t.isLiteral(node) && node.regex && node.regex.flags.indexOf(flag) >= 0;
13222
13240
  }
@@ -13241,12 +13259,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
13241
13259
 
13242
13260
  var _types = require("../../types");
13243
13261
 
13244
- var t = _interopRequireWildcard(_types);
13245
-
13246
13262
  /**
13247
13263
  * [Please add a description.]
13248
13264
  */
13249
13265
 
13266
+ var t = _interopRequireWildcard(_types);
13267
+
13250
13268
  var awaitVisitor = {
13251
13269
 
13252
13270
  /**
@@ -13345,12 +13363,12 @@ var messages = _interopRequireWildcard(_messages);
13345
13363
 
13346
13364
  var _types = require("../../types");
13347
13365
 
13348
- var t = _interopRequireWildcard(_types);
13349
-
13350
13366
  /**
13351
13367
  * [Please add a description.]
13352
13368
  */
13353
13369
 
13370
+ var t = _interopRequireWildcard(_types);
13371
+
13354
13372
  function isIllegalBareSuper(node, parent) {
13355
13373
  if (!t.isSuper(node)) return false;
13356
13374
  if (t.isMemberExpression(parent, { computed: false })) return false;
@@ -13664,6 +13682,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
13664
13682
 
13665
13683
  var _pipeline = require("./pipeline");
13666
13684
 
13685
+ /**
13686
+ * [Please add a description.]
13687
+ */
13688
+
13667
13689
  var _pipeline2 = _interopRequireDefault(_pipeline);
13668
13690
 
13669
13691
  /**
@@ -13698,10 +13720,6 @@ var _transformersFilters = require("./transformers/filters");
13698
13720
 
13699
13721
  var filters = _interopRequireWildcard(_transformersFilters);
13700
13722
 
13701
- /**
13702
- * [Please add a description.]
13703
- */
13704
-
13705
13723
  var pipeline = new _pipeline2["default"]();
13706
13724
 
13707
13725
  for (var key in _transformers2["default"]) {
@@ -13769,12 +13787,12 @@ var util = _interopRequireWildcard(_util);
13769
13787
 
13770
13788
  var _types = require("../../types");
13771
13789
 
13772
- var t = _interopRequireWildcard(_types);
13773
-
13774
13790
  /**
13775
13791
  * [Please add a description.]
13776
13792
  */
13777
13793
 
13794
+ var t = _interopRequireWildcard(_types);
13795
+
13778
13796
  var metadataVisitor = {
13779
13797
 
13780
13798
  /**
@@ -14122,7 +14140,7 @@ var DefaultFormatter = (function () {
14122
14140
 
14123
14141
  if (opts.sourceRoot) {
14124
14142
  // remove sourceRoot from filename
14125
- var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "/?");
14143
+ var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "\/?");
14126
14144
  filenameRelative = filenameRelative.replace(sourceRootRegEx, "");
14127
14145
  }
14128
14146
 
@@ -14329,12 +14347,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
14329
14347
 
14330
14348
  var _util = require("../../util");
14331
14349
 
14332
- var util = _interopRequireWildcard(_util);
14333
-
14334
14350
  /**
14335
14351
  * [Please add a description.]
14336
14352
  */
14337
14353
 
14354
+ var util = _interopRequireWildcard(_util);
14355
+
14338
14356
  exports["default"] = function (Parent) {
14339
14357
  var Constructor = function Constructor() {
14340
14358
  this.noInteropRequireImport = true;
@@ -14362,12 +14380,12 @@ var _amd2 = _interopRequireDefault(_amd);
14362
14380
 
14363
14381
  var _strict = require("./_strict");
14364
14382
 
14365
- var _strict2 = _interopRequireDefault(_strict);
14366
-
14367
14383
  /**
14368
14384
  * [Please add a description.]
14369
14385
  */
14370
14386
 
14387
+ var _strict2 = _interopRequireDefault(_strict);
14388
+
14371
14389
  exports["default"] = _strict2["default"](_amd2["default"]);
14372
14390
  module.exports = exports["default"];
14373
14391
  },{"./_strict":83,"./amd":85}],85:[function(require,module,exports){
@@ -14412,12 +14430,12 @@ var util = _interopRequireWildcard(_util);
14412
14430
 
14413
14431
  var _types = require("../../types");
14414
14432
 
14415
- var t = _interopRequireWildcard(_types);
14416
-
14417
14433
  /**
14418
14434
  * [Please add a description.]
14419
14435
  */
14420
14436
 
14437
+ var t = _interopRequireWildcard(_types);
14438
+
14421
14439
  var AMDFormatter = (function (_DefaultFormatter) {
14422
14440
  _inherits(AMDFormatter, _DefaultFormatter);
14423
14441
 
@@ -14521,21 +14539,25 @@ var AMDFormatter = (function (_DefaultFormatter) {
14521
14539
  this.defaultIds[key] = specifier.local;
14522
14540
  }
14523
14541
 
14524
- if (this.isModuleType(node, "absolute")) {} else if (this.isModuleType(node, "absoluteDefault")) {
14525
- // prevent unnecessary renaming of dynamic imports
14526
- this.ids[node.source.value] = ref;
14527
- ref = t.memberExpression(ref, t.identifier("default"));
14528
- } else if (t.isImportNamespaceSpecifier(specifier)) {} else if (!_lodashCollectionIncludes2["default"](this.file.dynamicImported, node) && t.isSpecifierDefault(specifier) && !this.noInteropRequireImport) {
14529
- // import foo from "foo";
14530
- var uid = scope.generateUidIdentifier(specifier.local.name);
14531
- nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, t.callExpression(this.file.addHelper("interop-require-default"), [ref]))]));
14532
- ref = t.memberExpression(uid, t.identifier("default"));
14533
- } else {
14534
- // import { foo } from "foo";
14535
- var imported = specifier.imported;
14536
- if (t.isSpecifierDefault(specifier)) imported = t.identifier("default");
14537
- ref = t.memberExpression(ref, imported);
14538
- }
14542
+ if (this.isModuleType(node, "absolute")) {
14543
+ // absolute module reference
14544
+ } else if (this.isModuleType(node, "absoluteDefault")) {
14545
+ // prevent unnecessary renaming of dynamic imports
14546
+ this.ids[node.source.value] = ref;
14547
+ ref = t.memberExpression(ref, t.identifier("default"));
14548
+ } else if (t.isImportNamespaceSpecifier(specifier)) {
14549
+ // import * as bar from "foo";
14550
+ } else if (!_lodashCollectionIncludes2["default"](this.file.dynamicImported, node) && t.isSpecifierDefault(specifier) && !this.noInteropRequireImport) {
14551
+ // import foo from "foo";
14552
+ var uid = scope.generateUidIdentifier(specifier.local.name);
14553
+ nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, t.callExpression(this.file.addHelper("interop-require-default"), [ref]))]));
14554
+ ref = t.memberExpression(uid, t.identifier("default"));
14555
+ } else {
14556
+ // import { foo } from "foo";
14557
+ var imported = specifier.imported;
14558
+ if (t.isSpecifierDefault(specifier)) imported = t.identifier("default");
14559
+ ref = t.memberExpression(ref, imported);
14560
+ }
14539
14561
 
14540
14562
  this.remaps.add(scope, specifier.local.name, ref);
14541
14563
  };
@@ -14589,10 +14611,6 @@ var AMDFormatter = (function (_DefaultFormatter) {
14589
14611
 
14590
14612
  exports["default"] = AMDFormatter;
14591
14613
  module.exports = exports["default"];
14592
-
14593
- // absolute module reference
14594
-
14595
- // import * as bar from "foo";
14596
14614
  },{"../../types":191,"../../util":194,"./_default":82,"./common":87,"lodash/collection/includes":359,"lodash/object/values":463}],86:[function(require,module,exports){
14597
14615
  "use strict";
14598
14616
 
@@ -14607,12 +14625,12 @@ var _common2 = _interopRequireDefault(_common);
14607
14625
 
14608
14626
  var _strict = require("./_strict");
14609
14627
 
14610
- var _strict2 = _interopRequireDefault(_strict);
14611
-
14612
14628
  /**
14613
14629
  * [Please add a description.]
14614
14630
  */
14615
14631
 
14632
+ var _strict2 = _interopRequireDefault(_strict);
14633
+
14616
14634
  exports["default"] = _strict2["default"](_common2["default"]);
14617
14635
  module.exports = exports["default"];
14618
14636
  },{"./_strict":83,"./common":87}],87:[function(require,module,exports){
@@ -14645,12 +14663,12 @@ var util = _interopRequireWildcard(_util);
14645
14663
 
14646
14664
  var _types = require("../../types");
14647
14665
 
14648
- var t = _interopRequireWildcard(_types);
14649
-
14650
14666
  /**
14651
14667
  * [Please add a description.]
14652
14668
  */
14653
14669
 
14670
+ var t = _interopRequireWildcard(_types);
14671
+
14654
14672
  var CommonJSFormatter = (function (_DefaultFormatter) {
14655
14673
  _inherits(CommonJSFormatter, _DefaultFormatter);
14656
14674
 
@@ -14711,17 +14729,19 @@ var CommonJSFormatter = (function (_DefaultFormatter) {
14711
14729
 
14712
14730
  // import foo from "foo";
14713
14731
  if (t.isSpecifierDefault(specifier)) {
14714
- if (this.isModuleType(node, "absolute")) {} else if (this.isModuleType(node, "absoluteDefault")) {
14715
- this.remaps.add(scope, variableName.name, ref);
14716
- } else if (this.noInteropRequireImport) {
14717
- this.remaps.add(scope, variableName.name, t.memberExpression(ref, t.identifier("default")));
14718
- } else {
14719
- var uid = this.scope.generateUidIdentifierBasedOnNode(node, "import");
14732
+ if (this.isModuleType(node, "absolute")) {
14733
+ // absolute module reference
14734
+ } else if (this.isModuleType(node, "absoluteDefault")) {
14735
+ this.remaps.add(scope, variableName.name, ref);
14736
+ } else if (this.noInteropRequireImport) {
14737
+ this.remaps.add(scope, variableName.name, t.memberExpression(ref, t.identifier("default")));
14738
+ } else {
14739
+ var uid = this.scope.generateUidIdentifierBasedOnNode(node, "import");
14720
14740
 
14721
- nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, t.callExpression(this.file.addHelper("interop-require-default"), [ref]))]));
14741
+ nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, t.callExpression(this.file.addHelper("interop-require-default"), [ref]))]));
14722
14742
 
14723
- this.remaps.add(scope, variableName.name, t.memberExpression(uid, t.identifier("default")));
14724
- }
14743
+ this.remaps.add(scope, variableName.name, t.memberExpression(uid, t.identifier("default")));
14744
+ }
14725
14745
  } else {
14726
14746
  if (t.isImportNamespaceSpecifier(specifier)) {
14727
14747
  if (!this.noInteropRequireImport) {
@@ -14780,11 +14800,13 @@ var CommonJSFormatter = (function (_DefaultFormatter) {
14780
14800
  var call = t.callExpression(t.identifier("require"), [node.source]);
14781
14801
  var uid;
14782
14802
 
14783
- if (this.isModuleType(node, "absolute")) {} else if (this.isModuleType(node, "absoluteDefault")) {
14784
- call = t.memberExpression(call, t.identifier("default"));
14785
- } else {
14786
- uid = this.scope.generateUidIdentifierBasedOnNode(node, "import");
14787
- }
14803
+ if (this.isModuleType(node, "absolute")) {
14804
+ // absolute module reference
14805
+ } else if (this.isModuleType(node, "absoluteDefault")) {
14806
+ call = t.memberExpression(call, t.identifier("default"));
14807
+ } else {
14808
+ uid = this.scope.generateUidIdentifierBasedOnNode(node, "import");
14809
+ }
14788
14810
 
14789
14811
  uid = uid || node.specifiers[0].local;
14790
14812
 
@@ -14798,10 +14820,6 @@ var CommonJSFormatter = (function (_DefaultFormatter) {
14798
14820
 
14799
14821
  exports["default"] = CommonJSFormatter;
14800
14822
  module.exports = exports["default"];
14801
-
14802
- // absolute module reference
14803
-
14804
- // absolute module reference
14805
14823
  },{"../../types":191,"../../util":194,"./_default":82}],88:[function(require,module,exports){
14806
14824
  "use strict";
14807
14825
 
@@ -14828,12 +14846,12 @@ var _default2 = _interopRequireDefault(_default);
14828
14846
 
14829
14847
  var _types = require("../../types");
14830
14848
 
14831
- var t = _interopRequireWildcard(_types);
14832
-
14833
14849
  /**
14834
14850
  * [Please add a description.]
14835
14851
  */
14836
14852
 
14853
+ var t = _interopRequireWildcard(_types);
14854
+
14837
14855
  var IgnoreFormatter = (function (_DefaultFormatter) {
14838
14856
  _inherits(IgnoreFormatter, _DefaultFormatter);
14839
14857
 
@@ -14904,12 +14922,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
14904
14922
 
14905
14923
  var _types = require("../../../types");
14906
14924
 
14907
- var t = _interopRequireWildcard(_types);
14908
-
14909
14925
  /**
14910
14926
  * [Please add a description.]
14911
14927
  */
14912
14928
 
14929
+ var t = _interopRequireWildcard(_types);
14930
+
14913
14931
  var remapVisitor = {
14914
14932
 
14915
14933
  /**
@@ -15131,12 +15149,12 @@ var _lodashCollectionMap2 = _interopRequireDefault(_lodashCollectionMap);
15131
15149
 
15132
15150
  var _types = require("../../types");
15133
15151
 
15134
- var t = _interopRequireWildcard(_types);
15135
-
15136
15152
  /**
15137
15153
  * [Please add a description.]
15138
15154
  */
15139
15155
 
15156
+ var t = _interopRequireWildcard(_types);
15157
+
15140
15158
  var hoistVariablesVisitor = {
15141
15159
 
15142
15160
  /**
@@ -15446,12 +15464,12 @@ var _umd2 = _interopRequireDefault(_umd);
15446
15464
 
15447
15465
  var _strict = require("./_strict");
15448
15466
 
15449
- var _strict2 = _interopRequireDefault(_strict);
15450
-
15451
15467
  /**
15452
15468
  * [Please add a description.]
15453
15469
  */
15454
15470
 
15471
+ var _strict2 = _interopRequireDefault(_strict);
15472
+
15455
15473
  exports["default"] = _strict2["default"](_umd2["default"]);
15456
15474
  module.exports = exports["default"];
15457
15475
  },{"./_strict":83,"./umd":93}],93:[function(require,module,exports){
@@ -15496,12 +15514,12 @@ var util = _interopRequireWildcard(_util);
15496
15514
 
15497
15515
  var _types = require("../../types");
15498
15516
 
15499
- var t = _interopRequireWildcard(_types);
15500
-
15501
15517
  /**
15502
15518
  * [Please add a description.]
15503
15519
  */
15504
15520
 
15521
+ var t = _interopRequireWildcard(_types);
15522
+
15505
15523
  var UMDFormatter = (function (_AMDFormatter) {
15506
15524
  _inherits(UMDFormatter, _AMDFormatter);
15507
15525
 
@@ -15627,12 +15645,12 @@ var _helpersObject2 = _interopRequireDefault(_helpersObject);
15627
15645
 
15628
15646
  var _file = require("./file");
15629
15647
 
15630
- var _file2 = _interopRequireDefault(_file);
15631
-
15632
15648
  /**
15633
15649
  * [Please add a description.]
15634
15650
  */
15635
15651
 
15652
+ var _file2 = _interopRequireDefault(_file);
15653
+
15636
15654
  var Pipeline = (function () {
15637
15655
  function Pipeline() {
15638
15656
  _classCallCheck(this, Pipeline);
@@ -15819,6 +15837,13 @@ var Pipeline = (function () {
15819
15837
  exports["default"] = Pipeline;
15820
15838
  module.exports = exports["default"];
15821
15839
  },{"../helpers/normalize-ast":55,"../helpers/object":56,"./file":61,"./file/plugin-manager":67,"./plugin":96,"lodash/object/assign":455}],95:[function(require,module,exports){
15840
+
15841
+
15842
+ /**
15843
+ * This class is responsible for traversing over the provided `File`s
15844
+ * AST and running it's parent transformers handlers over it.
15845
+ */
15846
+
15822
15847
  "use strict";
15823
15848
 
15824
15849
  exports.__esModule = true;
@@ -15834,11 +15859,6 @@ var _traversal = require("../traversal");
15834
15859
 
15835
15860
  var _traversal2 = _interopRequireDefault(_traversal);
15836
15861
 
15837
- /**
15838
- * This class is responsible for traversing over the provided `File`s
15839
- * AST and running it's parent transformers handlers over it.
15840
- */
15841
-
15842
15862
  var PluginPass = (function () {
15843
15863
  function PluginPass(file, plugin) {
15844
15864
  _classCallCheck(this, PluginPass);
@@ -16022,12 +16042,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
16022
16042
 
16023
16043
  var _plugin = require("./plugin");
16024
16044
 
16025
- var _plugin2 = _interopRequireDefault(_plugin);
16026
-
16027
16045
  /**
16028
16046
  * [Please add a description.]
16029
16047
  */
16030
16048
 
16049
+ var _plugin2 = _interopRequireDefault(_plugin);
16050
+
16031
16051
  var Transformer = function Transformer(key, obj) {
16032
16052
  _classCallCheck(this, Transformer);
16033
16053
 
@@ -16084,7 +16104,6 @@ var metadata = {
16084
16104
  group: "builtin-trailing"
16085
16105
  };
16086
16106
 
16087
- exports.metadata = metadata;
16088
16107
  /**
16089
16108
  * Turn member expression reserved word properties into literals.
16090
16109
  *
@@ -16103,6 +16122,7 @@ exports.metadata = metadata;
16103
16122
  * ```
16104
16123
  */
16105
16124
 
16125
+ exports.metadata = metadata;
16106
16126
  var visitor = {
16107
16127
 
16108
16128
  /**
@@ -16138,7 +16158,6 @@ var metadata = {
16138
16158
  group: "builtin-trailing"
16139
16159
  };
16140
16160
 
16141
- exports.metadata = metadata;
16142
16161
  /**
16143
16162
  * Turn reserved word properties into literals.
16144
16163
  *
@@ -16159,6 +16178,7 @@ exports.metadata = metadata;
16159
16178
  * ```
16160
16179
  */
16161
16180
 
16181
+ exports.metadata = metadata;
16162
16182
  var visitor = {
16163
16183
 
16164
16184
  /**
@@ -16191,8 +16211,6 @@ var defineMap = _interopRequireWildcard(_helpersDefineMap);
16191
16211
 
16192
16212
  var _types = require("../../../types");
16193
16213
 
16194
- var t = _interopRequireWildcard(_types);
16195
-
16196
16214
  /**
16197
16215
  * Turn [object initializer mutators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#Method_definitions)
16198
16216
  * into `Object.defineProperties`.
@@ -16222,6 +16240,8 @@ var t = _interopRequireWildcard(_types);
16222
16240
  * ```
16223
16241
  */
16224
16242
 
16243
+ var t = _interopRequireWildcard(_types);
16244
+
16225
16245
  var visitor = {
16226
16246
 
16227
16247
  /**
@@ -16333,12 +16353,12 @@ var _lodashObjectValues2 = _interopRequireDefault(_lodashObjectValues);
16333
16353
 
16334
16354
  var _lodashObjectExtend = require("lodash/object/extend");
16335
16355
 
16336
- var _lodashObjectExtend2 = _interopRequireDefault(_lodashObjectExtend);
16337
-
16338
16356
  /**
16339
16357
  * [Please add a description.]
16340
16358
  */
16341
16359
 
16360
+ var _lodashObjectExtend2 = _interopRequireDefault(_lodashObjectExtend);
16361
+
16342
16362
  function isLet(node, parent) {
16343
16363
  if (!t.isVariableDeclaration(node)) return false;
16344
16364
  if (node._let) return true;
@@ -16390,11 +16410,11 @@ var metadata = {
16390
16410
  group: "builtin-advanced"
16391
16411
  };
16392
16412
 
16393
- exports.metadata = metadata;
16394
16413
  /**
16395
16414
  * [Please add a description.]
16396
16415
  */
16397
16416
 
16417
+ exports.metadata = metadata;
16398
16418
  var visitor = {
16399
16419
 
16400
16420
  /**
@@ -16450,11 +16470,11 @@ var visitor = {
16450
16470
  }
16451
16471
  };
16452
16472
 
16453
- exports.visitor = visitor;
16454
16473
  /**
16455
16474
  * [Please add a description.]
16456
16475
  */
16457
16476
 
16477
+ exports.visitor = visitor;
16458
16478
  function replace(node, parent, scope, remaps) {
16459
16479
  var remap = remaps[node.name];
16460
16480
  if (!remap) return;
@@ -17165,12 +17185,12 @@ var _vanilla2 = _interopRequireDefault(_vanilla);
17165
17185
 
17166
17186
  var _types = require("../../../../types");
17167
17187
 
17168
- var t = _interopRequireWildcard(_types);
17169
-
17170
17188
  /**
17171
17189
  * [Please add a description.]
17172
17190
  */
17173
17191
 
17192
+ var t = _interopRequireWildcard(_types);
17193
+
17174
17194
  var LooseClassTransformer = (function (_VanillaTransformer) {
17175
17195
  _inherits(LooseClassTransformer, _VanillaTransformer);
17176
17196
 
@@ -17898,8 +17918,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
17898
17918
 
17899
17919
  var _messages = require("../../../messages");
17900
17920
 
17901
- var messages = _interopRequireWildcard(_messages);
17902
-
17903
17921
  /**
17904
17922
  * Turn constants into variables.
17905
17923
  * Ensure there are no constant violations in any scope.
@@ -17919,6 +17937,8 @@ var messages = _interopRequireWildcard(_messages);
17919
17937
  * ```
17920
17938
  */
17921
17939
 
17940
+ var messages = _interopRequireWildcard(_messages);
17941
+
17922
17942
  var visitor = {
17923
17943
 
17924
17944
  /**
@@ -17975,11 +17995,11 @@ var metadata = {
17975
17995
  group: "builtin-advanced"
17976
17996
  };
17977
17997
 
17978
- exports.metadata = metadata;
17979
17998
  /**
17980
17999
  * [Please add a description.]
17981
18000
  */
17982
18001
 
18002
+ exports.metadata = metadata;
17983
18003
  var visitor = {
17984
18004
 
17985
18005
  /**
@@ -18199,11 +18219,11 @@ var visitor = {
18199
18219
  }
18200
18220
  };
18201
18221
 
18202
- exports.visitor = visitor;
18203
18222
  /**
18204
18223
  * Test if a VariableDeclaration's declarations contains any Patterns.
18205
18224
  */
18206
18225
 
18226
+ exports.visitor = visitor;
18207
18227
  function variableDeclarationHasPattern(node) {
18208
18228
  for (var i = 0; i < node.declarations.length; i++) {
18209
18229
  if (t.isPattern(node.declarations[i].id)) {
@@ -18456,14 +18476,13 @@ var DestructuringTransformer = (function () {
18456
18476
  }
18457
18477
 
18458
18478
  var _arr3 = arr.elements;
18479
+
18480
+ // deopt on reference to left side identifiers
18459
18481
  for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
18460
18482
  var elem = _arr3[_i3];
18461
18483
  // deopt on spread elements
18462
18484
  if (t.isSpreadElement(elem)) return false;
18463
- }
18464
-
18465
- // deopt on reference to left side identifiers
18466
- var bindings = t.getBindingIdentifiers(pattern);
18485
+ }var bindings = t.getBindingIdentifiers(pattern);
18467
18486
  var state = { deopt: false, bindings: bindings };
18468
18487
  this.scope.traverse(arr, arrayUnpackVisitor, state);
18469
18488
  return !state.deopt;
@@ -18595,12 +18614,12 @@ var util = _interopRequireWildcard(_util);
18595
18614
 
18596
18615
  var _types = require("../../../types");
18597
18616
 
18598
- var t = _interopRequireWildcard(_types);
18599
-
18600
18617
  /**
18601
18618
  * [Please add a description.]
18602
18619
  */
18603
18620
 
18621
+ var t = _interopRequireWildcard(_types);
18622
+
18604
18623
  var visitor = {
18605
18624
 
18606
18625
  /**
@@ -18643,11 +18662,12 @@ var visitor = {
18643
18662
  }
18644
18663
  };
18645
18664
 
18646
- exports.visitor = visitor;
18647
18665
  /**
18648
18666
  * [Please add a description.]
18649
18667
  */
18650
18668
 
18669
+ exports.visitor = visitor;
18670
+
18651
18671
  function _ForOfStatementArray(node, scope, file) {
18652
18672
  var nodes = [];
18653
18673
  var right = node.right;
@@ -18803,7 +18823,7 @@ var visitor = {
18803
18823
  }
18804
18824
 
18805
18825
  // unicode escape
18806
- if (typeof node.value === "string" && /\\[ux]/gi.test(node.raw)) {
18826
+ if (typeof node.value === "string" && /\\[u]/gi.test(node.raw)) {
18807
18827
  node.raw = undefined;
18808
18828
  }
18809
18829
  }
@@ -18833,11 +18853,11 @@ var metadata = {
18833
18853
  group: "builtin-modules"
18834
18854
  };
18835
18855
 
18836
- exports.metadata = metadata;
18837
18856
  /**
18838
18857
  * [Please add a description.]
18839
18858
  */
18840
18859
 
18860
+ exports.metadata = metadata;
18841
18861
  var visitor = {
18842
18862
 
18843
18863
  /**
@@ -18940,12 +18960,12 @@ var _helpersReplaceSupers2 = _interopRequireDefault(_helpersReplaceSupers);
18940
18960
 
18941
18961
  var _types = require("../../../types");
18942
18962
 
18943
- var t = _interopRequireWildcard(_types);
18944
-
18945
18963
  /**
18946
18964
  * [Please add a description.]
18947
18965
  */
18948
18966
 
18967
+ var t = _interopRequireWildcard(_types);
18968
+
18949
18969
  function Property(path, node, scope, getObjectRef, file) {
18950
18970
  if (!node.method && node.kind === "init") return;
18951
18971
  if (!t.isFunction(node.value)) return;
@@ -19016,12 +19036,12 @@ var util = _interopRequireWildcard(_util);
19016
19036
 
19017
19037
  var _types = require("../../../../types");
19018
19038
 
19019
- var t = _interopRequireWildcard(_types);
19020
-
19021
19039
  /**
19022
19040
  * [Please add a description.]
19023
19041
  */
19024
19042
 
19043
+ var t = _interopRequireWildcard(_types);
19044
+
19025
19045
  var hasDefaults = function hasDefaults(node) {
19026
19046
  for (var i = 0; i < node.params.length; i++) {
19027
19047
  if (!t.isIdentifier(node.params[i])) return true;
@@ -19180,11 +19200,11 @@ var metadata = {
19180
19200
  group: "builtin-advanced"
19181
19201
  };
19182
19202
 
19183
- exports.metadata = metadata;
19184
19203
  /**
19185
19204
  * [Please add a description.]
19186
19205
  */
19187
19206
 
19207
+ exports.metadata = metadata;
19188
19208
  var visitor = visitors.merge([rest.visitor, def.visitor]);
19189
19209
  exports.visitor = visitor;
19190
19210
  },{"../../../../traversal/visitors":180,"./default":114,"./rest":116}],116:[function(require,module,exports){
@@ -19201,12 +19221,12 @@ var util = _interopRequireWildcard(_util);
19201
19221
 
19202
19222
  var _types = require("../../../../types");
19203
19223
 
19204
- var t = _interopRequireWildcard(_types);
19205
-
19206
19224
  /**
19207
19225
  * [Please add a description.]
19208
19226
  */
19209
19227
 
19228
+ var t = _interopRequireWildcard(_types);
19229
+
19210
19230
  var memberExpressionOptimisationVisitor = {
19211
19231
 
19212
19232
  /**
@@ -19425,7 +19445,22 @@ var visitor = {
19425
19445
  } else {
19426
19446
  // perform allocation at the lowest common denominator of all references
19427
19447
  loop._blockHoist = 1;
19428
- this.getEarliestCommonAncestorFrom(state.references).getStatementParent().insertBefore(loop);
19448
+
19449
+ var target = this.getEarliestCommonAncestorFrom(state.references).getStatementParent();
19450
+
19451
+ // don't perform the allocation inside a loop
19452
+ var highestLoop;
19453
+ target.findParent(function (path) {
19454
+ if (path.isLoop()) {
19455
+ highestLoop = path;
19456
+ } else if (path.isFunction()) {
19457
+ // stop crawling up for functions
19458
+ return true;
19459
+ }
19460
+ });
19461
+ if (highestLoop) target = highestLoop;
19462
+
19463
+ target.insertBefore(loop);
19429
19464
  }
19430
19465
  }
19431
19466
  };
@@ -19440,12 +19475,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
19440
19475
 
19441
19476
  var _types = require("../../../types");
19442
19477
 
19443
- var t = _interopRequireWildcard(_types);
19444
-
19445
19478
  /**
19446
19479
  * [Please add a description.]
19447
19480
  */
19448
19481
 
19482
+ var t = _interopRequireWildcard(_types);
19483
+
19449
19484
  function loose(node, body, objId) {
19450
19485
  var _arr = node.properties;
19451
19486
 
@@ -19464,6 +19499,9 @@ function spec(node, body, objId, initProps, file) {
19464
19499
  // otherwise use Object.defineProperty
19465
19500
 
19466
19501
  var _arr2 = node.properties;
19502
+
19503
+ // only one node and it's a Object.defineProperty that returns the object
19504
+
19467
19505
  for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
19468
19506
  var prop = _arr2[_i2];
19469
19507
  // this wont work with Object.defineProperty
@@ -19480,11 +19518,7 @@ function spec(node, body, objId, initProps, file) {
19480
19518
  var bodyNode = t.callExpression(file.addHelper("define-property"), [objId, key, prop.value]);
19481
19519
 
19482
19520
  body.push(t.expressionStatement(bodyNode));
19483
- }
19484
-
19485
- // only one node and it's a Object.defineProperty that returns the object
19486
-
19487
- if (body.length === 1) {
19521
+ }if (body.length === 1) {
19488
19522
  var first = body[0].expression;
19489
19523
 
19490
19524
  if (t.isCallExpression(first)) {
@@ -19602,12 +19636,12 @@ var regex = _interopRequireWildcard(_helpersRegex);
19602
19636
 
19603
19637
  var _types = require("../../../types");
19604
19638
 
19605
- var t = _interopRequireWildcard(_types);
19606
-
19607
19639
  /**
19608
19640
  * [Please add a description.]
19609
19641
  */
19610
19642
 
19643
+ var t = _interopRequireWildcard(_types);
19644
+
19611
19645
  var visitor = {
19612
19646
 
19613
19647
  /**
@@ -19638,12 +19672,12 @@ var _regexpuRewritePattern2 = _interopRequireDefault(_regexpuRewritePattern);
19638
19672
 
19639
19673
  var _helpersRegex = require("../../helpers/regex");
19640
19674
 
19641
- var regex = _interopRequireWildcard(_helpersRegex);
19642
-
19643
19675
  /**
19644
19676
  * [Please add a description.]
19645
19677
  */
19646
19678
 
19679
+ var regex = _interopRequireWildcard(_helpersRegex);
19680
+
19647
19681
  var visitor = {
19648
19682
 
19649
19683
  /**
@@ -19667,12 +19701,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
19667
19701
 
19668
19702
  var _types = require("../../../types");
19669
19703
 
19670
- var t = _interopRequireWildcard(_types);
19671
-
19672
19704
  /**
19673
19705
  * [Please add a description.]
19674
19706
  */
19675
19707
 
19708
+ var t = _interopRequireWildcard(_types);
19709
+
19676
19710
  function buildAssert(node, file) {
19677
19711
  return t.callExpression(file.addHelper("temporal-assert-defined"), [node, t.literal(node.name), file.addHelper("temporal-undefined")]);
19678
19712
  }
@@ -19749,11 +19783,11 @@ var metadata = {
19749
19783
  group: "builtin-advanced"
19750
19784
  };
19751
19785
 
19752
- exports.metadata = metadata;
19753
19786
  /**
19754
19787
  * [Please add a description.]
19755
19788
  */
19756
19789
 
19790
+ exports.metadata = metadata;
19757
19791
  var visitor = {
19758
19792
 
19759
19793
  /**
@@ -19789,11 +19823,11 @@ var metadata = {
19789
19823
  optional: true
19790
19824
  };
19791
19825
 
19792
- exports.metadata = metadata;
19793
19826
  /**
19794
19827
  * [Please add a description.]
19795
19828
  */
19796
19829
 
19830
+ exports.metadata = metadata;
19797
19831
  var visitor = {
19798
19832
 
19799
19833
  /**
@@ -19852,11 +19886,11 @@ var metadata = {
19852
19886
  group: "builtin-pre"
19853
19887
  };
19854
19888
 
19855
- exports.metadata = metadata;
19856
19889
  /**
19857
19890
  * [Please add a description.]
19858
19891
  */
19859
19892
 
19893
+ exports.metadata = metadata;
19860
19894
  var visitor = {
19861
19895
 
19862
19896
  /**
@@ -19882,12 +19916,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
19882
19916
 
19883
19917
  var _types = require("../../../types");
19884
19918
 
19885
- var t = _interopRequireWildcard(_types);
19886
-
19887
19919
  /**
19888
19920
  * [Please add a description.]
19889
19921
  */
19890
19922
 
19923
+ var t = _interopRequireWildcard(_types);
19924
+
19891
19925
  function getSpreadLiteral(spread, scope) {
19892
19926
  if (scope.hub.file.isLoose("es6.spread") && !t.isIdentifier(spread.argument, { name: "arguments" })) {
19893
19927
  return spread.argument;
@@ -19943,11 +19977,11 @@ var metadata = {
19943
19977
  group: "builtin-advanced"
19944
19978
  };
19945
19979
 
19946
- exports.metadata = metadata;
19947
19980
  /**
19948
19981
  * [Please add a description.]
19949
19982
  */
19950
19983
 
19984
+ exports.metadata = metadata;
19951
19985
  var visitor = {
19952
19986
 
19953
19987
  /**
@@ -20075,11 +20109,11 @@ var metadata = {
20075
20109
  group: "builtin-trailing"
20076
20110
  };
20077
20111
 
20078
- exports.metadata = metadata;
20079
20112
  /**
20080
20113
  * [Please add a description.]
20081
20114
  */
20082
20115
 
20116
+ exports.metadata = metadata;
20083
20117
  var visitor = {
20084
20118
 
20085
20119
  /**
@@ -20093,11 +20127,11 @@ var visitor = {
20093
20127
  }
20094
20128
  };
20095
20129
 
20096
- exports.visitor = visitor;
20097
20130
  /**
20098
20131
  * [Please add a description.]
20099
20132
  */
20100
20133
 
20134
+ exports.visitor = visitor;
20101
20135
  function returnBlock(expr) {
20102
20136
  return t.blockStatement([t.returnStatement(expr)]);
20103
20137
  }
@@ -20517,7 +20551,9 @@ var TailCallTransformer = (function () {
20517
20551
 
20518
20552
  if (param && !param._isDefaultPlaceholder) {
20519
20553
  elems[i] = t.assignmentExpression("=", param, elem);
20520
- } else {}
20554
+ } else {
20555
+ // exceeds parameters but push it anyway to ensure correct execution
20556
+ }
20521
20557
  }
20522
20558
 
20523
20559
  if (!this.needsArguments) {
@@ -20551,8 +20587,6 @@ var TailCallTransformer = (function () {
20551
20587
 
20552
20588
  return TailCallTransformer;
20553
20589
  })();
20554
-
20555
- // exceeds parameters but push it anyway to ensure correct execution
20556
20590
  },{"../../../messages":58,"../../../types":191,"../../../util":194,"lodash/array/flatten":352,"lodash/collection/map":360,"lodash/collection/reduceRight":361}],126:[function(require,module,exports){
20557
20591
  /* eslint no-unused-vars: 0 */
20558
20592
 
@@ -20571,11 +20605,11 @@ var metadata = {
20571
20605
  group: "builtin-pre"
20572
20606
  };
20573
20607
 
20574
- exports.metadata = metadata;
20575
20608
  /**
20576
20609
  * [Please add a description.]
20577
20610
  */
20578
20611
 
20612
+ exports.metadata = metadata;
20579
20613
  function isString(node) {
20580
20614
  return t.isLiteral(node) && typeof node.value === "string";
20581
20615
  }
@@ -20649,16 +20683,15 @@ var visitor = {
20649
20683
  var nodes = [];
20650
20684
 
20651
20685
  var _arr2 = node.quasis;
20686
+
20687
+ // filter out empty string literals
20652
20688
  for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
20653
20689
  var elem = _arr2[_i2];
20654
20690
  nodes.push(t.literal(elem.value.cooked));
20655
20691
 
20656
20692
  var expr = node.expressions.shift();
20657
20693
  if (expr) nodes.push(expr);
20658
- }
20659
-
20660
- // filter out empty string literals
20661
- nodes = nodes.filter(function (n) {
20694
+ }nodes = nodes.filter(function (n) {
20662
20695
  return !t.isLiteral(n, { value: "" });
20663
20696
  });
20664
20697
 
@@ -20680,8 +20713,8 @@ var visitor = {
20680
20713
  this.replaceWith(root);
20681
20714
  //crawl(this);
20682
20715
  } else {
20683
- return nodes[0];
20684
- }
20716
+ return nodes[0];
20717
+ }
20685
20718
  }
20686
20719
  };
20687
20720
  exports.visitor = visitor;
@@ -20734,11 +20767,11 @@ var metadata = {
20734
20767
  stage: 0
20735
20768
  };
20736
20769
 
20737
- exports.metadata = metadata;
20738
20770
  /**
20739
20771
  * [Please add a description.]
20740
20772
  */
20741
20773
 
20774
+ exports.metadata = metadata;
20742
20775
  var visitor = {
20743
20776
 
20744
20777
  /**
@@ -20752,11 +20785,11 @@ var visitor = {
20752
20785
  }
20753
20786
  };
20754
20787
 
20755
- exports.visitor = visitor;
20756
20788
  /**
20757
20789
  * [Please add a description.]
20758
20790
  */
20759
20791
 
20792
+ exports.visitor = visitor;
20760
20793
  function generator(node) {
20761
20794
  var body = [];
20762
20795
  var container = t.functionExpression(null, [], t.blockStatement(body), true);
@@ -20831,11 +20864,11 @@ var metadata = {
20831
20864
  stage: 1
20832
20865
  };
20833
20866
 
20834
- exports.metadata = metadata;
20835
20867
  /**
20836
20868
  * [Please add a description.]
20837
20869
  */
20838
20870
 
20871
+ exports.metadata = metadata;
20839
20872
  var visitor = {
20840
20873
 
20841
20874
  /**
@@ -20890,11 +20923,11 @@ var metadata = {
20890
20923
  stage: 0
20891
20924
  };
20892
20925
 
20893
- exports.metadata = metadata;
20894
20926
  /**
20895
20927
  * [Please add a description.]
20896
20928
  */
20897
20929
 
20930
+ exports.metadata = metadata;
20898
20931
  var visitor = {
20899
20932
 
20900
20933
  /**
@@ -20974,11 +21007,11 @@ var metadata = {
20974
21007
  stage: 1
20975
21008
  };
20976
21009
 
20977
- exports.metadata = metadata;
20978
21010
  /**
20979
21011
  * [Please add a description.]
20980
21012
  */
20981
21013
 
21014
+ exports.metadata = metadata;
20982
21015
  function build(node, nodes, scope) {
20983
21016
  var first = node.specifiers[0];
20984
21017
  if (!t.isExportNamespaceSpecifier(first) && !t.isExportDefaultSpecifier(first)) return;
@@ -21041,11 +21074,11 @@ var metadata = {
21041
21074
  stage: 0
21042
21075
  };
21043
21076
 
21044
- exports.metadata = metadata;
21045
21077
  /**
21046
21078
  * [Please add a description.]
21047
21079
  */
21048
21080
 
21081
+ exports.metadata = metadata;
21049
21082
  function getTempId(scope) {
21050
21083
  var id = scope.path.getData("functionBind");
21051
21084
  if (id) return id;
@@ -21128,11 +21161,11 @@ var metadata = {
21128
21161
  dependencies: ["es6.destructuring"]
21129
21162
  };
21130
21163
 
21131
- exports.metadata = metadata;
21132
21164
  /**
21133
21165
  * [Please add a description.]
21134
21166
  */
21135
21167
 
21168
+ exports.metadata = metadata;
21136
21169
  var hasSpread = function hasSpread(node) {
21137
21170
  for (var i = 0; i < node.properties.length; i++) {
21138
21171
  if (t.isSpreadProperty(node.properties[i])) {
@@ -21201,12 +21234,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
21201
21234
 
21202
21235
  var _lodashCollectionIncludes = require("lodash/collection/includes");
21203
21236
 
21204
- var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionIncludes);
21205
-
21206
21237
  /**
21207
21238
  * [Please add a description.]
21208
21239
  */
21209
21240
 
21241
+ var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionIncludes);
21242
+
21210
21243
  function internal(transformer, opts) {
21211
21244
  if (transformer.key[0] === "_") return true;
21212
21245
  }
@@ -21354,7 +21387,6 @@ var metadata = {
21354
21387
  group: "builtin-trailing"
21355
21388
  };
21356
21389
 
21357
- exports.metadata = metadata;
21358
21390
  /**
21359
21391
  * [Please add a description.]
21360
21392
  *
@@ -21366,6 +21398,7 @@ exports.metadata = metadata;
21366
21398
  * - 3 We want this to be at the **very** top
21367
21399
  */
21368
21400
 
21401
+ exports.metadata = metadata;
21369
21402
  var visitor = {
21370
21403
 
21371
21404
  /**
@@ -21409,11 +21442,11 @@ var metadata = {
21409
21442
  group: "builtin-pre"
21410
21443
  };
21411
21444
 
21412
- exports.metadata = metadata;
21413
21445
  /**
21414
21446
  * [Please add a description.]
21415
21447
  */
21416
21448
 
21449
+ exports.metadata = metadata;
21417
21450
  var visitor = {
21418
21451
 
21419
21452
  /**
@@ -21442,11 +21475,11 @@ var metadata = {
21442
21475
  group: "builtin-modules"
21443
21476
  };
21444
21477
 
21445
- exports.metadata = metadata;
21446
21478
  /**
21447
21479
  * [Please add a description.]
21448
21480
  */
21449
21481
 
21482
+ exports.metadata = metadata;
21450
21483
  var visitor = {
21451
21484
 
21452
21485
  /**
@@ -21497,12 +21530,12 @@ var _lodashLangClone2 = _interopRequireDefault(_lodashLangClone);
21497
21530
 
21498
21531
  var _types = require("../../../types");
21499
21532
 
21500
- var t = _interopRequireWildcard(_types);
21501
-
21502
21533
  /**
21503
21534
  * [Please add a description.]
21504
21535
  */
21505
21536
 
21537
+ var t = _interopRequireWildcard(_types);
21538
+
21506
21539
  function getDeclar(node) {
21507
21540
  var declar = node.declaration;
21508
21541
  t.inheritsComments(declar, node);
@@ -21523,11 +21556,11 @@ var metadata = {
21523
21556
  group: "builtin-pre"
21524
21557
  };
21525
21558
 
21526
- exports.metadata = metadata;
21527
21559
  /**
21528
21560
  * [Please add a description.]
21529
21561
  */
21530
21562
 
21563
+ exports.metadata = metadata;
21531
21564
  var visitor = {
21532
21565
 
21533
21566
  /**
@@ -21640,11 +21673,11 @@ var metadata = {
21640
21673
  group: "builtin-trailing"
21641
21674
  };
21642
21675
 
21643
- exports.metadata = metadata;
21644
21676
  /**
21645
21677
  * [Please add a description.]
21646
21678
  */
21647
21679
 
21680
+ exports.metadata = metadata;
21648
21681
  function remap(path, key, create) {
21649
21682
  // ensure that we're shadowed
21650
21683
  var shadowPath = path.inShadow();
@@ -21736,11 +21769,11 @@ var metadata = {
21736
21769
  group: "builtin-pre"
21737
21770
  };
21738
21771
 
21739
- exports.metadata = metadata;
21740
21772
  /**
21741
21773
  * [Please add a description.]
21742
21774
  */
21743
21775
 
21776
+ exports.metadata = metadata;
21744
21777
  var visitor = {
21745
21778
 
21746
21779
  /**
@@ -21780,11 +21813,11 @@ var metadata = {
21780
21813
  optional: true
21781
21814
  };
21782
21815
 
21783
- exports.metadata = metadata;
21784
21816
  /**
21785
21817
  * [Please add a description.]
21786
21818
  */
21787
21819
 
21820
+ exports.metadata = metadata;
21788
21821
  var visitor = {
21789
21822
 
21790
21823
  /**
@@ -21826,7 +21859,6 @@ var visitor = {
21826
21859
  }
21827
21860
  };
21828
21861
 
21829
- exports.visitor = visitor;
21830
21862
  /**
21831
21863
  * Setters are optimized to avoid slow export behavior in modules that rely on deep hierarchies
21832
21864
  * of export-from declarations.
@@ -21836,6 +21868,7 @@ exports.visitor = visitor;
21836
21868
  * TODO: Ideally this would be optimized during construction of the setters, but the current
21837
21869
  * architecture of the module formatters make that difficult.
21838
21870
  */
21871
+ exports.visitor = visitor;
21839
21872
  var optimizeSettersVisitor = {
21840
21873
  FunctionExpression: {
21841
21874
  enter: function enter(node, parent, scope, state) {
@@ -21877,11 +21910,11 @@ var metadata = {
21877
21910
  optional: true
21878
21911
  };
21879
21912
 
21880
- exports.metadata = metadata;
21881
21913
  /**
21882
21914
  * [Please add a description.]
21883
21915
  */
21884
21916
 
21917
+ exports.metadata = metadata;
21885
21918
  function hasRefOrSpread(attrs) {
21886
21919
  for (var i = 0; i < attrs.length; i++) {
21887
21920
  var attr = attrs[i];
@@ -21986,11 +22019,11 @@ var metadata = {
21986
22019
  dependencies: ["es7.asyncFunctions", "es6.classes"]
21987
22020
  };
21988
22021
 
21989
- exports.metadata = metadata;
21990
22022
  /**
21991
22023
  * [Please add a description.]
21992
22024
  */
21993
22025
 
22026
+ exports.metadata = metadata;
21994
22027
  var visitor = {
21995
22028
 
21996
22029
  /**
@@ -22023,12 +22056,12 @@ var _helpersRemapAsyncToGenerator2 = _interopRequireDefault(_helpersRemapAsyncTo
22023
22056
 
22024
22057
  var _types = require("../../../types");
22025
22058
 
22026
- var t = _interopRequireWildcard(_types);
22027
-
22028
22059
  /**
22029
22060
  * [Please add a description.]
22030
22061
  */
22031
22062
 
22063
+ var t = _interopRequireWildcard(_types);
22064
+
22032
22065
  function manipulateOptions(opts) {
22033
22066
  opts.blacklist.push("regenerator");
22034
22067
  }
@@ -22038,11 +22071,11 @@ var metadata = {
22038
22071
  dependencies: ["es7.asyncFunctions", "es6.classes"]
22039
22072
  };
22040
22073
 
22041
- exports.metadata = metadata;
22042
22074
  /**
22043
22075
  * [Please add a description.]
22044
22076
  */
22045
22077
 
22078
+ exports.metadata = metadata;
22046
22079
  var visitor = {
22047
22080
 
22048
22081
  /**
@@ -22179,12 +22212,12 @@ var react = _interopRequireWildcard(_helpersReact);
22179
22212
 
22180
22213
  var _types = require("../../../types");
22181
22214
 
22182
- var t = _interopRequireWildcard(_types);
22183
-
22184
22215
  /**
22185
22216
  * [Please add a description.]
22186
22217
  */
22187
22218
 
22219
+ var t = _interopRequireWildcard(_types);
22220
+
22188
22221
  function manipulateOptions(opts) {
22189
22222
  opts.blacklist.push("react");
22190
22223
  }
@@ -22194,11 +22227,11 @@ var metadata = {
22194
22227
  group: "builtin-advanced"
22195
22228
  };
22196
22229
 
22197
- exports.metadata = metadata;
22198
22230
  /**
22199
22231
  * [Please add a description.]
22200
22232
  */
22201
22233
 
22234
+ exports.metadata = metadata;
22202
22235
  var visitor = require("../../helpers/build-react-transformer")({
22203
22236
 
22204
22237
  /**
@@ -22234,23 +22267,23 @@ var react = _interopRequireWildcard(_helpersReact);
22234
22267
 
22235
22268
  var _types = require("../../../types");
22236
22269
 
22237
- var t = _interopRequireWildcard(_types);
22238
-
22239
22270
  /**
22240
22271
  * [Please add a description.]
22241
22272
  */
22242
22273
 
22274
+ var t = _interopRequireWildcard(_types);
22275
+
22243
22276
  var JSX_ANNOTATION_REGEX = /^\*\s*@jsx\s+([^\s]+)/;
22244
22277
 
22245
22278
  var metadata = {
22246
22279
  group: "builtin-advanced"
22247
22280
  };
22248
22281
 
22249
- exports.metadata = metadata;
22250
22282
  /**
22251
22283
  * [Please add a description.]
22252
22284
  */
22253
22285
 
22286
+ exports.metadata = metadata;
22254
22287
  var visitor = require("../../helpers/build-react-transformer")({
22255
22288
 
22256
22289
  /**
@@ -22276,11 +22309,11 @@ var visitor = require("../../helpers/build-react-transformer")({
22276
22309
  }
22277
22310
  });
22278
22311
 
22279
- exports.visitor = visitor;
22280
22312
  /**
22281
22313
  * [Please add a description.]
22282
22314
  */
22283
22315
 
22316
+ exports.visitor = visitor;
22284
22317
  visitor.Program = function (node, parent, scope, file) {
22285
22318
  var id = file.opts.jsxPragma;
22286
22319
 
@@ -22319,23 +22352,24 @@ var _regenerator2 = _interopRequireDefault(_regenerator);
22319
22352
 
22320
22353
  var _types = require("../../../types");
22321
22354
 
22322
- var t = _interopRequireWildcard(_types);
22323
-
22324
22355
  // It's important to use the exact same NodePath constructor that
22325
22356
  // Regenerator uses, rather than require("ast-types").NodePath, because
22326
22357
  // the version of ast-types that Babel knows about might be different from
22327
22358
  // the version that Regenerator depends on. See for example #1958.
22359
+
22360
+ var t = _interopRequireWildcard(_types);
22361
+
22328
22362
  var NodePath = _regenerator2["default"].types.NodePath;
22329
22363
 
22330
22364
  var metadata = {
22331
22365
  group: "builtin-advanced"
22332
22366
  };
22333
22367
 
22334
- exports.metadata = metadata;
22335
22368
  /**
22336
22369
  * [Please add a description.]
22337
22370
  */
22338
22371
 
22372
+ exports.metadata = metadata;
22339
22373
  var visitor = {
22340
22374
 
22341
22375
  /**
@@ -22358,11 +22392,11 @@ var visitor = {
22358
22392
  }
22359
22393
  };
22360
22394
 
22361
- exports.visitor = visitor;
22362
22395
  // Given a Babel NodePath, return an ast-types NodePath that includes full
22363
22396
  // ancestry information (up to and including the Program node). This is
22364
22397
  // complicated by having to include intermediate objects like blockStatement.body
22365
22398
  // arrays, in addition to Node objects.
22399
+ exports.visitor = visitor;
22366
22400
  function convertNodePath(path) {
22367
22401
  var programNode;
22368
22402
  var keysAlongPath = [];
@@ -22478,12 +22512,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
22478
22512
 
22479
22513
  var _types = require("../../../types");
22480
22514
 
22481
- var t = _interopRequireWildcard(_types);
22482
-
22483
22515
  /**
22484
22516
  * [Please add a description.]
22485
22517
  */
22486
22518
 
22519
+ var t = _interopRequireWildcard(_types);
22520
+
22487
22521
  function statementList(key, path) {
22488
22522
  var paths = path.get(key);
22489
22523
 
@@ -22543,13 +22577,13 @@ var metadata = {
22543
22577
  group: "builtin-basic"
22544
22578
  };
22545
22579
 
22546
- exports.metadata = metadata;
22547
22580
  // visit Property functions first - https://github.com/babel/babel/issues/1860
22548
22581
 
22549
22582
  /**
22550
22583
  * [Please add a description.]
22551
22584
  */
22552
22585
 
22586
+ exports.metadata = metadata;
22553
22587
  var visitor = {
22554
22588
 
22555
22589
  /**
@@ -22596,9 +22630,10 @@ var messages = _interopRequireWildcard(_messages);
22596
22630
 
22597
22631
  var _types = require("../../../types");
22598
22632
 
22633
+ // check if the input Literal `source` is an alternate casing of "react"
22634
+
22599
22635
  var t = _interopRequireWildcard(_types);
22600
22636
 
22601
- // check if the input Literal `source` is an alternate casing of "react"
22602
22637
  function check(source, file) {
22603
22638
  if (t.isLiteral(source)) {
22604
22639
  var name = source.value;
@@ -22657,12 +22692,12 @@ var _path2 = _interopRequireDefault(_path);
22657
22692
 
22658
22693
  var _types = require("../types");
22659
22694
 
22660
- var t = _interopRequireWildcard(_types);
22661
-
22662
22695
  /**
22663
22696
  * [Please add a description.]
22664
22697
  */
22665
22698
 
22699
+ var t = _interopRequireWildcard(_types);
22700
+
22666
22701
  var TraversalContext = (function () {
22667
22702
  function TraversalContext(scope, opts, state, parentPath) {
22668
22703
  _classCallCheck(this, TraversalContext);
@@ -22842,12 +22877,12 @@ var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionInclude
22842
22877
 
22843
22878
  var _types = require("../types");
22844
22879
 
22845
- var t = _interopRequireWildcard(_types);
22846
-
22847
22880
  /**
22848
22881
  * [Please add a description.]
22849
22882
  */
22850
22883
 
22884
+ var t = _interopRequireWildcard(_types);
22885
+
22851
22886
  function traverse(parent, opts, scope, state, parentPath) {
22852
22887
  if (!parent) return;
22853
22888
  if (!opts) opts = {};
@@ -22989,13 +23024,13 @@ var t = _interopRequireWildcard(_types);
22989
23024
 
22990
23025
  var _index = require("./index");
22991
23026
 
22992
- var _index2 = _interopRequireDefault(_index);
22993
-
22994
23027
  /**
22995
23028
  * Call the provided `callback` with the `NodePath`s of all the parents.
22996
23029
  * When the `callback` returns a truthy value, we return that node path.
22997
23030
  */
22998
23031
 
23032
+ var _index2 = _interopRequireDefault(_index);
23033
+
22999
23034
  function findParent(callback) {
23000
23035
  var path = this;
23001
23036
  while (path = path.parentPath) {
@@ -23122,16 +23157,15 @@ function getDeepestCommonAncestorFrom(paths, filter) {
23122
23157
  var shouldMatch = first[i];
23123
23158
 
23124
23159
  var _arr2 = ancestries;
23160
+
23161
+ // next iteration may break so store these so they can be returned
23125
23162
  for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
23126
23163
  var ancestry = _arr2[_i2];
23127
23164
  if (ancestry[i] !== shouldMatch) {
23128
23165
  // we've hit a snag
23129
23166
  break depthLoop;
23130
23167
  }
23131
- }
23132
-
23133
- // next iteration may break so store these so they can be returned
23134
- lastCommonIndex = i;
23168
+ }lastCommonIndex = i;
23135
23169
  lastCommon = shouldMatch;
23136
23170
  }
23137
23171
 
@@ -23285,12 +23319,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
23285
23319
 
23286
23320
  var _index = require("../index");
23287
23321
 
23288
- var _index2 = _interopRequireDefault(_index);
23289
-
23290
23322
  /**
23291
23323
  * [Please add a description.]
23292
23324
  */
23293
23325
 
23326
+ var _index2 = _interopRequireDefault(_index);
23327
+
23294
23328
  function call(key) {
23295
23329
  var node = this.node;
23296
23330
  if (!node) return;
@@ -23582,12 +23616,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
23582
23616
 
23583
23617
  var _types = require("../../types");
23584
23618
 
23585
- var t = _interopRequireWildcard(_types);
23586
-
23587
23619
  /**
23588
23620
  * [Please add a description.]
23589
23621
  */
23590
23622
 
23623
+ var t = _interopRequireWildcard(_types);
23624
+
23591
23625
  function toComputedKey() {
23592
23626
  var node = this.node;
23593
23627
 
@@ -23684,9 +23718,11 @@ function evaluate() {
23684
23718
  }
23685
23719
 
23686
23720
  if (path.isLiteral()) {
23687
- if (node.regex) {} else {
23688
- return node.value;
23689
- }
23721
+ if (node.regex) {
23722
+ // we have a regex and we can't represent it natively
23723
+ } else {
23724
+ return node.value;
23725
+ }
23690
23726
  }
23691
23727
 
23692
23728
  if (path.isConditionalExpression()) {
@@ -23755,7 +23791,9 @@ function evaluate() {
23755
23791
  }
23756
23792
  }
23757
23793
 
23758
- if (path.isArrayExpression() || path.isObjectExpression()) {}
23794
+ if (path.isArrayExpression() || path.isObjectExpression()) {
23795
+ // we could evaluate these but it's probably impractical and not very useful
23796
+ }
23759
23797
 
23760
23798
  if (path.isLogicalExpression()) {
23761
23799
  var left = evaluate(path.get("left"));
@@ -23846,10 +23884,6 @@ function evaluate() {
23846
23884
  confident = false;
23847
23885
  }
23848
23886
  }
23849
-
23850
- // we have a regex and we can't represent it natively
23851
-
23852
- // we could evaluate these but it's probably impractical and not very useful
23853
23887
  }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
23854
23888
  },{}],166:[function(require,module,exports){
23855
23889
  "use strict";
@@ -23877,12 +23911,12 @@ var _index2 = _interopRequireDefault(_index);
23877
23911
 
23878
23912
  var _types = require("../../types");
23879
23913
 
23880
- var t = _interopRequireWildcard(_types);
23881
-
23882
23914
  /**
23883
23915
  * [Please add a description.]
23884
23916
  */
23885
23917
 
23918
+ var t = _interopRequireWildcard(_types);
23919
+
23886
23920
  function getStatementParent() {
23887
23921
  var path = this;
23888
23922
 
@@ -24070,12 +24104,12 @@ var _scope2 = _interopRequireDefault(_scope);
24070
24104
 
24071
24105
  var _types = require("../../types");
24072
24106
 
24073
- var t = _interopRequireWildcard(_types);
24074
-
24075
24107
  /**
24076
24108
  * [Please add a description.]
24077
24109
  */
24078
24110
 
24111
+ var t = _interopRequireWildcard(_types);
24112
+
24079
24113
  var NodePath = (function () {
24080
24114
 
24081
24115
  /**
@@ -24199,14 +24233,15 @@ var NodePath = (function () {
24199
24233
  };
24200
24234
 
24201
24235
  return NodePath;
24202
- })();
24203
-
24204
- exports["default"] = NodePath;
24236
+ })()
24205
24237
 
24206
24238
  /**
24207
24239
  * [Please add a description.]
24208
24240
  */
24209
24241
 
24242
+ ;
24243
+
24244
+ exports["default"] = NodePath;
24210
24245
  _lodashObjectAssign2["default"](NodePath.prototype, require("./ancestry"));
24211
24246
  _lodashObjectAssign2["default"](NodePath.prototype, require("./inference"));
24212
24247
  _lodashObjectAssign2["default"](NodePath.prototype, require("./replacement"));
@@ -24269,12 +24304,12 @@ var inferers = _interopRequireWildcard(_inferers);
24269
24304
 
24270
24305
  var _types = require("../../../types");
24271
24306
 
24272
- var t = _interopRequireWildcard(_types);
24273
-
24274
24307
  /**
24275
24308
  * Infer the type of the current `NodePath`.
24276
24309
  */
24277
24310
 
24311
+ var t = _interopRequireWildcard(_types);
24312
+
24278
24313
  function getTypeAnnotation() {
24279
24314
  if (this.typeAnnotation) return this.typeAnnotation;
24280
24315
 
@@ -24415,12 +24450,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
24415
24450
 
24416
24451
  var _types = require("../../../types");
24417
24452
 
24418
- var t = _interopRequireWildcard(_types);
24419
-
24420
24453
  /**
24421
24454
  * [Please add a description.]
24422
24455
  */
24423
24456
 
24457
+ var t = _interopRequireWildcard(_types);
24458
+
24424
24459
  exports["default"] = function (node) {
24425
24460
  if (!this.isReferenced()) return;
24426
24461
 
@@ -24440,7 +24475,9 @@ exports["default"] = function (node) {
24440
24475
  return t.voidTypeAnnotation();
24441
24476
  } else if (node.name === "NaN" || node.name === "Infinity") {
24442
24477
  return t.numberTypeAnnotation();
24443
- } else if (node.name === "arguments") {}
24478
+ } else if (node.name === "arguments") {
24479
+ // todo
24480
+ }
24444
24481
  };
24445
24482
 
24446
24483
  /**
@@ -24476,6 +24513,8 @@ function getTypeAnnotationBindingConstantViolations(path, name) {
24476
24513
  var visitedScopes = [];
24477
24514
  constantViolations = [];
24478
24515
  var _arr = rawConstantViolations;
24516
+
24517
+ // add back on function constant violations since we can't track calls
24479
24518
  for (var _i = 0; _i < _arr.length; _i++) {
24480
24519
  var violation = _arr[_i];
24481
24520
  var violationScope = violation.scope;
@@ -24488,10 +24527,7 @@ function getTypeAnnotationBindingConstantViolations(path, name) {
24488
24527
  constantViolations = [violation];
24489
24528
  break;
24490
24529
  }
24491
- }
24492
-
24493
- // add back on function constant violations since we can't track calls
24494
- constantViolations = constantViolations.concat(functionConstantViolations);
24530
+ }constantViolations = constantViolations.concat(functionConstantViolations);
24495
24531
 
24496
24532
  // push on inferred types of violated paths
24497
24533
  var _arr2 = constantViolations;
@@ -24631,8 +24667,6 @@ function getConditionalAnnotation(path, name) {
24631
24667
  }
24632
24668
  }
24633
24669
  module.exports = exports["default"];
24634
-
24635
- // todo
24636
24670
  },{"../../../types":191}],170:[function(require,module,exports){
24637
24671
  "use strict";
24638
24672
 
@@ -24668,12 +24702,12 @@ var t = _interopRequireWildcard(_types);
24668
24702
 
24669
24703
  var _infererReference = require("./inferer-reference");
24670
24704
 
24671
- exports.Identifier = _interopRequire(_infererReference);
24672
-
24673
24705
  /**
24674
24706
  * [Please add a description.]
24675
24707
  */
24676
24708
 
24709
+ exports.Identifier = _interopRequire(_infererReference);
24710
+
24677
24711
  function VariableDeclarator() {
24678
24712
  var id = this.get("id");
24679
24713
 
@@ -24850,12 +24884,13 @@ function Func() {
24850
24884
  }
24851
24885
 
24852
24886
  exports.Function = Func;
24853
- exports.Class = Func;
24854
24887
 
24855
24888
  /**
24856
24889
  * [Please add a description.]
24857
24890
  */
24858
24891
 
24892
+ exports.Class = Func;
24893
+
24859
24894
  function CallExpression() {
24860
24895
  return resolveCall(this.get("callee"));
24861
24896
  }
@@ -24885,12 +24920,12 @@ function resolveCall(callee) {
24885
24920
  } else {
24886
24921
  if (callee.node.returnType) {
24887
24922
  return callee.node.returnType;
24888
- } else {}
24923
+ } else {
24924
+ // todo: get union type of all return arguments
24925
+ }
24889
24926
  }
24890
24927
  }
24891
24928
  }
24892
-
24893
- // todo: get union type of all return arguments
24894
24929
  },{"../../../types":191,"./inferer-reference":169}],171:[function(require,module,exports){
24895
24930
  "use strict";
24896
24931
 
@@ -24923,8 +24958,6 @@ var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionInclude
24923
24958
 
24924
24959
  var _types = require("../../types");
24925
24960
 
24926
- var t = _interopRequireWildcard(_types);
24927
-
24928
24961
  /**
24929
24962
  * Match the current node if it matches the provided `pattern`.
24930
24963
  *
@@ -24932,6 +24965,8 @@ var t = _interopRequireWildcard(_types);
24932
24965
  * parsed nodes of `React.createClass` and `React["createClass"]`.
24933
24966
  */
24934
24967
 
24968
+ var t = _interopRequireWildcard(_types);
24969
+
24935
24970
  function matchesPattern(pattern, allowPartial) {
24936
24971
  // not a member expression
24937
24972
  if (!this.isMemberExpression()) return false;
@@ -25003,11 +25038,12 @@ function has(key) {
25003
25038
 
25004
25039
  var is = has;
25005
25040
 
25006
- exports.is = is;
25007
25041
  /**
25008
25042
  * Opposite of `has`.
25009
25043
  */
25010
25044
 
25045
+ exports.is = is;
25046
+
25011
25047
  function isnt(key) {
25012
25048
  return !this.has(key);
25013
25049
  }
@@ -25222,59 +25258,59 @@ function _resolve(dangerous, resolved) {
25222
25258
  if (this.isVariableDeclarator()) {
25223
25259
  if (this.get("id").isIdentifier()) {
25224
25260
  return this.get("init").resolve(dangerous, resolved);
25225
- } else {}
25261
+ } else {
25262
+ // otherwise it's a request for a pattern and that's a bit more tricky
25263
+ }
25226
25264
  } else if (this.isReferencedIdentifier()) {
25227
- var binding = this.scope.getBinding(this.node.name);
25228
- if (!binding) return;
25265
+ var binding = this.scope.getBinding(this.node.name);
25266
+ if (!binding) return;
25229
25267
 
25230
- // reassigned so we can't really resolve it
25231
- if (!binding.constant) return;
25268
+ // reassigned so we can't really resolve it
25269
+ if (!binding.constant) return;
25232
25270
 
25233
- // todo - lookup module in dependency graph
25234
- if (binding.kind === "module") return;
25271
+ // todo - lookup module in dependency graph
25272
+ if (binding.kind === "module") return;
25235
25273
 
25236
- if (binding.path !== this) {
25237
- return binding.path.resolve(dangerous, resolved);
25238
- }
25239
- } else if (this.isTypeCastExpression()) {
25240
- return this.get("expression").resolve(dangerous, resolved);
25241
- } else if (dangerous && this.isMemberExpression()) {
25242
- // this is dangerous, as non-direct target assignments will mutate it's state
25243
- // making this resolution inaccurate
25274
+ if (binding.path !== this) {
25275
+ return binding.path.resolve(dangerous, resolved);
25276
+ }
25277
+ } else if (this.isTypeCastExpression()) {
25278
+ return this.get("expression").resolve(dangerous, resolved);
25279
+ } else if (dangerous && this.isMemberExpression()) {
25280
+ // this is dangerous, as non-direct target assignments will mutate it's state
25281
+ // making this resolution inaccurate
25244
25282
 
25245
- var targetKey = this.toComputedKey();
25246
- if (!t.isLiteral(targetKey)) return;
25283
+ var targetKey = this.toComputedKey();
25284
+ if (!t.isLiteral(targetKey)) return;
25247
25285
 
25248
- var targetName = targetKey.value;
25286
+ var targetName = targetKey.value;
25249
25287
 
25250
- var target = this.get("object").resolve(dangerous, resolved);
25288
+ var target = this.get("object").resolve(dangerous, resolved);
25251
25289
 
25252
- if (target.isObjectExpression()) {
25253
- var props = target.get("properties");
25254
- var _arr2 = props;
25255
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
25256
- var prop = _arr2[_i2];
25257
- if (!prop.isProperty()) continue;
25290
+ if (target.isObjectExpression()) {
25291
+ var props = target.get("properties");
25292
+ var _arr2 = props;
25293
+ for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
25294
+ var prop = _arr2[_i2];
25295
+ if (!prop.isProperty()) continue;
25258
25296
 
25259
- var key = prop.get("key");
25297
+ var key = prop.get("key");
25260
25298
 
25261
- // { foo: obj }
25262
- var match = prop.isnt("computed") && key.isIdentifier({ name: targetName });
25299
+ // { foo: obj }
25300
+ var match = prop.isnt("computed") && key.isIdentifier({ name: targetName });
25263
25301
 
25264
- // { "foo": "obj" } or { ["foo"]: "obj" }
25265
- match = match || key.isLiteral({ value: targetName });
25302
+ // { "foo": "obj" } or { ["foo"]: "obj" }
25303
+ match = match || key.isLiteral({ value: targetName });
25266
25304
 
25267
- if (match) return prop.get("value").resolve(dangerous, resolved);
25305
+ if (match) return prop.get("value").resolve(dangerous, resolved);
25306
+ }
25307
+ } else if (target.isArrayExpression() && !isNaN(+targetName)) {
25308
+ var elems = target.get("elements");
25309
+ var elem = elems[targetName];
25310
+ if (elem) return elem.resolve(dangerous, resolved);
25268
25311
  }
25269
- } else if (target.isArrayExpression() && !isNaN(+targetName)) {
25270
- var elems = target.get("elements");
25271
- var elem = elems[targetName];
25272
- if (elem) return elem.resolve(dangerous, resolved);
25273
25312
  }
25274
- }
25275
25313
  }
25276
-
25277
- // otherwise it's a request for a pattern and that's a bit more tricky
25278
25314
  },{"../../types":191,"lodash/collection/includes":359}],172:[function(require,module,exports){
25279
25315
  "use strict";
25280
25316
 
@@ -25293,12 +25329,12 @@ var react = _interopRequireWildcard(_transformationHelpersReact);
25293
25329
 
25294
25330
  var _types = require("../../../types");
25295
25331
 
25296
- var t = _interopRequireWildcard(_types);
25297
-
25298
25332
  /**
25299
25333
  * [Please add a description.]
25300
25334
  */
25301
25335
 
25336
+ var t = _interopRequireWildcard(_types);
25337
+
25302
25338
  var referenceVisitor = {
25303
25339
 
25304
25340
  /**
@@ -25480,19 +25516,13 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
25480
25516
 
25481
25517
  var _types = require("../../../types");
25482
25518
 
25483
- var t = _interopRequireWildcard(_types);
25484
-
25485
25519
  /**
25486
25520
  * Pre hooks should be used for either rejecting removal or delegating removal
25487
25521
  */
25488
25522
 
25489
- var pre = [
25490
-
25491
- /**
25492
- * [Please add a description.]
25493
- */
25523
+ var t = _interopRequireWildcard(_types);
25494
25524
 
25495
- function (self) {
25525
+ var pre = [function (self) {
25496
25526
  if (self.key === "body" && (self.isBlockStatement() || self.isClassBody())) {
25497
25527
  // function () NODE
25498
25528
  // class NODE
@@ -25501,13 +25531,7 @@ function (self) {
25501
25531
  self.node.body = [];
25502
25532
  return true;
25503
25533
  }
25504
- },
25505
-
25506
- /**
25507
- * [Please add a description.]
25508
- */
25509
-
25510
- function (self, parent) {
25534
+ }, function (self, parent) {
25511
25535
  var replace = false;
25512
25536
 
25513
25537
  // () => NODE;
@@ -25524,18 +25548,12 @@ function (self, parent) {
25524
25548
  }
25525
25549
  }];
25526
25550
 
25527
- exports.pre = pre;
25528
25551
  /**
25529
25552
  * Post hooks should be used for cleaning up parents
25530
25553
  */
25531
25554
 
25532
- var post = [
25533
-
25534
- /**
25535
- * [Please add a description.]
25536
- */
25537
-
25538
- function (self, parent) {
25555
+ exports.pre = pre;
25556
+ var post = [function (self, parent) {
25539
25557
  var removeParent = false;
25540
25558
 
25541
25559
  // while (NODE);
@@ -25568,13 +25586,7 @@ function (self, parent) {
25568
25586
  parent.dangerouslyRemove();
25569
25587
  return true;
25570
25588
  }
25571
- },
25572
-
25573
- /**
25574
- * [Please add a description.]
25575
- */
25576
-
25577
- function (self, parent) {
25589
+ }, function (self, parent) {
25578
25590
  if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
25579
25591
  // (node, NODE);
25580
25592
  // we've just removed the second element of a sequence expression so let's turn that sequence
@@ -25582,13 +25594,7 @@ function (self, parent) {
25582
25594
  parent.replaceWith(parent.node.expressions[0]);
25583
25595
  return true;
25584
25596
  }
25585
- },
25586
-
25587
- /**
25588
- * [Please add a description.]
25589
- */
25590
-
25591
- function (self, parent) {
25597
+ }, function (self, parent) {
25592
25598
  if (parent.isBinary()) {
25593
25599
  // left + NODE;
25594
25600
  // NODE + right;
@@ -25603,6 +25609,26 @@ function (self, parent) {
25603
25609
  }
25604
25610
  }];
25605
25611
  exports.post = post;
25612
+
25613
+ /**
25614
+ * [Please add a description.]
25615
+ */
25616
+
25617
+ /**
25618
+ * [Please add a description.]
25619
+ */
25620
+
25621
+ /**
25622
+ * [Please add a description.]
25623
+ */
25624
+
25625
+ /**
25626
+ * [Please add a description.]
25627
+ */
25628
+
25629
+ /**
25630
+ * [Please add a description.]
25631
+ */
25606
25632
  },{"../../../types":191}],174:[function(require,module,exports){
25607
25633
  "use strict";
25608
25634
 
@@ -25617,12 +25643,12 @@ var react = _interopRequireWildcard(_transformationHelpersReact);
25617
25643
 
25618
25644
  var _types = require("../../../types");
25619
25645
 
25620
- var t = _interopRequireWildcard(_types);
25621
-
25622
25646
  /**
25623
25647
  * [Please add a description.]
25624
25648
  */
25625
25649
 
25650
+ var t = _interopRequireWildcard(_types);
25651
+
25626
25652
  var ReferencedIdentifier = {
25627
25653
  types: ["Identifier", "JSXIdentifier"],
25628
25654
  checkPath: function checkPath(_ref, opts) {
@@ -25643,11 +25669,11 @@ var ReferencedIdentifier = {
25643
25669
  }
25644
25670
  };
25645
25671
 
25646
- exports.ReferencedIdentifier = ReferencedIdentifier;
25647
25672
  /**
25648
25673
  * [Please add a description.]
25649
25674
  */
25650
25675
 
25676
+ exports.ReferencedIdentifier = ReferencedIdentifier;
25651
25677
  var BindingIdentifier = {
25652
25678
  types: ["Identifier"],
25653
25679
  checkPath: function checkPath(_ref2) {
@@ -25658,11 +25684,11 @@ var BindingIdentifier = {
25658
25684
  }
25659
25685
  };
25660
25686
 
25661
- exports.BindingIdentifier = BindingIdentifier;
25662
25687
  /**
25663
25688
  * [Please add a description.]
25664
25689
  */
25665
25690
 
25691
+ exports.BindingIdentifier = BindingIdentifier;
25666
25692
  var Statement = {
25667
25693
  types: ["Statement"],
25668
25694
  checkPath: function checkPath(_ref3) {
@@ -25682,11 +25708,11 @@ var Statement = {
25682
25708
  }
25683
25709
  };
25684
25710
 
25685
- exports.Statement = Statement;
25686
25711
  /**
25687
25712
  * [Please add a description.]
25688
25713
  */
25689
25714
 
25715
+ exports.Statement = Statement;
25690
25716
  var Expression = {
25691
25717
  types: ["Expression"],
25692
25718
  checkPath: function checkPath(path) {
@@ -25698,11 +25724,11 @@ var Expression = {
25698
25724
  }
25699
25725
  };
25700
25726
 
25701
- exports.Expression = Expression;
25702
25727
  /**
25703
25728
  * [Please add a description.]
25704
25729
  */
25705
25730
 
25731
+ exports.Expression = Expression;
25706
25732
  var Scope = {
25707
25733
  types: ["Scopable"],
25708
25734
  checkPath: function checkPath(path) {
@@ -25710,33 +25736,33 @@ var Scope = {
25710
25736
  }
25711
25737
  };
25712
25738
 
25713
- exports.Scope = Scope;
25714
25739
  /**
25715
25740
  * [Please add a description.]
25716
25741
  */
25717
25742
 
25743
+ exports.Scope = Scope;
25718
25744
  var Referenced = {
25719
25745
  checkPath: function checkPath(path) {
25720
25746
  return t.isReferenced(path.node, path.parent);
25721
25747
  }
25722
25748
  };
25723
25749
 
25724
- exports.Referenced = Referenced;
25725
25750
  /**
25726
25751
  * [Please add a description.]
25727
25752
  */
25728
25753
 
25754
+ exports.Referenced = Referenced;
25729
25755
  var BlockScoped = {
25730
25756
  checkPath: function checkPath(path) {
25731
25757
  return t.isBlockScoped(path.node);
25732
25758
  }
25733
25759
  };
25734
25760
 
25735
- exports.BlockScoped = BlockScoped;
25736
25761
  /**
25737
25762
  * [Please add a description.]
25738
25763
  */
25739
25764
 
25765
+ exports.BlockScoped = BlockScoped;
25740
25766
  var Var = {
25741
25767
  types: ["VariableDeclaration"],
25742
25768
  checkPath: function checkPath(path) {
@@ -25744,11 +25770,11 @@ var Var = {
25744
25770
  }
25745
25771
  };
25746
25772
 
25747
- exports.Var = Var;
25748
25773
  /**
25749
25774
  * [Please add a description.]
25750
25775
  */
25751
25776
 
25777
+ exports.Var = Var;
25752
25778
  var DirectiveLiteral = {
25753
25779
  types: ["Literal"],
25754
25780
  checkPath: function checkPath(path) {
@@ -25756,11 +25782,11 @@ var DirectiveLiteral = {
25756
25782
  }
25757
25783
  };
25758
25784
 
25759
- exports.DirectiveLiteral = DirectiveLiteral;
25760
25785
  /**
25761
25786
  * [Please add a description.]
25762
25787
  */
25763
25788
 
25789
+ exports.DirectiveLiteral = DirectiveLiteral;
25764
25790
  var Directive = {
25765
25791
  types: ["ExpressionStatement"],
25766
25792
  checkPath: function checkPath(path) {
@@ -25768,33 +25794,33 @@ var Directive = {
25768
25794
  }
25769
25795
  };
25770
25796
 
25771
- exports.Directive = Directive;
25772
25797
  /**
25773
25798
  * [Please add a description.]
25774
25799
  */
25775
25800
 
25801
+ exports.Directive = Directive;
25776
25802
  var User = {
25777
25803
  checkPath: function checkPath(path) {
25778
25804
  return path.node && !!path.node.loc;
25779
25805
  }
25780
25806
  };
25781
25807
 
25782
- exports.User = User;
25783
25808
  /**
25784
25809
  * [Please add a description.]
25785
25810
  */
25786
25811
 
25812
+ exports.User = User;
25787
25813
  var Generated = {
25788
25814
  checkPath: function checkPath(path) {
25789
25815
  return !path.isUser();
25790
25816
  }
25791
25817
  };
25792
25818
 
25793
- exports.Generated = Generated;
25794
25819
  /**
25795
25820
  * [Please add a description.]
25796
25821
  */
25797
25822
 
25823
+ exports.Generated = Generated;
25798
25824
  var Flow = {
25799
25825
  types: ["Flow", "ImportDeclaration"],
25800
25826
  checkPath: function checkPath(_ref4) {
@@ -25843,12 +25869,12 @@ var _index2 = _interopRequireDefault(_index);
25843
25869
 
25844
25870
  var _types = require("../../types");
25845
25871
 
25846
- var t = _interopRequireWildcard(_types);
25847
-
25848
25872
  /**
25849
25873
  * Insert the provided nodes before the current one.
25850
25874
  */
25851
25875
 
25876
+ var t = _interopRequireWildcard(_types);
25877
+
25852
25878
  function insertBefore(nodes) {
25853
25879
  this._assertUnremoved();
25854
25880
 
@@ -26082,13 +26108,13 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
26082
26108
 
26083
26109
  var _libRemovalHooks = require("./lib/removal-hooks");
26084
26110
 
26085
- var removalHooks = _interopRequireWildcard(_libRemovalHooks);
26086
-
26087
26111
  /**
26088
26112
  * Deprecated in favor of `dangerouslyRemove` as it's far more scary and more accurately portrays
26089
26113
  * the risk.
26090
26114
  */
26091
26115
 
26116
+ var removalHooks = _interopRequireWildcard(_libRemovalHooks);
26117
+
26092
26118
  function remove() {
26093
26119
  console.trace("Path#remove has been renamed to Path#dangerouslyRemove, removing a node is extremely dangerous so please refrain using it.");
26094
26120
  return this.dangerouslyRemove();
@@ -26196,12 +26222,12 @@ var _helpersParse2 = _interopRequireDefault(_helpersParse);
26196
26222
 
26197
26223
  var _types = require("../../types");
26198
26224
 
26199
- var t = _interopRequireWildcard(_types);
26200
-
26201
26225
  /**
26202
26226
  * [Please add a description.]
26203
26227
  */
26204
26228
 
26229
+ var t = _interopRequireWildcard(_types);
26230
+
26205
26231
  var hoistVariablesVisitor = {
26206
26232
 
26207
26233
  /**
@@ -26588,12 +26614,12 @@ var _helpersObject2 = _interopRequireDefault(_helpersObject);
26588
26614
 
26589
26615
  var _types = require("../../types");
26590
26616
 
26591
- var t = _interopRequireWildcard(_types);
26592
-
26593
26617
  /**
26594
26618
  * [Please add a description.]
26595
26619
  */
26596
26620
 
26621
+ var t = _interopRequireWildcard(_types);
26622
+
26597
26623
  var collectorVisitor = {
26598
26624
 
26599
26625
  /**
@@ -26822,6 +26848,10 @@ var Scope = (function () {
26822
26848
  this.path = path;
26823
26849
  }
26824
26850
 
26851
+ /**
26852
+ * Globals.
26853
+ */
26854
+
26825
26855
  /**
26826
26856
  * Traverse node with current scope and path.
26827
26857
  */
@@ -27647,18 +27677,14 @@ var Scope = (function () {
27647
27677
 
27648
27678
  _createClass(Scope, null, [{
27649
27679
  key: "globals",
27680
+ value: _lodashArrayFlatten2["default"]([_globals2["default"].builtin, _globals2["default"].browser, _globals2["default"].node].map(Object.keys)),
27650
27681
 
27651
27682
  /**
27652
- * Globals.
27683
+ * Variables available in current context.
27653
27684
  */
27654
- value: _lodashArrayFlatten2["default"]([_globals2["default"].builtin, _globals2["default"].browser, _globals2["default"].node].map(Object.keys)),
27655
27685
  enumerable: true
27656
27686
  }, {
27657
27687
  key: "contextVariables",
27658
-
27659
- /**
27660
- * Variables available in current context.
27661
- */
27662
27688
  value: ["arguments", "undefined", "Infinity", "NaN"],
27663
27689
  enumerable: true
27664
27690
  }]);
@@ -27697,12 +27723,12 @@ var t = _interopRequireWildcard(_types);
27697
27723
 
27698
27724
  var _lodashLangClone = require("lodash/lang/clone");
27699
27725
 
27700
- var _lodashLangClone2 = _interopRequireDefault(_lodashLangClone);
27701
-
27702
27726
  /**
27703
27727
  * [Please add a description.]
27704
27728
  */
27705
27729
 
27730
+ var _lodashLangClone2 = _interopRequireDefault(_lodashLangClone);
27731
+
27706
27732
  function explode(visitor) {
27707
27733
  if (visitor._exploded) return visitor;
27708
27734
  visitor._exploded = true;
@@ -27741,6 +27767,7 @@ function explode(visitor) {
27741
27767
 
27742
27768
  var _arr2 = Object.keys(visitor);
27743
27769
 
27770
+ // add aliases
27744
27771
  for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
27745
27772
  var nodeType = _arr2[_i2];
27746
27773
  if (shouldIgnoreKey(nodeType)) continue;
@@ -27772,10 +27799,7 @@ function explode(visitor) {
27772
27799
  } else {
27773
27800
  mergePair(visitor, fns);
27774
27801
  }
27775
- }
27776
-
27777
- // add aliases
27778
- for (var nodeType in visitor) {
27802
+ }for (var nodeType in visitor) {
27779
27803
  if (shouldIgnoreKey(nodeType)) continue;
27780
27804
 
27781
27805
  var fns = visitor[nodeType];
@@ -27963,12 +27987,12 @@ var _traversal2 = _interopRequireDefault(_traversal);
27963
27987
 
27964
27988
  var _index = require("./index");
27965
27989
 
27966
- var t = _interopRequireWildcard(_index);
27967
-
27968
27990
  /**
27969
27991
  * [Please add a description.]
27970
27992
  */
27971
27993
 
27994
+ var t = _interopRequireWildcard(_index);
27995
+
27972
27996
  function toComputedKey(node) {
27973
27997
  var key = arguments.length <= 1 || arguments[1] === undefined ? node.key || node.property : arguments[1];
27974
27998
  return (function () {
@@ -29017,13 +29041,13 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
29017
29041
 
29018
29042
  var _index = require("./index");
29019
29043
 
29020
- var t = _interopRequireWildcard(_index);
29021
-
29022
29044
  /**
29023
29045
  * Takes an array of `types` and flattens them, removing duplicates and
29024
29046
  * returns a `UnionTypeAnnotation` node containg them.
29025
29047
  */
29026
29048
 
29049
+ var t = _interopRequireWildcard(_index);
29050
+
29027
29051
  function createUnionTypeAnnotation(types) {
29028
29052
  var flattened = removeTypeDuplicates(types);
29029
29053
 
@@ -29229,13 +29253,13 @@ var STRING_UNARY_OPERATORS = ["typeof"];
29229
29253
 
29230
29254
  exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
29231
29255
  exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
29232
- exports.BUILDER_KEYS = _definitions.BUILDER_KEYS;
29233
- exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;
29234
29256
 
29235
29257
  /**
29236
29258
  * Registers `is[Type]` and `assert[Type]` for all types.
29237
29259
  */
29238
29260
 
29261
+ exports.BUILDER_KEYS = _definitions.BUILDER_KEYS;
29262
+ exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;
29239
29263
  _lodashCollectionEach2["default"](t.VISITOR_KEYS, function (keys, type) {
29240
29264
  registerType(type, true);
29241
29265
  });
@@ -29264,7 +29288,6 @@ _lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS, function (types, type) {
29264
29288
 
29265
29289
  var TYPES = Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));
29266
29290
 
29267
- exports.TYPES = TYPES;
29268
29291
  /**
29269
29292
  * Returns whether `node` is of given `type`.
29270
29293
  *
@@ -29273,6 +29296,7 @@ exports.TYPES = TYPES;
29273
29296
  */
29274
29297
 
29275
29298
  // @TODO should `skipAliasCheck` be removed?
29299
+ exports.TYPES = TYPES;
29276
29300
 
29277
29301
  function is(type, node, opts, skipAliasCheck) {
29278
29302
  if (!node) return false;
@@ -29571,12 +29595,12 @@ var _helpersObject2 = _interopRequireDefault(_helpersObject);
29571
29595
 
29572
29596
  var _index = require("./index");
29573
29597
 
29574
- var t = _interopRequireWildcard(_index);
29575
-
29576
29598
  /**
29577
29599
  * Return a list of binding identifiers associated with the input `node`.
29578
29600
  */
29579
29601
 
29602
+ var t = _interopRequireWildcard(_index);
29603
+
29580
29604
  function getBindingIdentifiers(node, duplicates) {
29581
29605
  var search = [].concat(node);
29582
29606
  var ids = _helpersObject2["default"]();
@@ -29680,12 +29704,12 @@ var _esutils2 = _interopRequireDefault(_esutils);
29680
29704
 
29681
29705
  var _index = require("./index");
29682
29706
 
29683
- var t = _interopRequireWildcard(_index);
29684
-
29685
29707
  /**
29686
29708
  * Check if the input `node` is a binding identifier.
29687
29709
  */
29688
29710
 
29711
+ var t = _interopRequireWildcard(_index);
29712
+
29689
29713
  function isBinding(node, parent) {
29690
29714
  var bindingKey = _retrievers.getBindingIdentifiers.keys[parent.type];
29691
29715
  if (bindingKey) {
@@ -30001,13 +30025,13 @@ var _pathExists2 = _interopRequireDefault(_pathExists);
30001
30025
 
30002
30026
  var _util = require("util");
30003
30027
 
30004
- exports.inherits = _util.inherits;
30005
- exports.inspect = _util.inspect;
30006
-
30007
30028
  /**
30008
30029
  * Test if a filename ends with a compilable extension.
30009
30030
  */
30010
30031
 
30032
+ exports.inherits = _util.inherits;
30033
+ exports.inspect = _util.inspect;
30034
+
30011
30035
  function canCompile(filename, altExts) {
30012
30036
  var exts = altExts || canCompile.EXTENSIONS;
30013
30037
  var ext = _path2["default"].extname(filename);
@@ -32438,9 +32462,9 @@ var reservedWords = {
32438
32462
  strictBind: makePredicate("eval arguments")
32439
32463
  };
32440
32464
 
32441
- exports.reservedWords = reservedWords;
32442
32465
  // And the keywords
32443
32466
 
32467
+ exports.reservedWords = reservedWords;
32444
32468
  var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
32445
32469
 
32446
32470
  var keywords = {
@@ -32448,7 +32472,6 @@ var keywords = {
32448
32472
  6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super")
32449
32473
  };
32450
32474
 
32451
- exports.keywords = keywords;
32452
32475
  // ## Character categories
32453
32476
 
32454
32477
  // Big ugly regular expressions that match characters in the
@@ -32457,6 +32480,7 @@ exports.keywords = keywords;
32457
32480
  // code point above 128.
32458
32481
  // Generated by `tools/generate-identifier-regex.js`.
32459
32482
 
32483
+ exports.keywords = keywords;
32460
32484
  var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
32461
32485
  var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";
32462
32486
 
@@ -32601,9 +32625,7 @@ var SourceLocation = function SourceLocation(start, end) {
32601
32625
 
32602
32626
  this.start = start;
32603
32627
  this.end = end;
32604
- };
32605
-
32606
- exports.SourceLocation = SourceLocation;
32628
+ }
32607
32629
 
32608
32630
  // The `getLineInfo` function is mostly useful when the
32609
32631
  // `locations` option is off (for performance reasons) and you
@@ -32611,6 +32633,10 @@ exports.SourceLocation = SourceLocation;
32611
32633
  // offset. `input` should be the code string that the offset refers
32612
32634
  // into.
32613
32635
 
32636
+ ;
32637
+
32638
+ exports.SourceLocation = SourceLocation;
32639
+
32614
32640
  function getLineInfo(input, offset) {
32615
32641
  for (var line = 1, cur = 0;;) {
32616
32642
  _whitespace.lineBreakG.lastIndex = cur;
@@ -33023,9 +33049,10 @@ var defaultOptions = {
33023
33049
  strictMode: null
33024
33050
  };
33025
33051
 
33026
- exports.defaultOptions = defaultOptions;
33027
33052
  // Interpret and default an options object
33028
33053
 
33054
+ exports.defaultOptions = defaultOptions;
33055
+
33029
33056
  function getOptions(opts) {
33030
33057
  var options = {};
33031
33058
  for (var opt in defaultOptions) {
@@ -35802,7 +35829,9 @@ _tokentype.types.parenL.updateContext = function (prevType) {
35802
35829
  this.exprAllowed = true;
35803
35830
  };
35804
35831
 
35805
- _tokentype.types.incDec.updateContext = function () {};
35832
+ _tokentype.types.incDec.updateContext = function () {
35833
+ // tokExprAllowed stays unchanged
35834
+ };
35806
35835
 
35807
35836
  _tokentype.types._function.updateContext = function () {
35808
35837
  if (this.curContext() !== types.b_stat) {
@@ -35820,8 +35849,6 @@ _tokentype.types.backQuote.updateContext = function () {
35820
35849
  }
35821
35850
  this.exprAllowed = false;
35822
35851
  };
35823
-
35824
- // tokExprAllowed stays unchanged
35825
35852
  },{"./state":225,"./tokentype":229,"./whitespace":231}],228:[function(require,module,exports){
35826
35853
  "use strict";
35827
35854
 
@@ -35859,12 +35886,13 @@ var Token = function Token(p) {
35859
35886
  if (p.options.ranges) {
35860
35887
  this.range = [p.start, p.end];
35861
35888
  }
35862
- };
35863
-
35864
- exports.Token = Token;
35889
+ }
35865
35890
 
35866
35891
  // ## Tokenizer
35867
35892
 
35893
+ ;
35894
+
35895
+ exports.Token = Token;
35868
35896
  var pp = _state.Parser.prototype;
35869
35897
 
35870
35898
  // Are we running under Rhino?
@@ -36383,8 +36411,8 @@ pp.readInt = function (radix, len) {
36383
36411
  val = undefined;
36384
36412
  if (code >= 97) val = code - 97 + 10; // a
36385
36413
  else if (code >= 65) val = code - 65 + 10; // A
36386
- else if (code >= 48 && code <= 57) val = code - 48; // 0-9
36387
- else val = Infinity;
36414
+ else if (code >= 48 && code <= 57) val = code - 48; // 0-9
36415
+ else val = Infinity;
36388
36416
  if (val >= radix) break;
36389
36417
  ++this.pos;
36390
36418
  total = total * radix + val;
@@ -36755,13 +36783,13 @@ var types = {
36755
36783
  exponent: new TokenType("**", { beforeExpr: true, binop: 11, rightAssociative: true })
36756
36784
  };
36757
36785
 
36758
- exports.types = types;
36759
36786
  // Map keyword names to token types.
36760
36787
 
36788
+ exports.types = types;
36761
36789
  var keywords = {};
36762
36790
 
36763
- exports.keywords = keywords;
36764
36791
  // Succinct definitions of keyword token types
36792
+ exports.keywords = keywords;
36765
36793
  function kw(name) {
36766
36794
  var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
36767
36795
 
@@ -68209,7 +68237,7 @@ module.exports = function (str) {
68209
68237
  },{}],551:[function(require,module,exports){
68210
68238
  module.exports={
68211
68239
  "name": "babel-core",
68212
- "version": "5.7.5",
68240
+ "version": "5.8.1",
68213
68241
  "description": "A compiler for writing next generation JavaScript",
68214
68242
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
68215
68243
  "homepage": "https://babeljs.io/",