UNPKG

1.87 MBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
5 define([], factory);
6 else if(typeof exports === 'object')
7 exports["Babel"] = factory();
8 else
9 root["Babel"] = factory();
10})(this, function() {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId])
20/******/ return installedModules[moduleId].exports;
21
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ exports: {},
25/******/ id: moduleId,
26/******/ loaded: false
27/******/ };
28
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
32/******/ // Flag the module as loaded
33/******/ module.loaded = true;
34
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38
39
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45
46/******/ // __webpack_public_path__
47/******/ __webpack_require__.p = "";
48
49/******/ // Load entry module and return exports
50/******/ return __webpack_require__(0);
51/******/ })
52/************************************************************************/
53/******/ ((function(modules) {
54 // Check all modules for deduplicated modules
55 for(var i in modules) {
56 if(Object.prototype.hasOwnProperty.call(modules, i)) {
57 switch(typeof modules[i]) {
58 case "function": break;
59 case "object":
60 // Module can be created from a template
61 modules[i] = (function(_m) {
62 var args = _m.slice(1), fn = modules[_m[0]];
63 return function (a,b,c) {
64 fn.apply(this, [a,b,c].concat(args));
65 };
66 }(modules[i]));
67 break;
68 default:
69 // Module is a copy of another module
70 modules[i] = modules[modules[i]];
71 break;
72 }
73 }
74 }
75 return modules;
76}([
77/* 0 */
78/***/ (function(module, exports, __webpack_require__) {
79
80 'use strict';
81
82 Object.defineProperty(exports, "__esModule", {
83 value: true
84 });
85 exports.version = exports.buildExternalHelpers = exports.availablePresets = exports.availablePlugins = undefined;
86
87 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
88
89 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
90
91 exports.transform = transform;
92 exports.transformFromAst = transformFromAst;
93 exports.registerPlugin = registerPlugin;
94 exports.registerPlugins = registerPlugins;
95 exports.registerPreset = registerPreset;
96 exports.registerPresets = registerPresets;
97 exports.transformScriptTags = transformScriptTags;
98 exports.disableScriptTags = disableScriptTags;
99
100 var _babelCore = __webpack_require__(290);
101
102 var Babel = _interopRequireWildcard(_babelCore);
103
104 var _transformScriptTags = __webpack_require__(629);
105
106 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
107
108 var isArray = Array.isArray || function (arg) {
109 return Object.prototype.toString.call(arg) === '[object Array]';
110 };
111
112 /**
113 * Loads the given name (or [name, options] pair) from the given table object
114 * holding the available presets or plugins.
115 *
116 * Returns undefined if the preset or plugin is not available; passes through
117 * name unmodified if it (or the first element of the pair) is not a string.
118 */
119 function loadBuiltin(builtinTable, name) {
120 if (isArray(name) && typeof name[0] === 'string') {
121 if (builtinTable.hasOwnProperty(name[0])) {
122 return [builtinTable[name[0]]].concat(name.slice(1));
123 }
124 return;
125 } else if (typeof name === 'string') {
126 return builtinTable[name];
127 }
128 // Could be an actual preset/plugin module
129 return name;
130 }
131
132 /**
133 * Parses plugin names and presets from the specified options.
134 */
135 function processOptions(options) {
136 // Parse preset names
137 var presets = (options.presets || []).map(function (presetName) {
138 var preset = loadBuiltin(availablePresets, presetName);
139
140 if (preset) {
141 // workaround for babel issue
142 // at some point, babel copies the preset, losing the non-enumerable
143 // buildPreset key; convert it into an enumerable key.
144 if (isArray(preset) && _typeof(preset[0]) === 'object' && preset[0].hasOwnProperty('buildPreset')) {
145 preset[0] = _extends({}, preset[0], { buildPreset: preset[0].buildPreset });
146 }
147 } else {
148 throw new Error('Invalid preset specified in Babel options: "' + presetName + '"');
149 }
150 return preset;
151 });
152
153 // Parse plugin names
154 var plugins = (options.plugins || []).map(function (pluginName) {
155 var plugin = loadBuiltin(availablePlugins, pluginName);
156
157 if (!plugin) {
158 throw new Error('Invalid plugin specified in Babel options: "' + pluginName + '"');
159 }
160 return plugin;
161 });
162
163 return _extends({
164 babelrc: false
165 }, options, {
166 presets: presets,
167 plugins: plugins
168 });
169 }
170
171 function transform(code, options) {
172 return Babel.transform(code, processOptions(options));
173 }
174
175 function transformFromAst(ast, code, options) {
176 return Babel.transformFromAst(ast, code, processOptions(options));
177 }
178 var availablePlugins = exports.availablePlugins = {};
179 var availablePresets = exports.availablePresets = {};
180 var buildExternalHelpers = exports.buildExternalHelpers = Babel.buildExternalHelpers;
181 /**
182 * Registers a named plugin for use with Babel.
183 */
184 function registerPlugin(name, plugin) {
185 if (availablePlugins.hasOwnProperty(name)) {
186 console.warn('A plugin named "' + name + '" is already registered, it will be overridden');
187 }
188 availablePlugins[name] = plugin;
189 }
190 /**
191 * Registers multiple plugins for use with Babel. `newPlugins` should be an object where the key
192 * is the name of the plugin, and the value is the plugin itself.
193 */
194 function registerPlugins(newPlugins) {
195 Object.keys(newPlugins).forEach(function (name) {
196 return registerPlugin(name, newPlugins[name]);
197 });
198 }
199
200 /**
201 * Registers a named preset for use with Babel.
202 */
203 function registerPreset(name, preset) {
204 if (availablePresets.hasOwnProperty(name)) {
205 console.warn('A preset named "' + name + '" is already registered, it will be overridden');
206 }
207 availablePresets[name] = preset;
208 }
209 /**
210 * Registers multiple presets for use with Babel. `newPresets` should be an object where the key
211 * is the name of the preset, and the value is the preset itself.
212 */
213 function registerPresets(newPresets) {
214 Object.keys(newPresets).forEach(function (name) {
215 return registerPreset(name, newPresets[name]);
216 });
217 }
218
219 // All the plugins we should bundle
220 registerPlugins({
221 'check-es2015-constants': __webpack_require__(66),
222 'external-helpers': __webpack_require__(322),
223 'inline-replace-variables': __webpack_require__(323),
224 'syntax-async-functions': __webpack_require__(67),
225 'syntax-async-generators': __webpack_require__(195),
226 'syntax-class-constructor-call': __webpack_require__(196),
227 'syntax-class-properties': __webpack_require__(197),
228 'syntax-decorators': __webpack_require__(125),
229 'syntax-do-expressions': __webpack_require__(198),
230 'syntax-exponentiation-operator': __webpack_require__(199),
231 'syntax-export-extensions': __webpack_require__(200),
232 'syntax-flow': __webpack_require__(126),
233 'syntax-function-bind': __webpack_require__(201),
234 'syntax-function-sent': __webpack_require__(325),
235 'syntax-jsx': __webpack_require__(127),
236 'syntax-object-rest-spread': __webpack_require__(202),
237 'syntax-trailing-function-commas': __webpack_require__(128),
238 'transform-async-functions': __webpack_require__(326),
239 'transform-async-to-generator': __webpack_require__(129),
240 'transform-async-to-module-method': __webpack_require__(328),
241 'transform-class-constructor-call': __webpack_require__(203),
242 'transform-class-properties': __webpack_require__(204),
243 'transform-decorators': __webpack_require__(205),
244 'transform-decorators-legacy': __webpack_require__(329).default, // <- No clue. Nope.
245 'transform-do-expressions': __webpack_require__(206),
246 'transform-es2015-arrow-functions': __webpack_require__(68),
247 'transform-es2015-block-scoped-functions': __webpack_require__(69),
248 'transform-es2015-block-scoping': __webpack_require__(70),
249 'transform-es2015-classes': __webpack_require__(71),
250 'transform-es2015-computed-properties': __webpack_require__(72),
251 'transform-es2015-destructuring': __webpack_require__(73),
252 'transform-es2015-duplicate-keys': __webpack_require__(130),
253 'transform-es2015-for-of': __webpack_require__(74),
254 'transform-es2015-function-name': __webpack_require__(75),
255 'transform-es2015-instanceof': __webpack_require__(332),
256 'transform-es2015-literals': __webpack_require__(76),
257 'transform-es2015-modules-amd': __webpack_require__(131),
258 'transform-es2015-modules-commonjs': __webpack_require__(77),
259 'transform-es2015-modules-systemjs': __webpack_require__(208),
260 'transform-es2015-modules-umd': __webpack_require__(209),
261 'transform-es2015-object-super': __webpack_require__(78),
262 'transform-es2015-parameters': __webpack_require__(79),
263 'transform-es2015-shorthand-properties': __webpack_require__(80),
264 'transform-es2015-spread': __webpack_require__(81),
265 'transform-es2015-sticky-regex': __webpack_require__(82),
266 'transform-es2015-template-literals': __webpack_require__(83),
267 'transform-es2015-typeof-symbol': __webpack_require__(84),
268 'transform-es2015-unicode-regex': __webpack_require__(85),
269 'transform-es3-member-expression-literals': __webpack_require__(336),
270 'transform-es3-property-literals': __webpack_require__(337),
271 'transform-es5-property-mutators': __webpack_require__(338),
272 'transform-eval': __webpack_require__(339),
273 'transform-exponentiation-operator': __webpack_require__(132),
274 'transform-export-extensions': __webpack_require__(210),
275 'transform-flow-comments': __webpack_require__(340),
276 'transform-flow-strip-types': __webpack_require__(211),
277 'transform-function-bind': __webpack_require__(212),
278 'transform-jscript': __webpack_require__(341),
279 'transform-object-assign': __webpack_require__(342),
280 'transform-object-rest-spread': __webpack_require__(213),
281 'transform-object-set-prototype-of-to-assign': __webpack_require__(343),
282 'transform-proto-to-assign': __webpack_require__(344),
283 'transform-react-constant-elements': __webpack_require__(345),
284 'transform-react-display-name': __webpack_require__(214),
285 'transform-react-inline-elements': __webpack_require__(346),
286 'transform-react-jsx': __webpack_require__(215),
287 'transform-react-jsx-compat': __webpack_require__(347),
288 'transform-react-jsx-self': __webpack_require__(349),
289 'transform-react-jsx-source': __webpack_require__(350),
290 'transform-regenerator': __webpack_require__(86),
291 'transform-runtime': __webpack_require__(353),
292 'transform-strict-mode': __webpack_require__(216),
293 'undeclared-variables-check': __webpack_require__(354)
294 });
295
296 // All the presets we should bundle
297 registerPresets({
298 es2015: __webpack_require__(217),
299 es2016: __webpack_require__(218),
300 es2017: __webpack_require__(219),
301 latest: __webpack_require__(356),
302 react: __webpack_require__(357),
303 'stage-0': __webpack_require__(358),
304 'stage-1': __webpack_require__(220),
305 'stage-2': __webpack_require__(221),
306 'stage-3': __webpack_require__(222),
307
308 // ES2015 preset with es2015-modules-commonjs removed
309 // Plugin list copied from babel-preset-es2015/index.js
310 'es2015-no-commonjs': {
311 plugins: [__webpack_require__(83), __webpack_require__(76), __webpack_require__(75), __webpack_require__(68), __webpack_require__(69), __webpack_require__(71), __webpack_require__(78), __webpack_require__(80), __webpack_require__(72), __webpack_require__(74), __webpack_require__(82), __webpack_require__(85), __webpack_require__(66), __webpack_require__(81), __webpack_require__(79), __webpack_require__(73), __webpack_require__(70), __webpack_require__(84), [__webpack_require__(86), { async: false, asyncGenerators: false }]]
312 },
313
314 // ES2015 preset with plugins set to loose mode.
315 // Based off https://github.com/bkonkle/babel-preset-es2015-loose/blob/master/index.js
316 'es2015-loose': {
317 plugins: [[__webpack_require__(83), { loose: true }], __webpack_require__(76), __webpack_require__(75), __webpack_require__(68), __webpack_require__(69), [__webpack_require__(71), { loose: true }], __webpack_require__(78), __webpack_require__(80), __webpack_require__(130), [__webpack_require__(72), { loose: true }], [__webpack_require__(74), { loose: true }], __webpack_require__(82), __webpack_require__(85), __webpack_require__(66), [__webpack_require__(81), { loose: true }], __webpack_require__(79), [__webpack_require__(73), { loose: true }], __webpack_require__(70), __webpack_require__(84), [__webpack_require__(77), { loose: true }], [__webpack_require__(86), { async: false, asyncGenerators: false }]]
318 }
319 });
320
321 var version = exports.version = ("6.26.0");
322
323 // Listen for load event if we're in a browser and then kick off finding and
324 // running of scripts with "text/babel" type.
325 if (typeof window !== 'undefined' && window && window.addEventListener) {
326 window.addEventListener('DOMContentLoaded', function () {
327 return transformScriptTags();
328 }, false);
329 }
330
331 /**
332 * Transform <script> tags with "text/babel" type.
333 * @param {Array} scriptTags specify script tags to transform, transform all in the <head> if not given
334 */
335 function transformScriptTags(scriptTags) {
336 (0, _transformScriptTags.runScripts)(transform, scriptTags);
337 }
338
339 /**
340 * Disables automatic transformation of <script> tags with "text/babel" type.
341 */
342 function disableScriptTags() {
343 window.removeEventListener('DOMContentLoaded', transformScriptTags);
344 }
345
346/***/ }),
347/* 1 */
348/***/ (function(module, exports, __webpack_require__) {
349
350 "use strict";
351
352 exports.__esModule = true;
353 exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isNodesEquivalent = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
354
355 var _getOwnPropertySymbols = __webpack_require__(360);
356
357 var _getOwnPropertySymbols2 = _interopRequireDefault(_getOwnPropertySymbols);
358
359 var _getIterator2 = __webpack_require__(2);
360
361 var _getIterator3 = _interopRequireDefault(_getIterator2);
362
363 var _keys = __webpack_require__(14);
364
365 var _keys2 = _interopRequireDefault(_keys);
366
367 var _stringify = __webpack_require__(35);
368
369 var _stringify2 = _interopRequireDefault(_stringify);
370
371 var _constants = __webpack_require__(135);
372
373 Object.defineProperty(exports, "STATEMENT_OR_BLOCK_KEYS", {
374 enumerable: true,
375 get: function get() {
376 return _constants.STATEMENT_OR_BLOCK_KEYS;
377 }
378 });
379 Object.defineProperty(exports, "FLATTENABLE_KEYS", {
380 enumerable: true,
381 get: function get() {
382 return _constants.FLATTENABLE_KEYS;
383 }
384 });
385 Object.defineProperty(exports, "FOR_INIT_KEYS", {
386 enumerable: true,
387 get: function get() {
388 return _constants.FOR_INIT_KEYS;
389 }
390 });
391 Object.defineProperty(exports, "COMMENT_KEYS", {
392 enumerable: true,
393 get: function get() {
394 return _constants.COMMENT_KEYS;
395 }
396 });
397 Object.defineProperty(exports, "LOGICAL_OPERATORS", {
398 enumerable: true,
399 get: function get() {
400 return _constants.LOGICAL_OPERATORS;
401 }
402 });
403 Object.defineProperty(exports, "UPDATE_OPERATORS", {
404 enumerable: true,
405 get: function get() {
406 return _constants.UPDATE_OPERATORS;
407 }
408 });
409 Object.defineProperty(exports, "BOOLEAN_NUMBER_BINARY_OPERATORS", {
410 enumerable: true,
411 get: function get() {
412 return _constants.BOOLEAN_NUMBER_BINARY_OPERATORS;
413 }
414 });
415 Object.defineProperty(exports, "EQUALITY_BINARY_OPERATORS", {
416 enumerable: true,
417 get: function get() {
418 return _constants.EQUALITY_BINARY_OPERATORS;
419 }
420 });
421 Object.defineProperty(exports, "COMPARISON_BINARY_OPERATORS", {
422 enumerable: true,
423 get: function get() {
424 return _constants.COMPARISON_BINARY_OPERATORS;
425 }
426 });
427 Object.defineProperty(exports, "BOOLEAN_BINARY_OPERATORS", {
428 enumerable: true,
429 get: function get() {
430 return _constants.BOOLEAN_BINARY_OPERATORS;
431 }
432 });
433 Object.defineProperty(exports, "NUMBER_BINARY_OPERATORS", {
434 enumerable: true,
435 get: function get() {
436 return _constants.NUMBER_BINARY_OPERATORS;
437 }
438 });
439 Object.defineProperty(exports, "BINARY_OPERATORS", {
440 enumerable: true,
441 get: function get() {
442 return _constants.BINARY_OPERATORS;
443 }
444 });
445 Object.defineProperty(exports, "BOOLEAN_UNARY_OPERATORS", {
446 enumerable: true,
447 get: function get() {
448 return _constants.BOOLEAN_UNARY_OPERATORS;
449 }
450 });
451 Object.defineProperty(exports, "NUMBER_UNARY_OPERATORS", {
452 enumerable: true,
453 get: function get() {
454 return _constants.NUMBER_UNARY_OPERATORS;
455 }
456 });
457 Object.defineProperty(exports, "STRING_UNARY_OPERATORS", {
458 enumerable: true,
459 get: function get() {
460 return _constants.STRING_UNARY_OPERATORS;
461 }
462 });
463 Object.defineProperty(exports, "UNARY_OPERATORS", {
464 enumerable: true,
465 get: function get() {
466 return _constants.UNARY_OPERATORS;
467 }
468 });
469 Object.defineProperty(exports, "INHERIT_KEYS", {
470 enumerable: true,
471 get: function get() {
472 return _constants.INHERIT_KEYS;
473 }
474 });
475 Object.defineProperty(exports, "BLOCK_SCOPED_SYMBOL", {
476 enumerable: true,
477 get: function get() {
478 return _constants.BLOCK_SCOPED_SYMBOL;
479 }
480 });
481 Object.defineProperty(exports, "NOT_LOCAL_BINDING", {
482 enumerable: true,
483 get: function get() {
484 return _constants.NOT_LOCAL_BINDING;
485 }
486 });
487 exports.is = is;
488 exports.isType = isType;
489 exports.validate = validate;
490 exports.shallowEqual = shallowEqual;
491 exports.appendToMemberExpression = appendToMemberExpression;
492 exports.prependToMemberExpression = prependToMemberExpression;
493 exports.ensureBlock = ensureBlock;
494 exports.clone = clone;
495 exports.cloneWithoutLoc = cloneWithoutLoc;
496 exports.cloneDeep = cloneDeep;
497 exports.buildMatchMemberExpression = buildMatchMemberExpression;
498 exports.removeComments = removeComments;
499 exports.inheritsComments = inheritsComments;
500 exports.inheritTrailingComments = inheritTrailingComments;
501 exports.inheritLeadingComments = inheritLeadingComments;
502 exports.inheritInnerComments = inheritInnerComments;
503 exports.inherits = inherits;
504 exports.assertNode = assertNode;
505 exports.isNode = isNode;
506 exports.traverseFast = traverseFast;
507 exports.removeProperties = removeProperties;
508 exports.removePropertiesDeep = removePropertiesDeep;
509
510 var _retrievers = __webpack_require__(226);
511
512 Object.defineProperty(exports, "getBindingIdentifiers", {
513 enumerable: true,
514 get: function get() {
515 return _retrievers.getBindingIdentifiers;
516 }
517 });
518 Object.defineProperty(exports, "getOuterBindingIdentifiers", {
519 enumerable: true,
520 get: function get() {
521 return _retrievers.getOuterBindingIdentifiers;
522 }
523 });
524
525 var _validators = __webpack_require__(395);
526
527 Object.defineProperty(exports, "isBinding", {
528 enumerable: true,
529 get: function get() {
530 return _validators.isBinding;
531 }
532 });
533 Object.defineProperty(exports, "isReferenced", {
534 enumerable: true,
535 get: function get() {
536 return _validators.isReferenced;
537 }
538 });
539 Object.defineProperty(exports, "isValidIdentifier", {
540 enumerable: true,
541 get: function get() {
542 return _validators.isValidIdentifier;
543 }
544 });
545 Object.defineProperty(exports, "isLet", {
546 enumerable: true,
547 get: function get() {
548 return _validators.isLet;
549 }
550 });
551 Object.defineProperty(exports, "isBlockScoped", {
552 enumerable: true,
553 get: function get() {
554 return _validators.isBlockScoped;
555 }
556 });
557 Object.defineProperty(exports, "isVar", {
558 enumerable: true,
559 get: function get() {
560 return _validators.isVar;
561 }
562 });
563 Object.defineProperty(exports, "isSpecifierDefault", {
564 enumerable: true,
565 get: function get() {
566 return _validators.isSpecifierDefault;
567 }
568 });
569 Object.defineProperty(exports, "isScope", {
570 enumerable: true,
571 get: function get() {
572 return _validators.isScope;
573 }
574 });
575 Object.defineProperty(exports, "isImmutable", {
576 enumerable: true,
577 get: function get() {
578 return _validators.isImmutable;
579 }
580 });
581 Object.defineProperty(exports, "isNodesEquivalent", {
582 enumerable: true,
583 get: function get() {
584 return _validators.isNodesEquivalent;
585 }
586 });
587
588 var _converters = __webpack_require__(385);
589
590 Object.defineProperty(exports, "toComputedKey", {
591 enumerable: true,
592 get: function get() {
593 return _converters.toComputedKey;
594 }
595 });
596 Object.defineProperty(exports, "toSequenceExpression", {
597 enumerable: true,
598 get: function get() {
599 return _converters.toSequenceExpression;
600 }
601 });
602 Object.defineProperty(exports, "toKeyAlias", {
603 enumerable: true,
604 get: function get() {
605 return _converters.toKeyAlias;
606 }
607 });
608 Object.defineProperty(exports, "toIdentifier", {
609 enumerable: true,
610 get: function get() {
611 return _converters.toIdentifier;
612 }
613 });
614 Object.defineProperty(exports, "toBindingIdentifierName", {
615 enumerable: true,
616 get: function get() {
617 return _converters.toBindingIdentifierName;
618 }
619 });
620 Object.defineProperty(exports, "toStatement", {
621 enumerable: true,
622 get: function get() {
623 return _converters.toStatement;
624 }
625 });
626 Object.defineProperty(exports, "toExpression", {
627 enumerable: true,
628 get: function get() {
629 return _converters.toExpression;
630 }
631 });
632 Object.defineProperty(exports, "toBlock", {
633 enumerable: true,
634 get: function get() {
635 return _converters.toBlock;
636 }
637 });
638 Object.defineProperty(exports, "valueToNode", {
639 enumerable: true,
640 get: function get() {
641 return _converters.valueToNode;
642 }
643 });
644
645 var _flow = __webpack_require__(393);
646
647 Object.defineProperty(exports, "createUnionTypeAnnotation", {
648 enumerable: true,
649 get: function get() {
650 return _flow.createUnionTypeAnnotation;
651 }
652 });
653 Object.defineProperty(exports, "removeTypeDuplicates", {
654 enumerable: true,
655 get: function get() {
656 return _flow.removeTypeDuplicates;
657 }
658 });
659 Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
660 enumerable: true,
661 get: function get() {
662 return _flow.createTypeAnnotationBasedOnTypeof;
663 }
664 });
665
666 var _toFastProperties = __webpack_require__(624);
667
668 var _toFastProperties2 = _interopRequireDefault(_toFastProperties);
669
670 var _clone = __webpack_require__(109);
671
672 var _clone2 = _interopRequireDefault(_clone);
673
674 var _uniq = __webpack_require__(600);
675
676 var _uniq2 = _interopRequireDefault(_uniq);
677
678 __webpack_require__(390);
679
680 var _definitions = __webpack_require__(26);
681
682 var _react2 = __webpack_require__(394);
683
684 var _react = _interopRequireWildcard(_react2);
685
686 function _interopRequireWildcard(obj) {
687 if (obj && obj.__esModule) {
688 return obj;
689 } else {
690 var newObj = {};if (obj != null) {
691 for (var key in obj) {
692 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
693 }
694 }newObj.default = obj;return newObj;
695 }
696 }
697
698 function _interopRequireDefault(obj) {
699 return obj && obj.__esModule ? obj : { default: obj };
700 }
701
702 var t = exports;
703
704 function registerType(type) {
705 var is = t["is" + type];
706 if (!is) {
707 is = t["is" + type] = function (node, opts) {
708 return t.is(type, node, opts);
709 };
710 }
711
712 t["assert" + type] = function (node, opts) {
713 opts = opts || {};
714 if (!is(node, opts)) {
715 throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts));
716 }
717 };
718 }
719
720 exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
721 exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;
722 exports.NODE_FIELDS = _definitions.NODE_FIELDS;
723 exports.BUILDER_KEYS = _definitions.BUILDER_KEYS;
724 exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS;
725 exports.react = _react;
726
727 for (var type in t.VISITOR_KEYS) {
728 registerType(type);
729 }
730
731 t.FLIPPED_ALIAS_KEYS = {};
732
733 (0, _keys2.default)(t.ALIAS_KEYS).forEach(function (type) {
734 t.ALIAS_KEYS[type].forEach(function (alias) {
735 var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
736 types.push(type);
737 });
738 });
739
740 (0, _keys2.default)(t.FLIPPED_ALIAS_KEYS).forEach(function (type) {
741 t[type.toUpperCase() + "_TYPES"] = t.FLIPPED_ALIAS_KEYS[type];
742 registerType(type);
743 });
744
745 var TYPES = exports.TYPES = (0, _keys2.default)(t.VISITOR_KEYS).concat((0, _keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0, _keys2.default)(t.DEPRECATED_KEYS));
746
747 function is(type, node, opts) {
748 if (!node) return false;
749
750 var matches = isType(node.type, type);
751 if (!matches) return false;
752
753 if (typeof opts === "undefined") {
754 return true;
755 } else {
756 return t.shallowEqual(node, opts);
757 }
758 }
759
760 function isType(nodeType, targetType) {
761 if (nodeType === targetType) return true;
762
763 if (t.ALIAS_KEYS[targetType]) return false;
764
765 var aliases = t.FLIPPED_ALIAS_KEYS[targetType];
766 if (aliases) {
767 if (aliases[0] === nodeType) return true;
768
769 for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
770 var _ref;
771
772 if (_isArray) {
773 if (_i >= _iterator.length) break;
774 _ref = _iterator[_i++];
775 } else {
776 _i = _iterator.next();
777 if (_i.done) break;
778 _ref = _i.value;
779 }
780
781 var alias = _ref;
782
783 if (nodeType === alias) return true;
784 }
785 }
786
787 return false;
788 }
789
790 (0, _keys2.default)(t.BUILDER_KEYS).forEach(function (type) {
791 var keys = t.BUILDER_KEYS[type];
792
793 function builder() {
794 if (arguments.length > keys.length) {
795 throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length));
796 }
797
798 var node = {};
799 node.type = type;
800
801 var i = 0;
802
803 for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
804 var _ref2;
805
806 if (_isArray2) {
807 if (_i2 >= _iterator2.length) break;
808 _ref2 = _iterator2[_i2++];
809 } else {
810 _i2 = _iterator2.next();
811 if (_i2.done) break;
812 _ref2 = _i2.value;
813 }
814
815 var _key = _ref2;
816
817 var field = t.NODE_FIELDS[type][_key];
818
819 var arg = arguments[i++];
820 if (arg === undefined) arg = (0, _clone2.default)(field.default);
821
822 node[_key] = arg;
823 }
824
825 for (var key in node) {
826 validate(node, key, node[key]);
827 }
828
829 return node;
830 }
831
832 t[type] = builder;
833 t[type[0].toLowerCase() + type.slice(1)] = builder;
834 });
835
836 var _loop = function _loop(_type) {
837 var newType = t.DEPRECATED_KEYS[_type];
838
839 function proxy(fn) {
840 return function () {
841 console.trace("The node type " + _type + " has been renamed to " + newType);
842 return fn.apply(this, arguments);
843 };
844 }
845
846 t[_type] = t[_type[0].toLowerCase() + _type.slice(1)] = proxy(t[newType]);
847 t["is" + _type] = proxy(t["is" + newType]);
848 t["assert" + _type] = proxy(t["assert" + newType]);
849 };
850
851 for (var _type in t.DEPRECATED_KEYS) {
852 _loop(_type);
853 }
854
855 function validate(node, key, val) {
856 if (!node) return;
857
858 var fields = t.NODE_FIELDS[node.type];
859 if (!fields) return;
860
861 var field = fields[key];
862 if (!field || !field.validate) return;
863 if (field.optional && val == null) return;
864
865 field.validate(node, key, val);
866 }
867
868 function shallowEqual(actual, expected) {
869 var keys = (0, _keys2.default)(expected);
870
871 for (var _iterator3 = keys, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
872 var _ref3;
873
874 if (_isArray3) {
875 if (_i3 >= _iterator3.length) break;
876 _ref3 = _iterator3[_i3++];
877 } else {
878 _i3 = _iterator3.next();
879 if (_i3.done) break;
880 _ref3 = _i3.value;
881 }
882
883 var key = _ref3;
884
885 if (actual[key] !== expected[key]) {
886 return false;
887 }
888 }
889
890 return true;
891 }
892
893 function appendToMemberExpression(member, append, computed) {
894 member.object = t.memberExpression(member.object, member.property, member.computed);
895 member.property = append;
896 member.computed = !!computed;
897 return member;
898 }
899
900 function prependToMemberExpression(member, prepend) {
901 member.object = t.memberExpression(prepend, member.object);
902 return member;
903 }
904
905 function ensureBlock(node) {
906 var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "body";
907
908 return node[key] = t.toBlock(node[key], node);
909 }
910
911 function clone(node) {
912 if (!node) return node;
913 var newNode = {};
914 for (var key in node) {
915 if (key[0] === "_") continue;
916 newNode[key] = node[key];
917 }
918 return newNode;
919 }
920
921 function cloneWithoutLoc(node) {
922 var newNode = clone(node);
923 delete newNode.loc;
924 return newNode;
925 }
926
927 function cloneDeep(node) {
928 if (!node) return node;
929 var newNode = {};
930
931 for (var key in node) {
932 if (key[0] === "_") continue;
933
934 var val = node[key];
935
936 if (val) {
937 if (val.type) {
938 val = t.cloneDeep(val);
939 } else if (Array.isArray(val)) {
940 val = val.map(t.cloneDeep);
941 }
942 }
943
944 newNode[key] = val;
945 }
946
947 return newNode;
948 }
949
950 function buildMatchMemberExpression(match, allowPartial) {
951 var parts = match.split(".");
952
953 return function (member) {
954 if (!t.isMemberExpression(member)) return false;
955
956 var search = [member];
957 var i = 0;
958
959 while (search.length) {
960 var node = search.shift();
961
962 if (allowPartial && i === parts.length) {
963 return true;
964 }
965
966 if (t.isIdentifier(node)) {
967 if (parts[i] !== node.name) return false;
968 } else if (t.isStringLiteral(node)) {
969 if (parts[i] !== node.value) return false;
970 } else if (t.isMemberExpression(node)) {
971 if (node.computed && !t.isStringLiteral(node.property)) {
972 return false;
973 } else {
974 search.push(node.object);
975 search.push(node.property);
976 continue;
977 }
978 } else {
979 return false;
980 }
981
982 if (++i > parts.length) {
983 return false;
984 }
985 }
986
987 return true;
988 };
989 }
990
991 function removeComments(node) {
992 for (var _iterator4 = t.COMMENT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
993 var _ref4;
994
995 if (_isArray4) {
996 if (_i4 >= _iterator4.length) break;
997 _ref4 = _iterator4[_i4++];
998 } else {
999 _i4 = _iterator4.next();
1000 if (_i4.done) break;
1001 _ref4 = _i4.value;
1002 }
1003
1004 var key = _ref4;
1005
1006 delete node[key];
1007 }
1008 return node;
1009 }
1010
1011 function inheritsComments(child, parent) {
1012 inheritTrailingComments(child, parent);
1013 inheritLeadingComments(child, parent);
1014 inheritInnerComments(child, parent);
1015 return child;
1016 }
1017
1018 function inheritTrailingComments(child, parent) {
1019 _inheritComments("trailingComments", child, parent);
1020 }
1021
1022 function inheritLeadingComments(child, parent) {
1023 _inheritComments("leadingComments", child, parent);
1024 }
1025
1026 function inheritInnerComments(child, parent) {
1027 _inheritComments("innerComments", child, parent);
1028 }
1029
1030 function _inheritComments(key, child, parent) {
1031 if (child && parent) {
1032 child[key] = (0, _uniq2.default)([].concat(child[key], parent[key]).filter(Boolean));
1033 }
1034 }
1035
1036 function inherits(child, parent) {
1037 if (!child || !parent) return child;
1038
1039 for (var _iterator5 = t.INHERIT_KEYS.optional, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
1040 var _ref5;
1041
1042 if (_isArray5) {
1043 if (_i5 >= _iterator5.length) break;
1044 _ref5 = _iterator5[_i5++];
1045 } else {
1046 _i5 = _iterator5.next();
1047 if (_i5.done) break;
1048 _ref5 = _i5.value;
1049 }
1050
1051 var _key2 = _ref5;
1052
1053 if (child[_key2] == null) {
1054 child[_key2] = parent[_key2];
1055 }
1056 }
1057
1058 for (var key in parent) {
1059 if (key[0] === "_") child[key] = parent[key];
1060 }
1061
1062 for (var _iterator6 = t.INHERIT_KEYS.force, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
1063 var _ref6;
1064
1065 if (_isArray6) {
1066 if (_i6 >= _iterator6.length) break;
1067 _ref6 = _iterator6[_i6++];
1068 } else {
1069 _i6 = _iterator6.next();
1070 if (_i6.done) break;
1071 _ref6 = _i6.value;
1072 }
1073
1074 var _key3 = _ref6;
1075
1076 child[_key3] = parent[_key3];
1077 }
1078
1079 t.inheritsComments(child, parent);
1080
1081 return child;
1082 }
1083
1084 function assertNode(node) {
1085 if (!isNode(node)) {
1086 throw new TypeError("Not a valid node " + (node && node.type));
1087 }
1088 }
1089
1090 function isNode(node) {
1091 return !!(node && _definitions.VISITOR_KEYS[node.type]);
1092 }
1093
1094 (0, _toFastProperties2.default)(t);
1095 (0, _toFastProperties2.default)(t.VISITOR_KEYS);
1096
1097 function traverseFast(node, enter, opts) {
1098 if (!node) return;
1099
1100 var keys = t.VISITOR_KEYS[node.type];
1101 if (!keys) return;
1102
1103 opts = opts || {};
1104 enter(node, opts);
1105
1106 for (var _iterator7 = keys, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
1107 var _ref7;
1108
1109 if (_isArray7) {
1110 if (_i7 >= _iterator7.length) break;
1111 _ref7 = _iterator7[_i7++];
1112 } else {
1113 _i7 = _iterator7.next();
1114 if (_i7.done) break;
1115 _ref7 = _i7.value;
1116 }
1117
1118 var key = _ref7;
1119
1120 var subNode = node[key];
1121
1122 if (Array.isArray(subNode)) {
1123 for (var _iterator8 = subNode, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) {
1124 var _ref8;
1125
1126 if (_isArray8) {
1127 if (_i8 >= _iterator8.length) break;
1128 _ref8 = _iterator8[_i8++];
1129 } else {
1130 _i8 = _iterator8.next();
1131 if (_i8.done) break;
1132 _ref8 = _i8.value;
1133 }
1134
1135 var _node = _ref8;
1136
1137 traverseFast(_node, enter, opts);
1138 }
1139 } else {
1140 traverseFast(subNode, enter, opts);
1141 }
1142 }
1143 }
1144
1145 var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
1146
1147 var CLEAR_KEYS_PLUS_COMMENTS = t.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
1148
1149 function removeProperties(node, opts) {
1150 opts = opts || {};
1151 var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
1152 for (var _iterator9 = map, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) {
1153 var _ref9;
1154
1155 if (_isArray9) {
1156 if (_i9 >= _iterator9.length) break;
1157 _ref9 = _iterator9[_i9++];
1158 } else {
1159 _i9 = _iterator9.next();
1160 if (_i9.done) break;
1161 _ref9 = _i9.value;
1162 }
1163
1164 var _key4 = _ref9;
1165
1166 if (node[_key4] != null) node[_key4] = undefined;
1167 }
1168
1169 for (var key in node) {
1170 if (key[0] === "_" && node[key] != null) node[key] = undefined;
1171 }
1172
1173 var syms = (0, _getOwnPropertySymbols2.default)(node);
1174 for (var _iterator10 = syms, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) {
1175 var _ref10;
1176
1177 if (_isArray10) {
1178 if (_i10 >= _iterator10.length) break;
1179 _ref10 = _iterator10[_i10++];
1180 } else {
1181 _i10 = _iterator10.next();
1182 if (_i10.done) break;
1183 _ref10 = _i10.value;
1184 }
1185
1186 var sym = _ref10;
1187
1188 node[sym] = null;
1189 }
1190 }
1191
1192 function removePropertiesDeep(tree, opts) {
1193 traverseFast(tree, removeProperties, opts);
1194 return tree;
1195 }
1196
1197/***/ }),
1198/* 2 */
1199/***/ (function(module, exports, __webpack_require__) {
1200
1201 "use strict";
1202
1203 module.exports = { "default": __webpack_require__(404), __esModule: true };
1204
1205/***/ }),
1206/* 3 */
1207/***/ (function(module, exports) {
1208
1209 "use strict";
1210
1211 exports.__esModule = true;
1212
1213 exports.default = function (instance, Constructor) {
1214 if (!(instance instanceof Constructor)) {
1215 throw new TypeError("Cannot call a class as a function");
1216 }
1217 };
1218
1219/***/ }),
1220/* 4 */
1221/***/ (function(module, exports, __webpack_require__) {
1222
1223 "use strict";
1224
1225 exports.__esModule = true;
1226
1227 var _symbol = __webpack_require__(10);
1228
1229 var _symbol2 = _interopRequireDefault(_symbol);
1230
1231 exports.default = function (code, opts) {
1232 var stack = void 0;
1233 try {
1234 throw new Error();
1235 } catch (error) {
1236 if (error.stack) {
1237 stack = error.stack.split("\n").slice(1).join("\n");
1238 }
1239 }
1240
1241 opts = (0, _assign2.default)({
1242 allowReturnOutsideFunction: true,
1243 allowSuperOutsideMethod: true,
1244 preserveComments: false
1245 }, opts);
1246
1247 var _getAst = function getAst() {
1248 var ast = void 0;
1249
1250 try {
1251 ast = babylon.parse(code, opts);
1252
1253 ast = _babelTraverse2.default.removeProperties(ast, { preserveComments: opts.preserveComments });
1254
1255 _babelTraverse2.default.cheap(ast, function (node) {
1256 node[FROM_TEMPLATE] = true;
1257 });
1258 } catch (err) {
1259 err.stack = err.stack + "from\n" + stack;
1260 throw err;
1261 }
1262
1263 _getAst = function getAst() {
1264 return ast;
1265 };
1266
1267 return ast;
1268 };
1269
1270 return function () {
1271 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1272 args[_key] = arguments[_key];
1273 }
1274
1275 return useTemplate(_getAst(), args);
1276 };
1277 };
1278
1279 var _cloneDeep = __webpack_require__(574);
1280
1281 var _cloneDeep2 = _interopRequireDefault(_cloneDeep);
1282
1283 var _assign = __webpack_require__(174);
1284
1285 var _assign2 = _interopRequireDefault(_assign);
1286
1287 var _has = __webpack_require__(274);
1288
1289 var _has2 = _interopRequireDefault(_has);
1290
1291 var _babelTraverse = __webpack_require__(7);
1292
1293 var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
1294
1295 var _babylon = __webpack_require__(89);
1296
1297 var babylon = _interopRequireWildcard(_babylon);
1298
1299 var _babelTypes = __webpack_require__(1);
1300
1301 var t = _interopRequireWildcard(_babelTypes);
1302
1303 function _interopRequireWildcard(obj) {
1304 if (obj && obj.__esModule) {
1305 return obj;
1306 } else {
1307 var newObj = {};if (obj != null) {
1308 for (var key in obj) {
1309 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
1310 }
1311 }newObj.default = obj;return newObj;
1312 }
1313 }
1314
1315 function _interopRequireDefault(obj) {
1316 return obj && obj.__esModule ? obj : { default: obj };
1317 }
1318
1319 var FROM_TEMPLATE = "_fromTemplate";
1320 var TEMPLATE_SKIP = (0, _symbol2.default)();
1321
1322 function useTemplate(ast, nodes) {
1323 ast = (0, _cloneDeep2.default)(ast);
1324 var _ast = ast,
1325 program = _ast.program;
1326
1327 if (nodes.length) {
1328 (0, _babelTraverse2.default)(ast, templateVisitor, null, nodes);
1329 }
1330
1331 if (program.body.length > 1) {
1332 return program.body;
1333 } else {
1334 return program.body[0];
1335 }
1336 }
1337
1338 var templateVisitor = {
1339 noScope: true,
1340
1341 enter: function enter(path, args) {
1342 var node = path.node;
1343
1344 if (node[TEMPLATE_SKIP]) return path.skip();
1345
1346 if (t.isExpressionStatement(node)) {
1347 node = node.expression;
1348 }
1349
1350 var replacement = void 0;
1351
1352 if (t.isIdentifier(node) && node[FROM_TEMPLATE]) {
1353 if ((0, _has2.default)(args[0], node.name)) {
1354 replacement = args[0][node.name];
1355 } else if (node.name[0] === "$") {
1356 var i = +node.name.slice(1);
1357 if (args[i]) replacement = args[i];
1358 }
1359 }
1360
1361 if (replacement === null) {
1362 path.remove();
1363 }
1364
1365 if (replacement) {
1366 replacement[TEMPLATE_SKIP] = true;
1367 path.replaceInline(replacement);
1368 }
1369 },
1370 exit: function exit(_ref) {
1371 var node = _ref.node;
1372
1373 if (!node.loc) _babelTraverse2.default.clearNode(node);
1374 }
1375 };
1376 module.exports = exports["default"];
1377
1378/***/ }),
1379/* 5 */
1380/***/ (function(module, exports) {
1381
1382 'use strict';
1383
1384 var core = module.exports = { version: '2.5.0' };
1385 if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
1386
1387/***/ }),
1388/* 6 */
1389/***/ (function(module, exports) {
1390
1391 "use strict";
1392
1393 /**
1394 * Checks if `value` is classified as an `Array` object.
1395 *
1396 * @static
1397 * @memberOf _
1398 * @since 0.1.0
1399 * @category Lang
1400 * @param {*} value The value to check.
1401 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1402 * @example
1403 *
1404 * _.isArray([1, 2, 3]);
1405 * // => true
1406 *
1407 * _.isArray(document.body.children);
1408 * // => false
1409 *
1410 * _.isArray('abc');
1411 * // => false
1412 *
1413 * _.isArray(_.noop);
1414 * // => false
1415 */
1416 var isArray = Array.isArray;
1417
1418 module.exports = isArray;
1419
1420/***/ }),
1421/* 7 */
1422/***/ (function(module, exports, __webpack_require__) {
1423
1424 "use strict";
1425
1426 exports.__esModule = true;
1427 exports.visitors = exports.Hub = exports.Scope = exports.NodePath = undefined;
1428
1429 var _getIterator2 = __webpack_require__(2);
1430
1431 var _getIterator3 = _interopRequireDefault(_getIterator2);
1432
1433 var _path = __webpack_require__(36);
1434
1435 Object.defineProperty(exports, "NodePath", {
1436 enumerable: true,
1437 get: function get() {
1438 return _interopRequireDefault(_path).default;
1439 }
1440 });
1441
1442 var _scope = __webpack_require__(134);
1443
1444 Object.defineProperty(exports, "Scope", {
1445 enumerable: true,
1446 get: function get() {
1447 return _interopRequireDefault(_scope).default;
1448 }
1449 });
1450
1451 var _hub = __webpack_require__(223);
1452
1453 Object.defineProperty(exports, "Hub", {
1454 enumerable: true,
1455 get: function get() {
1456 return _interopRequireDefault(_hub).default;
1457 }
1458 });
1459 exports.default = traverse;
1460
1461 var _context = __webpack_require__(367);
1462
1463 var _context2 = _interopRequireDefault(_context);
1464
1465 var _visitors = __webpack_require__(384);
1466
1467 var visitors = _interopRequireWildcard(_visitors);
1468
1469 var _babelMessages = __webpack_require__(20);
1470
1471 var messages = _interopRequireWildcard(_babelMessages);
1472
1473 var _includes = __webpack_require__(111);
1474
1475 var _includes2 = _interopRequireDefault(_includes);
1476
1477 var _babelTypes = __webpack_require__(1);
1478
1479 var t = _interopRequireWildcard(_babelTypes);
1480
1481 var _cache = __webpack_require__(88);
1482
1483 var cache = _interopRequireWildcard(_cache);
1484
1485 function _interopRequireWildcard(obj) {
1486 if (obj && obj.__esModule) {
1487 return obj;
1488 } else {
1489 var newObj = {};if (obj != null) {
1490 for (var key in obj) {
1491 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
1492 }
1493 }newObj.default = obj;return newObj;
1494 }
1495 }
1496
1497 function _interopRequireDefault(obj) {
1498 return obj && obj.__esModule ? obj : { default: obj };
1499 }
1500
1501 exports.visitors = visitors;
1502 function traverse(parent, opts, scope, state, parentPath) {
1503 if (!parent) return;
1504 if (!opts) opts = {};
1505
1506 if (!opts.noScope && !scope) {
1507 if (parent.type !== "Program" && parent.type !== "File") {
1508 throw new Error(messages.get("traverseNeedsParent", parent.type));
1509 }
1510 }
1511
1512 visitors.explode(opts);
1513
1514 traverse.node(parent, opts, scope, state, parentPath);
1515 }
1516
1517 traverse.visitors = visitors;
1518 traverse.verify = visitors.verify;
1519 traverse.explode = visitors.explode;
1520
1521 traverse.NodePath = __webpack_require__(36);
1522 traverse.Scope = __webpack_require__(134);
1523 traverse.Hub = __webpack_require__(223);
1524
1525 traverse.cheap = function (node, enter) {
1526 return t.traverseFast(node, enter);
1527 };
1528
1529 traverse.node = function (node, opts, scope, state, parentPath, skipKeys) {
1530 var keys = t.VISITOR_KEYS[node.type];
1531 if (!keys) return;
1532
1533 var context = new _context2.default(scope, opts, state, parentPath);
1534 for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
1535 var _ref;
1536
1537 if (_isArray) {
1538 if (_i >= _iterator.length) break;
1539 _ref = _iterator[_i++];
1540 } else {
1541 _i = _iterator.next();
1542 if (_i.done) break;
1543 _ref = _i.value;
1544 }
1545
1546 var key = _ref;
1547
1548 if (skipKeys && skipKeys[key]) continue;
1549 if (context.visit(node, key)) return;
1550 }
1551 };
1552
1553 traverse.clearNode = function (node, opts) {
1554 t.removeProperties(node, opts);
1555
1556 cache.path.delete(node);
1557 };
1558
1559 traverse.removeProperties = function (tree, opts) {
1560 t.traverseFast(tree, traverse.clearNode, opts);
1561 return tree;
1562 };
1563
1564 function hasBlacklistedType(path, state) {
1565 if (path.node.type === state.type) {
1566 state.has = true;
1567 path.stop();
1568 }
1569 }
1570
1571 traverse.hasType = function (tree, scope, type, blacklistTypes) {
1572 if ((0, _includes2.default)(blacklistTypes, tree.type)) return false;
1573
1574 if (tree.type === type) return true;
1575
1576 var state = {
1577 has: false,
1578 type: type
1579 };
1580
1581 traverse(tree, {
1582 blacklist: blacklistTypes,
1583 enter: hasBlacklistedType
1584 }, scope, state);
1585
1586 return state.has;
1587 };
1588
1589 traverse.clearCache = function () {
1590 cache.clear();
1591 };
1592
1593 traverse.clearCache.clearPath = cache.clearPath;
1594 traverse.clearCache.clearScope = cache.clearScope;
1595
1596 traverse.copyCache = function (source, destination) {
1597 if (cache.path.has(source)) {
1598 cache.path.set(destination, cache.path.get(source));
1599 }
1600 };
1601
1602/***/ }),
1603/* 8 */
1604/***/ (function(module, exports) {
1605
1606 'use strict';
1607
1608 // shim for using process in browser
1609 var process = module.exports = {};
1610
1611 // cached from whatever global is present so that test runners that stub it
1612 // don't break things. But we need to wrap it in a try catch in case it is
1613 // wrapped in strict mode code which doesn't define any globals. It's inside a
1614 // function because try/catches deoptimize in certain engines.
1615
1616 var cachedSetTimeout;
1617 var cachedClearTimeout;
1618
1619 function defaultSetTimout() {
1620 throw new Error('setTimeout has not been defined');
1621 }
1622 function defaultClearTimeout() {
1623 throw new Error('clearTimeout has not been defined');
1624 }
1625 (function () {
1626 try {
1627 if (typeof setTimeout === 'function') {
1628 cachedSetTimeout = setTimeout;
1629 } else {
1630 cachedSetTimeout = defaultSetTimout;
1631 }
1632 } catch (e) {
1633 cachedSetTimeout = defaultSetTimout;
1634 }
1635 try {
1636 if (typeof clearTimeout === 'function') {
1637 cachedClearTimeout = clearTimeout;
1638 } else {
1639 cachedClearTimeout = defaultClearTimeout;
1640 }
1641 } catch (e) {
1642 cachedClearTimeout = defaultClearTimeout;
1643 }
1644 })();
1645 function runTimeout(fun) {
1646 if (cachedSetTimeout === setTimeout) {
1647 //normal enviroments in sane situations
1648 return setTimeout(fun, 0);
1649 }
1650 // if setTimeout wasn't available but was latter defined
1651 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
1652 cachedSetTimeout = setTimeout;
1653 return setTimeout(fun, 0);
1654 }
1655 try {
1656 // when when somebody has screwed with setTimeout but no I.E. maddness
1657 return cachedSetTimeout(fun, 0);
1658 } catch (e) {
1659 try {
1660 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
1661 return cachedSetTimeout.call(null, fun, 0);
1662 } catch (e) {
1663 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
1664 return cachedSetTimeout.call(this, fun, 0);
1665 }
1666 }
1667 }
1668 function runClearTimeout(marker) {
1669 if (cachedClearTimeout === clearTimeout) {
1670 //normal enviroments in sane situations
1671 return clearTimeout(marker);
1672 }
1673 // if clearTimeout wasn't available but was latter defined
1674 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
1675 cachedClearTimeout = clearTimeout;
1676 return clearTimeout(marker);
1677 }
1678 try {
1679 // when when somebody has screwed with setTimeout but no I.E. maddness
1680 return cachedClearTimeout(marker);
1681 } catch (e) {
1682 try {
1683 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
1684 return cachedClearTimeout.call(null, marker);
1685 } catch (e) {
1686 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
1687 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
1688 return cachedClearTimeout.call(this, marker);
1689 }
1690 }
1691 }
1692 var queue = [];
1693 var draining = false;
1694 var currentQueue;
1695 var queueIndex = -1;
1696
1697 function cleanUpNextTick() {
1698 if (!draining || !currentQueue) {
1699 return;
1700 }
1701 draining = false;
1702 if (currentQueue.length) {
1703 queue = currentQueue.concat(queue);
1704 } else {
1705 queueIndex = -1;
1706 }
1707 if (queue.length) {
1708 drainQueue();
1709 }
1710 }
1711
1712 function drainQueue() {
1713 if (draining) {
1714 return;
1715 }
1716 var timeout = runTimeout(cleanUpNextTick);
1717 draining = true;
1718
1719 var len = queue.length;
1720 while (len) {
1721 currentQueue = queue;
1722 queue = [];
1723 while (++queueIndex < len) {
1724 if (currentQueue) {
1725 currentQueue[queueIndex].run();
1726 }
1727 }
1728 queueIndex = -1;
1729 len = queue.length;
1730 }
1731 currentQueue = null;
1732 draining = false;
1733 runClearTimeout(timeout);
1734 }
1735
1736 process.nextTick = function (fun) {
1737 var args = new Array(arguments.length - 1);
1738 if (arguments.length > 1) {
1739 for (var i = 1; i < arguments.length; i++) {
1740 args[i - 1] = arguments[i];
1741 }
1742 }
1743 queue.push(new Item(fun, args));
1744 if (queue.length === 1 && !draining) {
1745 runTimeout(drainQueue);
1746 }
1747 };
1748
1749 // v8 likes predictible objects
1750 function Item(fun, array) {
1751 this.fun = fun;
1752 this.array = array;
1753 }
1754 Item.prototype.run = function () {
1755 this.fun.apply(null, this.array);
1756 };
1757 process.title = 'browser';
1758 process.browser = true;
1759 process.env = {};
1760 process.argv = [];
1761 process.version = ''; // empty string to avoid regexp issues
1762 process.versions = {};
1763
1764 function noop() {}
1765
1766 process.on = noop;
1767 process.addListener = noop;
1768 process.once = noop;
1769 process.off = noop;
1770 process.removeListener = noop;
1771 process.removeAllListeners = noop;
1772 process.emit = noop;
1773 process.prependListener = noop;
1774 process.prependOnceListener = noop;
1775
1776 process.listeners = function (name) {
1777 return [];
1778 };
1779
1780 process.binding = function (name) {
1781 throw new Error('process.binding is not supported');
1782 };
1783
1784 process.cwd = function () {
1785 return '/';
1786 };
1787 process.chdir = function (dir) {
1788 throw new Error('process.chdir is not supported');
1789 };
1790 process.umask = function () {
1791 return 0;
1792 };
1793
1794/***/ }),
1795/* 9 */
1796/***/ (function(module, exports, __webpack_require__) {
1797
1798 "use strict";
1799
1800 module.exports = { "default": __webpack_require__(409), __esModule: true };
1801
1802/***/ }),
1803/* 10 */
1804/***/ (function(module, exports, __webpack_require__) {
1805
1806 "use strict";
1807
1808 module.exports = { "default": __webpack_require__(414), __esModule: true };
1809
1810/***/ }),
1811/* 11 */
1812/***/ (function(module, exports, __webpack_require__) {
1813
1814 "use strict";
1815
1816 var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1817
1818 exports.__esModule = true;
1819
1820 var _iterator = __webpack_require__(363);
1821
1822 var _iterator2 = _interopRequireDefault(_iterator);
1823
1824 var _symbol = __webpack_require__(10);
1825
1826 var _symbol2 = _interopRequireDefault(_symbol);
1827
1828 var _typeof = typeof _symbol2.default === "function" && _typeof2(_iterator2.default) === "symbol" ? function (obj) {
1829 return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
1830 } : function (obj) {
1831 return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
1832 };
1833
1834 function _interopRequireDefault(obj) {
1835 return obj && obj.__esModule ? obj : { default: obj };
1836 }
1837
1838 exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
1839 return typeof obj === "undefined" ? "undefined" : _typeof(obj);
1840 } : function (obj) {
1841 return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
1842 };
1843
1844/***/ }),
1845/* 12 */
1846/***/ (function(module, exports, __webpack_require__) {
1847
1848 'use strict';
1849
1850 var global = __webpack_require__(15);
1851 var core = __webpack_require__(5);
1852 var ctx = __webpack_require__(43);
1853 var hide = __webpack_require__(29);
1854 var PROTOTYPE = 'prototype';
1855
1856 var $export = function $export(type, name, source) {
1857 var IS_FORCED = type & $export.F;
1858 var IS_GLOBAL = type & $export.G;
1859 var IS_STATIC = type & $export.S;
1860 var IS_PROTO = type & $export.P;
1861 var IS_BIND = type & $export.B;
1862 var IS_WRAP = type & $export.W;
1863 var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
1864 var expProto = exports[PROTOTYPE];
1865 var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
1866 var key, own, out;
1867 if (IS_GLOBAL) source = name;
1868 for (key in source) {
1869 // contains in native
1870 own = !IS_FORCED && target && target[key] !== undefined;
1871 if (own && key in exports) continue;
1872 // export native or passed
1873 out = own ? target[key] : source[key];
1874 // prevent global pollution for namespaces
1875 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
1876 // bind timers to global for call from export context
1877 : IS_BIND && own ? ctx(out, global)
1878 // wrap global constructors for prevent change them in library
1879 : IS_WRAP && target[key] == out ? function (C) {
1880 var F = function F(a, b, c) {
1881 if (this instanceof C) {
1882 switch (arguments.length) {
1883 case 0:
1884 return new C();
1885 case 1:
1886 return new C(a);
1887 case 2:
1888 return new C(a, b);
1889 }return new C(a, b, c);
1890 }return C.apply(this, arguments);
1891 };
1892 F[PROTOTYPE] = C[PROTOTYPE];
1893 return F;
1894 // make static versions for prototype methods
1895 }(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
1896 // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
1897 if (IS_PROTO) {
1898 (exports.virtual || (exports.virtual = {}))[key] = out;
1899 // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
1900 if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
1901 }
1902 }
1903 };
1904 // type bitmap
1905 $export.F = 1; // forced
1906 $export.G = 2; // global
1907 $export.S = 4; // static
1908 $export.P = 8; // proto
1909 $export.B = 16; // bind
1910 $export.W = 32; // wrap
1911 $export.U = 64; // safe
1912 $export.R = 128; // real proto method for `library`
1913 module.exports = $export;
1914
1915/***/ }),
1916/* 13 */
1917/***/ (function(module, exports, __webpack_require__) {
1918
1919 'use strict';
1920
1921 var store = __webpack_require__(151)('wks');
1922 var uid = __webpack_require__(95);
1923 var _Symbol = __webpack_require__(15).Symbol;
1924 var USE_SYMBOL = typeof _Symbol == 'function';
1925
1926 var $exports = module.exports = function (name) {
1927 return store[name] || (store[name] = USE_SYMBOL && _Symbol[name] || (USE_SYMBOL ? _Symbol : uid)('Symbol.' + name));
1928 };
1929
1930 $exports.store = store;
1931
1932/***/ }),
1933/* 14 */
1934/***/ (function(module, exports, __webpack_require__) {
1935
1936 "use strict";
1937
1938 module.exports = { "default": __webpack_require__(411), __esModule: true };
1939
1940/***/ }),
1941/* 15 */
1942/***/ (function(module, exports) {
1943
1944 'use strict';
1945
1946 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
1947 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self
1948 // eslint-disable-next-line no-new-func
1949 : Function('return this')();
1950 if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
1951
1952/***/ }),
1953/* 16 */
1954/***/ (function(module, exports) {
1955
1956 'use strict';
1957
1958 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1959
1960 module.exports = function (it) {
1961 return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) === 'object' ? it !== null : typeof it === 'function';
1962 };
1963
1964/***/ }),
1965/* 17 */
1966/***/ (function(module, exports, __webpack_require__) {
1967
1968 'use strict';
1969
1970 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1971
1972 var freeGlobal = __webpack_require__(261);
1973
1974 /** Detect free variable `self`. */
1975 var freeSelf = (typeof self === 'undefined' ? 'undefined' : _typeof(self)) == 'object' && self && self.Object === Object && self;
1976
1977 /** Used as a reference to the global object. */
1978 var root = freeGlobal || freeSelf || Function('return this')();
1979
1980 module.exports = root;
1981
1982/***/ }),
1983/* 18 */
1984/***/ (function(module, exports) {
1985
1986 'use strict';
1987
1988 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1989
1990 /**
1991 * Checks if `value` is the
1992 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1993 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1994 *
1995 * @static
1996 * @memberOf _
1997 * @since 0.1.0
1998 * @category Lang
1999 * @param {*} value The value to check.
2000 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
2001 * @example
2002 *
2003 * _.isObject({});
2004 * // => true
2005 *
2006 * _.isObject([1, 2, 3]);
2007 * // => true
2008 *
2009 * _.isObject(_.noop);
2010 * // => true
2011 *
2012 * _.isObject(null);
2013 * // => false
2014 */
2015 function isObject(value) {
2016 var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
2017 return value != null && (type == 'object' || type == 'function');
2018 }
2019
2020 module.exports = isObject;
2021
2022/***/ }),
2023/* 19 */
2024/***/ (function(module, exports, __webpack_require__) {
2025
2026 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
2027
2028 // Copyright Joyent, Inc. and other Node contributors.
2029 //
2030 // Permission is hereby granted, free of charge, to any person obtaining a
2031 // copy of this software and associated documentation files (the
2032 // "Software"), to deal in the Software without restriction, including
2033 // without limitation the rights to use, copy, modify, merge, publish,
2034 // distribute, sublicense, and/or sell copies of the Software, and to permit
2035 // persons to whom the Software is furnished to do so, subject to the
2036 // following conditions:
2037 //
2038 // The above copyright notice and this permission notice shall be included
2039 // in all copies or substantial portions of the Software.
2040 //
2041 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2042 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2043 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
2044 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
2045 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
2046 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2047 // USE OR OTHER DEALINGS IN THE SOFTWARE.
2048
2049 // resolves . and .. elements in a path array with directory names there
2050 // must be no slashes, empty elements, or device names (c:\) in the array
2051 // (so also no leading and trailing slashes - it does not distinguish
2052 // relative and absolute paths)
2053 function normalizeArray(parts, allowAboveRoot) {
2054 // if the path tries to go above the root, `up` ends up > 0
2055 var up = 0;
2056 for (var i = parts.length - 1; i >= 0; i--) {
2057 var last = parts[i];
2058 if (last === '.') {
2059 parts.splice(i, 1);
2060 } else if (last === '..') {
2061 parts.splice(i, 1);
2062 up++;
2063 } else if (up) {
2064 parts.splice(i, 1);
2065 up--;
2066 }
2067 }
2068
2069 // if the path is allowed to go above the root, restore leading ..s
2070 if (allowAboveRoot) {
2071 for (; up--; up) {
2072 parts.unshift('..');
2073 }
2074 }
2075
2076 return parts;
2077 }
2078
2079 // Split a filename into [root, dir, basename, ext], unix version
2080 // 'root' is just a slash, or nothing.
2081 var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
2082 var splitPath = function splitPath(filename) {
2083 return splitPathRe.exec(filename).slice(1);
2084 };
2085
2086 // path.resolve([from ...], to)
2087 // posix version
2088 exports.resolve = function () {
2089 var resolvedPath = '',
2090 resolvedAbsolute = false;
2091
2092 for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
2093 var path = i >= 0 ? arguments[i] : process.cwd();
2094
2095 // Skip empty and invalid entries
2096 if (typeof path !== 'string') {
2097 throw new TypeError('Arguments to path.resolve must be strings');
2098 } else if (!path) {
2099 continue;
2100 }
2101
2102 resolvedPath = path + '/' + resolvedPath;
2103 resolvedAbsolute = path.charAt(0) === '/';
2104 }
2105
2106 // At this point the path should be resolved to a full absolute path, but
2107 // handle relative paths to be safe (might happen when process.cwd() fails)
2108
2109 // Normalize the path
2110 resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) {
2111 return !!p;
2112 }), !resolvedAbsolute).join('/');
2113
2114 return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
2115 };
2116
2117 // path.normalize(path)
2118 // posix version
2119 exports.normalize = function (path) {
2120 var isAbsolute = exports.isAbsolute(path),
2121 trailingSlash = substr(path, -1) === '/';
2122
2123 // Normalize the path
2124 path = normalizeArray(filter(path.split('/'), function (p) {
2125 return !!p;
2126 }), !isAbsolute).join('/');
2127
2128 if (!path && !isAbsolute) {
2129 path = '.';
2130 }
2131 if (path && trailingSlash) {
2132 path += '/';
2133 }
2134
2135 return (isAbsolute ? '/' : '') + path;
2136 };
2137
2138 // posix version
2139 exports.isAbsolute = function (path) {
2140 return path.charAt(0) === '/';
2141 };
2142
2143 // posix version
2144 exports.join = function () {
2145 var paths = Array.prototype.slice.call(arguments, 0);
2146 return exports.normalize(filter(paths, function (p, index) {
2147 if (typeof p !== 'string') {
2148 throw new TypeError('Arguments to path.join must be strings');
2149 }
2150 return p;
2151 }).join('/'));
2152 };
2153
2154 // path.relative(from, to)
2155 // posix version
2156 exports.relative = function (from, to) {
2157 from = exports.resolve(from).substr(1);
2158 to = exports.resolve(to).substr(1);
2159
2160 function trim(arr) {
2161 var start = 0;
2162 for (; start < arr.length; start++) {
2163 if (arr[start] !== '') break;
2164 }
2165
2166 var end = arr.length - 1;
2167 for (; end >= 0; end--) {
2168 if (arr[end] !== '') break;
2169 }
2170
2171 if (start > end) return [];
2172 return arr.slice(start, end - start + 1);
2173 }
2174
2175 var fromParts = trim(from.split('/'));
2176 var toParts = trim(to.split('/'));
2177
2178 var length = Math.min(fromParts.length, toParts.length);
2179 var samePartsLength = length;
2180 for (var i = 0; i < length; i++) {
2181 if (fromParts[i] !== toParts[i]) {
2182 samePartsLength = i;
2183 break;
2184 }
2185 }
2186
2187 var outputParts = [];
2188 for (var i = samePartsLength; i < fromParts.length; i++) {
2189 outputParts.push('..');
2190 }
2191
2192 outputParts = outputParts.concat(toParts.slice(samePartsLength));
2193
2194 return outputParts.join('/');
2195 };
2196
2197 exports.sep = '/';
2198 exports.delimiter = ':';
2199
2200 exports.dirname = function (path) {
2201 var result = splitPath(path),
2202 root = result[0],
2203 dir = result[1];
2204
2205 if (!root && !dir) {
2206 // No dirname whatsoever
2207 return '.';
2208 }
2209
2210 if (dir) {
2211 // It has a dirname, strip trailing slash
2212 dir = dir.substr(0, dir.length - 1);
2213 }
2214
2215 return root + dir;
2216 };
2217
2218 exports.basename = function (path, ext) {
2219 var f = splitPath(path)[2];
2220 // TODO: make this comparison case-insensitive on windows?
2221 if (ext && f.substr(-1 * ext.length) === ext) {
2222 f = f.substr(0, f.length - ext.length);
2223 }
2224 return f;
2225 };
2226
2227 exports.extname = function (path) {
2228 return splitPath(path)[3];
2229 };
2230
2231 function filter(xs, f) {
2232 if (xs.filter) return xs.filter(f);
2233 var res = [];
2234 for (var i = 0; i < xs.length; i++) {
2235 if (f(xs[i], i, xs)) res.push(xs[i]);
2236 }
2237 return res;
2238 }
2239
2240 // String.prototype.substr - negative index don't work in IE8
2241 var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) {
2242 return str.substr(start, len);
2243 } : function (str, start, len) {
2244 if (start < 0) start = str.length + start;
2245 return str.substr(start, len);
2246 };
2247 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
2248
2249/***/ }),
2250/* 20 */
2251/***/ (function(module, exports, __webpack_require__) {
2252
2253 "use strict";
2254
2255 exports.__esModule = true;
2256 exports.MESSAGES = undefined;
2257
2258 var _stringify = __webpack_require__(35);
2259
2260 var _stringify2 = _interopRequireDefault(_stringify);
2261
2262 exports.get = get;
2263 exports.parseArgs = parseArgs;
2264
2265 var _util = __webpack_require__(117);
2266
2267 var util = _interopRequireWildcard(_util);
2268
2269 function _interopRequireWildcard(obj) {
2270 if (obj && obj.__esModule) {
2271 return obj;
2272 } else {
2273 var newObj = {};if (obj != null) {
2274 for (var key in obj) {
2275 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
2276 }
2277 }newObj.default = obj;return newObj;
2278 }
2279 }
2280
2281 function _interopRequireDefault(obj) {
2282 return obj && obj.__esModule ? obj : { default: obj };
2283 }
2284
2285 var MESSAGES = exports.MESSAGES = {
2286 tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",
2287 classesIllegalBareSuper: "Illegal use of bare super",
2288 classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead",
2289 scopeDuplicateDeclaration: "Duplicate declaration $1",
2290 settersNoRest: "Setters aren't allowed to have a rest",
2291 noAssignmentsInForHead: "No assignments allowed in for-in/of head",
2292 expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier",
2293 invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue",
2294 readOnly: "$1 is read-only",
2295 unknownForHead: "Unknown node type $1 in ForStatement",
2296 didYouMean: "Did you mean $1?",
2297 codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",
2298 missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",
2299 unsupportedOutputType: "Unsupported output type $1",
2300 illegalMethodName: "Illegal method name $1",
2301 lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated",
2302
2303 modulesIllegalExportName: "Illegal export $1",
2304 modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes",
2305
2306 undeclaredVariable: "Reference to undeclared variable $1",
2307 undeclaredVariableType: "Referencing a type alias outside of a type annotation",
2308 undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?",
2309
2310 traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",
2311 traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",
2312 traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",
2313 traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type",
2314
2315 pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",
2316 pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3",
2317 pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",
2318 pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3"
2319 };
2320
2321 function get(key) {
2322 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2323 args[_key - 1] = arguments[_key];
2324 }
2325
2326 var msg = MESSAGES[key];
2327 if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key));
2328
2329 args = parseArgs(args);
2330
2331 return msg.replace(/\$(\d+)/g, function (str, i) {
2332 return args[i - 1];
2333 });
2334 }
2335
2336 function parseArgs(args) {
2337 return args.map(function (val) {
2338 if (val != null && val.inspect) {
2339 return val.inspect();
2340 } else {
2341 try {
2342 return (0, _stringify2.default)(val) || val + "";
2343 } catch (e) {
2344 return util.inspect(val);
2345 }
2346 }
2347 });
2348 }
2349
2350/***/ }),
2351/* 21 */
2352/***/ (function(module, exports, __webpack_require__) {
2353
2354 'use strict';
2355
2356 var isObject = __webpack_require__(16);
2357 module.exports = function (it) {
2358 if (!isObject(it)) throw TypeError(it + ' is not an object!');
2359 return it;
2360 };
2361
2362/***/ }),
2363/* 22 */
2364/***/ (function(module, exports, __webpack_require__) {
2365
2366 'use strict';
2367
2368 // Thank's IE8 for his funny defineProperty
2369 module.exports = !__webpack_require__(27)(function () {
2370 return Object.defineProperty({}, 'a', { get: function get() {
2371 return 7;
2372 } }).a != 7;
2373 });
2374
2375/***/ }),
2376/* 23 */
2377/***/ (function(module, exports, __webpack_require__) {
2378
2379 'use strict';
2380
2381 var anObject = __webpack_require__(21);
2382 var IE8_DOM_DEFINE = __webpack_require__(231);
2383 var toPrimitive = __webpack_require__(154);
2384 var dP = Object.defineProperty;
2385
2386 exports.f = __webpack_require__(22) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
2387 anObject(O);
2388 P = toPrimitive(P, true);
2389 anObject(Attributes);
2390 if (IE8_DOM_DEFINE) try {
2391 return dP(O, P, Attributes);
2392 } catch (e) {/* empty */}
2393 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
2394 if ('value' in Attributes) O[P] = Attributes.value;
2395 return O;
2396 };
2397
2398/***/ }),
2399/* 24 */
2400/***/ (function(module, exports, __webpack_require__) {
2401
2402 'use strict';
2403
2404 var isFunction = __webpack_require__(175),
2405 isLength = __webpack_require__(176);
2406
2407 /**
2408 * Checks if `value` is array-like. A value is considered array-like if it's
2409 * not a function and has a `value.length` that's an integer greater than or
2410 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
2411 *
2412 * @static
2413 * @memberOf _
2414 * @since 4.0.0
2415 * @category Lang
2416 * @param {*} value The value to check.
2417 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
2418 * @example
2419 *
2420 * _.isArrayLike([1, 2, 3]);
2421 * // => true
2422 *
2423 * _.isArrayLike(document.body.children);
2424 * // => true
2425 *
2426 * _.isArrayLike('abc');
2427 * // => true
2428 *
2429 * _.isArrayLike(_.noop);
2430 * // => false
2431 */
2432 function isArrayLike(value) {
2433 return value != null && isLength(value.length) && !isFunction(value);
2434 }
2435
2436 module.exports = isArrayLike;
2437
2438/***/ }),
2439/* 25 */
2440/***/ (function(module, exports) {
2441
2442 'use strict';
2443
2444 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2445
2446 /**
2447 * Checks if `value` is object-like. A value is object-like if it's not `null`
2448 * and has a `typeof` result of "object".
2449 *
2450 * @static
2451 * @memberOf _
2452 * @since 4.0.0
2453 * @category Lang
2454 * @param {*} value The value to check.
2455 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2456 * @example
2457 *
2458 * _.isObjectLike({});
2459 * // => true
2460 *
2461 * _.isObjectLike([1, 2, 3]);
2462 * // => true
2463 *
2464 * _.isObjectLike(_.noop);
2465 * // => false
2466 *
2467 * _.isObjectLike(null);
2468 * // => false
2469 */
2470 function isObjectLike(value) {
2471 return value != null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object';
2472 }
2473
2474 module.exports = isObjectLike;
2475
2476/***/ }),
2477/* 26 */
2478/***/ (function(module, exports, __webpack_require__) {
2479
2480 "use strict";
2481
2482 exports.__esModule = true;
2483 exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = undefined;
2484
2485 var _getIterator2 = __webpack_require__(2);
2486
2487 var _getIterator3 = _interopRequireDefault(_getIterator2);
2488
2489 var _stringify = __webpack_require__(35);
2490
2491 var _stringify2 = _interopRequireDefault(_stringify);
2492
2493 var _typeof2 = __webpack_require__(11);
2494
2495 var _typeof3 = _interopRequireDefault(_typeof2);
2496
2497 exports.assertEach = assertEach;
2498 exports.assertOneOf = assertOneOf;
2499 exports.assertNodeType = assertNodeType;
2500 exports.assertNodeOrValueType = assertNodeOrValueType;
2501 exports.assertValueType = assertValueType;
2502 exports.chain = chain;
2503 exports.default = defineType;
2504
2505 var _index = __webpack_require__(1);
2506
2507 var t = _interopRequireWildcard(_index);
2508
2509 function _interopRequireWildcard(obj) {
2510 if (obj && obj.__esModule) {
2511 return obj;
2512 } else {
2513 var newObj = {};if (obj != null) {
2514 for (var key in obj) {
2515 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
2516 }
2517 }newObj.default = obj;return newObj;
2518 }
2519 }
2520
2521 function _interopRequireDefault(obj) {
2522 return obj && obj.__esModule ? obj : { default: obj };
2523 }
2524
2525 var VISITOR_KEYS = exports.VISITOR_KEYS = {};
2526 var ALIAS_KEYS = exports.ALIAS_KEYS = {};
2527 var NODE_FIELDS = exports.NODE_FIELDS = {};
2528 var BUILDER_KEYS = exports.BUILDER_KEYS = {};
2529 var DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {};
2530
2531 function getType(val) {
2532 if (Array.isArray(val)) {
2533 return "array";
2534 } else if (val === null) {
2535 return "null";
2536 } else if (val === undefined) {
2537 return "undefined";
2538 } else {
2539 return typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val);
2540 }
2541 }
2542
2543 function assertEach(callback) {
2544 function validator(node, key, val) {
2545 if (!Array.isArray(val)) return;
2546
2547 for (var i = 0; i < val.length; i++) {
2548 callback(node, key + "[" + i + "]", val[i]);
2549 }
2550 }
2551 validator.each = callback;
2552 return validator;
2553 }
2554
2555 function assertOneOf() {
2556 for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) {
2557 vals[_key] = arguments[_key];
2558 }
2559
2560 function validate(node, key, val) {
2561 if (vals.indexOf(val) < 0) {
2562 throw new TypeError("Property " + key + " expected value to be one of " + (0, _stringify2.default)(vals) + " but got " + (0, _stringify2.default)(val));
2563 }
2564 }
2565
2566 validate.oneOf = vals;
2567
2568 return validate;
2569 }
2570
2571 function assertNodeType() {
2572 for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2573 types[_key2] = arguments[_key2];
2574 }
2575
2576 function validate(node, key, val) {
2577 var valid = false;
2578
2579 for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
2580 var _ref;
2581
2582 if (_isArray) {
2583 if (_i >= _iterator.length) break;
2584 _ref = _iterator[_i++];
2585 } else {
2586 _i = _iterator.next();
2587 if (_i.done) break;
2588 _ref = _i.value;
2589 }
2590
2591 var type = _ref;
2592
2593 if (t.is(type, val)) {
2594 valid = true;
2595 break;
2596 }
2597 }
2598
2599 if (!valid) {
2600 throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type)));
2601 }
2602 }
2603
2604 validate.oneOfNodeTypes = types;
2605
2606 return validate;
2607 }
2608
2609 function assertNodeOrValueType() {
2610 for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2611 types[_key3] = arguments[_key3];
2612 }
2613
2614 function validate(node, key, val) {
2615 var valid = false;
2616
2617 for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
2618 var _ref2;
2619
2620 if (_isArray2) {
2621 if (_i2 >= _iterator2.length) break;
2622 _ref2 = _iterator2[_i2++];
2623 } else {
2624 _i2 = _iterator2.next();
2625 if (_i2.done) break;
2626 _ref2 = _i2.value;
2627 }
2628
2629 var type = _ref2;
2630
2631 if (getType(val) === type || t.is(type, val)) {
2632 valid = true;
2633 break;
2634 }
2635 }
2636
2637 if (!valid) {
2638 throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type)));
2639 }
2640 }
2641
2642 validate.oneOfNodeOrValueTypes = types;
2643
2644 return validate;
2645 }
2646
2647 function assertValueType(type) {
2648 function validate(node, key, val) {
2649 var valid = getType(val) === type;
2650
2651 if (!valid) {
2652 throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val));
2653 }
2654 }
2655
2656 validate.type = type;
2657
2658 return validate;
2659 }
2660
2661 function chain() {
2662 for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2663 fns[_key4] = arguments[_key4];
2664 }
2665
2666 function validate() {
2667 for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
2668 var _ref3;
2669
2670 if (_isArray3) {
2671 if (_i3 >= _iterator3.length) break;
2672 _ref3 = _iterator3[_i3++];
2673 } else {
2674 _i3 = _iterator3.next();
2675 if (_i3.done) break;
2676 _ref3 = _i3.value;
2677 }
2678
2679 var fn = _ref3;
2680
2681 fn.apply(undefined, arguments);
2682 }
2683 }
2684 validate.chainOf = fns;
2685 return validate;
2686 }
2687
2688 function defineType(type) {
2689 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2690
2691 var inherits = opts.inherits && store[opts.inherits] || {};
2692
2693 opts.fields = opts.fields || inherits.fields || {};
2694 opts.visitor = opts.visitor || inherits.visitor || [];
2695 opts.aliases = opts.aliases || inherits.aliases || [];
2696 opts.builder = opts.builder || inherits.builder || opts.visitor || [];
2697
2698 if (opts.deprecatedAlias) {
2699 DEPRECATED_KEYS[opts.deprecatedAlias] = type;
2700 }
2701
2702 for (var _iterator4 = opts.visitor.concat(opts.builder), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
2703 var _ref4;
2704
2705 if (_isArray4) {
2706 if (_i4 >= _iterator4.length) break;
2707 _ref4 = _iterator4[_i4++];
2708 } else {
2709 _i4 = _iterator4.next();
2710 if (_i4.done) break;
2711 _ref4 = _i4.value;
2712 }
2713
2714 var _key5 = _ref4;
2715
2716 opts.fields[_key5] = opts.fields[_key5] || {};
2717 }
2718
2719 for (var key in opts.fields) {
2720 var field = opts.fields[key];
2721
2722 if (opts.builder.indexOf(key) === -1) {
2723 field.optional = true;
2724 }
2725 if (field.default === undefined) {
2726 field.default = null;
2727 } else if (!field.validate) {
2728 field.validate = assertValueType(getType(field.default));
2729 }
2730 }
2731
2732 VISITOR_KEYS[type] = opts.visitor;
2733 BUILDER_KEYS[type] = opts.builder;
2734 NODE_FIELDS[type] = opts.fields;
2735 ALIAS_KEYS[type] = opts.aliases;
2736
2737 store[type] = opts;
2738 }
2739
2740 var store = {};
2741
2742/***/ }),
2743/* 27 */
2744/***/ (function(module, exports) {
2745
2746 "use strict";
2747
2748 module.exports = function (exec) {
2749 try {
2750 return !!exec();
2751 } catch (e) {
2752 return true;
2753 }
2754 };
2755
2756/***/ }),
2757/* 28 */
2758/***/ (function(module, exports) {
2759
2760 "use strict";
2761
2762 var hasOwnProperty = {}.hasOwnProperty;
2763 module.exports = function (it, key) {
2764 return hasOwnProperty.call(it, key);
2765 };
2766
2767/***/ }),
2768/* 29 */
2769/***/ (function(module, exports, __webpack_require__) {
2770
2771 'use strict';
2772
2773 var dP = __webpack_require__(23);
2774 var createDesc = __webpack_require__(92);
2775 module.exports = __webpack_require__(22) ? function (object, key, value) {
2776 return dP.f(object, key, createDesc(1, value));
2777 } : function (object, key, value) {
2778 object[key] = value;
2779 return object;
2780 };
2781
2782/***/ }),
2783/* 30 */
2784/***/ (function(module, exports, __webpack_require__) {
2785
2786 'use strict';
2787
2788 var _Symbol = __webpack_require__(45),
2789 getRawTag = __webpack_require__(534),
2790 objectToString = __webpack_require__(559);
2791
2792 /** `Object#toString` result references. */
2793 var nullTag = '[object Null]',
2794 undefinedTag = '[object Undefined]';
2795
2796 /** Built-in value references. */
2797 var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
2798
2799 /**
2800 * The base implementation of `getTag` without fallbacks for buggy environments.
2801 *
2802 * @private
2803 * @param {*} value The value to query.
2804 * @returns {string} Returns the `toStringTag`.
2805 */
2806 function baseGetTag(value) {
2807 if (value == null) {
2808 return value === undefined ? undefinedTag : nullTag;
2809 }
2810 return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
2811 }
2812
2813 module.exports = baseGetTag;
2814
2815/***/ }),
2816/* 31 */
2817/***/ (function(module, exports, __webpack_require__) {
2818
2819 'use strict';
2820
2821 var assignValue = __webpack_require__(162),
2822 baseAssignValue = __webpack_require__(163);
2823
2824 /**
2825 * Copies properties of `source` to `object`.
2826 *
2827 * @private
2828 * @param {Object} source The object to copy properties from.
2829 * @param {Array} props The property identifiers to copy.
2830 * @param {Object} [object={}] The object to copy properties to.
2831 * @param {Function} [customizer] The function to customize copied values.
2832 * @returns {Object} Returns `object`.
2833 */
2834 function copyObject(source, props, object, customizer) {
2835 var isNew = !object;
2836 object || (object = {});
2837
2838 var index = -1,
2839 length = props.length;
2840
2841 while (++index < length) {
2842 var key = props[index];
2843
2844 var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
2845
2846 if (newValue === undefined) {
2847 newValue = source[key];
2848 }
2849 if (isNew) {
2850 baseAssignValue(object, key, newValue);
2851 } else {
2852 assignValue(object, key, newValue);
2853 }
2854 }
2855 return object;
2856 }
2857
2858 module.exports = copyObject;
2859
2860/***/ }),
2861/* 32 */
2862/***/ (function(module, exports, __webpack_require__) {
2863
2864 'use strict';
2865
2866 var arrayLikeKeys = __webpack_require__(245),
2867 baseKeys = __webpack_require__(500),
2868 isArrayLike = __webpack_require__(24);
2869
2870 /**
2871 * Creates an array of the own enumerable property names of `object`.
2872 *
2873 * **Note:** Non-object values are coerced to objects. See the
2874 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
2875 * for more details.
2876 *
2877 * @static
2878 * @since 0.1.0
2879 * @memberOf _
2880 * @category Object
2881 * @param {Object} object The object to query.
2882 * @returns {Array} Returns the array of property names.
2883 * @example
2884 *
2885 * function Foo() {
2886 * this.a = 1;
2887 * this.b = 2;
2888 * }
2889 *
2890 * Foo.prototype.c = 3;
2891 *
2892 * _.keys(new Foo);
2893 * // => ['a', 'b'] (iteration order is not guaranteed)
2894 *
2895 * _.keys('hi');
2896 * // => ['0', '1']
2897 */
2898 function keys(object) {
2899 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
2900 }
2901
2902 module.exports = keys;
2903
2904/***/ }),
2905/* 33 */
2906/***/ (function(module, exports) {
2907
2908 "use strict";
2909
2910 module.exports = {
2911 filename: {
2912 type: "filename",
2913 description: "filename to use when reading from stdin - this will be used in source-maps, errors etc",
2914 default: "unknown",
2915 shorthand: "f"
2916 },
2917
2918 filenameRelative: {
2919 hidden: true,
2920 type: "string"
2921 },
2922
2923 inputSourceMap: {
2924 hidden: true
2925 },
2926
2927 env: {
2928 hidden: true,
2929 default: {}
2930 },
2931
2932 mode: {
2933 description: "",
2934 hidden: true
2935 },
2936
2937 retainLines: {
2938 type: "boolean",
2939 default: false,
2940 description: "retain line numbers - will result in really ugly code"
2941 },
2942
2943 highlightCode: {
2944 description: "enable/disable ANSI syntax highlighting of code frames (on by default)",
2945 type: "boolean",
2946 default: true
2947 },
2948
2949 suppressDeprecationMessages: {
2950 type: "boolean",
2951 default: false,
2952 hidden: true
2953 },
2954
2955 presets: {
2956 type: "list",
2957 description: "",
2958 default: []
2959 },
2960
2961 plugins: {
2962 type: "list",
2963 default: [],
2964 description: ""
2965 },
2966
2967 ignore: {
2968 type: "list",
2969 description: "list of glob paths to **not** compile",
2970 default: []
2971 },
2972
2973 only: {
2974 type: "list",
2975 description: "list of glob paths to **only** compile"
2976 },
2977
2978 code: {
2979 hidden: true,
2980 default: true,
2981 type: "boolean"
2982 },
2983
2984 metadata: {
2985 hidden: true,
2986 default: true,
2987 type: "boolean"
2988 },
2989
2990 ast: {
2991 hidden: true,
2992 default: true,
2993 type: "boolean"
2994 },
2995
2996 extends: {
2997 type: "string",
2998 hidden: true
2999 },
3000
3001 comments: {
3002 type: "boolean",
3003 default: true,
3004 description: "write comments to generated output (true by default)"
3005 },
3006
3007 shouldPrintComment: {
3008 hidden: true,
3009 description: "optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"
3010 },
3011
3012 wrapPluginVisitorMethod: {
3013 hidden: true,
3014 description: "optional callback to wrap all visitor methods"
3015 },
3016
3017 compact: {
3018 type: "booleanString",
3019 default: "auto",
3020 description: "do not include superfluous whitespace characters and line terminators [true|false|auto]"
3021 },
3022
3023 minified: {
3024 type: "boolean",
3025 default: false,
3026 description: "save as much bytes when printing [true|false]"
3027 },
3028
3029 sourceMap: {
3030 alias: "sourceMaps",
3031 hidden: true
3032 },
3033
3034 sourceMaps: {
3035 type: "booleanString",
3036 description: "[true|false|inline]",
3037 default: false,
3038 shorthand: "s"
3039 },
3040
3041 sourceMapTarget: {
3042 type: "string",
3043 description: "set `file` on returned source map"
3044 },
3045
3046 sourceFileName: {
3047 type: "string",
3048 description: "set `sources[0]` on returned source map"
3049 },
3050
3051 sourceRoot: {
3052 type: "filename",
3053 description: "the root from which all sources are relative"
3054 },
3055
3056 babelrc: {
3057 description: "Whether or not to look up .babelrc and .babelignore files",
3058 type: "boolean",
3059 default: true
3060 },
3061
3062 sourceType: {
3063 description: "",
3064 default: "module"
3065 },
3066
3067 auxiliaryCommentBefore: {
3068 type: "string",
3069 description: "print a comment before any injected non-user code"
3070 },
3071
3072 auxiliaryCommentAfter: {
3073 type: "string",
3074 description: "print a comment after any injected non-user code"
3075 },
3076
3077 resolveModuleSource: {
3078 hidden: true
3079 },
3080
3081 getModuleId: {
3082 hidden: true
3083 },
3084
3085 moduleRoot: {
3086 type: "filename",
3087 description: "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"
3088 },
3089
3090 moduleIds: {
3091 type: "boolean",
3092 default: false,
3093 shorthand: "M",
3094 description: "insert an explicit id for modules"
3095 },
3096
3097 moduleId: {
3098 description: "specify a custom name for module ids",
3099 type: "string"
3100 },
3101
3102 passPerPreset: {
3103 description: "Whether to spawn a traversal pass per a preset. By default all presets are merged.",
3104 type: "boolean",
3105 default: false,
3106 hidden: true
3107 },
3108
3109 parserOpts: {
3110 description: "Options to pass into the parser, or to change parsers (parserOpts.parser)",
3111 default: false
3112 },
3113
3114 generatorOpts: {
3115 description: "Options to pass into the generator, or to change generators (generatorOpts.generator)",
3116 default: false
3117 }
3118 };
3119
3120/***/ }),
3121/* 34 */
3122/***/ (function(module, exports, __webpack_require__) {
3123
3124 /* WEBPACK VAR INJECTION */(function(process) {"use strict";
3125
3126 exports.__esModule = true;
3127
3128 var _objectWithoutProperties2 = __webpack_require__(366);
3129
3130 var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
3131
3132 var _stringify = __webpack_require__(35);
3133
3134 var _stringify2 = _interopRequireDefault(_stringify);
3135
3136 var _assign = __webpack_require__(87);
3137
3138 var _assign2 = _interopRequireDefault(_assign);
3139
3140 var _getIterator2 = __webpack_require__(2);
3141
3142 var _getIterator3 = _interopRequireDefault(_getIterator2);
3143
3144 var _typeof2 = __webpack_require__(11);
3145
3146 var _typeof3 = _interopRequireDefault(_typeof2);
3147
3148 var _classCallCheck2 = __webpack_require__(3);
3149
3150 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
3151
3152 var _node = __webpack_require__(182);
3153
3154 var context = _interopRequireWildcard(_node);
3155
3156 var _plugin2 = __webpack_require__(65);
3157
3158 var _plugin3 = _interopRequireDefault(_plugin2);
3159
3160 var _babelMessages = __webpack_require__(20);
3161
3162 var messages = _interopRequireWildcard(_babelMessages);
3163
3164 var _index = __webpack_require__(52);
3165
3166 var _resolvePlugin = __webpack_require__(184);
3167
3168 var _resolvePlugin2 = _interopRequireDefault(_resolvePlugin);
3169
3170 var _resolvePreset = __webpack_require__(185);
3171
3172 var _resolvePreset2 = _interopRequireDefault(_resolvePreset);
3173
3174 var _cloneDeepWith = __webpack_require__(575);
3175
3176 var _cloneDeepWith2 = _interopRequireDefault(_cloneDeepWith);
3177
3178 var _clone = __webpack_require__(109);
3179
3180 var _clone2 = _interopRequireDefault(_clone);
3181
3182 var _merge = __webpack_require__(293);
3183
3184 var _merge2 = _interopRequireDefault(_merge);
3185
3186 var _config2 = __webpack_require__(33);
3187
3188 var _config3 = _interopRequireDefault(_config2);
3189
3190 var _removed = __webpack_require__(54);
3191
3192 var _removed2 = _interopRequireDefault(_removed);
3193
3194 var _buildConfigChain = __webpack_require__(51);
3195
3196 var _buildConfigChain2 = _interopRequireDefault(_buildConfigChain);
3197
3198 var _path = __webpack_require__(19);
3199
3200 var _path2 = _interopRequireDefault(_path);
3201
3202 function _interopRequireWildcard(obj) {
3203 if (obj && obj.__esModule) {
3204 return obj;
3205 } else {
3206 var newObj = {};if (obj != null) {
3207 for (var key in obj) {
3208 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
3209 }
3210 }newObj.default = obj;return newObj;
3211 }
3212 }
3213
3214 function _interopRequireDefault(obj) {
3215 return obj && obj.__esModule ? obj : { default: obj };
3216 }
3217
3218 var OptionManager = function () {
3219 function OptionManager(log) {
3220 (0, _classCallCheck3.default)(this, OptionManager);
3221
3222 this.resolvedConfigs = [];
3223 this.options = OptionManager.createBareOptions();
3224 this.log = log;
3225 }
3226
3227 OptionManager.memoisePluginContainer = function memoisePluginContainer(fn, loc, i, alias) {
3228 for (var _iterator = OptionManager.memoisedPlugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
3229 var _ref;
3230
3231 if (_isArray) {
3232 if (_i >= _iterator.length) break;
3233 _ref = _iterator[_i++];
3234 } else {
3235 _i = _iterator.next();
3236 if (_i.done) break;
3237 _ref = _i.value;
3238 }
3239
3240 var cache = _ref;
3241
3242 if (cache.container === fn) return cache.plugin;
3243 }
3244
3245 var obj = void 0;
3246
3247 if (typeof fn === "function") {
3248 obj = fn(context);
3249 } else {
3250 obj = fn;
3251 }
3252
3253 if ((typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) === "object") {
3254 var _plugin = new _plugin3.default(obj, alias);
3255 OptionManager.memoisedPlugins.push({
3256 container: fn,
3257 plugin: _plugin
3258 });
3259 return _plugin;
3260 } else {
3261 throw new TypeError(messages.get("pluginNotObject", loc, i, typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) + loc + i);
3262 }
3263 };
3264
3265 OptionManager.createBareOptions = function createBareOptions() {
3266 var opts = {};
3267
3268 for (var _key in _config3.default) {
3269 var opt = _config3.default[_key];
3270 opts[_key] = (0, _clone2.default)(opt.default);
3271 }
3272
3273 return opts;
3274 };
3275
3276 OptionManager.normalisePlugin = function normalisePlugin(plugin, loc, i, alias) {
3277 plugin = plugin.__esModule ? plugin.default : plugin;
3278
3279 if (!(plugin instanceof _plugin3.default)) {
3280 if (typeof plugin === "function" || (typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)) === "object") {
3281 plugin = OptionManager.memoisePluginContainer(plugin, loc, i, alias);
3282 } else {
3283 throw new TypeError(messages.get("pluginNotFunction", loc, i, typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)));
3284 }
3285 }
3286
3287 plugin.init(loc, i);
3288
3289 return plugin;
3290 };
3291
3292 OptionManager.normalisePlugins = function normalisePlugins(loc, dirname, plugins) {
3293 return plugins.map(function (val, i) {
3294 var plugin = void 0,
3295 options = void 0;
3296
3297 if (!val) {
3298 throw new TypeError("Falsy value found in plugins");
3299 }
3300
3301 if (Array.isArray(val)) {
3302 plugin = val[0];
3303 options = val[1];
3304 } else {
3305 plugin = val;
3306 }
3307
3308 var alias = typeof plugin === "string" ? plugin : loc + "$" + i;
3309
3310 if (typeof plugin === "string") {
3311 var pluginLoc = (0, _resolvePlugin2.default)(plugin, dirname);
3312 if (pluginLoc) {
3313 plugin = __webpack_require__(179)(pluginLoc);
3314 } else {
3315 throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
3316 }
3317 }
3318
3319 plugin = OptionManager.normalisePlugin(plugin, loc, i, alias);
3320
3321 return [plugin, options];
3322 });
3323 };
3324
3325 OptionManager.prototype.mergeOptions = function mergeOptions(_ref2) {
3326 var _this = this;
3327
3328 var rawOpts = _ref2.options,
3329 extendingOpts = _ref2.extending,
3330 alias = _ref2.alias,
3331 loc = _ref2.loc,
3332 dirname = _ref2.dirname;
3333
3334 alias = alias || "foreign";
3335 if (!rawOpts) return;
3336
3337 if ((typeof rawOpts === "undefined" ? "undefined" : (0, _typeof3.default)(rawOpts)) !== "object" || Array.isArray(rawOpts)) {
3338 this.log.error("Invalid options type for " + alias, TypeError);
3339 }
3340
3341 var opts = (0, _cloneDeepWith2.default)(rawOpts, function (val) {
3342 if (val instanceof _plugin3.default) {
3343 return val;
3344 }
3345 });
3346
3347 dirname = dirname || process.cwd();
3348 loc = loc || alias;
3349
3350 for (var _key2 in opts) {
3351 var option = _config3.default[_key2];
3352
3353 if (!option && this.log) {
3354 if (_removed2.default[_key2]) {
3355 this.log.error("Using removed Babel 5 option: " + alias + "." + _key2 + " - " + _removed2.default[_key2].message, ReferenceError);
3356 } else {
3357 var unknownOptErr = "Unknown option: " + alias + "." + _key2 + ". Check out http://babeljs.io/docs/usage/options/ for more information about options.";
3358 var presetConfigErr = "A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.";
3359
3360 this.log.error(unknownOptErr + "\n\n" + presetConfigErr, ReferenceError);
3361 }
3362 }
3363 }
3364
3365 (0, _index.normaliseOptions)(opts);
3366
3367 if (opts.plugins) {
3368 opts.plugins = OptionManager.normalisePlugins(loc, dirname, opts.plugins);
3369 }
3370
3371 if (opts.presets) {
3372 if (opts.passPerPreset) {
3373 opts.presets = this.resolvePresets(opts.presets, dirname, function (preset, presetLoc) {
3374 _this.mergeOptions({
3375 options: preset,
3376 extending: preset,
3377 alias: presetLoc,
3378 loc: presetLoc,
3379 dirname: dirname
3380 });
3381 });
3382 } else {
3383 this.mergePresets(opts.presets, dirname);
3384 delete opts.presets;
3385 }
3386 }
3387
3388 if (rawOpts === extendingOpts) {
3389 (0, _assign2.default)(extendingOpts, opts);
3390 } else {
3391 (0, _merge2.default)(extendingOpts || this.options, opts);
3392 }
3393 };
3394
3395 OptionManager.prototype.mergePresets = function mergePresets(presets, dirname) {
3396 var _this2 = this;
3397
3398 this.resolvePresets(presets, dirname, function (presetOpts, presetLoc) {
3399 _this2.mergeOptions({
3400 options: presetOpts,
3401 alias: presetLoc,
3402 loc: presetLoc,
3403 dirname: _path2.default.dirname(presetLoc || "")
3404 });
3405 });
3406 };
3407
3408 OptionManager.prototype.resolvePresets = function resolvePresets(presets, dirname, onResolve) {
3409 return presets.map(function (val) {
3410 var options = void 0;
3411 if (Array.isArray(val)) {
3412 if (val.length > 2) {
3413 throw new Error("Unexpected extra options " + (0, _stringify2.default)(val.slice(2)) + " passed to preset.");
3414 }
3415
3416 var _val = val;
3417 val = _val[0];
3418 options = _val[1];
3419 }
3420
3421 var presetLoc = void 0;
3422 try {
3423 if (typeof val === "string") {
3424 presetLoc = (0, _resolvePreset2.default)(val, dirname);
3425
3426 if (!presetLoc) {
3427 throw new Error("Couldn't find preset " + (0, _stringify2.default)(val) + " relative to directory " + (0, _stringify2.default)(dirname));
3428 }
3429
3430 val = __webpack_require__(179)(presetLoc);
3431 }
3432
3433 if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.__esModule) {
3434 if (val.default) {
3435 val = val.default;
3436 } else {
3437 var _val2 = val,
3438 __esModule = _val2.__esModule,
3439 rest = (0, _objectWithoutProperties3.default)(_val2, ["__esModule"]);
3440
3441 val = rest;
3442 }
3443 }
3444
3445 if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.buildPreset) val = val.buildPreset;
3446
3447 if (typeof val !== "function" && options !== undefined) {
3448 throw new Error("Options " + (0, _stringify2.default)(options) + " passed to " + (presetLoc || "a preset") + " which does not accept options.");
3449 }
3450
3451 if (typeof val === "function") val = val(context, options, { dirname: dirname });
3452
3453 if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) !== "object") {
3454 throw new Error("Unsupported preset format: " + val + ".");
3455 }
3456
3457 onResolve && onResolve(val, presetLoc);
3458 } catch (e) {
3459 if (presetLoc) {
3460 e.message += " (While processing preset: " + (0, _stringify2.default)(presetLoc) + ")";
3461 }
3462 throw e;
3463 }
3464 return val;
3465 });
3466 };
3467
3468 OptionManager.prototype.normaliseOptions = function normaliseOptions() {
3469 var opts = this.options;
3470
3471 for (var _key3 in _config3.default) {
3472 var option = _config3.default[_key3];
3473 var val = opts[_key3];
3474
3475 if (!val && option.optional) continue;
3476
3477 if (option.alias) {
3478 opts[option.alias] = opts[option.alias] || val;
3479 } else {
3480 opts[_key3] = val;
3481 }
3482 }
3483 };
3484
3485 OptionManager.prototype.init = function init() {
3486 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3487
3488 for (var _iterator2 = (0, _buildConfigChain2.default)(opts, this.log), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
3489 var _ref3;
3490
3491 if (_isArray2) {
3492 if (_i2 >= _iterator2.length) break;
3493 _ref3 = _iterator2[_i2++];
3494 } else {
3495 _i2 = _iterator2.next();
3496 if (_i2.done) break;
3497 _ref3 = _i2.value;
3498 }
3499
3500 var _config = _ref3;
3501
3502 this.mergeOptions(_config);
3503 }
3504
3505 this.normaliseOptions(opts);
3506
3507 return this.options;
3508 };
3509
3510 return OptionManager;
3511 }();
3512
3513 exports.default = OptionManager;
3514
3515 OptionManager.memoisedPlugins = [];
3516 module.exports = exports["default"];
3517 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
3518
3519/***/ }),
3520/* 35 */
3521/***/ (function(module, exports, __webpack_require__) {
3522
3523 "use strict";
3524
3525 module.exports = { "default": __webpack_require__(405), __esModule: true };
3526
3527/***/ }),
3528/* 36 */
3529/***/ (function(module, exports, __webpack_require__) {
3530
3531 "use strict";
3532
3533 exports.__esModule = true;
3534
3535 var _getIterator2 = __webpack_require__(2);
3536
3537 var _getIterator3 = _interopRequireDefault(_getIterator2);
3538
3539 var _classCallCheck2 = __webpack_require__(3);
3540
3541 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
3542
3543 var _virtualTypes = __webpack_require__(224);
3544
3545 var virtualTypes = _interopRequireWildcard(_virtualTypes);
3546
3547 var _debug2 = __webpack_require__(239);
3548
3549 var _debug3 = _interopRequireDefault(_debug2);
3550
3551 var _invariant = __webpack_require__(466);
3552
3553 var _invariant2 = _interopRequireDefault(_invariant);
3554
3555 var _index = __webpack_require__(7);
3556
3557 var _index2 = _interopRequireDefault(_index);
3558
3559 var _assign = __webpack_require__(174);
3560
3561 var _assign2 = _interopRequireDefault(_assign);
3562
3563 var _scope = __webpack_require__(134);
3564
3565 var _scope2 = _interopRequireDefault(_scope);
3566
3567 var _babelTypes = __webpack_require__(1);
3568
3569 var t = _interopRequireWildcard(_babelTypes);
3570
3571 var _cache = __webpack_require__(88);
3572
3573 function _interopRequireWildcard(obj) {
3574 if (obj && obj.__esModule) {
3575 return obj;
3576 } else {
3577 var newObj = {};if (obj != null) {
3578 for (var key in obj) {
3579 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
3580 }
3581 }newObj.default = obj;return newObj;
3582 }
3583 }
3584
3585 function _interopRequireDefault(obj) {
3586 return obj && obj.__esModule ? obj : { default: obj };
3587 }
3588
3589 var _debug = (0, _debug3.default)("babel");
3590
3591 var NodePath = function () {
3592 function NodePath(hub, parent) {
3593 (0, _classCallCheck3.default)(this, NodePath);
3594
3595 this.parent = parent;
3596 this.hub = hub;
3597 this.contexts = [];
3598 this.data = {};
3599 this.shouldSkip = false;
3600 this.shouldStop = false;
3601 this.removed = false;
3602 this.state = null;
3603 this.opts = null;
3604 this.skipKeys = null;
3605 this.parentPath = null;
3606 this.context = null;
3607 this.container = null;
3608 this.listKey = null;
3609 this.inList = false;
3610 this.parentKey = null;
3611 this.key = null;
3612 this.node = null;
3613 this.scope = null;
3614 this.type = null;
3615 this.typeAnnotation = null;
3616 }
3617
3618 NodePath.get = function get(_ref) {
3619 var hub = _ref.hub,
3620 parentPath = _ref.parentPath,
3621 parent = _ref.parent,
3622 container = _ref.container,
3623 listKey = _ref.listKey,
3624 key = _ref.key;
3625
3626 if (!hub && parentPath) {
3627 hub = parentPath.hub;
3628 }
3629
3630 (0, _invariant2.default)(parent, "To get a node path the parent needs to exist");
3631
3632 var targetNode = container[key];
3633
3634 var paths = _cache.path.get(parent) || [];
3635 if (!_cache.path.has(parent)) {
3636 _cache.path.set(parent, paths);
3637 }
3638
3639 var path = void 0;
3640
3641 for (var i = 0; i < paths.length; i++) {
3642 var pathCheck = paths[i];
3643 if (pathCheck.node === targetNode) {
3644 path = pathCheck;
3645 break;
3646 }
3647 }
3648
3649 if (!path) {
3650 path = new NodePath(hub, parent);
3651 paths.push(path);
3652 }
3653
3654 path.setup(parentPath, container, listKey, key);
3655
3656 return path;
3657 };
3658
3659 NodePath.prototype.getScope = function getScope(scope) {
3660 var ourScope = scope;
3661
3662 if (this.isScope()) {
3663 ourScope = new _scope2.default(this, scope);
3664 }
3665
3666 return ourScope;
3667 };
3668
3669 NodePath.prototype.setData = function setData(key, val) {
3670 return this.data[key] = val;
3671 };
3672
3673 NodePath.prototype.getData = function getData(key, def) {
3674 var val = this.data[key];
3675 if (!val && def) val = this.data[key] = def;
3676 return val;
3677 };
3678
3679 NodePath.prototype.buildCodeFrameError = function buildCodeFrameError(msg) {
3680 var Error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SyntaxError;
3681
3682 return this.hub.file.buildCodeFrameError(this.node, msg, Error);
3683 };
3684
3685 NodePath.prototype.traverse = function traverse(visitor, state) {
3686 (0, _index2.default)(this.node, visitor, this.scope, state, this);
3687 };
3688
3689 NodePath.prototype.mark = function mark(type, message) {
3690 this.hub.file.metadata.marked.push({
3691 type: type,
3692 message: message,
3693 loc: this.node.loc
3694 });
3695 };
3696
3697 NodePath.prototype.set = function set(key, node) {
3698 t.validate(this.node, key, node);
3699 this.node[key] = node;
3700 };
3701
3702 NodePath.prototype.getPathLocation = function getPathLocation() {
3703 var parts = [];
3704 var path = this;
3705 do {
3706 var key = path.key;
3707 if (path.inList) key = path.listKey + "[" + key + "]";
3708 parts.unshift(key);
3709 } while (path = path.parentPath);
3710 return parts.join(".");
3711 };
3712
3713 NodePath.prototype.debug = function debug(buildMessage) {
3714 if (!_debug.enabled) return;
3715 _debug(this.getPathLocation() + " " + this.type + ": " + buildMessage());
3716 };
3717
3718 return NodePath;
3719 }();
3720
3721 exports.default = NodePath;
3722
3723 (0, _assign2.default)(NodePath.prototype, __webpack_require__(368));
3724 (0, _assign2.default)(NodePath.prototype, __webpack_require__(374));
3725 (0, _assign2.default)(NodePath.prototype, __webpack_require__(382));
3726 (0, _assign2.default)(NodePath.prototype, __webpack_require__(372));
3727 (0, _assign2.default)(NodePath.prototype, __webpack_require__(371));
3728 (0, _assign2.default)(NodePath.prototype, __webpack_require__(377));
3729 (0, _assign2.default)(NodePath.prototype, __webpack_require__(370));
3730 (0, _assign2.default)(NodePath.prototype, __webpack_require__(381));
3731 (0, _assign2.default)(NodePath.prototype, __webpack_require__(380));
3732 (0, _assign2.default)(NodePath.prototype, __webpack_require__(373));
3733 (0, _assign2.default)(NodePath.prototype, __webpack_require__(369));
3734
3735 var _loop2 = function _loop2() {
3736 if (_isArray) {
3737 if (_i >= _iterator.length) return "break";
3738 _ref2 = _iterator[_i++];
3739 } else {
3740 _i = _iterator.next();
3741 if (_i.done) return "break";
3742 _ref2 = _i.value;
3743 }
3744
3745 var type = _ref2;
3746
3747 var typeKey = "is" + type;
3748 NodePath.prototype[typeKey] = function (opts) {
3749 return t[typeKey](this.node, opts);
3750 };
3751
3752 NodePath.prototype["assert" + type] = function (opts) {
3753 if (!this[typeKey](opts)) {
3754 throw new TypeError("Expected node path of type " + type);
3755 }
3756 };
3757 };
3758
3759 for (var _iterator = t.TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
3760 var _ref2;
3761
3762 var _ret2 = _loop2();
3763
3764 if (_ret2 === "break") break;
3765 }
3766
3767 var _loop = function _loop(type) {
3768 if (type[0] === "_") return "continue";
3769 if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type);
3770
3771 var virtualType = virtualTypes[type];
3772
3773 NodePath.prototype["is" + type] = function (opts) {
3774 return virtualType.checkPath(this, opts);
3775 };
3776 };
3777
3778 for (var type in virtualTypes) {
3779 var _ret = _loop(type);
3780
3781 if (_ret === "continue") continue;
3782 }
3783 module.exports = exports["default"];
3784
3785/***/ }),
3786/* 37 */
3787/***/ (function(module, exports, __webpack_require__) {
3788
3789 'use strict';
3790
3791 // to indexed object, toObject with fallback for non-array-like ES3 strings
3792 var IObject = __webpack_require__(142);
3793 var defined = __webpack_require__(140);
3794 module.exports = function (it) {
3795 return IObject(defined(it));
3796 };
3797
3798/***/ }),
3799/* 38 */
3800/***/ (function(module, exports, __webpack_require__) {
3801
3802 'use strict';
3803
3804 var baseIsNative = __webpack_require__(497),
3805 getValue = __webpack_require__(535);
3806
3807 /**
3808 * Gets the native function at `key` of `object`.
3809 *
3810 * @private
3811 * @param {Object} object The object to query.
3812 * @param {string} key The key of the method to get.
3813 * @returns {*} Returns the function if it's native, else `undefined`.
3814 */
3815 function getNative(object, key) {
3816 var value = getValue(object, key);
3817 return baseIsNative(value) ? value : undefined;
3818 }
3819
3820 module.exports = getNative;
3821
3822/***/ }),
3823/* 39 */
3824/***/ (function(module, exports) {
3825
3826 "use strict";
3827
3828 module.exports = function (module) {
3829 if (!module.webpackPolyfill) {
3830 module.deprecate = function () {};
3831 module.paths = [];
3832 // module.parent = undefined by default
3833 module.children = [];
3834 module.webpackPolyfill = 1;
3835 }
3836 return module;
3837 };
3838
3839/***/ }),
3840/* 40 */
3841/***/ (function(module, exports, __webpack_require__) {
3842
3843 "use strict";
3844
3845 exports.__esModule = true;
3846
3847 exports.default = function (_ref) {
3848 var node = _ref.node,
3849 parent = _ref.parent,
3850 scope = _ref.scope,
3851 id = _ref.id;
3852
3853 if (node.id) return;
3854
3855 if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, { kind: "method" })) && (!parent.computed || t.isLiteral(parent.key))) {
3856 id = parent.key;
3857 } else if (t.isVariableDeclarator(parent)) {
3858 id = parent.id;
3859
3860 if (t.isIdentifier(id)) {
3861 var binding = scope.parent.getBinding(id.name);
3862 if (binding && binding.constant && scope.getBinding(id.name) === binding) {
3863 node.id = id;
3864 node.id[t.NOT_LOCAL_BINDING] = true;
3865 return;
3866 }
3867 }
3868 } else if (t.isAssignmentExpression(parent)) {
3869 id = parent.left;
3870 } else if (!id) {
3871 return;
3872 }
3873
3874 var name = void 0;
3875 if (id && t.isLiteral(id)) {
3876 name = id.value;
3877 } else if (id && t.isIdentifier(id)) {
3878 name = id.name;
3879 } else {
3880 return;
3881 }
3882
3883 name = t.toBindingIdentifierName(name);
3884 id = t.identifier(name);
3885
3886 id[t.NOT_LOCAL_BINDING] = true;
3887
3888 var state = visit(node, name, scope);
3889 return wrap(state, node, id, scope) || node;
3890 };
3891
3892 var _babelHelperGetFunctionArity = __webpack_require__(189);
3893
3894 var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity);
3895
3896 var _babelTemplate = __webpack_require__(4);
3897
3898 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
3899
3900 var _babelTypes = __webpack_require__(1);
3901
3902 var t = _interopRequireWildcard(_babelTypes);
3903
3904 function _interopRequireWildcard(obj) {
3905 if (obj && obj.__esModule) {
3906 return obj;
3907 } else {
3908 var newObj = {};if (obj != null) {
3909 for (var key in obj) {
3910 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
3911 }
3912 }newObj.default = obj;return newObj;
3913 }
3914 }
3915
3916 function _interopRequireDefault(obj) {
3917 return obj && obj.__esModule ? obj : { default: obj };
3918 }
3919
3920 var buildPropertyMethodAssignmentWrapper = (0, _babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
3921
3922 var buildGeneratorPropertyMethodAssignmentWrapper = (0, _babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
3923
3924 var visitor = {
3925 "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) {
3926 if (path.node.name !== state.name) return;
3927
3928 var localDeclar = path.scope.getBindingIdentifier(state.name);
3929 if (localDeclar !== state.outerDeclar) return;
3930
3931 state.selfReference = true;
3932 path.stop();
3933 }
3934 };
3935
3936 function wrap(state, method, id, scope) {
3937 if (state.selfReference) {
3938 if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
3939 scope.rename(id.name);
3940 } else {
3941 if (!t.isFunction(method)) return;
3942
3943 var build = buildPropertyMethodAssignmentWrapper;
3944 if (method.generator) build = buildGeneratorPropertyMethodAssignmentWrapper;
3945 var _template = build({
3946 FUNCTION: method,
3947 FUNCTION_ID: id,
3948 FUNCTION_KEY: scope.generateUidIdentifier(id.name)
3949 }).expression;
3950 _template.callee._skipModulesRemap = true;
3951
3952 var params = _template.callee.body.body[0].params;
3953 for (var i = 0, len = (0, _babelHelperGetFunctionArity2.default)(method); i < len; i++) {
3954 params.push(scope.generateUidIdentifier("x"));
3955 }
3956
3957 return _template;
3958 }
3959 }
3960
3961 method.id = id;
3962 scope.getProgramParent().references[id.name] = true;
3963 }
3964
3965 function visit(node, name, scope) {
3966 var state = {
3967 selfAssignment: false,
3968 selfReference: false,
3969 outerDeclar: scope.getBindingIdentifier(name),
3970 references: [],
3971 name: name
3972 };
3973
3974 var binding = scope.getOwnBinding(name);
3975
3976 if (binding) {
3977 if (binding.kind === "param") {
3978 state.selfReference = true;
3979 } else {}
3980 } else if (state.outerDeclar || scope.hasGlobal(name)) {
3981 scope.traverse(node, visitor, state);
3982 }
3983
3984 return state;
3985 }
3986
3987 module.exports = exports["default"];
3988
3989/***/ }),
3990/* 41 */
3991/***/ (function(module, exports, __webpack_require__) {
3992
3993 "use strict";
3994
3995 exports.__esModule = true;
3996
3997 var _setPrototypeOf = __webpack_require__(361);
3998
3999 var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
4000
4001 var _create = __webpack_require__(9);
4002
4003 var _create2 = _interopRequireDefault(_create);
4004
4005 var _typeof2 = __webpack_require__(11);
4006
4007 var _typeof3 = _interopRequireDefault(_typeof2);
4008
4009 function _interopRequireDefault(obj) {
4010 return obj && obj.__esModule ? obj : { default: obj };
4011 }
4012
4013 exports.default = function (subClass, superClass) {
4014 if (typeof superClass !== "function" && superClass !== null) {
4015 throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
4016 }
4017
4018 subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
4019 constructor: {
4020 value: subClass,
4021 enumerable: false,
4022 writable: true,
4023 configurable: true
4024 }
4025 });
4026 if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
4027 };
4028
4029/***/ }),
4030/* 42 */
4031/***/ (function(module, exports, __webpack_require__) {
4032
4033 "use strict";
4034
4035 exports.__esModule = true;
4036
4037 var _typeof2 = __webpack_require__(11);
4038
4039 var _typeof3 = _interopRequireDefault(_typeof2);
4040
4041 function _interopRequireDefault(obj) {
4042 return obj && obj.__esModule ? obj : { default: obj };
4043 }
4044
4045 exports.default = function (self, call) {
4046 if (!self) {
4047 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4048 }
4049
4050 return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
4051 };
4052
4053/***/ }),
4054/* 43 */
4055/***/ (function(module, exports, __webpack_require__) {
4056
4057 'use strict';
4058
4059 // optional / simple context binding
4060 var aFunction = __webpack_require__(227);
4061 module.exports = function (fn, that, length) {
4062 aFunction(fn);
4063 if (that === undefined) return fn;
4064 switch (length) {
4065 case 1:
4066 return function (a) {
4067 return fn.call(that, a);
4068 };
4069 case 2:
4070 return function (a, b) {
4071 return fn.call(that, a, b);
4072 };
4073 case 3:
4074 return function (a, b, c) {
4075 return fn.call(that, a, b, c);
4076 };
4077 }
4078 return function () /* ...args */{
4079 return fn.apply(that, arguments);
4080 };
4081 };
4082
4083/***/ }),
4084/* 44 */
4085/***/ (function(module, exports, __webpack_require__) {
4086
4087 'use strict';
4088
4089 // 19.1.2.14 / 15.2.3.14 Object.keys(O)
4090 var $keys = __webpack_require__(237);
4091 var enumBugKeys = __webpack_require__(141);
4092
4093 module.exports = Object.keys || function keys(O) {
4094 return $keys(O, enumBugKeys);
4095 };
4096
4097/***/ }),
4098/* 45 */
4099/***/ (function(module, exports, __webpack_require__) {
4100
4101 'use strict';
4102
4103 var root = __webpack_require__(17);
4104
4105 /** Built-in value references. */
4106 var _Symbol = root.Symbol;
4107
4108 module.exports = _Symbol;
4109
4110/***/ }),
4111/* 46 */
4112/***/ (function(module, exports) {
4113
4114 "use strict";
4115
4116 /**
4117 * Performs a
4118 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4119 * comparison between two values to determine if they are equivalent.
4120 *
4121 * @static
4122 * @memberOf _
4123 * @since 4.0.0
4124 * @category Lang
4125 * @param {*} value The value to compare.
4126 * @param {*} other The other value to compare.
4127 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4128 * @example
4129 *
4130 * var object = { 'a': 1 };
4131 * var other = { 'a': 1 };
4132 *
4133 * _.eq(object, object);
4134 * // => true
4135 *
4136 * _.eq(object, other);
4137 * // => false
4138 *
4139 * _.eq('a', 'a');
4140 * // => true
4141 *
4142 * _.eq('a', Object('a'));
4143 * // => false
4144 *
4145 * _.eq(NaN, NaN);
4146 * // => true
4147 */
4148 function eq(value, other) {
4149 return value === other || value !== value && other !== other;
4150 }
4151
4152 module.exports = eq;
4153
4154/***/ }),
4155/* 47 */
4156/***/ (function(module, exports, __webpack_require__) {
4157
4158 'use strict';
4159
4160 var arrayLikeKeys = __webpack_require__(245),
4161 baseKeysIn = __webpack_require__(501),
4162 isArrayLike = __webpack_require__(24);
4163
4164 /**
4165 * Creates an array of the own and inherited enumerable property names of `object`.
4166 *
4167 * **Note:** Non-object values are coerced to objects.
4168 *
4169 * @static
4170 * @memberOf _
4171 * @since 3.0.0
4172 * @category Object
4173 * @param {Object} object The object to query.
4174 * @returns {Array} Returns the array of property names.
4175 * @example
4176 *
4177 * function Foo() {
4178 * this.a = 1;
4179 * this.b = 2;
4180 * }
4181 *
4182 * Foo.prototype.c = 3;
4183 *
4184 * _.keysIn(new Foo);
4185 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
4186 */
4187 function keysIn(object) {
4188 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
4189 }
4190
4191 module.exports = keysIn;
4192
4193/***/ }),
4194/* 48 */
4195/***/ (function(module, exports, __webpack_require__) {
4196
4197 'use strict';
4198
4199 var toFinite = __webpack_require__(597);
4200
4201 /**
4202 * Converts `value` to an integer.
4203 *
4204 * **Note:** This method is loosely based on
4205 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
4206 *
4207 * @static
4208 * @memberOf _
4209 * @since 4.0.0
4210 * @category Lang
4211 * @param {*} value The value to convert.
4212 * @returns {number} Returns the converted integer.
4213 * @example
4214 *
4215 * _.toInteger(3.2);
4216 * // => 3
4217 *
4218 * _.toInteger(Number.MIN_VALUE);
4219 * // => 0
4220 *
4221 * _.toInteger(Infinity);
4222 * // => 1.7976931348623157e+308
4223 *
4224 * _.toInteger('3.2');
4225 * // => 3
4226 */
4227 function toInteger(value) {
4228 var result = toFinite(value),
4229 remainder = result % 1;
4230
4231 return result === result ? remainder ? result - remainder : result : 0;
4232 }
4233
4234 module.exports = toInteger;
4235
4236/***/ }),
4237/* 49 */
4238/***/ (function(module, exports) {
4239
4240 /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
4241
4242 /* WEBPACK VAR INJECTION */}.call(exports, {}))
4243
4244/***/ }),
4245/* 50 */
4246/***/ (function(module, exports, __webpack_require__) {
4247
4248 /* WEBPACK VAR INJECTION */(function(process) {"use strict";
4249
4250 exports.__esModule = true;
4251 exports.File = undefined;
4252
4253 var _getIterator2 = __webpack_require__(2);
4254
4255 var _getIterator3 = _interopRequireDefault(_getIterator2);
4256
4257 var _create = __webpack_require__(9);
4258
4259 var _create2 = _interopRequireDefault(_create);
4260
4261 var _assign = __webpack_require__(87);
4262
4263 var _assign2 = _interopRequireDefault(_assign);
4264
4265 var _classCallCheck2 = __webpack_require__(3);
4266
4267 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
4268
4269 var _possibleConstructorReturn2 = __webpack_require__(42);
4270
4271 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
4272
4273 var _inherits2 = __webpack_require__(41);
4274
4275 var _inherits3 = _interopRequireDefault(_inherits2);
4276
4277 var _babelHelpers = __webpack_require__(194);
4278
4279 var _babelHelpers2 = _interopRequireDefault(_babelHelpers);
4280
4281 var _metadata = __webpack_require__(121);
4282
4283 var metadataVisitor = _interopRequireWildcard(_metadata);
4284
4285 var _convertSourceMap = __webpack_require__(403);
4286
4287 var _convertSourceMap2 = _interopRequireDefault(_convertSourceMap);
4288
4289 var _optionManager = __webpack_require__(34);
4290
4291 var _optionManager2 = _interopRequireDefault(_optionManager);
4292
4293 var _pluginPass = __webpack_require__(299);
4294
4295 var _pluginPass2 = _interopRequireDefault(_pluginPass);
4296
4297 var _babelTraverse = __webpack_require__(7);
4298
4299 var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
4300
4301 var _sourceMap = __webpack_require__(288);
4302
4303 var _sourceMap2 = _interopRequireDefault(_sourceMap);
4304
4305 var _babelGenerator = __webpack_require__(186);
4306
4307 var _babelGenerator2 = _interopRequireDefault(_babelGenerator);
4308
4309 var _babelCodeFrame = __webpack_require__(181);
4310
4311 var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame);
4312
4313 var _defaults = __webpack_require__(273);
4314
4315 var _defaults2 = _interopRequireDefault(_defaults);
4316
4317 var _logger = __webpack_require__(120);
4318
4319 var _logger2 = _interopRequireDefault(_logger);
4320
4321 var _store = __webpack_require__(119);
4322
4323 var _store2 = _interopRequireDefault(_store);
4324
4325 var _babylon = __webpack_require__(89);
4326
4327 var _util = __webpack_require__(122);
4328
4329 var util = _interopRequireWildcard(_util);
4330
4331 var _path = __webpack_require__(19);
4332
4333 var _path2 = _interopRequireDefault(_path);
4334
4335 var _babelTypes = __webpack_require__(1);
4336
4337 var t = _interopRequireWildcard(_babelTypes);
4338
4339 var _resolve = __webpack_require__(118);
4340
4341 var _resolve2 = _interopRequireDefault(_resolve);
4342
4343 var _blockHoist = __webpack_require__(296);
4344
4345 var _blockHoist2 = _interopRequireDefault(_blockHoist);
4346
4347 var _shadowFunctions = __webpack_require__(297);
4348
4349 var _shadowFunctions2 = _interopRequireDefault(_shadowFunctions);
4350
4351 function _interopRequireWildcard(obj) {
4352 if (obj && obj.__esModule) {
4353 return obj;
4354 } else {
4355 var newObj = {};if (obj != null) {
4356 for (var key in obj) {
4357 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
4358 }
4359 }newObj.default = obj;return newObj;
4360 }
4361 }
4362
4363 function _interopRequireDefault(obj) {
4364 return obj && obj.__esModule ? obj : { default: obj };
4365 }
4366
4367 var shebangRegex = /^#!.*/;
4368
4369 var INTERNAL_PLUGINS = [[_blockHoist2.default], [_shadowFunctions2.default]];
4370
4371 var errorVisitor = {
4372 enter: function enter(path, state) {
4373 var loc = path.node.loc;
4374 if (loc) {
4375 state.loc = loc;
4376 path.stop();
4377 }
4378 }
4379 };
4380
4381 var File = function (_Store) {
4382 (0, _inherits3.default)(File, _Store);
4383
4384 function File() {
4385 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4386 var pipeline = arguments[1];
4387 (0, _classCallCheck3.default)(this, File);
4388
4389 var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
4390
4391 _this.pipeline = pipeline;
4392
4393 _this.log = new _logger2.default(_this, opts.filename || "unknown");
4394 _this.opts = _this.initOptions(opts);
4395
4396 _this.parserOpts = {
4397 sourceType: _this.opts.sourceType,
4398 sourceFileName: _this.opts.filename,
4399 plugins: []
4400 };
4401
4402 _this.pluginVisitors = [];
4403 _this.pluginPasses = [];
4404
4405 _this.buildPluginsForOptions(_this.opts);
4406
4407 if (_this.opts.passPerPreset) {
4408 _this.perPresetOpts = [];
4409 _this.opts.presets.forEach(function (presetOpts) {
4410 var perPresetOpts = (0, _assign2.default)((0, _create2.default)(_this.opts), presetOpts);
4411 _this.perPresetOpts.push(perPresetOpts);
4412 _this.buildPluginsForOptions(perPresetOpts);
4413 });
4414 }
4415
4416 _this.metadata = {
4417 usedHelpers: [],
4418 marked: [],
4419 modules: {
4420 imports: [],
4421 exports: {
4422 exported: [],
4423 specifiers: []
4424 }
4425 }
4426 };
4427
4428 _this.dynamicImportTypes = {};
4429 _this.dynamicImportIds = {};
4430 _this.dynamicImports = [];
4431 _this.declarations = {};
4432 _this.usedHelpers = {};
4433
4434 _this.path = null;
4435 _this.ast = {};
4436
4437 _this.code = "";
4438 _this.shebang = "";
4439
4440 _this.hub = new _babelTraverse.Hub(_this);
4441 return _this;
4442 }
4443
4444 File.prototype.getMetadata = function getMetadata() {
4445 var has = false;
4446 for (var _iterator = this.ast.program.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
4447 var _ref;
4448
4449 if (_isArray) {
4450 if (_i >= _iterator.length) break;
4451 _ref = _iterator[_i++];
4452 } else {
4453 _i = _iterator.next();
4454 if (_i.done) break;
4455 _ref = _i.value;
4456 }
4457
4458 var node = _ref;
4459
4460 if (t.isModuleDeclaration(node)) {
4461 has = true;
4462 break;
4463 }
4464 }
4465 if (has) {
4466 this.path.traverse(metadataVisitor, this);
4467 }
4468 };
4469
4470 File.prototype.initOptions = function initOptions(opts) {
4471 opts = new _optionManager2.default(this.log, this.pipeline).init(opts);
4472
4473 if (opts.inputSourceMap) {
4474 opts.sourceMaps = true;
4475 }
4476
4477 if (opts.moduleId) {
4478 opts.moduleIds = true;
4479 }
4480
4481 opts.basename = _path2.default.basename(opts.filename, _path2.default.extname(opts.filename));
4482
4483 opts.ignore = util.arrayify(opts.ignore, util.regexify);
4484
4485 if (opts.only) opts.only = util.arrayify(opts.only, util.regexify);
4486
4487 (0, _defaults2.default)(opts, {
4488 moduleRoot: opts.sourceRoot
4489 });
4490
4491 (0, _defaults2.default)(opts, {
4492 sourceRoot: opts.moduleRoot
4493 });
4494
4495 (0, _defaults2.default)(opts, {
4496 filenameRelative: opts.filename
4497 });
4498
4499 var basenameRelative = _path2.default.basename(opts.filenameRelative);
4500
4501 (0, _defaults2.default)(opts, {
4502 sourceFileName: basenameRelative,
4503 sourceMapTarget: basenameRelative
4504 });
4505
4506 return opts;
4507 };
4508
4509 File.prototype.buildPluginsForOptions = function buildPluginsForOptions(opts) {
4510 if (!Array.isArray(opts.plugins)) {
4511 return;
4512 }
4513
4514 var plugins = opts.plugins.concat(INTERNAL_PLUGINS);
4515 var currentPluginVisitors = [];
4516 var currentPluginPasses = [];
4517
4518 for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
4519 var _ref2;
4520
4521 if (_isArray2) {
4522 if (_i2 >= _iterator2.length) break;
4523 _ref2 = _iterator2[_i2++];
4524 } else {
4525 _i2 = _iterator2.next();
4526 if (_i2.done) break;
4527 _ref2 = _i2.value;
4528 }
4529
4530 var ref = _ref2;
4531 var plugin = ref[0],
4532 pluginOpts = ref[1];
4533
4534 currentPluginVisitors.push(plugin.visitor);
4535 currentPluginPasses.push(new _pluginPass2.default(this, plugin, pluginOpts));
4536
4537 if (plugin.manipulateOptions) {
4538 plugin.manipulateOptions(opts, this.parserOpts, this);
4539 }
4540 }
4541
4542 this.pluginVisitors.push(currentPluginVisitors);
4543 this.pluginPasses.push(currentPluginPasses);
4544 };
4545
4546 File.prototype.getModuleName = function getModuleName() {
4547 var opts = this.opts;
4548 if (!opts.moduleIds) {
4549 return null;
4550 }
4551
4552 if (opts.moduleId != null && !opts.getModuleId) {
4553 return opts.moduleId;
4554 }
4555
4556 var filenameRelative = opts.filenameRelative;
4557 var moduleName = "";
4558
4559 if (opts.moduleRoot != null) {
4560 moduleName = opts.moduleRoot + "/";
4561 }
4562
4563 if (!opts.filenameRelative) {
4564 return moduleName + opts.filename.replace(/^\//, "");
4565 }
4566
4567 if (opts.sourceRoot != null) {
4568 var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "\/?");
4569 filenameRelative = filenameRelative.replace(sourceRootRegEx, "");
4570 }
4571
4572 filenameRelative = filenameRelative.replace(/\.(\w*?)$/, "");
4573
4574 moduleName += filenameRelative;
4575
4576 moduleName = moduleName.replace(/\\/g, "/");
4577
4578 if (opts.getModuleId) {
4579 return opts.getModuleId(moduleName) || moduleName;
4580 } else {
4581 return moduleName;
4582 }
4583 };
4584
4585 File.prototype.resolveModuleSource = function resolveModuleSource(source) {
4586 var resolveModuleSource = this.opts.resolveModuleSource;
4587 if (resolveModuleSource) source = resolveModuleSource(source, this.opts.filename);
4588 return source;
4589 };
4590
4591 File.prototype.addImport = function addImport(source, imported) {
4592 var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : imported;
4593
4594 var alias = source + ":" + imported;
4595 var id = this.dynamicImportIds[alias];
4596
4597 if (!id) {
4598 source = this.resolveModuleSource(source);
4599 id = this.dynamicImportIds[alias] = this.scope.generateUidIdentifier(name);
4600
4601 var specifiers = [];
4602
4603 if (imported === "*") {
4604 specifiers.push(t.importNamespaceSpecifier(id));
4605 } else if (imported === "default") {
4606 specifiers.push(t.importDefaultSpecifier(id));
4607 } else {
4608 specifiers.push(t.importSpecifier(id, t.identifier(imported)));
4609 }
4610
4611 var declar = t.importDeclaration(specifiers, t.stringLiteral(source));
4612 declar._blockHoist = 3;
4613
4614 this.path.unshiftContainer("body", declar);
4615 }
4616
4617 return id;
4618 };
4619
4620 File.prototype.addHelper = function addHelper(name) {
4621 var declar = this.declarations[name];
4622 if (declar) return declar;
4623
4624 if (!this.usedHelpers[name]) {
4625 this.metadata.usedHelpers.push(name);
4626 this.usedHelpers[name] = true;
4627 }
4628
4629 var generator = this.get("helperGenerator");
4630 var runtime = this.get("helpersNamespace");
4631 if (generator) {
4632 var res = generator(name);
4633 if (res) return res;
4634 } else if (runtime) {
4635 return t.memberExpression(runtime, t.identifier(name));
4636 }
4637
4638 var ref = (0, _babelHelpers2.default)(name);
4639 var uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
4640
4641 if (t.isFunctionExpression(ref) && !ref.id) {
4642 ref.body._compact = true;
4643 ref._generated = true;
4644 ref.id = uid;
4645 ref.type = "FunctionDeclaration";
4646 this.path.unshiftContainer("body", ref);
4647 } else {
4648 ref._compact = true;
4649 this.scope.push({
4650 id: uid,
4651 init: ref,
4652 unique: true
4653 });
4654 }
4655
4656 return uid;
4657 };
4658
4659 File.prototype.addTemplateObject = function addTemplateObject(helperName, strings, raw) {
4660 var stringIds = raw.elements.map(function (string) {
4661 return string.value;
4662 });
4663 var name = helperName + "_" + raw.elements.length + "_" + stringIds.join(",");
4664
4665 var declar = this.declarations[name];
4666 if (declar) return declar;
4667
4668 var uid = this.declarations[name] = this.scope.generateUidIdentifier("templateObject");
4669
4670 var helperId = this.addHelper(helperName);
4671 var init = t.callExpression(helperId, [strings, raw]);
4672 init._compact = true;
4673 this.scope.push({
4674 id: uid,
4675 init: init,
4676 _blockHoist: 1.9 });
4677 return uid;
4678 };
4679
4680 File.prototype.buildCodeFrameError = function buildCodeFrameError(node, msg) {
4681 var Error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : SyntaxError;
4682
4683 var loc = node && (node.loc || node._loc);
4684
4685 var err = new Error(msg);
4686
4687 if (loc) {
4688 err.loc = loc.start;
4689 } else {
4690 (0, _babelTraverse2.default)(node, errorVisitor, this.scope, err);
4691
4692 err.message += " (This is an error on an internal node. Probably an internal error";
4693
4694 if (err.loc) {
4695 err.message += ". Location has been estimated.";
4696 }
4697
4698 err.message += ")";
4699 }
4700
4701 return err;
4702 };
4703
4704 File.prototype.mergeSourceMap = function mergeSourceMap(map) {
4705 var inputMap = this.opts.inputSourceMap;
4706
4707 if (inputMap) {
4708 var inputMapConsumer = new _sourceMap2.default.SourceMapConsumer(inputMap);
4709 var outputMapConsumer = new _sourceMap2.default.SourceMapConsumer(map);
4710
4711 var mergedGenerator = new _sourceMap2.default.SourceMapGenerator({
4712 file: inputMapConsumer.file,
4713 sourceRoot: inputMapConsumer.sourceRoot
4714 });
4715
4716 var source = outputMapConsumer.sources[0];
4717
4718 inputMapConsumer.eachMapping(function (mapping) {
4719 var generatedPosition = outputMapConsumer.generatedPositionFor({
4720 line: mapping.generatedLine,
4721 column: mapping.generatedColumn,
4722 source: source
4723 });
4724 if (generatedPosition.column != null) {
4725 mergedGenerator.addMapping({
4726 source: mapping.source,
4727
4728 original: mapping.source == null ? null : {
4729 line: mapping.originalLine,
4730 column: mapping.originalColumn
4731 },
4732
4733 generated: generatedPosition
4734 });
4735 }
4736 });
4737
4738 var mergedMap = mergedGenerator.toJSON();
4739 inputMap.mappings = mergedMap.mappings;
4740 return inputMap;
4741 } else {
4742 return map;
4743 }
4744 };
4745
4746 File.prototype.parse = function parse(code) {
4747 var parseCode = _babylon.parse;
4748 var parserOpts = this.opts.parserOpts;
4749
4750 if (parserOpts) {
4751 parserOpts = (0, _assign2.default)({}, this.parserOpts, parserOpts);
4752
4753 if (parserOpts.parser) {
4754 if (typeof parserOpts.parser === "string") {
4755 var dirname = _path2.default.dirname(this.opts.filename) || process.cwd();
4756 var parser = (0, _resolve2.default)(parserOpts.parser, dirname);
4757 if (parser) {
4758 parseCode = __webpack_require__(178)(parser).parse;
4759 } else {
4760 throw new Error("Couldn't find parser " + parserOpts.parser + " with \"parse\" method " + ("relative to directory " + dirname));
4761 }
4762 } else {
4763 parseCode = parserOpts.parser;
4764 }
4765
4766 parserOpts.parser = {
4767 parse: function parse(source) {
4768 return (0, _babylon.parse)(source, parserOpts);
4769 }
4770 };
4771 }
4772 }
4773
4774 this.log.debug("Parse start");
4775 var ast = parseCode(code, parserOpts || this.parserOpts);
4776 this.log.debug("Parse stop");
4777 return ast;
4778 };
4779
4780 File.prototype._addAst = function _addAst(ast) {
4781 this.path = _babelTraverse.NodePath.get({
4782 hub: this.hub,
4783 parentPath: null,
4784 parent: ast,
4785 container: ast,
4786 key: "program"
4787 }).setContext();
4788 this.scope = this.path.scope;
4789 this.ast = ast;
4790 this.getMetadata();
4791 };
4792
4793 File.prototype.addAst = function addAst(ast) {
4794 this.log.debug("Start set AST");
4795 this._addAst(ast);
4796 this.log.debug("End set AST");
4797 };
4798
4799 File.prototype.transform = function transform() {
4800 for (var i = 0; i < this.pluginPasses.length; i++) {
4801 var pluginPasses = this.pluginPasses[i];
4802 this.call("pre", pluginPasses);
4803 this.log.debug("Start transform traverse");
4804
4805 var visitor = _babelTraverse2.default.visitors.merge(this.pluginVisitors[i], pluginPasses, this.opts.wrapPluginVisitorMethod);
4806 (0, _babelTraverse2.default)(this.ast, visitor, this.scope);
4807
4808 this.log.debug("End transform traverse");
4809 this.call("post", pluginPasses);
4810 }
4811
4812 return this.generate();
4813 };
4814
4815 File.prototype.wrap = function wrap(code, callback) {
4816 code = code + "";
4817
4818 try {
4819 if (this.shouldIgnore()) {
4820 return this.makeResult({ code: code, ignored: true });
4821 } else {
4822 return callback();
4823 }
4824 } catch (err) {
4825 if (err._babel) {
4826 throw err;
4827 } else {
4828 err._babel = true;
4829 }
4830
4831 var message = err.message = this.opts.filename + ": " + err.message;
4832
4833 var loc = err.loc;
4834 if (loc) {
4835 err.codeFrame = (0, _babelCodeFrame2.default)(code, loc.line, loc.column + 1, this.opts);
4836 message += "\n" + err.codeFrame;
4837 }
4838
4839 if (process.browser) {
4840 err.message = message;
4841 }
4842
4843 if (err.stack) {
4844 var newStack = err.stack.replace(err.message, message);
4845 err.stack = newStack;
4846 }
4847
4848 throw err;
4849 }
4850 };
4851
4852 File.prototype.addCode = function addCode(code) {
4853 code = (code || "") + "";
4854 code = this.parseInputSourceMap(code);
4855 this.code = code;
4856 };
4857
4858 File.prototype.parseCode = function parseCode() {
4859 this.parseShebang();
4860 var ast = this.parse(this.code);
4861 this.addAst(ast);
4862 };
4863
4864 File.prototype.shouldIgnore = function shouldIgnore() {
4865 var opts = this.opts;
4866 return util.shouldIgnore(opts.filename, opts.ignore, opts.only);
4867 };
4868
4869 File.prototype.call = function call(key, pluginPasses) {
4870 for (var _iterator3 = pluginPasses, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
4871 var _ref3;
4872
4873 if (_isArray3) {
4874 if (_i3 >= _iterator3.length) break;
4875 _ref3 = _iterator3[_i3++];
4876 } else {
4877 _i3 = _iterator3.next();
4878 if (_i3.done) break;
4879 _ref3 = _i3.value;
4880 }
4881
4882 var pass = _ref3;
4883
4884 var plugin = pass.plugin;
4885 var fn = plugin[key];
4886 if (fn) fn.call(pass, this);
4887 }
4888 };
4889
4890 File.prototype.parseInputSourceMap = function parseInputSourceMap(code) {
4891 var opts = this.opts;
4892
4893 if (opts.inputSourceMap !== false) {
4894 var inputMap = _convertSourceMap2.default.fromSource(code);
4895 if (inputMap) {
4896 opts.inputSourceMap = inputMap.toObject();
4897 code = _convertSourceMap2.default.removeComments(code);
4898 }
4899 }
4900
4901 return code;
4902 };
4903
4904 File.prototype.parseShebang = function parseShebang() {
4905 var shebangMatch = shebangRegex.exec(this.code);
4906 if (shebangMatch) {
4907 this.shebang = shebangMatch[0];
4908 this.code = this.code.replace(shebangRegex, "");
4909 }
4910 };
4911
4912 File.prototype.makeResult = function makeResult(_ref4) {
4913 var code = _ref4.code,
4914 map = _ref4.map,
4915 ast = _ref4.ast,
4916 ignored = _ref4.ignored;
4917
4918 var result = {
4919 metadata: null,
4920 options: this.opts,
4921 ignored: !!ignored,
4922 code: null,
4923 ast: null,
4924 map: map || null
4925 };
4926
4927 if (this.opts.code) {
4928 result.code = code;
4929 }
4930
4931 if (this.opts.ast) {
4932 result.ast = ast;
4933 }
4934
4935 if (this.opts.metadata) {
4936 result.metadata = this.metadata;
4937 }
4938
4939 return result;
4940 };
4941
4942 File.prototype.generate = function generate() {
4943 var opts = this.opts;
4944 var ast = this.ast;
4945
4946 var result = { ast: ast };
4947 if (!opts.code) return this.makeResult(result);
4948
4949 var gen = _babelGenerator2.default;
4950 if (opts.generatorOpts.generator) {
4951 gen = opts.generatorOpts.generator;
4952
4953 if (typeof gen === "string") {
4954 var dirname = _path2.default.dirname(this.opts.filename) || process.cwd();
4955 var generator = (0, _resolve2.default)(gen, dirname);
4956 if (generator) {
4957 gen = __webpack_require__(178)(generator).print;
4958 } else {
4959 throw new Error("Couldn't find generator " + gen + " with \"print\" method relative " + ("to directory " + dirname));
4960 }
4961 }
4962 }
4963
4964 this.log.debug("Generation start");
4965
4966 var _result = gen(ast, opts.generatorOpts ? (0, _assign2.default)(opts, opts.generatorOpts) : opts, this.code);
4967 result.code = _result.code;
4968 result.map = _result.map;
4969
4970 this.log.debug("Generation end");
4971
4972 if (this.shebang) {
4973 result.code = this.shebang + "\n" + result.code;
4974 }
4975
4976 if (result.map) {
4977 result.map = this.mergeSourceMap(result.map);
4978 }
4979
4980 if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
4981 result.code += "\n" + _convertSourceMap2.default.fromObject(result.map).toComment();
4982 }
4983
4984 if (opts.sourceMaps === "inline") {
4985 result.map = null;
4986 }
4987
4988 return this.makeResult(result);
4989 };
4990
4991 return File;
4992 }(_store2.default);
4993
4994 exports.default = File;
4995 exports.File = File;
4996 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
4997
4998/***/ }),
4999/* 51 */
5000/***/ (function(module, exports, __webpack_require__) {
5001
5002 /* WEBPACK VAR INJECTION */(function(process) {"use strict";
5003
5004 exports.__esModule = true;
5005
5006 var _assign = __webpack_require__(87);
5007
5008 var _assign2 = _interopRequireDefault(_assign);
5009
5010 var _classCallCheck2 = __webpack_require__(3);
5011
5012 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
5013
5014 exports.default = buildConfigChain;
5015
5016 var _resolve = __webpack_require__(118);
5017
5018 var _resolve2 = _interopRequireDefault(_resolve);
5019
5020 var _json = __webpack_require__(470);
5021
5022 var _json2 = _interopRequireDefault(_json);
5023
5024 var _pathIsAbsolute = __webpack_require__(604);
5025
5026 var _pathIsAbsolute2 = _interopRequireDefault(_pathIsAbsolute);
5027
5028 var _path = __webpack_require__(19);
5029
5030 var _path2 = _interopRequireDefault(_path);
5031
5032 var _fs = __webpack_require__(115);
5033
5034 var _fs2 = _interopRequireDefault(_fs);
5035
5036 function _interopRequireDefault(obj) {
5037 return obj && obj.__esModule ? obj : { default: obj };
5038 }
5039
5040 var existsCache = {};
5041 var jsonCache = {};
5042
5043 var BABELIGNORE_FILENAME = ".babelignore";
5044 var BABELRC_FILENAME = ".babelrc";
5045 var PACKAGE_FILENAME = "package.json";
5046
5047 function exists(filename) {
5048 var cached = existsCache[filename];
5049 if (cached == null) {
5050 return existsCache[filename] = _fs2.default.existsSync(filename);
5051 } else {
5052 return cached;
5053 }
5054 }
5055
5056 function buildConfigChain() {
5057 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5058 var log = arguments[1];
5059
5060 var filename = opts.filename;
5061 var builder = new ConfigChainBuilder(log);
5062
5063 if (opts.babelrc !== false) {
5064 builder.findConfigs(filename);
5065 }
5066
5067 builder.mergeConfig({
5068 options: opts,
5069 alias: "base",
5070 dirname: filename && _path2.default.dirname(filename)
5071 });
5072
5073 return builder.configs;
5074 }
5075
5076 var ConfigChainBuilder = function () {
5077 function ConfigChainBuilder(log) {
5078 (0, _classCallCheck3.default)(this, ConfigChainBuilder);
5079
5080 this.resolvedConfigs = [];
5081 this.configs = [];
5082 this.log = log;
5083 }
5084
5085 ConfigChainBuilder.prototype.findConfigs = function findConfigs(loc) {
5086 if (!loc) return;
5087
5088 if (!(0, _pathIsAbsolute2.default)(loc)) {
5089 loc = _path2.default.join(process.cwd(), loc);
5090 }
5091
5092 var foundConfig = false;
5093 var foundIgnore = false;
5094
5095 while (loc !== (loc = _path2.default.dirname(loc))) {
5096 if (!foundConfig) {
5097 var configLoc = _path2.default.join(loc, BABELRC_FILENAME);
5098 if (exists(configLoc)) {
5099 this.addConfig(configLoc);
5100 foundConfig = true;
5101 }
5102
5103 var pkgLoc = _path2.default.join(loc, PACKAGE_FILENAME);
5104 if (!foundConfig && exists(pkgLoc)) {
5105 foundConfig = this.addConfig(pkgLoc, "babel", JSON);
5106 }
5107 }
5108
5109 if (!foundIgnore) {
5110 var ignoreLoc = _path2.default.join(loc, BABELIGNORE_FILENAME);
5111 if (exists(ignoreLoc)) {
5112 this.addIgnoreConfig(ignoreLoc);
5113 foundIgnore = true;
5114 }
5115 }
5116
5117 if (foundIgnore && foundConfig) return;
5118 }
5119 };
5120
5121 ConfigChainBuilder.prototype.addIgnoreConfig = function addIgnoreConfig(loc) {
5122 var file = _fs2.default.readFileSync(loc, "utf8");
5123 var lines = file.split("\n");
5124
5125 lines = lines.map(function (line) {
5126 return line.replace(/#(.*?)$/, "").trim();
5127 }).filter(function (line) {
5128 return !!line;
5129 });
5130
5131 if (lines.length) {
5132 this.mergeConfig({
5133 options: { ignore: lines },
5134 alias: loc,
5135 dirname: _path2.default.dirname(loc)
5136 });
5137 }
5138 };
5139
5140 ConfigChainBuilder.prototype.addConfig = function addConfig(loc, key) {
5141 var json = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _json2.default;
5142
5143 if (this.resolvedConfigs.indexOf(loc) >= 0) {
5144 return false;
5145 }
5146
5147 this.resolvedConfigs.push(loc);
5148
5149 var content = _fs2.default.readFileSync(loc, "utf8");
5150 var options = void 0;
5151
5152 try {
5153 options = jsonCache[content] = jsonCache[content] || json.parse(content);
5154 if (key) options = options[key];
5155 } catch (err) {
5156 err.message = loc + ": Error while parsing JSON - " + err.message;
5157 throw err;
5158 }
5159
5160 this.mergeConfig({
5161 options: options,
5162 alias: loc,
5163 dirname: _path2.default.dirname(loc)
5164 });
5165
5166 return !!options;
5167 };
5168
5169 ConfigChainBuilder.prototype.mergeConfig = function mergeConfig(_ref) {
5170 var options = _ref.options,
5171 alias = _ref.alias,
5172 loc = _ref.loc,
5173 dirname = _ref.dirname;
5174
5175 if (!options) {
5176 return false;
5177 }
5178
5179 options = (0, _assign2.default)({}, options);
5180
5181 dirname = dirname || process.cwd();
5182 loc = loc || alias;
5183
5184 if (options.extends) {
5185 var extendsLoc = (0, _resolve2.default)(options.extends, dirname);
5186 if (extendsLoc) {
5187 this.addConfig(extendsLoc);
5188 } else {
5189 if (this.log) this.log.error("Couldn't resolve extends clause of " + options.extends + " in " + alias);
5190 }
5191 delete options.extends;
5192 }
5193
5194 this.configs.push({
5195 options: options,
5196 alias: alias,
5197 loc: loc,
5198 dirname: dirname
5199 });
5200
5201 var envOpts = void 0;
5202 var envKey = process.env.BABEL_ENV || ("production") || "development";
5203 if (options.env) {
5204 envOpts = options.env[envKey];
5205 delete options.env;
5206 }
5207
5208 this.mergeConfig({
5209 options: envOpts,
5210 alias: alias + ".env." + envKey,
5211 dirname: dirname
5212 });
5213 };
5214
5215 return ConfigChainBuilder;
5216 }();
5217
5218 module.exports = exports["default"];
5219 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
5220
5221/***/ }),
5222/* 52 */
5223/***/ (function(module, exports, __webpack_require__) {
5224
5225 "use strict";
5226
5227 exports.__esModule = true;
5228 exports.config = undefined;
5229 exports.normaliseOptions = normaliseOptions;
5230
5231 var _parsers = __webpack_require__(53);
5232
5233 var parsers = _interopRequireWildcard(_parsers);
5234
5235 var _config = __webpack_require__(33);
5236
5237 var _config2 = _interopRequireDefault(_config);
5238
5239 function _interopRequireDefault(obj) {
5240 return obj && obj.__esModule ? obj : { default: obj };
5241 }
5242
5243 function _interopRequireWildcard(obj) {
5244 if (obj && obj.__esModule) {
5245 return obj;
5246 } else {
5247 var newObj = {};if (obj != null) {
5248 for (var key in obj) {
5249 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
5250 }
5251 }newObj.default = obj;return newObj;
5252 }
5253 }
5254
5255 exports.config = _config2.default;
5256 function normaliseOptions() {
5257 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5258
5259 for (var key in options) {
5260 var val = options[key];
5261 if (val == null) continue;
5262
5263 var opt = _config2.default[key];
5264 if (opt && opt.alias) opt = _config2.default[opt.alias];
5265 if (!opt) continue;
5266
5267 var parser = parsers[opt.type];
5268 if (parser) val = parser(val);
5269
5270 options[key] = val;
5271 }
5272
5273 return options;
5274 }
5275
5276/***/ }),
5277/* 53 */
5278/***/ (function(module, exports, __webpack_require__) {
5279
5280 "use strict";
5281
5282 exports.__esModule = true;
5283 exports.filename = undefined;
5284 exports.boolean = boolean;
5285 exports.booleanString = booleanString;
5286 exports.list = list;
5287
5288 var _slash = __webpack_require__(284);
5289
5290 var _slash2 = _interopRequireDefault(_slash);
5291
5292 var _util = __webpack_require__(122);
5293
5294 var util = _interopRequireWildcard(_util);
5295
5296 function _interopRequireWildcard(obj) {
5297 if (obj && obj.__esModule) {
5298 return obj;
5299 } else {
5300 var newObj = {};if (obj != null) {
5301 for (var key in obj) {
5302 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
5303 }
5304 }newObj.default = obj;return newObj;
5305 }
5306 }
5307
5308 function _interopRequireDefault(obj) {
5309 return obj && obj.__esModule ? obj : { default: obj };
5310 }
5311
5312 var filename = exports.filename = _slash2.default;
5313
5314 function boolean(val) {
5315 return !!val;
5316 }
5317
5318 function booleanString(val) {
5319 return util.booleanify(val);
5320 }
5321
5322 function list(val) {
5323 return util.list(val);
5324 }
5325
5326/***/ }),
5327/* 54 */
5328/***/ (function(module, exports) {
5329
5330 "use strict";
5331
5332 module.exports = {
5333 "auxiliaryComment": {
5334 "message": "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
5335 },
5336 "blacklist": {
5337 "message": "Put the specific transforms you want in the `plugins` option"
5338 },
5339 "breakConfig": {
5340 "message": "This is not a necessary option in Babel 6"
5341 },
5342 "experimental": {
5343 "message": "Put the specific transforms you want in the `plugins` option"
5344 },
5345 "externalHelpers": {
5346 "message": "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"
5347 },
5348 "extra": {
5349 "message": ""
5350 },
5351 "jsxPragma": {
5352 "message": "use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
5353 },
5354
5355 "loose": {
5356 "message": "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."
5357 },
5358 "metadataUsedHelpers": {
5359 "message": "Not required anymore as this is enabled by default"
5360 },
5361 "modules": {
5362 "message": "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"
5363 },
5364 "nonStandard": {
5365 "message": "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"
5366 },
5367 "optional": {
5368 "message": "Put the specific transforms you want in the `plugins` option"
5369 },
5370 "sourceMapName": {
5371 "message": "Use the `sourceMapTarget` option"
5372 },
5373 "stage": {
5374 "message": "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
5375 },
5376 "whitelist": {
5377 "message": "Put the specific transforms you want in the `plugins` option"
5378 }
5379 };
5380
5381/***/ }),
5382/* 55 */
5383/***/ (function(module, exports, __webpack_require__) {
5384
5385 'use strict';
5386
5387 var ctx = __webpack_require__(43);
5388 var call = __webpack_require__(428);
5389 var isArrayIter = __webpack_require__(427);
5390 var anObject = __webpack_require__(21);
5391 var toLength = __webpack_require__(153);
5392 var getIterFn = __webpack_require__(238);
5393 var BREAK = {};
5394 var RETURN = {};
5395 var _exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
5396 var iterFn = ITERATOR ? function () {
5397 return iterable;
5398 } : getIterFn(iterable);
5399 var f = ctx(fn, that, entries ? 2 : 1);
5400 var index = 0;
5401 var length, step, iterator, result;
5402 if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
5403 // fast case for arrays with default iterator
5404 if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
5405 result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
5406 if (result === BREAK || result === RETURN) return result;
5407 } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
5408 result = call(iterator, f, step.value, entries);
5409 if (result === BREAK || result === RETURN) return result;
5410 }
5411 };
5412 _exports.BREAK = BREAK;
5413 _exports.RETURN = RETURN;
5414
5415/***/ }),
5416/* 56 */
5417/***/ (function(module, exports) {
5418
5419 "use strict";
5420
5421 module.exports = {};
5422
5423/***/ }),
5424/* 57 */
5425/***/ (function(module, exports, __webpack_require__) {
5426
5427 'use strict';
5428
5429 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5430
5431 var META = __webpack_require__(95)('meta');
5432 var isObject = __webpack_require__(16);
5433 var has = __webpack_require__(28);
5434 var setDesc = __webpack_require__(23).f;
5435 var id = 0;
5436 var isExtensible = Object.isExtensible || function () {
5437 return true;
5438 };
5439 var FREEZE = !__webpack_require__(27)(function () {
5440 return isExtensible(Object.preventExtensions({}));
5441 });
5442 var setMeta = function setMeta(it) {
5443 setDesc(it, META, { value: {
5444 i: 'O' + ++id, // object ID
5445 w: {} // weak collections IDs
5446 } });
5447 };
5448 var fastKey = function fastKey(it, create) {
5449 // return primitive with prefix
5450 if (!isObject(it)) return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
5451 if (!has(it, META)) {
5452 // can't set metadata to uncaught frozen object
5453 if (!isExtensible(it)) return 'F';
5454 // not necessary to add metadata
5455 if (!create) return 'E';
5456 // add missing metadata
5457 setMeta(it);
5458 // return object ID
5459 }return it[META].i;
5460 };
5461 var getWeak = function getWeak(it, create) {
5462 if (!has(it, META)) {
5463 // can't set metadata to uncaught frozen object
5464 if (!isExtensible(it)) return true;
5465 // not necessary to add metadata
5466 if (!create) return false;
5467 // add missing metadata
5468 setMeta(it);
5469 // return hash weak collections IDs
5470 }return it[META].w;
5471 };
5472 // add metadata on freeze-family methods calling
5473 var onFreeze = function onFreeze(it) {
5474 if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
5475 return it;
5476 };
5477 var meta = module.exports = {
5478 KEY: META,
5479 NEED: false,
5480 fastKey: fastKey,
5481 getWeak: getWeak,
5482 onFreeze: onFreeze
5483 };
5484
5485/***/ }),
5486/* 58 */
5487/***/ (function(module, exports, __webpack_require__) {
5488
5489 'use strict';
5490
5491 var isObject = __webpack_require__(16);
5492 module.exports = function (it, TYPE) {
5493 if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
5494 return it;
5495 };
5496
5497/***/ }),
5498/* 59 */
5499/***/ (function(module, exports, __webpack_require__) {
5500
5501 'use strict';
5502
5503 __webpack_require__(440);
5504 var global = __webpack_require__(15);
5505 var hide = __webpack_require__(29);
5506 var Iterators = __webpack_require__(56);
5507 var TO_STRING_TAG = __webpack_require__(13)('toStringTag');
5508
5509 var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(',');
5510
5511 for (var i = 0; i < DOMIterables.length; i++) {
5512 var NAME = DOMIterables[i];
5513 var Collection = global[NAME];
5514 var proto = Collection && Collection.prototype;
5515 if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
5516 Iterators[NAME] = Iterators.Array;
5517 }
5518
5519/***/ }),
5520/* 60 */
5521/***/ (function(module, exports) {
5522
5523 "use strict";
5524
5525 /**
5526 * A specialized version of `_.map` for arrays without support for iteratee
5527 * shorthands.
5528 *
5529 * @private
5530 * @param {Array} [array] The array to iterate over.
5531 * @param {Function} iteratee The function invoked per iteration.
5532 * @returns {Array} Returns the new mapped array.
5533 */
5534 function arrayMap(array, iteratee) {
5535 var index = -1,
5536 length = array == null ? 0 : array.length,
5537 result = Array(length);
5538
5539 while (++index < length) {
5540 result[index] = iteratee(array[index], index, array);
5541 }
5542 return result;
5543 }
5544
5545 module.exports = arrayMap;
5546
5547/***/ }),
5548/* 61 */
5549/***/ (function(module, exports, __webpack_require__) {
5550
5551 'use strict';
5552
5553 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5554
5555 var baseMatches = __webpack_require__(502),
5556 baseMatchesProperty = __webpack_require__(503),
5557 identity = __webpack_require__(110),
5558 isArray = __webpack_require__(6),
5559 property = __webpack_require__(592);
5560
5561 /**
5562 * The base implementation of `_.iteratee`.
5563 *
5564 * @private
5565 * @param {*} [value=_.identity] The value to convert to an iteratee.
5566 * @returns {Function} Returns the iteratee.
5567 */
5568 function baseIteratee(value) {
5569 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
5570 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
5571 if (typeof value == 'function') {
5572 return value;
5573 }
5574 if (value == null) {
5575 return identity;
5576 }
5577 if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object') {
5578 return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
5579 }
5580 return property(value);
5581 }
5582
5583 module.exports = baseIteratee;
5584
5585/***/ }),
5586/* 62 */
5587/***/ (function(module, exports, __webpack_require__) {
5588
5589 'use strict';
5590
5591 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5592
5593 var baseGetTag = __webpack_require__(30),
5594 isObjectLike = __webpack_require__(25);
5595
5596 /** `Object#toString` result references. */
5597 var symbolTag = '[object Symbol]';
5598
5599 /**
5600 * Checks if `value` is classified as a `Symbol` primitive or object.
5601 *
5602 * @static
5603 * @memberOf _
5604 * @since 4.0.0
5605 * @category Lang
5606 * @param {*} value The value to check.
5607 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
5608 * @example
5609 *
5610 * _.isSymbol(Symbol.iterator);
5611 * // => true
5612 *
5613 * _.isSymbol('abc');
5614 * // => false
5615 */
5616 function isSymbol(value) {
5617 return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
5618 }
5619
5620 module.exports = isSymbol;
5621
5622/***/ }),
5623/* 63 */
5624/***/ (function(module, exports) {
5625
5626 'use strict';
5627
5628 /* -*- Mode: js; js-indent-level: 2; -*- */
5629 /*
5630 * Copyright 2011 Mozilla Foundation and contributors
5631 * Licensed under the New BSD license. See LICENSE or:
5632 * http://opensource.org/licenses/BSD-3-Clause
5633 */
5634
5635 /**
5636 * This is a helper function for getting values from parameter/options
5637 * objects.
5638 *
5639 * @param args The object we are extracting values from
5640 * @param name The name of the property we are getting.
5641 * @param defaultValue An optional value to return if the property is missing
5642 * from the object. If this is not specified and the property is missing, an
5643 * error will be thrown.
5644 */
5645 function getArg(aArgs, aName, aDefaultValue) {
5646 if (aName in aArgs) {
5647 return aArgs[aName];
5648 } else if (arguments.length === 3) {
5649 return aDefaultValue;
5650 } else {
5651 throw new Error('"' + aName + '" is a required argument.');
5652 }
5653 }
5654 exports.getArg = getArg;
5655
5656 var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
5657 var dataUrlRegexp = /^data:.+\,.+$/;
5658
5659 function urlParse(aUrl) {
5660 var match = aUrl.match(urlRegexp);
5661 if (!match) {
5662 return null;
5663 }
5664 return {
5665 scheme: match[1],
5666 auth: match[2],
5667 host: match[3],
5668 port: match[4],
5669 path: match[5]
5670 };
5671 }
5672 exports.urlParse = urlParse;
5673
5674 function urlGenerate(aParsedUrl) {
5675 var url = '';
5676 if (aParsedUrl.scheme) {
5677 url += aParsedUrl.scheme + ':';
5678 }
5679 url += '//';
5680 if (aParsedUrl.auth) {
5681 url += aParsedUrl.auth + '@';
5682 }
5683 if (aParsedUrl.host) {
5684 url += aParsedUrl.host;
5685 }
5686 if (aParsedUrl.port) {
5687 url += ":" + aParsedUrl.port;
5688 }
5689 if (aParsedUrl.path) {
5690 url += aParsedUrl.path;
5691 }
5692 return url;
5693 }
5694 exports.urlGenerate = urlGenerate;
5695
5696 /**
5697 * Normalizes a path, or the path portion of a URL:
5698 *
5699 * - Replaces consecutive slashes with one slash.
5700 * - Removes unnecessary '.' parts.
5701 * - Removes unnecessary '<dir>/..' parts.
5702 *
5703 * Based on code in the Node.js 'path' core module.
5704 *
5705 * @param aPath The path or url to normalize.
5706 */
5707 function normalize(aPath) {
5708 var path = aPath;
5709 var url = urlParse(aPath);
5710 if (url) {
5711 if (!url.path) {
5712 return aPath;
5713 }
5714 path = url.path;
5715 }
5716 var isAbsolute = exports.isAbsolute(path);
5717
5718 var parts = path.split(/\/+/);
5719 for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
5720 part = parts[i];
5721 if (part === '.') {
5722 parts.splice(i, 1);
5723 } else if (part === '..') {
5724 up++;
5725 } else if (up > 0) {
5726 if (part === '') {
5727 // The first part is blank if the path is absolute. Trying to go
5728 // above the root is a no-op. Therefore we can remove all '..' parts
5729 // directly after the root.
5730 parts.splice(i + 1, up);
5731 up = 0;
5732 } else {
5733 parts.splice(i, 2);
5734 up--;
5735 }
5736 }
5737 }
5738 path = parts.join('/');
5739
5740 if (path === '') {
5741 path = isAbsolute ? '/' : '.';
5742 }
5743
5744 if (url) {
5745 url.path = path;
5746 return urlGenerate(url);
5747 }
5748 return path;
5749 }
5750 exports.normalize = normalize;
5751
5752 /**
5753 * Joins two paths/URLs.
5754 *
5755 * @param aRoot The root path or URL.
5756 * @param aPath The path or URL to be joined with the root.
5757 *
5758 * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
5759 * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
5760 * first.
5761 * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
5762 * is updated with the result and aRoot is returned. Otherwise the result
5763 * is returned.
5764 * - If aPath is absolute, the result is aPath.
5765 * - Otherwise the two paths are joined with a slash.
5766 * - Joining for example 'http://' and 'www.example.com' is also supported.
5767 */
5768 function join(aRoot, aPath) {
5769 if (aRoot === "") {
5770 aRoot = ".";
5771 }
5772 if (aPath === "") {
5773 aPath = ".";
5774 }
5775 var aPathUrl = urlParse(aPath);
5776 var aRootUrl = urlParse(aRoot);
5777 if (aRootUrl) {
5778 aRoot = aRootUrl.path || '/';
5779 }
5780
5781 // `join(foo, '//www.example.org')`
5782 if (aPathUrl && !aPathUrl.scheme) {
5783 if (aRootUrl) {
5784 aPathUrl.scheme = aRootUrl.scheme;
5785 }
5786 return urlGenerate(aPathUrl);
5787 }
5788
5789 if (aPathUrl || aPath.match(dataUrlRegexp)) {
5790 return aPath;
5791 }
5792
5793 // `join('http://', 'www.example.com')`
5794 if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
5795 aRootUrl.host = aPath;
5796 return urlGenerate(aRootUrl);
5797 }
5798
5799 var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
5800
5801 if (aRootUrl) {
5802 aRootUrl.path = joined;
5803 return urlGenerate(aRootUrl);
5804 }
5805 return joined;
5806 }
5807 exports.join = join;
5808
5809 exports.isAbsolute = function (aPath) {
5810 return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
5811 };
5812
5813 /**
5814 * Make a path relative to a URL or another path.
5815 *
5816 * @param aRoot The root path or URL.
5817 * @param aPath The path or URL to be made relative to aRoot.
5818 */
5819 function relative(aRoot, aPath) {
5820 if (aRoot === "") {
5821 aRoot = ".";
5822 }
5823
5824 aRoot = aRoot.replace(/\/$/, '');
5825
5826 // It is possible for the path to be above the root. In this case, simply
5827 // checking whether the root is a prefix of the path won't work. Instead, we
5828 // need to remove components from the root one by one, until either we find
5829 // a prefix that fits, or we run out of components to remove.
5830 var level = 0;
5831 while (aPath.indexOf(aRoot + '/') !== 0) {
5832 var index = aRoot.lastIndexOf("/");
5833 if (index < 0) {
5834 return aPath;
5835 }
5836
5837 // If the only part of the root that is left is the scheme (i.e. http://,
5838 // file:///, etc.), one or more slashes (/), or simply nothing at all, we
5839 // have exhausted all components, so the path is not relative to the root.
5840 aRoot = aRoot.slice(0, index);
5841 if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
5842 return aPath;
5843 }
5844
5845 ++level;
5846 }
5847
5848 // Make sure we add a "../" for each component we removed from the root.
5849 return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
5850 }
5851 exports.relative = relative;
5852
5853 var supportsNullProto = function () {
5854 var obj = Object.create(null);
5855 return !('__proto__' in obj);
5856 }();
5857
5858 function identity(s) {
5859 return s;
5860 }
5861
5862 /**
5863 * Because behavior goes wacky when you set `__proto__` on objects, we
5864 * have to prefix all the strings in our set with an arbitrary character.
5865 *
5866 * See https://github.com/mozilla/source-map/pull/31 and
5867 * https://github.com/mozilla/source-map/issues/30
5868 *
5869 * @param String aStr
5870 */
5871 function toSetString(aStr) {
5872 if (isProtoString(aStr)) {
5873 return '$' + aStr;
5874 }
5875
5876 return aStr;
5877 }
5878 exports.toSetString = supportsNullProto ? identity : toSetString;
5879
5880 function fromSetString(aStr) {
5881 if (isProtoString(aStr)) {
5882 return aStr.slice(1);
5883 }
5884
5885 return aStr;
5886 }
5887 exports.fromSetString = supportsNullProto ? identity : fromSetString;
5888
5889 function isProtoString(s) {
5890 if (!s) {
5891 return false;
5892 }
5893
5894 var length = s.length;
5895
5896 if (length < 9 /* "__proto__".length */) {
5897 return false;
5898 }
5899
5900 if (s.charCodeAt(length - 1) !== 95 /* '_' */ || s.charCodeAt(length - 2) !== 95 /* '_' */ || s.charCodeAt(length - 3) !== 111 /* 'o' */ || s.charCodeAt(length - 4) !== 116 /* 't' */ || s.charCodeAt(length - 5) !== 111 /* 'o' */ || s.charCodeAt(length - 6) !== 114 /* 'r' */ || s.charCodeAt(length - 7) !== 112 /* 'p' */ || s.charCodeAt(length - 8) !== 95 /* '_' */ || s.charCodeAt(length - 9) !== 95 /* '_' */) {
5901 return false;
5902 }
5903
5904 for (var i = length - 10; i >= 0; i--) {
5905 if (s.charCodeAt(i) !== 36 /* '$' */) {
5906 return false;
5907 }
5908 }
5909
5910 return true;
5911 }
5912
5913 /**
5914 * Comparator between two mappings where the original positions are compared.
5915 *
5916 * Optionally pass in `true` as `onlyCompareGenerated` to consider two
5917 * mappings with the same original source/line/column, but different generated
5918 * line and column the same. Useful when searching for a mapping with a
5919 * stubbed out mapping.
5920 */
5921 function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
5922 var cmp = mappingA.source - mappingB.source;
5923 if (cmp !== 0) {
5924 return cmp;
5925 }
5926
5927 cmp = mappingA.originalLine - mappingB.originalLine;
5928 if (cmp !== 0) {
5929 return cmp;
5930 }
5931
5932 cmp = mappingA.originalColumn - mappingB.originalColumn;
5933 if (cmp !== 0 || onlyCompareOriginal) {
5934 return cmp;
5935 }
5936
5937 cmp = mappingA.generatedColumn - mappingB.generatedColumn;
5938 if (cmp !== 0) {
5939 return cmp;
5940 }
5941
5942 cmp = mappingA.generatedLine - mappingB.generatedLine;
5943 if (cmp !== 0) {
5944 return cmp;
5945 }
5946
5947 return mappingA.name - mappingB.name;
5948 }
5949 exports.compareByOriginalPositions = compareByOriginalPositions;
5950
5951 /**
5952 * Comparator between two mappings with deflated source and name indices where
5953 * the generated positions are compared.
5954 *
5955 * Optionally pass in `true` as `onlyCompareGenerated` to consider two
5956 * mappings with the same generated line and column, but different
5957 * source/name/original line and column the same. Useful when searching for a
5958 * mapping with a stubbed out mapping.
5959 */
5960 function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
5961 var cmp = mappingA.generatedLine - mappingB.generatedLine;
5962 if (cmp !== 0) {
5963 return cmp;
5964 }
5965
5966 cmp = mappingA.generatedColumn - mappingB.generatedColumn;
5967 if (cmp !== 0 || onlyCompareGenerated) {
5968 return cmp;
5969 }
5970
5971 cmp = mappingA.source - mappingB.source;
5972 if (cmp !== 0) {
5973 return cmp;
5974 }
5975
5976 cmp = mappingA.originalLine - mappingB.originalLine;
5977 if (cmp !== 0) {
5978 return cmp;
5979 }
5980
5981 cmp = mappingA.originalColumn - mappingB.originalColumn;
5982 if (cmp !== 0) {
5983 return cmp;
5984 }
5985
5986 return mappingA.name - mappingB.name;
5987 }
5988 exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
5989
5990 function strcmp(aStr1, aStr2) {
5991 if (aStr1 === aStr2) {
5992 return 0;
5993 }
5994
5995 if (aStr1 > aStr2) {
5996 return 1;
5997 }
5998
5999 return -1;
6000 }
6001
6002 /**
6003 * Comparator between two mappings with inflated source and name strings where
6004 * the generated positions are compared.
6005 */
6006 function compareByGeneratedPositionsInflated(mappingA, mappingB) {
6007 var cmp = mappingA.generatedLine - mappingB.generatedLine;
6008 if (cmp !== 0) {
6009 return cmp;
6010 }
6011
6012 cmp = mappingA.generatedColumn - mappingB.generatedColumn;
6013 if (cmp !== 0) {
6014 return cmp;
6015 }
6016
6017 cmp = strcmp(mappingA.source, mappingB.source);
6018 if (cmp !== 0) {
6019 return cmp;
6020 }
6021
6022 cmp = mappingA.originalLine - mappingB.originalLine;
6023 if (cmp !== 0) {
6024 return cmp;
6025 }
6026
6027 cmp = mappingA.originalColumn - mappingB.originalColumn;
6028 if (cmp !== 0) {
6029 return cmp;
6030 }
6031
6032 return strcmp(mappingA.name, mappingB.name);
6033 }
6034 exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
6035
6036/***/ }),
6037/* 64 */
6038/***/ (function(module, exports, __webpack_require__) {
6039
6040 /* WEBPACK VAR INJECTION */(function(global) {'use strict';
6041
6042 // compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js
6043 // original notice:
6044
6045 /*!
6046 * The buffer module from node.js, for the browser.
6047 *
6048 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
6049 * @license MIT
6050 */
6051
6052 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
6053
6054 function compare(a, b) {
6055 if (a === b) {
6056 return 0;
6057 }
6058
6059 var x = a.length;
6060 var y = b.length;
6061
6062 for (var i = 0, len = Math.min(x, y); i < len; ++i) {
6063 if (a[i] !== b[i]) {
6064 x = a[i];
6065 y = b[i];
6066 break;
6067 }
6068 }
6069
6070 if (x < y) {
6071 return -1;
6072 }
6073 if (y < x) {
6074 return 1;
6075 }
6076 return 0;
6077 }
6078 function isBuffer(b) {
6079 if (global.Buffer && typeof global.Buffer.isBuffer === 'function') {
6080 return global.Buffer.isBuffer(b);
6081 }
6082 return !!(b != null && b._isBuffer);
6083 }
6084
6085 // based on node assert, original notice:
6086
6087 // http://wiki.commonjs.org/wiki/Unit_Testing/1.0
6088 //
6089 // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
6090 //
6091 // Originally from narwhal.js (http://narwhaljs.org)
6092 // Copyright (c) 2009 Thomas Robinson <280north.com>
6093 //
6094 // Permission is hereby granted, free of charge, to any person obtaining a copy
6095 // of this software and associated documentation files (the 'Software'), to
6096 // deal in the Software without restriction, including without limitation the
6097 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
6098 // sell copies of the Software, and to permit persons to whom the Software is
6099 // furnished to do so, subject to the following conditions:
6100 //
6101 // The above copyright notice and this permission notice shall be included in
6102 // all copies or substantial portions of the Software.
6103 //
6104 // THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6105 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6106 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6107 // AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
6108 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
6109 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6110
6111 var util = __webpack_require__(117);
6112 var hasOwn = Object.prototype.hasOwnProperty;
6113 var pSlice = Array.prototype.slice;
6114 var functionsHaveNames = function () {
6115 return function foo() {}.name === 'foo';
6116 }();
6117 function pToString(obj) {
6118 return Object.prototype.toString.call(obj);
6119 }
6120 function isView(arrbuf) {
6121 if (isBuffer(arrbuf)) {
6122 return false;
6123 }
6124 if (typeof global.ArrayBuffer !== 'function') {
6125 return false;
6126 }
6127 if (typeof ArrayBuffer.isView === 'function') {
6128 return ArrayBuffer.isView(arrbuf);
6129 }
6130 if (!arrbuf) {
6131 return false;
6132 }
6133 if (arrbuf instanceof DataView) {
6134 return true;
6135 }
6136 if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
6137 return true;
6138 }
6139 return false;
6140 }
6141 // 1. The assert module provides functions that throw
6142 // AssertionError's when particular conditions are not met. The
6143 // assert module must conform to the following interface.
6144
6145 var assert = module.exports = ok;
6146
6147 // 2. The AssertionError is defined in assert.
6148 // new assert.AssertionError({ message: message,
6149 // actual: actual,
6150 // expected: expected })
6151
6152 var regex = /\s*function\s+([^\(\s]*)\s*/;
6153 // based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js
6154 function getName(func) {
6155 if (!util.isFunction(func)) {
6156 return;
6157 }
6158 if (functionsHaveNames) {
6159 return func.name;
6160 }
6161 var str = func.toString();
6162 var match = str.match(regex);
6163 return match && match[1];
6164 }
6165 assert.AssertionError = function AssertionError(options) {
6166 this.name = 'AssertionError';
6167 this.actual = options.actual;
6168 this.expected = options.expected;
6169 this.operator = options.operator;
6170 if (options.message) {
6171 this.message = options.message;
6172 this.generatedMessage = false;
6173 } else {
6174 this.message = getMessage(this);
6175 this.generatedMessage = true;
6176 }
6177 var stackStartFunction = options.stackStartFunction || fail;
6178 if (Error.captureStackTrace) {
6179 Error.captureStackTrace(this, stackStartFunction);
6180 } else {
6181 // non v8 browsers so we can have a stacktrace
6182 var err = new Error();
6183 if (err.stack) {
6184 var out = err.stack;
6185
6186 // try to strip useless frames
6187 var fn_name = getName(stackStartFunction);
6188 var idx = out.indexOf('\n' + fn_name);
6189 if (idx >= 0) {
6190 // once we have located the function frame
6191 // we need to strip out everything before it (and its line)
6192 var next_line = out.indexOf('\n', idx + 1);
6193 out = out.substring(next_line + 1);
6194 }
6195
6196 this.stack = out;
6197 }
6198 }
6199 };
6200
6201 // assert.AssertionError instanceof Error
6202 util.inherits(assert.AssertionError, Error);
6203
6204 function truncate(s, n) {
6205 if (typeof s === 'string') {
6206 return s.length < n ? s : s.slice(0, n);
6207 } else {
6208 return s;
6209 }
6210 }
6211 function inspect(something) {
6212 if (functionsHaveNames || !util.isFunction(something)) {
6213 return util.inspect(something);
6214 }
6215 var rawname = getName(something);
6216 var name = rawname ? ': ' + rawname : '';
6217 return '[Function' + name + ']';
6218 }
6219 function getMessage(self) {
6220 return truncate(inspect(self.actual), 128) + ' ' + self.operator + ' ' + truncate(inspect(self.expected), 128);
6221 }
6222
6223 // At present only the three keys mentioned above are used and
6224 // understood by the spec. Implementations or sub modules can pass
6225 // other keys to the AssertionError's constructor - they will be
6226 // ignored.
6227
6228 // 3. All of the following functions must throw an AssertionError
6229 // when a corresponding condition is not met, with a message that
6230 // may be undefined if not provided. All assertion methods provide
6231 // both the actual and expected values to the assertion error for
6232 // display purposes.
6233
6234 function fail(actual, expected, message, operator, stackStartFunction) {
6235 throw new assert.AssertionError({
6236 message: message,
6237 actual: actual,
6238 expected: expected,
6239 operator: operator,
6240 stackStartFunction: stackStartFunction
6241 });
6242 }
6243
6244 // EXTENSION! allows for well behaved errors defined elsewhere.
6245 assert.fail = fail;
6246
6247 // 4. Pure assertion tests whether a value is truthy, as determined
6248 // by !!guard.
6249 // assert.ok(guard, message_opt);
6250 // This statement is equivalent to assert.equal(true, !!guard,
6251 // message_opt);. To test strictly for the value true, use
6252 // assert.strictEqual(true, guard, message_opt);.
6253
6254 function ok(value, message) {
6255 if (!value) fail(value, true, message, '==', assert.ok);
6256 }
6257 assert.ok = ok;
6258
6259 // 5. The equality assertion tests shallow, coercive equality with
6260 // ==.
6261 // assert.equal(actual, expected, message_opt);
6262
6263 assert.equal = function equal(actual, expected, message) {
6264 if (actual != expected) fail(actual, expected, message, '==', assert.equal);
6265 };
6266
6267 // 6. The non-equality assertion tests for whether two objects are not equal
6268 // with != assert.notEqual(actual, expected, message_opt);
6269
6270 assert.notEqual = function notEqual(actual, expected, message) {
6271 if (actual == expected) {
6272 fail(actual, expected, message, '!=', assert.notEqual);
6273 }
6274 };
6275
6276 // 7. The equivalence assertion tests a deep equality relation.
6277 // assert.deepEqual(actual, expected, message_opt);
6278
6279 assert.deepEqual = function deepEqual(actual, expected, message) {
6280 if (!_deepEqual(actual, expected, false)) {
6281 fail(actual, expected, message, 'deepEqual', assert.deepEqual);
6282 }
6283 };
6284
6285 assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
6286 if (!_deepEqual(actual, expected, true)) {
6287 fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);
6288 }
6289 };
6290
6291 function _deepEqual(actual, expected, strict, memos) {
6292 // 7.1. All identical values are equivalent, as determined by ===.
6293 if (actual === expected) {
6294 return true;
6295 } else if (isBuffer(actual) && isBuffer(expected)) {
6296 return compare(actual, expected) === 0;
6297
6298 // 7.2. If the expected value is a Date object, the actual value is
6299 // equivalent if it is also a Date object that refers to the same time.
6300 } else if (util.isDate(actual) && util.isDate(expected)) {
6301 return actual.getTime() === expected.getTime();
6302
6303 // 7.3 If the expected value is a RegExp object, the actual value is
6304 // equivalent if it is also a RegExp object with the same source and
6305 // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
6306 } else if (util.isRegExp(actual) && util.isRegExp(expected)) {
6307 return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase;
6308
6309 // 7.4. Other pairs that do not both pass typeof value == 'object',
6310 // equivalence is determined by ==.
6311 } else if ((actual === null || (typeof actual === 'undefined' ? 'undefined' : _typeof(actual)) !== 'object') && (expected === null || (typeof expected === 'undefined' ? 'undefined' : _typeof(expected)) !== 'object')) {
6312 return strict ? actual === expected : actual == expected;
6313
6314 // If both values are instances of typed arrays, wrap their underlying
6315 // ArrayBuffers in a Buffer each to increase performance
6316 // This optimization requires the arrays to have the same type as checked by
6317 // Object.prototype.toString (aka pToString). Never perform binary
6318 // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
6319 // bit patterns are not identical.
6320 } else if (isView(actual) && isView(expected) && pToString(actual) === pToString(expected) && !(actual instanceof Float32Array || actual instanceof Float64Array)) {
6321 return compare(new Uint8Array(actual.buffer), new Uint8Array(expected.buffer)) === 0;
6322
6323 // 7.5 For all other Object pairs, including Array objects, equivalence is
6324 // determined by having the same number of owned properties (as verified
6325 // with Object.prototype.hasOwnProperty.call), the same set of keys
6326 // (although not necessarily the same order), equivalent values for every
6327 // corresponding key, and an identical 'prototype' property. Note: this
6328 // accounts for both named and indexed properties on Arrays.
6329 } else if (isBuffer(actual) !== isBuffer(expected)) {
6330 return false;
6331 } else {
6332 memos = memos || { actual: [], expected: [] };
6333
6334 var actualIndex = memos.actual.indexOf(actual);
6335 if (actualIndex !== -1) {
6336 if (actualIndex === memos.expected.indexOf(expected)) {
6337 return true;
6338 }
6339 }
6340
6341 memos.actual.push(actual);
6342 memos.expected.push(expected);
6343
6344 return objEquiv(actual, expected, strict, memos);
6345 }
6346 }
6347
6348 function isArguments(object) {
6349 return Object.prototype.toString.call(object) == '[object Arguments]';
6350 }
6351
6352 function objEquiv(a, b, strict, actualVisitedObjects) {
6353 if (a === null || a === undefined || b === null || b === undefined) return false;
6354 // if one is a primitive, the other must be same
6355 if (util.isPrimitive(a) || util.isPrimitive(b)) return a === b;
6356 if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false;
6357 var aIsArgs = isArguments(a);
6358 var bIsArgs = isArguments(b);
6359 if (aIsArgs && !bIsArgs || !aIsArgs && bIsArgs) return false;
6360 if (aIsArgs) {
6361 a = pSlice.call(a);
6362 b = pSlice.call(b);
6363 return _deepEqual(a, b, strict);
6364 }
6365 var ka = objectKeys(a);
6366 var kb = objectKeys(b);
6367 var key, i;
6368 // having the same number of owned properties (keys incorporates
6369 // hasOwnProperty)
6370 if (ka.length !== kb.length) return false;
6371 //the same set of keys (although not necessarily the same order),
6372 ka.sort();
6373 kb.sort();
6374 //~~~cheap key test
6375 for (i = ka.length - 1; i >= 0; i--) {
6376 if (ka[i] !== kb[i]) return false;
6377 }
6378 //equivalent values for every corresponding key, and
6379 //~~~possibly expensive deep test
6380 for (i = ka.length - 1; i >= 0; i--) {
6381 key = ka[i];
6382 if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) return false;
6383 }
6384 return true;
6385 }
6386
6387 // 8. The non-equivalence assertion tests for any deep inequality.
6388 // assert.notDeepEqual(actual, expected, message_opt);
6389
6390 assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
6391 if (_deepEqual(actual, expected, false)) {
6392 fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
6393 }
6394 };
6395
6396 assert.notDeepStrictEqual = notDeepStrictEqual;
6397 function notDeepStrictEqual(actual, expected, message) {
6398 if (_deepEqual(actual, expected, true)) {
6399 fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
6400 }
6401 }
6402
6403 // 9. The strict equality assertion tests strict equality, as determined by ===.
6404 // assert.strictEqual(actual, expected, message_opt);
6405
6406 assert.strictEqual = function strictEqual(actual, expected, message) {
6407 if (actual !== expected) {
6408 fail(actual, expected, message, '===', assert.strictEqual);
6409 }
6410 };
6411
6412 // 10. The strict non-equality assertion tests for strict inequality, as
6413 // determined by !==. assert.notStrictEqual(actual, expected, message_opt);
6414
6415 assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
6416 if (actual === expected) {
6417 fail(actual, expected, message, '!==', assert.notStrictEqual);
6418 }
6419 };
6420
6421 function expectedException(actual, expected) {
6422 if (!actual || !expected) {
6423 return false;
6424 }
6425
6426 if (Object.prototype.toString.call(expected) == '[object RegExp]') {
6427 return expected.test(actual);
6428 }
6429
6430 try {
6431 if (actual instanceof expected) {
6432 return true;
6433 }
6434 } catch (e) {
6435 // Ignore. The instanceof check doesn't work for arrow functions.
6436 }
6437
6438 if (Error.isPrototypeOf(expected)) {
6439 return false;
6440 }
6441
6442 return expected.call({}, actual) === true;
6443 }
6444
6445 function _tryBlock(block) {
6446 var error;
6447 try {
6448 block();
6449 } catch (e) {
6450 error = e;
6451 }
6452 return error;
6453 }
6454
6455 function _throws(shouldThrow, block, expected, message) {
6456 var actual;
6457
6458 if (typeof block !== 'function') {
6459 throw new TypeError('"block" argument must be a function');
6460 }
6461
6462 if (typeof expected === 'string') {
6463 message = expected;
6464 expected = null;
6465 }
6466
6467 actual = _tryBlock(block);
6468
6469 message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + (message ? ' ' + message : '.');
6470
6471 if (shouldThrow && !actual) {
6472 fail(actual, expected, 'Missing expected exception' + message);
6473 }
6474
6475 var userProvidedMessage = typeof message === 'string';
6476 var isUnwantedException = !shouldThrow && util.isError(actual);
6477 var isUnexpectedException = !shouldThrow && actual && !expected;
6478
6479 if (isUnwantedException && userProvidedMessage && expectedException(actual, expected) || isUnexpectedException) {
6480 fail(actual, expected, 'Got unwanted exception' + message);
6481 }
6482
6483 if (shouldThrow && actual && expected && !expectedException(actual, expected) || !shouldThrow && actual) {
6484 throw actual;
6485 }
6486 }
6487
6488 // 11. Expected to throw an error:
6489 // assert.throws(block, Error_opt, message_opt);
6490
6491 assert.throws = function (block, /*optional*/error, /*optional*/message) {
6492 _throws(true, block, error, message);
6493 };
6494
6495 // EXTENSION! This is annoying to write outside this module.
6496 assert.doesNotThrow = function (block, /*optional*/error, /*optional*/message) {
6497 _throws(false, block, error, message);
6498 };
6499
6500 assert.ifError = function (err) {
6501 if (err) throw err;
6502 };
6503
6504 var objectKeys = Object.keys || function (obj) {
6505 var keys = [];
6506 for (var key in obj) {
6507 if (hasOwn.call(obj, key)) keys.push(key);
6508 }
6509 return keys;
6510 };
6511 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
6512
6513/***/ }),
6514/* 65 */
6515/***/ (function(module, exports, __webpack_require__) {
6516
6517 "use strict";
6518
6519 exports.__esModule = true;
6520
6521 var _getIterator2 = __webpack_require__(2);
6522
6523 var _getIterator3 = _interopRequireDefault(_getIterator2);
6524
6525 var _classCallCheck2 = __webpack_require__(3);
6526
6527 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
6528
6529 var _possibleConstructorReturn2 = __webpack_require__(42);
6530
6531 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
6532
6533 var _inherits2 = __webpack_require__(41);
6534
6535 var _inherits3 = _interopRequireDefault(_inherits2);
6536
6537 var _optionManager = __webpack_require__(34);
6538
6539 var _optionManager2 = _interopRequireDefault(_optionManager);
6540
6541 var _babelMessages = __webpack_require__(20);
6542
6543 var messages = _interopRequireWildcard(_babelMessages);
6544
6545 var _store = __webpack_require__(119);
6546
6547 var _store2 = _interopRequireDefault(_store);
6548
6549 var _babelTraverse = __webpack_require__(7);
6550
6551 var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
6552
6553 var _assign = __webpack_require__(174);
6554
6555 var _assign2 = _interopRequireDefault(_assign);
6556
6557 var _clone = __webpack_require__(109);
6558
6559 var _clone2 = _interopRequireDefault(_clone);
6560
6561 function _interopRequireWildcard(obj) {
6562 if (obj && obj.__esModule) {
6563 return obj;
6564 } else {
6565 var newObj = {};if (obj != null) {
6566 for (var key in obj) {
6567 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
6568 }
6569 }newObj.default = obj;return newObj;
6570 }
6571 }
6572
6573 function _interopRequireDefault(obj) {
6574 return obj && obj.__esModule ? obj : { default: obj };
6575 }
6576
6577 var GLOBAL_VISITOR_PROPS = ["enter", "exit"];
6578
6579 var Plugin = function (_Store) {
6580 (0, _inherits3.default)(Plugin, _Store);
6581
6582 function Plugin(plugin, key) {
6583 (0, _classCallCheck3.default)(this, Plugin);
6584
6585 var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
6586
6587 _this.initialized = false;
6588 _this.raw = (0, _assign2.default)({}, plugin);
6589 _this.key = _this.take("name") || key;
6590
6591 _this.manipulateOptions = _this.take("manipulateOptions");
6592 _this.post = _this.take("post");
6593 _this.pre = _this.take("pre");
6594 _this.visitor = _this.normaliseVisitor((0, _clone2.default)(_this.take("visitor")) || {});
6595 return _this;
6596 }
6597
6598 Plugin.prototype.take = function take(key) {
6599 var val = this.raw[key];
6600 delete this.raw[key];
6601 return val;
6602 };
6603
6604 Plugin.prototype.chain = function chain(target, key) {
6605 if (!target[key]) return this[key];
6606 if (!this[key]) return target[key];
6607
6608 var fns = [target[key], this[key]];
6609
6610 return function () {
6611 var val = void 0;
6612
6613 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
6614 args[_key] = arguments[_key];
6615 }
6616
6617 for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
6618 var _ref;
6619
6620 if (_isArray) {
6621 if (_i >= _iterator.length) break;
6622 _ref = _iterator[_i++];
6623 } else {
6624 _i = _iterator.next();
6625 if (_i.done) break;
6626 _ref = _i.value;
6627 }
6628
6629 var fn = _ref;
6630
6631 if (fn) {
6632 var ret = fn.apply(this, args);
6633 if (ret != null) val = ret;
6634 }
6635 }
6636 return val;
6637 };
6638 };
6639
6640 Plugin.prototype.maybeInherit = function maybeInherit(loc) {
6641 var inherits = this.take("inherits");
6642 if (!inherits) return;
6643
6644 inherits = _optionManager2.default.normalisePlugin(inherits, loc, "inherits");
6645
6646 this.manipulateOptions = this.chain(inherits, "manipulateOptions");
6647 this.post = this.chain(inherits, "post");
6648 this.pre = this.chain(inherits, "pre");
6649 this.visitor = _babelTraverse2.default.visitors.merge([inherits.visitor, this.visitor]);
6650 };
6651
6652 Plugin.prototype.init = function init(loc, i) {
6653 if (this.initialized) return;
6654 this.initialized = true;
6655
6656 this.maybeInherit(loc);
6657
6658 for (var key in this.raw) {
6659 throw new Error(messages.get("pluginInvalidProperty", loc, i, key));
6660 }
6661 };
6662
6663 Plugin.prototype.normaliseVisitor = function normaliseVisitor(visitor) {
6664 for (var _iterator2 = GLOBAL_VISITOR_PROPS, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
6665 var _ref2;
6666
6667 if (_isArray2) {
6668 if (_i2 >= _iterator2.length) break;
6669 _ref2 = _iterator2[_i2++];
6670 } else {
6671 _i2 = _iterator2.next();
6672 if (_i2.done) break;
6673 _ref2 = _i2.value;
6674 }
6675
6676 var key = _ref2;
6677
6678 if (visitor[key]) {
6679 throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. " + "Please target individual nodes.");
6680 }
6681 }
6682
6683 _babelTraverse2.default.explode(visitor);
6684 return visitor;
6685 };
6686
6687 return Plugin;
6688 }(_store2.default);
6689
6690 exports.default = Plugin;
6691 module.exports = exports["default"];
6692
6693/***/ }),
6694/* 66 */
6695/***/ (function(module, exports, __webpack_require__) {
6696
6697 "use strict";
6698
6699 exports.__esModule = true;
6700
6701 var _getIterator2 = __webpack_require__(2);
6702
6703 var _getIterator3 = _interopRequireDefault(_getIterator2);
6704
6705 exports.default = function (_ref) {
6706 var messages = _ref.messages;
6707
6708 return {
6709 visitor: {
6710 Scope: function Scope(_ref2) {
6711 var scope = _ref2.scope;
6712
6713 for (var name in scope.bindings) {
6714 var binding = scope.bindings[name];
6715 if (binding.kind !== "const" && binding.kind !== "module") continue;
6716
6717 for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
6718 var _ref3;
6719
6720 if (_isArray) {
6721 if (_i >= _iterator.length) break;
6722 _ref3 = _iterator[_i++];
6723 } else {
6724 _i = _iterator.next();
6725 if (_i.done) break;
6726 _ref3 = _i.value;
6727 }
6728
6729 var violation = _ref3;
6730
6731 throw violation.buildCodeFrameError(messages.get("readOnly", name));
6732 }
6733 }
6734 }
6735 }
6736 };
6737 };
6738
6739 function _interopRequireDefault(obj) {
6740 return obj && obj.__esModule ? obj : { default: obj };
6741 }
6742
6743 module.exports = exports["default"];
6744
6745/***/ }),
6746/* 67 */
6747/***/ (function(module, exports) {
6748
6749 "use strict";
6750
6751 exports.__esModule = true;
6752
6753 exports.default = function () {
6754 return {
6755 manipulateOptions: function manipulateOptions(opts, parserOpts) {
6756 parserOpts.plugins.push("asyncFunctions");
6757 }
6758 };
6759 };
6760
6761 module.exports = exports["default"];
6762
6763/***/ }),
6764/* 68 */
6765/***/ (function(module, exports) {
6766
6767 "use strict";
6768
6769 exports.__esModule = true;
6770
6771 exports.default = function (_ref) {
6772 var t = _ref.types;
6773
6774 return {
6775 visitor: {
6776 ArrowFunctionExpression: function ArrowFunctionExpression(path, state) {
6777 if (state.opts.spec) {
6778 var node = path.node;
6779
6780 if (node.shadow) return;
6781
6782 node.shadow = { this: false };
6783 node.type = "FunctionExpression";
6784
6785 var boundThis = t.thisExpression();
6786 boundThis._forceShadow = path;
6787
6788 path.ensureBlock();
6789 path.get("body").unshiftContainer("body", t.expressionStatement(t.callExpression(state.addHelper("newArrowCheck"), [t.thisExpression(), boundThis])));
6790
6791 path.replaceWith(t.callExpression(t.memberExpression(node, t.identifier("bind")), [t.thisExpression()]));
6792 } else {
6793 path.arrowFunctionToShadowed();
6794 }
6795 }
6796 }
6797 };
6798 };
6799
6800 module.exports = exports["default"];
6801
6802/***/ }),
6803/* 69 */
6804/***/ (function(module, exports, __webpack_require__) {
6805
6806 "use strict";
6807
6808 exports.__esModule = true;
6809
6810 var _getIterator2 = __webpack_require__(2);
6811
6812 var _getIterator3 = _interopRequireDefault(_getIterator2);
6813
6814 exports.default = function (_ref) {
6815 var t = _ref.types;
6816
6817 function statementList(key, path) {
6818 var paths = path.get(key);
6819
6820 for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
6821 var _ref2;
6822
6823 if (_isArray) {
6824 if (_i >= _iterator.length) break;
6825 _ref2 = _iterator[_i++];
6826 } else {
6827 _i = _iterator.next();
6828 if (_i.done) break;
6829 _ref2 = _i.value;
6830 }
6831
6832 var _path = _ref2;
6833
6834 var func = _path.node;
6835 if (!_path.isFunctionDeclaration()) continue;
6836
6837 var declar = t.variableDeclaration("let", [t.variableDeclarator(func.id, t.toExpression(func))]);
6838
6839 declar._blockHoist = 2;
6840
6841 func.id = null;
6842
6843 _path.replaceWith(declar);
6844 }
6845 }
6846
6847 return {
6848 visitor: {
6849 BlockStatement: function BlockStatement(path) {
6850 var node = path.node,
6851 parent = path.parent;
6852
6853 if (t.isFunction(parent, { body: node }) || t.isExportDeclaration(parent)) {
6854 return;
6855 }
6856
6857 statementList("body", path);
6858 },
6859 SwitchCase: function SwitchCase(path) {
6860 statementList("consequent", path);
6861 }
6862 }
6863 };
6864 };
6865
6866 function _interopRequireDefault(obj) {
6867 return obj && obj.__esModule ? obj : { default: obj };
6868 }
6869
6870 module.exports = exports["default"];
6871
6872/***/ }),
6873/* 70 */
6874/***/ (function(module, exports, __webpack_require__) {
6875
6876 "use strict";
6877
6878 exports.__esModule = true;
6879
6880 var _symbol = __webpack_require__(10);
6881
6882 var _symbol2 = _interopRequireDefault(_symbol);
6883
6884 var _create = __webpack_require__(9);
6885
6886 var _create2 = _interopRequireDefault(_create);
6887
6888 var _classCallCheck2 = __webpack_require__(3);
6889
6890 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
6891
6892 exports.default = function () {
6893 return {
6894 visitor: {
6895 VariableDeclaration: function VariableDeclaration(path, file) {
6896 var node = path.node,
6897 parent = path.parent,
6898 scope = path.scope;
6899
6900 if (!isBlockScoped(node)) return;
6901 convertBlockScopedToVar(path, null, parent, scope, true);
6902
6903 if (node._tdzThis) {
6904 var nodes = [node];
6905
6906 for (var i = 0; i < node.declarations.length; i++) {
6907 var decl = node.declarations[i];
6908 if (decl.init) {
6909 var assign = t.assignmentExpression("=", decl.id, decl.init);
6910 assign._ignoreBlockScopingTDZ = true;
6911 nodes.push(t.expressionStatement(assign));
6912 }
6913 decl.init = file.addHelper("temporalUndefined");
6914 }
6915
6916 node._blockHoist = 2;
6917
6918 if (path.isCompletionRecord()) {
6919 nodes.push(t.expressionStatement(scope.buildUndefinedNode()));
6920 }
6921
6922 path.replaceWithMultiple(nodes);
6923 }
6924 },
6925 Loop: function Loop(path, file) {
6926 var node = path.node,
6927 parent = path.parent,
6928 scope = path.scope;
6929
6930 t.ensureBlock(node);
6931 var blockScoping = new BlockScoping(path, path.get("body"), parent, scope, file);
6932 var replace = blockScoping.run();
6933 if (replace) path.replaceWith(replace);
6934 },
6935 CatchClause: function CatchClause(path, file) {
6936 var parent = path.parent,
6937 scope = path.scope;
6938
6939 var blockScoping = new BlockScoping(null, path.get("body"), parent, scope, file);
6940 blockScoping.run();
6941 },
6942 "BlockStatement|SwitchStatement|Program": function BlockStatementSwitchStatementProgram(path, file) {
6943 if (!ignoreBlock(path)) {
6944 var blockScoping = new BlockScoping(null, path, path.parent, path.scope, file);
6945 blockScoping.run();
6946 }
6947 }
6948 }
6949 };
6950 };
6951
6952 var _babelTraverse = __webpack_require__(7);
6953
6954 var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
6955
6956 var _tdz = __webpack_require__(330);
6957
6958 var _babelTypes = __webpack_require__(1);
6959
6960 var t = _interopRequireWildcard(_babelTypes);
6961
6962 var _values = __webpack_require__(280);
6963
6964 var _values2 = _interopRequireDefault(_values);
6965
6966 var _extend = __webpack_require__(578);
6967
6968 var _extend2 = _interopRequireDefault(_extend);
6969
6970 var _babelTemplate = __webpack_require__(4);
6971
6972 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
6973
6974 function _interopRequireWildcard(obj) {
6975 if (obj && obj.__esModule) {
6976 return obj;
6977 } else {
6978 var newObj = {};if (obj != null) {
6979 for (var key in obj) {
6980 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
6981 }
6982 }newObj.default = obj;return newObj;
6983 }
6984 }
6985
6986 function _interopRequireDefault(obj) {
6987 return obj && obj.__esModule ? obj : { default: obj };
6988 }
6989
6990 function ignoreBlock(path) {
6991 return t.isLoop(path.parent) || t.isCatchClause(path.parent);
6992 }
6993
6994 var buildRetCheck = (0, _babelTemplate2.default)("\n if (typeof RETURN === \"object\") return RETURN.v;\n");
6995
6996 function isBlockScoped(node) {
6997 if (!t.isVariableDeclaration(node)) return false;
6998 if (node[t.BLOCK_SCOPED_SYMBOL]) return true;
6999 if (node.kind !== "let" && node.kind !== "const") return false;
7000 return true;
7001 }
7002
7003 function convertBlockScopedToVar(path, node, parent, scope) {
7004 var moveBindingsToParent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
7005
7006 if (!node) {
7007 node = path.node;
7008 }
7009
7010 if (!t.isFor(parent)) {
7011 for (var i = 0; i < node.declarations.length; i++) {
7012 var declar = node.declarations[i];
7013 declar.init = declar.init || scope.buildUndefinedNode();
7014 }
7015 }
7016
7017 node[t.BLOCK_SCOPED_SYMBOL] = true;
7018 node.kind = "var";
7019
7020 if (moveBindingsToParent) {
7021 var parentScope = scope.getFunctionParent();
7022 var ids = path.getBindingIdentifiers();
7023 for (var name in ids) {
7024 var binding = scope.getOwnBinding(name);
7025 if (binding) binding.kind = "var";
7026 scope.moveBindingTo(name, parentScope);
7027 }
7028 }
7029 }
7030
7031 function isVar(node) {
7032 return t.isVariableDeclaration(node, { kind: "var" }) && !isBlockScoped(node);
7033 }
7034
7035 var letReferenceBlockVisitor = _babelTraverse2.default.visitors.merge([{
7036 Loop: {
7037 enter: function enter(path, state) {
7038 state.loopDepth++;
7039 },
7040 exit: function exit(path, state) {
7041 state.loopDepth--;
7042 }
7043 },
7044 Function: function Function(path, state) {
7045 if (state.loopDepth > 0) {
7046 path.traverse(letReferenceFunctionVisitor, state);
7047 }
7048 return path.skip();
7049 }
7050 }, _tdz.visitor]);
7051
7052 var letReferenceFunctionVisitor = _babelTraverse2.default.visitors.merge([{
7053 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
7054 var ref = state.letReferences[path.node.name];
7055
7056 if (!ref) return;
7057
7058 var localBinding = path.scope.getBindingIdentifier(path.node.name);
7059 if (localBinding && localBinding !== ref) return;
7060
7061 state.closurify = true;
7062 }
7063 }, _tdz.visitor]);
7064
7065 var hoistVarDeclarationsVisitor = {
7066 enter: function enter(path, self) {
7067 var node = path.node,
7068 parent = path.parent;
7069
7070 if (path.isForStatement()) {
7071 if (isVar(node.init, node)) {
7072 var nodes = self.pushDeclar(node.init);
7073 if (nodes.length === 1) {
7074 node.init = nodes[0];
7075 } else {
7076 node.init = t.sequenceExpression(nodes);
7077 }
7078 }
7079 } else if (path.isFor()) {
7080 if (isVar(node.left, node)) {
7081 self.pushDeclar(node.left);
7082 node.left = node.left.declarations[0].id;
7083 }
7084 } else if (isVar(node, parent)) {
7085 path.replaceWithMultiple(self.pushDeclar(node).map(function (expr) {
7086 return t.expressionStatement(expr);
7087 }));
7088 } else if (path.isFunction()) {
7089 return path.skip();
7090 }
7091 }
7092 };
7093
7094 var loopLabelVisitor = {
7095 LabeledStatement: function LabeledStatement(_ref, state) {
7096 var node = _ref.node;
7097
7098 state.innerLabels.push(node.label.name);
7099 }
7100 };
7101
7102 var continuationVisitor = {
7103 enter: function enter(path, state) {
7104 if (path.isAssignmentExpression() || path.isUpdateExpression()) {
7105 var bindings = path.getBindingIdentifiers();
7106 for (var name in bindings) {
7107 if (state.outsideReferences[name] !== path.scope.getBindingIdentifier(name)) continue;
7108 state.reassignments[name] = true;
7109 }
7110 }
7111 }
7112 };
7113
7114 function loopNodeTo(node) {
7115 if (t.isBreakStatement(node)) {
7116 return "break";
7117 } else if (t.isContinueStatement(node)) {
7118 return "continue";
7119 }
7120 }
7121
7122 var loopVisitor = {
7123 Loop: function Loop(path, state) {
7124 var oldIgnoreLabeless = state.ignoreLabeless;
7125 state.ignoreLabeless = true;
7126 path.traverse(loopVisitor, state);
7127 state.ignoreLabeless = oldIgnoreLabeless;
7128 path.skip();
7129 },
7130 Function: function Function(path) {
7131 path.skip();
7132 },
7133 SwitchCase: function SwitchCase(path, state) {
7134 var oldInSwitchCase = state.inSwitchCase;
7135 state.inSwitchCase = true;
7136 path.traverse(loopVisitor, state);
7137 state.inSwitchCase = oldInSwitchCase;
7138 path.skip();
7139 },
7140 "BreakStatement|ContinueStatement|ReturnStatement": function BreakStatementContinueStatementReturnStatement(path, state) {
7141 var node = path.node,
7142 parent = path.parent,
7143 scope = path.scope;
7144
7145 if (node[this.LOOP_IGNORE]) return;
7146
7147 var replace = void 0;
7148 var loopText = loopNodeTo(node);
7149
7150 if (loopText) {
7151 if (node.label) {
7152 if (state.innerLabels.indexOf(node.label.name) >= 0) {
7153 return;
7154 }
7155
7156 loopText = loopText + "|" + node.label.name;
7157 } else {
7158 if (state.ignoreLabeless) return;
7159
7160 if (state.inSwitchCase) return;
7161
7162 if (t.isBreakStatement(node) && t.isSwitchCase(parent)) return;
7163 }
7164
7165 state.hasBreakContinue = true;
7166 state.map[loopText] = node;
7167 replace = t.stringLiteral(loopText);
7168 }
7169
7170 if (path.isReturnStatement()) {
7171 state.hasReturn = true;
7172 replace = t.objectExpression([t.objectProperty(t.identifier("v"), node.argument || scope.buildUndefinedNode())]);
7173 }
7174
7175 if (replace) {
7176 replace = t.returnStatement(replace);
7177 replace[this.LOOP_IGNORE] = true;
7178 path.skip();
7179 path.replaceWith(t.inherits(replace, node));
7180 }
7181 }
7182 };
7183
7184 var BlockScoping = function () {
7185 function BlockScoping(loopPath, blockPath, parent, scope, file) {
7186 (0, _classCallCheck3.default)(this, BlockScoping);
7187
7188 this.parent = parent;
7189 this.scope = scope;
7190 this.file = file;
7191
7192 this.blockPath = blockPath;
7193 this.block = blockPath.node;
7194
7195 this.outsideLetReferences = (0, _create2.default)(null);
7196 this.hasLetReferences = false;
7197 this.letReferences = (0, _create2.default)(null);
7198 this.body = [];
7199
7200 if (loopPath) {
7201 this.loopParent = loopPath.parent;
7202 this.loopLabel = t.isLabeledStatement(this.loopParent) && this.loopParent.label;
7203 this.loopPath = loopPath;
7204 this.loop = loopPath.node;
7205 }
7206 }
7207
7208 BlockScoping.prototype.run = function run() {
7209 var block = this.block;
7210 if (block._letDone) return;
7211 block._letDone = true;
7212
7213 var needsClosure = this.getLetReferences();
7214
7215 if (t.isFunction(this.parent) || t.isProgram(this.block)) {
7216 this.updateScopeInfo();
7217 return;
7218 }
7219
7220 if (!this.hasLetReferences) return;
7221
7222 if (needsClosure) {
7223 this.wrapClosure();
7224 } else {
7225 this.remap();
7226 }
7227
7228 this.updateScopeInfo(needsClosure);
7229
7230 if (this.loopLabel && !t.isLabeledStatement(this.loopParent)) {
7231 return t.labeledStatement(this.loopLabel, this.loop);
7232 }
7233 };
7234
7235 BlockScoping.prototype.updateScopeInfo = function updateScopeInfo(wrappedInClosure) {
7236 var scope = this.scope;
7237 var parentScope = scope.getFunctionParent();
7238 var letRefs = this.letReferences;
7239
7240 for (var key in letRefs) {
7241 var ref = letRefs[key];
7242 var binding = scope.getBinding(ref.name);
7243 if (!binding) continue;
7244 if (binding.kind === "let" || binding.kind === "const") {
7245 binding.kind = "var";
7246
7247 if (wrappedInClosure) {
7248 scope.removeBinding(ref.name);
7249 } else {
7250 scope.moveBindingTo(ref.name, parentScope);
7251 }
7252 }
7253 }
7254 };
7255
7256 BlockScoping.prototype.remap = function remap() {
7257 var letRefs = this.letReferences;
7258 var scope = this.scope;
7259
7260 for (var key in letRefs) {
7261 var ref = letRefs[key];
7262
7263 if (scope.parentHasBinding(key) || scope.hasGlobal(key)) {
7264 if (scope.hasOwnBinding(key)) scope.rename(ref.name);
7265
7266 if (this.blockPath.scope.hasOwnBinding(key)) this.blockPath.scope.rename(ref.name);
7267 }
7268 }
7269 };
7270
7271 BlockScoping.prototype.wrapClosure = function wrapClosure() {
7272 if (this.file.opts.throwIfClosureRequired) {
7273 throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure " + "(throwIfClosureRequired).");
7274 }
7275 var block = this.block;
7276
7277 var outsideRefs = this.outsideLetReferences;
7278
7279 if (this.loop) {
7280 for (var name in outsideRefs) {
7281 var id = outsideRefs[name];
7282
7283 if (this.scope.hasGlobal(id.name) || this.scope.parentHasBinding(id.name)) {
7284 delete outsideRefs[id.name];
7285 delete this.letReferences[id.name];
7286
7287 this.scope.rename(id.name);
7288
7289 this.letReferences[id.name] = id;
7290 outsideRefs[id.name] = id;
7291 }
7292 }
7293 }
7294
7295 this.has = this.checkLoop();
7296
7297 this.hoistVarDeclarations();
7298
7299 var params = (0, _values2.default)(outsideRefs);
7300 var args = (0, _values2.default)(outsideRefs);
7301
7302 var isSwitch = this.blockPath.isSwitchStatement();
7303
7304 var fn = t.functionExpression(null, params, t.blockStatement(isSwitch ? [block] : block.body));
7305 fn.shadow = true;
7306
7307 this.addContinuations(fn);
7308
7309 var ref = fn;
7310
7311 if (this.loop) {
7312 ref = this.scope.generateUidIdentifier("loop");
7313 this.loopPath.insertBefore(t.variableDeclaration("var", [t.variableDeclarator(ref, fn)]));
7314 }
7315
7316 var call = t.callExpression(ref, args);
7317 var ret = this.scope.generateUidIdentifier("ret");
7318
7319 var hasYield = _babelTraverse2.default.hasType(fn.body, this.scope, "YieldExpression", t.FUNCTION_TYPES);
7320 if (hasYield) {
7321 fn.generator = true;
7322 call = t.yieldExpression(call, true);
7323 }
7324
7325 var hasAsync = _babelTraverse2.default.hasType(fn.body, this.scope, "AwaitExpression", t.FUNCTION_TYPES);
7326 if (hasAsync) {
7327 fn.async = true;
7328 call = t.awaitExpression(call);
7329 }
7330
7331 this.buildClosure(ret, call);
7332
7333 if (isSwitch) this.blockPath.replaceWithMultiple(this.body);else block.body = this.body;
7334 };
7335
7336 BlockScoping.prototype.buildClosure = function buildClosure(ret, call) {
7337 var has = this.has;
7338 if (has.hasReturn || has.hasBreakContinue) {
7339 this.buildHas(ret, call);
7340 } else {
7341 this.body.push(t.expressionStatement(call));
7342 }
7343 };
7344
7345 BlockScoping.prototype.addContinuations = function addContinuations(fn) {
7346 var state = {
7347 reassignments: {},
7348 outsideReferences: this.outsideLetReferences
7349 };
7350
7351 this.scope.traverse(fn, continuationVisitor, state);
7352
7353 for (var i = 0; i < fn.params.length; i++) {
7354 var param = fn.params[i];
7355 if (!state.reassignments[param.name]) continue;
7356
7357 var newParam = this.scope.generateUidIdentifier(param.name);
7358 fn.params[i] = newParam;
7359
7360 this.scope.rename(param.name, newParam.name, fn);
7361
7362 fn.body.body.push(t.expressionStatement(t.assignmentExpression("=", param, newParam)));
7363 }
7364 };
7365
7366 BlockScoping.prototype.getLetReferences = function getLetReferences() {
7367 var _this = this;
7368
7369 var block = this.block;
7370
7371 var declarators = [];
7372
7373 if (this.loop) {
7374 var init = this.loop.left || this.loop.init;
7375 if (isBlockScoped(init)) {
7376 declarators.push(init);
7377 (0, _extend2.default)(this.outsideLetReferences, t.getBindingIdentifiers(init));
7378 }
7379 }
7380
7381 var addDeclarationsFromChild = function addDeclarationsFromChild(path, node) {
7382 node = node || path.node;
7383 if (t.isClassDeclaration(node) || t.isFunctionDeclaration(node) || isBlockScoped(node)) {
7384 if (isBlockScoped(node)) {
7385 convertBlockScopedToVar(path, node, block, _this.scope);
7386 }
7387 declarators = declarators.concat(node.declarations || node);
7388 }
7389 if (t.isLabeledStatement(node)) {
7390 addDeclarationsFromChild(path.get("body"), node.body);
7391 }
7392 };
7393
7394 if (block.body) {
7395 for (var i = 0; i < block.body.length; i++) {
7396 var declarPath = this.blockPath.get("body")[i];
7397 addDeclarationsFromChild(declarPath);
7398 }
7399 }
7400
7401 if (block.cases) {
7402 for (var _i = 0; _i < block.cases.length; _i++) {
7403 var consequents = block.cases[_i].consequent;
7404
7405 for (var j = 0; j < consequents.length; j++) {
7406 var _declarPath = this.blockPath.get("cases")[_i];
7407 var declar = consequents[j];
7408 addDeclarationsFromChild(_declarPath, declar);
7409 }
7410 }
7411 }
7412
7413 for (var _i2 = 0; _i2 < declarators.length; _i2++) {
7414 var _declar = declarators[_i2];
7415
7416 var keys = t.getBindingIdentifiers(_declar, false, true);
7417 (0, _extend2.default)(this.letReferences, keys);
7418 this.hasLetReferences = true;
7419 }
7420
7421 if (!this.hasLetReferences) return;
7422
7423 var state = {
7424 letReferences: this.letReferences,
7425 closurify: false,
7426 file: this.file,
7427 loopDepth: 0
7428 };
7429
7430 var loopOrFunctionParent = this.blockPath.find(function (path) {
7431 return path.isLoop() || path.isFunction();
7432 });
7433 if (loopOrFunctionParent && loopOrFunctionParent.isLoop()) {
7434 state.loopDepth++;
7435 }
7436
7437 this.blockPath.traverse(letReferenceBlockVisitor, state);
7438
7439 return state.closurify;
7440 };
7441
7442 BlockScoping.prototype.checkLoop = function checkLoop() {
7443 var state = {
7444 hasBreakContinue: false,
7445 ignoreLabeless: false,
7446 inSwitchCase: false,
7447 innerLabels: [],
7448 hasReturn: false,
7449 isLoop: !!this.loop,
7450 map: {},
7451 LOOP_IGNORE: (0, _symbol2.default)()
7452 };
7453
7454 this.blockPath.traverse(loopLabelVisitor, state);
7455 this.blockPath.traverse(loopVisitor, state);
7456
7457 return state;
7458 };
7459
7460 BlockScoping.prototype.hoistVarDeclarations = function hoistVarDeclarations() {
7461 this.blockPath.traverse(hoistVarDeclarationsVisitor, this);
7462 };
7463
7464 BlockScoping.prototype.pushDeclar = function pushDeclar(node) {
7465 var declars = [];
7466 var names = t.getBindingIdentifiers(node);
7467 for (var name in names) {
7468 declars.push(t.variableDeclarator(names[name]));
7469 }
7470
7471 this.body.push(t.variableDeclaration(node.kind, declars));
7472
7473 var replace = [];
7474
7475 for (var i = 0; i < node.declarations.length; i++) {
7476 var declar = node.declarations[i];
7477 if (!declar.init) continue;
7478
7479 var expr = t.assignmentExpression("=", declar.id, declar.init);
7480 replace.push(t.inherits(expr, declar));
7481 }
7482
7483 return replace;
7484 };
7485
7486 BlockScoping.prototype.buildHas = function buildHas(ret, call) {
7487 var body = this.body;
7488
7489 body.push(t.variableDeclaration("var", [t.variableDeclarator(ret, call)]));
7490
7491 var retCheck = void 0;
7492 var has = this.has;
7493 var cases = [];
7494
7495 if (has.hasReturn) {
7496 retCheck = buildRetCheck({
7497 RETURN: ret
7498 });
7499 }
7500
7501 if (has.hasBreakContinue) {
7502 for (var key in has.map) {
7503 cases.push(t.switchCase(t.stringLiteral(key), [has.map[key]]));
7504 }
7505
7506 if (has.hasReturn) {
7507 cases.push(t.switchCase(null, [retCheck]));
7508 }
7509
7510 if (cases.length === 1) {
7511 var single = cases[0];
7512 body.push(t.ifStatement(t.binaryExpression("===", ret, single.test), single.consequent[0]));
7513 } else {
7514 if (this.loop) {
7515 for (var i = 0; i < cases.length; i++) {
7516 var caseConsequent = cases[i].consequent[0];
7517 if (t.isBreakStatement(caseConsequent) && !caseConsequent.label) {
7518 caseConsequent.label = this.loopLabel = this.loopLabel || this.scope.generateUidIdentifier("loop");
7519 }
7520 }
7521 }
7522
7523 body.push(t.switchStatement(ret, cases));
7524 }
7525 } else {
7526 if (has.hasReturn) {
7527 body.push(retCheck);
7528 }
7529 }
7530 };
7531
7532 return BlockScoping;
7533 }();
7534
7535 module.exports = exports["default"];
7536
7537/***/ }),
7538/* 71 */
7539/***/ (function(module, exports, __webpack_require__) {
7540
7541 "use strict";
7542
7543 exports.__esModule = true;
7544
7545 var _symbol = __webpack_require__(10);
7546
7547 var _symbol2 = _interopRequireDefault(_symbol);
7548
7549 exports.default = function (_ref) {
7550 var t = _ref.types;
7551
7552 var VISITED = (0, _symbol2.default)();
7553
7554 return {
7555 visitor: {
7556 ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
7557 if (!path.get("declaration").isClassDeclaration()) return;
7558
7559 var node = path.node;
7560
7561 var ref = node.declaration.id || path.scope.generateUidIdentifier("class");
7562 node.declaration.id = ref;
7563
7564 path.replaceWith(node.declaration);
7565 path.insertAfter(t.exportDefaultDeclaration(ref));
7566 },
7567 ClassDeclaration: function ClassDeclaration(path) {
7568 var node = path.node;
7569
7570 var ref = node.id || path.scope.generateUidIdentifier("class");
7571
7572 path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(ref, t.toExpression(node))]));
7573 },
7574 ClassExpression: function ClassExpression(path, state) {
7575 var node = path.node;
7576
7577 if (node[VISITED]) return;
7578
7579 var inferred = (0, _babelHelperFunctionName2.default)(path);
7580 if (inferred && inferred !== node) return path.replaceWith(inferred);
7581
7582 node[VISITED] = true;
7583
7584 var Constructor = _vanilla2.default;
7585 if (state.opts.loose) Constructor = _loose2.default;
7586
7587 path.replaceWith(new Constructor(path, state.file).run());
7588 }
7589 }
7590 };
7591 };
7592
7593 var _loose = __webpack_require__(331);
7594
7595 var _loose2 = _interopRequireDefault(_loose);
7596
7597 var _vanilla = __webpack_require__(207);
7598
7599 var _vanilla2 = _interopRequireDefault(_vanilla);
7600
7601 var _babelHelperFunctionName = __webpack_require__(40);
7602
7603 var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
7604
7605 function _interopRequireDefault(obj) {
7606 return obj && obj.__esModule ? obj : { default: obj };
7607 }
7608
7609 module.exports = exports["default"];
7610
7611/***/ }),
7612/* 72 */
7613/***/ (function(module, exports, __webpack_require__) {
7614
7615 "use strict";
7616
7617 exports.__esModule = true;
7618
7619 var _getIterator2 = __webpack_require__(2);
7620
7621 var _getIterator3 = _interopRequireDefault(_getIterator2);
7622
7623 exports.default = function (_ref) {
7624 var t = _ref.types,
7625 template = _ref.template;
7626
7627 var buildMutatorMapAssign = template("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");
7628
7629 function getValue(prop) {
7630 if (t.isObjectProperty(prop)) {
7631 return prop.value;
7632 } else if (t.isObjectMethod(prop)) {
7633 return t.functionExpression(null, prop.params, prop.body, prop.generator, prop.async);
7634 }
7635 }
7636
7637 function pushAssign(objId, prop, body) {
7638 if (prop.kind === "get" && prop.kind === "set") {
7639 pushMutatorDefine(objId, prop, body);
7640 } else {
7641 body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(objId, prop.key, prop.computed || t.isLiteral(prop.key)), getValue(prop))));
7642 }
7643 }
7644
7645 function pushMutatorDefine(_ref2, prop) {
7646 var objId = _ref2.objId,
7647 body = _ref2.body,
7648 getMutatorId = _ref2.getMutatorId,
7649 scope = _ref2.scope;
7650
7651 var key = !prop.computed && t.isIdentifier(prop.key) ? t.stringLiteral(prop.key.name) : prop.key;
7652
7653 var maybeMemoise = scope.maybeGenerateMemoised(key);
7654 if (maybeMemoise) {
7655 body.push(t.expressionStatement(t.assignmentExpression("=", maybeMemoise, key)));
7656 key = maybeMemoise;
7657 }
7658
7659 body.push.apply(body, buildMutatorMapAssign({
7660 MUTATOR_MAP_REF: getMutatorId(),
7661 KEY: key,
7662 VALUE: getValue(prop),
7663 KIND: t.identifier(prop.kind)
7664 }));
7665 }
7666
7667 function loose(info) {
7668 for (var _iterator = info.computedProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
7669 var _ref3;
7670
7671 if (_isArray) {
7672 if (_i >= _iterator.length) break;
7673 _ref3 = _iterator[_i++];
7674 } else {
7675 _i = _iterator.next();
7676 if (_i.done) break;
7677 _ref3 = _i.value;
7678 }
7679
7680 var prop = _ref3;
7681
7682 if (prop.kind === "get" || prop.kind === "set") {
7683 pushMutatorDefine(info, prop);
7684 } else {
7685 pushAssign(info.objId, prop, info.body);
7686 }
7687 }
7688 }
7689
7690 function spec(info) {
7691 var objId = info.objId,
7692 body = info.body,
7693 computedProps = info.computedProps,
7694 state = info.state;
7695
7696 for (var _iterator2 = computedProps, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
7697 var _ref4;
7698
7699 if (_isArray2) {
7700 if (_i2 >= _iterator2.length) break;
7701 _ref4 = _iterator2[_i2++];
7702 } else {
7703 _i2 = _iterator2.next();
7704 if (_i2.done) break;
7705 _ref4 = _i2.value;
7706 }
7707
7708 var prop = _ref4;
7709
7710 var key = t.toComputedKey(prop);
7711
7712 if (prop.kind === "get" || prop.kind === "set") {
7713 pushMutatorDefine(info, prop);
7714 } else if (t.isStringLiteral(key, { value: "__proto__" })) {
7715 pushAssign(objId, prop, body);
7716 } else {
7717 if (computedProps.length === 1) {
7718 return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]);
7719 } else {
7720 body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(prop)])));
7721 }
7722 }
7723 }
7724 }
7725
7726 return {
7727 visitor: {
7728 ObjectExpression: {
7729 exit: function exit(path, state) {
7730 var node = path.node,
7731 parent = path.parent,
7732 scope = path.scope;
7733
7734 var hasComputed = false;
7735 for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
7736 var _ref5;
7737
7738 if (_isArray3) {
7739 if (_i3 >= _iterator3.length) break;
7740 _ref5 = _iterator3[_i3++];
7741 } else {
7742 _i3 = _iterator3.next();
7743 if (_i3.done) break;
7744 _ref5 = _i3.value;
7745 }
7746
7747 var prop = _ref5;
7748
7749 hasComputed = prop.computed === true;
7750 if (hasComputed) break;
7751 }
7752 if (!hasComputed) return;
7753
7754 var initProps = [];
7755 var computedProps = [];
7756 var foundComputed = false;
7757
7758 for (var _iterator4 = node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
7759 var _ref6;
7760
7761 if (_isArray4) {
7762 if (_i4 >= _iterator4.length) break;
7763 _ref6 = _iterator4[_i4++];
7764 } else {
7765 _i4 = _iterator4.next();
7766 if (_i4.done) break;
7767 _ref6 = _i4.value;
7768 }
7769
7770 var _prop = _ref6;
7771
7772 if (_prop.computed) {
7773 foundComputed = true;
7774 }
7775
7776 if (foundComputed) {
7777 computedProps.push(_prop);
7778 } else {
7779 initProps.push(_prop);
7780 }
7781 }
7782
7783 var objId = scope.generateUidIdentifierBasedOnNode(parent);
7784 var initPropExpression = t.objectExpression(initProps);
7785 var body = [];
7786
7787 body.push(t.variableDeclaration("var", [t.variableDeclarator(objId, initPropExpression)]));
7788
7789 var callback = spec;
7790 if (state.opts.loose) callback = loose;
7791
7792 var mutatorRef = void 0;
7793
7794 var getMutatorId = function getMutatorId() {
7795 if (!mutatorRef) {
7796 mutatorRef = scope.generateUidIdentifier("mutatorMap");
7797
7798 body.push(t.variableDeclaration("var", [t.variableDeclarator(mutatorRef, t.objectExpression([]))]));
7799 }
7800
7801 return mutatorRef;
7802 };
7803
7804 var single = callback({
7805 scope: scope,
7806 objId: objId,
7807 body: body,
7808 computedProps: computedProps,
7809 initPropExpression: initPropExpression,
7810 getMutatorId: getMutatorId,
7811 state: state
7812 });
7813
7814 if (mutatorRef) {
7815 body.push(t.expressionStatement(t.callExpression(state.addHelper("defineEnumerableProperties"), [objId, mutatorRef])));
7816 }
7817
7818 if (single) {
7819 path.replaceWith(single);
7820 } else {
7821 body.push(t.expressionStatement(objId));
7822 path.replaceWithMultiple(body);
7823 }
7824 }
7825 }
7826 }
7827 };
7828 };
7829
7830 function _interopRequireDefault(obj) {
7831 return obj && obj.__esModule ? obj : { default: obj };
7832 }
7833
7834 module.exports = exports["default"];
7835
7836/***/ }),
7837/* 73 */
7838/***/ (function(module, exports, __webpack_require__) {
7839
7840 "use strict";
7841
7842 exports.__esModule = true;
7843
7844 var _classCallCheck2 = __webpack_require__(3);
7845
7846 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
7847
7848 var _getIterator2 = __webpack_require__(2);
7849
7850 var _getIterator3 = _interopRequireDefault(_getIterator2);
7851
7852 exports.default = function (_ref) {
7853 var t = _ref.types;
7854
7855 function variableDeclarationHasPattern(node) {
7856 for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
7857 var _ref2;
7858
7859 if (_isArray) {
7860 if (_i >= _iterator.length) break;
7861 _ref2 = _iterator[_i++];
7862 } else {
7863 _i = _iterator.next();
7864 if (_i.done) break;
7865 _ref2 = _i.value;
7866 }
7867
7868 var declar = _ref2;
7869
7870 if (t.isPattern(declar.id)) {
7871 return true;
7872 }
7873 }
7874 return false;
7875 }
7876
7877 function hasRest(pattern) {
7878 for (var _iterator2 = pattern.elements, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
7879 var _ref3;
7880
7881 if (_isArray2) {
7882 if (_i2 >= _iterator2.length) break;
7883 _ref3 = _iterator2[_i2++];
7884 } else {
7885 _i2 = _iterator2.next();
7886 if (_i2.done) break;
7887 _ref3 = _i2.value;
7888 }
7889
7890 var elem = _ref3;
7891
7892 if (t.isRestElement(elem)) {
7893 return true;
7894 }
7895 }
7896 return false;
7897 }
7898
7899 var arrayUnpackVisitor = {
7900 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
7901 if (state.bindings[path.node.name]) {
7902 state.deopt = true;
7903 path.stop();
7904 }
7905 }
7906 };
7907
7908 var DestructuringTransformer = function () {
7909 function DestructuringTransformer(opts) {
7910 (0, _classCallCheck3.default)(this, DestructuringTransformer);
7911
7912 this.blockHoist = opts.blockHoist;
7913 this.operator = opts.operator;
7914 this.arrays = {};
7915 this.nodes = opts.nodes || [];
7916 this.scope = opts.scope;
7917 this.file = opts.file;
7918 this.kind = opts.kind;
7919 }
7920
7921 DestructuringTransformer.prototype.buildVariableAssignment = function buildVariableAssignment(id, init) {
7922 var op = this.operator;
7923 if (t.isMemberExpression(id)) op = "=";
7924
7925 var node = void 0;
7926
7927 if (op) {
7928 node = t.expressionStatement(t.assignmentExpression(op, id, init));
7929 } else {
7930 node = t.variableDeclaration(this.kind, [t.variableDeclarator(id, init)]);
7931 }
7932
7933 node._blockHoist = this.blockHoist;
7934
7935 return node;
7936 };
7937
7938 DestructuringTransformer.prototype.buildVariableDeclaration = function buildVariableDeclaration(id, init) {
7939 var declar = t.variableDeclaration("var", [t.variableDeclarator(id, init)]);
7940 declar._blockHoist = this.blockHoist;
7941 return declar;
7942 };
7943
7944 DestructuringTransformer.prototype.push = function push(id, init) {
7945 if (t.isObjectPattern(id)) {
7946 this.pushObjectPattern(id, init);
7947 } else if (t.isArrayPattern(id)) {
7948 this.pushArrayPattern(id, init);
7949 } else if (t.isAssignmentPattern(id)) {
7950 this.pushAssignmentPattern(id, init);
7951 } else {
7952 this.nodes.push(this.buildVariableAssignment(id, init));
7953 }
7954 };
7955
7956 DestructuringTransformer.prototype.toArray = function toArray(node, count) {
7957 if (this.file.opts.loose || t.isIdentifier(node) && this.arrays[node.name]) {
7958 return node;
7959 } else {
7960 return this.scope.toArray(node, count);
7961 }
7962 };
7963
7964 DestructuringTransformer.prototype.pushAssignmentPattern = function pushAssignmentPattern(pattern, valueRef) {
7965
7966 var tempValueRef = this.scope.generateUidIdentifierBasedOnNode(valueRef);
7967
7968 var declar = t.variableDeclaration("var", [t.variableDeclarator(tempValueRef, valueRef)]);
7969 declar._blockHoist = this.blockHoist;
7970 this.nodes.push(declar);
7971
7972 var tempConditional = t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef);
7973
7974 var left = pattern.left;
7975 if (t.isPattern(left)) {
7976 var tempValueDefault = t.expressionStatement(t.assignmentExpression("=", tempValueRef, tempConditional));
7977 tempValueDefault._blockHoist = this.blockHoist;
7978
7979 this.nodes.push(tempValueDefault);
7980 this.push(left, tempValueRef);
7981 } else {
7982 this.nodes.push(this.buildVariableAssignment(left, tempConditional));
7983 }
7984 };
7985
7986 DestructuringTransformer.prototype.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) {
7987
7988 var keys = [];
7989
7990 for (var i = 0; i < pattern.properties.length; i++) {
7991 var prop = pattern.properties[i];
7992
7993 if (i >= spreadPropIndex) break;
7994
7995 if (t.isRestProperty(prop)) continue;
7996
7997 var key = prop.key;
7998 if (t.isIdentifier(key) && !prop.computed) key = t.stringLiteral(prop.key.name);
7999 keys.push(key);
8000 }
8001
8002 keys = t.arrayExpression(keys);
8003
8004 var value = t.callExpression(this.file.addHelper("objectWithoutProperties"), [objRef, keys]);
8005 this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value));
8006 };
8007
8008 DestructuringTransformer.prototype.pushObjectProperty = function pushObjectProperty(prop, propRef) {
8009 if (t.isLiteral(prop.key)) prop.computed = true;
8010
8011 var pattern = prop.value;
8012 var objRef = t.memberExpression(propRef, prop.key, prop.computed);
8013
8014 if (t.isPattern(pattern)) {
8015 this.push(pattern, objRef);
8016 } else {
8017 this.nodes.push(this.buildVariableAssignment(pattern, objRef));
8018 }
8019 };
8020
8021 DestructuringTransformer.prototype.pushObjectPattern = function pushObjectPattern(pattern, objRef) {
8022
8023 if (!pattern.properties.length) {
8024 this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("objectDestructuringEmpty"), [objRef])));
8025 }
8026
8027 if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) {
8028 var temp = this.scope.generateUidIdentifierBasedOnNode(objRef);
8029 this.nodes.push(this.buildVariableDeclaration(temp, objRef));
8030 objRef = temp;
8031 }
8032
8033 for (var i = 0; i < pattern.properties.length; i++) {
8034 var prop = pattern.properties[i];
8035 if (t.isRestProperty(prop)) {
8036 this.pushObjectRest(pattern, objRef, prop, i);
8037 } else {
8038 this.pushObjectProperty(prop, objRef);
8039 }
8040 }
8041 };
8042
8043 DestructuringTransformer.prototype.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) {
8044 if (!t.isArrayExpression(arr)) return false;
8045
8046 if (pattern.elements.length > arr.elements.length) return;
8047 if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) return false;
8048
8049 for (var _iterator3 = pattern.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
8050 var _ref4;
8051
8052 if (_isArray3) {
8053 if (_i3 >= _iterator3.length) break;
8054 _ref4 = _iterator3[_i3++];
8055 } else {
8056 _i3 = _iterator3.next();
8057 if (_i3.done) break;
8058 _ref4 = _i3.value;
8059 }
8060
8061 var elem = _ref4;
8062
8063 if (!elem) return false;
8064
8065 if (t.isMemberExpression(elem)) return false;
8066 }
8067
8068 for (var _iterator4 = arr.elements, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
8069 var _ref5;
8070
8071 if (_isArray4) {
8072 if (_i4 >= _iterator4.length) break;
8073 _ref5 = _iterator4[_i4++];
8074 } else {
8075 _i4 = _iterator4.next();
8076 if (_i4.done) break;
8077 _ref5 = _i4.value;
8078 }
8079
8080 var _elem = _ref5;
8081
8082 if (t.isSpreadElement(_elem)) return false;
8083
8084 if (t.isCallExpression(_elem)) return false;
8085
8086 if (t.isMemberExpression(_elem)) return false;
8087 }
8088
8089 var bindings = t.getBindingIdentifiers(pattern);
8090 var state = { deopt: false, bindings: bindings };
8091 this.scope.traverse(arr, arrayUnpackVisitor, state);
8092 return !state.deopt;
8093 };
8094
8095 DestructuringTransformer.prototype.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) {
8096 for (var i = 0; i < pattern.elements.length; i++) {
8097 var elem = pattern.elements[i];
8098 if (t.isRestElement(elem)) {
8099 this.push(elem.argument, t.arrayExpression(arr.elements.slice(i)));
8100 } else {
8101 this.push(elem, arr.elements[i]);
8102 }
8103 }
8104 };
8105
8106 DestructuringTransformer.prototype.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) {
8107 if (!pattern.elements) return;
8108
8109 if (this.canUnpackArrayPattern(pattern, arrayRef)) {
8110 return this.pushUnpackedArrayPattern(pattern, arrayRef);
8111 }
8112
8113 var count = !hasRest(pattern) && pattern.elements.length;
8114
8115 var toArray = this.toArray(arrayRef, count);
8116
8117 if (t.isIdentifier(toArray)) {
8118 arrayRef = toArray;
8119 } else {
8120 arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef);
8121 this.arrays[arrayRef.name] = true;
8122 this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray));
8123 }
8124
8125 for (var i = 0; i < pattern.elements.length; i++) {
8126 var elem = pattern.elements[i];
8127
8128 if (!elem) continue;
8129
8130 var elemRef = void 0;
8131
8132 if (t.isRestElement(elem)) {
8133 elemRef = this.toArray(arrayRef);
8134 elemRef = t.callExpression(t.memberExpression(elemRef, t.identifier("slice")), [t.numericLiteral(i)]);
8135
8136 elem = elem.argument;
8137 } else {
8138 elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true);
8139 }
8140
8141 this.push(elem, elemRef);
8142 }
8143 };
8144
8145 DestructuringTransformer.prototype.init = function init(pattern, ref) {
8146
8147 if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) {
8148 var memo = this.scope.maybeGenerateMemoised(ref, true);
8149 if (memo) {
8150 this.nodes.push(this.buildVariableDeclaration(memo, ref));
8151 ref = memo;
8152 }
8153 }
8154
8155 this.push(pattern, ref);
8156
8157 return this.nodes;
8158 };
8159
8160 return DestructuringTransformer;
8161 }();
8162
8163 return {
8164 visitor: {
8165 ExportNamedDeclaration: function ExportNamedDeclaration(path) {
8166 var declaration = path.get("declaration");
8167 if (!declaration.isVariableDeclaration()) return;
8168 if (!variableDeclarationHasPattern(declaration.node)) return;
8169
8170 var specifiers = [];
8171
8172 for (var name in path.getOuterBindingIdentifiers(path)) {
8173 var id = t.identifier(name);
8174 specifiers.push(t.exportSpecifier(id, id));
8175 }
8176
8177 path.replaceWith(declaration.node);
8178 path.insertAfter(t.exportNamedDeclaration(null, specifiers));
8179 },
8180 ForXStatement: function ForXStatement(path, file) {
8181 var node = path.node,
8182 scope = path.scope;
8183
8184 var left = node.left;
8185
8186 if (t.isPattern(left)) {
8187
8188 var temp = scope.generateUidIdentifier("ref");
8189
8190 node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]);
8191
8192 path.ensureBlock();
8193
8194 node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)]));
8195
8196 return;
8197 }
8198
8199 if (!t.isVariableDeclaration(left)) return;
8200
8201 var pattern = left.declarations[0].id;
8202 if (!t.isPattern(pattern)) return;
8203
8204 var key = scope.generateUidIdentifier("ref");
8205 node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]);
8206
8207 var nodes = [];
8208
8209 var destructuring = new DestructuringTransformer({
8210 kind: left.kind,
8211 file: file,
8212 scope: scope,
8213 nodes: nodes
8214 });
8215
8216 destructuring.init(pattern, key);
8217
8218 path.ensureBlock();
8219
8220 var block = node.body;
8221 block.body = nodes.concat(block.body);
8222 },
8223 CatchClause: function CatchClause(_ref6, file) {
8224 var node = _ref6.node,
8225 scope = _ref6.scope;
8226
8227 var pattern = node.param;
8228 if (!t.isPattern(pattern)) return;
8229
8230 var ref = scope.generateUidIdentifier("ref");
8231 node.param = ref;
8232
8233 var nodes = [];
8234
8235 var destructuring = new DestructuringTransformer({
8236 kind: "let",
8237 file: file,
8238 scope: scope,
8239 nodes: nodes
8240 });
8241 destructuring.init(pattern, ref);
8242
8243 node.body.body = nodes.concat(node.body.body);
8244 },
8245 AssignmentExpression: function AssignmentExpression(path, file) {
8246 var node = path.node,
8247 scope = path.scope;
8248
8249 if (!t.isPattern(node.left)) return;
8250
8251 var nodes = [];
8252
8253 var destructuring = new DestructuringTransformer({
8254 operator: node.operator,
8255 file: file,
8256 scope: scope,
8257 nodes: nodes
8258 });
8259
8260 var ref = void 0;
8261 if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) {
8262 ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref");
8263
8264 nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, node.right)]));
8265
8266 if (t.isArrayExpression(node.right)) {
8267 destructuring.arrays[ref.name] = true;
8268 }
8269 }
8270
8271 destructuring.init(node.left, ref || node.right);
8272
8273 if (ref) {
8274 nodes.push(t.expressionStatement(ref));
8275 }
8276
8277 path.replaceWithMultiple(nodes);
8278 },
8279 VariableDeclaration: function VariableDeclaration(path, file) {
8280 var node = path.node,
8281 scope = path.scope,
8282 parent = path.parent;
8283
8284 if (t.isForXStatement(parent)) return;
8285 if (!parent || !path.container) return;
8286 if (!variableDeclarationHasPattern(node)) return;
8287
8288 var nodes = [];
8289 var declar = void 0;
8290
8291 for (var i = 0; i < node.declarations.length; i++) {
8292 declar = node.declarations[i];
8293
8294 var patternId = declar.init;
8295 var pattern = declar.id;
8296
8297 var destructuring = new DestructuringTransformer({
8298 blockHoist: node._blockHoist,
8299 nodes: nodes,
8300 scope: scope,
8301 kind: node.kind,
8302 file: file
8303 });
8304
8305 if (t.isPattern(pattern)) {
8306 destructuring.init(pattern, patternId);
8307
8308 if (+i !== node.declarations.length - 1) {
8309 t.inherits(nodes[nodes.length - 1], declar);
8310 }
8311 } else {
8312 nodes.push(t.inherits(destructuring.buildVariableAssignment(declar.id, declar.init), declar));
8313 }
8314 }
8315
8316 var nodesOut = [];
8317 for (var _iterator5 = nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
8318 var _ref7;
8319
8320 if (_isArray5) {
8321 if (_i5 >= _iterator5.length) break;
8322 _ref7 = _iterator5[_i5++];
8323 } else {
8324 _i5 = _iterator5.next();
8325 if (_i5.done) break;
8326 _ref7 = _i5.value;
8327 }
8328
8329 var _node = _ref7;
8330
8331 var tail = nodesOut[nodesOut.length - 1];
8332 if (tail && t.isVariableDeclaration(tail) && t.isVariableDeclaration(_node) && tail.kind === _node.kind) {
8333 var _tail$declarations;
8334
8335 (_tail$declarations = tail.declarations).push.apply(_tail$declarations, _node.declarations);
8336 } else {
8337 nodesOut.push(_node);
8338 }
8339 }
8340
8341 for (var _iterator6 = nodesOut, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
8342 var _ref8;
8343
8344 if (_isArray6) {
8345 if (_i6 >= _iterator6.length) break;
8346 _ref8 = _iterator6[_i6++];
8347 } else {
8348 _i6 = _iterator6.next();
8349 if (_i6.done) break;
8350 _ref8 = _i6.value;
8351 }
8352
8353 var nodeOut = _ref8;
8354
8355 if (!nodeOut.declarations) continue;
8356 for (var _iterator7 = nodeOut.declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
8357 var _ref9;
8358
8359 if (_isArray7) {
8360 if (_i7 >= _iterator7.length) break;
8361 _ref9 = _iterator7[_i7++];
8362 } else {
8363 _i7 = _iterator7.next();
8364 if (_i7.done) break;
8365 _ref9 = _i7.value;
8366 }
8367
8368 var declaration = _ref9;
8369 var name = declaration.id.name;
8370
8371 if (scope.bindings[name]) {
8372 scope.bindings[name].kind = nodeOut.kind;
8373 }
8374 }
8375 }
8376
8377 if (nodesOut.length === 1) {
8378 path.replaceWith(nodesOut[0]);
8379 } else {
8380 path.replaceWithMultiple(nodesOut);
8381 }
8382 }
8383 }
8384 };
8385 };
8386
8387 function _interopRequireDefault(obj) {
8388 return obj && obj.__esModule ? obj : { default: obj };
8389 }
8390
8391 module.exports = exports["default"];
8392
8393/***/ }),
8394/* 74 */
8395/***/ (function(module, exports) {
8396
8397 "use strict";
8398
8399 exports.__esModule = true;
8400
8401 exports.default = function (_ref) {
8402 var messages = _ref.messages,
8403 template = _ref.template,
8404 t = _ref.types;
8405
8406 var buildForOfArray = template("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n ");
8407
8408 var buildForOfLoose = template("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n ");
8409
8410 var buildForOf = template("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");
8411
8412 function _ForOfStatementArray(path) {
8413 var node = path.node,
8414 scope = path.scope;
8415
8416 var nodes = [];
8417 var right = node.right;
8418
8419 if (!t.isIdentifier(right) || !scope.hasBinding(right.name)) {
8420 var uid = scope.generateUidIdentifier("arr");
8421 nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, right)]));
8422 right = uid;
8423 }
8424
8425 var iterationKey = scope.generateUidIdentifier("i");
8426
8427 var loop = buildForOfArray({
8428 BODY: node.body,
8429 KEY: iterationKey,
8430 ARR: right
8431 });
8432
8433 t.inherits(loop, node);
8434 t.ensureBlock(loop);
8435
8436 var iterationValue = t.memberExpression(right, iterationKey, true);
8437
8438 var left = node.left;
8439 if (t.isVariableDeclaration(left)) {
8440 left.declarations[0].init = iterationValue;
8441 loop.body.body.unshift(left);
8442 } else {
8443 loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=", left, iterationValue)));
8444 }
8445
8446 if (path.parentPath.isLabeledStatement()) {
8447 loop = t.labeledStatement(path.parentPath.node.label, loop);
8448 }
8449
8450 nodes.push(loop);
8451
8452 return nodes;
8453 }
8454
8455 return {
8456 visitor: {
8457 ForOfStatement: function ForOfStatement(path, state) {
8458 if (path.get("right").isArrayExpression()) {
8459 if (path.parentPath.isLabeledStatement()) {
8460 return path.parentPath.replaceWithMultiple(_ForOfStatementArray(path));
8461 } else {
8462 return path.replaceWithMultiple(_ForOfStatementArray(path));
8463 }
8464 }
8465
8466 var callback = spec;
8467 if (state.opts.loose) callback = loose;
8468
8469 var node = path.node;
8470
8471 var build = callback(path, state);
8472 var declar = build.declar;
8473 var loop = build.loop;
8474 var block = loop.body;
8475
8476 path.ensureBlock();
8477
8478 if (declar) {
8479 block.body.push(declar);
8480 }
8481
8482 block.body = block.body.concat(node.body.body);
8483
8484 t.inherits(loop, node);
8485 t.inherits(loop.body, node.body);
8486
8487 if (build.replaceParent) {
8488 path.parentPath.replaceWithMultiple(build.node);
8489 path.remove();
8490 } else {
8491 path.replaceWithMultiple(build.node);
8492 }
8493 }
8494 }
8495 };
8496
8497 function loose(path, file) {
8498 var node = path.node,
8499 scope = path.scope,
8500 parent = path.parent;
8501 var left = node.left;
8502
8503 var declar = void 0,
8504 id = void 0;
8505
8506 if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {
8507 id = left;
8508 } else if (t.isVariableDeclaration(left)) {
8509 id = scope.generateUidIdentifier("ref");
8510 declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, id)]);
8511 } else {
8512 throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type));
8513 }
8514
8515 var iteratorKey = scope.generateUidIdentifier("iterator");
8516 var isArrayKey = scope.generateUidIdentifier("isArray");
8517
8518 var loop = buildForOfLoose({
8519 LOOP_OBJECT: iteratorKey,
8520 IS_ARRAY: isArrayKey,
8521 OBJECT: node.right,
8522 INDEX: scope.generateUidIdentifier("i"),
8523 ID: id
8524 });
8525
8526 if (!declar) {
8527 loop.body.body.shift();
8528 }
8529
8530 var isLabeledParent = t.isLabeledStatement(parent);
8531 var labeled = void 0;
8532
8533 if (isLabeledParent) {
8534 labeled = t.labeledStatement(parent.label, loop);
8535 }
8536
8537 return {
8538 replaceParent: isLabeledParent,
8539 declar: declar,
8540 node: labeled || loop,
8541 loop: loop
8542 };
8543 }
8544
8545 function spec(path, file) {
8546 var node = path.node,
8547 scope = path.scope,
8548 parent = path.parent;
8549
8550 var left = node.left;
8551 var declar = void 0;
8552
8553 var stepKey = scope.generateUidIdentifier("step");
8554 var stepValue = t.memberExpression(stepKey, t.identifier("value"));
8555
8556 if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {
8557 declar = t.expressionStatement(t.assignmentExpression("=", left, stepValue));
8558 } else if (t.isVariableDeclaration(left)) {
8559 declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, stepValue)]);
8560 } else {
8561 throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type));
8562 }
8563
8564 var iteratorKey = scope.generateUidIdentifier("iterator");
8565
8566 var template = buildForOf({
8567 ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
8568 ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
8569 ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
8570 ITERATOR_KEY: iteratorKey,
8571 STEP_KEY: stepKey,
8572 OBJECT: node.right,
8573 BODY: null
8574 });
8575
8576 var isLabeledParent = t.isLabeledStatement(parent);
8577
8578 var tryBody = template[3].block.body;
8579 var loop = tryBody[0];
8580
8581 if (isLabeledParent) {
8582 tryBody[0] = t.labeledStatement(parent.label, loop);
8583 }
8584
8585 return {
8586 replaceParent: isLabeledParent,
8587 declar: declar,
8588 loop: loop,
8589 node: template
8590 };
8591 }
8592 };
8593
8594 module.exports = exports["default"];
8595
8596/***/ }),
8597/* 75 */
8598/***/ (function(module, exports, __webpack_require__) {
8599
8600 "use strict";
8601
8602 exports.__esModule = true;
8603
8604 exports.default = function () {
8605 return {
8606 visitor: {
8607 FunctionExpression: {
8608 exit: function exit(path) {
8609 if (path.key !== "value" && !path.parentPath.isObjectProperty()) {
8610 var replacement = (0, _babelHelperFunctionName2.default)(path);
8611 if (replacement) path.replaceWith(replacement);
8612 }
8613 }
8614 },
8615
8616 ObjectProperty: function ObjectProperty(path) {
8617 var value = path.get("value");
8618 if (value.isFunction()) {
8619 var newNode = (0, _babelHelperFunctionName2.default)(value);
8620 if (newNode) value.replaceWith(newNode);
8621 }
8622 }
8623 }
8624 };
8625 };
8626
8627 var _babelHelperFunctionName = __webpack_require__(40);
8628
8629 var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
8630
8631 function _interopRequireDefault(obj) {
8632 return obj && obj.__esModule ? obj : { default: obj };
8633 }
8634
8635 module.exports = exports["default"];
8636
8637/***/ }),
8638/* 76 */
8639/***/ (function(module, exports) {
8640
8641 "use strict";
8642
8643 exports.__esModule = true;
8644
8645 exports.default = function () {
8646 return {
8647 visitor: {
8648 NumericLiteral: function NumericLiteral(_ref) {
8649 var node = _ref.node;
8650
8651 if (node.extra && /^0[ob]/i.test(node.extra.raw)) {
8652 node.extra = undefined;
8653 }
8654 },
8655 StringLiteral: function StringLiteral(_ref2) {
8656 var node = _ref2.node;
8657
8658 if (node.extra && /\\[u]/gi.test(node.extra.raw)) {
8659 node.extra = undefined;
8660 }
8661 }
8662 }
8663 };
8664 };
8665
8666 module.exports = exports["default"];
8667
8668/***/ }),
8669/* 77 */
8670/***/ (function(module, exports, __webpack_require__) {
8671
8672 "use strict";
8673
8674 exports.__esModule = true;
8675
8676 var _keys = __webpack_require__(14);
8677
8678 var _keys2 = _interopRequireDefault(_keys);
8679
8680 var _create = __webpack_require__(9);
8681
8682 var _create2 = _interopRequireDefault(_create);
8683
8684 var _getIterator2 = __webpack_require__(2);
8685
8686 var _getIterator3 = _interopRequireDefault(_getIterator2);
8687
8688 var _symbol = __webpack_require__(10);
8689
8690 var _symbol2 = _interopRequireDefault(_symbol);
8691
8692 exports.default = function () {
8693 var REASSIGN_REMAP_SKIP = (0, _symbol2.default)();
8694
8695 var reassignmentVisitor = {
8696 ReferencedIdentifier: function ReferencedIdentifier(path) {
8697 var name = path.node.name;
8698 var remap = this.remaps[name];
8699 if (!remap) return;
8700
8701 if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
8702
8703 if (path.parentPath.isCallExpression({ callee: path.node })) {
8704 path.replaceWith(t.sequenceExpression([t.numericLiteral(0), remap]));
8705 } else if (path.isJSXIdentifier() && t.isMemberExpression(remap)) {
8706 var object = remap.object,
8707 property = remap.property;
8708
8709 path.replaceWith(t.JSXMemberExpression(t.JSXIdentifier(object.name), t.JSXIdentifier(property.name)));
8710 } else {
8711 path.replaceWith(remap);
8712 }
8713 this.requeueInParent(path);
8714 },
8715 AssignmentExpression: function AssignmentExpression(path) {
8716 var node = path.node;
8717 if (node[REASSIGN_REMAP_SKIP]) return;
8718
8719 var left = path.get("left");
8720 if (left.isIdentifier()) {
8721 var name = left.node.name;
8722 var exports = this.exports[name];
8723 if (!exports) return;
8724
8725 if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
8726
8727 node[REASSIGN_REMAP_SKIP] = true;
8728
8729 for (var _iterator = exports, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
8730 var _ref;
8731
8732 if (_isArray) {
8733 if (_i >= _iterator.length) break;
8734 _ref = _iterator[_i++];
8735 } else {
8736 _i = _iterator.next();
8737 if (_i.done) break;
8738 _ref = _i.value;
8739 }
8740
8741 var reid = _ref;
8742
8743 node = buildExportsAssignment(reid, node).expression;
8744 }
8745
8746 path.replaceWith(node);
8747 this.requeueInParent(path);
8748 } else if (left.isObjectPattern()) {
8749 for (var _iterator2 = left.node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
8750 var _ref2;
8751
8752 if (_isArray2) {
8753 if (_i2 >= _iterator2.length) break;
8754 _ref2 = _iterator2[_i2++];
8755 } else {
8756 _i2 = _iterator2.next();
8757 if (_i2.done) break;
8758 _ref2 = _i2.value;
8759 }
8760
8761 var property = _ref2;
8762
8763 var _name = property.value.name;
8764
8765 var _exports = this.exports[_name];
8766 if (!_exports) continue;
8767
8768 if (this.scope.getBinding(_name) !== path.scope.getBinding(_name)) return;
8769
8770 node[REASSIGN_REMAP_SKIP] = true;
8771
8772 path.insertAfter(buildExportsAssignment(t.identifier(_name), t.identifier(_name)));
8773 }
8774 } else if (left.isArrayPattern()) {
8775 for (var _iterator3 = left.node.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
8776 var _ref3;
8777
8778 if (_isArray3) {
8779 if (_i3 >= _iterator3.length) break;
8780 _ref3 = _iterator3[_i3++];
8781 } else {
8782 _i3 = _iterator3.next();
8783 if (_i3.done) break;
8784 _ref3 = _i3.value;
8785 }
8786
8787 var element = _ref3;
8788
8789 if (!element) continue;
8790 var _name2 = element.name;
8791
8792 var _exports2 = this.exports[_name2];
8793 if (!_exports2) continue;
8794
8795 if (this.scope.getBinding(_name2) !== path.scope.getBinding(_name2)) return;
8796
8797 node[REASSIGN_REMAP_SKIP] = true;
8798
8799 path.insertAfter(buildExportsAssignment(t.identifier(_name2), t.identifier(_name2)));
8800 }
8801 }
8802 },
8803 UpdateExpression: function UpdateExpression(path) {
8804 var arg = path.get("argument");
8805 if (!arg.isIdentifier()) return;
8806
8807 var name = arg.node.name;
8808 var exports = this.exports[name];
8809 if (!exports) return;
8810
8811 if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
8812
8813 var node = t.assignmentExpression(path.node.operator[0] + "=", arg.node, t.numericLiteral(1));
8814
8815 if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord() || path.node.prefix) {
8816 path.replaceWith(node);
8817 this.requeueInParent(path);
8818 return;
8819 }
8820
8821 var nodes = [];
8822 nodes.push(node);
8823
8824 var operator = void 0;
8825 if (path.node.operator === "--") {
8826 operator = "+";
8827 } else {
8828 operator = "-";
8829 }
8830 nodes.push(t.binaryExpression(operator, arg.node, t.numericLiteral(1)));
8831
8832 path.replaceWithMultiple(t.sequenceExpression(nodes));
8833 }
8834 };
8835
8836 return {
8837 inherits: _babelPluginTransformStrictMode2.default,
8838
8839 visitor: {
8840 ThisExpression: function ThisExpression(path, state) {
8841 if (this.ranCommonJS) return;
8842
8843 if (state.opts.allowTopLevelThis !== true && !path.findParent(function (path) {
8844 return !path.is("shadow") && THIS_BREAK_KEYS.indexOf(path.type) >= 0;
8845 })) {
8846 path.replaceWith(t.identifier("undefined"));
8847 }
8848 },
8849
8850 Program: {
8851 exit: function exit(path) {
8852 this.ranCommonJS = true;
8853
8854 var strict = !!this.opts.strict;
8855 var noInterop = !!this.opts.noInterop;
8856
8857 var scope = path.scope;
8858
8859 scope.rename("module");
8860 scope.rename("exports");
8861 scope.rename("require");
8862
8863 var hasExports = false;
8864 var hasImports = false;
8865
8866 var body = path.get("body");
8867 var imports = (0, _create2.default)(null);
8868 var exports = (0, _create2.default)(null);
8869
8870 var nonHoistedExportNames = (0, _create2.default)(null);
8871
8872 var topNodes = [];
8873 var remaps = (0, _create2.default)(null);
8874
8875 var requires = (0, _create2.default)(null);
8876
8877 function addRequire(source, blockHoist) {
8878 var cached = requires[source];
8879 if (cached) return cached;
8880
8881 var ref = path.scope.generateUidIdentifier((0, _path2.basename)(source, (0, _path2.extname)(source)));
8882
8883 var varDecl = t.variableDeclaration("var", [t.variableDeclarator(ref, buildRequire(t.stringLiteral(source)).expression)]);
8884
8885 if (imports[source]) {
8886 varDecl.loc = imports[source].loc;
8887 }
8888
8889 if (typeof blockHoist === "number" && blockHoist > 0) {
8890 varDecl._blockHoist = blockHoist;
8891 }
8892
8893 topNodes.push(varDecl);
8894
8895 return requires[source] = ref;
8896 }
8897
8898 function addTo(obj, key, arr) {
8899 var existing = obj[key] || [];
8900 obj[key] = existing.concat(arr);
8901 }
8902
8903 for (var _iterator4 = body, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
8904 var _ref4;
8905
8906 if (_isArray4) {
8907 if (_i4 >= _iterator4.length) break;
8908 _ref4 = _iterator4[_i4++];
8909 } else {
8910 _i4 = _iterator4.next();
8911 if (_i4.done) break;
8912 _ref4 = _i4.value;
8913 }
8914
8915 var _path = _ref4;
8916
8917 if (_path.isExportDeclaration()) {
8918 hasExports = true;
8919
8920 var specifiers = [].concat(_path.get("declaration"), _path.get("specifiers"));
8921 for (var _iterator6 = specifiers, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
8922 var _ref6;
8923
8924 if (_isArray6) {
8925 if (_i6 >= _iterator6.length) break;
8926 _ref6 = _iterator6[_i6++];
8927 } else {
8928 _i6 = _iterator6.next();
8929 if (_i6.done) break;
8930 _ref6 = _i6.value;
8931 }
8932
8933 var _specifier2 = _ref6;
8934
8935 var ids = _specifier2.getBindingIdentifiers();
8936 if (ids.__esModule) {
8937 throw _specifier2.buildCodeFrameError("Illegal export \"__esModule\"");
8938 }
8939 }
8940 }
8941
8942 if (_path.isImportDeclaration()) {
8943 var _importsEntry$specifi;
8944
8945 hasImports = true;
8946
8947 var key = _path.node.source.value;
8948 var importsEntry = imports[key] || {
8949 specifiers: [],
8950 maxBlockHoist: 0,
8951 loc: _path.node.loc
8952 };
8953
8954 (_importsEntry$specifi = importsEntry.specifiers).push.apply(_importsEntry$specifi, _path.node.specifiers);
8955
8956 if (typeof _path.node._blockHoist === "number") {
8957 importsEntry.maxBlockHoist = Math.max(_path.node._blockHoist, importsEntry.maxBlockHoist);
8958 }
8959
8960 imports[key] = importsEntry;
8961
8962 _path.remove();
8963 } else if (_path.isExportDefaultDeclaration()) {
8964 var declaration = _path.get("declaration");
8965 if (declaration.isFunctionDeclaration()) {
8966 var id = declaration.node.id;
8967 var defNode = t.identifier("default");
8968 if (id) {
8969 addTo(exports, id.name, defNode);
8970 topNodes.push(buildExportsAssignment(defNode, id));
8971 _path.replaceWith(declaration.node);
8972 } else {
8973 topNodes.push(buildExportsAssignment(defNode, t.toExpression(declaration.node)));
8974 _path.remove();
8975 }
8976 } else if (declaration.isClassDeclaration()) {
8977 var _id = declaration.node.id;
8978 var _defNode = t.identifier("default");
8979 if (_id) {
8980 addTo(exports, _id.name, _defNode);
8981 _path.replaceWithMultiple([declaration.node, buildExportsAssignment(_defNode, _id)]);
8982 } else {
8983 _path.replaceWith(buildExportsAssignment(_defNode, t.toExpression(declaration.node)));
8984
8985 _path.parentPath.requeue(_path.get("expression.left"));
8986 }
8987 } else {
8988 _path.replaceWith(buildExportsAssignment(t.identifier("default"), declaration.node));
8989
8990 _path.parentPath.requeue(_path.get("expression.left"));
8991 }
8992 } else if (_path.isExportNamedDeclaration()) {
8993 var _declaration = _path.get("declaration");
8994 if (_declaration.node) {
8995 if (_declaration.isFunctionDeclaration()) {
8996 var _id2 = _declaration.node.id;
8997 addTo(exports, _id2.name, _id2);
8998 topNodes.push(buildExportsAssignment(_id2, _id2));
8999 _path.replaceWith(_declaration.node);
9000 } else if (_declaration.isClassDeclaration()) {
9001 var _id3 = _declaration.node.id;
9002 addTo(exports, _id3.name, _id3);
9003 _path.replaceWithMultiple([_declaration.node, buildExportsAssignment(_id3, _id3)]);
9004 nonHoistedExportNames[_id3.name] = true;
9005 } else if (_declaration.isVariableDeclaration()) {
9006 var declarators = _declaration.get("declarations");
9007 for (var _iterator7 = declarators, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
9008 var _ref7;
9009
9010 if (_isArray7) {
9011 if (_i7 >= _iterator7.length) break;
9012 _ref7 = _iterator7[_i7++];
9013 } else {
9014 _i7 = _iterator7.next();
9015 if (_i7.done) break;
9016 _ref7 = _i7.value;
9017 }
9018
9019 var decl = _ref7;
9020
9021 var _id4 = decl.get("id");
9022
9023 var init = decl.get("init");
9024 var exportsToInsert = [];
9025 if (!init.node) init.replaceWith(t.identifier("undefined"));
9026
9027 if (_id4.isIdentifier()) {
9028 addTo(exports, _id4.node.name, _id4.node);
9029 init.replaceWith(buildExportsAssignment(_id4.node, init.node).expression);
9030 nonHoistedExportNames[_id4.node.name] = true;
9031 } else if (_id4.isObjectPattern()) {
9032 for (var _i8 = 0; _i8 < _id4.node.properties.length; _i8++) {
9033 var prop = _id4.node.properties[_i8];
9034 var propValue = prop.value;
9035 if (t.isAssignmentPattern(propValue)) {
9036 propValue = propValue.left;
9037 } else if (t.isRestProperty(prop)) {
9038 propValue = prop.argument;
9039 }
9040 addTo(exports, propValue.name, propValue);
9041 exportsToInsert.push(buildExportsAssignment(propValue, propValue));
9042 nonHoistedExportNames[propValue.name] = true;
9043 }
9044 } else if (_id4.isArrayPattern() && _id4.node.elements) {
9045 for (var _i9 = 0; _i9 < _id4.node.elements.length; _i9++) {
9046 var elem = _id4.node.elements[_i9];
9047 if (!elem) continue;
9048 if (t.isAssignmentPattern(elem)) {
9049 elem = elem.left;
9050 } else if (t.isRestElement(elem)) {
9051 elem = elem.argument;
9052 }
9053 var name = elem.name;
9054 addTo(exports, name, elem);
9055 exportsToInsert.push(buildExportsAssignment(elem, elem));
9056 nonHoistedExportNames[name] = true;
9057 }
9058 }
9059 _path.insertAfter(exportsToInsert);
9060 }
9061 _path.replaceWith(_declaration.node);
9062 }
9063 continue;
9064 }
9065
9066 var _specifiers = _path.get("specifiers");
9067 var nodes = [];
9068 var _source = _path.node.source;
9069 if (_source) {
9070 var ref = addRequire(_source.value, _path.node._blockHoist);
9071
9072 for (var _iterator8 = _specifiers, _isArray8 = Array.isArray(_iterator8), _i10 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) {
9073 var _ref8;
9074
9075 if (_isArray8) {
9076 if (_i10 >= _iterator8.length) break;
9077 _ref8 = _iterator8[_i10++];
9078 } else {
9079 _i10 = _iterator8.next();
9080 if (_i10.done) break;
9081 _ref8 = _i10.value;
9082 }
9083
9084 var _specifier3 = _ref8;
9085
9086 if (_specifier3.isExportNamespaceSpecifier()) {} else if (_specifier3.isExportDefaultSpecifier()) {} else if (_specifier3.isExportSpecifier()) {
9087 if (!noInterop && _specifier3.node.local.name === "default") {
9088 topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name), t.memberExpression(t.callExpression(this.addHelper("interopRequireDefault"), [ref]), _specifier3.node.local)));
9089 } else {
9090 topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name), t.memberExpression(ref, _specifier3.node.local)));
9091 }
9092 nonHoistedExportNames[_specifier3.node.exported.name] = true;
9093 }
9094 }
9095 } else {
9096 for (var _iterator9 = _specifiers, _isArray9 = Array.isArray(_iterator9), _i11 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) {
9097 var _ref9;
9098
9099 if (_isArray9) {
9100 if (_i11 >= _iterator9.length) break;
9101 _ref9 = _iterator9[_i11++];
9102 } else {
9103 _i11 = _iterator9.next();
9104 if (_i11.done) break;
9105 _ref9 = _i11.value;
9106 }
9107
9108 var _specifier4 = _ref9;
9109
9110 if (_specifier4.isExportSpecifier()) {
9111 addTo(exports, _specifier4.node.local.name, _specifier4.node.exported);
9112 nonHoistedExportNames[_specifier4.node.exported.name] = true;
9113 nodes.push(buildExportsAssignment(_specifier4.node.exported, _specifier4.node.local));
9114 }
9115 }
9116 }
9117 _path.replaceWithMultiple(nodes);
9118 } else if (_path.isExportAllDeclaration()) {
9119 var exportNode = buildExportAll({
9120 OBJECT: addRequire(_path.node.source.value, _path.node._blockHoist)
9121 });
9122 exportNode.loc = _path.node.loc;
9123 topNodes.push(exportNode);
9124 _path.remove();
9125 }
9126 }
9127
9128 for (var source in imports) {
9129 var _imports$source = imports[source],
9130 specifiers = _imports$source.specifiers,
9131 maxBlockHoist = _imports$source.maxBlockHoist;
9132
9133 if (specifiers.length) {
9134 var uid = addRequire(source, maxBlockHoist);
9135
9136 var wildcard = void 0;
9137
9138 for (var i = 0; i < specifiers.length; i++) {
9139 var specifier = specifiers[i];
9140 if (t.isImportNamespaceSpecifier(specifier)) {
9141 if (strict || noInterop) {
9142 remaps[specifier.local.name] = uid;
9143 } else {
9144 var varDecl = t.variableDeclaration("var", [t.variableDeclarator(specifier.local, t.callExpression(this.addHelper("interopRequireWildcard"), [uid]))]);
9145
9146 if (maxBlockHoist > 0) {
9147 varDecl._blockHoist = maxBlockHoist;
9148 }
9149
9150 topNodes.push(varDecl);
9151 }
9152 wildcard = specifier.local;
9153 } else if (t.isImportDefaultSpecifier(specifier)) {
9154 specifiers[i] = t.importSpecifier(specifier.local, t.identifier("default"));
9155 }
9156 }
9157
9158 for (var _iterator5 = specifiers, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
9159 var _ref5;
9160
9161 if (_isArray5) {
9162 if (_i5 >= _iterator5.length) break;
9163 _ref5 = _iterator5[_i5++];
9164 } else {
9165 _i5 = _iterator5.next();
9166 if (_i5.done) break;
9167 _ref5 = _i5.value;
9168 }
9169
9170 var _specifier = _ref5;
9171
9172 if (t.isImportSpecifier(_specifier)) {
9173 var target = uid;
9174 if (_specifier.imported.name === "default") {
9175 if (wildcard) {
9176 target = wildcard;
9177 } else if (!noInterop) {
9178 target = wildcard = path.scope.generateUidIdentifier(uid.name);
9179 var _varDecl = t.variableDeclaration("var", [t.variableDeclarator(target, t.callExpression(this.addHelper("interopRequireDefault"), [uid]))]);
9180
9181 if (maxBlockHoist > 0) {
9182 _varDecl._blockHoist = maxBlockHoist;
9183 }
9184
9185 topNodes.push(_varDecl);
9186 }
9187 }
9188 remaps[_specifier.local.name] = t.memberExpression(target, t.cloneWithoutLoc(_specifier.imported));
9189 }
9190 }
9191 } else {
9192 var requireNode = buildRequire(t.stringLiteral(source));
9193 requireNode.loc = imports[source].loc;
9194 topNodes.push(requireNode);
9195 }
9196 }
9197
9198 if (hasImports && (0, _keys2.default)(nonHoistedExportNames).length) {
9199 var maxHoistedExportsNodeAssignmentLength = 100;
9200 var nonHoistedExportNamesArr = (0, _keys2.default)(nonHoistedExportNames);
9201
9202 var _loop = function _loop(currentExportsNodeAssignmentLength) {
9203 var nonHoistedExportNamesChunk = nonHoistedExportNamesArr.slice(currentExportsNodeAssignmentLength, currentExportsNodeAssignmentLength + maxHoistedExportsNodeAssignmentLength);
9204
9205 var hoistedExportsNode = t.identifier("undefined");
9206
9207 nonHoistedExportNamesChunk.forEach(function (name) {
9208 hoistedExportsNode = buildExportsAssignment(t.identifier(name), hoistedExportsNode).expression;
9209 });
9210
9211 var node = t.expressionStatement(hoistedExportsNode);
9212 node._blockHoist = 3;
9213
9214 topNodes.unshift(node);
9215 };
9216
9217 for (var currentExportsNodeAssignmentLength = 0; currentExportsNodeAssignmentLength < nonHoistedExportNamesArr.length; currentExportsNodeAssignmentLength += maxHoistedExportsNodeAssignmentLength) {
9218 _loop(currentExportsNodeAssignmentLength);
9219 }
9220 }
9221
9222 if (hasExports && !strict) {
9223 var buildTemplate = buildExportsModuleDeclaration;
9224 if (this.opts.loose) buildTemplate = buildLooseExportsModuleDeclaration;
9225
9226 var declar = buildTemplate();
9227 declar._blockHoist = 3;
9228
9229 topNodes.unshift(declar);
9230 }
9231
9232 path.unshiftContainer("body", topNodes);
9233 path.traverse(reassignmentVisitor, {
9234 remaps: remaps,
9235 scope: scope,
9236 exports: exports,
9237 requeueInParent: function requeueInParent(newPath) {
9238 return path.requeue(newPath);
9239 }
9240 });
9241 }
9242 }
9243 }
9244 };
9245 };
9246
9247 var _path2 = __webpack_require__(19);
9248
9249 var _babelTemplate = __webpack_require__(4);
9250
9251 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
9252
9253 var _babelPluginTransformStrictMode = __webpack_require__(216);
9254
9255 var _babelPluginTransformStrictMode2 = _interopRequireDefault(_babelPluginTransformStrictMode);
9256
9257 var _babelTypes = __webpack_require__(1);
9258
9259 var t = _interopRequireWildcard(_babelTypes);
9260
9261 function _interopRequireWildcard(obj) {
9262 if (obj && obj.__esModule) {
9263 return obj;
9264 } else {
9265 var newObj = {};if (obj != null) {
9266 for (var key in obj) {
9267 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
9268 }
9269 }newObj.default = obj;return newObj;
9270 }
9271 }
9272
9273 function _interopRequireDefault(obj) {
9274 return obj && obj.__esModule ? obj : { default: obj };
9275 }
9276
9277 var buildRequire = (0, _babelTemplate2.default)("\n require($0);\n");
9278
9279 var buildExportsModuleDeclaration = (0, _babelTemplate2.default)("\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n");
9280
9281 var buildExportsFrom = (0, _babelTemplate2.default)("\n Object.defineProperty(exports, $0, {\n enumerable: true,\n get: function () {\n return $1;\n }\n });\n");
9282
9283 var buildLooseExportsModuleDeclaration = (0, _babelTemplate2.default)("\n exports.__esModule = true;\n");
9284
9285 var buildExportsAssignment = (0, _babelTemplate2.default)("\n exports.$0 = $1;\n");
9286
9287 var buildExportAll = (0, _babelTemplate2.default)("\n Object.keys(OBJECT).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return OBJECT[key];\n }\n });\n });\n");
9288
9289 var THIS_BREAK_KEYS = ["FunctionExpression", "FunctionDeclaration", "ClassProperty", "ClassMethod", "ObjectMethod"];
9290
9291 module.exports = exports["default"];
9292
9293/***/ }),
9294/* 78 */
9295/***/ (function(module, exports, __webpack_require__) {
9296
9297 "use strict";
9298
9299 exports.__esModule = true;
9300
9301 var _getIterator2 = __webpack_require__(2);
9302
9303 var _getIterator3 = _interopRequireDefault(_getIterator2);
9304
9305 var _symbol = __webpack_require__(10);
9306
9307 var _symbol2 = _interopRequireDefault(_symbol);
9308
9309 exports.default = function (_ref) {
9310 var t = _ref.types;
9311
9312 function Property(path, node, scope, getObjectRef, file) {
9313 var replaceSupers = new _babelHelperReplaceSupers2.default({
9314 getObjectRef: getObjectRef,
9315 methodNode: node,
9316 methodPath: path,
9317 isStatic: true,
9318 scope: scope,
9319 file: file
9320 });
9321
9322 replaceSupers.replace();
9323 }
9324
9325 var CONTAINS_SUPER = (0, _symbol2.default)();
9326
9327 return {
9328 visitor: {
9329 Super: function Super(path) {
9330 var parentObj = path.findParent(function (path) {
9331 return path.isObjectExpression();
9332 });
9333 if (parentObj) parentObj.node[CONTAINS_SUPER] = true;
9334 },
9335
9336 ObjectExpression: {
9337 exit: function exit(path, file) {
9338 if (!path.node[CONTAINS_SUPER]) return;
9339
9340 var objectRef = void 0;
9341 var getObjectRef = function getObjectRef() {
9342 return objectRef = objectRef || path.scope.generateUidIdentifier("obj");
9343 };
9344
9345 var propPaths = path.get("properties");
9346 for (var _iterator = propPaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
9347 var _ref2;
9348
9349 if (_isArray) {
9350 if (_i >= _iterator.length) break;
9351 _ref2 = _iterator[_i++];
9352 } else {
9353 _i = _iterator.next();
9354 if (_i.done) break;
9355 _ref2 = _i.value;
9356 }
9357
9358 var propPath = _ref2;
9359
9360 if (propPath.isObjectProperty()) propPath = propPath.get("value");
9361 Property(propPath, propPath.node, path.scope, getObjectRef, file);
9362 }
9363
9364 if (objectRef) {
9365 path.scope.push({ id: objectRef });
9366 path.replaceWith(t.assignmentExpression("=", objectRef, path.node));
9367 }
9368 }
9369 }
9370 }
9371 };
9372 };
9373
9374 var _babelHelperReplaceSupers = __webpack_require__(193);
9375
9376 var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers);
9377
9378 function _interopRequireDefault(obj) {
9379 return obj && obj.__esModule ? obj : { default: obj };
9380 }
9381
9382 module.exports = exports["default"];
9383
9384/***/ }),
9385/* 79 */
9386/***/ (function(module, exports, __webpack_require__) {
9387
9388 "use strict";
9389
9390 exports.__esModule = true;
9391
9392 var _getIterator2 = __webpack_require__(2);
9393
9394 var _getIterator3 = _interopRequireDefault(_getIterator2);
9395
9396 exports.default = function () {
9397 return {
9398 visitor: _babelTraverse.visitors.merge([{
9399 ArrowFunctionExpression: function ArrowFunctionExpression(path) {
9400 var params = path.get("params");
9401 for (var _iterator = params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
9402 var _ref;
9403
9404 if (_isArray) {
9405 if (_i >= _iterator.length) break;
9406 _ref = _iterator[_i++];
9407 } else {
9408 _i = _iterator.next();
9409 if (_i.done) break;
9410 _ref = _i.value;
9411 }
9412
9413 var param = _ref;
9414
9415 if (param.isRestElement() || param.isAssignmentPattern()) {
9416 path.arrowFunctionToShadowed();
9417 break;
9418 }
9419 }
9420 }
9421 }, destructuring.visitor, rest.visitor, def.visitor])
9422 };
9423 };
9424
9425 var _babelTraverse = __webpack_require__(7);
9426
9427 var _destructuring = __webpack_require__(334);
9428
9429 var destructuring = _interopRequireWildcard(_destructuring);
9430
9431 var _default = __webpack_require__(333);
9432
9433 var def = _interopRequireWildcard(_default);
9434
9435 var _rest = __webpack_require__(335);
9436
9437 var rest = _interopRequireWildcard(_rest);
9438
9439 function _interopRequireWildcard(obj) {
9440 if (obj && obj.__esModule) {
9441 return obj;
9442 } else {
9443 var newObj = {};if (obj != null) {
9444 for (var key in obj) {
9445 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
9446 }
9447 }newObj.default = obj;return newObj;
9448 }
9449 }
9450
9451 function _interopRequireDefault(obj) {
9452 return obj && obj.__esModule ? obj : { default: obj };
9453 }
9454
9455 module.exports = exports["default"];
9456
9457/***/ }),
9458/* 80 */
9459/***/ (function(module, exports, __webpack_require__) {
9460
9461 "use strict";
9462
9463 exports.__esModule = true;
9464
9465 exports.default = function () {
9466 return {
9467 visitor: {
9468 ObjectMethod: function ObjectMethod(path) {
9469 var node = path.node;
9470
9471 if (node.kind === "method") {
9472 var func = t.functionExpression(null, node.params, node.body, node.generator, node.async);
9473 func.returnType = node.returnType;
9474
9475 path.replaceWith(t.objectProperty(node.key, func, node.computed));
9476 }
9477 },
9478 ObjectProperty: function ObjectProperty(_ref) {
9479 var node = _ref.node;
9480
9481 if (node.shorthand) {
9482 node.shorthand = false;
9483 }
9484 }
9485 }
9486 };
9487 };
9488
9489 var _babelTypes = __webpack_require__(1);
9490
9491 var t = _interopRequireWildcard(_babelTypes);
9492
9493 function _interopRequireWildcard(obj) {
9494 if (obj && obj.__esModule) {
9495 return obj;
9496 } else {
9497 var newObj = {};if (obj != null) {
9498 for (var key in obj) {
9499 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
9500 }
9501 }newObj.default = obj;return newObj;
9502 }
9503 }
9504
9505 module.exports = exports["default"];
9506
9507/***/ }),
9508/* 81 */
9509/***/ (function(module, exports, __webpack_require__) {
9510
9511 "use strict";
9512
9513 exports.__esModule = true;
9514
9515 var _getIterator2 = __webpack_require__(2);
9516
9517 var _getIterator3 = _interopRequireDefault(_getIterator2);
9518
9519 exports.default = function (_ref) {
9520 var t = _ref.types;
9521
9522 function getSpreadLiteral(spread, scope, state) {
9523 if (state.opts.loose && !t.isIdentifier(spread.argument, { name: "arguments" })) {
9524 return spread.argument;
9525 } else {
9526 return scope.toArray(spread.argument, true);
9527 }
9528 }
9529
9530 function hasSpread(nodes) {
9531 for (var i = 0; i < nodes.length; i++) {
9532 if (t.isSpreadElement(nodes[i])) {
9533 return true;
9534 }
9535 }
9536 return false;
9537 }
9538
9539 function build(props, scope, state) {
9540 var nodes = [];
9541
9542 var _props = [];
9543
9544 function push() {
9545 if (!_props.length) return;
9546 nodes.push(t.arrayExpression(_props));
9547 _props = [];
9548 }
9549
9550 for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
9551 var _ref2;
9552
9553 if (_isArray) {
9554 if (_i >= _iterator.length) break;
9555 _ref2 = _iterator[_i++];
9556 } else {
9557 _i = _iterator.next();
9558 if (_i.done) break;
9559 _ref2 = _i.value;
9560 }
9561
9562 var prop = _ref2;
9563
9564 if (t.isSpreadElement(prop)) {
9565 push();
9566 nodes.push(getSpreadLiteral(prop, scope, state));
9567 } else {
9568 _props.push(prop);
9569 }
9570 }
9571
9572 push();
9573
9574 return nodes;
9575 }
9576
9577 return {
9578 visitor: {
9579 ArrayExpression: function ArrayExpression(path, state) {
9580 var node = path.node,
9581 scope = path.scope;
9582
9583 var elements = node.elements;
9584 if (!hasSpread(elements)) return;
9585
9586 var nodes = build(elements, scope, state);
9587 var first = nodes.shift();
9588
9589 if (!t.isArrayExpression(first)) {
9590 nodes.unshift(first);
9591 first = t.arrayExpression([]);
9592 }
9593
9594 path.replaceWith(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes));
9595 },
9596 CallExpression: function CallExpression(path, state) {
9597 var node = path.node,
9598 scope = path.scope;
9599
9600 var args = node.arguments;
9601 if (!hasSpread(args)) return;
9602
9603 var calleePath = path.get("callee");
9604 if (calleePath.isSuper()) return;
9605
9606 var contextLiteral = t.identifier("undefined");
9607
9608 node.arguments = [];
9609
9610 var nodes = void 0;
9611 if (args.length === 1 && args[0].argument.name === "arguments") {
9612 nodes = [args[0].argument];
9613 } else {
9614 nodes = build(args, scope, state);
9615 }
9616
9617 var first = nodes.shift();
9618 if (nodes.length) {
9619 node.arguments.push(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes));
9620 } else {
9621 node.arguments.push(first);
9622 }
9623
9624 var callee = node.callee;
9625
9626 if (calleePath.isMemberExpression()) {
9627 var temp = scope.maybeGenerateMemoised(callee.object);
9628 if (temp) {
9629 callee.object = t.assignmentExpression("=", temp, callee.object);
9630 contextLiteral = temp;
9631 } else {
9632 contextLiteral = callee.object;
9633 }
9634 t.appendToMemberExpression(callee, t.identifier("apply"));
9635 } else {
9636 node.callee = t.memberExpression(node.callee, t.identifier("apply"));
9637 }
9638
9639 if (t.isSuper(contextLiteral)) {
9640 contextLiteral = t.thisExpression();
9641 }
9642
9643 node.arguments.unshift(contextLiteral);
9644 },
9645 NewExpression: function NewExpression(path, state) {
9646 var node = path.node,
9647 scope = path.scope;
9648
9649 var args = node.arguments;
9650 if (!hasSpread(args)) return;
9651
9652 var nodes = build(args, scope, state);
9653
9654 var context = t.arrayExpression([t.nullLiteral()]);
9655
9656 args = t.callExpression(t.memberExpression(context, t.identifier("concat")), nodes);
9657
9658 path.replaceWith(t.newExpression(t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Function"), t.identifier("prototype")), t.identifier("bind")), t.identifier("apply")), [node.callee, args]), []));
9659 }
9660 }
9661 };
9662 };
9663
9664 function _interopRequireDefault(obj) {
9665 return obj && obj.__esModule ? obj : { default: obj };
9666 }
9667
9668 module.exports = exports["default"];
9669
9670/***/ }),
9671/* 82 */
9672/***/ (function(module, exports, __webpack_require__) {
9673
9674 "use strict";
9675
9676 exports.__esModule = true;
9677
9678 exports.default = function () {
9679 return {
9680 visitor: {
9681 RegExpLiteral: function RegExpLiteral(path) {
9682 var node = path.node;
9683
9684 if (!regex.is(node, "y")) return;
9685
9686 path.replaceWith(t.newExpression(t.identifier("RegExp"), [t.stringLiteral(node.pattern), t.stringLiteral(node.flags)]));
9687 }
9688 }
9689 };
9690 };
9691
9692 var _babelHelperRegex = __webpack_require__(192);
9693
9694 var regex = _interopRequireWildcard(_babelHelperRegex);
9695
9696 var _babelTypes = __webpack_require__(1);
9697
9698 var t = _interopRequireWildcard(_babelTypes);
9699
9700 function _interopRequireWildcard(obj) {
9701 if (obj && obj.__esModule) {
9702 return obj;
9703 } else {
9704 var newObj = {};if (obj != null) {
9705 for (var key in obj) {
9706 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
9707 }
9708 }newObj.default = obj;return newObj;
9709 }
9710 }
9711
9712 module.exports = exports["default"];
9713
9714/***/ }),
9715/* 83 */
9716/***/ (function(module, exports, __webpack_require__) {
9717
9718 "use strict";
9719
9720 exports.__esModule = true;
9721
9722 var _getIterator2 = __webpack_require__(2);
9723
9724 var _getIterator3 = _interopRequireDefault(_getIterator2);
9725
9726 exports.default = function (_ref) {
9727 var t = _ref.types;
9728
9729 function isString(node) {
9730 return t.isLiteral(node) && typeof node.value === "string";
9731 }
9732
9733 function buildBinaryExpression(left, right) {
9734 return t.binaryExpression("+", left, right);
9735 }
9736
9737 return {
9738 visitor: {
9739 TaggedTemplateExpression: function TaggedTemplateExpression(path, state) {
9740 var node = path.node;
9741
9742 var quasi = node.quasi;
9743 var args = [];
9744
9745 var strings = [];
9746 var raw = [];
9747
9748 for (var _iterator = quasi.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
9749 var _ref2;
9750
9751 if (_isArray) {
9752 if (_i >= _iterator.length) break;
9753 _ref2 = _iterator[_i++];
9754 } else {
9755 _i = _iterator.next();
9756 if (_i.done) break;
9757 _ref2 = _i.value;
9758 }
9759
9760 var elem = _ref2;
9761
9762 strings.push(t.stringLiteral(elem.value.cooked));
9763 raw.push(t.stringLiteral(elem.value.raw));
9764 }
9765
9766 strings = t.arrayExpression(strings);
9767 raw = t.arrayExpression(raw);
9768
9769 var templateName = "taggedTemplateLiteral";
9770 if (state.opts.loose) templateName += "Loose";
9771
9772 var templateObject = state.file.addTemplateObject(templateName, strings, raw);
9773 args.push(templateObject);
9774
9775 args = args.concat(quasi.expressions);
9776
9777 path.replaceWith(t.callExpression(node.tag, args));
9778 },
9779 TemplateLiteral: function TemplateLiteral(path, state) {
9780 var nodes = [];
9781
9782 var expressions = path.get("expressions");
9783
9784 for (var _iterator2 = path.node.quasis, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
9785 var _ref3;
9786
9787 if (_isArray2) {
9788 if (_i2 >= _iterator2.length) break;
9789 _ref3 = _iterator2[_i2++];
9790 } else {
9791 _i2 = _iterator2.next();
9792 if (_i2.done) break;
9793 _ref3 = _i2.value;
9794 }
9795
9796 var elem = _ref3;
9797
9798 nodes.push(t.stringLiteral(elem.value.cooked));
9799
9800 var expr = expressions.shift();
9801 if (expr) {
9802 if (state.opts.spec && !expr.isBaseType("string") && !expr.isBaseType("number")) {
9803 nodes.push(t.callExpression(t.identifier("String"), [expr.node]));
9804 } else {
9805 nodes.push(expr.node);
9806 }
9807 }
9808 }
9809
9810 nodes = nodes.filter(function (n) {
9811 return !t.isLiteral(n, { value: "" });
9812 });
9813
9814 if (!isString(nodes[0]) && !isString(nodes[1])) {
9815 nodes.unshift(t.stringLiteral(""));
9816 }
9817
9818 if (nodes.length > 1) {
9819 var root = buildBinaryExpression(nodes.shift(), nodes.shift());
9820
9821 for (var _iterator3 = nodes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
9822 var _ref4;
9823
9824 if (_isArray3) {
9825 if (_i3 >= _iterator3.length) break;
9826 _ref4 = _iterator3[_i3++];
9827 } else {
9828 _i3 = _iterator3.next();
9829 if (_i3.done) break;
9830 _ref4 = _i3.value;
9831 }
9832
9833 var node = _ref4;
9834
9835 root = buildBinaryExpression(root, node);
9836 }
9837
9838 path.replaceWith(root);
9839 } else {
9840 path.replaceWith(nodes[0]);
9841 }
9842 }
9843 }
9844 };
9845 };
9846
9847 function _interopRequireDefault(obj) {
9848 return obj && obj.__esModule ? obj : { default: obj };
9849 }
9850
9851 module.exports = exports["default"];
9852
9853/***/ }),
9854/* 84 */
9855/***/ (function(module, exports, __webpack_require__) {
9856
9857 "use strict";
9858
9859 exports.__esModule = true;
9860
9861 var _symbol = __webpack_require__(10);
9862
9863 var _symbol2 = _interopRequireDefault(_symbol);
9864
9865 exports.default = function (_ref) {
9866 var t = _ref.types;
9867
9868 var IGNORE = (0, _symbol2.default)();
9869
9870 return {
9871 visitor: {
9872 Scope: function Scope(_ref2) {
9873 var scope = _ref2.scope;
9874
9875 if (!scope.getBinding("Symbol")) {
9876 return;
9877 }
9878
9879 scope.rename("Symbol");
9880 },
9881 UnaryExpression: function UnaryExpression(path) {
9882 var node = path.node,
9883 parent = path.parent;
9884
9885 if (node[IGNORE]) return;
9886 if (path.find(function (path) {
9887 return path.node && !!path.node._generated;
9888 })) return;
9889
9890 if (path.parentPath.isBinaryExpression() && t.EQUALITY_BINARY_OPERATORS.indexOf(parent.operator) >= 0) {
9891 var opposite = path.getOpposite();
9892 if (opposite.isLiteral() && opposite.node.value !== "symbol" && opposite.node.value !== "object") {
9893 return;
9894 }
9895 }
9896
9897 if (node.operator === "typeof") {
9898 var call = t.callExpression(this.addHelper("typeof"), [node.argument]);
9899 if (path.get("argument").isIdentifier()) {
9900 var undefLiteral = t.stringLiteral("undefined");
9901 var unary = t.unaryExpression("typeof", node.argument);
9902 unary[IGNORE] = true;
9903 path.replaceWith(t.conditionalExpression(t.binaryExpression("===", unary, undefLiteral), undefLiteral, call));
9904 } else {
9905 path.replaceWith(call);
9906 }
9907 }
9908 }
9909 }
9910 };
9911 };
9912
9913 function _interopRequireDefault(obj) {
9914 return obj && obj.__esModule ? obj : { default: obj };
9915 }
9916
9917 module.exports = exports["default"];
9918
9919/***/ }),
9920/* 85 */
9921/***/ (function(module, exports, __webpack_require__) {
9922
9923 "use strict";
9924
9925 exports.__esModule = true;
9926
9927 exports.default = function () {
9928 return {
9929 visitor: {
9930 RegExpLiteral: function RegExpLiteral(_ref) {
9931 var node = _ref.node;
9932
9933 if (!regex.is(node, "u")) return;
9934 node.pattern = (0, _regexpuCore2.default)(node.pattern, node.flags);
9935 regex.pullFlag(node, "u");
9936 }
9937 }
9938 };
9939 };
9940
9941 var _regexpuCore = __webpack_require__(612);
9942
9943 var _regexpuCore2 = _interopRequireDefault(_regexpuCore);
9944
9945 var _babelHelperRegex = __webpack_require__(192);
9946
9947 var regex = _interopRequireWildcard(_babelHelperRegex);
9948
9949 function _interopRequireWildcard(obj) {
9950 if (obj && obj.__esModule) {
9951 return obj;
9952 } else {
9953 var newObj = {};if (obj != null) {
9954 for (var key in obj) {
9955 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
9956 }
9957 }newObj.default = obj;return newObj;
9958 }
9959 }
9960
9961 function _interopRequireDefault(obj) {
9962 return obj && obj.__esModule ? obj : { default: obj };
9963 }
9964
9965 module.exports = exports["default"];
9966
9967/***/ }),
9968/* 86 */
9969/***/ (function(module, exports, __webpack_require__) {
9970
9971 "use strict";
9972
9973 module.exports = __webpack_require__(606);
9974
9975/***/ }),
9976/* 87 */
9977/***/ (function(module, exports, __webpack_require__) {
9978
9979 "use strict";
9980
9981 module.exports = { "default": __webpack_require__(408), __esModule: true };
9982
9983/***/ }),
9984/* 88 */
9985/***/ (function(module, exports, __webpack_require__) {
9986
9987 "use strict";
9988
9989 exports.__esModule = true;
9990 exports.scope = exports.path = undefined;
9991
9992 var _weakMap = __webpack_require__(364);
9993
9994 var _weakMap2 = _interopRequireDefault(_weakMap);
9995
9996 exports.clear = clear;
9997 exports.clearPath = clearPath;
9998 exports.clearScope = clearScope;
9999
10000 function _interopRequireDefault(obj) {
10001 return obj && obj.__esModule ? obj : { default: obj };
10002 }
10003
10004 var path = exports.path = new _weakMap2.default();
10005 var scope = exports.scope = new _weakMap2.default();
10006
10007 function clear() {
10008 clearPath();
10009 clearScope();
10010 }
10011
10012 function clearPath() {
10013 exports.path = path = new _weakMap2.default();
10014 }
10015
10016 function clearScope() {
10017 exports.scope = scope = new _weakMap2.default();
10018 }
10019
10020/***/ }),
10021/* 89 */
10022/***/ (function(module, exports) {
10023
10024 'use strict';
10025
10026 var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
10027
10028 Object.defineProperty(exports, '__esModule', { value: true });
10029
10030 /* eslint max-len: 0 */
10031
10032 // This is a trick taken from Esprima. It turns out that, on
10033 // non-Chrome browsers, to check whether a string is in a set, a
10034 // predicate containing a big ugly `switch` statement is faster than
10035 // a regular expression, and on Chrome the two are about on par.
10036 // This function uses `eval` (non-lexical) to produce such a
10037 // predicate from a space-separated string of words.
10038 //
10039 // It starts by sorting the words by length.
10040
10041 function makePredicate(words) {
10042 words = words.split(" ");
10043 return function (str) {
10044 return words.indexOf(str) >= 0;
10045 };
10046 }
10047
10048 // Reserved word lists for various dialects of the language
10049
10050 var reservedWords = {
10051 6: makePredicate("enum await"),
10052 strict: makePredicate("implements interface let package private protected public static yield"),
10053 strictBind: makePredicate("eval arguments")
10054 };
10055
10056 // And the keywords
10057
10058 var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");
10059
10060 // ## Character categories
10061
10062 // Big ugly regular expressions that match characters in the
10063 // whitespace, identifier, and identifier-start categories. These
10064 // are only applied when a character is found to actually have a
10065 // code point above 128.
10066 // Generated by `bin/generate-identifier-regex.js`.
10067
10068 var nonASCIIidentifierStartChars = '\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC';
10069 var nonASCIIidentifierChars = '\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F';
10070
10071 var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
10072 var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
10073
10074 nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
10075
10076 // These are a run-length and offset encoded representation of the
10077 // >0xffff code points that are a valid part of identifiers. The
10078 // offset starts at 0x10000, and each pair of numbers represents an
10079 // offset to the next range, and then a size of the range. They were
10080 // generated by `bin/generate-identifier-regex.js`.
10081 // eslint-disable-next-line comma-spacing
10082 var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 449, 56, 264, 8, 2, 36, 18, 0, 50, 29, 881, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 0, 32, 6124, 20, 754, 9486, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 10591, 541];
10083 // eslint-disable-next-line comma-spacing
10084 var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 838, 7, 2, 7, 17, 9, 57, 21, 2, 13, 19882, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239];
10085
10086 // This has a complexity linear to the value of the code. The
10087 // assumption is that looking up astral identifier characters is
10088 // rare.
10089 function isInAstralSet(code, set) {
10090 var pos = 0x10000;
10091 for (var i = 0; i < set.length; i += 2) {
10092 pos += set[i];
10093 if (pos > code) return false;
10094
10095 pos += set[i + 1];
10096 if (pos >= code) return true;
10097 }
10098 }
10099
10100 // Test whether a given character code starts an identifier.
10101
10102 function isIdentifierStart(code) {
10103 if (code < 65) return code === 36;
10104 if (code < 91) return true;
10105 if (code < 97) return code === 95;
10106 if (code < 123) return true;
10107 if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
10108 return isInAstralSet(code, astralIdentifierStartCodes);
10109 }
10110
10111 // Test whether a given character is part of an identifier.
10112
10113 function isIdentifierChar(code) {
10114 if (code < 48) return code === 36;
10115 if (code < 58) return true;
10116 if (code < 65) return false;
10117 if (code < 91) return true;
10118 if (code < 97) return code === 95;
10119 if (code < 123) return true;
10120 if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
10121 return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
10122 }
10123
10124 // A second optional argument can be given to further configure
10125 var defaultOptions = {
10126 // Source type ("script" or "module") for different semantics
10127 sourceType: "script",
10128 // Source filename.
10129 sourceFilename: undefined,
10130 // Line from which to start counting source. Useful for
10131 // integration with other tools.
10132 startLine: 1,
10133 // When enabled, a return at the top level is not considered an
10134 // error.
10135 allowReturnOutsideFunction: false,
10136 // When enabled, import/export statements are not constrained to
10137 // appearing at the top of the program.
10138 allowImportExportEverywhere: false,
10139 // TODO
10140 allowSuperOutsideMethod: false,
10141 // An array of plugins to enable
10142 plugins: [],
10143 // TODO
10144 strictMode: null
10145 };
10146
10147 // Interpret and default an options object
10148
10149 function getOptions(opts) {
10150 var options = {};
10151 for (var key in defaultOptions) {
10152 options[key] = opts && key in opts ? opts[key] : defaultOptions[key];
10153 }
10154 return options;
10155 }
10156
10157 var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
10158 return typeof obj === 'undefined' ? 'undefined' : _typeof2(obj);
10159 } : function (obj) {
10160 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === 'undefined' ? 'undefined' : _typeof2(obj);
10161 };
10162
10163 var classCallCheck = function classCallCheck(instance, Constructor) {
10164 if (!(instance instanceof Constructor)) {
10165 throw new TypeError("Cannot call a class as a function");
10166 }
10167 };
10168
10169 var inherits = function inherits(subClass, superClass) {
10170 if (typeof superClass !== "function" && superClass !== null) {
10171 throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === 'undefined' ? 'undefined' : _typeof2(superClass)));
10172 }
10173
10174 subClass.prototype = Object.create(superClass && superClass.prototype, {
10175 constructor: {
10176 value: subClass,
10177 enumerable: false,
10178 writable: true,
10179 configurable: true
10180 }
10181 });
10182 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10183 };
10184
10185 var possibleConstructorReturn = function possibleConstructorReturn(self, call) {
10186 if (!self) {
10187 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10188 }
10189
10190 return call && ((typeof call === 'undefined' ? 'undefined' : _typeof2(call)) === "object" || typeof call === "function") ? call : self;
10191 };
10192
10193 // ## Token types
10194
10195 // The assignment of fine-grained, information-carrying type objects
10196 // allows the tokenizer to store the information it has about a
10197 // token in a way that is very cheap for the parser to look up.
10198
10199 // All token type variables start with an underscore, to make them
10200 // easy to recognize.
10201
10202 // The `beforeExpr` property is used to disambiguate between regular
10203 // expressions and divisions. It is set on all token types that can
10204 // be followed by an expression (thus, a slash after them would be a
10205 // regular expression).
10206 //
10207 // `isLoop` marks a keyword as starting a loop, which is important
10208 // to know when parsing a label, in order to allow or disallow
10209 // continue jumps to that label.
10210
10211 var beforeExpr = true;
10212 var startsExpr = true;
10213 var isLoop = true;
10214 var isAssign = true;
10215 var prefix = true;
10216 var postfix = true;
10217
10218 var TokenType = function TokenType(label) {
10219 var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10220 classCallCheck(this, TokenType);
10221
10222 this.label = label;
10223 this.keyword = conf.keyword;
10224 this.beforeExpr = !!conf.beforeExpr;
10225 this.startsExpr = !!conf.startsExpr;
10226 this.rightAssociative = !!conf.rightAssociative;
10227 this.isLoop = !!conf.isLoop;
10228 this.isAssign = !!conf.isAssign;
10229 this.prefix = !!conf.prefix;
10230 this.postfix = !!conf.postfix;
10231 this.binop = conf.binop || null;
10232 this.updateContext = null;
10233 };
10234
10235 var KeywordTokenType = function (_TokenType) {
10236 inherits(KeywordTokenType, _TokenType);
10237
10238 function KeywordTokenType(name) {
10239 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10240 classCallCheck(this, KeywordTokenType);
10241
10242 options.keyword = name;
10243
10244 return possibleConstructorReturn(this, _TokenType.call(this, name, options));
10245 }
10246
10247 return KeywordTokenType;
10248 }(TokenType);
10249
10250 var BinopTokenType = function (_TokenType2) {
10251 inherits(BinopTokenType, _TokenType2);
10252
10253 function BinopTokenType(name, prec) {
10254 classCallCheck(this, BinopTokenType);
10255 return possibleConstructorReturn(this, _TokenType2.call(this, name, { beforeExpr: beforeExpr, binop: prec }));
10256 }
10257
10258 return BinopTokenType;
10259 }(TokenType);
10260
10261 var types = {
10262 num: new TokenType("num", { startsExpr: startsExpr }),
10263 regexp: new TokenType("regexp", { startsExpr: startsExpr }),
10264 string: new TokenType("string", { startsExpr: startsExpr }),
10265 name: new TokenType("name", { startsExpr: startsExpr }),
10266 eof: new TokenType("eof"),
10267
10268 // Punctuation token types.
10269 bracketL: new TokenType("[", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
10270 bracketR: new TokenType("]"),
10271 braceL: new TokenType("{", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
10272 braceBarL: new TokenType("{|", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
10273 braceR: new TokenType("}"),
10274 braceBarR: new TokenType("|}"),
10275 parenL: new TokenType("(", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
10276 parenR: new TokenType(")"),
10277 comma: new TokenType(",", { beforeExpr: beforeExpr }),
10278 semi: new TokenType(";", { beforeExpr: beforeExpr }),
10279 colon: new TokenType(":", { beforeExpr: beforeExpr }),
10280 doubleColon: new TokenType("::", { beforeExpr: beforeExpr }),
10281 dot: new TokenType("."),
10282 question: new TokenType("?", { beforeExpr: beforeExpr }),
10283 arrow: new TokenType("=>", { beforeExpr: beforeExpr }),
10284 template: new TokenType("template"),
10285 ellipsis: new TokenType("...", { beforeExpr: beforeExpr }),
10286 backQuote: new TokenType("`", { startsExpr: startsExpr }),
10287 dollarBraceL: new TokenType("${", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
10288 at: new TokenType("@"),
10289
10290 // Operators. These carry several kinds of properties to help the
10291 // parser use them properly (the presence of these properties is
10292 // what categorizes them as operators).
10293 //
10294 // `binop`, when present, specifies that this operator is a binary
10295 // operator, and will refer to its precedence.
10296 //
10297 // `prefix` and `postfix` mark the operator as a prefix or postfix
10298 // unary operator.
10299 //
10300 // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
10301 // binary operators with a very low precedence, that should result
10302 // in AssignmentExpression nodes.
10303
10304 eq: new TokenType("=", { beforeExpr: beforeExpr, isAssign: isAssign }),
10305 assign: new TokenType("_=", { beforeExpr: beforeExpr, isAssign: isAssign }),
10306 incDec: new TokenType("++/--", { prefix: prefix, postfix: postfix, startsExpr: startsExpr }),
10307 prefix: new TokenType("prefix", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
10308 logicalOR: new BinopTokenType("||", 1),
10309 logicalAND: new BinopTokenType("&&", 2),
10310 bitwiseOR: new BinopTokenType("|", 3),
10311 bitwiseXOR: new BinopTokenType("^", 4),
10312 bitwiseAND: new BinopTokenType("&", 5),
10313 equality: new BinopTokenType("==/!=", 6),
10314 relational: new BinopTokenType("</>", 7),
10315 bitShift: new BinopTokenType("<</>>", 8),
10316 plusMin: new TokenType("+/-", { beforeExpr: beforeExpr, binop: 9, prefix: prefix, startsExpr: startsExpr }),
10317 modulo: new BinopTokenType("%", 10),
10318 star: new BinopTokenType("*", 10),
10319 slash: new BinopTokenType("/", 10),
10320 exponent: new TokenType("**", { beforeExpr: beforeExpr, binop: 11, rightAssociative: true })
10321 };
10322
10323 var keywords = {
10324 "break": new KeywordTokenType("break"),
10325 "case": new KeywordTokenType("case", { beforeExpr: beforeExpr }),
10326 "catch": new KeywordTokenType("catch"),
10327 "continue": new KeywordTokenType("continue"),
10328 "debugger": new KeywordTokenType("debugger"),
10329 "default": new KeywordTokenType("default", { beforeExpr: beforeExpr }),
10330 "do": new KeywordTokenType("do", { isLoop: isLoop, beforeExpr: beforeExpr }),
10331 "else": new KeywordTokenType("else", { beforeExpr: beforeExpr }),
10332 "finally": new KeywordTokenType("finally"),
10333 "for": new KeywordTokenType("for", { isLoop: isLoop }),
10334 "function": new KeywordTokenType("function", { startsExpr: startsExpr }),
10335 "if": new KeywordTokenType("if"),
10336 "return": new KeywordTokenType("return", { beforeExpr: beforeExpr }),
10337 "switch": new KeywordTokenType("switch"),
10338 "throw": new KeywordTokenType("throw", { beforeExpr: beforeExpr }),
10339 "try": new KeywordTokenType("try"),
10340 "var": new KeywordTokenType("var"),
10341 "let": new KeywordTokenType("let"),
10342 "const": new KeywordTokenType("const"),
10343 "while": new KeywordTokenType("while", { isLoop: isLoop }),
10344 "with": new KeywordTokenType("with"),
10345 "new": new KeywordTokenType("new", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
10346 "this": new KeywordTokenType("this", { startsExpr: startsExpr }),
10347 "super": new KeywordTokenType("super", { startsExpr: startsExpr }),
10348 "class": new KeywordTokenType("class"),
10349 "extends": new KeywordTokenType("extends", { beforeExpr: beforeExpr }),
10350 "export": new KeywordTokenType("export"),
10351 "import": new KeywordTokenType("import", { startsExpr: startsExpr }),
10352 "yield": new KeywordTokenType("yield", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
10353 "null": new KeywordTokenType("null", { startsExpr: startsExpr }),
10354 "true": new KeywordTokenType("true", { startsExpr: startsExpr }),
10355 "false": new KeywordTokenType("false", { startsExpr: startsExpr }),
10356 "in": new KeywordTokenType("in", { beforeExpr: beforeExpr, binop: 7 }),
10357 "instanceof": new KeywordTokenType("instanceof", { beforeExpr: beforeExpr, binop: 7 }),
10358 "typeof": new KeywordTokenType("typeof", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
10359 "void": new KeywordTokenType("void", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
10360 "delete": new KeywordTokenType("delete", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr })
10361 };
10362
10363 // Map keyword names to token types.
10364 Object.keys(keywords).forEach(function (name) {
10365 types["_" + name] = keywords[name];
10366 });
10367
10368 // Matches a whole line break (where CRLF is considered a single
10369 // line break). Used to count lines.
10370
10371 var lineBreak = /\r\n?|\n|\u2028|\u2029/;
10372 var lineBreakG = new RegExp(lineBreak.source, "g");
10373
10374 function isNewLine(code) {
10375 return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
10376 }
10377
10378 var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
10379
10380 // The algorithm used to determine whether a regexp can appear at a
10381 // given point in the program is loosely based on sweet.js' approach.
10382 // See https://github.com/mozilla/sweet.js/wiki/design
10383
10384 var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
10385 classCallCheck(this, TokContext);
10386
10387 this.token = token;
10388 this.isExpr = !!isExpr;
10389 this.preserveSpace = !!preserveSpace;
10390 this.override = override;
10391 };
10392
10393 var types$1 = {
10394 braceStatement: new TokContext("{", false),
10395 braceExpression: new TokContext("{", true),
10396 templateQuasi: new TokContext("${", true),
10397 parenStatement: new TokContext("(", false),
10398 parenExpression: new TokContext("(", true),
10399 template: new TokContext("`", true, true, function (p) {
10400 return p.readTmplToken();
10401 }),
10402 functionExpression: new TokContext("function", true)
10403 };
10404
10405 // Token-specific context update code
10406
10407 types.parenR.updateContext = types.braceR.updateContext = function () {
10408 if (this.state.context.length === 1) {
10409 this.state.exprAllowed = true;
10410 return;
10411 }
10412
10413 var out = this.state.context.pop();
10414 if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) {
10415 this.state.context.pop();
10416 this.state.exprAllowed = false;
10417 } else if (out === types$1.templateQuasi) {
10418 this.state.exprAllowed = true;
10419 } else {
10420 this.state.exprAllowed = !out.isExpr;
10421 }
10422 };
10423
10424 types.name.updateContext = function (prevType) {
10425 this.state.exprAllowed = false;
10426
10427 if (prevType === types._let || prevType === types._const || prevType === types._var) {
10428 if (lineBreak.test(this.input.slice(this.state.end))) {
10429 this.state.exprAllowed = true;
10430 }
10431 }
10432 };
10433
10434 types.braceL.updateContext = function (prevType) {
10435 this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression);
10436 this.state.exprAllowed = true;
10437 };
10438
10439 types.dollarBraceL.updateContext = function () {
10440 this.state.context.push(types$1.templateQuasi);
10441 this.state.exprAllowed = true;
10442 };
10443
10444 types.parenL.updateContext = function (prevType) {
10445 var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
10446 this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression);
10447 this.state.exprAllowed = true;
10448 };
10449
10450 types.incDec.updateContext = function () {
10451 // tokExprAllowed stays unchanged
10452 };
10453
10454 types._function.updateContext = function () {
10455 if (this.curContext() !== types$1.braceStatement) {
10456 this.state.context.push(types$1.functionExpression);
10457 }
10458
10459 this.state.exprAllowed = false;
10460 };
10461
10462 types.backQuote.updateContext = function () {
10463 if (this.curContext() === types$1.template) {
10464 this.state.context.pop();
10465 } else {
10466 this.state.context.push(types$1.template);
10467 }
10468 this.state.exprAllowed = false;
10469 };
10470
10471 // These are used when `options.locations` is on, for the
10472 // `startLoc` and `endLoc` properties.
10473
10474 var Position = function Position(line, col) {
10475 classCallCheck(this, Position);
10476
10477 this.line = line;
10478 this.column = col;
10479 };
10480
10481 var SourceLocation = function SourceLocation(start, end) {
10482 classCallCheck(this, SourceLocation);
10483
10484 this.start = start;
10485 this.end = end;
10486 };
10487
10488 // The `getLineInfo` function is mostly useful when the
10489 // `locations` option is off (for performance reasons) and you
10490 // want to find the line/column position for a given character
10491 // offset. `input` should be the code string that the offset refers
10492 // into.
10493
10494 function getLineInfo(input, offset) {
10495 for (var line = 1, cur = 0;;) {
10496 lineBreakG.lastIndex = cur;
10497 var match = lineBreakG.exec(input);
10498 if (match && match.index < offset) {
10499 ++line;
10500 cur = match.index + match[0].length;
10501 } else {
10502 return new Position(line, offset - cur);
10503 }
10504 }
10505 }
10506
10507 var State = function () {
10508 function State() {
10509 classCallCheck(this, State);
10510 }
10511
10512 State.prototype.init = function init(options, input) {
10513 this.strict = options.strictMode === false ? false : options.sourceType === "module";
10514
10515 this.input = input;
10516
10517 this.potentialArrowAt = -1;
10518
10519 this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = false;
10520
10521 this.labels = [];
10522
10523 this.decorators = [];
10524
10525 this.tokens = [];
10526
10527 this.comments = [];
10528
10529 this.trailingComments = [];
10530 this.leadingComments = [];
10531 this.commentStack = [];
10532
10533 this.pos = this.lineStart = 0;
10534 this.curLine = options.startLine;
10535
10536 this.type = types.eof;
10537 this.value = null;
10538 this.start = this.end = this.pos;
10539 this.startLoc = this.endLoc = this.curPosition();
10540
10541 this.lastTokEndLoc = this.lastTokStartLoc = null;
10542 this.lastTokStart = this.lastTokEnd = this.pos;
10543
10544 this.context = [types$1.braceStatement];
10545 this.exprAllowed = true;
10546
10547 this.containsEsc = this.containsOctal = false;
10548 this.octalPosition = null;
10549
10550 this.invalidTemplateEscapePosition = null;
10551
10552 this.exportedIdentifiers = [];
10553
10554 return this;
10555 };
10556
10557 // TODO
10558
10559
10560 // TODO
10561
10562
10563 // Used to signify the start of a potential arrow function
10564
10565
10566 // Flags to track whether we are in a function, a generator.
10567
10568
10569 // Labels in scope.
10570
10571
10572 // Leading decorators.
10573
10574
10575 // Token store.
10576
10577
10578 // Comment store.
10579
10580
10581 // Comment attachment store
10582
10583
10584 // The current position of the tokenizer in the input.
10585
10586
10587 // Properties of the current token:
10588 // Its type
10589
10590
10591 // For tokens that include more information than their type, the value
10592
10593
10594 // Its start and end offset
10595
10596
10597 // And, if locations are used, the {line, column} object
10598 // corresponding to those offsets
10599
10600
10601 // Position information for the previous token
10602
10603
10604 // The context stack is used to superficially track syntactic
10605 // context to predict whether a regular expression is allowed in a
10606 // given position.
10607
10608
10609 // Used to signal to callers of `readWord1` whether the word
10610 // contained any escape sequences. This is needed because words with
10611 // escape sequences must not be interpreted as keywords.
10612
10613
10614 // TODO
10615
10616
10617 // Names of exports store. `default` is stored as a name for both
10618 // `export default foo;` and `export { foo as default };`.
10619
10620
10621 State.prototype.curPosition = function curPosition() {
10622 return new Position(this.curLine, this.pos - this.lineStart);
10623 };
10624
10625 State.prototype.clone = function clone(skipArrays) {
10626 var state = new State();
10627 for (var key in this) {
10628 var val = this[key];
10629
10630 if ((!skipArrays || key === "context") && Array.isArray(val)) {
10631 val = val.slice();
10632 }
10633
10634 state[key] = val;
10635 }
10636 return state;
10637 };
10638
10639 return State;
10640 }();
10641
10642 // Object type used to represent tokens. Note that normally, tokens
10643 // simply exist as properties on the parser object. This is only
10644 // used for the onToken callback and the external tokenizer.
10645
10646 var Token = function Token(state) {
10647 classCallCheck(this, Token);
10648
10649 this.type = state.type;
10650 this.value = state.value;
10651 this.start = state.start;
10652 this.end = state.end;
10653 this.loc = new SourceLocation(state.startLoc, state.endLoc);
10654 };
10655
10656 // ## Tokenizer
10657
10658 function codePointToString(code) {
10659 // UTF-16 Decoding
10660 if (code <= 0xFFFF) {
10661 return String.fromCharCode(code);
10662 } else {
10663 return String.fromCharCode((code - 0x10000 >> 10) + 0xD800, (code - 0x10000 & 1023) + 0xDC00);
10664 }
10665 }
10666
10667 var Tokenizer = function () {
10668 function Tokenizer(options, input) {
10669 classCallCheck(this, Tokenizer);
10670
10671 this.state = new State();
10672 this.state.init(options, input);
10673 }
10674
10675 // Move to the next token
10676
10677 Tokenizer.prototype.next = function next() {
10678 if (!this.isLookahead) {
10679 this.state.tokens.push(new Token(this.state));
10680 }
10681
10682 this.state.lastTokEnd = this.state.end;
10683 this.state.lastTokStart = this.state.start;
10684 this.state.lastTokEndLoc = this.state.endLoc;
10685 this.state.lastTokStartLoc = this.state.startLoc;
10686 this.nextToken();
10687 };
10688
10689 // TODO
10690
10691 Tokenizer.prototype.eat = function eat(type) {
10692 if (this.match(type)) {
10693 this.next();
10694 return true;
10695 } else {
10696 return false;
10697 }
10698 };
10699
10700 // TODO
10701
10702 Tokenizer.prototype.match = function match(type) {
10703 return this.state.type === type;
10704 };
10705
10706 // TODO
10707
10708 Tokenizer.prototype.isKeyword = function isKeyword$$1(word) {
10709 return isKeyword(word);
10710 };
10711
10712 // TODO
10713
10714 Tokenizer.prototype.lookahead = function lookahead() {
10715 var old = this.state;
10716 this.state = old.clone(true);
10717
10718 this.isLookahead = true;
10719 this.next();
10720 this.isLookahead = false;
10721
10722 var curr = this.state.clone(true);
10723 this.state = old;
10724 return curr;
10725 };
10726
10727 // Toggle strict mode. Re-reads the next number or string to please
10728 // pedantic tests (`"use strict"; 010;` should fail).
10729
10730 Tokenizer.prototype.setStrict = function setStrict(strict) {
10731 this.state.strict = strict;
10732 if (!this.match(types.num) && !this.match(types.string)) return;
10733 this.state.pos = this.state.start;
10734 while (this.state.pos < this.state.lineStart) {
10735 this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1;
10736 --this.state.curLine;
10737 }
10738 this.nextToken();
10739 };
10740
10741 Tokenizer.prototype.curContext = function curContext() {
10742 return this.state.context[this.state.context.length - 1];
10743 };
10744
10745 // Read a single token, updating the parser object's token-related
10746 // properties.
10747
10748 Tokenizer.prototype.nextToken = function nextToken() {
10749 var curContext = this.curContext();
10750 if (!curContext || !curContext.preserveSpace) this.skipSpace();
10751
10752 this.state.containsOctal = false;
10753 this.state.octalPosition = null;
10754 this.state.start = this.state.pos;
10755 this.state.startLoc = this.state.curPosition();
10756 if (this.state.pos >= this.input.length) return this.finishToken(types.eof);
10757
10758 if (curContext.override) {
10759 return curContext.override(this);
10760 } else {
10761 return this.readToken(this.fullCharCodeAtPos());
10762 }
10763 };
10764
10765 Tokenizer.prototype.readToken = function readToken(code) {
10766 // Identifier or keyword. '\uXXXX' sequences are allowed in
10767 // identifiers, so '\' also dispatches to that.
10768 if (isIdentifierStart(code) || code === 92 /* '\' */) {
10769 return this.readWord();
10770 } else {
10771 return this.getTokenFromCode(code);
10772 }
10773 };
10774
10775 Tokenizer.prototype.fullCharCodeAtPos = function fullCharCodeAtPos() {
10776 var code = this.input.charCodeAt(this.state.pos);
10777 if (code <= 0xd7ff || code >= 0xe000) return code;
10778
10779 var next = this.input.charCodeAt(this.state.pos + 1);
10780 return (code << 10) + next - 0x35fdc00;
10781 };
10782
10783 Tokenizer.prototype.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) {
10784 var comment = {
10785 type: block ? "CommentBlock" : "CommentLine",
10786 value: text,
10787 start: start,
10788 end: end,
10789 loc: new SourceLocation(startLoc, endLoc)
10790 };
10791
10792 if (!this.isLookahead) {
10793 this.state.tokens.push(comment);
10794 this.state.comments.push(comment);
10795 this.addComment(comment);
10796 }
10797 };
10798
10799 Tokenizer.prototype.skipBlockComment = function skipBlockComment() {
10800 var startLoc = this.state.curPosition();
10801 var start = this.state.pos;
10802 var end = this.input.indexOf("*/", this.state.pos += 2);
10803 if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
10804
10805 this.state.pos = end + 2;
10806 lineBreakG.lastIndex = start;
10807 var match = void 0;
10808 while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {
10809 ++this.state.curLine;
10810 this.state.lineStart = match.index + match[0].length;
10811 }
10812
10813 this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());
10814 };
10815
10816 Tokenizer.prototype.skipLineComment = function skipLineComment(startSkip) {
10817 var start = this.state.pos;
10818 var startLoc = this.state.curPosition();
10819 var ch = this.input.charCodeAt(this.state.pos += startSkip);
10820 while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
10821 ++this.state.pos;
10822 ch = this.input.charCodeAt(this.state.pos);
10823 }
10824
10825 this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
10826 };
10827
10828 // Called at the start of the parse and after every token. Skips
10829 // whitespace and comments, and.
10830
10831 Tokenizer.prototype.skipSpace = function skipSpace() {
10832 loop: while (this.state.pos < this.input.length) {
10833 var ch = this.input.charCodeAt(this.state.pos);
10834 switch (ch) {
10835 case 32:case 160:
10836 // ' '
10837 ++this.state.pos;
10838 break;
10839
10840 case 13:
10841 if (this.input.charCodeAt(this.state.pos + 1) === 10) {
10842 ++this.state.pos;
10843 }
10844
10845 case 10:case 8232:case 8233:
10846 ++this.state.pos;
10847 ++this.state.curLine;
10848 this.state.lineStart = this.state.pos;
10849 break;
10850
10851 case 47:
10852 // '/'
10853 switch (this.input.charCodeAt(this.state.pos + 1)) {
10854 case 42:
10855 // '*'
10856 this.skipBlockComment();
10857 break;
10858
10859 case 47:
10860 this.skipLineComment(2);
10861 break;
10862
10863 default:
10864 break loop;
10865 }
10866 break;
10867
10868 default:
10869 if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
10870 ++this.state.pos;
10871 } else {
10872 break loop;
10873 }
10874 }
10875 }
10876 };
10877
10878 // Called at the end of every token. Sets `end`, `val`, and
10879 // maintains `context` and `exprAllowed`, and skips the space after
10880 // the token, so that the next one's `start` will point at the
10881 // right position.
10882
10883 Tokenizer.prototype.finishToken = function finishToken(type, val) {
10884 this.state.end = this.state.pos;
10885 this.state.endLoc = this.state.curPosition();
10886 var prevType = this.state.type;
10887 this.state.type = type;
10888 this.state.value = val;
10889
10890 this.updateContext(prevType);
10891 };
10892
10893 // ### Token reading
10894
10895 // This is the function that is called to fetch the next token. It
10896 // is somewhat obscure, because it works in character codes rather
10897 // than characters, and because operator parsing has been inlined
10898 // into it.
10899 //
10900 // All in the name of speed.
10901 //
10902
10903
10904 Tokenizer.prototype.readToken_dot = function readToken_dot() {
10905 var next = this.input.charCodeAt(this.state.pos + 1);
10906 if (next >= 48 && next <= 57) {
10907 return this.readNumber(true);
10908 }
10909
10910 var next2 = this.input.charCodeAt(this.state.pos + 2);
10911 if (next === 46 && next2 === 46) {
10912 // 46 = dot '.'
10913 this.state.pos += 3;
10914 return this.finishToken(types.ellipsis);
10915 } else {
10916 ++this.state.pos;
10917 return this.finishToken(types.dot);
10918 }
10919 };
10920
10921 Tokenizer.prototype.readToken_slash = function readToken_slash() {
10922 // '/'
10923 if (this.state.exprAllowed) {
10924 ++this.state.pos;
10925 return this.readRegexp();
10926 }
10927
10928 var next = this.input.charCodeAt(this.state.pos + 1);
10929 if (next === 61) {
10930 return this.finishOp(types.assign, 2);
10931 } else {
10932 return this.finishOp(types.slash, 1);
10933 }
10934 };
10935
10936 Tokenizer.prototype.readToken_mult_modulo = function readToken_mult_modulo(code) {
10937 // '%*'
10938 var type = code === 42 ? types.star : types.modulo;
10939 var width = 1;
10940 var next = this.input.charCodeAt(this.state.pos + 1);
10941
10942 if (next === 42) {
10943 // '*'
10944 width++;
10945 next = this.input.charCodeAt(this.state.pos + 2);
10946 type = types.exponent;
10947 }
10948
10949 if (next === 61) {
10950 width++;
10951 type = types.assign;
10952 }
10953
10954 return this.finishOp(type, width);
10955 };
10956
10957 Tokenizer.prototype.readToken_pipe_amp = function readToken_pipe_amp(code) {
10958 // '|&'
10959 var next = this.input.charCodeAt(this.state.pos + 1);
10960 if (next === code) return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);
10961 if (next === 61) return this.finishOp(types.assign, 2);
10962 if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(types.braceBarR, 2);
10963 return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);
10964 };
10965
10966 Tokenizer.prototype.readToken_caret = function readToken_caret() {
10967 // '^'
10968 var next = this.input.charCodeAt(this.state.pos + 1);
10969 if (next === 61) {
10970 return this.finishOp(types.assign, 2);
10971 } else {
10972 return this.finishOp(types.bitwiseXOR, 1);
10973 }
10974 };
10975
10976 Tokenizer.prototype.readToken_plus_min = function readToken_plus_min(code) {
10977 // '+-'
10978 var next = this.input.charCodeAt(this.state.pos + 1);
10979
10980 if (next === code) {
10981 if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) {
10982 // A `-->` line comment
10983 this.skipLineComment(3);
10984 this.skipSpace();
10985 return this.nextToken();
10986 }
10987 return this.finishOp(types.incDec, 2);
10988 }
10989
10990 if (next === 61) {
10991 return this.finishOp(types.assign, 2);
10992 } else {
10993 return this.finishOp(types.plusMin, 1);
10994 }
10995 };
10996
10997 Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) {
10998 // '<>'
10999 var next = this.input.charCodeAt(this.state.pos + 1);
11000 var size = 1;
11001
11002 if (next === code) {
11003 size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
11004 if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(types.assign, size + 1);
11005 return this.finishOp(types.bitShift, size);
11006 }
11007
11008 if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
11009 if (this.inModule) this.unexpected();
11010 // `<!--`, an XML-style comment that should be interpreted as a line comment
11011 this.skipLineComment(4);
11012 this.skipSpace();
11013 return this.nextToken();
11014 }
11015
11016 if (next === 61) {
11017 // <= | >=
11018 size = 2;
11019 }
11020
11021 return this.finishOp(types.relational, size);
11022 };
11023
11024 Tokenizer.prototype.readToken_eq_excl = function readToken_eq_excl(code) {
11025 // '=!'
11026 var next = this.input.charCodeAt(this.state.pos + 1);
11027 if (next === 61) return this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
11028 if (code === 61 && next === 62) {
11029 // '=>'
11030 this.state.pos += 2;
11031 return this.finishToken(types.arrow);
11032 }
11033 return this.finishOp(code === 61 ? types.eq : types.prefix, 1);
11034 };
11035
11036 Tokenizer.prototype.getTokenFromCode = function getTokenFromCode(code) {
11037 switch (code) {
11038 // The interpretation of a dot depends on whether it is followed
11039 // by a digit or another two dots.
11040 case 46:
11041 // '.'
11042 return this.readToken_dot();
11043
11044 // Punctuation tokens.
11045 case 40:
11046 ++this.state.pos;return this.finishToken(types.parenL);
11047 case 41:
11048 ++this.state.pos;return this.finishToken(types.parenR);
11049 case 59:
11050 ++this.state.pos;return this.finishToken(types.semi);
11051 case 44:
11052 ++this.state.pos;return this.finishToken(types.comma);
11053 case 91:
11054 ++this.state.pos;return this.finishToken(types.bracketL);
11055 case 93:
11056 ++this.state.pos;return this.finishToken(types.bracketR);
11057
11058 case 123:
11059 if (this.hasPlugin("flow") && this.input.charCodeAt(this.state.pos + 1) === 124) {
11060 return this.finishOp(types.braceBarL, 2);
11061 } else {
11062 ++this.state.pos;
11063 return this.finishToken(types.braceL);
11064 }
11065
11066 case 125:
11067 ++this.state.pos;return this.finishToken(types.braceR);
11068
11069 case 58:
11070 if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
11071 return this.finishOp(types.doubleColon, 2);
11072 } else {
11073 ++this.state.pos;
11074 return this.finishToken(types.colon);
11075 }
11076
11077 case 63:
11078 ++this.state.pos;return this.finishToken(types.question);
11079 case 64:
11080 ++this.state.pos;return this.finishToken(types.at);
11081
11082 case 96:
11083 // '`'
11084 ++this.state.pos;
11085 return this.finishToken(types.backQuote);
11086
11087 case 48:
11088 // '0'
11089 var next = this.input.charCodeAt(this.state.pos + 1);
11090 if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
11091 if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
11092 if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
11093 // Anything else beginning with a digit is an integer, octal
11094 // number, or float.
11095 case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:
11096 // 1-9
11097 return this.readNumber(false);
11098
11099 // Quotes produce strings.
11100 case 34:case 39:
11101 // '"', "'"
11102 return this.readString(code);
11103
11104 // Operators are parsed inline in tiny state machines. '=' (61) is
11105 // often referred to. `finishOp` simply skips the amount of
11106 // characters it is given as second argument, and returns a token
11107 // of the type given by its first argument.
11108
11109 case 47:
11110 // '/'
11111 return this.readToken_slash();
11112
11113 case 37:case 42:
11114 // '%*'
11115 return this.readToken_mult_modulo(code);
11116
11117 case 124:case 38:
11118 // '|&'
11119 return this.readToken_pipe_amp(code);
11120
11121 case 94:
11122 // '^'
11123 return this.readToken_caret();
11124
11125 case 43:case 45:
11126 // '+-'
11127 return this.readToken_plus_min(code);
11128
11129 case 60:case 62:
11130 // '<>'
11131 return this.readToken_lt_gt(code);
11132
11133 case 61:case 33:
11134 // '=!'
11135 return this.readToken_eq_excl(code);
11136
11137 case 126:
11138 // '~'
11139 return this.finishOp(types.prefix, 1);
11140 }
11141
11142 this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'");
11143 };
11144
11145 Tokenizer.prototype.finishOp = function finishOp(type, size) {
11146 var str = this.input.slice(this.state.pos, this.state.pos + size);
11147 this.state.pos += size;
11148 return this.finishToken(type, str);
11149 };
11150
11151 Tokenizer.prototype.readRegexp = function readRegexp() {
11152 var start = this.state.pos;
11153 var escaped = void 0,
11154 inClass = void 0;
11155 for (;;) {
11156 if (this.state.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
11157 var ch = this.input.charAt(this.state.pos);
11158 if (lineBreak.test(ch)) {
11159 this.raise(start, "Unterminated regular expression");
11160 }
11161 if (escaped) {
11162 escaped = false;
11163 } else {
11164 if (ch === "[") {
11165 inClass = true;
11166 } else if (ch === "]" && inClass) {
11167 inClass = false;
11168 } else if (ch === "/" && !inClass) {
11169 break;
11170 }
11171 escaped = ch === "\\";
11172 }
11173 ++this.state.pos;
11174 }
11175 var content = this.input.slice(start, this.state.pos);
11176 ++this.state.pos;
11177 // Need to use `readWord1` because '\uXXXX' sequences are allowed
11178 // here (don't ask).
11179 var mods = this.readWord1();
11180 if (mods) {
11181 var validFlags = /^[gmsiyu]*$/;
11182 if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
11183 }
11184 return this.finishToken(types.regexp, {
11185 pattern: content,
11186 flags: mods
11187 });
11188 };
11189
11190 // Read an integer in the given radix. Return null if zero digits
11191 // were read, the integer value otherwise. When `len` is given, this
11192 // will return `null` unless the integer has exactly `len` digits.
11193
11194 Tokenizer.prototype.readInt = function readInt(radix, len) {
11195 var start = this.state.pos;
11196 var total = 0;
11197
11198 for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
11199 var code = this.input.charCodeAt(this.state.pos);
11200 var val = void 0;
11201 if (code >= 97) {
11202 val = code - 97 + 10; // a
11203 } else if (code >= 65) {
11204 val = code - 65 + 10; // A
11205 } else if (code >= 48 && code <= 57) {
11206 val = code - 48; // 0-9
11207 } else {
11208 val = Infinity;
11209 }
11210 if (val >= radix) break;
11211 ++this.state.pos;
11212 total = total * radix + val;
11213 }
11214 if (this.state.pos === start || len != null && this.state.pos - start !== len) return null;
11215
11216 return total;
11217 };
11218
11219 Tokenizer.prototype.readRadixNumber = function readRadixNumber(radix) {
11220 this.state.pos += 2; // 0x
11221 var val = this.readInt(radix);
11222 if (val == null) this.raise(this.state.start + 2, "Expected number in radix " + radix);
11223 if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
11224 return this.finishToken(types.num, val);
11225 };
11226
11227 // Read an integer, octal integer, or floating-point number.
11228
11229 Tokenizer.prototype.readNumber = function readNumber(startsWithDot) {
11230 var start = this.state.pos;
11231 var octal = this.input.charCodeAt(start) === 48; // '0'
11232 var isFloat = false;
11233
11234 if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
11235 if (octal && this.state.pos == start + 1) octal = false; // number === 0
11236
11237 var next = this.input.charCodeAt(this.state.pos);
11238 if (next === 46 && !octal) {
11239 // '.'
11240 ++this.state.pos;
11241 this.readInt(10);
11242 isFloat = true;
11243 next = this.input.charCodeAt(this.state.pos);
11244 }
11245
11246 if ((next === 69 || next === 101) && !octal) {
11247 // 'eE'
11248 next = this.input.charCodeAt(++this.state.pos);
11249 if (next === 43 || next === 45) ++this.state.pos; // '+-'
11250 if (this.readInt(10) === null) this.raise(start, "Invalid number");
11251 isFloat = true;
11252 }
11253
11254 if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
11255
11256 var str = this.input.slice(start, this.state.pos);
11257 var val = void 0;
11258 if (isFloat) {
11259 val = parseFloat(str);
11260 } else if (!octal || str.length === 1) {
11261 val = parseInt(str, 10);
11262 } else if (this.state.strict) {
11263 this.raise(start, "Invalid number");
11264 } else if (/[89]/.test(str)) {
11265 val = parseInt(str, 10);
11266 } else {
11267 val = parseInt(str, 8);
11268 }
11269 return this.finishToken(types.num, val);
11270 };
11271
11272 // Read a string value, interpreting backslash-escapes.
11273
11274 Tokenizer.prototype.readCodePoint = function readCodePoint(throwOnInvalid) {
11275 var ch = this.input.charCodeAt(this.state.pos);
11276 var code = void 0;
11277
11278 if (ch === 123) {
11279 // '{'
11280 var codePos = ++this.state.pos;
11281 code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid);
11282 ++this.state.pos;
11283 if (code === null) {
11284 --this.state.invalidTemplateEscapePosition; // to point to the '\'' instead of the 'u'
11285 } else if (code > 0x10FFFF) {
11286 if (throwOnInvalid) {
11287 this.raise(codePos, "Code point out of bounds");
11288 } else {
11289 this.state.invalidTemplateEscapePosition = codePos - 2;
11290 return null;
11291 }
11292 }
11293 } else {
11294 code = this.readHexChar(4, throwOnInvalid);
11295 }
11296 return code;
11297 };
11298
11299 Tokenizer.prototype.readString = function readString(quote) {
11300 var out = "",
11301 chunkStart = ++this.state.pos;
11302 for (;;) {
11303 if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated string constant");
11304 var ch = this.input.charCodeAt(this.state.pos);
11305 if (ch === quote) break;
11306 if (ch === 92) {
11307 // '\'
11308 out += this.input.slice(chunkStart, this.state.pos);
11309 out += this.readEscapedChar(false);
11310 chunkStart = this.state.pos;
11311 } else {
11312 if (isNewLine(ch)) this.raise(this.state.start, "Unterminated string constant");
11313 ++this.state.pos;
11314 }
11315 }
11316 out += this.input.slice(chunkStart, this.state.pos++);
11317 return this.finishToken(types.string, out);
11318 };
11319
11320 // Reads template string tokens.
11321
11322 Tokenizer.prototype.readTmplToken = function readTmplToken() {
11323 var out = "",
11324 chunkStart = this.state.pos,
11325 containsInvalid = false;
11326 for (;;) {
11327 if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated template");
11328 var ch = this.input.charCodeAt(this.state.pos);
11329 if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
11330 // '`', '${'
11331 if (this.state.pos === this.state.start && this.match(types.template)) {
11332 if (ch === 36) {
11333 this.state.pos += 2;
11334 return this.finishToken(types.dollarBraceL);
11335 } else {
11336 ++this.state.pos;
11337 return this.finishToken(types.backQuote);
11338 }
11339 }
11340 out += this.input.slice(chunkStart, this.state.pos);
11341 return this.finishToken(types.template, containsInvalid ? null : out);
11342 }
11343 if (ch === 92) {
11344 // '\'
11345 out += this.input.slice(chunkStart, this.state.pos);
11346 var escaped = this.readEscapedChar(true);
11347 if (escaped === null) {
11348 containsInvalid = true;
11349 } else {
11350 out += escaped;
11351 }
11352 chunkStart = this.state.pos;
11353 } else if (isNewLine(ch)) {
11354 out += this.input.slice(chunkStart, this.state.pos);
11355 ++this.state.pos;
11356 switch (ch) {
11357 case 13:
11358 if (this.input.charCodeAt(this.state.pos) === 10) ++this.state.pos;
11359 case 10:
11360 out += "\n";
11361 break;
11362 default:
11363 out += String.fromCharCode(ch);
11364 break;
11365 }
11366 ++this.state.curLine;
11367 this.state.lineStart = this.state.pos;
11368 chunkStart = this.state.pos;
11369 } else {
11370 ++this.state.pos;
11371 }
11372 }
11373 };
11374
11375 // Used to read escaped characters
11376
11377 Tokenizer.prototype.readEscapedChar = function readEscapedChar(inTemplate) {
11378 var throwOnInvalid = !inTemplate;
11379 var ch = this.input.charCodeAt(++this.state.pos);
11380 ++this.state.pos;
11381 switch (ch) {
11382 case 110:
11383 return "\n"; // 'n' -> '\n'
11384 case 114:
11385 return "\r"; // 'r' -> '\r'
11386 case 120:
11387 {
11388 // 'x'
11389 var code = this.readHexChar(2, throwOnInvalid);
11390 return code === null ? null : String.fromCharCode(code);
11391 }
11392 case 117:
11393 {
11394 // 'u'
11395 var _code = this.readCodePoint(throwOnInvalid);
11396 return _code === null ? null : codePointToString(_code);
11397 }
11398 case 116:
11399 return "\t"; // 't' -> '\t'
11400 case 98:
11401 return "\b"; // 'b' -> '\b'
11402 case 118:
11403 return "\x0B"; // 'v' -> '\u000b'
11404 case 102:
11405 return "\f"; // 'f' -> '\f'
11406 case 13:
11407 if (this.input.charCodeAt(this.state.pos) === 10) ++this.state.pos; // '\r\n'
11408 case 10:
11409 // ' \n'
11410 this.state.lineStart = this.state.pos;
11411 ++this.state.curLine;
11412 return "";
11413 default:
11414 if (ch >= 48 && ch <= 55) {
11415 var codePos = this.state.pos - 1;
11416 var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0];
11417 var octal = parseInt(octalStr, 8);
11418 if (octal > 255) {
11419 octalStr = octalStr.slice(0, -1);
11420 octal = parseInt(octalStr, 8);
11421 }
11422 if (octal > 0) {
11423 if (inTemplate) {
11424 this.state.invalidTemplateEscapePosition = codePos;
11425 return null;
11426 } else if (this.state.strict) {
11427 this.raise(codePos, "Octal literal in strict mode");
11428 } else if (!this.state.containsOctal) {
11429 // These properties are only used to throw an error for an octal which occurs
11430 // in a directive which occurs prior to a "use strict" directive.
11431 this.state.containsOctal = true;
11432 this.state.octalPosition = codePos;
11433 }
11434 }
11435 this.state.pos += octalStr.length - 1;
11436 return String.fromCharCode(octal);
11437 }
11438 return String.fromCharCode(ch);
11439 }
11440 };
11441
11442 // Used to read character escape sequences ('\x', '\u').
11443
11444 Tokenizer.prototype.readHexChar = function readHexChar(len, throwOnInvalid) {
11445 var codePos = this.state.pos;
11446 var n = this.readInt(16, len);
11447 if (n === null) {
11448 if (throwOnInvalid) {
11449 this.raise(codePos, "Bad character escape sequence");
11450 } else {
11451 this.state.pos = codePos - 1;
11452 this.state.invalidTemplateEscapePosition = codePos - 1;
11453 }
11454 }
11455 return n;
11456 };
11457
11458 // Read an identifier, and return it as a string. Sets `this.state.containsEsc`
11459 // to whether the word contained a '\u' escape.
11460 //
11461 // Incrementally adds only escaped chars, adding other chunks as-is
11462 // as a micro-optimization.
11463
11464 Tokenizer.prototype.readWord1 = function readWord1() {
11465 this.state.containsEsc = false;
11466 var word = "",
11467 first = true,
11468 chunkStart = this.state.pos;
11469 while (this.state.pos < this.input.length) {
11470 var ch = this.fullCharCodeAtPos();
11471 if (isIdentifierChar(ch)) {
11472 this.state.pos += ch <= 0xffff ? 1 : 2;
11473 } else if (ch === 92) {
11474 // "\"
11475 this.state.containsEsc = true;
11476
11477 word += this.input.slice(chunkStart, this.state.pos);
11478 var escStart = this.state.pos;
11479
11480 if (this.input.charCodeAt(++this.state.pos) !== 117) {
11481 // "u"
11482 this.raise(this.state.pos, 'Expecting Unicode escape sequence \\uXXXX');
11483 }
11484
11485 ++this.state.pos;
11486 var esc = this.readCodePoint(true);
11487 if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
11488 this.raise(escStart, "Invalid Unicode escape");
11489 }
11490
11491 word += codePointToString(esc);
11492 chunkStart = this.state.pos;
11493 } else {
11494 break;
11495 }
11496 first = false;
11497 }
11498 return word + this.input.slice(chunkStart, this.state.pos);
11499 };
11500
11501 // Read an identifier or keyword token. Will check for reserved
11502 // words when necessary.
11503
11504 Tokenizer.prototype.readWord = function readWord() {
11505 var word = this.readWord1();
11506 var type = types.name;
11507 if (!this.state.containsEsc && this.isKeyword(word)) {
11508 type = keywords[word];
11509 }
11510 return this.finishToken(type, word);
11511 };
11512
11513 Tokenizer.prototype.braceIsBlock = function braceIsBlock(prevType) {
11514 if (prevType === types.colon) {
11515 var parent = this.curContext();
11516 if (parent === types$1.braceStatement || parent === types$1.braceExpression) {
11517 return !parent.isExpr;
11518 }
11519 }
11520
11521 if (prevType === types._return) {
11522 return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
11523 }
11524
11525 if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR) {
11526 return true;
11527 }
11528
11529 if (prevType === types.braceL) {
11530 return this.curContext() === types$1.braceStatement;
11531 }
11532
11533 return !this.state.exprAllowed;
11534 };
11535
11536 Tokenizer.prototype.updateContext = function updateContext(prevType) {
11537 var type = this.state.type;
11538 var update = void 0;
11539
11540 if (type.keyword && prevType === types.dot) {
11541 this.state.exprAllowed = false;
11542 } else if (update = type.updateContext) {
11543 update.call(this, prevType);
11544 } else {
11545 this.state.exprAllowed = type.beforeExpr;
11546 }
11547 };
11548
11549 return Tokenizer;
11550 }();
11551
11552 var plugins = {};
11553 var frozenDeprecatedWildcardPluginList = ["jsx", "doExpressions", "objectRestSpread", "decorators", "classProperties", "exportExtensions", "asyncGenerators", "functionBind", "functionSent", "dynamicImport", "flow"];
11554
11555 var Parser = function (_Tokenizer) {
11556 inherits(Parser, _Tokenizer);
11557
11558 function Parser(options, input) {
11559 classCallCheck(this, Parser);
11560
11561 options = getOptions(options);
11562
11563 var _this = possibleConstructorReturn(this, _Tokenizer.call(this, options, input));
11564
11565 _this.options = options;
11566 _this.inModule = _this.options.sourceType === "module";
11567 _this.input = input;
11568 _this.plugins = _this.loadPlugins(_this.options.plugins);
11569 _this.filename = options.sourceFilename;
11570
11571 // If enabled, skip leading hashbang line.
11572 if (_this.state.pos === 0 && _this.input[0] === "#" && _this.input[1] === "!") {
11573 _this.skipLineComment(2);
11574 }
11575 return _this;
11576 }
11577
11578 Parser.prototype.isReservedWord = function isReservedWord(word) {
11579 if (word === "await") {
11580 return this.inModule;
11581 } else {
11582 return reservedWords[6](word);
11583 }
11584 };
11585
11586 Parser.prototype.hasPlugin = function hasPlugin(name) {
11587 if (this.plugins["*"] && frozenDeprecatedWildcardPluginList.indexOf(name) > -1) {
11588 return true;
11589 }
11590
11591 return !!this.plugins[name];
11592 };
11593
11594 Parser.prototype.extend = function extend(name, f) {
11595 this[name] = f(this[name]);
11596 };
11597
11598 Parser.prototype.loadAllPlugins = function loadAllPlugins() {
11599 var _this2 = this;
11600
11601 // ensure flow plugin loads last, also ensure estree is not loaded with *
11602 var pluginNames = Object.keys(plugins).filter(function (name) {
11603 return name !== "flow" && name !== "estree";
11604 });
11605 pluginNames.push("flow");
11606
11607 pluginNames.forEach(function (name) {
11608 var plugin = plugins[name];
11609 if (plugin) plugin(_this2);
11610 });
11611 };
11612
11613 Parser.prototype.loadPlugins = function loadPlugins(pluginList) {
11614 // TODO: Deprecate "*" option in next major version of Babylon
11615 if (pluginList.indexOf("*") >= 0) {
11616 this.loadAllPlugins();
11617
11618 return { "*": true };
11619 }
11620
11621 var pluginMap = {};
11622
11623 if (pluginList.indexOf("flow") >= 0) {
11624 // ensure flow plugin loads last
11625 pluginList = pluginList.filter(function (plugin) {
11626 return plugin !== "flow";
11627 });
11628 pluginList.push("flow");
11629 }
11630
11631 if (pluginList.indexOf("estree") >= 0) {
11632 // ensure estree plugin loads first
11633 pluginList = pluginList.filter(function (plugin) {
11634 return plugin !== "estree";
11635 });
11636 pluginList.unshift("estree");
11637 }
11638
11639 for (var _iterator = pluginList, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
11640 var _ref;
11641
11642 if (_isArray) {
11643 if (_i >= _iterator.length) break;
11644 _ref = _iterator[_i++];
11645 } else {
11646 _i = _iterator.next();
11647 if (_i.done) break;
11648 _ref = _i.value;
11649 }
11650
11651 var name = _ref;
11652
11653 if (!pluginMap[name]) {
11654 pluginMap[name] = true;
11655
11656 var plugin = plugins[name];
11657 if (plugin) plugin(this);
11658 }
11659 }
11660
11661 return pluginMap;
11662 };
11663
11664 Parser.prototype.parse = function parse() {
11665 var file = this.startNode();
11666 var program = this.startNode();
11667 this.nextToken();
11668 return this.parseTopLevel(file, program);
11669 };
11670
11671 return Parser;
11672 }(Tokenizer);
11673
11674 var pp = Parser.prototype;
11675
11676 // ## Parser utilities
11677
11678 // TODO
11679
11680 pp.addExtra = function (node, key, val) {
11681 if (!node) return;
11682
11683 var extra = node.extra = node.extra || {};
11684 extra[key] = val;
11685 };
11686
11687 // TODO
11688
11689 pp.isRelational = function (op) {
11690 return this.match(types.relational) && this.state.value === op;
11691 };
11692
11693 // TODO
11694
11695 pp.expectRelational = function (op) {
11696 if (this.isRelational(op)) {
11697 this.next();
11698 } else {
11699 this.unexpected(null, types.relational);
11700 }
11701 };
11702
11703 // Tests whether parsed token is a contextual keyword.
11704
11705 pp.isContextual = function (name) {
11706 return this.match(types.name) && this.state.value === name;
11707 };
11708
11709 // Consumes contextual keyword if possible.
11710
11711 pp.eatContextual = function (name) {
11712 return this.state.value === name && this.eat(types.name);
11713 };
11714
11715 // Asserts that following token is given contextual keyword.
11716
11717 pp.expectContextual = function (name, message) {
11718 if (!this.eatContextual(name)) this.unexpected(null, message);
11719 };
11720
11721 // Test whether a semicolon can be inserted at the current position.
11722
11723 pp.canInsertSemicolon = function () {
11724 return this.match(types.eof) || this.match(types.braceR) || lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
11725 };
11726
11727 // TODO
11728
11729 pp.isLineTerminator = function () {
11730 return this.eat(types.semi) || this.canInsertSemicolon();
11731 };
11732
11733 // Consume a semicolon, or, failing that, see if we are allowed to
11734 // pretend that there is a semicolon at this position.
11735
11736 pp.semicolon = function () {
11737 if (!this.isLineTerminator()) this.unexpected(null, types.semi);
11738 };
11739
11740 // Expect a token of a given type. If found, consume it, otherwise,
11741 // raise an unexpected token error at given pos.
11742
11743 pp.expect = function (type, pos) {
11744 return this.eat(type) || this.unexpected(pos, type);
11745 };
11746
11747 // Raise an unexpected token error. Can take the expected token type
11748 // instead of a message string.
11749
11750 pp.unexpected = function (pos) {
11751 var messageOrType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Unexpected token";
11752
11753 if (messageOrType && (typeof messageOrType === "undefined" ? "undefined" : _typeof(messageOrType)) === "object" && messageOrType.label) {
11754 messageOrType = "Unexpected token, expected " + messageOrType.label;
11755 }
11756 this.raise(pos != null ? pos : this.state.start, messageOrType);
11757 };
11758
11759 /* eslint max-len: 0 */
11760
11761 var pp$1 = Parser.prototype;
11762
11763 // ### Statement parsing
11764
11765 // Parse a program. Initializes the parser, reads any number of
11766 // statements, and wraps them in a Program node. Optionally takes a
11767 // `program` argument. If present, the statements will be appended
11768 // to its body instead of creating a new node.
11769
11770 pp$1.parseTopLevel = function (file, program) {
11771 program.sourceType = this.options.sourceType;
11772
11773 this.parseBlockBody(program, true, true, types.eof);
11774
11775 file.program = this.finishNode(program, "Program");
11776 file.comments = this.state.comments;
11777 file.tokens = this.state.tokens;
11778
11779 return this.finishNode(file, "File");
11780 };
11781
11782 var loopLabel = { kind: "loop" };
11783 var switchLabel = { kind: "switch" };
11784
11785 // TODO
11786
11787 pp$1.stmtToDirective = function (stmt) {
11788 var expr = stmt.expression;
11789
11790 var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
11791 var directive = this.startNodeAt(stmt.start, stmt.loc.start);
11792
11793 var raw = this.input.slice(expr.start, expr.end);
11794 var val = directiveLiteral.value = raw.slice(1, -1); // remove quotes
11795
11796 this.addExtra(directiveLiteral, "raw", raw);
11797 this.addExtra(directiveLiteral, "rawValue", val);
11798
11799 directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
11800
11801 return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
11802 };
11803
11804 // Parse a single statement.
11805 //
11806 // If expecting a statement and finding a slash operator, parse a
11807 // regular expression literal. This is to handle cases like
11808 // `if (foo) /blah/.exec(foo)`, where looking at the previous token
11809 // does not help.
11810
11811 pp$1.parseStatement = function (declaration, topLevel) {
11812 if (this.match(types.at)) {
11813 this.parseDecorators(true);
11814 }
11815
11816 var starttype = this.state.type;
11817 var node = this.startNode();
11818
11819 // Most types of statements are recognized by the keyword they
11820 // start with. Many are trivial to parse, some require a bit of
11821 // complexity.
11822
11823 switch (starttype) {
11824 case types._break:case types._continue:
11825 return this.parseBreakContinueStatement(node, starttype.keyword);
11826 case types._debugger:
11827 return this.parseDebuggerStatement(node);
11828 case types._do:
11829 return this.parseDoStatement(node);
11830 case types._for:
11831 return this.parseForStatement(node);
11832 case types._function:
11833 if (!declaration) this.unexpected();
11834 return this.parseFunctionStatement(node);
11835
11836 case types._class:
11837 if (!declaration) this.unexpected();
11838 return this.parseClass(node, true);
11839
11840 case types._if:
11841 return this.parseIfStatement(node);
11842 case types._return:
11843 return this.parseReturnStatement(node);
11844 case types._switch:
11845 return this.parseSwitchStatement(node);
11846 case types._throw:
11847 return this.parseThrowStatement(node);
11848 case types._try:
11849 return this.parseTryStatement(node);
11850
11851 case types._let:
11852 case types._const:
11853 if (!declaration) this.unexpected(); // NOTE: falls through to _var
11854
11855 case types._var:
11856 return this.parseVarStatement(node, starttype);
11857
11858 case types._while:
11859 return this.parseWhileStatement(node);
11860 case types._with:
11861 return this.parseWithStatement(node);
11862 case types.braceL:
11863 return this.parseBlock();
11864 case types.semi:
11865 return this.parseEmptyStatement(node);
11866 case types._export:
11867 case types._import:
11868 if (this.hasPlugin("dynamicImport") && this.lookahead().type === types.parenL) break;
11869
11870 if (!this.options.allowImportExportEverywhere) {
11871 if (!topLevel) {
11872 this.raise(this.state.start, "'import' and 'export' may only appear at the top level");
11873 }
11874
11875 if (!this.inModule) {
11876 this.raise(this.state.start, "'import' and 'export' may appear only with 'sourceType: \"module\"'");
11877 }
11878 }
11879 return starttype === types._import ? this.parseImport(node) : this.parseExport(node);
11880
11881 case types.name:
11882 if (this.state.value === "async") {
11883 // peek ahead and see if next token is a function
11884 var state = this.state.clone();
11885 this.next();
11886 if (this.match(types._function) && !this.canInsertSemicolon()) {
11887 this.expect(types._function);
11888 return this.parseFunction(node, true, false, true);
11889 } else {
11890 this.state = state;
11891 }
11892 }
11893 }
11894
11895 // If the statement does not start with a statement keyword or a
11896 // brace, it's an ExpressionStatement or LabeledStatement. We
11897 // simply start parsing an expression, and afterwards, if the
11898 // next token is a colon and the expression was a simple
11899 // Identifier node, we switch to interpreting it as a label.
11900 var maybeName = this.state.value;
11901 var expr = this.parseExpression();
11902
11903 if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) {
11904 return this.parseLabeledStatement(node, maybeName, expr);
11905 } else {
11906 return this.parseExpressionStatement(node, expr);
11907 }
11908 };
11909
11910 pp$1.takeDecorators = function (node) {
11911 if (this.state.decorators.length) {
11912 node.decorators = this.state.decorators;
11913 this.state.decorators = [];
11914 }
11915 };
11916
11917 pp$1.parseDecorators = function (allowExport) {
11918 while (this.match(types.at)) {
11919 var decorator = this.parseDecorator();
11920 this.state.decorators.push(decorator);
11921 }
11922
11923 if (allowExport && this.match(types._export)) {
11924 return;
11925 }
11926
11927 if (!this.match(types._class)) {
11928 this.raise(this.state.start, "Leading decorators must be attached to a class declaration");
11929 }
11930 };
11931
11932 pp$1.parseDecorator = function () {
11933 if (!this.hasPlugin("decorators")) {
11934 this.unexpected();
11935 }
11936 var node = this.startNode();
11937 this.next();
11938 node.expression = this.parseMaybeAssign();
11939 return this.finishNode(node, "Decorator");
11940 };
11941
11942 pp$1.parseBreakContinueStatement = function (node, keyword) {
11943 var isBreak = keyword === "break";
11944 this.next();
11945
11946 if (this.isLineTerminator()) {
11947 node.label = null;
11948 } else if (!this.match(types.name)) {
11949 this.unexpected();
11950 } else {
11951 node.label = this.parseIdentifier();
11952 this.semicolon();
11953 }
11954
11955 // Verify that there is an actual destination to break or
11956 // continue to.
11957 var i = void 0;
11958 for (i = 0; i < this.state.labels.length; ++i) {
11959 var lab = this.state.labels[i];
11960 if (node.label == null || lab.name === node.label.name) {
11961 if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
11962 if (node.label && isBreak) break;
11963 }
11964 }
11965 if (i === this.state.labels.length) this.raise(node.start, "Unsyntactic " + keyword);
11966 return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
11967 };
11968
11969 pp$1.parseDebuggerStatement = function (node) {
11970 this.next();
11971 this.semicolon();
11972 return this.finishNode(node, "DebuggerStatement");
11973 };
11974
11975 pp$1.parseDoStatement = function (node) {
11976 this.next();
11977 this.state.labels.push(loopLabel);
11978 node.body = this.parseStatement(false);
11979 this.state.labels.pop();
11980 this.expect(types._while);
11981 node.test = this.parseParenExpression();
11982 this.eat(types.semi);
11983 return this.finishNode(node, "DoWhileStatement");
11984 };
11985
11986 // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
11987 // loop is non-trivial. Basically, we have to parse the init `var`
11988 // statement or expression, disallowing the `in` operator (see
11989 // the second parameter to `parseExpression`), and then check
11990 // whether the next token is `in` or `of`. When there is no init
11991 // part (semicolon immediately after the opening parenthesis), it
11992 // is a regular `for` loop.
11993
11994 pp$1.parseForStatement = function (node) {
11995 this.next();
11996 this.state.labels.push(loopLabel);
11997
11998 var forAwait = false;
11999 if (this.hasPlugin("asyncGenerators") && this.state.inAsync && this.isContextual("await")) {
12000 forAwait = true;
12001 this.next();
12002 }
12003 this.expect(types.parenL);
12004
12005 if (this.match(types.semi)) {
12006 if (forAwait) {
12007 this.unexpected();
12008 }
12009 return this.parseFor(node, null);
12010 }
12011
12012 if (this.match(types._var) || this.match(types._let) || this.match(types._const)) {
12013 var _init = this.startNode();
12014 var varKind = this.state.type;
12015 this.next();
12016 this.parseVar(_init, true, varKind);
12017 this.finishNode(_init, "VariableDeclaration");
12018
12019 if (this.match(types._in) || this.isContextual("of")) {
12020 if (_init.declarations.length === 1 && !_init.declarations[0].init) {
12021 return this.parseForIn(node, _init, forAwait);
12022 }
12023 }
12024 if (forAwait) {
12025 this.unexpected();
12026 }
12027 return this.parseFor(node, _init);
12028 }
12029
12030 var refShorthandDefaultPos = { start: 0 };
12031 var init = this.parseExpression(true, refShorthandDefaultPos);
12032 if (this.match(types._in) || this.isContextual("of")) {
12033 var description = this.isContextual("of") ? "for-of statement" : "for-in statement";
12034 this.toAssignable(init, undefined, description);
12035 this.checkLVal(init, undefined, undefined, description);
12036 return this.parseForIn(node, init, forAwait);
12037 } else if (refShorthandDefaultPos.start) {
12038 this.unexpected(refShorthandDefaultPos.start);
12039 }
12040 if (forAwait) {
12041 this.unexpected();
12042 }
12043 return this.parseFor(node, init);
12044 };
12045
12046 pp$1.parseFunctionStatement = function (node) {
12047 this.next();
12048 return this.parseFunction(node, true);
12049 };
12050
12051 pp$1.parseIfStatement = function (node) {
12052 this.next();
12053 node.test = this.parseParenExpression();
12054 node.consequent = this.parseStatement(false);
12055 node.alternate = this.eat(types._else) ? this.parseStatement(false) : null;
12056 return this.finishNode(node, "IfStatement");
12057 };
12058
12059 pp$1.parseReturnStatement = function (node) {
12060 if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) {
12061 this.raise(this.state.start, "'return' outside of function");
12062 }
12063
12064 this.next();
12065
12066 // In `return` (and `break`/`continue`), the keywords with
12067 // optional arguments, we eagerly look for a semicolon or the
12068 // possibility to insert one.
12069
12070 if (this.isLineTerminator()) {
12071 node.argument = null;
12072 } else {
12073 node.argument = this.parseExpression();
12074 this.semicolon();
12075 }
12076
12077 return this.finishNode(node, "ReturnStatement");
12078 };
12079
12080 pp$1.parseSwitchStatement = function (node) {
12081 this.next();
12082 node.discriminant = this.parseParenExpression();
12083 node.cases = [];
12084 this.expect(types.braceL);
12085 this.state.labels.push(switchLabel);
12086
12087 // Statements under must be grouped (by label) in SwitchCase
12088 // nodes. `cur` is used to keep the node that we are currently
12089 // adding statements to.
12090
12091 var cur = void 0;
12092 for (var sawDefault; !this.match(types.braceR);) {
12093 if (this.match(types._case) || this.match(types._default)) {
12094 var isCase = this.match(types._case);
12095 if (cur) this.finishNode(cur, "SwitchCase");
12096 node.cases.push(cur = this.startNode());
12097 cur.consequent = [];
12098 this.next();
12099 if (isCase) {
12100 cur.test = this.parseExpression();
12101 } else {
12102 if (sawDefault) this.raise(this.state.lastTokStart, "Multiple default clauses");
12103 sawDefault = true;
12104 cur.test = null;
12105 }
12106 this.expect(types.colon);
12107 } else {
12108 if (cur) {
12109 cur.consequent.push(this.parseStatement(true));
12110 } else {
12111 this.unexpected();
12112 }
12113 }
12114 }
12115 if (cur) this.finishNode(cur, "SwitchCase");
12116 this.next(); // Closing brace
12117 this.state.labels.pop();
12118 return this.finishNode(node, "SwitchStatement");
12119 };
12120
12121 pp$1.parseThrowStatement = function (node) {
12122 this.next();
12123 if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) this.raise(this.state.lastTokEnd, "Illegal newline after throw");
12124 node.argument = this.parseExpression();
12125 this.semicolon();
12126 return this.finishNode(node, "ThrowStatement");
12127 };
12128
12129 // Reused empty array added for node fields that are always empty.
12130
12131 var empty = [];
12132
12133 pp$1.parseTryStatement = function (node) {
12134 this.next();
12135
12136 node.block = this.parseBlock();
12137 node.handler = null;
12138
12139 if (this.match(types._catch)) {
12140 var clause = this.startNode();
12141 this.next();
12142
12143 this.expect(types.parenL);
12144 clause.param = this.parseBindingAtom();
12145 this.checkLVal(clause.param, true, Object.create(null), "catch clause");
12146 this.expect(types.parenR);
12147
12148 clause.body = this.parseBlock();
12149 node.handler = this.finishNode(clause, "CatchClause");
12150 }
12151
12152 node.guardedHandlers = empty;
12153 node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;
12154
12155 if (!node.handler && !node.finalizer) {
12156 this.raise(node.start, "Missing catch or finally clause");
12157 }
12158
12159 return this.finishNode(node, "TryStatement");
12160 };
12161
12162 pp$1.parseVarStatement = function (node, kind) {
12163 this.next();
12164 this.parseVar(node, false, kind);
12165 this.semicolon();
12166 return this.finishNode(node, "VariableDeclaration");
12167 };
12168
12169 pp$1.parseWhileStatement = function (node) {
12170 this.next();
12171 node.test = this.parseParenExpression();
12172 this.state.labels.push(loopLabel);
12173 node.body = this.parseStatement(false);
12174 this.state.labels.pop();
12175 return this.finishNode(node, "WhileStatement");
12176 };
12177
12178 pp$1.parseWithStatement = function (node) {
12179 if (this.state.strict) this.raise(this.state.start, "'with' in strict mode");
12180 this.next();
12181 node.object = this.parseParenExpression();
12182 node.body = this.parseStatement(false);
12183 return this.finishNode(node, "WithStatement");
12184 };
12185
12186 pp$1.parseEmptyStatement = function (node) {
12187 this.next();
12188 return this.finishNode(node, "EmptyStatement");
12189 };
12190
12191 pp$1.parseLabeledStatement = function (node, maybeName, expr) {
12192 for (var _iterator = this.state.labels, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
12193 var _ref;
12194
12195 if (_isArray) {
12196 if (_i >= _iterator.length) break;
12197 _ref = _iterator[_i++];
12198 } else {
12199 _i = _iterator.next();
12200 if (_i.done) break;
12201 _ref = _i.value;
12202 }
12203
12204 var _label = _ref;
12205
12206 if (_label.name === maybeName) {
12207 this.raise(expr.start, "Label '" + maybeName + "' is already declared");
12208 }
12209 }
12210
12211 var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null;
12212 for (var i = this.state.labels.length - 1; i >= 0; i--) {
12213 var label = this.state.labels[i];
12214 if (label.statementStart === node.start) {
12215 label.statementStart = this.state.start;
12216 label.kind = kind;
12217 } else {
12218 break;
12219 }
12220 }
12221
12222 this.state.labels.push({ name: maybeName, kind: kind, statementStart: this.state.start });
12223 node.body = this.parseStatement(true);
12224 this.state.labels.pop();
12225 node.label = expr;
12226 return this.finishNode(node, "LabeledStatement");
12227 };
12228
12229 pp$1.parseExpressionStatement = function (node, expr) {
12230 node.expression = expr;
12231 this.semicolon();
12232 return this.finishNode(node, "ExpressionStatement");
12233 };
12234
12235 // Parse a semicolon-enclosed block of statements, handling `"use
12236 // strict"` declarations when `allowStrict` is true (used for
12237 // function bodies).
12238
12239 pp$1.parseBlock = function (allowDirectives) {
12240 var node = this.startNode();
12241 this.expect(types.braceL);
12242 this.parseBlockBody(node, allowDirectives, false, types.braceR);
12243 return this.finishNode(node, "BlockStatement");
12244 };
12245
12246 pp$1.isValidDirective = function (stmt) {
12247 return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
12248 };
12249
12250 pp$1.parseBlockBody = function (node, allowDirectives, topLevel, end) {
12251 node.body = [];
12252 node.directives = [];
12253
12254 var parsedNonDirective = false;
12255 var oldStrict = void 0;
12256 var octalPosition = void 0;
12257
12258 while (!this.eat(end)) {
12259 if (!parsedNonDirective && this.state.containsOctal && !octalPosition) {
12260 octalPosition = this.state.octalPosition;
12261 }
12262
12263 var stmt = this.parseStatement(true, topLevel);
12264
12265 if (allowDirectives && !parsedNonDirective && this.isValidDirective(stmt)) {
12266 var directive = this.stmtToDirective(stmt);
12267 node.directives.push(directive);
12268
12269 if (oldStrict === undefined && directive.value.value === "use strict") {
12270 oldStrict = this.state.strict;
12271 this.setStrict(true);
12272
12273 if (octalPosition) {
12274 this.raise(octalPosition, "Octal literal in strict mode");
12275 }
12276 }
12277
12278 continue;
12279 }
12280
12281 parsedNonDirective = true;
12282 node.body.push(stmt);
12283 }
12284
12285 if (oldStrict === false) {
12286 this.setStrict(false);
12287 }
12288 };
12289
12290 // Parse a regular `for` loop. The disambiguation code in
12291 // `parseStatement` will already have parsed the init statement or
12292 // expression.
12293
12294 pp$1.parseFor = function (node, init) {
12295 node.init = init;
12296 this.expect(types.semi);
12297 node.test = this.match(types.semi) ? null : this.parseExpression();
12298 this.expect(types.semi);
12299 node.update = this.match(types.parenR) ? null : this.parseExpression();
12300 this.expect(types.parenR);
12301 node.body = this.parseStatement(false);
12302 this.state.labels.pop();
12303 return this.finishNode(node, "ForStatement");
12304 };
12305
12306 // Parse a `for`/`in` and `for`/`of` loop, which are almost
12307 // same from parser's perspective.
12308
12309 pp$1.parseForIn = function (node, init, forAwait) {
12310 var type = void 0;
12311 if (forAwait) {
12312 this.eatContextual("of");
12313 type = "ForAwaitStatement";
12314 } else {
12315 type = this.match(types._in) ? "ForInStatement" : "ForOfStatement";
12316 this.next();
12317 }
12318 node.left = init;
12319 node.right = this.parseExpression();
12320 this.expect(types.parenR);
12321 node.body = this.parseStatement(false);
12322 this.state.labels.pop();
12323 return this.finishNode(node, type);
12324 };
12325
12326 // Parse a list of variable declarations.
12327
12328 pp$1.parseVar = function (node, isFor, kind) {
12329 node.declarations = [];
12330 node.kind = kind.keyword;
12331 for (;;) {
12332 var decl = this.startNode();
12333 this.parseVarHead(decl);
12334 if (this.eat(types.eq)) {
12335 decl.init = this.parseMaybeAssign(isFor);
12336 } else if (kind === types._const && !(this.match(types._in) || this.isContextual("of"))) {
12337 this.unexpected();
12338 } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) {
12339 this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value");
12340 } else {
12341 decl.init = null;
12342 }
12343 node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
12344 if (!this.eat(types.comma)) break;
12345 }
12346 return node;
12347 };
12348
12349 pp$1.parseVarHead = function (decl) {
12350 decl.id = this.parseBindingAtom();
12351 this.checkLVal(decl.id, true, undefined, "variable declaration");
12352 };
12353
12354 // Parse a function declaration or literal (depending on the
12355 // `isStatement` parameter).
12356
12357 pp$1.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) {
12358 var oldInMethod = this.state.inMethod;
12359 this.state.inMethod = false;
12360
12361 this.initFunction(node, isAsync);
12362
12363 if (this.match(types.star)) {
12364 if (node.async && !this.hasPlugin("asyncGenerators")) {
12365 this.unexpected();
12366 } else {
12367 node.generator = true;
12368 this.next();
12369 }
12370 }
12371
12372 if (isStatement && !optionalId && !this.match(types.name) && !this.match(types._yield)) {
12373 this.unexpected();
12374 }
12375
12376 if (this.match(types.name) || this.match(types._yield)) {
12377 node.id = this.parseBindingIdentifier();
12378 }
12379
12380 this.parseFunctionParams(node);
12381 this.parseFunctionBody(node, allowExpressionBody);
12382
12383 this.state.inMethod = oldInMethod;
12384
12385 return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
12386 };
12387
12388 pp$1.parseFunctionParams = function (node) {
12389 this.expect(types.parenL);
12390 node.params = this.parseBindingList(types.parenR);
12391 };
12392
12393 // Parse a class declaration or literal (depending on the
12394 // `isStatement` parameter).
12395
12396 pp$1.parseClass = function (node, isStatement, optionalId) {
12397 this.next();
12398 this.takeDecorators(node);
12399 this.parseClassId(node, isStatement, optionalId);
12400 this.parseClassSuper(node);
12401 this.parseClassBody(node);
12402 return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
12403 };
12404
12405 pp$1.isClassProperty = function () {
12406 return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR);
12407 };
12408
12409 pp$1.isClassMethod = function () {
12410 return this.match(types.parenL);
12411 };
12412
12413 pp$1.isNonstaticConstructor = function (method) {
12414 return !method.computed && !method.static && (method.key.name === "constructor" || // Identifier
12415 method.key.value === "constructor" // Literal
12416 );
12417 };
12418
12419 pp$1.parseClassBody = function (node) {
12420 // class bodies are implicitly strict
12421 var oldStrict = this.state.strict;
12422 this.state.strict = true;
12423
12424 var hadConstructorCall = false;
12425 var hadConstructor = false;
12426 var decorators = [];
12427 var classBody = this.startNode();
12428
12429 classBody.body = [];
12430
12431 this.expect(types.braceL);
12432
12433 while (!this.eat(types.braceR)) {
12434 if (this.eat(types.semi)) {
12435 if (decorators.length > 0) {
12436 this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon");
12437 }
12438 continue;
12439 }
12440
12441 if (this.match(types.at)) {
12442 decorators.push(this.parseDecorator());
12443 continue;
12444 }
12445
12446 var method = this.startNode();
12447
12448 // steal the decorators if there are any
12449 if (decorators.length) {
12450 method.decorators = decorators;
12451 decorators = [];
12452 }
12453
12454 method.static = false;
12455 if (this.match(types.name) && this.state.value === "static") {
12456 var key = this.parseIdentifier(true); // eats 'static'
12457 if (this.isClassMethod()) {
12458 // a method named 'static'
12459 method.kind = "method";
12460 method.computed = false;
12461 method.key = key;
12462 this.parseClassMethod(classBody, method, false, false);
12463 continue;
12464 } else if (this.isClassProperty()) {
12465 // a property named 'static'
12466 method.computed = false;
12467 method.key = key;
12468 classBody.body.push(this.parseClassProperty(method));
12469 continue;
12470 }
12471 // otherwise something static
12472 method.static = true;
12473 }
12474
12475 if (this.eat(types.star)) {
12476 // a generator
12477 method.kind = "method";
12478 this.parsePropertyName(method);
12479 if (this.isNonstaticConstructor(method)) {
12480 this.raise(method.key.start, "Constructor can't be a generator");
12481 }
12482 if (!method.computed && method.static && (method.key.name === "prototype" || method.key.value === "prototype")) {
12483 this.raise(method.key.start, "Classes may not have static property named prototype");
12484 }
12485 this.parseClassMethod(classBody, method, true, false);
12486 } else {
12487 var isSimple = this.match(types.name);
12488 var _key = this.parsePropertyName(method);
12489 if (!method.computed && method.static && (method.key.name === "prototype" || method.key.value === "prototype")) {
12490 this.raise(method.key.start, "Classes may not have static property named prototype");
12491 }
12492 if (this.isClassMethod()) {
12493 // a normal method
12494 if (this.isNonstaticConstructor(method)) {
12495 if (hadConstructor) {
12496 this.raise(_key.start, "Duplicate constructor in the same class");
12497 } else if (method.decorators) {
12498 this.raise(method.start, "You can't attach decorators to a class constructor");
12499 }
12500 hadConstructor = true;
12501 method.kind = "constructor";
12502 } else {
12503 method.kind = "method";
12504 }
12505 this.parseClassMethod(classBody, method, false, false);
12506 } else if (this.isClassProperty()) {
12507 // a normal property
12508 if (this.isNonstaticConstructor(method)) {
12509 this.raise(method.key.start, "Classes may not have a non-static field named 'constructor'");
12510 }
12511 classBody.body.push(this.parseClassProperty(method));
12512 } else if (isSimple && _key.name === "async" && !this.isLineTerminator()) {
12513 // an async method
12514 var isGenerator = this.hasPlugin("asyncGenerators") && this.eat(types.star);
12515 method.kind = "method";
12516 this.parsePropertyName(method);
12517 if (this.isNonstaticConstructor(method)) {
12518 this.raise(method.key.start, "Constructor can't be an async function");
12519 }
12520 this.parseClassMethod(classBody, method, isGenerator, true);
12521 } else if (isSimple && (_key.name === "get" || _key.name === "set") && !(this.isLineTerminator() && this.match(types.star))) {
12522 // `get\n*` is an uninitialized property named 'get' followed by a generator.
12523 // a getter or setter
12524 method.kind = _key.name;
12525 this.parsePropertyName(method);
12526 if (this.isNonstaticConstructor(method)) {
12527 this.raise(method.key.start, "Constructor can't have get/set modifier");
12528 }
12529 this.parseClassMethod(classBody, method, false, false);
12530 this.checkGetterSetterParamCount(method);
12531 } else if (this.hasPlugin("classConstructorCall") && isSimple && _key.name === "call" && this.match(types.name) && this.state.value === "constructor") {
12532 // a (deprecated) call constructor
12533 if (hadConstructorCall) {
12534 this.raise(method.start, "Duplicate constructor call in the same class");
12535 } else if (method.decorators) {
12536 this.raise(method.start, "You can't attach decorators to a class constructor");
12537 }
12538 hadConstructorCall = true;
12539 method.kind = "constructorCall";
12540 this.parsePropertyName(method); // consume "constructor" and make it the method's name
12541 this.parseClassMethod(classBody, method, false, false);
12542 } else if (this.isLineTerminator()) {
12543 // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token)
12544 if (this.isNonstaticConstructor(method)) {
12545 this.raise(method.key.start, "Classes may not have a non-static field named 'constructor'");
12546 }
12547 classBody.body.push(this.parseClassProperty(method));
12548 } else {
12549 this.unexpected();
12550 }
12551 }
12552 }
12553
12554 if (decorators.length) {
12555 this.raise(this.state.start, "You have trailing decorators with no method");
12556 }
12557
12558 node.body = this.finishNode(classBody, "ClassBody");
12559
12560 this.state.strict = oldStrict;
12561 };
12562
12563 pp$1.parseClassProperty = function (node) {
12564 this.state.inClassProperty = true;
12565 if (this.match(types.eq)) {
12566 if (!this.hasPlugin("classProperties")) this.unexpected();
12567 this.next();
12568 node.value = this.parseMaybeAssign();
12569 } else {
12570 node.value = null;
12571 }
12572 this.semicolon();
12573 this.state.inClassProperty = false;
12574 return this.finishNode(node, "ClassProperty");
12575 };
12576
12577 pp$1.parseClassMethod = function (classBody, method, isGenerator, isAsync) {
12578 this.parseMethod(method, isGenerator, isAsync);
12579 classBody.body.push(this.finishNode(method, "ClassMethod"));
12580 };
12581
12582 pp$1.parseClassId = function (node, isStatement, optionalId) {
12583 if (this.match(types.name)) {
12584 node.id = this.parseIdentifier();
12585 } else {
12586 if (optionalId || !isStatement) {
12587 node.id = null;
12588 } else {
12589 this.unexpected();
12590 }
12591 }
12592 };
12593
12594 pp$1.parseClassSuper = function (node) {
12595 node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
12596 };
12597
12598 // Parses module export declaration.
12599
12600 pp$1.parseExport = function (node) {
12601 this.next();
12602 // export * from '...'
12603 if (this.match(types.star)) {
12604 var specifier = this.startNode();
12605 this.next();
12606 if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) {
12607 specifier.exported = this.parseIdentifier();
12608 node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")];
12609 this.parseExportSpecifiersMaybe(node);
12610 this.parseExportFrom(node, true);
12611 } else {
12612 this.parseExportFrom(node, true);
12613 return this.finishNode(node, "ExportAllDeclaration");
12614 }
12615 } else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) {
12616 var _specifier = this.startNode();
12617 _specifier.exported = this.parseIdentifier(true);
12618 node.specifiers = [this.finishNode(_specifier, "ExportDefaultSpecifier")];
12619 if (this.match(types.comma) && this.lookahead().type === types.star) {
12620 this.expect(types.comma);
12621 var _specifier2 = this.startNode();
12622 this.expect(types.star);
12623 this.expectContextual("as");
12624 _specifier2.exported = this.parseIdentifier();
12625 node.specifiers.push(this.finishNode(_specifier2, "ExportNamespaceSpecifier"));
12626 } else {
12627 this.parseExportSpecifiersMaybe(node);
12628 }
12629 this.parseExportFrom(node, true);
12630 } else if (this.eat(types._default)) {
12631 // export default ...
12632 var expr = this.startNode();
12633 var needsSemi = false;
12634 if (this.eat(types._function)) {
12635 expr = this.parseFunction(expr, true, false, false, true);
12636 } else if (this.match(types._class)) {
12637 expr = this.parseClass(expr, true, true);
12638 } else {
12639 needsSemi = true;
12640 expr = this.parseMaybeAssign();
12641 }
12642 node.declaration = expr;
12643 if (needsSemi) this.semicolon();
12644 this.checkExport(node, true, true);
12645 return this.finishNode(node, "ExportDefaultDeclaration");
12646 } else if (this.shouldParseExportDeclaration()) {
12647 node.specifiers = [];
12648 node.source = null;
12649 node.declaration = this.parseExportDeclaration(node);
12650 } else {
12651 // export { x, y as z } [from '...']
12652 node.declaration = null;
12653 node.specifiers = this.parseExportSpecifiers();
12654 this.parseExportFrom(node);
12655 }
12656 this.checkExport(node, true);
12657 return this.finishNode(node, "ExportNamedDeclaration");
12658 };
12659
12660 pp$1.parseExportDeclaration = function () {
12661 return this.parseStatement(true);
12662 };
12663
12664 pp$1.isExportDefaultSpecifier = function () {
12665 if (this.match(types.name)) {
12666 return this.state.value !== "async";
12667 }
12668
12669 if (!this.match(types._default)) {
12670 return false;
12671 }
12672
12673 var lookahead = this.lookahead();
12674 return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from";
12675 };
12676
12677 pp$1.parseExportSpecifiersMaybe = function (node) {
12678 if (this.eat(types.comma)) {
12679 node.specifiers = node.specifiers.concat(this.parseExportSpecifiers());
12680 }
12681 };
12682
12683 pp$1.parseExportFrom = function (node, expect) {
12684 if (this.eatContextual("from")) {
12685 node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();
12686 this.checkExport(node);
12687 } else {
12688 if (expect) {
12689 this.unexpected();
12690 } else {
12691 node.source = null;
12692 }
12693 }
12694
12695 this.semicolon();
12696 };
12697
12698 pp$1.shouldParseExportDeclaration = function () {
12699 return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "let" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isContextual("async");
12700 };
12701
12702 pp$1.checkExport = function (node, checkNames, isDefault) {
12703 if (checkNames) {
12704 // Check for duplicate exports
12705 if (isDefault) {
12706 // Default exports
12707 this.checkDuplicateExports(node, "default");
12708 } else if (node.specifiers && node.specifiers.length) {
12709 // Named exports
12710 for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
12711 var _ref2;
12712
12713 if (_isArray2) {
12714 if (_i2 >= _iterator2.length) break;
12715 _ref2 = _iterator2[_i2++];
12716 } else {
12717 _i2 = _iterator2.next();
12718 if (_i2.done) break;
12719 _ref2 = _i2.value;
12720 }
12721
12722 var specifier = _ref2;
12723
12724 this.checkDuplicateExports(specifier, specifier.exported.name);
12725 }
12726 } else if (node.declaration) {
12727 // Exported declarations
12728 if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
12729 this.checkDuplicateExports(node, node.declaration.id.name);
12730 } else if (node.declaration.type === "VariableDeclaration") {
12731 for (var _iterator3 = node.declaration.declarations, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
12732 var _ref3;
12733
12734 if (_isArray3) {
12735 if (_i3 >= _iterator3.length) break;
12736 _ref3 = _iterator3[_i3++];
12737 } else {
12738 _i3 = _iterator3.next();
12739 if (_i3.done) break;
12740 _ref3 = _i3.value;
12741 }
12742
12743 var declaration = _ref3;
12744
12745 this.checkDeclaration(declaration.id);
12746 }
12747 }
12748 }
12749 }
12750
12751 if (this.state.decorators.length) {
12752 var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
12753 if (!node.declaration || !isClass) {
12754 this.raise(node.start, "You can only use decorators on an export when exporting a class");
12755 }
12756 this.takeDecorators(node.declaration);
12757 }
12758 };
12759
12760 pp$1.checkDeclaration = function (node) {
12761 if (node.type === "ObjectPattern") {
12762 for (var _iterator4 = node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
12763 var _ref4;
12764
12765 if (_isArray4) {
12766 if (_i4 >= _iterator4.length) break;
12767 _ref4 = _iterator4[_i4++];
12768 } else {
12769 _i4 = _iterator4.next();
12770 if (_i4.done) break;
12771 _ref4 = _i4.value;
12772 }
12773
12774 var prop = _ref4;
12775
12776 this.checkDeclaration(prop);
12777 }
12778 } else if (node.type === "ArrayPattern") {
12779 for (var _iterator5 = node.elements, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
12780 var _ref5;
12781
12782 if (_isArray5) {
12783 if (_i5 >= _iterator5.length) break;
12784 _ref5 = _iterator5[_i5++];
12785 } else {
12786 _i5 = _iterator5.next();
12787 if (_i5.done) break;
12788 _ref5 = _i5.value;
12789 }
12790
12791 var elem = _ref5;
12792
12793 if (elem) {
12794 this.checkDeclaration(elem);
12795 }
12796 }
12797 } else if (node.type === "ObjectProperty") {
12798 this.checkDeclaration(node.value);
12799 } else if (node.type === "RestElement" || node.type === "RestProperty") {
12800 this.checkDeclaration(node.argument);
12801 } else if (node.type === "Identifier") {
12802 this.checkDuplicateExports(node, node.name);
12803 }
12804 };
12805
12806 pp$1.checkDuplicateExports = function (node, name) {
12807 if (this.state.exportedIdentifiers.indexOf(name) > -1) {
12808 this.raiseDuplicateExportError(node, name);
12809 }
12810 this.state.exportedIdentifiers.push(name);
12811 };
12812
12813 pp$1.raiseDuplicateExportError = function (node, name) {
12814 this.raise(node.start, name === "default" ? "Only one default export allowed per module." : "`" + name + "` has already been exported. Exported identifiers must be unique.");
12815 };
12816
12817 // Parses a comma-separated list of module exports.
12818
12819 pp$1.parseExportSpecifiers = function () {
12820 var nodes = [];
12821 var first = true;
12822 var needsFrom = void 0;
12823
12824 // export { x, y as z } [from '...']
12825 this.expect(types.braceL);
12826
12827 while (!this.eat(types.braceR)) {
12828 if (first) {
12829 first = false;
12830 } else {
12831 this.expect(types.comma);
12832 if (this.eat(types.braceR)) break;
12833 }
12834
12835 var isDefault = this.match(types._default);
12836 if (isDefault && !needsFrom) needsFrom = true;
12837
12838 var node = this.startNode();
12839 node.local = this.parseIdentifier(isDefault);
12840 node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
12841 nodes.push(this.finishNode(node, "ExportSpecifier"));
12842 }
12843
12844 // https://github.com/ember-cli/ember-cli/pull/3739
12845 if (needsFrom && !this.isContextual("from")) {
12846 this.unexpected();
12847 }
12848
12849 return nodes;
12850 };
12851
12852 // Parses import declaration.
12853
12854 pp$1.parseImport = function (node) {
12855 this.eat(types._import);
12856
12857 // import '...'
12858 if (this.match(types.string)) {
12859 node.specifiers = [];
12860 node.source = this.parseExprAtom();
12861 } else {
12862 node.specifiers = [];
12863 this.parseImportSpecifiers(node);
12864 this.expectContextual("from");
12865 node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();
12866 }
12867 this.semicolon();
12868 return this.finishNode(node, "ImportDeclaration");
12869 };
12870
12871 // Parses a comma-separated list of module imports.
12872
12873 pp$1.parseImportSpecifiers = function (node) {
12874 var first = true;
12875 if (this.match(types.name)) {
12876 // import defaultObj, { x, y as z } from '...'
12877 var startPos = this.state.start;
12878 var startLoc = this.state.startLoc;
12879 node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc));
12880 if (!this.eat(types.comma)) return;
12881 }
12882
12883 if (this.match(types.star)) {
12884 var specifier = this.startNode();
12885 this.next();
12886 this.expectContextual("as");
12887 specifier.local = this.parseIdentifier();
12888 this.checkLVal(specifier.local, true, undefined, "import namespace specifier");
12889 node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier"));
12890 return;
12891 }
12892
12893 this.expect(types.braceL);
12894 while (!this.eat(types.braceR)) {
12895 if (first) {
12896 first = false;
12897 } else {
12898 // Detect an attempt to deep destructure
12899 if (this.eat(types.colon)) {
12900 this.unexpected(null, "ES2015 named imports do not destructure. Use another statement for destructuring after the import.");
12901 }
12902
12903 this.expect(types.comma);
12904 if (this.eat(types.braceR)) break;
12905 }
12906
12907 this.parseImportSpecifier(node);
12908 }
12909 };
12910
12911 pp$1.parseImportSpecifier = function (node) {
12912 var specifier = this.startNode();
12913 specifier.imported = this.parseIdentifier(true);
12914 if (this.eatContextual("as")) {
12915 specifier.local = this.parseIdentifier();
12916 } else {
12917 this.checkReservedWord(specifier.imported.name, specifier.start, true, true);
12918 specifier.local = specifier.imported.__clone();
12919 }
12920 this.checkLVal(specifier.local, true, undefined, "import specifier");
12921 node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
12922 };
12923
12924 pp$1.parseImportSpecifierDefault = function (id, startPos, startLoc) {
12925 var node = this.startNodeAt(startPos, startLoc);
12926 node.local = id;
12927 this.checkLVal(node.local, true, undefined, "default import specifier");
12928 return this.finishNode(node, "ImportDefaultSpecifier");
12929 };
12930
12931 var pp$2 = Parser.prototype;
12932
12933 // Convert existing expression atom to assignable pattern
12934 // if possible.
12935
12936 pp$2.toAssignable = function (node, isBinding, contextDescription) {
12937 if (node) {
12938 switch (node.type) {
12939 case "Identifier":
12940 case "ObjectPattern":
12941 case "ArrayPattern":
12942 case "AssignmentPattern":
12943 break;
12944
12945 case "ObjectExpression":
12946 node.type = "ObjectPattern";
12947 for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
12948 var _ref;
12949
12950 if (_isArray) {
12951 if (_i >= _iterator.length) break;
12952 _ref = _iterator[_i++];
12953 } else {
12954 _i = _iterator.next();
12955 if (_i.done) break;
12956 _ref = _i.value;
12957 }
12958
12959 var prop = _ref;
12960
12961 if (prop.type === "ObjectMethod") {
12962 if (prop.kind === "get" || prop.kind === "set") {
12963 this.raise(prop.key.start, "Object pattern can't contain getter or setter");
12964 } else {
12965 this.raise(prop.key.start, "Object pattern can't contain methods");
12966 }
12967 } else {
12968 this.toAssignable(prop, isBinding, "object destructuring pattern");
12969 }
12970 }
12971 break;
12972
12973 case "ObjectProperty":
12974 this.toAssignable(node.value, isBinding, contextDescription);
12975 break;
12976
12977 case "SpreadProperty":
12978 node.type = "RestProperty";
12979 var arg = node.argument;
12980 this.toAssignable(arg, isBinding, contextDescription);
12981 break;
12982
12983 case "ArrayExpression":
12984 node.type = "ArrayPattern";
12985 this.toAssignableList(node.elements, isBinding, contextDescription);
12986 break;
12987
12988 case "AssignmentExpression":
12989 if (node.operator === "=") {
12990 node.type = "AssignmentPattern";
12991 delete node.operator;
12992 } else {
12993 this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
12994 }
12995 break;
12996
12997 case "MemberExpression":
12998 if (!isBinding) break;
12999
13000 default:
13001 {
13002 var message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : /* istanbul ignore next */"expression");
13003 this.raise(node.start, message);
13004 }
13005 }
13006 }
13007 return node;
13008 };
13009
13010 // Convert list of expression atoms to binding list.
13011
13012 pp$2.toAssignableList = function (exprList, isBinding, contextDescription) {
13013 var end = exprList.length;
13014 if (end) {
13015 var last = exprList[end - 1];
13016 if (last && last.type === "RestElement") {
13017 --end;
13018 } else if (last && last.type === "SpreadElement") {
13019 last.type = "RestElement";
13020 var arg = last.argument;
13021 this.toAssignable(arg, isBinding, contextDescription);
13022 if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") {
13023 this.unexpected(arg.start);
13024 }
13025 --end;
13026 }
13027 }
13028 for (var i = 0; i < end; i++) {
13029 var elt = exprList[i];
13030 if (elt) this.toAssignable(elt, isBinding, contextDescription);
13031 }
13032 return exprList;
13033 };
13034
13035 // Convert list of expression atoms to a list of
13036
13037 pp$2.toReferencedList = function (exprList) {
13038 return exprList;
13039 };
13040
13041 // Parses spread element.
13042
13043 pp$2.parseSpread = function (refShorthandDefaultPos) {
13044 var node = this.startNode();
13045 this.next();
13046 node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos);
13047 return this.finishNode(node, "SpreadElement");
13048 };
13049
13050 pp$2.parseRest = function () {
13051 var node = this.startNode();
13052 this.next();
13053 node.argument = this.parseBindingIdentifier();
13054 return this.finishNode(node, "RestElement");
13055 };
13056
13057 pp$2.shouldAllowYieldIdentifier = function () {
13058 return this.match(types._yield) && !this.state.strict && !this.state.inGenerator;
13059 };
13060
13061 pp$2.parseBindingIdentifier = function () {
13062 return this.parseIdentifier(this.shouldAllowYieldIdentifier());
13063 };
13064
13065 // Parses lvalue (assignable) atom.
13066
13067 pp$2.parseBindingAtom = function () {
13068 switch (this.state.type) {
13069 case types._yield:
13070 if (this.state.strict || this.state.inGenerator) this.unexpected();
13071 // fall-through
13072 case types.name:
13073 return this.parseIdentifier(true);
13074
13075 case types.bracketL:
13076 var node = this.startNode();
13077 this.next();
13078 node.elements = this.parseBindingList(types.bracketR, true);
13079 return this.finishNode(node, "ArrayPattern");
13080
13081 case types.braceL:
13082 return this.parseObj(true);
13083
13084 default:
13085 this.unexpected();
13086 }
13087 };
13088
13089 pp$2.parseBindingList = function (close, allowEmpty) {
13090 var elts = [];
13091 var first = true;
13092 while (!this.eat(close)) {
13093 if (first) {
13094 first = false;
13095 } else {
13096 this.expect(types.comma);
13097 }
13098 if (allowEmpty && this.match(types.comma)) {
13099 elts.push(null);
13100 } else if (this.eat(close)) {
13101 break;
13102 } else if (this.match(types.ellipsis)) {
13103 elts.push(this.parseAssignableListItemTypes(this.parseRest()));
13104 this.expect(close);
13105 break;
13106 } else {
13107 var decorators = [];
13108 while (this.match(types.at)) {
13109 decorators.push(this.parseDecorator());
13110 }
13111 var left = this.parseMaybeDefault();
13112 if (decorators.length) {
13113 left.decorators = decorators;
13114 }
13115 this.parseAssignableListItemTypes(left);
13116 elts.push(this.parseMaybeDefault(left.start, left.loc.start, left));
13117 }
13118 }
13119 return elts;
13120 };
13121
13122 pp$2.parseAssignableListItemTypes = function (param) {
13123 return param;
13124 };
13125
13126 // Parses assignment pattern around given atom if possible.
13127
13128 pp$2.parseMaybeDefault = function (startPos, startLoc, left) {
13129 startLoc = startLoc || this.state.startLoc;
13130 startPos = startPos || this.state.start;
13131 left = left || this.parseBindingAtom();
13132 if (!this.eat(types.eq)) return left;
13133
13134 var node = this.startNodeAt(startPos, startLoc);
13135 node.left = left;
13136 node.right = this.parseMaybeAssign();
13137 return this.finishNode(node, "AssignmentPattern");
13138 };
13139
13140 // Verify that a node is an lval — something that can be assigned
13141 // to.
13142
13143 pp$2.checkLVal = function (expr, isBinding, checkClashes, contextDescription) {
13144 switch (expr.type) {
13145 case "Identifier":
13146 this.checkReservedWord(expr.name, expr.start, false, true);
13147
13148 if (checkClashes) {
13149 // we need to prefix this with an underscore for the cases where we have a key of
13150 // `__proto__`. there's a bug in old V8 where the following wouldn't work:
13151 //
13152 // > var obj = Object.create(null);
13153 // undefined
13154 // > obj.__proto__
13155 // null
13156 // > obj.__proto__ = true;
13157 // true
13158 // > obj.__proto__
13159 // null
13160 var key = "_" + expr.name;
13161
13162 if (checkClashes[key]) {
13163 this.raise(expr.start, "Argument name clash in strict mode");
13164 } else {
13165 checkClashes[key] = true;
13166 }
13167 }
13168 break;
13169
13170 case "MemberExpression":
13171 if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression");
13172 break;
13173
13174 case "ObjectPattern":
13175 for (var _iterator2 = expr.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
13176 var _ref2;
13177
13178 if (_isArray2) {
13179 if (_i2 >= _iterator2.length) break;
13180 _ref2 = _iterator2[_i2++];
13181 } else {
13182 _i2 = _iterator2.next();
13183 if (_i2.done) break;
13184 _ref2 = _i2.value;
13185 }
13186
13187 var prop = _ref2;
13188
13189 if (prop.type === "ObjectProperty") prop = prop.value;
13190 this.checkLVal(prop, isBinding, checkClashes, "object destructuring pattern");
13191 }
13192 break;
13193
13194 case "ArrayPattern":
13195 for (var _iterator3 = expr.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
13196 var _ref3;
13197
13198 if (_isArray3) {
13199 if (_i3 >= _iterator3.length) break;
13200 _ref3 = _iterator3[_i3++];
13201 } else {
13202 _i3 = _iterator3.next();
13203 if (_i3.done) break;
13204 _ref3 = _i3.value;
13205 }
13206
13207 var elem = _ref3;
13208
13209 if (elem) this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern");
13210 }
13211 break;
13212
13213 case "AssignmentPattern":
13214 this.checkLVal(expr.left, isBinding, checkClashes, "assignment pattern");
13215 break;
13216
13217 case "RestProperty":
13218 this.checkLVal(expr.argument, isBinding, checkClashes, "rest property");
13219 break;
13220
13221 case "RestElement":
13222 this.checkLVal(expr.argument, isBinding, checkClashes, "rest element");
13223 break;
13224
13225 default:
13226 {
13227 var message = (isBinding ? /* istanbul ignore next */"Binding invalid" : "Invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : /* istanbul ignore next */"expression");
13228 this.raise(expr.start, message);
13229 }
13230 }
13231 };
13232
13233 /* eslint max-len: 0 */
13234
13235 // A recursive descent parser operates by defining functions for all
13236 // syntactic elements, and recursively calling those, each function
13237 // advancing the input stream and returning an AST node. Precedence
13238 // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
13239 // instead of `(!x)[1]` is handled by the fact that the parser
13240 // function that parses unary prefix operators is called first, and
13241 // in turn calls the function that parses `[]` subscripts — that
13242 // way, it'll receive the node for `x[1]` already parsed, and wraps
13243 // *that* in the unary operator node.
13244 //
13245 // Acorn uses an [operator precedence parser][opp] to handle binary
13246 // operator precedence, because it is much more compact than using
13247 // the technique outlined above, which uses different, nesting
13248 // functions to specify precedence, for all of the ten binary
13249 // precedence levels that JavaScript defines.
13250 //
13251 // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
13252
13253 var pp$3 = Parser.prototype;
13254
13255 // Check if property name clashes with already added.
13256 // Object/class getters and setters are not allowed to clash —
13257 // either with each other or with an init property — and in
13258 // strict mode, init properties are also not allowed to be repeated.
13259
13260 pp$3.checkPropClash = function (prop, propHash) {
13261 if (prop.computed || prop.kind) return;
13262
13263 var key = prop.key;
13264 // It is either an Identifier or a String/NumericLiteral
13265 var name = key.type === "Identifier" ? key.name : String(key.value);
13266
13267 if (name === "__proto__") {
13268 if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
13269 propHash.proto = true;
13270 }
13271 };
13272
13273 // Convenience method to parse an Expression only
13274 pp$3.getExpression = function () {
13275 this.nextToken();
13276 var expr = this.parseExpression();
13277 if (!this.match(types.eof)) {
13278 this.unexpected();
13279 }
13280 return expr;
13281 };
13282
13283 // ### Expression parsing
13284
13285 // These nest, from the most general expression type at the top to
13286 // 'atomic', nondivisible expression types at the bottom. Most of
13287 // the functions will simply let the function (s) below them parse,
13288 // and, *if* the syntactic construct they handle is present, wrap
13289 // the AST node that the inner parser gave them in another node.
13290
13291 // Parse a full expression. The optional arguments are used to
13292 // forbid the `in` operator (in for loops initialization expressions)
13293 // and provide reference for storing '=' operator inside shorthand
13294 // property assignment in contexts where both object expression
13295 // and object pattern might appear (so it's possible to raise
13296 // delayed syntax error at correct position).
13297
13298 pp$3.parseExpression = function (noIn, refShorthandDefaultPos) {
13299 var startPos = this.state.start;
13300 var startLoc = this.state.startLoc;
13301 var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
13302 if (this.match(types.comma)) {
13303 var node = this.startNodeAt(startPos, startLoc);
13304 node.expressions = [expr];
13305 while (this.eat(types.comma)) {
13306 node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
13307 }
13308 this.toReferencedList(node.expressions);
13309 return this.finishNode(node, "SequenceExpression");
13310 }
13311 return expr;
13312 };
13313
13314 // Parse an assignment expression. This includes applications of
13315 // operators like `+=`.
13316
13317 pp$3.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
13318 var startPos = this.state.start;
13319 var startLoc = this.state.startLoc;
13320
13321 if (this.match(types._yield) && this.state.inGenerator) {
13322 var _left = this.parseYield();
13323 if (afterLeftParse) _left = afterLeftParse.call(this, _left, startPos, startLoc);
13324 return _left;
13325 }
13326
13327 var failOnShorthandAssign = void 0;
13328 if (refShorthandDefaultPos) {
13329 failOnShorthandAssign = false;
13330 } else {
13331 refShorthandDefaultPos = { start: 0 };
13332 failOnShorthandAssign = true;
13333 }
13334
13335 if (this.match(types.parenL) || this.match(types.name)) {
13336 this.state.potentialArrowAt = this.state.start;
13337 }
13338
13339 var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);
13340 if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
13341 if (this.state.type.isAssign) {
13342 var node = this.startNodeAt(startPos, startLoc);
13343 node.operator = this.state.value;
13344 node.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left;
13345 refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
13346
13347 this.checkLVal(left, undefined, undefined, "assignment expression");
13348
13349 if (left.extra && left.extra.parenthesized) {
13350 var errorMsg = void 0;
13351 if (left.type === "ObjectPattern") {
13352 errorMsg = "`({a}) = 0` use `({a} = 0)`";
13353 } else if (left.type === "ArrayPattern") {
13354 errorMsg = "`([a]) = 0` use `([a] = 0)`";
13355 }
13356 if (errorMsg) {
13357 this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg);
13358 }
13359 }
13360
13361 this.next();
13362 node.right = this.parseMaybeAssign(noIn);
13363 return this.finishNode(node, "AssignmentExpression");
13364 } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
13365 this.unexpected(refShorthandDefaultPos.start);
13366 }
13367
13368 return left;
13369 };
13370
13371 // Parse a ternary conditional (`?:`) operator.
13372
13373 pp$3.parseMaybeConditional = function (noIn, refShorthandDefaultPos, refNeedsArrowPos) {
13374 var startPos = this.state.start;
13375 var startLoc = this.state.startLoc;
13376 var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
13377 if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
13378
13379 return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
13380 };
13381
13382 pp$3.parseConditional = function (expr, noIn, startPos, startLoc) {
13383 if (this.eat(types.question)) {
13384 var node = this.startNodeAt(startPos, startLoc);
13385 node.test = expr;
13386 node.consequent = this.parseMaybeAssign();
13387 this.expect(types.colon);
13388 node.alternate = this.parseMaybeAssign(noIn);
13389 return this.finishNode(node, "ConditionalExpression");
13390 }
13391 return expr;
13392 };
13393
13394 // Start the precedence parser.
13395
13396 pp$3.parseExprOps = function (noIn, refShorthandDefaultPos) {
13397 var startPos = this.state.start;
13398 var startLoc = this.state.startLoc;
13399 var expr = this.parseMaybeUnary(refShorthandDefaultPos);
13400 if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
13401 return expr;
13402 } else {
13403 return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
13404 }
13405 };
13406
13407 // Parse binary operators with the operator precedence parsing
13408 // algorithm. `left` is the left-hand side of the operator.
13409 // `minPrec` provides context that allows the function to stop and
13410 // defer further parser to one of its callers when it encounters an
13411 // operator that has a lower precedence than the set it is parsing.
13412
13413 pp$3.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) {
13414 var prec = this.state.type.binop;
13415 if (prec != null && (!noIn || !this.match(types._in))) {
13416 if (prec > minPrec) {
13417 var node = this.startNodeAt(leftStartPos, leftStartLoc);
13418 node.left = left;
13419 node.operator = this.state.value;
13420
13421 if (node.operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument && !left.extra.parenthesized) {
13422 this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
13423 }
13424
13425 var op = this.state.type;
13426 this.next();
13427
13428 var startPos = this.state.start;
13429 var startLoc = this.state.startLoc;
13430 node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
13431
13432 this.finishNode(node, op === types.logicalOR || op === types.logicalAND ? "LogicalExpression" : "BinaryExpression");
13433 return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
13434 }
13435 }
13436 return left;
13437 };
13438
13439 // Parse unary operators, both prefix and postfix.
13440
13441 pp$3.parseMaybeUnary = function (refShorthandDefaultPos) {
13442 if (this.state.type.prefix) {
13443 var node = this.startNode();
13444 var update = this.match(types.incDec);
13445 node.operator = this.state.value;
13446 node.prefix = true;
13447 this.next();
13448
13449 var argType = this.state.type;
13450 node.argument = this.parseMaybeUnary();
13451
13452 this.addExtra(node, "parenthesizedArgument", argType === types.parenL && (!node.argument.extra || !node.argument.extra.parenthesized));
13453
13454 if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
13455 this.unexpected(refShorthandDefaultPos.start);
13456 }
13457
13458 if (update) {
13459 this.checkLVal(node.argument, undefined, undefined, "prefix operation");
13460 } else if (this.state.strict && node.operator === "delete" && node.argument.type === "Identifier") {
13461 this.raise(node.start, "Deleting local variable in strict mode");
13462 }
13463
13464 return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
13465 }
13466
13467 var startPos = this.state.start;
13468 var startLoc = this.state.startLoc;
13469 var expr = this.parseExprSubscripts(refShorthandDefaultPos);
13470 if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
13471 while (this.state.type.postfix && !this.canInsertSemicolon()) {
13472 var _node = this.startNodeAt(startPos, startLoc);
13473 _node.operator = this.state.value;
13474 _node.prefix = false;
13475 _node.argument = expr;
13476 this.checkLVal(expr, undefined, undefined, "postfix operation");
13477 this.next();
13478 expr = this.finishNode(_node, "UpdateExpression");
13479 }
13480 return expr;
13481 };
13482
13483 // Parse call, dot, and `[]`-subscript expressions.
13484
13485 pp$3.parseExprSubscripts = function (refShorthandDefaultPos) {
13486 var startPos = this.state.start;
13487 var startLoc = this.state.startLoc;
13488 var potentialArrowAt = this.state.potentialArrowAt;
13489 var expr = this.parseExprAtom(refShorthandDefaultPos);
13490
13491 if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
13492 return expr;
13493 }
13494
13495 if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
13496 return expr;
13497 }
13498
13499 return this.parseSubscripts(expr, startPos, startLoc);
13500 };
13501
13502 pp$3.parseSubscripts = function (base, startPos, startLoc, noCalls) {
13503 for (;;) {
13504 if (!noCalls && this.eat(types.doubleColon)) {
13505 var node = this.startNodeAt(startPos, startLoc);
13506 node.object = base;
13507 node.callee = this.parseNoCallExpr();
13508 return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
13509 } else if (this.eat(types.dot)) {
13510 var _node2 = this.startNodeAt(startPos, startLoc);
13511 _node2.object = base;
13512 _node2.property = this.parseIdentifier(true);
13513 _node2.computed = false;
13514 base = this.finishNode(_node2, "MemberExpression");
13515 } else if (this.eat(types.bracketL)) {
13516 var _node3 = this.startNodeAt(startPos, startLoc);
13517 _node3.object = base;
13518 _node3.property = this.parseExpression();
13519 _node3.computed = true;
13520 this.expect(types.bracketR);
13521 base = this.finishNode(_node3, "MemberExpression");
13522 } else if (!noCalls && this.match(types.parenL)) {
13523 var possibleAsync = this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
13524 this.next();
13525
13526 var _node4 = this.startNodeAt(startPos, startLoc);
13527 _node4.callee = base;
13528 _node4.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync);
13529 if (_node4.callee.type === "Import" && _node4.arguments.length !== 1) {
13530 this.raise(_node4.start, "import() requires exactly one argument");
13531 }
13532 base = this.finishNode(_node4, "CallExpression");
13533
13534 if (possibleAsync && this.shouldParseAsyncArrow()) {
13535 return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node4);
13536 } else {
13537 this.toReferencedList(_node4.arguments);
13538 }
13539 } else if (this.match(types.backQuote)) {
13540 var _node5 = this.startNodeAt(startPos, startLoc);
13541 _node5.tag = base;
13542 _node5.quasi = this.parseTemplate(true);
13543 base = this.finishNode(_node5, "TaggedTemplateExpression");
13544 } else {
13545 return base;
13546 }
13547 }
13548 };
13549
13550 pp$3.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
13551 var elts = [];
13552 var innerParenStart = void 0;
13553 var first = true;
13554
13555 while (!this.eat(close)) {
13556 if (first) {
13557 first = false;
13558 } else {
13559 this.expect(types.comma);
13560 if (this.eat(close)) break;
13561 }
13562
13563 // we need to make sure that if this is an async arrow functions, that we don't allow inner parens inside the params
13564 if (this.match(types.parenL) && !innerParenStart) {
13565 innerParenStart = this.state.start;
13566 }
13567
13568 elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { start: 0 } : undefined, possibleAsyncArrow ? { start: 0 } : undefined));
13569 }
13570
13571 // we found an async arrow function so let's not allow any inner parens
13572 if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
13573 this.unexpected();
13574 }
13575
13576 return elts;
13577 };
13578
13579 pp$3.shouldParseAsyncArrow = function () {
13580 return this.match(types.arrow);
13581 };
13582
13583 pp$3.parseAsyncArrowFromCallExpression = function (node, call) {
13584 this.expect(types.arrow);
13585 return this.parseArrowExpression(node, call.arguments, true);
13586 };
13587
13588 // Parse a no-call expression (like argument of `new` or `::` operators).
13589
13590 pp$3.parseNoCallExpr = function () {
13591 var startPos = this.state.start;
13592 var startLoc = this.state.startLoc;
13593 return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
13594 };
13595
13596 // Parse an atomic expression — either a single token that is an
13597 // expression, an expression started by a keyword like `function` or
13598 // `new`, or an expression wrapped in punctuation like `()`, `[]`,
13599 // or `{}`.
13600
13601 pp$3.parseExprAtom = function (refShorthandDefaultPos) {
13602 var canBeArrow = this.state.potentialArrowAt === this.state.start;
13603 var node = void 0;
13604
13605 switch (this.state.type) {
13606 case types._super:
13607 if (!this.state.inMethod && !this.state.inClassProperty && !this.options.allowSuperOutsideMethod) {
13608 this.raise(this.state.start, "'super' outside of function or class");
13609 }
13610
13611 node = this.startNode();
13612 this.next();
13613 if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) {
13614 this.unexpected();
13615 }
13616 if (this.match(types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) {
13617 this.raise(node.start, "super() outside of class constructor");
13618 }
13619 return this.finishNode(node, "Super");
13620
13621 case types._import:
13622 if (!this.hasPlugin("dynamicImport")) this.unexpected();
13623
13624 node = this.startNode();
13625 this.next();
13626 if (!this.match(types.parenL)) {
13627 this.unexpected(null, types.parenL);
13628 }
13629 return this.finishNode(node, "Import");
13630
13631 case types._this:
13632 node = this.startNode();
13633 this.next();
13634 return this.finishNode(node, "ThisExpression");
13635
13636 case types._yield:
13637 if (this.state.inGenerator) this.unexpected();
13638
13639 case types.name:
13640 node = this.startNode();
13641 var allowAwait = this.state.value === "await" && this.state.inAsync;
13642 var allowYield = this.shouldAllowYieldIdentifier();
13643 var id = this.parseIdentifier(allowAwait || allowYield);
13644
13645 if (id.name === "await") {
13646 if (this.state.inAsync || this.inModule) {
13647 return this.parseAwait(node);
13648 }
13649 } else if (id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) {
13650 this.next();
13651 return this.parseFunction(node, false, false, true);
13652 } else if (canBeArrow && id.name === "async" && this.match(types.name)) {
13653 var params = [this.parseIdentifier()];
13654 this.expect(types.arrow);
13655 // let foo = bar => {};
13656 return this.parseArrowExpression(node, params, true);
13657 }
13658
13659 if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {
13660 return this.parseArrowExpression(node, [id]);
13661 }
13662
13663 return id;
13664
13665 case types._do:
13666 if (this.hasPlugin("doExpressions")) {
13667 var _node6 = this.startNode();
13668 this.next();
13669 var oldInFunction = this.state.inFunction;
13670 var oldLabels = this.state.labels;
13671 this.state.labels = [];
13672 this.state.inFunction = false;
13673 _node6.body = this.parseBlock(false, true);
13674 this.state.inFunction = oldInFunction;
13675 this.state.labels = oldLabels;
13676 return this.finishNode(_node6, "DoExpression");
13677 }
13678
13679 case types.regexp:
13680 var value = this.state.value;
13681 node = this.parseLiteral(value.value, "RegExpLiteral");
13682 node.pattern = value.pattern;
13683 node.flags = value.flags;
13684 return node;
13685
13686 case types.num:
13687 return this.parseLiteral(this.state.value, "NumericLiteral");
13688
13689 case types.string:
13690 return this.parseLiteral(this.state.value, "StringLiteral");
13691
13692 case types._null:
13693 node = this.startNode();
13694 this.next();
13695 return this.finishNode(node, "NullLiteral");
13696
13697 case types._true:case types._false:
13698 node = this.startNode();
13699 node.value = this.match(types._true);
13700 this.next();
13701 return this.finishNode(node, "BooleanLiteral");
13702
13703 case types.parenL:
13704 return this.parseParenAndDistinguishExpression(null, null, canBeArrow);
13705
13706 case types.bracketL:
13707 node = this.startNode();
13708 this.next();
13709 node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos);
13710 this.toReferencedList(node.elements);
13711 return this.finishNode(node, "ArrayExpression");
13712
13713 case types.braceL:
13714 return this.parseObj(false, refShorthandDefaultPos);
13715
13716 case types._function:
13717 return this.parseFunctionExpression();
13718
13719 case types.at:
13720 this.parseDecorators();
13721
13722 case types._class:
13723 node = this.startNode();
13724 this.takeDecorators(node);
13725 return this.parseClass(node, false);
13726
13727 case types._new:
13728 return this.parseNew();
13729
13730 case types.backQuote:
13731 return this.parseTemplate(false);
13732
13733 case types.doubleColon:
13734 node = this.startNode();
13735 this.next();
13736 node.object = null;
13737 var callee = node.callee = this.parseNoCallExpr();
13738 if (callee.type === "MemberExpression") {
13739 return this.finishNode(node, "BindExpression");
13740 } else {
13741 this.raise(callee.start, "Binding should be performed on object property.");
13742 }
13743
13744 default:
13745 this.unexpected();
13746 }
13747 };
13748
13749 pp$3.parseFunctionExpression = function () {
13750 var node = this.startNode();
13751 var meta = this.parseIdentifier(true);
13752 if (this.state.inGenerator && this.eat(types.dot) && this.hasPlugin("functionSent")) {
13753 return this.parseMetaProperty(node, meta, "sent");
13754 } else {
13755 return this.parseFunction(node, false);
13756 }
13757 };
13758
13759 pp$3.parseMetaProperty = function (node, meta, propertyName) {
13760 node.meta = meta;
13761 node.property = this.parseIdentifier(true);
13762
13763 if (node.property.name !== propertyName) {
13764 this.raise(node.property.start, "The only valid meta property for new is " + meta.name + "." + propertyName);
13765 }
13766
13767 return this.finishNode(node, "MetaProperty");
13768 };
13769
13770 pp$3.parseLiteral = function (value, type, startPos, startLoc) {
13771 startPos = startPos || this.state.start;
13772 startLoc = startLoc || this.state.startLoc;
13773
13774 var node = this.startNodeAt(startPos, startLoc);
13775 this.addExtra(node, "rawValue", value);
13776 this.addExtra(node, "raw", this.input.slice(startPos, this.state.end));
13777 node.value = value;
13778 this.next();
13779 return this.finishNode(node, type);
13780 };
13781
13782 pp$3.parseParenExpression = function () {
13783 this.expect(types.parenL);
13784 var val = this.parseExpression();
13785 this.expect(types.parenR);
13786 return val;
13787 };
13788
13789 pp$3.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow) {
13790 startPos = startPos || this.state.start;
13791 startLoc = startLoc || this.state.startLoc;
13792
13793 var val = void 0;
13794 this.expect(types.parenL);
13795
13796 var innerStartPos = this.state.start;
13797 var innerStartLoc = this.state.startLoc;
13798 var exprList = [];
13799 var refShorthandDefaultPos = { start: 0 };
13800 var refNeedsArrowPos = { start: 0 };
13801 var first = true;
13802 var spreadStart = void 0;
13803 var optionalCommaStart = void 0;
13804
13805 while (!this.match(types.parenR)) {
13806 if (first) {
13807 first = false;
13808 } else {
13809 this.expect(types.comma, refNeedsArrowPos.start || null);
13810 if (this.match(types.parenR)) {
13811 optionalCommaStart = this.state.start;
13812 break;
13813 }
13814 }
13815
13816 if (this.match(types.ellipsis)) {
13817 var spreadNodeStartPos = this.state.start;
13818 var spreadNodeStartLoc = this.state.startLoc;
13819 spreadStart = this.state.start;
13820 exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartPos, spreadNodeStartLoc));
13821 break;
13822 } else {
13823 exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos));
13824 }
13825 }
13826
13827 var innerEndPos = this.state.start;
13828 var innerEndLoc = this.state.startLoc;
13829 this.expect(types.parenR);
13830
13831 var arrowNode = this.startNodeAt(startPos, startLoc);
13832 if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
13833 for (var _iterator = exprList, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
13834 var _ref;
13835
13836 if (_isArray) {
13837 if (_i >= _iterator.length) break;
13838 _ref = _iterator[_i++];
13839 } else {
13840 _i = _iterator.next();
13841 if (_i.done) break;
13842 _ref = _i.value;
13843 }
13844
13845 var param = _ref;
13846
13847 if (param.extra && param.extra.parenthesized) this.unexpected(param.extra.parenStart);
13848 }
13849
13850 return this.parseArrowExpression(arrowNode, exprList);
13851 }
13852
13853 if (!exprList.length) {
13854 this.unexpected(this.state.lastTokStart);
13855 }
13856 if (optionalCommaStart) this.unexpected(optionalCommaStart);
13857 if (spreadStart) this.unexpected(spreadStart);
13858 if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
13859 if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start);
13860
13861 if (exprList.length > 1) {
13862 val = this.startNodeAt(innerStartPos, innerStartLoc);
13863 val.expressions = exprList;
13864 this.toReferencedList(val.expressions);
13865 this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
13866 } else {
13867 val = exprList[0];
13868 }
13869
13870 this.addExtra(val, "parenthesized", true);
13871 this.addExtra(val, "parenStart", startPos);
13872
13873 return val;
13874 };
13875
13876 pp$3.shouldParseArrow = function () {
13877 return !this.canInsertSemicolon();
13878 };
13879
13880 pp$3.parseArrow = function (node) {
13881 if (this.eat(types.arrow)) {
13882 return node;
13883 }
13884 };
13885
13886 pp$3.parseParenItem = function (node) {
13887 return node;
13888 };
13889
13890 // New's precedence is slightly tricky. It must allow its argument
13891 // to be a `[]` or dot subscript expression, but not a call — at
13892 // least, not without wrapping it in parentheses. Thus, it uses the
13893
13894 pp$3.parseNew = function () {
13895 var node = this.startNode();
13896 var meta = this.parseIdentifier(true);
13897
13898 if (this.eat(types.dot)) {
13899 var metaProp = this.parseMetaProperty(node, meta, "target");
13900
13901 if (!this.state.inFunction) {
13902 this.raise(metaProp.property.start, "new.target can only be used in functions");
13903 }
13904
13905 return metaProp;
13906 }
13907
13908 node.callee = this.parseNoCallExpr();
13909
13910 if (this.eat(types.parenL)) {
13911 node.arguments = this.parseExprList(types.parenR);
13912 this.toReferencedList(node.arguments);
13913 } else {
13914 node.arguments = [];
13915 }
13916
13917 return this.finishNode(node, "NewExpression");
13918 };
13919
13920 // Parse template expression.
13921
13922 pp$3.parseTemplateElement = function (isTagged) {
13923 var elem = this.startNode();
13924 if (this.state.value === null) {
13925 if (!isTagged || !this.hasPlugin("templateInvalidEscapes")) {
13926 this.raise(this.state.invalidTemplateEscapePosition, "Invalid escape sequence in template");
13927 } else {
13928 this.state.invalidTemplateEscapePosition = null;
13929 }
13930 }
13931 elem.value = {
13932 raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
13933 cooked: this.state.value
13934 };
13935 this.next();
13936 elem.tail = this.match(types.backQuote);
13937 return this.finishNode(elem, "TemplateElement");
13938 };
13939
13940 pp$3.parseTemplate = function (isTagged) {
13941 var node = this.startNode();
13942 this.next();
13943 node.expressions = [];
13944 var curElt = this.parseTemplateElement(isTagged);
13945 node.quasis = [curElt];
13946 while (!curElt.tail) {
13947 this.expect(types.dollarBraceL);
13948 node.expressions.push(this.parseExpression());
13949 this.expect(types.braceR);
13950 node.quasis.push(curElt = this.parseTemplateElement(isTagged));
13951 }
13952 this.next();
13953 return this.finishNode(node, "TemplateLiteral");
13954 };
13955
13956 // Parse an object literal or binding pattern.
13957
13958 pp$3.parseObj = function (isPattern, refShorthandDefaultPos) {
13959 var decorators = [];
13960 var propHash = Object.create(null);
13961 var first = true;
13962 var node = this.startNode();
13963
13964 node.properties = [];
13965 this.next();
13966
13967 var firstRestLocation = null;
13968
13969 while (!this.eat(types.braceR)) {
13970 if (first) {
13971 first = false;
13972 } else {
13973 this.expect(types.comma);
13974 if (this.eat(types.braceR)) break;
13975 }
13976
13977 while (this.match(types.at)) {
13978 decorators.push(this.parseDecorator());
13979 }
13980
13981 var prop = this.startNode(),
13982 isGenerator = false,
13983 isAsync = false,
13984 startPos = void 0,
13985 startLoc = void 0;
13986 if (decorators.length) {
13987 prop.decorators = decorators;
13988 decorators = [];
13989 }
13990
13991 if (this.hasPlugin("objectRestSpread") && this.match(types.ellipsis)) {
13992 prop = this.parseSpread(isPattern ? { start: 0 } : undefined);
13993 prop.type = isPattern ? "RestProperty" : "SpreadProperty";
13994 if (isPattern) this.toAssignable(prop.argument, true, "object pattern");
13995 node.properties.push(prop);
13996 if (isPattern) {
13997 var position = this.state.start;
13998 if (firstRestLocation !== null) {
13999 this.unexpected(firstRestLocation, "Cannot have multiple rest elements when destructuring");
14000 } else if (this.eat(types.braceR)) {
14001 break;
14002 } else if (this.match(types.comma) && this.lookahead().type === types.braceR) {
14003 // TODO: temporary rollback
14004 // this.unexpected(position, "A trailing comma is not permitted after the rest element");
14005 continue;
14006 } else {
14007 firstRestLocation = position;
14008 continue;
14009 }
14010 } else {
14011 continue;
14012 }
14013 }
14014
14015 prop.method = false;
14016 prop.shorthand = false;
14017
14018 if (isPattern || refShorthandDefaultPos) {
14019 startPos = this.state.start;
14020 startLoc = this.state.startLoc;
14021 }
14022
14023 if (!isPattern) {
14024 isGenerator = this.eat(types.star);
14025 }
14026
14027 if (!isPattern && this.isContextual("async")) {
14028 if (isGenerator) this.unexpected();
14029
14030 var asyncId = this.parseIdentifier();
14031 if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) {
14032 prop.key = asyncId;
14033 prop.computed = false;
14034 } else {
14035 isAsync = true;
14036 if (this.hasPlugin("asyncGenerators")) isGenerator = this.eat(types.star);
14037 this.parsePropertyName(prop);
14038 }
14039 } else {
14040 this.parsePropertyName(prop);
14041 }
14042
14043 this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos);
14044 this.checkPropClash(prop, propHash);
14045
14046 if (prop.shorthand) {
14047 this.addExtra(prop, "shorthand", true);
14048 }
14049
14050 node.properties.push(prop);
14051 }
14052
14053 if (firstRestLocation !== null) {
14054 this.unexpected(firstRestLocation, "The rest element has to be the last element when destructuring");
14055 }
14056
14057 if (decorators.length) {
14058 this.raise(this.state.start, "You have trailing decorators with no property");
14059 }
14060
14061 return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
14062 };
14063
14064 pp$3.isGetterOrSetterMethod = function (prop, isPattern) {
14065 return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || // get "string"() {}
14066 this.match(types.num) || // get 1() {}
14067 this.match(types.bracketL) || // get ["string"]() {}
14068 this.match(types.name) || // get foo() {}
14069 this.state.type.keyword // get debugger() {}
14070 );
14071 };
14072
14073 // get methods aren't allowed to have any parameters
14074 // set methods must have exactly 1 parameter
14075 pp$3.checkGetterSetterParamCount = function (method) {
14076 var paramCount = method.kind === "get" ? 0 : 1;
14077 if (method.params.length !== paramCount) {
14078 var start = method.start;
14079 if (method.kind === "get") {
14080 this.raise(start, "getter should have no params");
14081 } else {
14082 this.raise(start, "setter should have exactly one param");
14083 }
14084 }
14085 };
14086
14087 pp$3.parseObjectMethod = function (prop, isGenerator, isAsync, isPattern) {
14088 if (isAsync || isGenerator || this.match(types.parenL)) {
14089 if (isPattern) this.unexpected();
14090 prop.kind = "method";
14091 prop.method = true;
14092 this.parseMethod(prop, isGenerator, isAsync);
14093
14094 return this.finishNode(prop, "ObjectMethod");
14095 }
14096
14097 if (this.isGetterOrSetterMethod(prop, isPattern)) {
14098 if (isGenerator || isAsync) this.unexpected();
14099 prop.kind = prop.key.name;
14100 this.parsePropertyName(prop);
14101 this.parseMethod(prop);
14102 this.checkGetterSetterParamCount(prop);
14103
14104 return this.finishNode(prop, "ObjectMethod");
14105 }
14106 };
14107
14108 pp$3.parseObjectProperty = function (prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
14109 if (this.eat(types.colon)) {
14110 prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
14111
14112 return this.finishNode(prop, "ObjectProperty");
14113 }
14114
14115 if (!prop.computed && prop.key.type === "Identifier") {
14116 this.checkReservedWord(prop.key.name, prop.key.start, true, true);
14117
14118 if (isPattern) {
14119 prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
14120 } else if (this.match(types.eq) && refShorthandDefaultPos) {
14121 if (!refShorthandDefaultPos.start) {
14122 refShorthandDefaultPos.start = this.state.start;
14123 }
14124 prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
14125 } else {
14126 prop.value = prop.key.__clone();
14127 }
14128 prop.shorthand = true;
14129
14130 return this.finishNode(prop, "ObjectProperty");
14131 }
14132 };
14133
14134 pp$3.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
14135 var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
14136
14137 if (!node) this.unexpected();
14138
14139 return node;
14140 };
14141
14142 pp$3.parsePropertyName = function (prop) {
14143 if (this.eat(types.bracketL)) {
14144 prop.computed = true;
14145 prop.key = this.parseMaybeAssign();
14146 this.expect(types.bracketR);
14147 } else {
14148 prop.computed = false;
14149 var oldInPropertyName = this.state.inPropertyName;
14150 this.state.inPropertyName = true;
14151 prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
14152 this.state.inPropertyName = oldInPropertyName;
14153 }
14154 return prop.key;
14155 };
14156
14157 // Initialize empty function node.
14158
14159 pp$3.initFunction = function (node, isAsync) {
14160 node.id = null;
14161 node.generator = false;
14162 node.expression = false;
14163 node.async = !!isAsync;
14164 };
14165
14166 // Parse object or class method.
14167
14168 pp$3.parseMethod = function (node, isGenerator, isAsync) {
14169 var oldInMethod = this.state.inMethod;
14170 this.state.inMethod = node.kind || true;
14171 this.initFunction(node, isAsync);
14172 this.expect(types.parenL);
14173 node.params = this.parseBindingList(types.parenR);
14174 node.generator = !!isGenerator;
14175 this.parseFunctionBody(node);
14176 this.state.inMethod = oldInMethod;
14177 return node;
14178 };
14179
14180 // Parse arrow function expression with given parameters.
14181
14182 pp$3.parseArrowExpression = function (node, params, isAsync) {
14183 this.initFunction(node, isAsync);
14184 node.params = this.toAssignableList(params, true, "arrow function parameters");
14185 this.parseFunctionBody(node, true);
14186 return this.finishNode(node, "ArrowFunctionExpression");
14187 };
14188
14189 pp$3.isStrictBody = function (node, isExpression) {
14190 if (!isExpression && node.body.directives.length) {
14191 for (var _iterator2 = node.body.directives, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
14192 var _ref2;
14193
14194 if (_isArray2) {
14195 if (_i2 >= _iterator2.length) break;
14196 _ref2 = _iterator2[_i2++];
14197 } else {
14198 _i2 = _iterator2.next();
14199 if (_i2.done) break;
14200 _ref2 = _i2.value;
14201 }
14202
14203 var directive = _ref2;
14204
14205 if (directive.value.value === "use strict") {
14206 return true;
14207 }
14208 }
14209 }
14210
14211 return false;
14212 };
14213
14214 // Parse function body and check parameters.
14215 pp$3.parseFunctionBody = function (node, allowExpression) {
14216 var isExpression = allowExpression && !this.match(types.braceL);
14217
14218 var oldInAsync = this.state.inAsync;
14219 this.state.inAsync = node.async;
14220 if (isExpression) {
14221 node.body = this.parseMaybeAssign();
14222 node.expression = true;
14223 } else {
14224 // Start a new scope with regard to labels and the `inFunction`
14225 // flag (restore them to their old value afterwards).
14226 var oldInFunc = this.state.inFunction;
14227 var oldInGen = this.state.inGenerator;
14228 var oldLabels = this.state.labels;
14229 this.state.inFunction = true;this.state.inGenerator = node.generator;this.state.labels = [];
14230 node.body = this.parseBlock(true);
14231 node.expression = false;
14232 this.state.inFunction = oldInFunc;this.state.inGenerator = oldInGen;this.state.labels = oldLabels;
14233 }
14234 this.state.inAsync = oldInAsync;
14235
14236 // If this is a strict mode function, verify that argument names
14237 // are not repeated, and it does not try to bind the words `eval`
14238 // or `arguments`.
14239 var isStrict = this.isStrictBody(node, isExpression);
14240 // Also check when allowExpression === true for arrow functions
14241 var checkLVal = this.state.strict || allowExpression || isStrict;
14242
14243 if (isStrict && node.id && node.id.type === "Identifier" && node.id.name === "yield") {
14244 this.raise(node.id.start, "Binding yield in strict mode");
14245 }
14246
14247 if (checkLVal) {
14248 var nameHash = Object.create(null);
14249 var oldStrict = this.state.strict;
14250 if (isStrict) this.state.strict = true;
14251 if (node.id) {
14252 this.checkLVal(node.id, true, undefined, "function name");
14253 }
14254 for (var _iterator3 = node.params, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
14255 var _ref3;
14256
14257 if (_isArray3) {
14258 if (_i3 >= _iterator3.length) break;
14259 _ref3 = _iterator3[_i3++];
14260 } else {
14261 _i3 = _iterator3.next();
14262 if (_i3.done) break;
14263 _ref3 = _i3.value;
14264 }
14265
14266 var param = _ref3;
14267
14268 if (isStrict && param.type !== "Identifier") {
14269 this.raise(param.start, "Non-simple parameter in strict mode");
14270 }
14271 this.checkLVal(param, true, nameHash, "function parameter list");
14272 }
14273 this.state.strict = oldStrict;
14274 }
14275 };
14276
14277 // Parses a comma-separated list of expressions, and returns them as
14278 // an array. `close` is the token type that ends the list, and
14279 // `allowEmpty` can be turned on to allow subsequent commas with
14280 // nothing in between them to be parsed as `null` (which is needed
14281 // for array literals).
14282
14283 pp$3.parseExprList = function (close, allowEmpty, refShorthandDefaultPos) {
14284 var elts = [];
14285 var first = true;
14286
14287 while (!this.eat(close)) {
14288 if (first) {
14289 first = false;
14290 } else {
14291 this.expect(types.comma);
14292 if (this.eat(close)) break;
14293 }
14294
14295 elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos));
14296 }
14297 return elts;
14298 };
14299
14300 pp$3.parseExprListItem = function (allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) {
14301 var elt = void 0;
14302 if (allowEmpty && this.match(types.comma)) {
14303 elt = null;
14304 } else if (this.match(types.ellipsis)) {
14305 elt = this.parseSpread(refShorthandDefaultPos);
14306 } else {
14307 elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos);
14308 }
14309 return elt;
14310 };
14311
14312 // Parse the next token as an identifier. If `liberal` is true (used
14313 // when parsing properties), it will also convert keywords into
14314 // identifiers.
14315
14316 pp$3.parseIdentifier = function (liberal) {
14317 var node = this.startNode();
14318 if (!liberal) {
14319 this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false);
14320 }
14321
14322 if (this.match(types.name)) {
14323 node.name = this.state.value;
14324 } else if (this.state.type.keyword) {
14325 node.name = this.state.type.keyword;
14326 } else {
14327 this.unexpected();
14328 }
14329
14330 if (!liberal && node.name === "await" && this.state.inAsync) {
14331 this.raise(node.start, "invalid use of await inside of an async function");
14332 }
14333
14334 node.loc.identifierName = node.name;
14335
14336 this.next();
14337 return this.finishNode(node, "Identifier");
14338 };
14339
14340 pp$3.checkReservedWord = function (word, startLoc, checkKeywords, isBinding) {
14341 if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) {
14342 this.raise(startLoc, word + " is a reserved word");
14343 }
14344
14345 if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) {
14346 this.raise(startLoc, word + " is a reserved word in strict mode");
14347 }
14348 };
14349
14350 // Parses await expression inside async function.
14351
14352 pp$3.parseAwait = function (node) {
14353 // istanbul ignore next: this condition is checked at the call site so won't be hit here
14354 if (!this.state.inAsync) {
14355 this.unexpected();
14356 }
14357 if (this.match(types.star)) {
14358 this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.");
14359 }
14360 node.argument = this.parseMaybeUnary();
14361 return this.finishNode(node, "AwaitExpression");
14362 };
14363
14364 // Parses yield expression inside generator.
14365
14366 pp$3.parseYield = function () {
14367 var node = this.startNode();
14368 this.next();
14369 if (this.match(types.semi) || this.canInsertSemicolon() || !this.match(types.star) && !this.state.type.startsExpr) {
14370 node.delegate = false;
14371 node.argument = null;
14372 } else {
14373 node.delegate = this.eat(types.star);
14374 node.argument = this.parseMaybeAssign();
14375 }
14376 return this.finishNode(node, "YieldExpression");
14377 };
14378
14379 // Start an AST node, attaching a start offset.
14380
14381 var pp$4 = Parser.prototype;
14382 var commentKeys = ["leadingComments", "trailingComments", "innerComments"];
14383
14384 var Node = function () {
14385 function Node(pos, loc, filename) {
14386 classCallCheck(this, Node);
14387
14388 this.type = "";
14389 this.start = pos;
14390 this.end = 0;
14391 this.loc = new SourceLocation(loc);
14392 if (filename) this.loc.filename = filename;
14393 }
14394
14395 Node.prototype.__clone = function __clone() {
14396 var node2 = new Node();
14397 for (var key in this) {
14398 // Do not clone comments that are already attached to the node
14399 if (commentKeys.indexOf(key) < 0) {
14400 node2[key] = this[key];
14401 }
14402 }
14403
14404 return node2;
14405 };
14406
14407 return Node;
14408 }();
14409
14410 pp$4.startNode = function () {
14411 return new Node(this.state.start, this.state.startLoc, this.filename);
14412 };
14413
14414 pp$4.startNodeAt = function (pos, loc) {
14415 return new Node(pos, loc, this.filename);
14416 };
14417
14418 function finishNodeAt(node, type, pos, loc) {
14419 node.type = type;
14420 node.end = pos;
14421 node.loc.end = loc;
14422 this.processComment(node);
14423 return node;
14424 }
14425
14426 // Finish an AST node, adding `type` and `end` properties.
14427
14428 pp$4.finishNode = function (node, type) {
14429 return finishNodeAt.call(this, node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
14430 };
14431
14432 // Finish node at given position
14433
14434 pp$4.finishNodeAt = function (node, type, pos, loc) {
14435 return finishNodeAt.call(this, node, type, pos, loc);
14436 };
14437
14438 var pp$5 = Parser.prototype;
14439
14440 // This function is used to raise exceptions on parse errors. It
14441 // takes an offset integer (into the current `input`) to indicate
14442 // the location of the error, attaches the position to the end
14443 // of the error message, and then raises a `SyntaxError` with that
14444 // message.
14445
14446 pp$5.raise = function (pos, message) {
14447 var loc = getLineInfo(this.input, pos);
14448 message += " (" + loc.line + ":" + loc.column + ")";
14449 var err = new SyntaxError(message);
14450 err.pos = pos;
14451 err.loc = loc;
14452 throw err;
14453 };
14454
14455 /* eslint max-len: 0 */
14456
14457 /**
14458 * Based on the comment attachment algorithm used in espree and estraverse.
14459 *
14460 * Redistribution and use in source and binary forms, with or without
14461 * modification, are permitted provided that the following conditions are met:
14462 *
14463 * * Redistributions of source code must retain the above copyright
14464 * notice, this list of conditions and the following disclaimer.
14465 * * Redistributions in binary form must reproduce the above copyright
14466 * notice, this list of conditions and the following disclaimer in the
14467 * documentation and/or other materials provided with the distribution.
14468 *
14469 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14470 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14471 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14472 * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
14473 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
14474 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14475 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
14476 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14477 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
14478 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14479 */
14480
14481 function last(stack) {
14482 return stack[stack.length - 1];
14483 }
14484
14485 var pp$6 = Parser.prototype;
14486
14487 pp$6.addComment = function (comment) {
14488 if (this.filename) comment.loc.filename = this.filename;
14489 this.state.trailingComments.push(comment);
14490 this.state.leadingComments.push(comment);
14491 };
14492
14493 pp$6.processComment = function (node) {
14494 if (node.type === "Program" && node.body.length > 0) return;
14495
14496 var stack = this.state.commentStack;
14497
14498 var firstChild = void 0,
14499 lastChild = void 0,
14500 trailingComments = void 0,
14501 i = void 0,
14502 j = void 0;
14503
14504 if (this.state.trailingComments.length > 0) {
14505 // If the first comment in trailingComments comes after the
14506 // current node, then we're good - all comments in the array will
14507 // come after the node and so it's safe to add them as official
14508 // trailingComments.
14509 if (this.state.trailingComments[0].start >= node.end) {
14510 trailingComments = this.state.trailingComments;
14511 this.state.trailingComments = [];
14512 } else {
14513 // Otherwise, if the first comment doesn't come after the
14514 // current node, that means we have a mix of leading and trailing
14515 // comments in the array and that leadingComments contains the
14516 // same items as trailingComments. Reset trailingComments to
14517 // zero items and we'll handle this by evaluating leadingComments
14518 // later.
14519 this.state.trailingComments.length = 0;
14520 }
14521 } else {
14522 var lastInStack = last(stack);
14523 if (stack.length > 0 && lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
14524 trailingComments = lastInStack.trailingComments;
14525 lastInStack.trailingComments = null;
14526 }
14527 }
14528
14529 // Eating the stack.
14530 if (stack.length > 0 && last(stack).start >= node.start) {
14531 firstChild = stack.pop();
14532 }
14533
14534 while (stack.length > 0 && last(stack).start >= node.start) {
14535 lastChild = stack.pop();
14536 }
14537
14538 if (!lastChild && firstChild) lastChild = firstChild;
14539
14540 // Attach comments that follow a trailing comma on the last
14541 // property in an object literal or a trailing comma in function arguments
14542 // as trailing comments
14543 if (firstChild && this.state.leadingComments.length > 0) {
14544 var lastComment = last(this.state.leadingComments);
14545
14546 if (firstChild.type === "ObjectProperty") {
14547 if (lastComment.start >= node.start) {
14548 if (this.state.commentPreviousNode) {
14549 for (j = 0; j < this.state.leadingComments.length; j++) {
14550 if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
14551 this.state.leadingComments.splice(j, 1);
14552 j--;
14553 }
14554 }
14555
14556 if (this.state.leadingComments.length > 0) {
14557 firstChild.trailingComments = this.state.leadingComments;
14558 this.state.leadingComments = [];
14559 }
14560 }
14561 }
14562 } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) {
14563 var lastArg = last(node.arguments);
14564
14565 if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) {
14566 if (this.state.commentPreviousNode) {
14567 if (this.state.leadingComments.length > 0) {
14568 lastArg.trailingComments = this.state.leadingComments;
14569 this.state.leadingComments = [];
14570 }
14571 }
14572 }
14573 }
14574 }
14575
14576 if (lastChild) {
14577 if (lastChild.leadingComments) {
14578 if (lastChild !== node && last(lastChild.leadingComments).end <= node.start) {
14579 node.leadingComments = lastChild.leadingComments;
14580 lastChild.leadingComments = null;
14581 } else {
14582 // A leading comment for an anonymous class had been stolen by its first ClassMethod,
14583 // so this takes back the leading comment.
14584 // See also: https://github.com/eslint/espree/issues/158
14585 for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
14586 if (lastChild.leadingComments[i].end <= node.start) {
14587 node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
14588 break;
14589 }
14590 }
14591 }
14592 }
14593 } else if (this.state.leadingComments.length > 0) {
14594 if (last(this.state.leadingComments).end <= node.start) {
14595 if (this.state.commentPreviousNode) {
14596 for (j = 0; j < this.state.leadingComments.length; j++) {
14597 if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
14598 this.state.leadingComments.splice(j, 1);
14599 j--;
14600 }
14601 }
14602 }
14603 if (this.state.leadingComments.length > 0) {
14604 node.leadingComments = this.state.leadingComments;
14605 this.state.leadingComments = [];
14606 }
14607 } else {
14608 // https://github.com/eslint/espree/issues/2
14609 //
14610 // In special cases, such as return (without a value) and
14611 // debugger, all comments will end up as leadingComments and
14612 // will otherwise be eliminated. This step runs when the
14613 // commentStack is empty and there are comments left
14614 // in leadingComments.
14615 //
14616 // This loop figures out the stopping point between the actual
14617 // leading and trailing comments by finding the location of the
14618 // first comment that comes after the given node.
14619 for (i = 0; i < this.state.leadingComments.length; i++) {
14620 if (this.state.leadingComments[i].end > node.start) {
14621 break;
14622 }
14623 }
14624
14625 // Split the array based on the location of the first comment
14626 // that comes after the node. Keep in mind that this could
14627 // result in an empty array, and if so, the array must be
14628 // deleted.
14629 node.leadingComments = this.state.leadingComments.slice(0, i);
14630 if (node.leadingComments.length === 0) {
14631 node.leadingComments = null;
14632 }
14633
14634 // Similarly, trailing comments are attached later. The variable
14635 // must be reset to null if there are no trailing comments.
14636 trailingComments = this.state.leadingComments.slice(i);
14637 if (trailingComments.length === 0) {
14638 trailingComments = null;
14639 }
14640 }
14641 }
14642
14643 this.state.commentPreviousNode = node;
14644
14645 if (trailingComments) {
14646 if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
14647 node.innerComments = trailingComments;
14648 } else {
14649 node.trailingComments = trailingComments;
14650 }
14651 }
14652
14653 stack.push(node);
14654 };
14655
14656 var pp$7 = Parser.prototype;
14657
14658 pp$7.estreeParseRegExpLiteral = function (_ref) {
14659 var pattern = _ref.pattern,
14660 flags = _ref.flags;
14661
14662 var regex = null;
14663 try {
14664 regex = new RegExp(pattern, flags);
14665 } catch (e) {
14666 // In environments that don't support these flags value will
14667 // be null as the regex can't be represented natively.
14668 }
14669 var node = this.estreeParseLiteral(regex);
14670 node.regex = { pattern: pattern, flags: flags };
14671
14672 return node;
14673 };
14674
14675 pp$7.estreeParseLiteral = function (value) {
14676 return this.parseLiteral(value, "Literal");
14677 };
14678
14679 pp$7.directiveToStmt = function (directive) {
14680 var directiveLiteral = directive.value;
14681
14682 var stmt = this.startNodeAt(directive.start, directive.loc.start);
14683 var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
14684
14685 expression.value = directiveLiteral.value;
14686 expression.raw = directiveLiteral.extra.raw;
14687
14688 stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
14689 stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
14690
14691 return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
14692 };
14693
14694 function isSimpleProperty(node) {
14695 return node && node.type === "Property" && node.kind === "init" && node.method === false;
14696 }
14697
14698 var estreePlugin = function estreePlugin(instance) {
14699 instance.extend("checkDeclaration", function (inner) {
14700 return function (node) {
14701 if (isSimpleProperty(node)) {
14702 this.checkDeclaration(node.value);
14703 } else {
14704 inner.call(this, node);
14705 }
14706 };
14707 });
14708
14709 instance.extend("checkGetterSetterParamCount", function () {
14710 return function (prop) {
14711 var paramCount = prop.kind === "get" ? 0 : 1;
14712 if (prop.value.params.length !== paramCount) {
14713 var start = prop.start;
14714 if (prop.kind === "get") {
14715 this.raise(start, "getter should have no params");
14716 } else {
14717 this.raise(start, "setter should have exactly one param");
14718 }
14719 }
14720 };
14721 });
14722
14723 instance.extend("checkLVal", function (inner) {
14724 return function (expr, isBinding, checkClashes) {
14725 var _this = this;
14726
14727 switch (expr.type) {
14728 case "ObjectPattern":
14729 expr.properties.forEach(function (prop) {
14730 _this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern");
14731 });
14732 break;
14733 default:
14734 for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
14735 args[_key - 3] = arguments[_key];
14736 }
14737
14738 inner.call.apply(inner, [this, expr, isBinding, checkClashes].concat(args));
14739 }
14740 };
14741 });
14742
14743 instance.extend("checkPropClash", function () {
14744 return function (prop, propHash) {
14745 if (prop.computed || !isSimpleProperty(prop)) return;
14746
14747 var key = prop.key;
14748 // It is either an Identifier or a String/NumericLiteral
14749 var name = key.type === "Identifier" ? key.name : String(key.value);
14750
14751 if (name === "__proto__") {
14752 if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
14753 propHash.proto = true;
14754 }
14755 };
14756 });
14757
14758 instance.extend("isStrictBody", function () {
14759 return function (node, isExpression) {
14760 if (!isExpression && node.body.body.length > 0) {
14761 for (var _iterator = node.body.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
14762 var _ref2;
14763
14764 if (_isArray) {
14765 if (_i >= _iterator.length) break;
14766 _ref2 = _iterator[_i++];
14767 } else {
14768 _i = _iterator.next();
14769 if (_i.done) break;
14770 _ref2 = _i.value;
14771 }
14772
14773 var directive = _ref2;
14774
14775 if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") {
14776 if (directive.expression.value === "use strict") return true;
14777 } else {
14778 // Break for the first non literal expression
14779 break;
14780 }
14781 }
14782 }
14783
14784 return false;
14785 };
14786 });
14787
14788 instance.extend("isValidDirective", function () {
14789 return function (stmt) {
14790 return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized);
14791 };
14792 });
14793
14794 instance.extend("stmtToDirective", function (inner) {
14795 return function (stmt) {
14796 var directive = inner.call(this, stmt);
14797 var value = stmt.expression.value;
14798
14799 // Reset value to the actual value as in estree mode we want
14800 // the stmt to have the real value and not the raw value
14801 directive.value.value = value;
14802
14803 return directive;
14804 };
14805 });
14806
14807 instance.extend("parseBlockBody", function (inner) {
14808 return function (node) {
14809 var _this2 = this;
14810
14811 for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
14812 args[_key2 - 1] = arguments[_key2];
14813 }
14814
14815 inner.call.apply(inner, [this, node].concat(args));
14816
14817 node.directives.reverse().forEach(function (directive) {
14818 node.body.unshift(_this2.directiveToStmt(directive));
14819 });
14820 delete node.directives;
14821 };
14822 });
14823
14824 instance.extend("parseClassMethod", function () {
14825 return function (classBody, method, isGenerator, isAsync) {
14826 this.parseMethod(method, isGenerator, isAsync);
14827 if (method.typeParameters) {
14828 method.value.typeParameters = method.typeParameters;
14829 delete method.typeParameters;
14830 }
14831 classBody.body.push(this.finishNode(method, "MethodDefinition"));
14832 };
14833 });
14834
14835 instance.extend("parseExprAtom", function (inner) {
14836 return function () {
14837 switch (this.state.type) {
14838 case types.regexp:
14839 return this.estreeParseRegExpLiteral(this.state.value);
14840
14841 case types.num:
14842 case types.string:
14843 return this.estreeParseLiteral(this.state.value);
14844
14845 case types._null:
14846 return this.estreeParseLiteral(null);
14847
14848 case types._true:
14849 return this.estreeParseLiteral(true);
14850
14851 case types._false:
14852 return this.estreeParseLiteral(false);
14853
14854 default:
14855 for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
14856 args[_key3] = arguments[_key3];
14857 }
14858
14859 return inner.call.apply(inner, [this].concat(args));
14860 }
14861 };
14862 });
14863
14864 instance.extend("parseLiteral", function (inner) {
14865 return function () {
14866 for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
14867 args[_key4] = arguments[_key4];
14868 }
14869
14870 var node = inner.call.apply(inner, [this].concat(args));
14871 node.raw = node.extra.raw;
14872 delete node.extra;
14873
14874 return node;
14875 };
14876 });
14877
14878 instance.extend("parseMethod", function (inner) {
14879 return function (node) {
14880 var funcNode = this.startNode();
14881 funcNode.kind = node.kind; // provide kind, so inner method correctly sets state
14882
14883 for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
14884 args[_key5 - 1] = arguments[_key5];
14885 }
14886
14887 funcNode = inner.call.apply(inner, [this, funcNode].concat(args));
14888 delete funcNode.kind;
14889 node.value = this.finishNode(funcNode, "FunctionExpression");
14890
14891 return node;
14892 };
14893 });
14894
14895 instance.extend("parseObjectMethod", function (inner) {
14896 return function () {
14897 for (var _len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
14898 args[_key6] = arguments[_key6];
14899 }
14900
14901 var node = inner.call.apply(inner, [this].concat(args));
14902
14903 if (node) {
14904 if (node.kind === "method") node.kind = "init";
14905 node.type = "Property";
14906 }
14907
14908 return node;
14909 };
14910 });
14911
14912 instance.extend("parseObjectProperty", function (inner) {
14913 return function () {
14914 for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
14915 args[_key7] = arguments[_key7];
14916 }
14917
14918 var node = inner.call.apply(inner, [this].concat(args));
14919
14920 if (node) {
14921 node.kind = "init";
14922 node.type = "Property";
14923 }
14924
14925 return node;
14926 };
14927 });
14928
14929 instance.extend("toAssignable", function (inner) {
14930 return function (node, isBinding) {
14931 for (var _len8 = arguments.length, args = Array(_len8 > 2 ? _len8 - 2 : 0), _key8 = 2; _key8 < _len8; _key8++) {
14932 args[_key8 - 2] = arguments[_key8];
14933 }
14934
14935 if (isSimpleProperty(node)) {
14936 this.toAssignable.apply(this, [node.value, isBinding].concat(args));
14937
14938 return node;
14939 } else if (node.type === "ObjectExpression") {
14940 node.type = "ObjectPattern";
14941 for (var _iterator2 = node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
14942 var _ref3;
14943
14944 if (_isArray2) {
14945 if (_i2 >= _iterator2.length) break;
14946 _ref3 = _iterator2[_i2++];
14947 } else {
14948 _i2 = _iterator2.next();
14949 if (_i2.done) break;
14950 _ref3 = _i2.value;
14951 }
14952
14953 var prop = _ref3;
14954
14955 if (prop.kind === "get" || prop.kind === "set") {
14956 this.raise(prop.key.start, "Object pattern can't contain getter or setter");
14957 } else if (prop.method) {
14958 this.raise(prop.key.start, "Object pattern can't contain methods");
14959 } else {
14960 this.toAssignable(prop, isBinding, "object destructuring pattern");
14961 }
14962 }
14963
14964 return node;
14965 }
14966
14967 return inner.call.apply(inner, [this, node, isBinding].concat(args));
14968 };
14969 });
14970 };
14971
14972 /* eslint max-len: 0 */
14973
14974 var primitiveTypes = ["any", "mixed", "empty", "bool", "boolean", "number", "string", "void", "null"];
14975
14976 var pp$8 = Parser.prototype;
14977
14978 pp$8.flowParseTypeInitialiser = function (tok) {
14979 var oldInType = this.state.inType;
14980 this.state.inType = true;
14981 this.expect(tok || types.colon);
14982
14983 var type = this.flowParseType();
14984 this.state.inType = oldInType;
14985 return type;
14986 };
14987
14988 pp$8.flowParsePredicate = function () {
14989 var node = this.startNode();
14990 var moduloLoc = this.state.startLoc;
14991 var moduloPos = this.state.start;
14992 this.expect(types.modulo);
14993 var checksLoc = this.state.startLoc;
14994 this.expectContextual("checks");
14995 // Force '%' and 'checks' to be adjacent
14996 if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) {
14997 this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here.");
14998 }
14999 if (this.eat(types.parenL)) {
15000 node.expression = this.parseExpression();
15001 this.expect(types.parenR);
15002 return this.finishNode(node, "DeclaredPredicate");
15003 } else {
15004 return this.finishNode(node, "InferredPredicate");
15005 }
15006 };
15007
15008 pp$8.flowParseTypeAndPredicateInitialiser = function () {
15009 var oldInType = this.state.inType;
15010 this.state.inType = true;
15011 this.expect(types.colon);
15012 var type = null;
15013 var predicate = null;
15014 if (this.match(types.modulo)) {
15015 this.state.inType = oldInType;
15016 predicate = this.flowParsePredicate();
15017 } else {
15018 type = this.flowParseType();
15019 this.state.inType = oldInType;
15020 if (this.match(types.modulo)) {
15021 predicate = this.flowParsePredicate();
15022 }
15023 }
15024 return [type, predicate];
15025 };
15026
15027 pp$8.flowParseDeclareClass = function (node) {
15028 this.next();
15029 this.flowParseInterfaceish(node, true);
15030 return this.finishNode(node, "DeclareClass");
15031 };
15032
15033 pp$8.flowParseDeclareFunction = function (node) {
15034 this.next();
15035
15036 var id = node.id = this.parseIdentifier();
15037
15038 var typeNode = this.startNode();
15039 var typeContainer = this.startNode();
15040
15041 if (this.isRelational("<")) {
15042 typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
15043 } else {
15044 typeNode.typeParameters = null;
15045 }
15046
15047 this.expect(types.parenL);
15048 var tmp = this.flowParseFunctionTypeParams();
15049 typeNode.params = tmp.params;
15050 typeNode.rest = tmp.rest;
15051 this.expect(types.parenR);
15052 var predicate = null;
15053
15054 var _flowParseTypeAndPred = this.flowParseTypeAndPredicateInitialiser();
15055
15056 typeNode.returnType = _flowParseTypeAndPred[0];
15057 predicate = _flowParseTypeAndPred[1];
15058
15059 typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
15060 typeContainer.predicate = predicate;
15061 id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
15062
15063 this.finishNode(id, id.type);
15064
15065 this.semicolon();
15066
15067 return this.finishNode(node, "DeclareFunction");
15068 };
15069
15070 pp$8.flowParseDeclare = function (node) {
15071 if (this.match(types._class)) {
15072 return this.flowParseDeclareClass(node);
15073 } else if (this.match(types._function)) {
15074 return this.flowParseDeclareFunction(node);
15075 } else if (this.match(types._var)) {
15076 return this.flowParseDeclareVariable(node);
15077 } else if (this.isContextual("module")) {
15078 if (this.lookahead().type === types.dot) {
15079 return this.flowParseDeclareModuleExports(node);
15080 } else {
15081 return this.flowParseDeclareModule(node);
15082 }
15083 } else if (this.isContextual("type")) {
15084 return this.flowParseDeclareTypeAlias(node);
15085 } else if (this.isContextual("opaque")) {
15086 return this.flowParseDeclareOpaqueType(node);
15087 } else if (this.isContextual("interface")) {
15088 return this.flowParseDeclareInterface(node);
15089 } else if (this.match(types._export)) {
15090 return this.flowParseDeclareExportDeclaration(node);
15091 } else {
15092 this.unexpected();
15093 }
15094 };
15095
15096 pp$8.flowParseDeclareExportDeclaration = function (node) {
15097 this.expect(types._export);
15098 if (this.isContextual("opaque") // declare export opaque ...
15099 ) {
15100 node.declaration = this.flowParseDeclare(this.startNode());
15101 node.default = false;
15102
15103 return this.finishNode(node, "DeclareExportDeclaration");
15104 }
15105
15106 throw this.unexpected();
15107 };
15108
15109 pp$8.flowParseDeclareVariable = function (node) {
15110 this.next();
15111 node.id = this.flowParseTypeAnnotatableIdentifier();
15112 this.semicolon();
15113 return this.finishNode(node, "DeclareVariable");
15114 };
15115
15116 pp$8.flowParseDeclareModule = function (node) {
15117 this.next();
15118
15119 if (this.match(types.string)) {
15120 node.id = this.parseExprAtom();
15121 } else {
15122 node.id = this.parseIdentifier();
15123 }
15124
15125 var bodyNode = node.body = this.startNode();
15126 var body = bodyNode.body = [];
15127 this.expect(types.braceL);
15128 while (!this.match(types.braceR)) {
15129 var _bodyNode = this.startNode();
15130
15131 if (this.match(types._import)) {
15132 var lookahead = this.lookahead();
15133 if (lookahead.value !== "type" && lookahead.value !== "typeof") {
15134 this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`");
15135 }
15136
15137 this.parseImport(_bodyNode);
15138 } else {
15139 this.expectContextual("declare", "Only declares and type imports are allowed inside declare module");
15140
15141 _bodyNode = this.flowParseDeclare(_bodyNode, true);
15142 }
15143
15144 body.push(_bodyNode);
15145 }
15146 this.expect(types.braceR);
15147
15148 this.finishNode(bodyNode, "BlockStatement");
15149 return this.finishNode(node, "DeclareModule");
15150 };
15151
15152 pp$8.flowParseDeclareModuleExports = function (node) {
15153 this.expectContextual("module");
15154 this.expect(types.dot);
15155 this.expectContextual("exports");
15156 node.typeAnnotation = this.flowParseTypeAnnotation();
15157 this.semicolon();
15158
15159 return this.finishNode(node, "DeclareModuleExports");
15160 };
15161
15162 pp$8.flowParseDeclareTypeAlias = function (node) {
15163 this.next();
15164 this.flowParseTypeAlias(node);
15165 return this.finishNode(node, "DeclareTypeAlias");
15166 };
15167
15168 pp$8.flowParseDeclareOpaqueType = function (node) {
15169 this.next();
15170 this.flowParseOpaqueType(node, true);
15171 return this.finishNode(node, "DeclareOpaqueType");
15172 };
15173
15174 pp$8.flowParseDeclareInterface = function (node) {
15175 this.next();
15176 this.flowParseInterfaceish(node);
15177 return this.finishNode(node, "DeclareInterface");
15178 };
15179
15180 // Interfaces
15181
15182 pp$8.flowParseInterfaceish = function (node) {
15183 node.id = this.parseIdentifier();
15184
15185 if (this.isRelational("<")) {
15186 node.typeParameters = this.flowParseTypeParameterDeclaration();
15187 } else {
15188 node.typeParameters = null;
15189 }
15190
15191 node.extends = [];
15192 node.mixins = [];
15193
15194 if (this.eat(types._extends)) {
15195 do {
15196 node.extends.push(this.flowParseInterfaceExtends());
15197 } while (this.eat(types.comma));
15198 }
15199
15200 if (this.isContextual("mixins")) {
15201 this.next();
15202 do {
15203 node.mixins.push(this.flowParseInterfaceExtends());
15204 } while (this.eat(types.comma));
15205 }
15206
15207 node.body = this.flowParseObjectType(true, false, false);
15208 };
15209
15210 pp$8.flowParseInterfaceExtends = function () {
15211 var node = this.startNode();
15212
15213 node.id = this.flowParseQualifiedTypeIdentifier();
15214 if (this.isRelational("<")) {
15215 node.typeParameters = this.flowParseTypeParameterInstantiation();
15216 } else {
15217 node.typeParameters = null;
15218 }
15219
15220 return this.finishNode(node, "InterfaceExtends");
15221 };
15222
15223 pp$8.flowParseInterface = function (node) {
15224 this.flowParseInterfaceish(node, false);
15225 return this.finishNode(node, "InterfaceDeclaration");
15226 };
15227
15228 pp$8.flowParseRestrictedIdentifier = function (liberal) {
15229 if (primitiveTypes.indexOf(this.state.value) > -1) {
15230 this.raise(this.state.start, "Cannot overwrite primitive type " + this.state.value);
15231 }
15232
15233 return this.parseIdentifier(liberal);
15234 };
15235
15236 // Type aliases
15237
15238 pp$8.flowParseTypeAlias = function (node) {
15239 node.id = this.flowParseRestrictedIdentifier();
15240
15241 if (this.isRelational("<")) {
15242 node.typeParameters = this.flowParseTypeParameterDeclaration();
15243 } else {
15244 node.typeParameters = null;
15245 }
15246
15247 node.right = this.flowParseTypeInitialiser(types.eq);
15248 this.semicolon();
15249
15250 return this.finishNode(node, "TypeAlias");
15251 };
15252
15253 // Opaque type aliases
15254
15255 pp$8.flowParseOpaqueType = function (node, declare) {
15256 this.expectContextual("type");
15257 node.id = this.flowParseRestrictedIdentifier();
15258
15259 if (this.isRelational("<")) {
15260 node.typeParameters = this.flowParseTypeParameterDeclaration();
15261 } else {
15262 node.typeParameters = null;
15263 }
15264
15265 // Parse the supertype
15266 node.supertype = null;
15267 if (this.match(types.colon)) {
15268 node.supertype = this.flowParseTypeInitialiser(types.colon);
15269 }
15270
15271 node.impltype = null;
15272 if (!declare) {
15273 node.impltype = this.flowParseTypeInitialiser(types.eq);
15274 }
15275 this.semicolon();
15276
15277 return this.finishNode(node, "OpaqueType");
15278 };
15279
15280 // Type annotations
15281
15282 pp$8.flowParseTypeParameter = function () {
15283 var node = this.startNode();
15284
15285 var variance = this.flowParseVariance();
15286
15287 var ident = this.flowParseTypeAnnotatableIdentifier();
15288 node.name = ident.name;
15289 node.variance = variance;
15290 node.bound = ident.typeAnnotation;
15291
15292 if (this.match(types.eq)) {
15293 this.eat(types.eq);
15294 node.default = this.flowParseType();
15295 }
15296
15297 return this.finishNode(node, "TypeParameter");
15298 };
15299
15300 pp$8.flowParseTypeParameterDeclaration = function () {
15301 var oldInType = this.state.inType;
15302 var node = this.startNode();
15303 node.params = [];
15304
15305 this.state.inType = true;
15306
15307 // istanbul ignore else: this condition is already checked at all call sites
15308 if (this.isRelational("<") || this.match(types.jsxTagStart)) {
15309 this.next();
15310 } else {
15311 this.unexpected();
15312 }
15313
15314 do {
15315 node.params.push(this.flowParseTypeParameter());
15316 if (!this.isRelational(">")) {
15317 this.expect(types.comma);
15318 }
15319 } while (!this.isRelational(">"));
15320 this.expectRelational(">");
15321
15322 this.state.inType = oldInType;
15323
15324 return this.finishNode(node, "TypeParameterDeclaration");
15325 };
15326
15327 pp$8.flowParseTypeParameterInstantiation = function () {
15328 var node = this.startNode();
15329 var oldInType = this.state.inType;
15330 node.params = [];
15331
15332 this.state.inType = true;
15333
15334 this.expectRelational("<");
15335 while (!this.isRelational(">")) {
15336 node.params.push(this.flowParseType());
15337 if (!this.isRelational(">")) {
15338 this.expect(types.comma);
15339 }
15340 }
15341 this.expectRelational(">");
15342
15343 this.state.inType = oldInType;
15344
15345 return this.finishNode(node, "TypeParameterInstantiation");
15346 };
15347
15348 pp$8.flowParseObjectPropertyKey = function () {
15349 return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
15350 };
15351
15352 pp$8.flowParseObjectTypeIndexer = function (node, isStatic, variance) {
15353 node.static = isStatic;
15354
15355 this.expect(types.bracketL);
15356 if (this.lookahead().type === types.colon) {
15357 node.id = this.flowParseObjectPropertyKey();
15358 node.key = this.flowParseTypeInitialiser();
15359 } else {
15360 node.id = null;
15361 node.key = this.flowParseType();
15362 }
15363 this.expect(types.bracketR);
15364 node.value = this.flowParseTypeInitialiser();
15365 node.variance = variance;
15366
15367 this.flowObjectTypeSemicolon();
15368 return this.finishNode(node, "ObjectTypeIndexer");
15369 };
15370
15371 pp$8.flowParseObjectTypeMethodish = function (node) {
15372 node.params = [];
15373 node.rest = null;
15374 node.typeParameters = null;
15375
15376 if (this.isRelational("<")) {
15377 node.typeParameters = this.flowParseTypeParameterDeclaration();
15378 }
15379
15380 this.expect(types.parenL);
15381 while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
15382 node.params.push(this.flowParseFunctionTypeParam());
15383 if (!this.match(types.parenR)) {
15384 this.expect(types.comma);
15385 }
15386 }
15387
15388 if (this.eat(types.ellipsis)) {
15389 node.rest = this.flowParseFunctionTypeParam();
15390 }
15391 this.expect(types.parenR);
15392 node.returnType = this.flowParseTypeInitialiser();
15393
15394 return this.finishNode(node, "FunctionTypeAnnotation");
15395 };
15396
15397 pp$8.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
15398 var node = this.startNodeAt(startPos, startLoc);
15399 node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc));
15400 node.static = isStatic;
15401 node.key = key;
15402 node.optional = false;
15403 this.flowObjectTypeSemicolon();
15404 return this.finishNode(node, "ObjectTypeProperty");
15405 };
15406
15407 pp$8.flowParseObjectTypeCallProperty = function (node, isStatic) {
15408 var valueNode = this.startNode();
15409 node.static = isStatic;
15410 node.value = this.flowParseObjectTypeMethodish(valueNode);
15411 this.flowObjectTypeSemicolon();
15412 return this.finishNode(node, "ObjectTypeCallProperty");
15413 };
15414
15415 pp$8.flowParseObjectType = function (allowStatic, allowExact, allowSpread) {
15416 var oldInType = this.state.inType;
15417 this.state.inType = true;
15418
15419 var nodeStart = this.startNode();
15420 var node = void 0;
15421 var propertyKey = void 0;
15422 var isStatic = false;
15423
15424 nodeStart.callProperties = [];
15425 nodeStart.properties = [];
15426 nodeStart.indexers = [];
15427
15428 var endDelim = void 0;
15429 var exact = void 0;
15430 if (allowExact && this.match(types.braceBarL)) {
15431 this.expect(types.braceBarL);
15432 endDelim = types.braceBarR;
15433 exact = true;
15434 } else {
15435 this.expect(types.braceL);
15436 endDelim = types.braceR;
15437 exact = false;
15438 }
15439
15440 nodeStart.exact = exact;
15441
15442 while (!this.match(endDelim)) {
15443 var optional = false;
15444 var startPos = this.state.start;
15445 var startLoc = this.state.startLoc;
15446 node = this.startNode();
15447 if (allowStatic && this.isContextual("static") && this.lookahead().type !== types.colon) {
15448 this.next();
15449 isStatic = true;
15450 }
15451
15452 var variancePos = this.state.start;
15453 var variance = this.flowParseVariance();
15454
15455 if (this.match(types.bracketL)) {
15456 nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
15457 } else if (this.match(types.parenL) || this.isRelational("<")) {
15458 if (variance) {
15459 this.unexpected(variancePos);
15460 }
15461 nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
15462 } else {
15463 if (this.match(types.ellipsis)) {
15464 if (!allowSpread) {
15465 this.unexpected(null, "Spread operator cannot appear in class or interface definitions");
15466 }
15467 if (variance) {
15468 this.unexpected(variance.start, "Spread properties cannot have variance");
15469 }
15470 this.expect(types.ellipsis);
15471 node.argument = this.flowParseType();
15472 this.flowObjectTypeSemicolon();
15473 nodeStart.properties.push(this.finishNode(node, "ObjectTypeSpreadProperty"));
15474 } else {
15475 propertyKey = this.flowParseObjectPropertyKey();
15476 if (this.isRelational("<") || this.match(types.parenL)) {
15477 // This is a method property
15478 if (variance) {
15479 this.unexpected(variance.start);
15480 }
15481 nodeStart.properties.push(this.flowParseObjectTypeMethod(startPos, startLoc, isStatic, propertyKey));
15482 } else {
15483 if (this.eat(types.question)) {
15484 optional = true;
15485 }
15486 node.key = propertyKey;
15487 node.value = this.flowParseTypeInitialiser();
15488 node.optional = optional;
15489 node.static = isStatic;
15490 node.variance = variance;
15491 this.flowObjectTypeSemicolon();
15492 nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty"));
15493 }
15494 }
15495 }
15496
15497 isStatic = false;
15498 }
15499
15500 this.expect(endDelim);
15501
15502 var out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
15503
15504 this.state.inType = oldInType;
15505
15506 return out;
15507 };
15508
15509 pp$8.flowObjectTypeSemicolon = function () {
15510 if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {
15511 this.unexpected();
15512 }
15513 };
15514
15515 pp$8.flowParseQualifiedTypeIdentifier = function (startPos, startLoc, id) {
15516 startPos = startPos || this.state.start;
15517 startLoc = startLoc || this.state.startLoc;
15518 var node = id || this.parseIdentifier();
15519
15520 while (this.eat(types.dot)) {
15521 var node2 = this.startNodeAt(startPos, startLoc);
15522 node2.qualification = node;
15523 node2.id = this.parseIdentifier();
15524 node = this.finishNode(node2, "QualifiedTypeIdentifier");
15525 }
15526
15527 return node;
15528 };
15529
15530 pp$8.flowParseGenericType = function (startPos, startLoc, id) {
15531 var node = this.startNodeAt(startPos, startLoc);
15532
15533 node.typeParameters = null;
15534 node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
15535
15536 if (this.isRelational("<")) {
15537 node.typeParameters = this.flowParseTypeParameterInstantiation();
15538 }
15539
15540 return this.finishNode(node, "GenericTypeAnnotation");
15541 };
15542
15543 pp$8.flowParseTypeofType = function () {
15544 var node = this.startNode();
15545 this.expect(types._typeof);
15546 node.argument = this.flowParsePrimaryType();
15547 return this.finishNode(node, "TypeofTypeAnnotation");
15548 };
15549
15550 pp$8.flowParseTupleType = function () {
15551 var node = this.startNode();
15552 node.types = [];
15553 this.expect(types.bracketL);
15554 // We allow trailing commas
15555 while (this.state.pos < this.input.length && !this.match(types.bracketR)) {
15556 node.types.push(this.flowParseType());
15557 if (this.match(types.bracketR)) break;
15558 this.expect(types.comma);
15559 }
15560 this.expect(types.bracketR);
15561 return this.finishNode(node, "TupleTypeAnnotation");
15562 };
15563
15564 pp$8.flowParseFunctionTypeParam = function () {
15565 var name = null;
15566 var optional = false;
15567 var typeAnnotation = null;
15568 var node = this.startNode();
15569 var lh = this.lookahead();
15570 if (lh.type === types.colon || lh.type === types.question) {
15571 name = this.parseIdentifier();
15572 if (this.eat(types.question)) {
15573 optional = true;
15574 }
15575 typeAnnotation = this.flowParseTypeInitialiser();
15576 } else {
15577 typeAnnotation = this.flowParseType();
15578 }
15579 node.name = name;
15580 node.optional = optional;
15581 node.typeAnnotation = typeAnnotation;
15582 return this.finishNode(node, "FunctionTypeParam");
15583 };
15584
15585 pp$8.reinterpretTypeAsFunctionTypeParam = function (type) {
15586 var node = this.startNodeAt(type.start, type.loc.start);
15587 node.name = null;
15588 node.optional = false;
15589 node.typeAnnotation = type;
15590 return this.finishNode(node, "FunctionTypeParam");
15591 };
15592
15593 pp$8.flowParseFunctionTypeParams = function () {
15594 var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
15595
15596 var ret = { params: params, rest: null };
15597 while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
15598 ret.params.push(this.flowParseFunctionTypeParam());
15599 if (!this.match(types.parenR)) {
15600 this.expect(types.comma);
15601 }
15602 }
15603 if (this.eat(types.ellipsis)) {
15604 ret.rest = this.flowParseFunctionTypeParam();
15605 }
15606 return ret;
15607 };
15608
15609 pp$8.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
15610 switch (id.name) {
15611 case "any":
15612 return this.finishNode(node, "AnyTypeAnnotation");
15613
15614 case "void":
15615 return this.finishNode(node, "VoidTypeAnnotation");
15616
15617 case "bool":
15618 case "boolean":
15619 return this.finishNode(node, "BooleanTypeAnnotation");
15620
15621 case "mixed":
15622 return this.finishNode(node, "MixedTypeAnnotation");
15623
15624 case "empty":
15625 return this.finishNode(node, "EmptyTypeAnnotation");
15626
15627 case "number":
15628 return this.finishNode(node, "NumberTypeAnnotation");
15629
15630 case "string":
15631 return this.finishNode(node, "StringTypeAnnotation");
15632
15633 default:
15634 return this.flowParseGenericType(startPos, startLoc, id);
15635 }
15636 };
15637
15638 // The parsing of types roughly parallels the parsing of expressions, and
15639 // primary types are kind of like primary expressions...they're the
15640 // primitives with which other types are constructed.
15641 pp$8.flowParsePrimaryType = function () {
15642 var startPos = this.state.start;
15643 var startLoc = this.state.startLoc;
15644 var node = this.startNode();
15645 var tmp = void 0;
15646 var type = void 0;
15647 var isGroupedType = false;
15648 var oldNoAnonFunctionType = this.state.noAnonFunctionType;
15649
15650 switch (this.state.type) {
15651 case types.name:
15652 return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
15653
15654 case types.braceL:
15655 return this.flowParseObjectType(false, false, true);
15656
15657 case types.braceBarL:
15658 return this.flowParseObjectType(false, true, true);
15659
15660 case types.bracketL:
15661 return this.flowParseTupleType();
15662
15663 case types.relational:
15664 if (this.state.value === "<") {
15665 node.typeParameters = this.flowParseTypeParameterDeclaration();
15666 this.expect(types.parenL);
15667 tmp = this.flowParseFunctionTypeParams();
15668 node.params = tmp.params;
15669 node.rest = tmp.rest;
15670 this.expect(types.parenR);
15671
15672 this.expect(types.arrow);
15673
15674 node.returnType = this.flowParseType();
15675
15676 return this.finishNode(node, "FunctionTypeAnnotation");
15677 }
15678 break;
15679
15680 case types.parenL:
15681 this.next();
15682
15683 // Check to see if this is actually a grouped type
15684 if (!this.match(types.parenR) && !this.match(types.ellipsis)) {
15685 if (this.match(types.name)) {
15686 var token = this.lookahead().type;
15687 isGroupedType = token !== types.question && token !== types.colon;
15688 } else {
15689 isGroupedType = true;
15690 }
15691 }
15692
15693 if (isGroupedType) {
15694 this.state.noAnonFunctionType = false;
15695 type = this.flowParseType();
15696 this.state.noAnonFunctionType = oldNoAnonFunctionType;
15697
15698 // A `,` or a `) =>` means this is an anonymous function type
15699 if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {
15700 this.expect(types.parenR);
15701 return type;
15702 } else {
15703 // Eat a comma if there is one
15704 this.eat(types.comma);
15705 }
15706 }
15707
15708 if (type) {
15709 tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
15710 } else {
15711 tmp = this.flowParseFunctionTypeParams();
15712 }
15713
15714 node.params = tmp.params;
15715 node.rest = tmp.rest;
15716
15717 this.expect(types.parenR);
15718
15719 this.expect(types.arrow);
15720
15721 node.returnType = this.flowParseType();
15722
15723 node.typeParameters = null;
15724
15725 return this.finishNode(node, "FunctionTypeAnnotation");
15726
15727 case types.string:
15728 return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
15729
15730 case types._true:case types._false:
15731 node.value = this.match(types._true);
15732 this.next();
15733 return this.finishNode(node, "BooleanLiteralTypeAnnotation");
15734
15735 case types.plusMin:
15736 if (this.state.value === "-") {
15737 this.next();
15738 if (!this.match(types.num)) this.unexpected(null, "Unexpected token, expected number");
15739
15740 return this.parseLiteral(-this.state.value, "NumericLiteralTypeAnnotation", node.start, node.loc.start);
15741 }
15742
15743 this.unexpected();
15744 case types.num:
15745 return this.parseLiteral(this.state.value, "NumericLiteralTypeAnnotation");
15746
15747 case types._null:
15748 node.value = this.match(types._null);
15749 this.next();
15750 return this.finishNode(node, "NullLiteralTypeAnnotation");
15751
15752 case types._this:
15753 node.value = this.match(types._this);
15754 this.next();
15755 return this.finishNode(node, "ThisTypeAnnotation");
15756
15757 case types.star:
15758 this.next();
15759 return this.finishNode(node, "ExistentialTypeParam");
15760
15761 default:
15762 if (this.state.type.keyword === "typeof") {
15763 return this.flowParseTypeofType();
15764 }
15765 }
15766
15767 this.unexpected();
15768 };
15769
15770 pp$8.flowParsePostfixType = function () {
15771 var startPos = this.state.start,
15772 startLoc = this.state.startLoc;
15773 var type = this.flowParsePrimaryType();
15774 while (!this.canInsertSemicolon() && this.match(types.bracketL)) {
15775 var node = this.startNodeAt(startPos, startLoc);
15776 node.elementType = type;
15777 this.expect(types.bracketL);
15778 this.expect(types.bracketR);
15779 type = this.finishNode(node, "ArrayTypeAnnotation");
15780 }
15781 return type;
15782 };
15783
15784 pp$8.flowParsePrefixType = function () {
15785 var node = this.startNode();
15786 if (this.eat(types.question)) {
15787 node.typeAnnotation = this.flowParsePrefixType();
15788 return this.finishNode(node, "NullableTypeAnnotation");
15789 } else {
15790 return this.flowParsePostfixType();
15791 }
15792 };
15793
15794 pp$8.flowParseAnonFunctionWithoutParens = function () {
15795 var param = this.flowParsePrefixType();
15796 if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {
15797 var node = this.startNodeAt(param.start, param.loc.start);
15798 node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
15799 node.rest = null;
15800 node.returnType = this.flowParseType();
15801 node.typeParameters = null;
15802 return this.finishNode(node, "FunctionTypeAnnotation");
15803 }
15804 return param;
15805 };
15806
15807 pp$8.flowParseIntersectionType = function () {
15808 var node = this.startNode();
15809 this.eat(types.bitwiseAND);
15810 var type = this.flowParseAnonFunctionWithoutParens();
15811 node.types = [type];
15812 while (this.eat(types.bitwiseAND)) {
15813 node.types.push(this.flowParseAnonFunctionWithoutParens());
15814 }
15815 return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
15816 };
15817
15818 pp$8.flowParseUnionType = function () {
15819 var node = this.startNode();
15820 this.eat(types.bitwiseOR);
15821 var type = this.flowParseIntersectionType();
15822 node.types = [type];
15823 while (this.eat(types.bitwiseOR)) {
15824 node.types.push(this.flowParseIntersectionType());
15825 }
15826 return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
15827 };
15828
15829 pp$8.flowParseType = function () {
15830 var oldInType = this.state.inType;
15831 this.state.inType = true;
15832 var type = this.flowParseUnionType();
15833 this.state.inType = oldInType;
15834 return type;
15835 };
15836
15837 pp$8.flowParseTypeAnnotation = function () {
15838 var node = this.startNode();
15839 node.typeAnnotation = this.flowParseTypeInitialiser();
15840 return this.finishNode(node, "TypeAnnotation");
15841 };
15842
15843 pp$8.flowParseTypeAndPredicateAnnotation = function () {
15844 var node = this.startNode();
15845
15846 var _flowParseTypeAndPred2 = this.flowParseTypeAndPredicateInitialiser();
15847
15848 node.typeAnnotation = _flowParseTypeAndPred2[0];
15849 node.predicate = _flowParseTypeAndPred2[1];
15850
15851 return this.finishNode(node, "TypeAnnotation");
15852 };
15853
15854 pp$8.flowParseTypeAnnotatableIdentifier = function () {
15855 var ident = this.flowParseRestrictedIdentifier();
15856 if (this.match(types.colon)) {
15857 ident.typeAnnotation = this.flowParseTypeAnnotation();
15858 this.finishNode(ident, ident.type);
15859 }
15860 return ident;
15861 };
15862
15863 pp$8.typeCastToParameter = function (node) {
15864 node.expression.typeAnnotation = node.typeAnnotation;
15865
15866 return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);
15867 };
15868
15869 pp$8.flowParseVariance = function () {
15870 var variance = null;
15871 if (this.match(types.plusMin)) {
15872 if (this.state.value === "+") {
15873 variance = "plus";
15874 } else if (this.state.value === "-") {
15875 variance = "minus";
15876 }
15877 this.next();
15878 }
15879 return variance;
15880 };
15881
15882 var flowPlugin = function flowPlugin(instance) {
15883 // plain function return types: function name(): string {}
15884 instance.extend("parseFunctionBody", function (inner) {
15885 return function (node, allowExpression) {
15886 if (this.match(types.colon) && !allowExpression) {
15887 // if allowExpression is true then we're parsing an arrow function and if
15888 // there's a return type then it's been handled elsewhere
15889 node.returnType = this.flowParseTypeAndPredicateAnnotation();
15890 }
15891
15892 return inner.call(this, node, allowExpression);
15893 };
15894 });
15895
15896 // interfaces
15897 instance.extend("parseStatement", function (inner) {
15898 return function (declaration, topLevel) {
15899 // strict mode handling of `interface` since it's a reserved word
15900 if (this.state.strict && this.match(types.name) && this.state.value === "interface") {
15901 var node = this.startNode();
15902 this.next();
15903 return this.flowParseInterface(node);
15904 } else {
15905 return inner.call(this, declaration, topLevel);
15906 }
15907 };
15908 });
15909
15910 // declares, interfaces and type aliases
15911 instance.extend("parseExpressionStatement", function (inner) {
15912 return function (node, expr) {
15913 if (expr.type === "Identifier") {
15914 if (expr.name === "declare") {
15915 if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) {
15916 return this.flowParseDeclare(node);
15917 }
15918 } else if (this.match(types.name)) {
15919 if (expr.name === "interface") {
15920 return this.flowParseInterface(node);
15921 } else if (expr.name === "type") {
15922 return this.flowParseTypeAlias(node);
15923 } else if (expr.name === "opaque") {
15924 return this.flowParseOpaqueType(node, false);
15925 }
15926 }
15927 }
15928
15929 return inner.call(this, node, expr);
15930 };
15931 });
15932
15933 // export type
15934 instance.extend("shouldParseExportDeclaration", function (inner) {
15935 return function () {
15936 return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || inner.call(this);
15937 };
15938 });
15939
15940 instance.extend("isExportDefaultSpecifier", function (inner) {
15941 return function () {
15942 if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque")) {
15943 return false;
15944 }
15945
15946 return inner.call(this);
15947 };
15948 });
15949
15950 instance.extend("parseConditional", function (inner) {
15951 return function (expr, noIn, startPos, startLoc, refNeedsArrowPos) {
15952 // only do the expensive clone if there is a question mark
15953 // and if we come from inside parens
15954 if (refNeedsArrowPos && this.match(types.question)) {
15955 var state = this.state.clone();
15956 try {
15957 return inner.call(this, expr, noIn, startPos, startLoc);
15958 } catch (err) {
15959 if (err instanceof SyntaxError) {
15960 this.state = state;
15961 refNeedsArrowPos.start = err.pos || this.state.start;
15962 return expr;
15963 } else {
15964 // istanbul ignore next: no such error is expected
15965 throw err;
15966 }
15967 }
15968 }
15969
15970 return inner.call(this, expr, noIn, startPos, startLoc);
15971 };
15972 });
15973
15974 instance.extend("parseParenItem", function (inner) {
15975 return function (node, startPos, startLoc) {
15976 node = inner.call(this, node, startPos, startLoc);
15977 if (this.eat(types.question)) {
15978 node.optional = true;
15979 }
15980
15981 if (this.match(types.colon)) {
15982 var typeCastNode = this.startNodeAt(startPos, startLoc);
15983 typeCastNode.expression = node;
15984 typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
15985
15986 return this.finishNode(typeCastNode, "TypeCastExpression");
15987 }
15988
15989 return node;
15990 };
15991 });
15992
15993 instance.extend("parseExport", function (inner) {
15994 return function (node) {
15995 node = inner.call(this, node);
15996 if (node.type === "ExportNamedDeclaration") {
15997 node.exportKind = node.exportKind || "value";
15998 }
15999 return node;
16000 };
16001 });
16002
16003 instance.extend("parseExportDeclaration", function (inner) {
16004 return function (node) {
16005 if (this.isContextual("type")) {
16006 node.exportKind = "type";
16007
16008 var declarationNode = this.startNode();
16009 this.next();
16010
16011 if (this.match(types.braceL)) {
16012 // export type { foo, bar };
16013 node.specifiers = this.parseExportSpecifiers();
16014 this.parseExportFrom(node);
16015 return null;
16016 } else {
16017 // export type Foo = Bar;
16018 return this.flowParseTypeAlias(declarationNode);
16019 }
16020 } else if (this.isContextual("opaque")) {
16021 node.exportKind = "type";
16022
16023 var _declarationNode = this.startNode();
16024 this.next();
16025 // export opaque type Foo = Bar;
16026 return this.flowParseOpaqueType(_declarationNode, false);
16027 } else if (this.isContextual("interface")) {
16028 node.exportKind = "type";
16029 var _declarationNode2 = this.startNode();
16030 this.next();
16031 return this.flowParseInterface(_declarationNode2);
16032 } else {
16033 return inner.call(this, node);
16034 }
16035 };
16036 });
16037
16038 instance.extend("parseClassId", function (inner) {
16039 return function (node) {
16040 inner.apply(this, arguments);
16041 if (this.isRelational("<")) {
16042 node.typeParameters = this.flowParseTypeParameterDeclaration();
16043 }
16044 };
16045 });
16046
16047 // don't consider `void` to be a keyword as then it'll use the void token type
16048 // and set startExpr
16049 instance.extend("isKeyword", function (inner) {
16050 return function (name) {
16051 if (this.state.inType && name === "void") {
16052 return false;
16053 } else {
16054 return inner.call(this, name);
16055 }
16056 };
16057 });
16058
16059 // ensure that inside flow types, we bypass the jsx parser plugin
16060 instance.extend("readToken", function (inner) {
16061 return function (code) {
16062 if (this.state.inType && (code === 62 || code === 60)) {
16063 return this.finishOp(types.relational, 1);
16064 } else {
16065 return inner.call(this, code);
16066 }
16067 };
16068 });
16069
16070 // don't lex any token as a jsx one inside a flow type
16071 instance.extend("jsx_readToken", function (inner) {
16072 return function () {
16073 if (!this.state.inType) return inner.call(this);
16074 };
16075 });
16076
16077 instance.extend("toAssignable", function (inner) {
16078 return function (node, isBinding, contextDescription) {
16079 if (node.type === "TypeCastExpression") {
16080 return inner.call(this, this.typeCastToParameter(node), isBinding, contextDescription);
16081 } else {
16082 return inner.call(this, node, isBinding, contextDescription);
16083 }
16084 };
16085 });
16086
16087 // turn type casts that we found in function parameter head into type annotated params
16088 instance.extend("toAssignableList", function (inner) {
16089 return function (exprList, isBinding, contextDescription) {
16090 for (var i = 0; i < exprList.length; i++) {
16091 var expr = exprList[i];
16092 if (expr && expr.type === "TypeCastExpression") {
16093 exprList[i] = this.typeCastToParameter(expr);
16094 }
16095 }
16096 return inner.call(this, exprList, isBinding, contextDescription);
16097 };
16098 });
16099
16100 // this is a list of nodes, from something like a call expression, we need to filter the
16101 // type casts that we've found that are illegal in this context
16102 instance.extend("toReferencedList", function () {
16103 return function (exprList) {
16104 for (var i = 0; i < exprList.length; i++) {
16105 var expr = exprList[i];
16106 if (expr && expr._exprListItem && expr.type === "TypeCastExpression") {
16107 this.raise(expr.start, "Unexpected type cast");
16108 }
16109 }
16110
16111 return exprList;
16112 };
16113 });
16114
16115 // parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents
16116 // the position where this function is called
16117 instance.extend("parseExprListItem", function (inner) {
16118 return function () {
16119 var container = this.startNode();
16120
16121 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
16122 args[_key] = arguments[_key];
16123 }
16124
16125 var node = inner.call.apply(inner, [this].concat(args));
16126 if (this.match(types.colon)) {
16127 container._exprListItem = true;
16128 container.expression = node;
16129 container.typeAnnotation = this.flowParseTypeAnnotation();
16130 return this.finishNode(container, "TypeCastExpression");
16131 } else {
16132 return node;
16133 }
16134 };
16135 });
16136
16137 instance.extend("checkLVal", function (inner) {
16138 return function (node) {
16139 if (node.type !== "TypeCastExpression") {
16140 return inner.apply(this, arguments);
16141 }
16142 };
16143 });
16144
16145 // parse class property type annotations
16146 instance.extend("parseClassProperty", function (inner) {
16147 return function (node) {
16148 delete node.variancePos;
16149 if (this.match(types.colon)) {
16150 node.typeAnnotation = this.flowParseTypeAnnotation();
16151 }
16152 return inner.call(this, node);
16153 };
16154 });
16155
16156 // determine whether or not we're currently in the position where a class method would appear
16157 instance.extend("isClassMethod", function (inner) {
16158 return function () {
16159 return this.isRelational("<") || inner.call(this);
16160 };
16161 });
16162
16163 // determine whether or not we're currently in the position where a class property would appear
16164 instance.extend("isClassProperty", function (inner) {
16165 return function () {
16166 return this.match(types.colon) || inner.call(this);
16167 };
16168 });
16169
16170 instance.extend("isNonstaticConstructor", function (inner) {
16171 return function (method) {
16172 return !this.match(types.colon) && inner.call(this, method);
16173 };
16174 });
16175
16176 // parse type parameters for class methods
16177 instance.extend("parseClassMethod", function (inner) {
16178 return function (classBody, method) {
16179 if (method.variance) {
16180 this.unexpected(method.variancePos);
16181 }
16182 delete method.variance;
16183 delete method.variancePos;
16184 if (this.isRelational("<")) {
16185 method.typeParameters = this.flowParseTypeParameterDeclaration();
16186 }
16187
16188 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
16189 args[_key2 - 2] = arguments[_key2];
16190 }
16191
16192 inner.call.apply(inner, [this, classBody, method].concat(args));
16193 };
16194 });
16195
16196 // parse a the super class type parameters and implements
16197 instance.extend("parseClassSuper", function (inner) {
16198 return function (node, isStatement) {
16199 inner.call(this, node, isStatement);
16200 if (node.superClass && this.isRelational("<")) {
16201 node.superTypeParameters = this.flowParseTypeParameterInstantiation();
16202 }
16203 if (this.isContextual("implements")) {
16204 this.next();
16205 var implemented = node.implements = [];
16206 do {
16207 var _node = this.startNode();
16208 _node.id = this.parseIdentifier();
16209 if (this.isRelational("<")) {
16210 _node.typeParameters = this.flowParseTypeParameterInstantiation();
16211 } else {
16212 _node.typeParameters = null;
16213 }
16214 implemented.push(this.finishNode(_node, "ClassImplements"));
16215 } while (this.eat(types.comma));
16216 }
16217 };
16218 });
16219
16220 instance.extend("parsePropertyName", function (inner) {
16221 return function (node) {
16222 var variancePos = this.state.start;
16223 var variance = this.flowParseVariance();
16224 var key = inner.call(this, node);
16225 node.variance = variance;
16226 node.variancePos = variancePos;
16227 return key;
16228 };
16229 });
16230
16231 // parse type parameters for object method shorthand
16232 instance.extend("parseObjPropValue", function (inner) {
16233 return function (prop) {
16234 if (prop.variance) {
16235 this.unexpected(prop.variancePos);
16236 }
16237 delete prop.variance;
16238 delete prop.variancePos;
16239
16240 var typeParameters = void 0;
16241
16242 // method shorthand
16243 if (this.isRelational("<")) {
16244 typeParameters = this.flowParseTypeParameterDeclaration();
16245 if (!this.match(types.parenL)) this.unexpected();
16246 }
16247
16248 inner.apply(this, arguments);
16249
16250 // add typeParameters if we found them
16251 if (typeParameters) {
16252 (prop.value || prop).typeParameters = typeParameters;
16253 }
16254 };
16255 });
16256
16257 instance.extend("parseAssignableListItemTypes", function () {
16258 return function (param) {
16259 if (this.eat(types.question)) {
16260 param.optional = true;
16261 }
16262 if (this.match(types.colon)) {
16263 param.typeAnnotation = this.flowParseTypeAnnotation();
16264 }
16265 this.finishNode(param, param.type);
16266 return param;
16267 };
16268 });
16269
16270 instance.extend("parseMaybeDefault", function (inner) {
16271 return function () {
16272 for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
16273 args[_key3] = arguments[_key3];
16274 }
16275
16276 var node = inner.apply(this, args);
16277
16278 if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
16279 this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`");
16280 }
16281
16282 return node;
16283 };
16284 });
16285
16286 // parse typeof and type imports
16287 instance.extend("parseImportSpecifiers", function (inner) {
16288 return function (node) {
16289 node.importKind = "value";
16290
16291 var kind = null;
16292 if (this.match(types._typeof)) {
16293 kind = "typeof";
16294 } else if (this.isContextual("type")) {
16295 kind = "type";
16296 }
16297 if (kind) {
16298 var lh = this.lookahead();
16299 if (lh.type === types.name && lh.value !== "from" || lh.type === types.braceL || lh.type === types.star) {
16300 this.next();
16301 node.importKind = kind;
16302 }
16303 }
16304
16305 inner.call(this, node);
16306 };
16307 });
16308
16309 // parse import-type/typeof shorthand
16310 instance.extend("parseImportSpecifier", function () {
16311 return function (node) {
16312 var specifier = this.startNode();
16313 var firstIdentLoc = this.state.start;
16314 var firstIdent = this.parseIdentifier(true);
16315
16316 var specifierTypeKind = null;
16317 if (firstIdent.name === "type") {
16318 specifierTypeKind = "type";
16319 } else if (firstIdent.name === "typeof") {
16320 specifierTypeKind = "typeof";
16321 }
16322
16323 var isBinding = false;
16324 if (this.isContextual("as")) {
16325 var as_ident = this.parseIdentifier(true);
16326 if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {
16327 // `import {type as ,` or `import {type as }`
16328 specifier.imported = as_ident;
16329 specifier.importKind = specifierTypeKind;
16330 specifier.local = as_ident.__clone();
16331 } else {
16332 // `import {type as foo`
16333 specifier.imported = firstIdent;
16334 specifier.importKind = null;
16335 specifier.local = this.parseIdentifier();
16336 }
16337 } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {
16338 // `import {type foo`
16339 specifier.imported = this.parseIdentifier(true);
16340 specifier.importKind = specifierTypeKind;
16341 if (this.eatContextual("as")) {
16342 specifier.local = this.parseIdentifier();
16343 } else {
16344 isBinding = true;
16345 specifier.local = specifier.imported.__clone();
16346 }
16347 } else {
16348 isBinding = true;
16349 specifier.imported = firstIdent;
16350 specifier.importKind = null;
16351 specifier.local = specifier.imported.__clone();
16352 }
16353
16354 if ((node.importKind === "type" || node.importKind === "typeof") && (specifier.importKind === "type" || specifier.importKind === "typeof")) {
16355 this.raise(firstIdentLoc, "`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`");
16356 }
16357
16358 if (isBinding) this.checkReservedWord(specifier.local.name, specifier.start, true, true);
16359
16360 this.checkLVal(specifier.local, true, undefined, "import specifier");
16361 node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
16362 };
16363 });
16364
16365 // parse function type parameters - function foo<T>() {}
16366 instance.extend("parseFunctionParams", function (inner) {
16367 return function (node) {
16368 if (this.isRelational("<")) {
16369 node.typeParameters = this.flowParseTypeParameterDeclaration();
16370 }
16371 inner.call(this, node);
16372 };
16373 });
16374
16375 // parse flow type annotations on variable declarator heads - let foo: string = bar
16376 instance.extend("parseVarHead", function (inner) {
16377 return function (decl) {
16378 inner.call(this, decl);
16379 if (this.match(types.colon)) {
16380 decl.id.typeAnnotation = this.flowParseTypeAnnotation();
16381 this.finishNode(decl.id, decl.id.type);
16382 }
16383 };
16384 });
16385
16386 // parse the return type of an async arrow function - let foo = (async (): number => {});
16387 instance.extend("parseAsyncArrowFromCallExpression", function (inner) {
16388 return function (node, call) {
16389 if (this.match(types.colon)) {
16390 var oldNoAnonFunctionType = this.state.noAnonFunctionType;
16391 this.state.noAnonFunctionType = true;
16392 node.returnType = this.flowParseTypeAnnotation();
16393 this.state.noAnonFunctionType = oldNoAnonFunctionType;
16394 }
16395
16396 return inner.call(this, node, call);
16397 };
16398 });
16399
16400 // todo description
16401 instance.extend("shouldParseAsyncArrow", function (inner) {
16402 return function () {
16403 return this.match(types.colon) || inner.call(this);
16404 };
16405 });
16406
16407 // We need to support type parameter declarations for arrow functions. This
16408 // is tricky. There are three situations we need to handle
16409 //
16410 // 1. This is either JSX or an arrow function. We'll try JSX first. If that
16411 // fails, we'll try an arrow function. If that fails, we'll throw the JSX
16412 // error.
16413 // 2. This is an arrow function. We'll parse the type parameter declaration,
16414 // parse the rest, make sure the rest is an arrow function, and go from
16415 // there
16416 // 3. This is neither. Just call the inner function
16417 instance.extend("parseMaybeAssign", function (inner) {
16418 return function () {
16419 var jsxError = null;
16420
16421 for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
16422 args[_key4] = arguments[_key4];
16423 }
16424
16425 if (types.jsxTagStart && this.match(types.jsxTagStart)) {
16426 var state = this.state.clone();
16427 try {
16428 return inner.apply(this, args);
16429 } catch (err) {
16430 if (err instanceof SyntaxError) {
16431 this.state = state;
16432
16433 // Remove `tc.j_expr` and `tc.j_oTag` from context added
16434 // by parsing `jsxTagStart` to stop the JSX plugin from
16435 // messing with the tokens
16436 this.state.context.length -= 2;
16437
16438 jsxError = err;
16439 } else {
16440 // istanbul ignore next: no such error is expected
16441 throw err;
16442 }
16443 }
16444 }
16445
16446 if (jsxError != null || this.isRelational("<")) {
16447 var arrowExpression = void 0;
16448 var typeParameters = void 0;
16449 try {
16450 typeParameters = this.flowParseTypeParameterDeclaration();
16451
16452 arrowExpression = inner.apply(this, args);
16453 arrowExpression.typeParameters = typeParameters;
16454 arrowExpression.start = typeParameters.start;
16455 arrowExpression.loc.start = typeParameters.loc.start;
16456 } catch (err) {
16457 throw jsxError || err;
16458 }
16459
16460 if (arrowExpression.type === "ArrowFunctionExpression") {
16461 return arrowExpression;
16462 } else if (jsxError != null) {
16463 throw jsxError;
16464 } else {
16465 this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration");
16466 }
16467 }
16468
16469 return inner.apply(this, args);
16470 };
16471 });
16472
16473 // handle return types for arrow functions
16474 instance.extend("parseArrow", function (inner) {
16475 return function (node) {
16476 if (this.match(types.colon)) {
16477 var state = this.state.clone();
16478 try {
16479 var oldNoAnonFunctionType = this.state.noAnonFunctionType;
16480 this.state.noAnonFunctionType = true;
16481 var returnType = this.flowParseTypeAndPredicateAnnotation();
16482 this.state.noAnonFunctionType = oldNoAnonFunctionType;
16483
16484 if (this.canInsertSemicolon()) this.unexpected();
16485 if (!this.match(types.arrow)) this.unexpected();
16486 // assign after it is clear it is an arrow
16487 node.returnType = returnType;
16488 } catch (err) {
16489 if (err instanceof SyntaxError) {
16490 this.state = state;
16491 } else {
16492 // istanbul ignore next: no such error is expected
16493 throw err;
16494 }
16495 }
16496 }
16497
16498 return inner.call(this, node);
16499 };
16500 });
16501
16502 instance.extend("shouldParseArrow", function (inner) {
16503 return function () {
16504 return this.match(types.colon) || inner.call(this);
16505 };
16506 });
16507 };
16508
16509 // Adapted from String.fromcodepoint to export the function without modifying String
16510 /*! https://mths.be/fromcodepoint v0.2.1 by @mathias */
16511
16512 // The MIT License (MIT)
16513 // Copyright (c) Mathias Bynens
16514 //
16515 // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
16516 // associated documentation files (the "Software"), to deal in the Software without restriction,
16517 // including without limitation the rights to use, copy, modify, merge, publish, distribute,
16518 // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
16519 // furnished to do so, subject to the following conditions:
16520 //
16521 // The above copyright notice and this permission notice shall be included in all copies or
16522 // substantial portions of the Software.
16523 //
16524 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
16525 // NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16526 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16527 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16528 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16529
16530 var fromCodePoint = String.fromCodePoint;
16531
16532 if (!fromCodePoint) {
16533 var stringFromCharCode = String.fromCharCode;
16534 var floor = Math.floor;
16535 fromCodePoint = function fromCodePoint() {
16536 var MAX_SIZE = 0x4000;
16537 var codeUnits = [];
16538 var highSurrogate = void 0;
16539 var lowSurrogate = void 0;
16540 var index = -1;
16541 var length = arguments.length;
16542 if (!length) {
16543 return "";
16544 }
16545 var result = "";
16546 while (++index < length) {
16547 var codePoint = Number(arguments[index]);
16548 if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
16549 codePoint < 0 || // not a valid Unicode code point
16550 codePoint > 0x10FFFF || // not a valid Unicode code point
16551 floor(codePoint) != codePoint // not an integer
16552 ) {
16553 throw RangeError("Invalid code point: " + codePoint);
16554 }
16555 if (codePoint <= 0xFFFF) {
16556 // BMP code point
16557 codeUnits.push(codePoint);
16558 } else {
16559 // Astral code point; split in surrogate halves
16560 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
16561 codePoint -= 0x10000;
16562 highSurrogate = (codePoint >> 10) + 0xD800;
16563 lowSurrogate = codePoint % 0x400 + 0xDC00;
16564 codeUnits.push(highSurrogate, lowSurrogate);
16565 }
16566 if (index + 1 == length || codeUnits.length > MAX_SIZE) {
16567 result += stringFromCharCode.apply(null, codeUnits);
16568 codeUnits.length = 0;
16569 }
16570 }
16571 return result;
16572 };
16573 }
16574
16575 var fromCodePoint$1 = fromCodePoint;
16576
16577 var XHTMLEntities = {
16578 quot: "\"",
16579 amp: "&",
16580 apos: "'",
16581 lt: "<",
16582 gt: ">",
16583 nbsp: "\xA0",
16584 iexcl: "\xA1",
16585 cent: "\xA2",
16586 pound: "\xA3",
16587 curren: "\xA4",
16588 yen: "\xA5",
16589 brvbar: "\xA6",
16590 sect: "\xA7",
16591 uml: "\xA8",
16592 copy: "\xA9",
16593 ordf: "\xAA",
16594 laquo: "\xAB",
16595 not: "\xAC",
16596 shy: "\xAD",
16597 reg: "\xAE",
16598 macr: "\xAF",
16599 deg: "\xB0",
16600 plusmn: "\xB1",
16601 sup2: "\xB2",
16602 sup3: "\xB3",
16603 acute: "\xB4",
16604 micro: "\xB5",
16605 para: "\xB6",
16606 middot: "\xB7",
16607 cedil: "\xB8",
16608 sup1: "\xB9",
16609 ordm: "\xBA",
16610 raquo: "\xBB",
16611 frac14: "\xBC",
16612 frac12: "\xBD",
16613 frac34: "\xBE",
16614 iquest: "\xBF",
16615 Agrave: "\xC0",
16616 Aacute: "\xC1",
16617 Acirc: "\xC2",
16618 Atilde: "\xC3",
16619 Auml: "\xC4",
16620 Aring: "\xC5",
16621 AElig: "\xC6",
16622 Ccedil: "\xC7",
16623 Egrave: "\xC8",
16624 Eacute: "\xC9",
16625 Ecirc: "\xCA",
16626 Euml: "\xCB",
16627 Igrave: "\xCC",
16628 Iacute: "\xCD",
16629 Icirc: "\xCE",
16630 Iuml: "\xCF",
16631 ETH: "\xD0",
16632 Ntilde: "\xD1",
16633 Ograve: "\xD2",
16634 Oacute: "\xD3",
16635 Ocirc: "\xD4",
16636 Otilde: "\xD5",
16637 Ouml: "\xD6",
16638 times: "\xD7",
16639 Oslash: "\xD8",
16640 Ugrave: "\xD9",
16641 Uacute: "\xDA",
16642 Ucirc: "\xDB",
16643 Uuml: "\xDC",
16644 Yacute: "\xDD",
16645 THORN: "\xDE",
16646 szlig: "\xDF",
16647 agrave: "\xE0",
16648 aacute: "\xE1",
16649 acirc: "\xE2",
16650 atilde: "\xE3",
16651 auml: "\xE4",
16652 aring: "\xE5",
16653 aelig: "\xE6",
16654 ccedil: "\xE7",
16655 egrave: "\xE8",
16656 eacute: "\xE9",
16657 ecirc: "\xEA",
16658 euml: "\xEB",
16659 igrave: "\xEC",
16660 iacute: "\xED",
16661 icirc: "\xEE",
16662 iuml: "\xEF",
16663 eth: "\xF0",
16664 ntilde: "\xF1",
16665 ograve: "\xF2",
16666 oacute: "\xF3",
16667 ocirc: "\xF4",
16668 otilde: "\xF5",
16669 ouml: "\xF6",
16670 divide: "\xF7",
16671 oslash: "\xF8",
16672 ugrave: "\xF9",
16673 uacute: "\xFA",
16674 ucirc: "\xFB",
16675 uuml: "\xFC",
16676 yacute: "\xFD",
16677 thorn: "\xFE",
16678 yuml: "\xFF",
16679 OElig: '\u0152',
16680 oelig: '\u0153',
16681 Scaron: '\u0160',
16682 scaron: '\u0161',
16683 Yuml: '\u0178',
16684 fnof: '\u0192',
16685 circ: '\u02C6',
16686 tilde: '\u02DC',
16687 Alpha: '\u0391',
16688 Beta: '\u0392',
16689 Gamma: '\u0393',
16690 Delta: '\u0394',
16691 Epsilon: '\u0395',
16692 Zeta: '\u0396',
16693 Eta: '\u0397',
16694 Theta: '\u0398',
16695 Iota: '\u0399',
16696 Kappa: '\u039A',
16697 Lambda: '\u039B',
16698 Mu: '\u039C',
16699 Nu: '\u039D',
16700 Xi: '\u039E',
16701 Omicron: '\u039F',
16702 Pi: '\u03A0',
16703 Rho: '\u03A1',
16704 Sigma: '\u03A3',
16705 Tau: '\u03A4',
16706 Upsilon: '\u03A5',
16707 Phi: '\u03A6',
16708 Chi: '\u03A7',
16709 Psi: '\u03A8',
16710 Omega: '\u03A9',
16711 alpha: '\u03B1',
16712 beta: '\u03B2',
16713 gamma: '\u03B3',
16714 delta: '\u03B4',
16715 epsilon: '\u03B5',
16716 zeta: '\u03B6',
16717 eta: '\u03B7',
16718 theta: '\u03B8',
16719 iota: '\u03B9',
16720 kappa: '\u03BA',
16721 lambda: '\u03BB',
16722 mu: '\u03BC',
16723 nu: '\u03BD',
16724 xi: '\u03BE',
16725 omicron: '\u03BF',
16726 pi: '\u03C0',
16727 rho: '\u03C1',
16728 sigmaf: '\u03C2',
16729 sigma: '\u03C3',
16730 tau: '\u03C4',
16731 upsilon: '\u03C5',
16732 phi: '\u03C6',
16733 chi: '\u03C7',
16734 psi: '\u03C8',
16735 omega: '\u03C9',
16736 thetasym: '\u03D1',
16737 upsih: '\u03D2',
16738 piv: '\u03D6',
16739 ensp: '\u2002',
16740 emsp: '\u2003',
16741 thinsp: '\u2009',
16742 zwnj: '\u200C',
16743 zwj: '\u200D',
16744 lrm: '\u200E',
16745 rlm: '\u200F',
16746 ndash: '\u2013',
16747 mdash: '\u2014',
16748 lsquo: '\u2018',
16749 rsquo: '\u2019',
16750 sbquo: '\u201A',
16751 ldquo: '\u201C',
16752 rdquo: '\u201D',
16753 bdquo: '\u201E',
16754 dagger: '\u2020',
16755 Dagger: '\u2021',
16756 bull: '\u2022',
16757 hellip: '\u2026',
16758 permil: '\u2030',
16759 prime: '\u2032',
16760 Prime: '\u2033',
16761 lsaquo: '\u2039',
16762 rsaquo: '\u203A',
16763 oline: '\u203E',
16764 frasl: '\u2044',
16765 euro: '\u20AC',
16766 image: '\u2111',
16767 weierp: '\u2118',
16768 real: '\u211C',
16769 trade: '\u2122',
16770 alefsym: '\u2135',
16771 larr: '\u2190',
16772 uarr: '\u2191',
16773 rarr: '\u2192',
16774 darr: '\u2193',
16775 harr: '\u2194',
16776 crarr: '\u21B5',
16777 lArr: '\u21D0',
16778 uArr: '\u21D1',
16779 rArr: '\u21D2',
16780 dArr: '\u21D3',
16781 hArr: '\u21D4',
16782 forall: '\u2200',
16783 part: '\u2202',
16784 exist: '\u2203',
16785 empty: '\u2205',
16786 nabla: '\u2207',
16787 isin: '\u2208',
16788 notin: '\u2209',
16789 ni: '\u220B',
16790 prod: '\u220F',
16791 sum: '\u2211',
16792 minus: '\u2212',
16793 lowast: '\u2217',
16794 radic: '\u221A',
16795 prop: '\u221D',
16796 infin: '\u221E',
16797 ang: '\u2220',
16798 and: '\u2227',
16799 or: '\u2228',
16800 cap: '\u2229',
16801 cup: '\u222A',
16802 "int": '\u222B',
16803 there4: '\u2234',
16804 sim: '\u223C',
16805 cong: '\u2245',
16806 asymp: '\u2248',
16807 ne: '\u2260',
16808 equiv: '\u2261',
16809 le: '\u2264',
16810 ge: '\u2265',
16811 sub: '\u2282',
16812 sup: '\u2283',
16813 nsub: '\u2284',
16814 sube: '\u2286',
16815 supe: '\u2287',
16816 oplus: '\u2295',
16817 otimes: '\u2297',
16818 perp: '\u22A5',
16819 sdot: '\u22C5',
16820 lceil: '\u2308',
16821 rceil: '\u2309',
16822 lfloor: '\u230A',
16823 rfloor: '\u230B',
16824 lang: '\u2329',
16825 rang: '\u232A',
16826 loz: '\u25CA',
16827 spades: '\u2660',
16828 clubs: '\u2663',
16829 hearts: '\u2665',
16830 diams: '\u2666'
16831 };
16832
16833 var HEX_NUMBER = /^[\da-fA-F]+$/;
16834 var DECIMAL_NUMBER = /^\d+$/;
16835
16836 types$1.j_oTag = new TokContext("<tag", false);
16837 types$1.j_cTag = new TokContext("</tag", false);
16838 types$1.j_expr = new TokContext("<tag>...</tag>", true, true);
16839
16840 types.jsxName = new TokenType("jsxName");
16841 types.jsxText = new TokenType("jsxText", { beforeExpr: true });
16842 types.jsxTagStart = new TokenType("jsxTagStart", { startsExpr: true });
16843 types.jsxTagEnd = new TokenType("jsxTagEnd");
16844
16845 types.jsxTagStart.updateContext = function () {
16846 this.state.context.push(types$1.j_expr); // treat as beginning of JSX expression
16847 this.state.context.push(types$1.j_oTag); // start opening tag context
16848 this.state.exprAllowed = false;
16849 };
16850
16851 types.jsxTagEnd.updateContext = function (prevType) {
16852 var out = this.state.context.pop();
16853 if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) {
16854 this.state.context.pop();
16855 this.state.exprAllowed = this.curContext() === types$1.j_expr;
16856 } else {
16857 this.state.exprAllowed = true;
16858 }
16859 };
16860
16861 var pp$9 = Parser.prototype;
16862
16863 // Reads inline JSX contents token.
16864
16865 pp$9.jsxReadToken = function () {
16866 var out = "";
16867 var chunkStart = this.state.pos;
16868 for (;;) {
16869 if (this.state.pos >= this.input.length) {
16870 this.raise(this.state.start, "Unterminated JSX contents");
16871 }
16872
16873 var ch = this.input.charCodeAt(this.state.pos);
16874
16875 switch (ch) {
16876 case 60: // "<"
16877 case 123:
16878 // "{"
16879 if (this.state.pos === this.state.start) {
16880 if (ch === 60 && this.state.exprAllowed) {
16881 ++this.state.pos;
16882 return this.finishToken(types.jsxTagStart);
16883 }
16884 return this.getTokenFromCode(ch);
16885 }
16886 out += this.input.slice(chunkStart, this.state.pos);
16887 return this.finishToken(types.jsxText, out);
16888
16889 case 38:
16890 // "&"
16891 out += this.input.slice(chunkStart, this.state.pos);
16892 out += this.jsxReadEntity();
16893 chunkStart = this.state.pos;
16894 break;
16895
16896 default:
16897 if (isNewLine(ch)) {
16898 out += this.input.slice(chunkStart, this.state.pos);
16899 out += this.jsxReadNewLine(true);
16900 chunkStart = this.state.pos;
16901 } else {
16902 ++this.state.pos;
16903 }
16904 }
16905 }
16906 };
16907
16908 pp$9.jsxReadNewLine = function (normalizeCRLF) {
16909 var ch = this.input.charCodeAt(this.state.pos);
16910 var out = void 0;
16911 ++this.state.pos;
16912 if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
16913 ++this.state.pos;
16914 out = normalizeCRLF ? "\n" : "\r\n";
16915 } else {
16916 out = String.fromCharCode(ch);
16917 }
16918 ++this.state.curLine;
16919 this.state.lineStart = this.state.pos;
16920
16921 return out;
16922 };
16923
16924 pp$9.jsxReadString = function (quote) {
16925 var out = "";
16926 var chunkStart = ++this.state.pos;
16927 for (;;) {
16928 if (this.state.pos >= this.input.length) {
16929 this.raise(this.state.start, "Unterminated string constant");
16930 }
16931
16932 var ch = this.input.charCodeAt(this.state.pos);
16933 if (ch === quote) break;
16934 if (ch === 38) {
16935 // "&"
16936 out += this.input.slice(chunkStart, this.state.pos);
16937 out += this.jsxReadEntity();
16938 chunkStart = this.state.pos;
16939 } else if (isNewLine(ch)) {
16940 out += this.input.slice(chunkStart, this.state.pos);
16941 out += this.jsxReadNewLine(false);
16942 chunkStart = this.state.pos;
16943 } else {
16944 ++this.state.pos;
16945 }
16946 }
16947 out += this.input.slice(chunkStart, this.state.pos++);
16948 return this.finishToken(types.string, out);
16949 };
16950
16951 pp$9.jsxReadEntity = function () {
16952 var str = "";
16953 var count = 0;
16954 var entity = void 0;
16955 var ch = this.input[this.state.pos];
16956
16957 var startPos = ++this.state.pos;
16958 while (this.state.pos < this.input.length && count++ < 10) {
16959 ch = this.input[this.state.pos++];
16960 if (ch === ";") {
16961 if (str[0] === "#") {
16962 if (str[1] === "x") {
16963 str = str.substr(2);
16964 if (HEX_NUMBER.test(str)) entity = fromCodePoint$1(parseInt(str, 16));
16965 } else {
16966 str = str.substr(1);
16967 if (DECIMAL_NUMBER.test(str)) entity = fromCodePoint$1(parseInt(str, 10));
16968 }
16969 } else {
16970 entity = XHTMLEntities[str];
16971 }
16972 break;
16973 }
16974 str += ch;
16975 }
16976 if (!entity) {
16977 this.state.pos = startPos;
16978 return "&";
16979 }
16980 return entity;
16981 };
16982
16983 // Read a JSX identifier (valid tag or attribute name).
16984 //
16985 // Optimized version since JSX identifiers can"t contain
16986 // escape characters and so can be read as single slice.
16987 // Also assumes that first character was already checked
16988 // by isIdentifierStart in readToken.
16989
16990 pp$9.jsxReadWord = function () {
16991 var ch = void 0;
16992 var start = this.state.pos;
16993 do {
16994 ch = this.input.charCodeAt(++this.state.pos);
16995 } while (isIdentifierChar(ch) || ch === 45); // "-"
16996 return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos));
16997 };
16998
16999 // Transforms JSX element name to string.
17000
17001 function getQualifiedJSXName(object) {
17002 if (object.type === "JSXIdentifier") {
17003 return object.name;
17004 }
17005
17006 if (object.type === "JSXNamespacedName") {
17007 return object.namespace.name + ":" + object.name.name;
17008 }
17009
17010 if (object.type === "JSXMemberExpression") {
17011 return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
17012 }
17013 }
17014
17015 // Parse next token as JSX identifier
17016
17017 pp$9.jsxParseIdentifier = function () {
17018 var node = this.startNode();
17019 if (this.match(types.jsxName)) {
17020 node.name = this.state.value;
17021 } else if (this.state.type.keyword) {
17022 node.name = this.state.type.keyword;
17023 } else {
17024 this.unexpected();
17025 }
17026 this.next();
17027 return this.finishNode(node, "JSXIdentifier");
17028 };
17029
17030 // Parse namespaced identifier.
17031
17032 pp$9.jsxParseNamespacedName = function () {
17033 var startPos = this.state.start;
17034 var startLoc = this.state.startLoc;
17035 var name = this.jsxParseIdentifier();
17036 if (!this.eat(types.colon)) return name;
17037
17038 var node = this.startNodeAt(startPos, startLoc);
17039 node.namespace = name;
17040 node.name = this.jsxParseIdentifier();
17041 return this.finishNode(node, "JSXNamespacedName");
17042 };
17043
17044 // Parses element name in any form - namespaced, member
17045 // or single identifier.
17046
17047 pp$9.jsxParseElementName = function () {
17048 var startPos = this.state.start;
17049 var startLoc = this.state.startLoc;
17050 var node = this.jsxParseNamespacedName();
17051 while (this.eat(types.dot)) {
17052 var newNode = this.startNodeAt(startPos, startLoc);
17053 newNode.object = node;
17054 newNode.property = this.jsxParseIdentifier();
17055 node = this.finishNode(newNode, "JSXMemberExpression");
17056 }
17057 return node;
17058 };
17059
17060 // Parses any type of JSX attribute value.
17061
17062 pp$9.jsxParseAttributeValue = function () {
17063 var node = void 0;
17064 switch (this.state.type) {
17065 case types.braceL:
17066 node = this.jsxParseExpressionContainer();
17067 if (node.expression.type === "JSXEmptyExpression") {
17068 this.raise(node.start, "JSX attributes must only be assigned a non-empty expression");
17069 } else {
17070 return node;
17071 }
17072
17073 case types.jsxTagStart:
17074 case types.string:
17075 node = this.parseExprAtom();
17076 node.extra = null;
17077 return node;
17078
17079 default:
17080 this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text");
17081 }
17082 };
17083
17084 // JSXEmptyExpression is unique type since it doesn't actually parse anything,
17085 // and so it should start at the end of last read token (left brace) and finish
17086 // at the beginning of the next one (right brace).
17087
17088 pp$9.jsxParseEmptyExpression = function () {
17089 var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
17090 return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
17091 };
17092
17093 // Parse JSX spread child
17094
17095 pp$9.jsxParseSpreadChild = function () {
17096 var node = this.startNode();
17097 this.expect(types.braceL);
17098 this.expect(types.ellipsis);
17099 node.expression = this.parseExpression();
17100 this.expect(types.braceR);
17101
17102 return this.finishNode(node, "JSXSpreadChild");
17103 };
17104
17105 // Parses JSX expression enclosed into curly brackets.
17106
17107
17108 pp$9.jsxParseExpressionContainer = function () {
17109 var node = this.startNode();
17110 this.next();
17111 if (this.match(types.braceR)) {
17112 node.expression = this.jsxParseEmptyExpression();
17113 } else {
17114 node.expression = this.parseExpression();
17115 }
17116 this.expect(types.braceR);
17117 return this.finishNode(node, "JSXExpressionContainer");
17118 };
17119
17120 // Parses following JSX attribute name-value pair.
17121
17122 pp$9.jsxParseAttribute = function () {
17123 var node = this.startNode();
17124 if (this.eat(types.braceL)) {
17125 this.expect(types.ellipsis);
17126 node.argument = this.parseMaybeAssign();
17127 this.expect(types.braceR);
17128 return this.finishNode(node, "JSXSpreadAttribute");
17129 }
17130 node.name = this.jsxParseNamespacedName();
17131 node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null;
17132 return this.finishNode(node, "JSXAttribute");
17133 };
17134
17135 // Parses JSX opening tag starting after "<".
17136
17137 pp$9.jsxParseOpeningElementAt = function (startPos, startLoc) {
17138 var node = this.startNodeAt(startPos, startLoc);
17139 node.attributes = [];
17140 node.name = this.jsxParseElementName();
17141 while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) {
17142 node.attributes.push(this.jsxParseAttribute());
17143 }
17144 node.selfClosing = this.eat(types.slash);
17145 this.expect(types.jsxTagEnd);
17146 return this.finishNode(node, "JSXOpeningElement");
17147 };
17148
17149 // Parses JSX closing tag starting after "</".
17150
17151 pp$9.jsxParseClosingElementAt = function (startPos, startLoc) {
17152 var node = this.startNodeAt(startPos, startLoc);
17153 node.name = this.jsxParseElementName();
17154 this.expect(types.jsxTagEnd);
17155 return this.finishNode(node, "JSXClosingElement");
17156 };
17157
17158 // Parses entire JSX element, including it"s opening tag
17159 // (starting after "<"), attributes, contents and closing tag.
17160
17161 pp$9.jsxParseElementAt = function (startPos, startLoc) {
17162 var node = this.startNodeAt(startPos, startLoc);
17163 var children = [];
17164 var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
17165 var closingElement = null;
17166
17167 if (!openingElement.selfClosing) {
17168 contents: for (;;) {
17169 switch (this.state.type) {
17170 case types.jsxTagStart:
17171 startPos = this.state.start;startLoc = this.state.startLoc;
17172 this.next();
17173 if (this.eat(types.slash)) {
17174 closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
17175 break contents;
17176 }
17177 children.push(this.jsxParseElementAt(startPos, startLoc));
17178 break;
17179
17180 case types.jsxText:
17181 children.push(this.parseExprAtom());
17182 break;
17183
17184 case types.braceL:
17185 if (this.lookahead().type === types.ellipsis) {
17186 children.push(this.jsxParseSpreadChild());
17187 } else {
17188 children.push(this.jsxParseExpressionContainer());
17189 }
17190
17191 break;
17192
17193 // istanbul ignore next - should never happen
17194 default:
17195 this.unexpected();
17196 }
17197 }
17198
17199 if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
17200 this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
17201 }
17202 }
17203
17204 node.openingElement = openingElement;
17205 node.closingElement = closingElement;
17206 node.children = children;
17207 if (this.match(types.relational) && this.state.value === "<") {
17208 this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
17209 }
17210 return this.finishNode(node, "JSXElement");
17211 };
17212
17213 // Parses entire JSX element from current position.
17214
17215 pp$9.jsxParseElement = function () {
17216 var startPos = this.state.start;
17217 var startLoc = this.state.startLoc;
17218 this.next();
17219 return this.jsxParseElementAt(startPos, startLoc);
17220 };
17221
17222 var jsxPlugin = function jsxPlugin(instance) {
17223 instance.extend("parseExprAtom", function (inner) {
17224 return function (refShortHandDefaultPos) {
17225 if (this.match(types.jsxText)) {
17226 var node = this.parseLiteral(this.state.value, "JSXText");
17227 // https://github.com/babel/babel/issues/2078
17228 node.extra = null;
17229 return node;
17230 } else if (this.match(types.jsxTagStart)) {
17231 return this.jsxParseElement();
17232 } else {
17233 return inner.call(this, refShortHandDefaultPos);
17234 }
17235 };
17236 });
17237
17238 instance.extend("readToken", function (inner) {
17239 return function (code) {
17240 if (this.state.inPropertyName) return inner.call(this, code);
17241
17242 var context = this.curContext();
17243
17244 if (context === types$1.j_expr) {
17245 return this.jsxReadToken();
17246 }
17247
17248 if (context === types$1.j_oTag || context === types$1.j_cTag) {
17249 if (isIdentifierStart(code)) {
17250 return this.jsxReadWord();
17251 }
17252
17253 if (code === 62) {
17254 ++this.state.pos;
17255 return this.finishToken(types.jsxTagEnd);
17256 }
17257
17258 if ((code === 34 || code === 39) && context === types$1.j_oTag) {
17259 return this.jsxReadString(code);
17260 }
17261 }
17262
17263 if (code === 60 && this.state.exprAllowed) {
17264 ++this.state.pos;
17265 return this.finishToken(types.jsxTagStart);
17266 }
17267
17268 return inner.call(this, code);
17269 };
17270 });
17271
17272 instance.extend("updateContext", function (inner) {
17273 return function (prevType) {
17274 if (this.match(types.braceL)) {
17275 var curContext = this.curContext();
17276 if (curContext === types$1.j_oTag) {
17277 this.state.context.push(types$1.braceExpression);
17278 } else if (curContext === types$1.j_expr) {
17279 this.state.context.push(types$1.templateQuasi);
17280 } else {
17281 inner.call(this, prevType);
17282 }
17283 this.state.exprAllowed = true;
17284 } else if (this.match(types.slash) && prevType === types.jsxTagStart) {
17285 this.state.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
17286 this.state.context.push(types$1.j_cTag); // reconsider as closing tag context
17287 this.state.exprAllowed = false;
17288 } else {
17289 return inner.call(this, prevType);
17290 }
17291 };
17292 });
17293 };
17294
17295 plugins.estree = estreePlugin;
17296 plugins.flow = flowPlugin;
17297 plugins.jsx = jsxPlugin;
17298
17299 function parse(input, options) {
17300 return new Parser(options, input).parse();
17301 }
17302
17303 function parseExpression(input, options) {
17304 var parser = new Parser(options, input);
17305 if (parser.options.strictMode) {
17306 parser.state.strict = true;
17307 }
17308 return parser.getExpression();
17309 }
17310
17311 exports.parse = parse;
17312 exports.parseExpression = parseExpression;
17313 exports.tokTypes = types;
17314
17315/***/ }),
17316/* 90 */
17317/***/ (function(module, exports, __webpack_require__) {
17318
17319 'use strict';
17320
17321 // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
17322 var anObject = __webpack_require__(21);
17323 var dPs = __webpack_require__(431);
17324 var enumBugKeys = __webpack_require__(141);
17325 var IE_PROTO = __webpack_require__(150)('IE_PROTO');
17326 var Empty = function Empty() {/* empty */};
17327 var PROTOTYPE = 'prototype';
17328
17329 // Create object with fake `null` prototype: use iframe Object with cleared prototype
17330 var _createDict = function createDict() {
17331 // Thrash, waste and sodomy: IE GC bug
17332 var iframe = __webpack_require__(230)('iframe');
17333 var i = enumBugKeys.length;
17334 var lt = '<';
17335 var gt = '>';
17336 var iframeDocument;
17337 iframe.style.display = 'none';
17338 __webpack_require__(426).appendChild(iframe);
17339 iframe.src = 'javascript:'; // eslint-disable-line no-script-url
17340 // createDict = iframe.contentWindow.Object;
17341 // html.removeChild(iframe);
17342 iframeDocument = iframe.contentWindow.document;
17343 iframeDocument.open();
17344 iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
17345 iframeDocument.close();
17346 _createDict = iframeDocument.F;
17347 while (i--) {
17348 delete _createDict[PROTOTYPE][enumBugKeys[i]];
17349 }return _createDict();
17350 };
17351
17352 module.exports = Object.create || function create(O, Properties) {
17353 var result;
17354 if (O !== null) {
17355 Empty[PROTOTYPE] = anObject(O);
17356 result = new Empty();
17357 Empty[PROTOTYPE] = null;
17358 // add "__proto__" for Object.getPrototypeOf polyfill
17359 result[IE_PROTO] = O;
17360 } else result = _createDict();
17361 return Properties === undefined ? result : dPs(result, Properties);
17362 };
17363
17364/***/ }),
17365/* 91 */
17366/***/ (function(module, exports) {
17367
17368 "use strict";
17369
17370 exports.f = {}.propertyIsEnumerable;
17371
17372/***/ }),
17373/* 92 */
17374/***/ (function(module, exports) {
17375
17376 "use strict";
17377
17378 module.exports = function (bitmap, value) {
17379 return {
17380 enumerable: !(bitmap & 1),
17381 configurable: !(bitmap & 2),
17382 writable: !(bitmap & 4),
17383 value: value
17384 };
17385 };
17386
17387/***/ }),
17388/* 93 */
17389/***/ (function(module, exports, __webpack_require__) {
17390
17391 'use strict';
17392
17393 var def = __webpack_require__(23).f;
17394 var has = __webpack_require__(28);
17395 var TAG = __webpack_require__(13)('toStringTag');
17396
17397 module.exports = function (it, tag, stat) {
17398 if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
17399 };
17400
17401/***/ }),
17402/* 94 */
17403/***/ (function(module, exports, __webpack_require__) {
17404
17405 'use strict';
17406
17407 // 7.1.13 ToObject(argument)
17408 var defined = __webpack_require__(140);
17409 module.exports = function (it) {
17410 return Object(defined(it));
17411 };
17412
17413/***/ }),
17414/* 95 */
17415/***/ (function(module, exports) {
17416
17417 'use strict';
17418
17419 var id = 0;
17420 var px = Math.random();
17421 module.exports = function (key) {
17422 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
17423 };
17424
17425/***/ }),
17426/* 96 */
17427/***/ (function(module, exports) {
17428
17429 "use strict";
17430
17431/***/ }),
17432/* 97 */
17433/***/ (function(module, exports, __webpack_require__) {
17434
17435 'use strict';
17436
17437 /*
17438 Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
17439
17440 Redistribution and use in source and binary forms, with or without
17441 modification, are permitted provided that the following conditions are met:
17442
17443 * Redistributions of source code must retain the above copyright
17444 notice, this list of conditions and the following disclaimer.
17445 * Redistributions in binary form must reproduce the above copyright
17446 notice, this list of conditions and the following disclaimer in the
17447 documentation and/or other materials provided with the distribution.
17448
17449 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17450 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17451 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17452 ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
17453 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
17454 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17455 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
17456 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17457 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
17458 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17459 */
17460
17461 (function () {
17462 'use strict';
17463
17464 exports.ast = __webpack_require__(461);
17465 exports.code = __webpack_require__(240);
17466 exports.keyword = __webpack_require__(462);
17467 })();
17468 /* vim: set sw=4 ts=4 et tw=80 : */
17469
17470/***/ }),
17471/* 98 */
17472/***/ (function(module, exports, __webpack_require__) {
17473
17474 'use strict';
17475
17476 var listCacheClear = __webpack_require__(546),
17477 listCacheDelete = __webpack_require__(547),
17478 listCacheGet = __webpack_require__(548),
17479 listCacheHas = __webpack_require__(549),
17480 listCacheSet = __webpack_require__(550);
17481
17482 /**
17483 * Creates an list cache object.
17484 *
17485 * @private
17486 * @constructor
17487 * @param {Array} [entries] The key-value pairs to cache.
17488 */
17489 function ListCache(entries) {
17490 var index = -1,
17491 length = entries == null ? 0 : entries.length;
17492
17493 this.clear();
17494 while (++index < length) {
17495 var entry = entries[index];
17496 this.set(entry[0], entry[1]);
17497 }
17498 }
17499
17500 // Add methods to `ListCache`.
17501 ListCache.prototype.clear = listCacheClear;
17502 ListCache.prototype['delete'] = listCacheDelete;
17503 ListCache.prototype.get = listCacheGet;
17504 ListCache.prototype.has = listCacheHas;
17505 ListCache.prototype.set = listCacheSet;
17506
17507 module.exports = ListCache;
17508
17509/***/ }),
17510/* 99 */
17511/***/ (function(module, exports, __webpack_require__) {
17512
17513 'use strict';
17514
17515 var ListCache = __webpack_require__(98),
17516 stackClear = __webpack_require__(565),
17517 stackDelete = __webpack_require__(566),
17518 stackGet = __webpack_require__(567),
17519 stackHas = __webpack_require__(568),
17520 stackSet = __webpack_require__(569);
17521
17522 /**
17523 * Creates a stack cache object to store key-value pairs.
17524 *
17525 * @private
17526 * @constructor
17527 * @param {Array} [entries] The key-value pairs to cache.
17528 */
17529 function Stack(entries) {
17530 var data = this.__data__ = new ListCache(entries);
17531 this.size = data.size;
17532 }
17533
17534 // Add methods to `Stack`.
17535 Stack.prototype.clear = stackClear;
17536 Stack.prototype['delete'] = stackDelete;
17537 Stack.prototype.get = stackGet;
17538 Stack.prototype.has = stackHas;
17539 Stack.prototype.set = stackSet;
17540
17541 module.exports = Stack;
17542
17543/***/ }),
17544/* 100 */
17545/***/ (function(module, exports, __webpack_require__) {
17546
17547 'use strict';
17548
17549 var eq = __webpack_require__(46);
17550
17551 /**
17552 * Gets the index at which the `key` is found in `array` of key-value pairs.
17553 *
17554 * @private
17555 * @param {Array} array The array to inspect.
17556 * @param {*} key The key to search for.
17557 * @returns {number} Returns the index of the matched value, else `-1`.
17558 */
17559 function assocIndexOf(array, key) {
17560 var length = array.length;
17561 while (length--) {
17562 if (eq(array[length][0], key)) {
17563 return length;
17564 }
17565 }
17566 return -1;
17567 }
17568
17569 module.exports = assocIndexOf;
17570
17571/***/ }),
17572/* 101 */
17573/***/ (function(module, exports, __webpack_require__) {
17574
17575 'use strict';
17576
17577 var identity = __webpack_require__(110),
17578 overRest = __webpack_require__(560),
17579 setToString = __webpack_require__(563);
17580
17581 /**
17582 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
17583 *
17584 * @private
17585 * @param {Function} func The function to apply a rest parameter to.
17586 * @param {number} [start=func.length-1] The start position of the rest parameter.
17587 * @returns {Function} Returns the new function.
17588 */
17589 function baseRest(func, start) {
17590 return setToString(overRest(func, start, identity), func + '');
17591 }
17592
17593 module.exports = baseRest;
17594
17595/***/ }),
17596/* 102 */
17597/***/ (function(module, exports) {
17598
17599 "use strict";
17600
17601 /**
17602 * The base implementation of `_.unary` without support for storing metadata.
17603 *
17604 * @private
17605 * @param {Function} func The function to cap arguments for.
17606 * @returns {Function} Returns the new capped function.
17607 */
17608 function baseUnary(func) {
17609 return function (value) {
17610 return func(value);
17611 };
17612 }
17613
17614 module.exports = baseUnary;
17615
17616/***/ }),
17617/* 103 */
17618/***/ (function(module, exports, __webpack_require__) {
17619
17620 'use strict';
17621
17622 var baseRest = __webpack_require__(101),
17623 isIterateeCall = __webpack_require__(172);
17624
17625 /**
17626 * Creates a function like `_.assign`.
17627 *
17628 * @private
17629 * @param {Function} assigner The function to assign values.
17630 * @returns {Function} Returns the new assigner function.
17631 */
17632 function createAssigner(assigner) {
17633 return baseRest(function (object, sources) {
17634 var index = -1,
17635 length = sources.length,
17636 customizer = length > 1 ? sources[length - 1] : undefined,
17637 guard = length > 2 ? sources[2] : undefined;
17638
17639 customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined;
17640
17641 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
17642 customizer = length < 3 ? undefined : customizer;
17643 length = 1;
17644 }
17645 object = Object(object);
17646 while (++index < length) {
17647 var source = sources[index];
17648 if (source) {
17649 assigner(object, source, index, customizer);
17650 }
17651 }
17652 return object;
17653 });
17654 }
17655
17656 module.exports = createAssigner;
17657
17658/***/ }),
17659/* 104 */
17660/***/ (function(module, exports, __webpack_require__) {
17661
17662 'use strict';
17663
17664 var isKeyable = __webpack_require__(544);
17665
17666 /**
17667 * Gets the data for `map`.
17668 *
17669 * @private
17670 * @param {Object} map The map to query.
17671 * @param {string} key The reference key.
17672 * @returns {*} Returns the map data.
17673 */
17674 function getMapData(map, key) {
17675 var data = map.__data__;
17676 return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
17677 }
17678
17679 module.exports = getMapData;
17680
17681/***/ }),
17682/* 105 */
17683/***/ (function(module, exports) {
17684
17685 'use strict';
17686
17687 /** Used for built-in method references. */
17688 var objectProto = Object.prototype;
17689
17690 /**
17691 * Checks if `value` is likely a prototype object.
17692 *
17693 * @private
17694 * @param {*} value The value to check.
17695 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
17696 */
17697 function isPrototype(value) {
17698 var Ctor = value && value.constructor,
17699 proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
17700
17701 return value === proto;
17702 }
17703
17704 module.exports = isPrototype;
17705
17706/***/ }),
17707/* 106 */
17708/***/ (function(module, exports, __webpack_require__) {
17709
17710 'use strict';
17711
17712 var getNative = __webpack_require__(38);
17713
17714 /* Built-in method references that are verified to be native. */
17715 var nativeCreate = getNative(Object, 'create');
17716
17717 module.exports = nativeCreate;
17718
17719/***/ }),
17720/* 107 */
17721/***/ (function(module, exports) {
17722
17723 "use strict";
17724
17725 /**
17726 * Converts `set` to an array of its values.
17727 *
17728 * @private
17729 * @param {Object} set The set to convert.
17730 * @returns {Array} Returns the values.
17731 */
17732 function setToArray(set) {
17733 var index = -1,
17734 result = Array(set.size);
17735
17736 set.forEach(function (value) {
17737 result[++index] = value;
17738 });
17739 return result;
17740 }
17741
17742 module.exports = setToArray;
17743
17744/***/ }),
17745/* 108 */
17746/***/ (function(module, exports, __webpack_require__) {
17747
17748 'use strict';
17749
17750 var isSymbol = __webpack_require__(62);
17751
17752 /** Used as references for various `Number` constants. */
17753 var INFINITY = 1 / 0;
17754
17755 /**
17756 * Converts `value` to a string key if it's not a string or symbol.
17757 *
17758 * @private
17759 * @param {*} value The value to inspect.
17760 * @returns {string|symbol} Returns the key.
17761 */
17762 function toKey(value) {
17763 if (typeof value == 'string' || isSymbol(value)) {
17764 return value;
17765 }
17766 var result = value + '';
17767 return result == '0' && 1 / value == -INFINITY ? '-0' : result;
17768 }
17769
17770 module.exports = toKey;
17771
17772/***/ }),
17773/* 109 */
17774/***/ (function(module, exports, __webpack_require__) {
17775
17776 'use strict';
17777
17778 var baseClone = __webpack_require__(164);
17779
17780 /** Used to compose bitmasks for cloning. */
17781 var CLONE_SYMBOLS_FLAG = 4;
17782
17783 /**
17784 * Creates a shallow clone of `value`.
17785 *
17786 * **Note:** This method is loosely based on the
17787 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
17788 * and supports cloning arrays, array buffers, booleans, date objects, maps,
17789 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
17790 * arrays. The own enumerable properties of `arguments` objects are cloned
17791 * as plain objects. An empty object is returned for uncloneable values such
17792 * as error objects, functions, DOM nodes, and WeakMaps.
17793 *
17794 * @static
17795 * @memberOf _
17796 * @since 0.1.0
17797 * @category Lang
17798 * @param {*} value The value to clone.
17799 * @returns {*} Returns the cloned value.
17800 * @see _.cloneDeep
17801 * @example
17802 *
17803 * var objects = [{ 'a': 1 }, { 'b': 2 }];
17804 *
17805 * var shallow = _.clone(objects);
17806 * console.log(shallow[0] === objects[0]);
17807 * // => true
17808 */
17809 function clone(value) {
17810 return baseClone(value, CLONE_SYMBOLS_FLAG);
17811 }
17812
17813 module.exports = clone;
17814
17815/***/ }),
17816/* 110 */
17817/***/ (function(module, exports) {
17818
17819 "use strict";
17820
17821 /**
17822 * This method returns the first argument it receives.
17823 *
17824 * @static
17825 * @since 0.1.0
17826 * @memberOf _
17827 * @category Util
17828 * @param {*} value Any value.
17829 * @returns {*} Returns `value`.
17830 * @example
17831 *
17832 * var object = { 'a': 1 };
17833 *
17834 * console.log(_.identity(object) === object);
17835 * // => true
17836 */
17837 function identity(value) {
17838 return value;
17839 }
17840
17841 module.exports = identity;
17842
17843/***/ }),
17844/* 111 */
17845/***/ (function(module, exports, __webpack_require__) {
17846
17847 'use strict';
17848
17849 var baseIndexOf = __webpack_require__(166),
17850 isArrayLike = __webpack_require__(24),
17851 isString = __webpack_require__(587),
17852 toInteger = __webpack_require__(48),
17853 values = __webpack_require__(280);
17854
17855 /* Built-in method references for those with the same name as other `lodash` methods. */
17856 var nativeMax = Math.max;
17857
17858 /**
17859 * Checks if `value` is in `collection`. If `collection` is a string, it's
17860 * checked for a substring of `value`, otherwise
17861 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
17862 * is used for equality comparisons. If `fromIndex` is negative, it's used as
17863 * the offset from the end of `collection`.
17864 *
17865 * @static
17866 * @memberOf _
17867 * @since 0.1.0
17868 * @category Collection
17869 * @param {Array|Object|string} collection The collection to inspect.
17870 * @param {*} value The value to search for.
17871 * @param {number} [fromIndex=0] The index to search from.
17872 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
17873 * @returns {boolean} Returns `true` if `value` is found, else `false`.
17874 * @example
17875 *
17876 * _.includes([1, 2, 3], 1);
17877 * // => true
17878 *
17879 * _.includes([1, 2, 3], 1, 2);
17880 * // => false
17881 *
17882 * _.includes({ 'a': 1, 'b': 2 }, 1);
17883 * // => true
17884 *
17885 * _.includes('abcd', 'bc');
17886 * // => true
17887 */
17888 function includes(collection, value, fromIndex, guard) {
17889 collection = isArrayLike(collection) ? collection : values(collection);
17890 fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
17891
17892 var length = collection.length;
17893 if (fromIndex < 0) {
17894 fromIndex = nativeMax(length + fromIndex, 0);
17895 }
17896 return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
17897 }
17898
17899 module.exports = includes;
17900
17901/***/ }),
17902/* 112 */
17903/***/ (function(module, exports, __webpack_require__) {
17904
17905 'use strict';
17906
17907 var baseIsArguments = __webpack_require__(493),
17908 isObjectLike = __webpack_require__(25);
17909
17910 /** Used for built-in method references. */
17911 var objectProto = Object.prototype;
17912
17913 /** Used to check objects for own properties. */
17914 var hasOwnProperty = objectProto.hasOwnProperty;
17915
17916 /** Built-in value references. */
17917 var propertyIsEnumerable = objectProto.propertyIsEnumerable;
17918
17919 /**
17920 * Checks if `value` is likely an `arguments` object.
17921 *
17922 * @static
17923 * @memberOf _
17924 * @since 0.1.0
17925 * @category Lang
17926 * @param {*} value The value to check.
17927 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
17928 * else `false`.
17929 * @example
17930 *
17931 * _.isArguments(function() { return arguments; }());
17932 * // => true
17933 *
17934 * _.isArguments([1, 2, 3]);
17935 * // => false
17936 */
17937 var isArguments = baseIsArguments(function () {
17938 return arguments;
17939 }()) ? baseIsArguments : function (value) {
17940 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
17941 };
17942
17943 module.exports = isArguments;
17944
17945/***/ }),
17946/* 113 */
17947/***/ (function(module, exports, __webpack_require__) {
17948
17949 /* WEBPACK VAR INJECTION */(function(module) {'use strict';
17950
17951 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
17952
17953 var root = __webpack_require__(17),
17954 stubFalse = __webpack_require__(596);
17955
17956 /** Detect free variable `exports`. */
17957 var freeExports = ( false ? 'undefined' : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;
17958
17959 /** Detect free variable `module`. */
17960 var freeModule = freeExports && ( false ? 'undefined' : _typeof(module)) == 'object' && module && !module.nodeType && module;
17961
17962 /** Detect the popular CommonJS extension `module.exports`. */
17963 var moduleExports = freeModule && freeModule.exports === freeExports;
17964
17965 /** Built-in value references. */
17966 var Buffer = moduleExports ? root.Buffer : undefined;
17967
17968 /* Built-in method references for those with the same name as other `lodash` methods. */
17969 var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
17970
17971 /**
17972 * Checks if `value` is a buffer.
17973 *
17974 * @static
17975 * @memberOf _
17976 * @since 4.3.0
17977 * @category Lang
17978 * @param {*} value The value to check.
17979 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
17980 * @example
17981 *
17982 * _.isBuffer(new Buffer(2));
17983 * // => true
17984 *
17985 * _.isBuffer(new Uint8Array(2));
17986 * // => false
17987 */
17988 var isBuffer = nativeIsBuffer || stubFalse;
17989
17990 module.exports = isBuffer;
17991 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(39)(module)))
17992
17993/***/ }),
17994/* 114 */
17995/***/ (function(module, exports, __webpack_require__) {
17996
17997 'use strict';
17998
17999 var baseToString = __webpack_require__(253);
18000
18001 /**
18002 * Converts `value` to a string. An empty string is returned for `null`
18003 * and `undefined` values. The sign of `-0` is preserved.
18004 *
18005 * @static
18006 * @memberOf _
18007 * @since 4.0.0
18008 * @category Lang
18009 * @param {*} value The value to convert.
18010 * @returns {string} Returns the converted string.
18011 * @example
18012 *
18013 * _.toString(null);
18014 * // => ''
18015 *
18016 * _.toString(-0);
18017 * // => '-0'
18018 *
18019 * _.toString([1, 2, 3]);
18020 * // => '1,2,3'
18021 */
18022 function toString(value) {
18023 return value == null ? '' : baseToString(value);
18024 }
18025
18026 module.exports = toString;
18027
18028/***/ }),
18029/* 115 */
1803096,
18031/* 116 */
18032/***/ (function(module, exports, __webpack_require__) {
18033
18034 "use strict";
18035
18036 exports.__esModule = true;
18037 exports.runtimeProperty = runtimeProperty;
18038 exports.isReference = isReference;
18039 exports.replaceWithOrRemove = replaceWithOrRemove;
18040
18041 var _babelTypes = __webpack_require__(1);
18042
18043 var t = _interopRequireWildcard(_babelTypes);
18044
18045 function _interopRequireWildcard(obj) {
18046 if (obj && obj.__esModule) {
18047 return obj;
18048 } else {
18049 var newObj = {};if (obj != null) {
18050 for (var key in obj) {
18051 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
18052 }
18053 }newObj.default = obj;return newObj;
18054 }
18055 }
18056
18057 function runtimeProperty(name) {
18058 return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false);
18059 } /**
18060 * Copyright (c) 2014, Facebook, Inc.
18061 * All rights reserved.
18062 *
18063 * This source code is licensed under the BSD-style license found in the
18064 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
18065 * additional grant of patent rights can be found in the PATENTS file in
18066 * the same directory.
18067 */
18068
18069 function isReference(path) {
18070 return path.isReferenced() || path.parentPath.isAssignmentExpression({ left: path.node });
18071 }
18072
18073 function replaceWithOrRemove(path, replacement) {
18074 if (replacement) {
18075 path.replaceWith(replacement);
18076 } else {
18077 path.remove();
18078 }
18079 }
18080
18081/***/ }),
18082/* 117 */
18083/***/ (function(module, exports, __webpack_require__) {
18084
18085 /* WEBPACK VAR INJECTION */(function(global, process) {'use strict';
18086
18087 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
18088
18089 // Copyright Joyent, Inc. and other Node contributors.
18090 //
18091 // Permission is hereby granted, free of charge, to any person obtaining a
18092 // copy of this software and associated documentation files (the
18093 // "Software"), to deal in the Software without restriction, including
18094 // without limitation the rights to use, copy, modify, merge, publish,
18095 // distribute, sublicense, and/or sell copies of the Software, and to permit
18096 // persons to whom the Software is furnished to do so, subject to the
18097 // following conditions:
18098 //
18099 // The above copyright notice and this permission notice shall be included
18100 // in all copies or substantial portions of the Software.
18101 //
18102 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18103 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18104 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
18105 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18106 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18107 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18108 // USE OR OTHER DEALINGS IN THE SOFTWARE.
18109
18110 var formatRegExp = /%[sdj%]/g;
18111 exports.format = function (f) {
18112 if (!isString(f)) {
18113 var objects = [];
18114 for (var i = 0; i < arguments.length; i++) {
18115 objects.push(inspect(arguments[i]));
18116 }
18117 return objects.join(' ');
18118 }
18119
18120 var i = 1;
18121 var args = arguments;
18122 var len = args.length;
18123 var str = String(f).replace(formatRegExp, function (x) {
18124 if (x === '%%') return '%';
18125 if (i >= len) return x;
18126 switch (x) {
18127 case '%s':
18128 return String(args[i++]);
18129 case '%d':
18130 return Number(args[i++]);
18131 case '%j':
18132 try {
18133 return JSON.stringify(args[i++]);
18134 } catch (_) {
18135 return '[Circular]';
18136 }
18137 default:
18138 return x;
18139 }
18140 });
18141 for (var x = args[i]; i < len; x = args[++i]) {
18142 if (isNull(x) || !isObject(x)) {
18143 str += ' ' + x;
18144 } else {
18145 str += ' ' + inspect(x);
18146 }
18147 }
18148 return str;
18149 };
18150
18151 // Mark that a method should not be used.
18152 // Returns a modified function which warns once by default.
18153 // If --no-deprecation is set, then it is a no-op.
18154 exports.deprecate = function (fn, msg) {
18155 // Allow for deprecating things in the process of starting up.
18156 if (isUndefined(global.process)) {
18157 return function () {
18158 return exports.deprecate(fn, msg).apply(this, arguments);
18159 };
18160 }
18161
18162 if (process.noDeprecation === true) {
18163 return fn;
18164 }
18165
18166 var warned = false;
18167 function deprecated() {
18168 if (!warned) {
18169 if (process.throwDeprecation) {
18170 throw new Error(msg);
18171 } else if (process.traceDeprecation) {
18172 console.trace(msg);
18173 } else {
18174 console.error(msg);
18175 }
18176 warned = true;
18177 }
18178 return fn.apply(this, arguments);
18179 }
18180
18181 return deprecated;
18182 };
18183
18184 var debugs = {};
18185 var debugEnviron;
18186 exports.debuglog = function (set) {
18187 if (isUndefined(debugEnviron)) debugEnviron = process.env.NODE_DEBUG || '';
18188 set = set.toUpperCase();
18189 if (!debugs[set]) {
18190 if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
18191 var pid = process.pid;
18192 debugs[set] = function () {
18193 var msg = exports.format.apply(exports, arguments);
18194 console.error('%s %d: %s', set, pid, msg);
18195 };
18196 } else {
18197 debugs[set] = function () {};
18198 }
18199 }
18200 return debugs[set];
18201 };
18202
18203 /**
18204 * Echos the value of a value. Trys to print the value out
18205 * in the best way possible given the different types.
18206 *
18207 * @param {Object} obj The object to print out.
18208 * @param {Object} opts Optional options object that alters the output.
18209 */
18210 /* legacy: obj, showHidden, depth, colors*/
18211 function inspect(obj, opts) {
18212 // default options
18213 var ctx = {
18214 seen: [],
18215 stylize: stylizeNoColor
18216 };
18217 // legacy...
18218 if (arguments.length >= 3) ctx.depth = arguments[2];
18219 if (arguments.length >= 4) ctx.colors = arguments[3];
18220 if (isBoolean(opts)) {
18221 // legacy...
18222 ctx.showHidden = opts;
18223 } else if (opts) {
18224 // got an "options" object
18225 exports._extend(ctx, opts);
18226 }
18227 // set default options
18228 if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
18229 if (isUndefined(ctx.depth)) ctx.depth = 2;
18230 if (isUndefined(ctx.colors)) ctx.colors = false;
18231 if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
18232 if (ctx.colors) ctx.stylize = stylizeWithColor;
18233 return formatValue(ctx, obj, ctx.depth);
18234 }
18235 exports.inspect = inspect;
18236
18237 // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
18238 inspect.colors = {
18239 'bold': [1, 22],
18240 'italic': [3, 23],
18241 'underline': [4, 24],
18242 'inverse': [7, 27],
18243 'white': [37, 39],
18244 'grey': [90, 39],
18245 'black': [30, 39],
18246 'blue': [34, 39],
18247 'cyan': [36, 39],
18248 'green': [32, 39],
18249 'magenta': [35, 39],
18250 'red': [31, 39],
18251 'yellow': [33, 39]
18252 };
18253
18254 // Don't use 'blue' not visible on cmd.exe
18255 inspect.styles = {
18256 'special': 'cyan',
18257 'number': 'yellow',
18258 'boolean': 'yellow',
18259 'undefined': 'grey',
18260 'null': 'bold',
18261 'string': 'green',
18262 'date': 'magenta',
18263 // "name": intentionally not styling
18264 'regexp': 'red'
18265 };
18266
18267 function stylizeWithColor(str, styleType) {
18268 var style = inspect.styles[styleType];
18269
18270 if (style) {
18271 return '\x1B[' + inspect.colors[style][0] + 'm' + str + '\x1B[' + inspect.colors[style][1] + 'm';
18272 } else {
18273 return str;
18274 }
18275 }
18276
18277 function stylizeNoColor(str, styleType) {
18278 return str;
18279 }
18280
18281 function arrayToHash(array) {
18282 var hash = {};
18283
18284 array.forEach(function (val, idx) {
18285 hash[val] = true;
18286 });
18287
18288 return hash;
18289 }
18290
18291 function formatValue(ctx, value, recurseTimes) {
18292 // Provide a hook for user-specified inspect functions.
18293 // Check that value is an object with an inspect function on it
18294 if (ctx.customInspect && value && isFunction(value.inspect) &&
18295 // Filter out the util module, it's inspect function is special
18296 value.inspect !== exports.inspect &&
18297 // Also filter out any prototype objects using the circular check.
18298 !(value.constructor && value.constructor.prototype === value)) {
18299 var ret = value.inspect(recurseTimes, ctx);
18300 if (!isString(ret)) {
18301 ret = formatValue(ctx, ret, recurseTimes);
18302 }
18303 return ret;
18304 }
18305
18306 // Primitive types cannot have properties
18307 var primitive = formatPrimitive(ctx, value);
18308 if (primitive) {
18309 return primitive;
18310 }
18311
18312 // Look up the keys of the object.
18313 var keys = Object.keys(value);
18314 var visibleKeys = arrayToHash(keys);
18315
18316 if (ctx.showHidden) {
18317 keys = Object.getOwnPropertyNames(value);
18318 }
18319
18320 // IE doesn't make error fields non-enumerable
18321 // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
18322 if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
18323 return formatError(value);
18324 }
18325
18326 // Some type of object without properties can be shortcutted.
18327 if (keys.length === 0) {
18328 if (isFunction(value)) {
18329 var name = value.name ? ': ' + value.name : '';
18330 return ctx.stylize('[Function' + name + ']', 'special');
18331 }
18332 if (isRegExp(value)) {
18333 return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
18334 }
18335 if (isDate(value)) {
18336 return ctx.stylize(Date.prototype.toString.call(value), 'date');
18337 }
18338 if (isError(value)) {
18339 return formatError(value);
18340 }
18341 }
18342
18343 var base = '',
18344 array = false,
18345 braces = ['{', '}'];
18346
18347 // Make Array say that they are Array
18348 if (isArray(value)) {
18349 array = true;
18350 braces = ['[', ']'];
18351 }
18352
18353 // Make functions say that they are functions
18354 if (isFunction(value)) {
18355 var n = value.name ? ': ' + value.name : '';
18356 base = ' [Function' + n + ']';
18357 }
18358
18359 // Make RegExps say that they are RegExps
18360 if (isRegExp(value)) {
18361 base = ' ' + RegExp.prototype.toString.call(value);
18362 }
18363
18364 // Make dates with properties first say the date
18365 if (isDate(value)) {
18366 base = ' ' + Date.prototype.toUTCString.call(value);
18367 }
18368
18369 // Make error with message first say the error
18370 if (isError(value)) {
18371 base = ' ' + formatError(value);
18372 }
18373
18374 if (keys.length === 0 && (!array || value.length == 0)) {
18375 return braces[0] + base + braces[1];
18376 }
18377
18378 if (recurseTimes < 0) {
18379 if (isRegExp(value)) {
18380 return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
18381 } else {
18382 return ctx.stylize('[Object]', 'special');
18383 }
18384 }
18385
18386 ctx.seen.push(value);
18387
18388 var output;
18389 if (array) {
18390 output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
18391 } else {
18392 output = keys.map(function (key) {
18393 return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
18394 });
18395 }
18396
18397 ctx.seen.pop();
18398
18399 return reduceToSingleString(output, base, braces);
18400 }
18401
18402 function formatPrimitive(ctx, value) {
18403 if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
18404 if (isString(value)) {
18405 var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\'';
18406 return ctx.stylize(simple, 'string');
18407 }
18408 if (isNumber(value)) return ctx.stylize('' + value, 'number');
18409 if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
18410 // For some reason typeof null is "object", so special case here.
18411 if (isNull(value)) return ctx.stylize('null', 'null');
18412 }
18413
18414 function formatError(value) {
18415 return '[' + Error.prototype.toString.call(value) + ']';
18416 }
18417
18418 function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
18419 var output = [];
18420 for (var i = 0, l = value.length; i < l; ++i) {
18421 if (hasOwnProperty(value, String(i))) {
18422 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
18423 } else {
18424 output.push('');
18425 }
18426 }
18427 keys.forEach(function (key) {
18428 if (!key.match(/^\d+$/)) {
18429 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
18430 }
18431 });
18432 return output;
18433 }
18434
18435 function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
18436 var name, str, desc;
18437 desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
18438 if (desc.get) {
18439 if (desc.set) {
18440 str = ctx.stylize('[Getter/Setter]', 'special');
18441 } else {
18442 str = ctx.stylize('[Getter]', 'special');
18443 }
18444 } else {
18445 if (desc.set) {
18446 str = ctx.stylize('[Setter]', 'special');
18447 }
18448 }
18449 if (!hasOwnProperty(visibleKeys, key)) {
18450 name = '[' + key + ']';
18451 }
18452 if (!str) {
18453 if (ctx.seen.indexOf(desc.value) < 0) {
18454 if (isNull(recurseTimes)) {
18455 str = formatValue(ctx, desc.value, null);
18456 } else {
18457 str = formatValue(ctx, desc.value, recurseTimes - 1);
18458 }
18459 if (str.indexOf('\n') > -1) {
18460 if (array) {
18461 str = str.split('\n').map(function (line) {
18462 return ' ' + line;
18463 }).join('\n').substr(2);
18464 } else {
18465 str = '\n' + str.split('\n').map(function (line) {
18466 return ' ' + line;
18467 }).join('\n');
18468 }
18469 }
18470 } else {
18471 str = ctx.stylize('[Circular]', 'special');
18472 }
18473 }
18474 if (isUndefined(name)) {
18475 if (array && key.match(/^\d+$/)) {
18476 return str;
18477 }
18478 name = JSON.stringify('' + key);
18479 if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
18480 name = name.substr(1, name.length - 2);
18481 name = ctx.stylize(name, 'name');
18482 } else {
18483 name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
18484 name = ctx.stylize(name, 'string');
18485 }
18486 }
18487
18488 return name + ': ' + str;
18489 }
18490
18491 function reduceToSingleString(output, base, braces) {
18492 var numLinesEst = 0;
18493 var length = output.reduce(function (prev, cur) {
18494 numLinesEst++;
18495 if (cur.indexOf('\n') >= 0) numLinesEst++;
18496 return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
18497 }, 0);
18498
18499 if (length > 60) {
18500 return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1];
18501 }
18502
18503 return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
18504 }
18505
18506 // NOTE: These type checking functions intentionally don't use `instanceof`
18507 // because it is fragile and can be easily faked with `Object.create()`.
18508 function isArray(ar) {
18509 return Array.isArray(ar);
18510 }
18511 exports.isArray = isArray;
18512
18513 function isBoolean(arg) {
18514 return typeof arg === 'boolean';
18515 }
18516 exports.isBoolean = isBoolean;
18517
18518 function isNull(arg) {
18519 return arg === null;
18520 }
18521 exports.isNull = isNull;
18522
18523 function isNullOrUndefined(arg) {
18524 return arg == null;
18525 }
18526 exports.isNullOrUndefined = isNullOrUndefined;
18527
18528 function isNumber(arg) {
18529 return typeof arg === 'number';
18530 }
18531 exports.isNumber = isNumber;
18532
18533 function isString(arg) {
18534 return typeof arg === 'string';
18535 }
18536 exports.isString = isString;
18537
18538 function isSymbol(arg) {
18539 return (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'symbol';
18540 }
18541 exports.isSymbol = isSymbol;
18542
18543 function isUndefined(arg) {
18544 return arg === void 0;
18545 }
18546 exports.isUndefined = isUndefined;
18547
18548 function isRegExp(re) {
18549 return isObject(re) && objectToString(re) === '[object RegExp]';
18550 }
18551 exports.isRegExp = isRegExp;
18552
18553 function isObject(arg) {
18554 return (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && arg !== null;
18555 }
18556 exports.isObject = isObject;
18557
18558 function isDate(d) {
18559 return isObject(d) && objectToString(d) === '[object Date]';
18560 }
18561 exports.isDate = isDate;
18562
18563 function isError(e) {
18564 return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error);
18565 }
18566 exports.isError = isError;
18567
18568 function isFunction(arg) {
18569 return typeof arg === 'function';
18570 }
18571 exports.isFunction = isFunction;
18572
18573 function isPrimitive(arg) {
18574 return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'symbol' || // ES6 symbol
18575 typeof arg === 'undefined';
18576 }
18577 exports.isPrimitive = isPrimitive;
18578
18579 exports.isBuffer = __webpack_require__(627);
18580
18581 function objectToString(o) {
18582 return Object.prototype.toString.call(o);
18583 }
18584
18585 function pad(n) {
18586 return n < 10 ? '0' + n.toString(10) : n.toString(10);
18587 }
18588
18589 var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
18590
18591 // 26 Feb 16:19:34
18592 function timestamp() {
18593 var d = new Date();
18594 var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':');
18595 return [d.getDate(), months[d.getMonth()], time].join(' ');
18596 }
18597
18598 // log is just a thin wrapper to console.log that prepends a timestamp
18599 exports.log = function () {
18600 console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
18601 };
18602
18603 /**
18604 * Inherit the prototype methods from one constructor into another.
18605 *
18606 * The Function.prototype.inherits from lang.js rewritten as a standalone
18607 * function (not on Function.prototype). NOTE: If this file is to be loaded
18608 * during bootstrapping this function needs to be rewritten using some native
18609 * functions as prototype setup using normal JavaScript does not work as
18610 * expected during bootstrapping (see mirror.js in r114903).
18611 *
18612 * @param {function} ctor Constructor function which needs to inherit the
18613 * prototype.
18614 * @param {function} superCtor Constructor function to inherit prototype from.
18615 */
18616 exports.inherits = __webpack_require__(626);
18617
18618 exports._extend = function (origin, add) {
18619 // Don't do anything if add isn't an object
18620 if (!add || !isObject(add)) return origin;
18621
18622 var keys = Object.keys(add);
18623 var i = keys.length;
18624 while (i--) {
18625 origin[keys[i]] = add[keys[i]];
18626 }
18627 return origin;
18628 };
18629
18630 function hasOwnProperty(obj, prop) {
18631 return Object.prototype.hasOwnProperty.call(obj, prop);
18632 }
18633 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(8)))
18634
18635/***/ }),
18636/* 118 */
18637/***/ (function(module, exports, __webpack_require__) {
18638
18639 /* WEBPACK VAR INJECTION */(function(process) {"use strict";
18640
18641 exports.__esModule = true;
18642
18643 var _typeof2 = __webpack_require__(11);
18644
18645 var _typeof3 = _interopRequireDefault(_typeof2);
18646
18647 exports.default = function (loc) {
18648 var relative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
18649
18650 if ((typeof _module2.default === "undefined" ? "undefined" : (0, _typeof3.default)(_module2.default)) === "object") return null;
18651
18652 var relativeMod = relativeModules[relative];
18653
18654 if (!relativeMod) {
18655 relativeMod = new _module2.default();
18656
18657 var filename = _path2.default.join(relative, ".babelrc");
18658 relativeMod.id = filename;
18659 relativeMod.filename = filename;
18660
18661 relativeMod.paths = _module2.default._nodeModulePaths(relative);
18662 relativeModules[relative] = relativeMod;
18663 }
18664
18665 try {
18666 return _module2.default._resolveFilename(loc, relativeMod);
18667 } catch (err) {
18668 return null;
18669 }
18670 };
18671
18672 var _module = __webpack_require__(115);
18673
18674 var _module2 = _interopRequireDefault(_module);
18675
18676 var _path = __webpack_require__(19);
18677
18678 var _path2 = _interopRequireDefault(_path);
18679
18680 function _interopRequireDefault(obj) {
18681 return obj && obj.__esModule ? obj : { default: obj };
18682 }
18683
18684 var relativeModules = {};
18685
18686 module.exports = exports["default"];
18687 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
18688
18689/***/ }),
18690/* 119 */
18691/***/ (function(module, exports, __webpack_require__) {
18692
18693 "use strict";
18694
18695 exports.__esModule = true;
18696
18697 var _map = __webpack_require__(133);
18698
18699 var _map2 = _interopRequireDefault(_map);
18700
18701 var _classCallCheck2 = __webpack_require__(3);
18702
18703 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
18704
18705 var _possibleConstructorReturn2 = __webpack_require__(42);
18706
18707 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
18708
18709 var _inherits2 = __webpack_require__(41);
18710
18711 var _inherits3 = _interopRequireDefault(_inherits2);
18712
18713 function _interopRequireDefault(obj) {
18714 return obj && obj.__esModule ? obj : { default: obj };
18715 }
18716
18717 var Store = function (_Map) {
18718 (0, _inherits3.default)(Store, _Map);
18719
18720 function Store() {
18721 (0, _classCallCheck3.default)(this, Store);
18722
18723 var _this = (0, _possibleConstructorReturn3.default)(this, _Map.call(this));
18724
18725 _this.dynamicData = {};
18726 return _this;
18727 }
18728
18729 Store.prototype.setDynamic = function setDynamic(key, fn) {
18730 this.dynamicData[key] = fn;
18731 };
18732
18733 Store.prototype.get = function get(key) {
18734 if (this.has(key)) {
18735 return _Map.prototype.get.call(this, key);
18736 } else {
18737 if (Object.prototype.hasOwnProperty.call(this.dynamicData, key)) {
18738 var val = this.dynamicData[key]();
18739 this.set(key, val);
18740 return val;
18741 }
18742 }
18743 };
18744
18745 return Store;
18746 }(_map2.default);
18747
18748 exports.default = Store;
18749 module.exports = exports["default"];
18750
18751/***/ }),
18752/* 120 */
18753/***/ (function(module, exports, __webpack_require__) {
18754
18755 "use strict";
18756
18757 exports.__esModule = true;
18758
18759 var _classCallCheck2 = __webpack_require__(3);
18760
18761 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
18762
18763 var _node = __webpack_require__(239);
18764
18765 var _node2 = _interopRequireDefault(_node);
18766
18767 function _interopRequireDefault(obj) {
18768 return obj && obj.__esModule ? obj : { default: obj };
18769 }
18770
18771 var verboseDebug = (0, _node2.default)("babel:verbose");
18772 var generalDebug = (0, _node2.default)("babel");
18773
18774 var seenDeprecatedMessages = [];
18775
18776 var Logger = function () {
18777 function Logger(file, filename) {
18778 (0, _classCallCheck3.default)(this, Logger);
18779
18780 this.filename = filename;
18781 this.file = file;
18782 }
18783
18784 Logger.prototype._buildMessage = function _buildMessage(msg) {
18785 var parts = "[BABEL] " + this.filename;
18786 if (msg) parts += ": " + msg;
18787 return parts;
18788 };
18789
18790 Logger.prototype.warn = function warn(msg) {
18791 console.warn(this._buildMessage(msg));
18792 };
18793
18794 Logger.prototype.error = function error(msg) {
18795 var Constructor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error;
18796
18797 throw new Constructor(this._buildMessage(msg));
18798 };
18799
18800 Logger.prototype.deprecate = function deprecate(msg) {
18801 if (this.file.opts && this.file.opts.suppressDeprecationMessages) return;
18802
18803 msg = this._buildMessage(msg);
18804
18805 if (seenDeprecatedMessages.indexOf(msg) >= 0) return;
18806
18807 seenDeprecatedMessages.push(msg);
18808
18809 console.error(msg);
18810 };
18811
18812 Logger.prototype.verbose = function verbose(msg) {
18813 if (verboseDebug.enabled) verboseDebug(this._buildMessage(msg));
18814 };
18815
18816 Logger.prototype.debug = function debug(msg) {
18817 if (generalDebug.enabled) generalDebug(this._buildMessage(msg));
18818 };
18819
18820 Logger.prototype.deopt = function deopt(node, msg) {
18821 this.debug(msg);
18822 };
18823
18824 return Logger;
18825 }();
18826
18827 exports.default = Logger;
18828 module.exports = exports["default"];
18829
18830/***/ }),
18831/* 121 */
18832/***/ (function(module, exports, __webpack_require__) {
18833
18834 "use strict";
18835
18836 exports.__esModule = true;
18837 exports.ImportDeclaration = exports.ModuleDeclaration = undefined;
18838
18839 var _getIterator2 = __webpack_require__(2);
18840
18841 var _getIterator3 = _interopRequireDefault(_getIterator2);
18842
18843 exports.ExportDeclaration = ExportDeclaration;
18844 exports.Scope = Scope;
18845
18846 var _babelTypes = __webpack_require__(1);
18847
18848 var t = _interopRequireWildcard(_babelTypes);
18849
18850 function _interopRequireWildcard(obj) {
18851 if (obj && obj.__esModule) {
18852 return obj;
18853 } else {
18854 var newObj = {};if (obj != null) {
18855 for (var key in obj) {
18856 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
18857 }
18858 }newObj.default = obj;return newObj;
18859 }
18860 }
18861
18862 function _interopRequireDefault(obj) {
18863 return obj && obj.__esModule ? obj : { default: obj };
18864 }
18865
18866 var ModuleDeclaration = exports.ModuleDeclaration = {
18867 enter: function enter(path, file) {
18868 var node = path.node;
18869
18870 if (node.source) {
18871 node.source.value = file.resolveModuleSource(node.source.value);
18872 }
18873 }
18874 };
18875
18876 var ImportDeclaration = exports.ImportDeclaration = {
18877 exit: function exit(path, file) {
18878 var node = path.node;
18879
18880 var specifiers = [];
18881 var imported = [];
18882 file.metadata.modules.imports.push({
18883 source: node.source.value,
18884 imported: imported,
18885 specifiers: specifiers
18886 });
18887
18888 for (var _iterator = path.get("specifiers"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
18889 var _ref;
18890
18891 if (_isArray) {
18892 if (_i >= _iterator.length) break;
18893 _ref = _iterator[_i++];
18894 } else {
18895 _i = _iterator.next();
18896 if (_i.done) break;
18897 _ref = _i.value;
18898 }
18899
18900 var specifier = _ref;
18901
18902 var local = specifier.node.local.name;
18903
18904 if (specifier.isImportDefaultSpecifier()) {
18905 imported.push("default");
18906 specifiers.push({
18907 kind: "named",
18908 imported: "default",
18909 local: local
18910 });
18911 }
18912
18913 if (specifier.isImportSpecifier()) {
18914 var importedName = specifier.node.imported.name;
18915 imported.push(importedName);
18916 specifiers.push({
18917 kind: "named",
18918 imported: importedName,
18919 local: local
18920 });
18921 }
18922
18923 if (specifier.isImportNamespaceSpecifier()) {
18924 imported.push("*");
18925 specifiers.push({
18926 kind: "namespace",
18927 local: local
18928 });
18929 }
18930 }
18931 }
18932 };
18933
18934 function ExportDeclaration(path, file) {
18935 var node = path.node;
18936
18937 var source = node.source ? node.source.value : null;
18938 var exports = file.metadata.modules.exports;
18939
18940 var declar = path.get("declaration");
18941 if (declar.isStatement()) {
18942 var bindings = declar.getBindingIdentifiers();
18943
18944 for (var name in bindings) {
18945 exports.exported.push(name);
18946 exports.specifiers.push({
18947 kind: "local",
18948 local: name,
18949 exported: path.isExportDefaultDeclaration() ? "default" : name
18950 });
18951 }
18952 }
18953
18954 if (path.isExportNamedDeclaration() && node.specifiers) {
18955 for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
18956 var _ref2;
18957
18958 if (_isArray2) {
18959 if (_i2 >= _iterator2.length) break;
18960 _ref2 = _iterator2[_i2++];
18961 } else {
18962 _i2 = _iterator2.next();
18963 if (_i2.done) break;
18964 _ref2 = _i2.value;
18965 }
18966
18967 var specifier = _ref2;
18968
18969 var exported = specifier.exported.name;
18970 exports.exported.push(exported);
18971
18972 if (t.isExportDefaultSpecifier(specifier)) {
18973 exports.specifiers.push({
18974 kind: "external",
18975 local: exported,
18976 exported: exported,
18977 source: source
18978 });
18979 }
18980
18981 if (t.isExportNamespaceSpecifier(specifier)) {
18982 exports.specifiers.push({
18983 kind: "external-namespace",
18984 exported: exported,
18985 source: source
18986 });
18987 }
18988
18989 var local = specifier.local;
18990 if (!local) continue;
18991
18992 if (source) {
18993 exports.specifiers.push({
18994 kind: "external",
18995 local: local.name,
18996 exported: exported,
18997 source: source
18998 });
18999 }
19000
19001 if (!source) {
19002 exports.specifiers.push({
19003 kind: "local",
19004 local: local.name,
19005 exported: exported
19006 });
19007 }
19008 }
19009 }
19010
19011 if (path.isExportAllDeclaration()) {
19012 exports.specifiers.push({
19013 kind: "external-all",
19014 source: source
19015 });
19016 }
19017 }
19018
19019 function Scope(path) {
19020 path.skip();
19021 }
19022
19023/***/ }),
19024/* 122 */
19025/***/ (function(module, exports, __webpack_require__) {
19026
19027 "use strict";
19028
19029 exports.__esModule = true;
19030 exports.inspect = exports.inherits = undefined;
19031
19032 var _getIterator2 = __webpack_require__(2);
19033
19034 var _getIterator3 = _interopRequireDefault(_getIterator2);
19035
19036 var _util = __webpack_require__(117);
19037
19038 Object.defineProperty(exports, "inherits", {
19039 enumerable: true,
19040 get: function get() {
19041 return _util.inherits;
19042 }
19043 });
19044 Object.defineProperty(exports, "inspect", {
19045 enumerable: true,
19046 get: function get() {
19047 return _util.inspect;
19048 }
19049 });
19050 exports.canCompile = canCompile;
19051 exports.list = list;
19052 exports.regexify = regexify;
19053 exports.arrayify = arrayify;
19054 exports.booleanify = booleanify;
19055 exports.shouldIgnore = shouldIgnore;
19056
19057 var _escapeRegExp = __webpack_require__(577);
19058
19059 var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp);
19060
19061 var _startsWith = __webpack_require__(595);
19062
19063 var _startsWith2 = _interopRequireDefault(_startsWith);
19064
19065 var _minimatch = __webpack_require__(601);
19066
19067 var _minimatch2 = _interopRequireDefault(_minimatch);
19068
19069 var _includes = __webpack_require__(111);
19070
19071 var _includes2 = _interopRequireDefault(_includes);
19072
19073 var _isRegExp = __webpack_require__(276);
19074
19075 var _isRegExp2 = _interopRequireDefault(_isRegExp);
19076
19077 var _path = __webpack_require__(19);
19078
19079 var _path2 = _interopRequireDefault(_path);
19080
19081 var _slash = __webpack_require__(284);
19082
19083 var _slash2 = _interopRequireDefault(_slash);
19084
19085 function _interopRequireDefault(obj) {
19086 return obj && obj.__esModule ? obj : { default: obj };
19087 }
19088
19089 function canCompile(filename, altExts) {
19090 var exts = altExts || canCompile.EXTENSIONS;
19091 var ext = _path2.default.extname(filename);
19092 return (0, _includes2.default)(exts, ext);
19093 }
19094
19095 canCompile.EXTENSIONS = [".js", ".jsx", ".es6", ".es"];
19096
19097 function list(val) {
19098 if (!val) {
19099 return [];
19100 } else if (Array.isArray(val)) {
19101 return val;
19102 } else if (typeof val === "string") {
19103 return val.split(",");
19104 } else {
19105 return [val];
19106 }
19107 }
19108
19109 function regexify(val) {
19110 if (!val) {
19111 return new RegExp(/.^/);
19112 }
19113
19114 if (Array.isArray(val)) {
19115 val = new RegExp(val.map(_escapeRegExp2.default).join("|"), "i");
19116 }
19117
19118 if (typeof val === "string") {
19119 val = (0, _slash2.default)(val);
19120
19121 if ((0, _startsWith2.default)(val, "./") || (0, _startsWith2.default)(val, "*/")) val = val.slice(2);
19122 if ((0, _startsWith2.default)(val, "**/")) val = val.slice(3);
19123
19124 var regex = _minimatch2.default.makeRe(val, { nocase: true });
19125 return new RegExp(regex.source.slice(1, -1), "i");
19126 }
19127
19128 if ((0, _isRegExp2.default)(val)) {
19129 return val;
19130 }
19131
19132 throw new TypeError("illegal type for regexify");
19133 }
19134
19135 function arrayify(val, mapFn) {
19136 if (!val) return [];
19137 if (typeof val === "boolean") return arrayify([val], mapFn);
19138 if (typeof val === "string") return arrayify(list(val), mapFn);
19139
19140 if (Array.isArray(val)) {
19141 if (mapFn) val = val.map(mapFn);
19142 return val;
19143 }
19144
19145 return [val];
19146 }
19147
19148 function booleanify(val) {
19149 if (val === "true" || val == 1) {
19150 return true;
19151 }
19152
19153 if (val === "false" || val == 0 || !val) {
19154 return false;
19155 }
19156
19157 return val;
19158 }
19159
19160 function shouldIgnore(filename) {
19161 var ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
19162 var only = arguments[2];
19163
19164 filename = filename.replace(/\\/g, "/");
19165
19166 if (only) {
19167 for (var _iterator = only, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
19168 var _ref;
19169
19170 if (_isArray) {
19171 if (_i >= _iterator.length) break;
19172 _ref = _iterator[_i++];
19173 } else {
19174 _i = _iterator.next();
19175 if (_i.done) break;
19176 _ref = _i.value;
19177 }
19178
19179 var pattern = _ref;
19180
19181 if (_shouldIgnore(pattern, filename)) return false;
19182 }
19183 return true;
19184 } else if (ignore.length) {
19185 for (var _iterator2 = ignore, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
19186 var _ref2;
19187
19188 if (_isArray2) {
19189 if (_i2 >= _iterator2.length) break;
19190 _ref2 = _iterator2[_i2++];
19191 } else {
19192 _i2 = _iterator2.next();
19193 if (_i2.done) break;
19194 _ref2 = _i2.value;
19195 }
19196
19197 var _pattern = _ref2;
19198
19199 if (_shouldIgnore(_pattern, filename)) return true;
19200 }
19201 }
19202
19203 return false;
19204 }
19205
19206 function _shouldIgnore(pattern, filename) {
19207 if (typeof pattern === "function") {
19208 return pattern(filename);
19209 } else {
19210 return pattern.test(filename);
19211 }
19212 }
19213
19214/***/ }),
19215/* 123 */
19216/***/ (function(module, exports, __webpack_require__) {
19217
19218 "use strict";
19219
19220 exports.__esModule = true;
19221 exports.ArrayPattern = exports.ObjectPattern = exports.RestProperty = exports.SpreadProperty = exports.SpreadElement = undefined;
19222 exports.Identifier = Identifier;
19223 exports.RestElement = RestElement;
19224 exports.ObjectExpression = ObjectExpression;
19225 exports.ObjectMethod = ObjectMethod;
19226 exports.ObjectProperty = ObjectProperty;
19227 exports.ArrayExpression = ArrayExpression;
19228 exports.RegExpLiteral = RegExpLiteral;
19229 exports.BooleanLiteral = BooleanLiteral;
19230 exports.NullLiteral = NullLiteral;
19231 exports.NumericLiteral = NumericLiteral;
19232 exports.StringLiteral = StringLiteral;
19233
19234 var _babelTypes = __webpack_require__(1);
19235
19236 var t = _interopRequireWildcard(_babelTypes);
19237
19238 var _jsesc = __webpack_require__(469);
19239
19240 var _jsesc2 = _interopRequireDefault(_jsesc);
19241
19242 function _interopRequireDefault(obj) {
19243 return obj && obj.__esModule ? obj : { default: obj };
19244 }
19245
19246 function _interopRequireWildcard(obj) {
19247 if (obj && obj.__esModule) {
19248 return obj;
19249 } else {
19250 var newObj = {};if (obj != null) {
19251 for (var key in obj) {
19252 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
19253 }
19254 }newObj.default = obj;return newObj;
19255 }
19256 }
19257
19258 function Identifier(node) {
19259 if (node.variance) {
19260 if (node.variance === "plus") {
19261 this.token("+");
19262 } else if (node.variance === "minus") {
19263 this.token("-");
19264 }
19265 }
19266
19267 this.word(node.name);
19268 }
19269
19270 function RestElement(node) {
19271 this.token("...");
19272 this.print(node.argument, node);
19273 }
19274
19275 exports.SpreadElement = RestElement;
19276 exports.SpreadProperty = RestElement;
19277 exports.RestProperty = RestElement;
19278 function ObjectExpression(node) {
19279 var props = node.properties;
19280
19281 this.token("{");
19282 this.printInnerComments(node);
19283
19284 if (props.length) {
19285 this.space();
19286 this.printList(props, node, { indent: true, statement: true });
19287 this.space();
19288 }
19289
19290 this.token("}");
19291 }
19292
19293 exports.ObjectPattern = ObjectExpression;
19294 function ObjectMethod(node) {
19295 this.printJoin(node.decorators, node);
19296 this._method(node);
19297 }
19298
19299 function ObjectProperty(node) {
19300 this.printJoin(node.decorators, node);
19301
19302 if (node.computed) {
19303 this.token("[");
19304 this.print(node.key, node);
19305 this.token("]");
19306 } else {
19307 if (t.isAssignmentPattern(node.value) && t.isIdentifier(node.key) && node.key.name === node.value.left.name) {
19308 this.print(node.value, node);
19309 return;
19310 }
19311
19312 this.print(node.key, node);
19313
19314 if (node.shorthand && t.isIdentifier(node.key) && t.isIdentifier(node.value) && node.key.name === node.value.name) {
19315 return;
19316 }
19317 }
19318
19319 this.token(":");
19320 this.space();
19321 this.print(node.value, node);
19322 }
19323
19324 function ArrayExpression(node) {
19325 var elems = node.elements;
19326 var len = elems.length;
19327
19328 this.token("[");
19329 this.printInnerComments(node);
19330
19331 for (var i = 0; i < elems.length; i++) {
19332 var elem = elems[i];
19333 if (elem) {
19334 if (i > 0) this.space();
19335 this.print(elem, node);
19336 if (i < len - 1) this.token(",");
19337 } else {
19338 this.token(",");
19339 }
19340 }
19341
19342 this.token("]");
19343 }
19344
19345 exports.ArrayPattern = ArrayExpression;
19346 function RegExpLiteral(node) {
19347 this.word("/" + node.pattern + "/" + node.flags);
19348 }
19349
19350 function BooleanLiteral(node) {
19351 this.word(node.value ? "true" : "false");
19352 }
19353
19354 function NullLiteral() {
19355 this.word("null");
19356 }
19357
19358 function NumericLiteral(node) {
19359 var raw = this.getPossibleRaw(node);
19360 var value = node.value + "";
19361 if (raw == null) {
19362 this.number(value);
19363 } else if (this.format.minified) {
19364 this.number(raw.length < value.length ? raw : value);
19365 } else {
19366 this.number(raw);
19367 }
19368 }
19369
19370 function StringLiteral(node, parent) {
19371 var raw = this.getPossibleRaw(node);
19372 if (!this.format.minified && raw != null) {
19373 this.token(raw);
19374 return;
19375 }
19376
19377 var opts = {
19378 quotes: t.isJSX(parent) ? "double" : this.format.quotes,
19379 wrap: true
19380 };
19381 if (this.format.jsonCompatibleStrings) {
19382 opts.json = true;
19383 }
19384 var val = (0, _jsesc2.default)(node.value, opts);
19385
19386 return this.token(val);
19387 }
19388
19389/***/ }),
19390/* 124 */
19391/***/ (function(module, exports, __webpack_require__) {
19392
19393 "use strict";
19394
19395 exports.__esModule = true;
19396
19397 exports.default = function (path, file, helpers) {
19398 if (!helpers) {
19399 helpers = { wrapAsync: file };
19400 file = null;
19401 }
19402 path.traverse(awaitVisitor, {
19403 file: file,
19404 wrapAwait: helpers.wrapAwait
19405 });
19406
19407 if (path.isClassMethod() || path.isObjectMethod()) {
19408 classOrObjectMethod(path, helpers.wrapAsync);
19409 } else {
19410 plainFunction(path, helpers.wrapAsync);
19411 }
19412 };
19413
19414 var _babelHelperFunctionName = __webpack_require__(40);
19415
19416 var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
19417
19418 var _babelTemplate = __webpack_require__(4);
19419
19420 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
19421
19422 var _babelTypes = __webpack_require__(1);
19423
19424 var t = _interopRequireWildcard(_babelTypes);
19425
19426 var _forAwait = __webpack_require__(320);
19427
19428 var _forAwait2 = _interopRequireDefault(_forAwait);
19429
19430 function _interopRequireWildcard(obj) {
19431 if (obj && obj.__esModule) {
19432 return obj;
19433 } else {
19434 var newObj = {};if (obj != null) {
19435 for (var key in obj) {
19436 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
19437 }
19438 }newObj.default = obj;return newObj;
19439 }
19440 }
19441
19442 function _interopRequireDefault(obj) {
19443 return obj && obj.__esModule ? obj : { default: obj };
19444 }
19445
19446 var buildWrapper = (0, _babelTemplate2.default)("\n (() => {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })\n");
19447
19448 var namedBuildWrapper = (0, _babelTemplate2.default)("\n (() => {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })\n");
19449
19450 var awaitVisitor = {
19451 Function: function Function(path) {
19452 if (path.isArrowFunctionExpression() && !path.node.async) {
19453 path.arrowFunctionToShadowed();
19454 return;
19455 }
19456 path.skip();
19457 },
19458 AwaitExpression: function AwaitExpression(_ref, _ref2) {
19459 var node = _ref.node;
19460 var wrapAwait = _ref2.wrapAwait;
19461
19462 node.type = "YieldExpression";
19463 if (wrapAwait) {
19464 node.argument = t.callExpression(wrapAwait, [node.argument]);
19465 }
19466 },
19467 ForAwaitStatement: function ForAwaitStatement(path, _ref3) {
19468 var file = _ref3.file,
19469 wrapAwait = _ref3.wrapAwait;
19470 var node = path.node;
19471
19472 var build = (0, _forAwait2.default)(path, {
19473 getAsyncIterator: file.addHelper("asyncIterator"),
19474 wrapAwait: wrapAwait
19475 });
19476
19477 var declar = build.declar,
19478 loop = build.loop;
19479
19480 var block = loop.body;
19481
19482 path.ensureBlock();
19483
19484 if (declar) {
19485 block.body.push(declar);
19486 }
19487
19488 block.body = block.body.concat(node.body.body);
19489
19490 t.inherits(loop, node);
19491 t.inherits(loop.body, node.body);
19492
19493 if (build.replaceParent) {
19494 path.parentPath.replaceWithMultiple(build.node);
19495 path.remove();
19496 } else {
19497 path.replaceWithMultiple(build.node);
19498 }
19499 }
19500 };
19501
19502 function classOrObjectMethod(path, callId) {
19503 var node = path.node;
19504 var body = node.body;
19505
19506 node.async = false;
19507
19508 var container = t.functionExpression(null, [], t.blockStatement(body.body), true);
19509 container.shadow = true;
19510 body.body = [t.returnStatement(t.callExpression(t.callExpression(callId, [container]), []))];
19511
19512 node.generator = false;
19513 }
19514
19515 function plainFunction(path, callId) {
19516 var node = path.node;
19517 var isDeclaration = path.isFunctionDeclaration();
19518 var asyncFnId = node.id;
19519 var wrapper = buildWrapper;
19520
19521 if (path.isArrowFunctionExpression()) {
19522 path.arrowFunctionToShadowed();
19523 } else if (!isDeclaration && asyncFnId) {
19524 wrapper = namedBuildWrapper;
19525 }
19526
19527 node.async = false;
19528 node.generator = true;
19529
19530 node.id = null;
19531
19532 if (isDeclaration) {
19533 node.type = "FunctionExpression";
19534 }
19535
19536 var built = t.callExpression(callId, [node]);
19537 var container = wrapper({
19538 NAME: asyncFnId,
19539 REF: path.scope.generateUidIdentifier("ref"),
19540 FUNCTION: built,
19541 PARAMS: node.params.reduce(function (acc, param) {
19542 acc.done = acc.done || t.isAssignmentPattern(param) || t.isRestElement(param);
19543
19544 if (!acc.done) {
19545 acc.params.push(path.scope.generateUidIdentifier("x"));
19546 }
19547
19548 return acc;
19549 }, {
19550 params: [],
19551 done: false
19552 }).params
19553 }).expression;
19554
19555 if (isDeclaration) {
19556 var declar = t.variableDeclaration("let", [t.variableDeclarator(t.identifier(asyncFnId.name), t.callExpression(container, []))]);
19557 declar._blockHoist = true;
19558
19559 path.replaceWith(declar);
19560 } else {
19561 var retFunction = container.body.body[1].argument;
19562 if (!asyncFnId) {
19563 (0, _babelHelperFunctionName2.default)({
19564 node: retFunction,
19565 parent: path.parent,
19566 scope: path.scope
19567 });
19568 }
19569
19570 if (!retFunction || retFunction.id || node.params.length) {
19571 path.replaceWith(t.callExpression(container, []));
19572 } else {
19573 path.replaceWith(built);
19574 }
19575 }
19576 }
19577
19578 module.exports = exports["default"];
19579
19580/***/ }),
19581/* 125 */
19582/***/ (function(module, exports) {
19583
19584 "use strict";
19585
19586 exports.__esModule = true;
19587
19588 exports.default = function () {
19589 return {
19590 manipulateOptions: function manipulateOptions(opts, parserOpts) {
19591 parserOpts.plugins.push("decorators");
19592 }
19593 };
19594 };
19595
19596 module.exports = exports["default"];
19597
19598/***/ }),
19599/* 126 */
19600/***/ (function(module, exports) {
19601
19602 "use strict";
19603
19604 exports.__esModule = true;
19605
19606 exports.default = function () {
19607 return {
19608 manipulateOptions: function manipulateOptions(opts, parserOpts) {
19609 parserOpts.plugins.push("flow");
19610 }
19611 };
19612 };
19613
19614 module.exports = exports["default"];
19615
19616/***/ }),
19617/* 127 */
19618/***/ (function(module, exports) {
19619
19620 "use strict";
19621
19622 exports.__esModule = true;
19623
19624 exports.default = function () {
19625 return {
19626 manipulateOptions: function manipulateOptions(opts, parserOpts) {
19627 parserOpts.plugins.push("jsx");
19628 }
19629 };
19630 };
19631
19632 module.exports = exports["default"];
19633
19634/***/ }),
19635/* 128 */
19636/***/ (function(module, exports) {
19637
19638 "use strict";
19639
19640 exports.__esModule = true;
19641
19642 exports.default = function () {
19643 return {
19644 manipulateOptions: function manipulateOptions(opts, parserOpts) {
19645 parserOpts.plugins.push("trailingFunctionCommas");
19646 }
19647 };
19648 };
19649
19650 module.exports = exports["default"];
19651
19652/***/ }),
19653/* 129 */
19654/***/ (function(module, exports, __webpack_require__) {
19655
19656 "use strict";
19657
19658 exports.__esModule = true;
19659
19660 exports.default = function () {
19661 return {
19662 inherits: __webpack_require__(67),
19663
19664 visitor: {
19665 Function: function Function(path, state) {
19666 if (!path.node.async || path.node.generator) return;
19667
19668 (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, {
19669 wrapAsync: state.addHelper("asyncToGenerator")
19670 });
19671 }
19672 }
19673 };
19674 };
19675
19676 var _babelHelperRemapAsyncToGenerator = __webpack_require__(124);
19677
19678 var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator);
19679
19680 function _interopRequireDefault(obj) {
19681 return obj && obj.__esModule ? obj : { default: obj };
19682 }
19683
19684 module.exports = exports["default"];
19685
19686/***/ }),
19687/* 130 */
19688/***/ (function(module, exports, __webpack_require__) {
19689
19690 "use strict";
19691
19692 exports.__esModule = true;
19693
19694 var _getIterator2 = __webpack_require__(2);
19695
19696 var _getIterator3 = _interopRequireDefault(_getIterator2);
19697
19698 var _create = __webpack_require__(9);
19699
19700 var _create2 = _interopRequireDefault(_create);
19701
19702 exports.default = function () {
19703 return {
19704 visitor: {
19705 ObjectExpression: function ObjectExpression(path) {
19706 var node = path.node;
19707
19708 var plainProps = node.properties.filter(function (prop) {
19709 return !t.isSpreadProperty(prop) && !prop.computed;
19710 });
19711
19712 var alreadySeenData = (0, _create2.default)(null);
19713 var alreadySeenGetters = (0, _create2.default)(null);
19714 var alreadySeenSetters = (0, _create2.default)(null);
19715
19716 for (var _iterator = plainProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
19717 var _ref;
19718
19719 if (_isArray) {
19720 if (_i >= _iterator.length) break;
19721 _ref = _iterator[_i++];
19722 } else {
19723 _i = _iterator.next();
19724 if (_i.done) break;
19725 _ref = _i.value;
19726 }
19727
19728 var prop = _ref;
19729
19730 var name = getName(prop.key);
19731 var isDuplicate = false;
19732 switch (prop.kind) {
19733 case "get":
19734 if (alreadySeenData[name] || alreadySeenGetters[name]) {
19735 isDuplicate = true;
19736 }
19737 alreadySeenGetters[name] = true;
19738 break;
19739 case "set":
19740 if (alreadySeenData[name] || alreadySeenSetters[name]) {
19741 isDuplicate = true;
19742 }
19743 alreadySeenSetters[name] = true;
19744 break;
19745 default:
19746 if (alreadySeenData[name] || alreadySeenGetters[name] || alreadySeenSetters[name]) {
19747 isDuplicate = true;
19748 }
19749 alreadySeenData[name] = true;
19750 }
19751
19752 if (isDuplicate) {
19753 prop.computed = true;
19754 prop.key = t.stringLiteral(name);
19755 }
19756 }
19757 }
19758 }
19759 };
19760 };
19761
19762 var _babelTypes = __webpack_require__(1);
19763
19764 var t = _interopRequireWildcard(_babelTypes);
19765
19766 function _interopRequireWildcard(obj) {
19767 if (obj && obj.__esModule) {
19768 return obj;
19769 } else {
19770 var newObj = {};if (obj != null) {
19771 for (var key in obj) {
19772 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
19773 }
19774 }newObj.default = obj;return newObj;
19775 }
19776 }
19777
19778 function _interopRequireDefault(obj) {
19779 return obj && obj.__esModule ? obj : { default: obj };
19780 }
19781
19782 function getName(key) {
19783 if (t.isIdentifier(key)) {
19784 return key.name;
19785 }
19786 return key.value.toString();
19787 }
19788
19789 module.exports = exports["default"];
19790
19791/***/ }),
19792/* 131 */
19793/***/ (function(module, exports, __webpack_require__) {
19794
19795 "use strict";
19796
19797 exports.__esModule = true;
19798
19799 var _create = __webpack_require__(9);
19800
19801 var _create2 = _interopRequireDefault(_create);
19802
19803 exports.default = function (_ref) {
19804 var t = _ref.types;
19805
19806 function isValidRequireCall(path) {
19807 if (!path.isCallExpression()) return false;
19808 if (!path.get("callee").isIdentifier({ name: "require" })) return false;
19809 if (path.scope.getBinding("require")) return false;
19810
19811 var args = path.get("arguments");
19812 if (args.length !== 1) return false;
19813
19814 var arg = args[0];
19815 if (!arg.isStringLiteral()) return false;
19816
19817 return true;
19818 }
19819
19820 var amdVisitor = {
19821 ReferencedIdentifier: function ReferencedIdentifier(_ref2) {
19822 var node = _ref2.node,
19823 scope = _ref2.scope;
19824
19825 if (node.name === "exports" && !scope.getBinding("exports")) {
19826 this.hasExports = true;
19827 }
19828
19829 if (node.name === "module" && !scope.getBinding("module")) {
19830 this.hasModule = true;
19831 }
19832 },
19833 CallExpression: function CallExpression(path) {
19834 if (!isValidRequireCall(path)) return;
19835 this.bareSources.push(path.node.arguments[0]);
19836 path.remove();
19837 },
19838 VariableDeclarator: function VariableDeclarator(path) {
19839 var id = path.get("id");
19840 if (!id.isIdentifier()) return;
19841
19842 var init = path.get("init");
19843 if (!isValidRequireCall(init)) return;
19844
19845 var source = init.node.arguments[0];
19846 this.sourceNames[source.value] = true;
19847 this.sources.push([id.node, source]);
19848
19849 path.remove();
19850 }
19851 };
19852
19853 return {
19854 inherits: __webpack_require__(77),
19855
19856 pre: function pre() {
19857 this.sources = [];
19858 this.sourceNames = (0, _create2.default)(null);
19859
19860 this.bareSources = [];
19861
19862 this.hasExports = false;
19863 this.hasModule = false;
19864 },
19865
19866 visitor: {
19867 Program: {
19868 exit: function exit(path) {
19869 var _this = this;
19870
19871 if (this.ran) return;
19872 this.ran = true;
19873
19874 path.traverse(amdVisitor, this);
19875
19876 var params = this.sources.map(function (source) {
19877 return source[0];
19878 });
19879 var sources = this.sources.map(function (source) {
19880 return source[1];
19881 });
19882
19883 sources = sources.concat(this.bareSources.filter(function (str) {
19884 return !_this.sourceNames[str.value];
19885 }));
19886
19887 var moduleName = this.getModuleName();
19888 if (moduleName) moduleName = t.stringLiteral(moduleName);
19889
19890 if (this.hasExports) {
19891 sources.unshift(t.stringLiteral("exports"));
19892 params.unshift(t.identifier("exports"));
19893 }
19894
19895 if (this.hasModule) {
19896 sources.unshift(t.stringLiteral("module"));
19897 params.unshift(t.identifier("module"));
19898 }
19899
19900 var node = path.node;
19901
19902 var factory = buildFactory({
19903 PARAMS: params,
19904 BODY: node.body
19905 });
19906 factory.expression.body.directives = node.directives;
19907 node.directives = [];
19908
19909 node.body = [buildDefine({
19910 MODULE_NAME: moduleName,
19911 SOURCES: sources,
19912 FACTORY: factory
19913 })];
19914 }
19915 }
19916 }
19917 };
19918 };
19919
19920 var _babelTemplate = __webpack_require__(4);
19921
19922 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
19923
19924 function _interopRequireDefault(obj) {
19925 return obj && obj.__esModule ? obj : { default: obj };
19926 }
19927
19928 var buildDefine = (0, _babelTemplate2.default)("\n define(MODULE_NAME, [SOURCES], FACTORY);\n");
19929
19930 var buildFactory = (0, _babelTemplate2.default)("\n (function (PARAMS) {\n BODY;\n })\n");
19931
19932 module.exports = exports["default"];
19933
19934/***/ }),
19935/* 132 */
19936/***/ (function(module, exports, __webpack_require__) {
19937
19938 "use strict";
19939
19940 exports.__esModule = true;
19941
19942 exports.default = function (_ref) {
19943 var t = _ref.types;
19944
19945 return {
19946 inherits: __webpack_require__(199),
19947
19948 visitor: (0, _babelHelperBuilderBinaryAssignmentOperatorVisitor2.default)({
19949 operator: "**",
19950
19951 build: function build(left, right) {
19952 return t.callExpression(t.memberExpression(t.identifier("Math"), t.identifier("pow")), [left, right]);
19953 }
19954 })
19955 };
19956 };
19957
19958 var _babelHelperBuilderBinaryAssignmentOperatorVisitor = __webpack_require__(316);
19959
19960 var _babelHelperBuilderBinaryAssignmentOperatorVisitor2 = _interopRequireDefault(_babelHelperBuilderBinaryAssignmentOperatorVisitor);
19961
19962 function _interopRequireDefault(obj) {
19963 return obj && obj.__esModule ? obj : { default: obj };
19964 }
19965
19966 module.exports = exports["default"];
19967
19968/***/ }),
19969/* 133 */
19970/***/ (function(module, exports, __webpack_require__) {
19971
19972 "use strict";
19973
19974 module.exports = { "default": __webpack_require__(406), __esModule: true };
19975
19976/***/ }),
19977/* 134 */
19978/***/ (function(module, exports, __webpack_require__) {
19979
19980 "use strict";
19981
19982 exports.__esModule = true;
19983
19984 var _keys = __webpack_require__(14);
19985
19986 var _keys2 = _interopRequireDefault(_keys);
19987
19988 var _create = __webpack_require__(9);
19989
19990 var _create2 = _interopRequireDefault(_create);
19991
19992 var _map = __webpack_require__(133);
19993
19994 var _map2 = _interopRequireDefault(_map);
19995
19996 var _classCallCheck2 = __webpack_require__(3);
19997
19998 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
19999
20000 var _getIterator2 = __webpack_require__(2);
20001
20002 var _getIterator3 = _interopRequireDefault(_getIterator2);
20003
20004 var _includes = __webpack_require__(111);
20005
20006 var _includes2 = _interopRequireDefault(_includes);
20007
20008 var _repeat = __webpack_require__(278);
20009
20010 var _repeat2 = _interopRequireDefault(_repeat);
20011
20012 var _renamer = __webpack_require__(383);
20013
20014 var _renamer2 = _interopRequireDefault(_renamer);
20015
20016 var _index = __webpack_require__(7);
20017
20018 var _index2 = _interopRequireDefault(_index);
20019
20020 var _defaults = __webpack_require__(273);
20021
20022 var _defaults2 = _interopRequireDefault(_defaults);
20023
20024 var _babelMessages = __webpack_require__(20);
20025
20026 var messages = _interopRequireWildcard(_babelMessages);
20027
20028 var _binding2 = __webpack_require__(225);
20029
20030 var _binding3 = _interopRequireDefault(_binding2);
20031
20032 var _globals = __webpack_require__(463);
20033
20034 var _globals2 = _interopRequireDefault(_globals);
20035
20036 var _babelTypes = __webpack_require__(1);
20037
20038 var t = _interopRequireWildcard(_babelTypes);
20039
20040 var _cache = __webpack_require__(88);
20041
20042 function _interopRequireWildcard(obj) {
20043 if (obj && obj.__esModule) {
20044 return obj;
20045 } else {
20046 var newObj = {};if (obj != null) {
20047 for (var key in obj) {
20048 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
20049 }
20050 }newObj.default = obj;return newObj;
20051 }
20052 }
20053
20054 function _interopRequireDefault(obj) {
20055 return obj && obj.__esModule ? obj : { default: obj };
20056 }
20057
20058 var _crawlCallsCount = 0;
20059
20060 function getCache(path, parentScope, self) {
20061 var scopes = _cache.scope.get(path.node) || [];
20062
20063 for (var _iterator = scopes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
20064 var _ref;
20065
20066 if (_isArray) {
20067 if (_i >= _iterator.length) break;
20068 _ref = _iterator[_i++];
20069 } else {
20070 _i = _iterator.next();
20071 if (_i.done) break;
20072 _ref = _i.value;
20073 }
20074
20075 var scope = _ref;
20076
20077 if (scope.parent === parentScope && scope.path === path) return scope;
20078 }
20079
20080 scopes.push(self);
20081
20082 if (!_cache.scope.has(path.node)) {
20083 _cache.scope.set(path.node, scopes);
20084 }
20085 }
20086
20087 function gatherNodeParts(node, parts) {
20088 if (t.isModuleDeclaration(node)) {
20089 if (node.source) {
20090 gatherNodeParts(node.source, parts);
20091 } else if (node.specifiers && node.specifiers.length) {
20092 for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
20093 var _ref2;
20094
20095 if (_isArray2) {
20096 if (_i2 >= _iterator2.length) break;
20097 _ref2 = _iterator2[_i2++];
20098 } else {
20099 _i2 = _iterator2.next();
20100 if (_i2.done) break;
20101 _ref2 = _i2.value;
20102 }
20103
20104 var specifier = _ref2;
20105
20106 gatherNodeParts(specifier, parts);
20107 }
20108 } else if (node.declaration) {
20109 gatherNodeParts(node.declaration, parts);
20110 }
20111 } else if (t.isModuleSpecifier(node)) {
20112 gatherNodeParts(node.local, parts);
20113 } else if (t.isMemberExpression(node)) {
20114 gatherNodeParts(node.object, parts);
20115 gatherNodeParts(node.property, parts);
20116 } else if (t.isIdentifier(node)) {
20117 parts.push(node.name);
20118 } else if (t.isLiteral(node)) {
20119 parts.push(node.value);
20120 } else if (t.isCallExpression(node)) {
20121 gatherNodeParts(node.callee, parts);
20122 } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) {
20123 for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
20124 var _ref3;
20125
20126 if (_isArray3) {
20127 if (_i3 >= _iterator3.length) break;
20128 _ref3 = _iterator3[_i3++];
20129 } else {
20130 _i3 = _iterator3.next();
20131 if (_i3.done) break;
20132 _ref3 = _i3.value;
20133 }
20134
20135 var prop = _ref3;
20136
20137 gatherNodeParts(prop.key || prop.argument, parts);
20138 }
20139 }
20140 }
20141
20142 var collectorVisitor = {
20143 For: function For(path) {
20144 for (var _iterator4 = t.FOR_INIT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
20145 var _ref4;
20146
20147 if (_isArray4) {
20148 if (_i4 >= _iterator4.length) break;
20149 _ref4 = _iterator4[_i4++];
20150 } else {
20151 _i4 = _iterator4.next();
20152 if (_i4.done) break;
20153 _ref4 = _i4.value;
20154 }
20155
20156 var key = _ref4;
20157
20158 var declar = path.get(key);
20159 if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar);
20160 }
20161 },
20162 Declaration: function Declaration(path) {
20163 if (path.isBlockScoped()) return;
20164
20165 if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) return;
20166
20167 path.scope.getFunctionParent().registerDeclaration(path);
20168 },
20169 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
20170 state.references.push(path);
20171 },
20172 ForXStatement: function ForXStatement(path, state) {
20173 var left = path.get("left");
20174 if (left.isPattern() || left.isIdentifier()) {
20175 state.constantViolations.push(left);
20176 }
20177 },
20178
20179 ExportDeclaration: {
20180 exit: function exit(path) {
20181 var node = path.node,
20182 scope = path.scope;
20183
20184 var declar = node.declaration;
20185 if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) {
20186 var _id = declar.id;
20187 if (!_id) return;
20188
20189 var binding = scope.getBinding(_id.name);
20190 if (binding) binding.reference(path);
20191 } else if (t.isVariableDeclaration(declar)) {
20192 for (var _iterator5 = declar.declarations, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
20193 var _ref5;
20194
20195 if (_isArray5) {
20196 if (_i5 >= _iterator5.length) break;
20197 _ref5 = _iterator5[_i5++];
20198 } else {
20199 _i5 = _iterator5.next();
20200 if (_i5.done) break;
20201 _ref5 = _i5.value;
20202 }
20203
20204 var decl = _ref5;
20205
20206 var ids = t.getBindingIdentifiers(decl);
20207 for (var name in ids) {
20208 var _binding = scope.getBinding(name);
20209 if (_binding) _binding.reference(path);
20210 }
20211 }
20212 }
20213 }
20214 },
20215
20216 LabeledStatement: function LabeledStatement(path) {
20217 path.scope.getProgramParent().addGlobal(path.node);
20218 path.scope.getBlockParent().registerDeclaration(path);
20219 },
20220 AssignmentExpression: function AssignmentExpression(path, state) {
20221 state.assignments.push(path);
20222 },
20223 UpdateExpression: function UpdateExpression(path, state) {
20224 state.constantViolations.push(path.get("argument"));
20225 },
20226 UnaryExpression: function UnaryExpression(path, state) {
20227 if (path.node.operator === "delete") {
20228 state.constantViolations.push(path.get("argument"));
20229 }
20230 },
20231 BlockScoped: function BlockScoped(path) {
20232 var scope = path.scope;
20233 if (scope.path === path) scope = scope.parent;
20234 scope.getBlockParent().registerDeclaration(path);
20235 },
20236 ClassDeclaration: function ClassDeclaration(path) {
20237 var id = path.node.id;
20238 if (!id) return;
20239
20240 var name = id.name;
20241 path.scope.bindings[name] = path.scope.getBinding(name);
20242 },
20243 Block: function Block(path) {
20244 var paths = path.get("body");
20245 for (var _iterator6 = paths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
20246 var _ref6;
20247
20248 if (_isArray6) {
20249 if (_i6 >= _iterator6.length) break;
20250 _ref6 = _iterator6[_i6++];
20251 } else {
20252 _i6 = _iterator6.next();
20253 if (_i6.done) break;
20254 _ref6 = _i6.value;
20255 }
20256
20257 var bodyPath = _ref6;
20258
20259 if (bodyPath.isFunctionDeclaration()) {
20260 path.scope.getBlockParent().registerDeclaration(bodyPath);
20261 }
20262 }
20263 }
20264 };
20265
20266 var uid = 0;
20267
20268 var Scope = function () {
20269 function Scope(path, parentScope) {
20270 (0, _classCallCheck3.default)(this, Scope);
20271
20272 if (parentScope && parentScope.block === path.node) {
20273 return parentScope;
20274 }
20275
20276 var cached = getCache(path, parentScope, this);
20277 if (cached) return cached;
20278
20279 this.uid = uid++;
20280 this.parent = parentScope;
20281 this.hub = path.hub;
20282
20283 this.parentBlock = path.parent;
20284 this.block = path.node;
20285 this.path = path;
20286
20287 this.labels = new _map2.default();
20288 }
20289
20290 Scope.prototype.traverse = function traverse(node, opts, state) {
20291 (0, _index2.default)(node, opts, this, state, this.path);
20292 };
20293
20294 Scope.prototype.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier() {
20295 var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp";
20296
20297 var id = this.generateUidIdentifier(name);
20298 this.push({ id: id });
20299 return id;
20300 };
20301
20302 Scope.prototype.generateUidIdentifier = function generateUidIdentifier() {
20303 var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp";
20304
20305 return t.identifier(this.generateUid(name));
20306 };
20307
20308 Scope.prototype.generateUid = function generateUid() {
20309 var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp";
20310
20311 name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
20312
20313 var uid = void 0;
20314 var i = 0;
20315 do {
20316 uid = this._generateUid(name, i);
20317 i++;
20318 } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));
20319
20320 var program = this.getProgramParent();
20321 program.references[uid] = true;
20322 program.uids[uid] = true;
20323
20324 return uid;
20325 };
20326
20327 Scope.prototype._generateUid = function _generateUid(name, i) {
20328 var id = name;
20329 if (i > 1) id += i;
20330 return "_" + id;
20331 };
20332
20333 Scope.prototype.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) {
20334 var node = parent;
20335
20336 if (t.isAssignmentExpression(parent)) {
20337 node = parent.left;
20338 } else if (t.isVariableDeclarator(parent)) {
20339 node = parent.id;
20340 } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) {
20341 node = node.key;
20342 }
20343
20344 var parts = [];
20345 gatherNodeParts(node, parts);
20346
20347 var id = parts.join("$");
20348 id = id.replace(/^_/, "") || defaultName || "ref";
20349
20350 return this.generateUidIdentifier(id.slice(0, 20));
20351 };
20352
20353 Scope.prototype.isStatic = function isStatic(node) {
20354 if (t.isThisExpression(node) || t.isSuper(node)) {
20355 return true;
20356 }
20357
20358 if (t.isIdentifier(node)) {
20359 var binding = this.getBinding(node.name);
20360 if (binding) {
20361 return binding.constant;
20362 } else {
20363 return this.hasBinding(node.name);
20364 }
20365 }
20366
20367 return false;
20368 };
20369
20370 Scope.prototype.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) {
20371 if (this.isStatic(node)) {
20372 return null;
20373 } else {
20374 var _id2 = this.generateUidIdentifierBasedOnNode(node);
20375 if (!dontPush) this.push({ id: _id2 });
20376 return _id2;
20377 }
20378 };
20379
20380 Scope.prototype.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) {
20381 if (kind === "param") return;
20382
20383 if (kind === "hoisted" && local.kind === "let") return;
20384
20385 var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
20386
20387 if (duplicate) {
20388 throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError);
20389 }
20390 };
20391
20392 Scope.prototype.rename = function rename(oldName, newName, block) {
20393 var binding = this.getBinding(oldName);
20394 if (binding) {
20395 newName = newName || this.generateUidIdentifier(oldName).name;
20396 return new _renamer2.default(binding, oldName, newName).rename(block);
20397 }
20398 };
20399
20400 Scope.prototype._renameFromMap = function _renameFromMap(map, oldName, newName, value) {
20401 if (map[oldName]) {
20402 map[newName] = value;
20403 map[oldName] = null;
20404 }
20405 };
20406
20407 Scope.prototype.dump = function dump() {
20408 var sep = (0, _repeat2.default)("-", 60);
20409 console.log(sep);
20410 var scope = this;
20411 do {
20412 console.log("#", scope.block.type);
20413 for (var name in scope.bindings) {
20414 var binding = scope.bindings[name];
20415 console.log(" -", name, {
20416 constant: binding.constant,
20417 references: binding.references,
20418 violations: binding.constantViolations.length,
20419 kind: binding.kind
20420 });
20421 }
20422 } while (scope = scope.parent);
20423 console.log(sep);
20424 };
20425
20426 Scope.prototype.toArray = function toArray(node, i) {
20427 var file = this.hub.file;
20428
20429 if (t.isIdentifier(node)) {
20430 var binding = this.getBinding(node.name);
20431 if (binding && binding.constant && binding.path.isGenericType("Array")) return node;
20432 }
20433
20434 if (t.isArrayExpression(node)) {
20435 return node;
20436 }
20437
20438 if (t.isIdentifier(node, { name: "arguments" })) {
20439 return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]);
20440 }
20441
20442 var helperName = "toArray";
20443 var args = [node];
20444 if (i === true) {
20445 helperName = "toConsumableArray";
20446 } else if (i) {
20447 args.push(t.numericLiteral(i));
20448 helperName = "slicedToArray";
20449 }
20450 return t.callExpression(file.addHelper(helperName), args);
20451 };
20452
20453 Scope.prototype.hasLabel = function hasLabel(name) {
20454 return !!this.getLabel(name);
20455 };
20456
20457 Scope.prototype.getLabel = function getLabel(name) {
20458 return this.labels.get(name);
20459 };
20460
20461 Scope.prototype.registerLabel = function registerLabel(path) {
20462 this.labels.set(path.node.label.name, path);
20463 };
20464
20465 Scope.prototype.registerDeclaration = function registerDeclaration(path) {
20466 if (path.isLabeledStatement()) {
20467 this.registerLabel(path);
20468 } else if (path.isFunctionDeclaration()) {
20469 this.registerBinding("hoisted", path.get("id"), path);
20470 } else if (path.isVariableDeclaration()) {
20471 var declarations = path.get("declarations");
20472 for (var _iterator7 = declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
20473 var _ref7;
20474
20475 if (_isArray7) {
20476 if (_i7 >= _iterator7.length) break;
20477 _ref7 = _iterator7[_i7++];
20478 } else {
20479 _i7 = _iterator7.next();
20480 if (_i7.done) break;
20481 _ref7 = _i7.value;
20482 }
20483
20484 var declar = _ref7;
20485
20486 this.registerBinding(path.node.kind, declar);
20487 }
20488 } else if (path.isClassDeclaration()) {
20489 this.registerBinding("let", path);
20490 } else if (path.isImportDeclaration()) {
20491 var specifiers = path.get("specifiers");
20492 for (var _iterator8 = specifiers, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) {
20493 var _ref8;
20494
20495 if (_isArray8) {
20496 if (_i8 >= _iterator8.length) break;
20497 _ref8 = _iterator8[_i8++];
20498 } else {
20499 _i8 = _iterator8.next();
20500 if (_i8.done) break;
20501 _ref8 = _i8.value;
20502 }
20503
20504 var specifier = _ref8;
20505
20506 this.registerBinding("module", specifier);
20507 }
20508 } else if (path.isExportDeclaration()) {
20509 var _declar = path.get("declaration");
20510 if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) {
20511 this.registerDeclaration(_declar);
20512 }
20513 } else {
20514 this.registerBinding("unknown", path);
20515 }
20516 };
20517
20518 Scope.prototype.buildUndefinedNode = function buildUndefinedNode() {
20519 if (this.hasBinding("undefined")) {
20520 return t.unaryExpression("void", t.numericLiteral(0), true);
20521 } else {
20522 return t.identifier("undefined");
20523 }
20524 };
20525
20526 Scope.prototype.registerConstantViolation = function registerConstantViolation(path) {
20527 var ids = path.getBindingIdentifiers();
20528 for (var name in ids) {
20529 var binding = this.getBinding(name);
20530 if (binding) binding.reassign(path);
20531 }
20532 };
20533
20534 Scope.prototype.registerBinding = function registerBinding(kind, path) {
20535 var bindingPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : path;
20536
20537 if (!kind) throw new ReferenceError("no `kind`");
20538
20539 if (path.isVariableDeclaration()) {
20540 var declarators = path.get("declarations");
20541 for (var _iterator9 = declarators, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) {
20542 var _ref9;
20543
20544 if (_isArray9) {
20545 if (_i9 >= _iterator9.length) break;
20546 _ref9 = _iterator9[_i9++];
20547 } else {
20548 _i9 = _iterator9.next();
20549 if (_i9.done) break;
20550 _ref9 = _i9.value;
20551 }
20552
20553 var declar = _ref9;
20554
20555 this.registerBinding(kind, declar);
20556 }
20557 return;
20558 }
20559
20560 var parent = this.getProgramParent();
20561 var ids = path.getBindingIdentifiers(true);
20562
20563 for (var name in ids) {
20564 for (var _iterator10 = ids[name], _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) {
20565 var _ref10;
20566
20567 if (_isArray10) {
20568 if (_i10 >= _iterator10.length) break;
20569 _ref10 = _iterator10[_i10++];
20570 } else {
20571 _i10 = _iterator10.next();
20572 if (_i10.done) break;
20573 _ref10 = _i10.value;
20574 }
20575
20576 var _id3 = _ref10;
20577
20578 var local = this.getOwnBinding(name);
20579 if (local) {
20580 if (local.identifier === _id3) continue;
20581
20582 this.checkBlockScopedCollisions(local, kind, name, _id3);
20583 }
20584
20585 if (local && local.path.isFlow()) local = null;
20586
20587 parent.references[name] = true;
20588
20589 this.bindings[name] = new _binding3.default({
20590 identifier: _id3,
20591 existing: local,
20592 scope: this,
20593 path: bindingPath,
20594 kind: kind
20595 });
20596 }
20597 }
20598 };
20599
20600 Scope.prototype.addGlobal = function addGlobal(node) {
20601 this.globals[node.name] = node;
20602 };
20603
20604 Scope.prototype.hasUid = function hasUid(name) {
20605 var scope = this;
20606
20607 do {
20608 if (scope.uids[name]) return true;
20609 } while (scope = scope.parent);
20610
20611 return false;
20612 };
20613
20614 Scope.prototype.hasGlobal = function hasGlobal(name) {
20615 var scope = this;
20616
20617 do {
20618 if (scope.globals[name]) return true;
20619 } while (scope = scope.parent);
20620
20621 return false;
20622 };
20623
20624 Scope.prototype.hasReference = function hasReference(name) {
20625 var scope = this;
20626
20627 do {
20628 if (scope.references[name]) return true;
20629 } while (scope = scope.parent);
20630
20631 return false;
20632 };
20633
20634 Scope.prototype.isPure = function isPure(node, constantsOnly) {
20635 if (t.isIdentifier(node)) {
20636 var binding = this.getBinding(node.name);
20637 if (!binding) return false;
20638 if (constantsOnly) return binding.constant;
20639 return true;
20640 } else if (t.isClass(node)) {
20641 if (node.superClass && !this.isPure(node.superClass, constantsOnly)) return false;
20642 return this.isPure(node.body, constantsOnly);
20643 } else if (t.isClassBody(node)) {
20644 for (var _iterator11 = node.body, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, _getIterator3.default)(_iterator11);;) {
20645 var _ref11;
20646
20647 if (_isArray11) {
20648 if (_i11 >= _iterator11.length) break;
20649 _ref11 = _iterator11[_i11++];
20650 } else {
20651 _i11 = _iterator11.next();
20652 if (_i11.done) break;
20653 _ref11 = _i11.value;
20654 }
20655
20656 var method = _ref11;
20657
20658 if (!this.isPure(method, constantsOnly)) return false;
20659 }
20660 return true;
20661 } else if (t.isBinary(node)) {
20662 return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
20663 } else if (t.isArrayExpression(node)) {
20664 for (var _iterator12 = node.elements, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, _getIterator3.default)(_iterator12);;) {
20665 var _ref12;
20666
20667 if (_isArray12) {
20668 if (_i12 >= _iterator12.length) break;
20669 _ref12 = _iterator12[_i12++];
20670 } else {
20671 _i12 = _iterator12.next();
20672 if (_i12.done) break;
20673 _ref12 = _i12.value;
20674 }
20675
20676 var elem = _ref12;
20677
20678 if (!this.isPure(elem, constantsOnly)) return false;
20679 }
20680 return true;
20681 } else if (t.isObjectExpression(node)) {
20682 for (var _iterator13 = node.properties, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, _getIterator3.default)(_iterator13);;) {
20683 var _ref13;
20684
20685 if (_isArray13) {
20686 if (_i13 >= _iterator13.length) break;
20687 _ref13 = _iterator13[_i13++];
20688 } else {
20689 _i13 = _iterator13.next();
20690 if (_i13.done) break;
20691 _ref13 = _i13.value;
20692 }
20693
20694 var prop = _ref13;
20695
20696 if (!this.isPure(prop, constantsOnly)) return false;
20697 }
20698 return true;
20699 } else if (t.isClassMethod(node)) {
20700 if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
20701 if (node.kind === "get" || node.kind === "set") return false;
20702 return true;
20703 } else if (t.isClassProperty(node) || t.isObjectProperty(node)) {
20704 if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
20705 return this.isPure(node.value, constantsOnly);
20706 } else if (t.isUnaryExpression(node)) {
20707 return this.isPure(node.argument, constantsOnly);
20708 } else {
20709 return t.isPureish(node);
20710 }
20711 };
20712
20713 Scope.prototype.setData = function setData(key, val) {
20714 return this.data[key] = val;
20715 };
20716
20717 Scope.prototype.getData = function getData(key) {
20718 var scope = this;
20719 do {
20720 var data = scope.data[key];
20721 if (data != null) return data;
20722 } while (scope = scope.parent);
20723 };
20724
20725 Scope.prototype.removeData = function removeData(key) {
20726 var scope = this;
20727 do {
20728 var data = scope.data[key];
20729 if (data != null) scope.data[key] = null;
20730 } while (scope = scope.parent);
20731 };
20732
20733 Scope.prototype.init = function init() {
20734 if (!this.references) this.crawl();
20735 };
20736
20737 Scope.prototype.crawl = function crawl() {
20738 _crawlCallsCount++;
20739 this._crawl();
20740 _crawlCallsCount--;
20741 };
20742
20743 Scope.prototype._crawl = function _crawl() {
20744 var path = this.path;
20745
20746 this.references = (0, _create2.default)(null);
20747 this.bindings = (0, _create2.default)(null);
20748 this.globals = (0, _create2.default)(null);
20749 this.uids = (0, _create2.default)(null);
20750 this.data = (0, _create2.default)(null);
20751
20752 if (path.isLoop()) {
20753 for (var _iterator14 = t.FOR_INIT_KEYS, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, _getIterator3.default)(_iterator14);;) {
20754 var _ref14;
20755
20756 if (_isArray14) {
20757 if (_i14 >= _iterator14.length) break;
20758 _ref14 = _iterator14[_i14++];
20759 } else {
20760 _i14 = _iterator14.next();
20761 if (_i14.done) break;
20762 _ref14 = _i14.value;
20763 }
20764
20765 var key = _ref14;
20766
20767 var node = path.get(key);
20768 if (node.isBlockScoped()) this.registerBinding(node.node.kind, node);
20769 }
20770 }
20771
20772 if (path.isFunctionExpression() && path.has("id")) {
20773 if (!path.get("id").node[t.NOT_LOCAL_BINDING]) {
20774 this.registerBinding("local", path.get("id"), path);
20775 }
20776 }
20777
20778 if (path.isClassExpression() && path.has("id")) {
20779 if (!path.get("id").node[t.NOT_LOCAL_BINDING]) {
20780 this.registerBinding("local", path);
20781 }
20782 }
20783
20784 if (path.isFunction()) {
20785 var params = path.get("params");
20786 for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, _getIterator3.default)(_iterator15);;) {
20787 var _ref15;
20788
20789 if (_isArray15) {
20790 if (_i15 >= _iterator15.length) break;
20791 _ref15 = _iterator15[_i15++];
20792 } else {
20793 _i15 = _iterator15.next();
20794 if (_i15.done) break;
20795 _ref15 = _i15.value;
20796 }
20797
20798 var param = _ref15;
20799
20800 this.registerBinding("param", param);
20801 }
20802 }
20803
20804 if (path.isCatchClause()) {
20805 this.registerBinding("let", path);
20806 }
20807
20808 var parent = this.getProgramParent();
20809 if (parent.crawling) return;
20810
20811 var state = {
20812 references: [],
20813 constantViolations: [],
20814 assignments: []
20815 };
20816
20817 this.crawling = true;
20818 path.traverse(collectorVisitor, state);
20819 this.crawling = false;
20820
20821 for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, _getIterator3.default)(_iterator16);;) {
20822 var _ref16;
20823
20824 if (_isArray16) {
20825 if (_i16 >= _iterator16.length) break;
20826 _ref16 = _iterator16[_i16++];
20827 } else {
20828 _i16 = _iterator16.next();
20829 if (_i16.done) break;
20830 _ref16 = _i16.value;
20831 }
20832
20833 var _path = _ref16;
20834
20835 var ids = _path.getBindingIdentifiers();
20836 var programParent = void 0;
20837 for (var name in ids) {
20838 if (_path.scope.getBinding(name)) continue;
20839
20840 programParent = programParent || _path.scope.getProgramParent();
20841 programParent.addGlobal(ids[name]);
20842 }
20843
20844 _path.scope.registerConstantViolation(_path);
20845 }
20846
20847 for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : (0, _getIterator3.default)(_iterator17);;) {
20848 var _ref17;
20849
20850 if (_isArray17) {
20851 if (_i17 >= _iterator17.length) break;
20852 _ref17 = _iterator17[_i17++];
20853 } else {
20854 _i17 = _iterator17.next();
20855 if (_i17.done) break;
20856 _ref17 = _i17.value;
20857 }
20858
20859 var ref = _ref17;
20860
20861 var binding = ref.scope.getBinding(ref.node.name);
20862 if (binding) {
20863 binding.reference(ref);
20864 } else {
20865 ref.scope.getProgramParent().addGlobal(ref.node);
20866 }
20867 }
20868
20869 for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : (0, _getIterator3.default)(_iterator18);;) {
20870 var _ref18;
20871
20872 if (_isArray18) {
20873 if (_i18 >= _iterator18.length) break;
20874 _ref18 = _iterator18[_i18++];
20875 } else {
20876 _i18 = _iterator18.next();
20877 if (_i18.done) break;
20878 _ref18 = _i18.value;
20879 }
20880
20881 var _path2 = _ref18;
20882
20883 _path2.scope.registerConstantViolation(_path2);
20884 }
20885 };
20886
20887 Scope.prototype.push = function push(opts) {
20888 var path = this.path;
20889
20890 if (!path.isBlockStatement() && !path.isProgram()) {
20891 path = this.getBlockParent().path;
20892 }
20893
20894 if (path.isSwitchStatement()) {
20895 path = this.getFunctionParent().path;
20896 }
20897
20898 if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
20899 t.ensureBlock(path.node);
20900 path = path.get("body");
20901 }
20902
20903 var unique = opts.unique;
20904 var kind = opts.kind || "var";
20905 var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
20906
20907 var dataKey = "declaration:" + kind + ":" + blockHoist;
20908 var declarPath = !unique && path.getData(dataKey);
20909
20910 if (!declarPath) {
20911 var declar = t.variableDeclaration(kind, []);
20912 declar._generated = true;
20913 declar._blockHoist = blockHoist;
20914
20915 var _path$unshiftContaine = path.unshiftContainer("body", [declar]);
20916
20917 declarPath = _path$unshiftContaine[0];
20918
20919 if (!unique) path.setData(dataKey, declarPath);
20920 }
20921
20922 var declarator = t.variableDeclarator(opts.id, opts.init);
20923 declarPath.node.declarations.push(declarator);
20924 this.registerBinding(kind, declarPath.get("declarations").pop());
20925 };
20926
20927 Scope.prototype.getProgramParent = function getProgramParent() {
20928 var scope = this;
20929 do {
20930 if (scope.path.isProgram()) {
20931 return scope;
20932 }
20933 } while (scope = scope.parent);
20934 throw new Error("We couldn't find a Function or Program...");
20935 };
20936
20937 Scope.prototype.getFunctionParent = function getFunctionParent() {
20938 var scope = this;
20939 do {
20940 if (scope.path.isFunctionParent()) {
20941 return scope;
20942 }
20943 } while (scope = scope.parent);
20944 throw new Error("We couldn't find a Function or Program...");
20945 };
20946
20947 Scope.prototype.getBlockParent = function getBlockParent() {
20948 var scope = this;
20949 do {
20950 if (scope.path.isBlockParent()) {
20951 return scope;
20952 }
20953 } while (scope = scope.parent);
20954 throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
20955 };
20956
20957 Scope.prototype.getAllBindings = function getAllBindings() {
20958 var ids = (0, _create2.default)(null);
20959
20960 var scope = this;
20961 do {
20962 (0, _defaults2.default)(ids, scope.bindings);
20963 scope = scope.parent;
20964 } while (scope);
20965
20966 return ids;
20967 };
20968
20969 Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() {
20970 var ids = (0, _create2.default)(null);
20971
20972 for (var _iterator19 = arguments, _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : (0, _getIterator3.default)(_iterator19);;) {
20973 var _ref19;
20974
20975 if (_isArray19) {
20976 if (_i19 >= _iterator19.length) break;
20977 _ref19 = _iterator19[_i19++];
20978 } else {
20979 _i19 = _iterator19.next();
20980 if (_i19.done) break;
20981 _ref19 = _i19.value;
20982 }
20983
20984 var kind = _ref19;
20985
20986 var scope = this;
20987 do {
20988 for (var name in scope.bindings) {
20989 var binding = scope.bindings[name];
20990 if (binding.kind === kind) ids[name] = binding;
20991 }
20992 scope = scope.parent;
20993 } while (scope);
20994 }
20995
20996 return ids;
20997 };
20998
20999 Scope.prototype.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) {
21000 return this.getBindingIdentifier(name) === node;
21001 };
21002
21003 Scope.prototype.warnOnFlowBinding = function warnOnFlowBinding(binding) {
21004 if (_crawlCallsCount === 0 && binding && binding.path.isFlow()) {
21005 console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n ");
21006 }
21007 return binding;
21008 };
21009
21010 Scope.prototype.getBinding = function getBinding(name) {
21011 var scope = this;
21012
21013 do {
21014 var binding = scope.getOwnBinding(name);
21015 if (binding) return this.warnOnFlowBinding(binding);
21016 } while (scope = scope.parent);
21017 };
21018
21019 Scope.prototype.getOwnBinding = function getOwnBinding(name) {
21020 return this.warnOnFlowBinding(this.bindings[name]);
21021 };
21022
21023 Scope.prototype.getBindingIdentifier = function getBindingIdentifier(name) {
21024 var info = this.getBinding(name);
21025 return info && info.identifier;
21026 };
21027
21028 Scope.prototype.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) {
21029 var binding = this.bindings[name];
21030 return binding && binding.identifier;
21031 };
21032
21033 Scope.prototype.hasOwnBinding = function hasOwnBinding(name) {
21034 return !!this.getOwnBinding(name);
21035 };
21036
21037 Scope.prototype.hasBinding = function hasBinding(name, noGlobals) {
21038 if (!name) return false;
21039 if (this.hasOwnBinding(name)) return true;
21040 if (this.parentHasBinding(name, noGlobals)) return true;
21041 if (this.hasUid(name)) return true;
21042 if (!noGlobals && (0, _includes2.default)(Scope.globals, name)) return true;
21043 if (!noGlobals && (0, _includes2.default)(Scope.contextVariables, name)) return true;
21044 return false;
21045 };
21046
21047 Scope.prototype.parentHasBinding = function parentHasBinding(name, noGlobals) {
21048 return this.parent && this.parent.hasBinding(name, noGlobals);
21049 };
21050
21051 Scope.prototype.moveBindingTo = function moveBindingTo(name, scope) {
21052 var info = this.getBinding(name);
21053 if (info) {
21054 info.scope.removeOwnBinding(name);
21055 info.scope = scope;
21056 scope.bindings[name] = info;
21057 }
21058 };
21059
21060 Scope.prototype.removeOwnBinding = function removeOwnBinding(name) {
21061 delete this.bindings[name];
21062 };
21063
21064 Scope.prototype.removeBinding = function removeBinding(name) {
21065 var info = this.getBinding(name);
21066 if (info) {
21067 info.scope.removeOwnBinding(name);
21068 }
21069
21070 var scope = this;
21071 do {
21072 if (scope.uids[name]) {
21073 scope.uids[name] = false;
21074 }
21075 } while (scope = scope.parent);
21076 };
21077
21078 return Scope;
21079 }();
21080
21081 Scope.globals = (0, _keys2.default)(_globals2.default.builtin);
21082 Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
21083 exports.default = Scope;
21084 module.exports = exports["default"];
21085
21086/***/ }),
21087/* 135 */
21088/***/ (function(module, exports, __webpack_require__) {
21089
21090 "use strict";
21091
21092 exports.__esModule = true;
21093 exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
21094
21095 var _for = __webpack_require__(362);
21096
21097 var _for2 = _interopRequireDefault(_for);
21098
21099 function _interopRequireDefault(obj) {
21100 return obj && obj.__esModule ? obj : { default: obj };
21101 }
21102
21103 var STATEMENT_OR_BLOCK_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
21104 var FLATTENABLE_KEYS = exports.FLATTENABLE_KEYS = ["body", "expressions"];
21105 var FOR_INIT_KEYS = exports.FOR_INIT_KEYS = ["left", "init"];
21106 var COMMENT_KEYS = exports.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
21107
21108 var LOGICAL_OPERATORS = exports.LOGICAL_OPERATORS = ["||", "&&"];
21109 var UPDATE_OPERATORS = exports.UPDATE_OPERATORS = ["++", "--"];
21110
21111 var BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
21112 var EQUALITY_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
21113 var COMPARISON_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]);
21114 var BOOLEAN_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS);
21115 var NUMBER_BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
21116 var BINARY_OPERATORS = exports.BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS);
21117
21118 var BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
21119 var NUMBER_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = ["+", "-", "++", "--", "~"];
21120 var STRING_UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = ["typeof"];
21121 var UNARY_OPERATORS = exports.UNARY_OPERATORS = ["void"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS);
21122
21123 var INHERIT_KEYS = exports.INHERIT_KEYS = {
21124 optional: ["typeAnnotation", "typeParameters", "returnType"],
21125 force: ["start", "loc", "end"]
21126 };
21127
21128 var BLOCK_SCOPED_SYMBOL = exports.BLOCK_SCOPED_SYMBOL = (0, _for2.default)("var used to be block scoped");
21129 var NOT_LOCAL_BINDING = exports.NOT_LOCAL_BINDING = (0, _for2.default)("should not be considered a local binding");
21130
21131/***/ }),
21132/* 136 */
21133/***/ (function(module, exports) {
21134
21135 'use strict';
21136
21137 module.exports = function (it, Constructor, name, forbiddenField) {
21138 if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) {
21139 throw TypeError(name + ': incorrect invocation!');
21140 }return it;
21141 };
21142
21143/***/ }),
21144/* 137 */
21145/***/ (function(module, exports, __webpack_require__) {
21146
21147 'use strict';
21148
21149 // 0 -> Array#forEach
21150 // 1 -> Array#map
21151 // 2 -> Array#filter
21152 // 3 -> Array#some
21153 // 4 -> Array#every
21154 // 5 -> Array#find
21155 // 6 -> Array#findIndex
21156 var ctx = __webpack_require__(43);
21157 var IObject = __webpack_require__(142);
21158 var toObject = __webpack_require__(94);
21159 var toLength = __webpack_require__(153);
21160 var asc = __webpack_require__(422);
21161 module.exports = function (TYPE, $create) {
21162 var IS_MAP = TYPE == 1;
21163 var IS_FILTER = TYPE == 2;
21164 var IS_SOME = TYPE == 3;
21165 var IS_EVERY = TYPE == 4;
21166 var IS_FIND_INDEX = TYPE == 6;
21167 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
21168 var create = $create || asc;
21169 return function ($this, callbackfn, that) {
21170 var O = toObject($this);
21171 var self = IObject(O);
21172 var f = ctx(callbackfn, that, 3);
21173 var length = toLength(self.length);
21174 var index = 0;
21175 var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
21176 var val, res;
21177 for (; length > index; index++) {
21178 if (NO_HOLES || index in self) {
21179 val = self[index];
21180 res = f(val, index, O);
21181 if (TYPE) {
21182 if (IS_MAP) result[index] = res; // map
21183 else if (res) switch (TYPE) {
21184 case 3:
21185 return true; // some
21186 case 5:
21187 return val; // find
21188 case 6:
21189 return index; // findIndex
21190 case 2:
21191 result.push(val); // filter
21192 } else if (IS_EVERY) return false; // every
21193 }
21194 }
21195 }return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
21196 };
21197 };
21198
21199/***/ }),
21200/* 138 */
21201/***/ (function(module, exports) {
21202
21203 "use strict";
21204
21205 var toString = {}.toString;
21206
21207 module.exports = function (it) {
21208 return toString.call(it).slice(8, -1);
21209 };
21210
21211/***/ }),
21212/* 139 */
21213/***/ (function(module, exports, __webpack_require__) {
21214
21215 'use strict';
21216
21217 var global = __webpack_require__(15);
21218 var $export = __webpack_require__(12);
21219 var meta = __webpack_require__(57);
21220 var fails = __webpack_require__(27);
21221 var hide = __webpack_require__(29);
21222 var redefineAll = __webpack_require__(146);
21223 var forOf = __webpack_require__(55);
21224 var anInstance = __webpack_require__(136);
21225 var isObject = __webpack_require__(16);
21226 var setToStringTag = __webpack_require__(93);
21227 var dP = __webpack_require__(23).f;
21228 var each = __webpack_require__(137)(0);
21229 var DESCRIPTORS = __webpack_require__(22);
21230
21231 module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
21232 var Base = global[NAME];
21233 var C = Base;
21234 var ADDER = IS_MAP ? 'set' : 'add';
21235 var proto = C && C.prototype;
21236 var O = {};
21237 if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
21238 new C().entries().next();
21239 }))) {
21240 // create collection constructor
21241 C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
21242 redefineAll(C.prototype, methods);
21243 meta.NEED = true;
21244 } else {
21245 C = wrapper(function (target, iterable) {
21246 anInstance(target, C, NAME, '_c');
21247 target._c = new Base();
21248 if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);
21249 });
21250 each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {
21251 var IS_ADDER = KEY == 'add' || KEY == 'set';
21252 if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {
21253 anInstance(this, C, KEY);
21254 if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;
21255 var result = this._c[KEY](a === 0 ? 0 : a, b);
21256 return IS_ADDER ? this : result;
21257 });
21258 });
21259 IS_WEAK || dP(C.prototype, 'size', {
21260 get: function get() {
21261 return this._c.size;
21262 }
21263 });
21264 }
21265
21266 setToStringTag(C, NAME);
21267
21268 O[NAME] = C;
21269 $export($export.G + $export.W + $export.F, O);
21270
21271 if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
21272
21273 return C;
21274 };
21275
21276/***/ }),
21277/* 140 */
21278/***/ (function(module, exports) {
21279
21280 "use strict";
21281
21282 // 7.2.1 RequireObjectCoercible(argument)
21283 module.exports = function (it) {
21284 if (it == undefined) throw TypeError("Can't call method on " + it);
21285 return it;
21286 };
21287
21288/***/ }),
21289/* 141 */
21290/***/ (function(module, exports) {
21291
21292 'use strict';
21293
21294 // IE 8- don't enum bug keys
21295 module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');
21296
21297/***/ }),
21298/* 142 */
21299/***/ (function(module, exports, __webpack_require__) {
21300
21301 'use strict';
21302
21303 // fallback for non-array-like ES3 and non-enumerable old V8 strings
21304 var cof = __webpack_require__(138);
21305 // eslint-disable-next-line no-prototype-builtins
21306 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
21307 return cof(it) == 'String' ? it.split('') : Object(it);
21308 };
21309
21310/***/ }),
21311/* 143 */
21312/***/ (function(module, exports, __webpack_require__) {
21313
21314 'use strict';
21315
21316 var LIBRARY = __webpack_require__(144);
21317 var $export = __webpack_require__(12);
21318 var redefine = __webpack_require__(147);
21319 var hide = __webpack_require__(29);
21320 var has = __webpack_require__(28);
21321 var Iterators = __webpack_require__(56);
21322 var $iterCreate = __webpack_require__(429);
21323 var setToStringTag = __webpack_require__(93);
21324 var getPrototypeOf = __webpack_require__(433);
21325 var ITERATOR = __webpack_require__(13)('iterator');
21326 var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
21327 var FF_ITERATOR = '@@iterator';
21328 var KEYS = 'keys';
21329 var VALUES = 'values';
21330
21331 var returnThis = function returnThis() {
21332 return this;
21333 };
21334
21335 module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
21336 $iterCreate(Constructor, NAME, next);
21337 var getMethod = function getMethod(kind) {
21338 if (!BUGGY && kind in proto) return proto[kind];
21339 switch (kind) {
21340 case KEYS:
21341 return function keys() {
21342 return new Constructor(this, kind);
21343 };
21344 case VALUES:
21345 return function values() {
21346 return new Constructor(this, kind);
21347 };
21348 }return function entries() {
21349 return new Constructor(this, kind);
21350 };
21351 };
21352 var TAG = NAME + ' Iterator';
21353 var DEF_VALUES = DEFAULT == VALUES;
21354 var VALUES_BUG = false;
21355 var proto = Base.prototype;
21356 var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
21357 var $default = $native || getMethod(DEFAULT);
21358 var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
21359 var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
21360 var methods, key, IteratorPrototype;
21361 // Fix native
21362 if ($anyNative) {
21363 IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
21364 if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
21365 // Set @@toStringTag to native iterators
21366 setToStringTag(IteratorPrototype, TAG, true);
21367 // fix for some old engines
21368 if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
21369 }
21370 }
21371 // fix Array#{values, @@iterator}.name in V8 / FF
21372 if (DEF_VALUES && $native && $native.name !== VALUES) {
21373 VALUES_BUG = true;
21374 $default = function values() {
21375 return $native.call(this);
21376 };
21377 }
21378 // Define iterator
21379 if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
21380 hide(proto, ITERATOR, $default);
21381 }
21382 // Plug for library
21383 Iterators[NAME] = $default;
21384 Iterators[TAG] = returnThis;
21385 if (DEFAULT) {
21386 methods = {
21387 values: DEF_VALUES ? $default : getMethod(VALUES),
21388 keys: IS_SET ? $default : getMethod(KEYS),
21389 entries: $entries
21390 };
21391 if (FORCED) for (key in methods) {
21392 if (!(key in proto)) redefine(proto, key, methods[key]);
21393 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
21394 }
21395 return methods;
21396 };
21397
21398/***/ }),
21399/* 144 */
21400/***/ (function(module, exports) {
21401
21402 "use strict";
21403
21404 module.exports = true;
21405
21406/***/ }),
21407/* 145 */
21408/***/ (function(module, exports) {
21409
21410 "use strict";
21411
21412 exports.f = Object.getOwnPropertySymbols;
21413
21414/***/ }),
21415/* 146 */
21416/***/ (function(module, exports, __webpack_require__) {
21417
21418 'use strict';
21419
21420 var hide = __webpack_require__(29);
21421 module.exports = function (target, src, safe) {
21422 for (var key in src) {
21423 if (safe && target[key]) target[key] = src[key];else hide(target, key, src[key]);
21424 }return target;
21425 };
21426
21427/***/ }),
21428/* 147 */
21429/***/ (function(module, exports, __webpack_require__) {
21430
21431 'use strict';
21432
21433 module.exports = __webpack_require__(29);
21434
21435/***/ }),
21436/* 148 */
21437/***/ (function(module, exports, __webpack_require__) {
21438
21439 'use strict';
21440 // https://tc39.github.io/proposal-setmap-offrom/
21441
21442 var $export = __webpack_require__(12);
21443 var aFunction = __webpack_require__(227);
21444 var ctx = __webpack_require__(43);
21445 var forOf = __webpack_require__(55);
21446
21447 module.exports = function (COLLECTION) {
21448 $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
21449 var mapFn = arguments[1];
21450 var mapping, A, n, cb;
21451 aFunction(this);
21452 mapping = mapFn !== undefined;
21453 if (mapping) aFunction(mapFn);
21454 if (source == undefined) return new this();
21455 A = [];
21456 if (mapping) {
21457 n = 0;
21458 cb = ctx(mapFn, arguments[2], 2);
21459 forOf(source, false, function (nextItem) {
21460 A.push(cb(nextItem, n++));
21461 });
21462 } else {
21463 forOf(source, false, A.push, A);
21464 }
21465 return new this(A);
21466 } });
21467 };
21468
21469/***/ }),
21470/* 149 */
21471/***/ (function(module, exports, __webpack_require__) {
21472
21473 'use strict';
21474 // https://tc39.github.io/proposal-setmap-offrom/
21475
21476 var $export = __webpack_require__(12);
21477
21478 module.exports = function (COLLECTION) {
21479 $export($export.S, COLLECTION, { of: function of() {
21480 var length = arguments.length;
21481 var A = Array(length);
21482 while (length--) {
21483 A[length] = arguments[length];
21484 }return new this(A);
21485 } });
21486 };
21487
21488/***/ }),
21489/* 150 */
21490/***/ (function(module, exports, __webpack_require__) {
21491
21492 'use strict';
21493
21494 var shared = __webpack_require__(151)('keys');
21495 var uid = __webpack_require__(95);
21496 module.exports = function (key) {
21497 return shared[key] || (shared[key] = uid(key));
21498 };
21499
21500/***/ }),
21501/* 151 */
21502/***/ (function(module, exports, __webpack_require__) {
21503
21504 'use strict';
21505
21506 var global = __webpack_require__(15);
21507 var SHARED = '__core-js_shared__';
21508 var store = global[SHARED] || (global[SHARED] = {});
21509 module.exports = function (key) {
21510 return store[key] || (store[key] = {});
21511 };
21512
21513/***/ }),
21514/* 152 */
21515/***/ (function(module, exports) {
21516
21517 "use strict";
21518
21519 // 7.1.4 ToInteger
21520 var ceil = Math.ceil;
21521 var floor = Math.floor;
21522 module.exports = function (it) {
21523 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
21524 };
21525
21526/***/ }),
21527/* 153 */
21528/***/ (function(module, exports, __webpack_require__) {
21529
21530 'use strict';
21531
21532 // 7.1.15 ToLength
21533 var toInteger = __webpack_require__(152);
21534 var min = Math.min;
21535 module.exports = function (it) {
21536 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
21537 };
21538
21539/***/ }),
21540/* 154 */
21541/***/ (function(module, exports, __webpack_require__) {
21542
21543 'use strict';
21544
21545 // 7.1.1 ToPrimitive(input [, PreferredType])
21546 var isObject = __webpack_require__(16);
21547 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
21548 // and the second argument - flag - preferred type is a string
21549 module.exports = function (it, S) {
21550 if (!isObject(it)) return it;
21551 var fn, val;
21552 if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
21553 if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
21554 if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
21555 throw TypeError("Can't convert object to primitive value");
21556 };
21557
21558/***/ }),
21559/* 155 */
21560/***/ (function(module, exports, __webpack_require__) {
21561
21562 'use strict';
21563
21564 var global = __webpack_require__(15);
21565 var core = __webpack_require__(5);
21566 var LIBRARY = __webpack_require__(144);
21567 var wksExt = __webpack_require__(156);
21568 var defineProperty = __webpack_require__(23).f;
21569 module.exports = function (name) {
21570 var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
21571 if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
21572 };
21573
21574/***/ }),
21575/* 156 */
21576/***/ (function(module, exports, __webpack_require__) {
21577
21578 'use strict';
21579
21580 exports.f = __webpack_require__(13);
21581
21582/***/ }),
21583/* 157 */
21584/***/ (function(module, exports, __webpack_require__) {
21585
21586 'use strict';
21587
21588 var $at = __webpack_require__(437)(true);
21589
21590 // 21.1.3.27 String.prototype[@@iterator]()
21591 __webpack_require__(143)(String, 'String', function (iterated) {
21592 this._t = String(iterated); // target
21593 this._i = 0; // next index
21594 // 21.1.5.2.1 %StringIteratorPrototype%.next()
21595 }, function () {
21596 var O = this._t;
21597 var index = this._i;
21598 var point;
21599 if (index >= O.length) return { value: undefined, done: true };
21600 point = $at(O, index);
21601 this._i += point.length;
21602 return { value: point, done: false };
21603 });
21604
21605/***/ }),
21606/* 158 */
21607/***/ (function(module, exports, __webpack_require__) {
21608
21609 'use strict';
21610 // ECMAScript 6 symbols shim
21611
21612 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
21613
21614 var global = __webpack_require__(15);
21615 var has = __webpack_require__(28);
21616 var DESCRIPTORS = __webpack_require__(22);
21617 var $export = __webpack_require__(12);
21618 var redefine = __webpack_require__(147);
21619 var META = __webpack_require__(57).KEY;
21620 var $fails = __webpack_require__(27);
21621 var shared = __webpack_require__(151);
21622 var setToStringTag = __webpack_require__(93);
21623 var uid = __webpack_require__(95);
21624 var wks = __webpack_require__(13);
21625 var wksExt = __webpack_require__(156);
21626 var wksDefine = __webpack_require__(155);
21627 var keyOf = __webpack_require__(430);
21628 var enumKeys = __webpack_require__(425);
21629 var isArray = __webpack_require__(232);
21630 var anObject = __webpack_require__(21);
21631 var toIObject = __webpack_require__(37);
21632 var toPrimitive = __webpack_require__(154);
21633 var createDesc = __webpack_require__(92);
21634 var _create = __webpack_require__(90);
21635 var gOPNExt = __webpack_require__(432);
21636 var $GOPD = __webpack_require__(235);
21637 var $DP = __webpack_require__(23);
21638 var $keys = __webpack_require__(44);
21639 var gOPD = $GOPD.f;
21640 var dP = $DP.f;
21641 var gOPN = gOPNExt.f;
21642 var $Symbol = global.Symbol;
21643 var $JSON = global.JSON;
21644 var _stringify = $JSON && $JSON.stringify;
21645 var PROTOTYPE = 'prototype';
21646 var HIDDEN = wks('_hidden');
21647 var TO_PRIMITIVE = wks('toPrimitive');
21648 var isEnum = {}.propertyIsEnumerable;
21649 var SymbolRegistry = shared('symbol-registry');
21650 var AllSymbols = shared('symbols');
21651 var OPSymbols = shared('op-symbols');
21652 var ObjectProto = Object[PROTOTYPE];
21653 var USE_NATIVE = typeof $Symbol == 'function';
21654 var QObject = global.QObject;
21655 // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
21656 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
21657
21658 // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
21659 var setSymbolDesc = DESCRIPTORS && $fails(function () {
21660 return _create(dP({}, 'a', {
21661 get: function get() {
21662 return dP(this, 'a', { value: 7 }).a;
21663 }
21664 })).a != 7;
21665 }) ? function (it, key, D) {
21666 var protoDesc = gOPD(ObjectProto, key);
21667 if (protoDesc) delete ObjectProto[key];
21668 dP(it, key, D);
21669 if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
21670 } : dP;
21671
21672 var wrap = function wrap(tag) {
21673 var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
21674 sym._k = tag;
21675 return sym;
21676 };
21677
21678 var isSymbol = USE_NATIVE && _typeof($Symbol.iterator) == 'symbol' ? function (it) {
21679 return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol';
21680 } : function (it) {
21681 return it instanceof $Symbol;
21682 };
21683
21684 var $defineProperty = function defineProperty(it, key, D) {
21685 if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
21686 anObject(it);
21687 key = toPrimitive(key, true);
21688 anObject(D);
21689 if (has(AllSymbols, key)) {
21690 if (!D.enumerable) {
21691 if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
21692 it[HIDDEN][key] = true;
21693 } else {
21694 if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
21695 D = _create(D, { enumerable: createDesc(0, false) });
21696 }return setSymbolDesc(it, key, D);
21697 }return dP(it, key, D);
21698 };
21699 var $defineProperties = function defineProperties(it, P) {
21700 anObject(it);
21701 var keys = enumKeys(P = toIObject(P));
21702 var i = 0;
21703 var l = keys.length;
21704 var key;
21705 while (l > i) {
21706 $defineProperty(it, key = keys[i++], P[key]);
21707 }return it;
21708 };
21709 var $create = function create(it, P) {
21710 return P === undefined ? _create(it) : $defineProperties(_create(it), P);
21711 };
21712 var $propertyIsEnumerable = function propertyIsEnumerable(key) {
21713 var E = isEnum.call(this, key = toPrimitive(key, true));
21714 if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
21715 return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
21716 };
21717 var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
21718 it = toIObject(it);
21719 key = toPrimitive(key, true);
21720 if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
21721 var D = gOPD(it, key);
21722 if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
21723 return D;
21724 };
21725 var $getOwnPropertyNames = function getOwnPropertyNames(it) {
21726 var names = gOPN(toIObject(it));
21727 var result = [];
21728 var i = 0;
21729 var key;
21730 while (names.length > i) {
21731 if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
21732 }return result;
21733 };
21734 var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
21735 var IS_OP = it === ObjectProto;
21736 var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
21737 var result = [];
21738 var i = 0;
21739 var key;
21740 while (names.length > i) {
21741 if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
21742 }return result;
21743 };
21744
21745 // 19.4.1.1 Symbol([description])
21746 if (!USE_NATIVE) {
21747 $Symbol = function _Symbol() {
21748 if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
21749 var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
21750 var $set = function $set(value) {
21751 if (this === ObjectProto) $set.call(OPSymbols, value);
21752 if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
21753 setSymbolDesc(this, tag, createDesc(1, value));
21754 };
21755 if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
21756 return wrap(tag);
21757 };
21758 redefine($Symbol[PROTOTYPE], 'toString', function toString() {
21759 return this._k;
21760 });
21761
21762 $GOPD.f = $getOwnPropertyDescriptor;
21763 $DP.f = $defineProperty;
21764 __webpack_require__(236).f = gOPNExt.f = $getOwnPropertyNames;
21765 __webpack_require__(91).f = $propertyIsEnumerable;
21766 __webpack_require__(145).f = $getOwnPropertySymbols;
21767
21768 if (DESCRIPTORS && !__webpack_require__(144)) {
21769 redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
21770 }
21771
21772 wksExt.f = function (name) {
21773 return wrap(wks(name));
21774 };
21775 }
21776
21777 $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
21778
21779 for (var es6Symbols =
21780 // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
21781 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) {
21782 wks(es6Symbols[j++]);
21783 }for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) {
21784 wksDefine(wellKnownSymbols[k++]);
21785 }$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
21786 // 19.4.2.1 Symbol.for(key)
21787 'for': function _for(key) {
21788 return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);
21789 },
21790 // 19.4.2.5 Symbol.keyFor(sym)
21791 keyFor: function keyFor(key) {
21792 if (isSymbol(key)) return keyOf(SymbolRegistry, key);
21793 throw TypeError(key + ' is not a symbol!');
21794 },
21795 useSetter: function useSetter() {
21796 setter = true;
21797 },
21798 useSimple: function useSimple() {
21799 setter = false;
21800 }
21801 });
21802
21803 $export($export.S + $export.F * !USE_NATIVE, 'Object', {
21804 // 19.1.2.2 Object.create(O [, Properties])
21805 create: $create,
21806 // 19.1.2.4 Object.defineProperty(O, P, Attributes)
21807 defineProperty: $defineProperty,
21808 // 19.1.2.3 Object.defineProperties(O, Properties)
21809 defineProperties: $defineProperties,
21810 // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
21811 getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
21812 // 19.1.2.7 Object.getOwnPropertyNames(O)
21813 getOwnPropertyNames: $getOwnPropertyNames,
21814 // 19.1.2.8 Object.getOwnPropertySymbols(O)
21815 getOwnPropertySymbols: $getOwnPropertySymbols
21816 });
21817
21818 // 24.3.2 JSON.stringify(value [, replacer [, space]])
21819 $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
21820 var S = $Symbol();
21821 // MS Edge converts symbol values to JSON as {}
21822 // WebKit converts symbol values to JSON as null
21823 // V8 throws on boxed symbols
21824 return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
21825 })), 'JSON', {
21826 stringify: function stringify(it) {
21827 if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
21828 var args = [it];
21829 var i = 1;
21830 var replacer, $replacer;
21831 while (arguments.length > i) {
21832 args.push(arguments[i++]);
21833 }replacer = args[1];
21834 if (typeof replacer == 'function') $replacer = replacer;
21835 if ($replacer || !isArray(replacer)) replacer = function replacer(key, value) {
21836 if ($replacer) value = $replacer.call(this, key, value);
21837 if (!isSymbol(value)) return value;
21838 };
21839 args[1] = replacer;
21840 return _stringify.apply($JSON, args);
21841 }
21842 });
21843
21844 // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
21845 $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(29)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
21846 // 19.4.3.5 Symbol.prototype[@@toStringTag]
21847 setToStringTag($Symbol, 'Symbol');
21848 // 20.2.1.9 Math[@@toStringTag]
21849 setToStringTag(Math, 'Math', true);
21850 // 24.3.3 JSON[@@toStringTag]
21851 setToStringTag(global.JSON, 'JSON', true);
21852
21853/***/ }),
21854/* 159 */
21855/***/ (function(module, exports, __webpack_require__) {
21856
21857 'use strict';
21858
21859 var getNative = __webpack_require__(38),
21860 root = __webpack_require__(17);
21861
21862 /* Built-in method references that are verified to be native. */
21863 var Map = getNative(root, 'Map');
21864
21865 module.exports = Map;
21866
21867/***/ }),
21868/* 160 */
21869/***/ (function(module, exports, __webpack_require__) {
21870
21871 'use strict';
21872
21873 var mapCacheClear = __webpack_require__(551),
21874 mapCacheDelete = __webpack_require__(552),
21875 mapCacheGet = __webpack_require__(553),
21876 mapCacheHas = __webpack_require__(554),
21877 mapCacheSet = __webpack_require__(555);
21878
21879 /**
21880 * Creates a map cache object to store key-value pairs.
21881 *
21882 * @private
21883 * @constructor
21884 * @param {Array} [entries] The key-value pairs to cache.
21885 */
21886 function MapCache(entries) {
21887 var index = -1,
21888 length = entries == null ? 0 : entries.length;
21889
21890 this.clear();
21891 while (++index < length) {
21892 var entry = entries[index];
21893 this.set(entry[0], entry[1]);
21894 }
21895 }
21896
21897 // Add methods to `MapCache`.
21898 MapCache.prototype.clear = mapCacheClear;
21899 MapCache.prototype['delete'] = mapCacheDelete;
21900 MapCache.prototype.get = mapCacheGet;
21901 MapCache.prototype.has = mapCacheHas;
21902 MapCache.prototype.set = mapCacheSet;
21903
21904 module.exports = MapCache;
21905
21906/***/ }),
21907/* 161 */
21908/***/ (function(module, exports) {
21909
21910 "use strict";
21911
21912 /**
21913 * Appends the elements of `values` to `array`.
21914 *
21915 * @private
21916 * @param {Array} array The array to modify.
21917 * @param {Array} values The values to append.
21918 * @returns {Array} Returns `array`.
21919 */
21920 function arrayPush(array, values) {
21921 var index = -1,
21922 length = values.length,
21923 offset = array.length;
21924
21925 while (++index < length) {
21926 array[offset + index] = values[index];
21927 }
21928 return array;
21929 }
21930
21931 module.exports = arrayPush;
21932
21933/***/ }),
21934/* 162 */
21935/***/ (function(module, exports, __webpack_require__) {
21936
21937 'use strict';
21938
21939 var baseAssignValue = __webpack_require__(163),
21940 eq = __webpack_require__(46);
21941
21942 /** Used for built-in method references. */
21943 var objectProto = Object.prototype;
21944
21945 /** Used to check objects for own properties. */
21946 var hasOwnProperty = objectProto.hasOwnProperty;
21947
21948 /**
21949 * Assigns `value` to `key` of `object` if the existing value is not equivalent
21950 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
21951 * for equality comparisons.
21952 *
21953 * @private
21954 * @param {Object} object The object to modify.
21955 * @param {string} key The key of the property to assign.
21956 * @param {*} value The value to assign.
21957 */
21958 function assignValue(object, key, value) {
21959 var objValue = object[key];
21960 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
21961 baseAssignValue(object, key, value);
21962 }
21963 }
21964
21965 module.exports = assignValue;
21966
21967/***/ }),
21968/* 163 */
21969/***/ (function(module, exports, __webpack_require__) {
21970
21971 'use strict';
21972
21973 var defineProperty = __webpack_require__(259);
21974
21975 /**
21976 * The base implementation of `assignValue` and `assignMergeValue` without
21977 * value checks.
21978 *
21979 * @private
21980 * @param {Object} object The object to modify.
21981 * @param {string} key The key of the property to assign.
21982 * @param {*} value The value to assign.
21983 */
21984 function baseAssignValue(object, key, value) {
21985 if (key == '__proto__' && defineProperty) {
21986 defineProperty(object, key, {
21987 'configurable': true,
21988 'enumerable': true,
21989 'value': value,
21990 'writable': true
21991 });
21992 } else {
21993 object[key] = value;
21994 }
21995 }
21996
21997 module.exports = baseAssignValue;
21998
21999/***/ }),
22000/* 164 */
22001/***/ (function(module, exports, __webpack_require__) {
22002
22003 'use strict';
22004
22005 var Stack = __webpack_require__(99),
22006 arrayEach = __webpack_require__(478),
22007 assignValue = __webpack_require__(162),
22008 baseAssign = __webpack_require__(483),
22009 baseAssignIn = __webpack_require__(484),
22010 cloneBuffer = __webpack_require__(256),
22011 copyArray = __webpack_require__(168),
22012 copySymbols = __webpack_require__(523),
22013 copySymbolsIn = __webpack_require__(524),
22014 getAllKeys = __webpack_require__(262),
22015 getAllKeysIn = __webpack_require__(532),
22016 getTag = __webpack_require__(264),
22017 initCloneArray = __webpack_require__(541),
22018 initCloneByTag = __webpack_require__(542),
22019 initCloneObject = __webpack_require__(266),
22020 isArray = __webpack_require__(6),
22021 isBuffer = __webpack_require__(113),
22022 isObject = __webpack_require__(18),
22023 keys = __webpack_require__(32);
22024
22025 /** Used to compose bitmasks for cloning. */
22026 var CLONE_DEEP_FLAG = 1,
22027 CLONE_FLAT_FLAG = 2,
22028 CLONE_SYMBOLS_FLAG = 4;
22029
22030 /** `Object#toString` result references. */
22031 var argsTag = '[object Arguments]',
22032 arrayTag = '[object Array]',
22033 boolTag = '[object Boolean]',
22034 dateTag = '[object Date]',
22035 errorTag = '[object Error]',
22036 funcTag = '[object Function]',
22037 genTag = '[object GeneratorFunction]',
22038 mapTag = '[object Map]',
22039 numberTag = '[object Number]',
22040 objectTag = '[object Object]',
22041 regexpTag = '[object RegExp]',
22042 setTag = '[object Set]',
22043 stringTag = '[object String]',
22044 symbolTag = '[object Symbol]',
22045 weakMapTag = '[object WeakMap]';
22046
22047 var arrayBufferTag = '[object ArrayBuffer]',
22048 dataViewTag = '[object DataView]',
22049 float32Tag = '[object Float32Array]',
22050 float64Tag = '[object Float64Array]',
22051 int8Tag = '[object Int8Array]',
22052 int16Tag = '[object Int16Array]',
22053 int32Tag = '[object Int32Array]',
22054 uint8Tag = '[object Uint8Array]',
22055 uint8ClampedTag = '[object Uint8ClampedArray]',
22056 uint16Tag = '[object Uint16Array]',
22057 uint32Tag = '[object Uint32Array]';
22058
22059 /** Used to identify `toStringTag` values supported by `_.clone`. */
22060 var cloneableTags = {};
22061 cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
22062 cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
22063
22064 /**
22065 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
22066 * traversed objects.
22067 *
22068 * @private
22069 * @param {*} value The value to clone.
22070 * @param {boolean} bitmask The bitmask flags.
22071 * 1 - Deep clone
22072 * 2 - Flatten inherited properties
22073 * 4 - Clone symbols
22074 * @param {Function} [customizer] The function to customize cloning.
22075 * @param {string} [key] The key of `value`.
22076 * @param {Object} [object] The parent object of `value`.
22077 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
22078 * @returns {*} Returns the cloned value.
22079 */
22080 function baseClone(value, bitmask, customizer, key, object, stack) {
22081 var result,
22082 isDeep = bitmask & CLONE_DEEP_FLAG,
22083 isFlat = bitmask & CLONE_FLAT_FLAG,
22084 isFull = bitmask & CLONE_SYMBOLS_FLAG;
22085
22086 if (customizer) {
22087 result = object ? customizer(value, key, object, stack) : customizer(value);
22088 }
22089 if (result !== undefined) {
22090 return result;
22091 }
22092 if (!isObject(value)) {
22093 return value;
22094 }
22095 var isArr = isArray(value);
22096 if (isArr) {
22097 result = initCloneArray(value);
22098 if (!isDeep) {
22099 return copyArray(value, result);
22100 }
22101 } else {
22102 var tag = getTag(value),
22103 isFunc = tag == funcTag || tag == genTag;
22104
22105 if (isBuffer(value)) {
22106 return cloneBuffer(value, isDeep);
22107 }
22108 if (tag == objectTag || tag == argsTag || isFunc && !object) {
22109 result = isFlat || isFunc ? {} : initCloneObject(value);
22110 if (!isDeep) {
22111 return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
22112 }
22113 } else {
22114 if (!cloneableTags[tag]) {
22115 return object ? value : {};
22116 }
22117 result = initCloneByTag(value, tag, baseClone, isDeep);
22118 }
22119 }
22120 // Check for circular references and return its corresponding clone.
22121 stack || (stack = new Stack());
22122 var stacked = stack.get(value);
22123 if (stacked) {
22124 return stacked;
22125 }
22126 stack.set(value, result);
22127
22128 var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
22129
22130 var props = isArr ? undefined : keysFunc(value);
22131 arrayEach(props || value, function (subValue, key) {
22132 if (props) {
22133 key = subValue;
22134 subValue = value[key];
22135 }
22136 // Recursively populate clone (susceptible to call stack limits).
22137 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
22138 });
22139 return result;
22140 }
22141
22142 module.exports = baseClone;
22143
22144/***/ }),
22145/* 165 */
22146/***/ (function(module, exports) {
22147
22148 "use strict";
22149
22150 /**
22151 * The base implementation of `_.findIndex` and `_.findLastIndex` without
22152 * support for iteratee shorthands.
22153 *
22154 * @private
22155 * @param {Array} array The array to inspect.
22156 * @param {Function} predicate The function invoked per iteration.
22157 * @param {number} fromIndex The index to search from.
22158 * @param {boolean} [fromRight] Specify iterating from right to left.
22159 * @returns {number} Returns the index of the matched value, else `-1`.
22160 */
22161 function baseFindIndex(array, predicate, fromIndex, fromRight) {
22162 var length = array.length,
22163 index = fromIndex + (fromRight ? 1 : -1);
22164
22165 while (fromRight ? index-- : ++index < length) {
22166 if (predicate(array[index], index, array)) {
22167 return index;
22168 }
22169 }
22170 return -1;
22171 }
22172
22173 module.exports = baseFindIndex;
22174
22175/***/ }),
22176/* 166 */
22177/***/ (function(module, exports, __webpack_require__) {
22178
22179 'use strict';
22180
22181 var baseFindIndex = __webpack_require__(165),
22182 baseIsNaN = __webpack_require__(496),
22183 strictIndexOf = __webpack_require__(570);
22184
22185 /**
22186 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
22187 *
22188 * @private
22189 * @param {Array} array The array to inspect.
22190 * @param {*} value The value to search for.
22191 * @param {number} fromIndex The index to search from.
22192 * @returns {number} Returns the index of the matched value, else `-1`.
22193 */
22194 function baseIndexOf(array, value, fromIndex) {
22195 return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
22196 }
22197
22198 module.exports = baseIndexOf;
22199
22200/***/ }),
22201/* 167 */
22202/***/ (function(module, exports, __webpack_require__) {
22203
22204 'use strict';
22205
22206 var Uint8Array = __webpack_require__(243);
22207
22208 /**
22209 * Creates a clone of `arrayBuffer`.
22210 *
22211 * @private
22212 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
22213 * @returns {ArrayBuffer} Returns the cloned array buffer.
22214 */
22215 function cloneArrayBuffer(arrayBuffer) {
22216 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
22217 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
22218 return result;
22219 }
22220
22221 module.exports = cloneArrayBuffer;
22222
22223/***/ }),
22224/* 168 */
22225/***/ (function(module, exports) {
22226
22227 "use strict";
22228
22229 /**
22230 * Copies the values of `source` to `array`.
22231 *
22232 * @private
22233 * @param {Array} source The array to copy values from.
22234 * @param {Array} [array=[]] The array to copy values to.
22235 * @returns {Array} Returns `array`.
22236 */
22237 function copyArray(source, array) {
22238 var index = -1,
22239 length = source.length;
22240
22241 array || (array = Array(length));
22242 while (++index < length) {
22243 array[index] = source[index];
22244 }
22245 return array;
22246 }
22247
22248 module.exports = copyArray;
22249
22250/***/ }),
22251/* 169 */
22252/***/ (function(module, exports, __webpack_require__) {
22253
22254 'use strict';
22255
22256 var overArg = __webpack_require__(271);
22257
22258 /** Built-in value references. */
22259 var getPrototype = overArg(Object.getPrototypeOf, Object);
22260
22261 module.exports = getPrototype;
22262
22263/***/ }),
22264/* 170 */
22265/***/ (function(module, exports, __webpack_require__) {
22266
22267 'use strict';
22268
22269 var arrayFilter = __webpack_require__(479),
22270 stubArray = __webpack_require__(279);
22271
22272 /** Used for built-in method references. */
22273 var objectProto = Object.prototype;
22274
22275 /** Built-in value references. */
22276 var propertyIsEnumerable = objectProto.propertyIsEnumerable;
22277
22278 /* Built-in method references for those with the same name as other `lodash` methods. */
22279 var nativeGetSymbols = Object.getOwnPropertySymbols;
22280
22281 /**
22282 * Creates an array of the own enumerable symbols of `object`.
22283 *
22284 * @private
22285 * @param {Object} object The object to query.
22286 * @returns {Array} Returns the array of symbols.
22287 */
22288 var getSymbols = !nativeGetSymbols ? stubArray : function (object) {
22289 if (object == null) {
22290 return [];
22291 }
22292 object = Object(object);
22293 return arrayFilter(nativeGetSymbols(object), function (symbol) {
22294 return propertyIsEnumerable.call(object, symbol);
22295 });
22296 };
22297
22298 module.exports = getSymbols;
22299
22300/***/ }),
22301/* 171 */
22302/***/ (function(module, exports) {
22303
22304 'use strict';
22305
22306 /** Used as references for various `Number` constants. */
22307 var MAX_SAFE_INTEGER = 9007199254740991;
22308
22309 /** Used to detect unsigned integer values. */
22310 var reIsUint = /^(?:0|[1-9]\d*)$/;
22311
22312 /**
22313 * Checks if `value` is a valid array-like index.
22314 *
22315 * @private
22316 * @param {*} value The value to check.
22317 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
22318 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
22319 */
22320 function isIndex(value, length) {
22321 length = length == null ? MAX_SAFE_INTEGER : length;
22322 return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
22323 }
22324
22325 module.exports = isIndex;
22326
22327/***/ }),
22328/* 172 */
22329/***/ (function(module, exports, __webpack_require__) {
22330
22331 'use strict';
22332
22333 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
22334
22335 var eq = __webpack_require__(46),
22336 isArrayLike = __webpack_require__(24),
22337 isIndex = __webpack_require__(171),
22338 isObject = __webpack_require__(18);
22339
22340 /**
22341 * Checks if the given arguments are from an iteratee call.
22342 *
22343 * @private
22344 * @param {*} value The potential iteratee value argument.
22345 * @param {*} index The potential iteratee index or key argument.
22346 * @param {*} object The potential iteratee object argument.
22347 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
22348 * else `false`.
22349 */
22350 function isIterateeCall(value, index, object) {
22351 if (!isObject(object)) {
22352 return false;
22353 }
22354 var type = typeof index === 'undefined' ? 'undefined' : _typeof(index);
22355 if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {
22356 return eq(object[index], value);
22357 }
22358 return false;
22359 }
22360
22361 module.exports = isIterateeCall;
22362
22363/***/ }),
22364/* 173 */
22365/***/ (function(module, exports, __webpack_require__) {
22366
22367 'use strict';
22368
22369 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
22370
22371 var isArray = __webpack_require__(6),
22372 isSymbol = __webpack_require__(62);
22373
22374 /** Used to match property names within property paths. */
22375 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
22376 reIsPlainProp = /^\w*$/;
22377
22378 /**
22379 * Checks if `value` is a property name and not a property path.
22380 *
22381 * @private
22382 * @param {*} value The value to check.
22383 * @param {Object} [object] The object to query keys on.
22384 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
22385 */
22386 function isKey(value, object) {
22387 if (isArray(value)) {
22388 return false;
22389 }
22390 var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
22391 if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
22392 return true;
22393 }
22394 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
22395 }
22396
22397 module.exports = isKey;
22398
22399/***/ }),
22400/* 174 */
22401/***/ (function(module, exports, __webpack_require__) {
22402
22403 'use strict';
22404
22405 var assignValue = __webpack_require__(162),
22406 copyObject = __webpack_require__(31),
22407 createAssigner = __webpack_require__(103),
22408 isArrayLike = __webpack_require__(24),
22409 isPrototype = __webpack_require__(105),
22410 keys = __webpack_require__(32);
22411
22412 /** Used for built-in method references. */
22413 var objectProto = Object.prototype;
22414
22415 /** Used to check objects for own properties. */
22416 var hasOwnProperty = objectProto.hasOwnProperty;
22417
22418 /**
22419 * Assigns own enumerable string keyed properties of source objects to the
22420 * destination object. Source objects are applied from left to right.
22421 * Subsequent sources overwrite property assignments of previous sources.
22422 *
22423 * **Note:** This method mutates `object` and is loosely based on
22424 * [`Object.assign`](https://mdn.io/Object/assign).
22425 *
22426 * @static
22427 * @memberOf _
22428 * @since 0.10.0
22429 * @category Object
22430 * @param {Object} object The destination object.
22431 * @param {...Object} [sources] The source objects.
22432 * @returns {Object} Returns `object`.
22433 * @see _.assignIn
22434 * @example
22435 *
22436 * function Foo() {
22437 * this.a = 1;
22438 * }
22439 *
22440 * function Bar() {
22441 * this.c = 3;
22442 * }
22443 *
22444 * Foo.prototype.b = 2;
22445 * Bar.prototype.d = 4;
22446 *
22447 * _.assign({ 'a': 0 }, new Foo, new Bar);
22448 * // => { 'a': 1, 'c': 3 }
22449 */
22450 var assign = createAssigner(function (object, source) {
22451 if (isPrototype(source) || isArrayLike(source)) {
22452 copyObject(source, keys(source), object);
22453 return;
22454 }
22455 for (var key in source) {
22456 if (hasOwnProperty.call(source, key)) {
22457 assignValue(object, key, source[key]);
22458 }
22459 }
22460 });
22461
22462 module.exports = assign;
22463
22464/***/ }),
22465/* 175 */
22466/***/ (function(module, exports, __webpack_require__) {
22467
22468 'use strict';
22469
22470 var baseGetTag = __webpack_require__(30),
22471 isObject = __webpack_require__(18);
22472
22473 /** `Object#toString` result references. */
22474 var asyncTag = '[object AsyncFunction]',
22475 funcTag = '[object Function]',
22476 genTag = '[object GeneratorFunction]',
22477 proxyTag = '[object Proxy]';
22478
22479 /**
22480 * Checks if `value` is classified as a `Function` object.
22481 *
22482 * @static
22483 * @memberOf _
22484 * @since 0.1.0
22485 * @category Lang
22486 * @param {*} value The value to check.
22487 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
22488 * @example
22489 *
22490 * _.isFunction(_);
22491 * // => true
22492 *
22493 * _.isFunction(/abc/);
22494 * // => false
22495 */
22496 function isFunction(value) {
22497 if (!isObject(value)) {
22498 return false;
22499 }
22500 // The use of `Object#toString` avoids issues with the `typeof` operator
22501 // in Safari 9 which returns 'object' for typed arrays and other constructors.
22502 var tag = baseGetTag(value);
22503 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
22504 }
22505
22506 module.exports = isFunction;
22507
22508/***/ }),
22509/* 176 */
22510/***/ (function(module, exports) {
22511
22512 'use strict';
22513
22514 /** Used as references for various `Number` constants. */
22515 var MAX_SAFE_INTEGER = 9007199254740991;
22516
22517 /**
22518 * Checks if `value` is a valid array-like length.
22519 *
22520 * **Note:** This method is loosely based on
22521 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
22522 *
22523 * @static
22524 * @memberOf _
22525 * @since 4.0.0
22526 * @category Lang
22527 * @param {*} value The value to check.
22528 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
22529 * @example
22530 *
22531 * _.isLength(3);
22532 * // => true
22533 *
22534 * _.isLength(Number.MIN_VALUE);
22535 * // => false
22536 *
22537 * _.isLength(Infinity);
22538 * // => false
22539 *
22540 * _.isLength('3');
22541 * // => false
22542 */
22543 function isLength(value) {
22544 return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
22545 }
22546
22547 module.exports = isLength;
22548
22549/***/ }),
22550/* 177 */
22551/***/ (function(module, exports, __webpack_require__) {
22552
22553 'use strict';
22554
22555 var baseIsTypedArray = __webpack_require__(499),
22556 baseUnary = __webpack_require__(102),
22557 nodeUtil = __webpack_require__(270);
22558
22559 /* Node.js helper references. */
22560 var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
22561
22562 /**
22563 * Checks if `value` is classified as a typed array.
22564 *
22565 * @static
22566 * @memberOf _
22567 * @since 3.0.0
22568 * @category Lang
22569 * @param {*} value The value to check.
22570 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
22571 * @example
22572 *
22573 * _.isTypedArray(new Uint8Array);
22574 * // => true
22575 *
22576 * _.isTypedArray([]);
22577 * // => false
22578 */
22579 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
22580
22581 module.exports = isTypedArray;
22582
22583/***/ }),
22584/* 178 */
22585/***/ (function(module, exports, __webpack_require__) {
22586
22587 var map = {
22588 "./index": 50,
22589 "./index.js": 50,
22590 "./logger": 120,
22591 "./logger.js": 120,
22592 "./metadata": 121,
22593 "./metadata.js": 121,
22594 "./options/build-config-chain": 51,
22595 "./options/build-config-chain.js": 51,
22596 "./options/config": 33,
22597 "./options/config.js": 33,
22598 "./options/index": 52,
22599 "./options/index.js": 52,
22600 "./options/option-manager": 34,
22601 "./options/option-manager.js": 34,
22602 "./options/parsers": 53,
22603 "./options/parsers.js": 53,
22604 "./options/removed": 54,
22605 "./options/removed.js": 54
22606 };
22607 function webpackContext(req) {
22608 return __webpack_require__(webpackContextResolve(req));
22609 };
22610 function webpackContextResolve(req) {
22611 return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
22612 };
22613 webpackContext.keys = function webpackContextKeys() {
22614 return Object.keys(map);
22615 };
22616 webpackContext.resolve = webpackContextResolve;
22617 module.exports = webpackContext;
22618 webpackContext.id = 178;
22619
22620
22621/***/ }),
22622/* 179 */
22623/***/ (function(module, exports, __webpack_require__) {
22624
22625 var map = {
22626 "./build-config-chain": 51,
22627 "./build-config-chain.js": 51,
22628 "./config": 33,
22629 "./config.js": 33,
22630 "./index": 52,
22631 "./index.js": 52,
22632 "./option-manager": 34,
22633 "./option-manager.js": 34,
22634 "./parsers": 53,
22635 "./parsers.js": 53,
22636 "./removed": 54,
22637 "./removed.js": 54
22638 };
22639 function webpackContext(req) {
22640 return __webpack_require__(webpackContextResolve(req));
22641 };
22642 function webpackContextResolve(req) {
22643 return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
22644 };
22645 webpackContext.keys = function webpackContextKeys() {
22646 return Object.keys(map);
22647 };
22648 webpackContext.resolve = webpackContextResolve;
22649 module.exports = webpackContext;
22650 webpackContext.id = 179;
22651
22652
22653/***/ }),
22654/* 180 */
22655/***/ (function(module, exports) {
22656
22657 'use strict';
22658
22659 module.exports = function () {
22660 return (/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g
22661 );
22662 };
22663
22664/***/ }),
22665/* 181 */
22666/***/ (function(module, exports, __webpack_require__) {
22667
22668 "use strict";
22669
22670 exports.__esModule = true;
22671
22672 exports.default = function (rawLines, lineNumber, colNumber) {
22673 var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
22674
22675 colNumber = Math.max(colNumber, 0);
22676
22677 var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor;
22678 var chalk = _chalk2.default;
22679 if (opts.forceColor) {
22680 chalk = new _chalk2.default.constructor({ enabled: true });
22681 }
22682 var maybeHighlight = function maybeHighlight(chalkFn, string) {
22683 return highlighted ? chalkFn(string) : string;
22684 };
22685 var defs = getDefs(chalk);
22686 if (highlighted) rawLines = highlight(defs, rawLines);
22687
22688 var linesAbove = opts.linesAbove || 2;
22689 var linesBelow = opts.linesBelow || 3;
22690
22691 var lines = rawLines.split(NEWLINE);
22692 var start = Math.max(lineNumber - (linesAbove + 1), 0);
22693 var end = Math.min(lines.length, lineNumber + linesBelow);
22694
22695 if (!lineNumber && !colNumber) {
22696 start = 0;
22697 end = lines.length;
22698 }
22699
22700 var numberMaxWidth = String(end).length;
22701
22702 var frame = lines.slice(start, end).map(function (line, index) {
22703 var number = start + 1 + index;
22704 var paddedNumber = (" " + number).slice(-numberMaxWidth);
22705 var gutter = " " + paddedNumber + " | ";
22706 if (number === lineNumber) {
22707 var markerLine = "";
22708 if (colNumber) {
22709 var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " ");
22710 markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join("");
22711 }
22712 return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
22713 } else {
22714 return " " + maybeHighlight(defs.gutter, gutter) + line;
22715 }
22716 }).join("\n");
22717
22718 if (highlighted) {
22719 return chalk.reset(frame);
22720 } else {
22721 return frame;
22722 }
22723 };
22724
22725 var _jsTokens = __webpack_require__(468);
22726
22727 var _jsTokens2 = _interopRequireDefault(_jsTokens);
22728
22729 var _esutils = __webpack_require__(97);
22730
22731 var _esutils2 = _interopRequireDefault(_esutils);
22732
22733 var _chalk = __webpack_require__(401);
22734
22735 var _chalk2 = _interopRequireDefault(_chalk);
22736
22737 function _interopRequireDefault(obj) {
22738 return obj && obj.__esModule ? obj : { default: obj };
22739 }
22740
22741 function getDefs(chalk) {
22742 return {
22743 keyword: chalk.cyan,
22744 capitalized: chalk.yellow,
22745 jsx_tag: chalk.yellow,
22746 punctuator: chalk.yellow,
22747
22748 number: chalk.magenta,
22749 string: chalk.green,
22750 regex: chalk.magenta,
22751 comment: chalk.grey,
22752 invalid: chalk.white.bgRed.bold,
22753 gutter: chalk.grey,
22754 marker: chalk.red.bold
22755 };
22756 }
22757
22758 var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
22759
22760 var JSX_TAG = /^[a-z][\w-]*$/i;
22761
22762 var BRACKET = /^[()\[\]{}]$/;
22763
22764 function getTokenType(match) {
22765 var _match$slice = match.slice(-2),
22766 offset = _match$slice[0],
22767 text = _match$slice[1];
22768
22769 var token = (0, _jsTokens.matchToToken)(match);
22770
22771 if (token.type === "name") {
22772 if (_esutils2.default.keyword.isReservedWordES6(token.value)) {
22773 return "keyword";
22774 }
22775
22776 if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
22777 return "jsx_tag";
22778 }
22779
22780 if (token.value[0] !== token.value[0].toLowerCase()) {
22781 return "capitalized";
22782 }
22783 }
22784
22785 if (token.type === "punctuator" && BRACKET.test(token.value)) {
22786 return "bracket";
22787 }
22788
22789 return token.type;
22790 }
22791
22792 function highlight(defs, text) {
22793 return text.replace(_jsTokens2.default, function () {
22794 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
22795 args[_key] = arguments[_key];
22796 }
22797
22798 var type = getTokenType(args);
22799 var colorize = defs[type];
22800 if (colorize) {
22801 return args[0].split(NEWLINE).map(function (str) {
22802 return colorize(str);
22803 }).join("\n");
22804 } else {
22805 return args[0];
22806 }
22807 });
22808 }
22809
22810 module.exports = exports["default"];
22811
22812/***/ }),
22813/* 182 */
22814/***/ (function(module, exports, __webpack_require__) {
22815
22816 "use strict";
22817
22818 exports.__esModule = true;
22819 exports.transformFromAst = exports.transform = exports.analyse = exports.Pipeline = exports.OptionManager = exports.traverse = exports.types = exports.messages = exports.util = exports.version = exports.resolvePreset = exports.resolvePlugin = exports.template = exports.buildExternalHelpers = exports.options = exports.File = undefined;
22820
22821 var _file = __webpack_require__(50);
22822
22823 Object.defineProperty(exports, "File", {
22824 enumerable: true,
22825 get: function get() {
22826 return _interopRequireDefault(_file).default;
22827 }
22828 });
22829
22830 var _config = __webpack_require__(33);
22831
22832 Object.defineProperty(exports, "options", {
22833 enumerable: true,
22834 get: function get() {
22835 return _interopRequireDefault(_config).default;
22836 }
22837 });
22838
22839 var _buildExternalHelpers = __webpack_require__(295);
22840
22841 Object.defineProperty(exports, "buildExternalHelpers", {
22842 enumerable: true,
22843 get: function get() {
22844 return _interopRequireDefault(_buildExternalHelpers).default;
22845 }
22846 });
22847
22848 var _babelTemplate = __webpack_require__(4);
22849
22850 Object.defineProperty(exports, "template", {
22851 enumerable: true,
22852 get: function get() {
22853 return _interopRequireDefault(_babelTemplate).default;
22854 }
22855 });
22856
22857 var _resolvePlugin = __webpack_require__(184);
22858
22859 Object.defineProperty(exports, "resolvePlugin", {
22860 enumerable: true,
22861 get: function get() {
22862 return _interopRequireDefault(_resolvePlugin).default;
22863 }
22864 });
22865
22866 var _resolvePreset = __webpack_require__(185);
22867
22868 Object.defineProperty(exports, "resolvePreset", {
22869 enumerable: true,
22870 get: function get() {
22871 return _interopRequireDefault(_resolvePreset).default;
22872 }
22873 });
22874
22875 var _package = __webpack_require__(628);
22876
22877 Object.defineProperty(exports, "version", {
22878 enumerable: true,
22879 get: function get() {
22880 return _package.version;
22881 }
22882 });
22883 exports.Plugin = Plugin;
22884 exports.transformFile = transformFile;
22885 exports.transformFileSync = transformFileSync;
22886
22887 var _fs = __webpack_require__(115);
22888
22889 var _fs2 = _interopRequireDefault(_fs);
22890
22891 var _util = __webpack_require__(122);
22892
22893 var util = _interopRequireWildcard(_util);
22894
22895 var _babelMessages = __webpack_require__(20);
22896
22897 var messages = _interopRequireWildcard(_babelMessages);
22898
22899 var _babelTypes = __webpack_require__(1);
22900
22901 var t = _interopRequireWildcard(_babelTypes);
22902
22903 var _babelTraverse = __webpack_require__(7);
22904
22905 var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
22906
22907 var _optionManager = __webpack_require__(34);
22908
22909 var _optionManager2 = _interopRequireDefault(_optionManager);
22910
22911 var _pipeline = __webpack_require__(298);
22912
22913 var _pipeline2 = _interopRequireDefault(_pipeline);
22914
22915 function _interopRequireWildcard(obj) {
22916 if (obj && obj.__esModule) {
22917 return obj;
22918 } else {
22919 var newObj = {};if (obj != null) {
22920 for (var key in obj) {
22921 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
22922 }
22923 }newObj.default = obj;return newObj;
22924 }
22925 }
22926
22927 function _interopRequireDefault(obj) {
22928 return obj && obj.__esModule ? obj : { default: obj };
22929 }
22930
22931 exports.util = util;
22932 exports.messages = messages;
22933 exports.types = t;
22934 exports.traverse = _babelTraverse2.default;
22935 exports.OptionManager = _optionManager2.default;
22936 function Plugin(alias) {
22937 throw new Error("The (" + alias + ") Babel 5 plugin is being run with Babel 6.");
22938 }
22939
22940 exports.Pipeline = _pipeline2.default;
22941
22942 var pipeline = new _pipeline2.default();
22943 var analyse = exports.analyse = pipeline.analyse.bind(pipeline);
22944 var transform = exports.transform = pipeline.transform.bind(pipeline);
22945 var transformFromAst = exports.transformFromAst = pipeline.transformFromAst.bind(pipeline);
22946
22947 function transformFile(filename, opts, callback) {
22948 if (typeof opts === "function") {
22949 callback = opts;
22950 opts = {};
22951 }
22952
22953 opts.filename = filename;
22954
22955 _fs2.default.readFile(filename, function (err, code) {
22956 var result = void 0;
22957
22958 if (!err) {
22959 try {
22960 result = transform(code, opts);
22961 } catch (_err) {
22962 err = _err;
22963 }
22964 }
22965
22966 if (err) {
22967 callback(err);
22968 } else {
22969 callback(null, result);
22970 }
22971 });
22972 }
22973
22974 function transformFileSync(filename) {
22975 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22976
22977 opts.filename = filename;
22978 return transform(_fs2.default.readFileSync(filename, "utf8"), opts);
22979 }
22980
22981/***/ }),
22982/* 183 */
22983/***/ (function(module, exports, __webpack_require__) {
22984
22985 "use strict";
22986
22987 exports.__esModule = true;
22988 exports.default = resolveFromPossibleNames;
22989
22990 var _resolve = __webpack_require__(118);
22991
22992 var _resolve2 = _interopRequireDefault(_resolve);
22993
22994 function _interopRequireDefault(obj) {
22995 return obj && obj.__esModule ? obj : { default: obj };
22996 }
22997
22998 function resolveFromPossibleNames(possibleNames, dirname) {
22999 return possibleNames.reduce(function (accum, curr) {
23000 return accum || (0, _resolve2.default)(curr, dirname);
23001 }, null);
23002 }
23003 module.exports = exports["default"];
23004
23005/***/ }),
23006/* 184 */
23007/***/ (function(module, exports, __webpack_require__) {
23008
23009 /* WEBPACK VAR INJECTION */(function(process) {"use strict";
23010
23011 exports.__esModule = true;
23012 exports.default = resolvePlugin;
23013
23014 var _resolveFromPossibleNames = __webpack_require__(183);
23015
23016 var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames);
23017
23018 var _getPossiblePluginNames = __webpack_require__(291);
23019
23020 var _getPossiblePluginNames2 = _interopRequireDefault(_getPossiblePluginNames);
23021
23022 function _interopRequireDefault(obj) {
23023 return obj && obj.__esModule ? obj : { default: obj };
23024 }
23025
23026 function resolvePlugin(pluginName) {
23027 var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
23028
23029 return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePluginNames2.default)(pluginName), dirname);
23030 }
23031 module.exports = exports["default"];
23032 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
23033
23034/***/ }),
23035/* 185 */
23036/***/ (function(module, exports, __webpack_require__) {
23037
23038 /* WEBPACK VAR INJECTION */(function(process) {"use strict";
23039
23040 exports.__esModule = true;
23041 exports.default = resolvePreset;
23042
23043 var _resolveFromPossibleNames = __webpack_require__(183);
23044
23045 var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames);
23046
23047 var _getPossiblePresetNames = __webpack_require__(292);
23048
23049 var _getPossiblePresetNames2 = _interopRequireDefault(_getPossiblePresetNames);
23050
23051 function _interopRequireDefault(obj) {
23052 return obj && obj.__esModule ? obj : { default: obj };
23053 }
23054
23055 function resolvePreset(presetName) {
23056 var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
23057
23058 return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePresetNames2.default)(presetName), dirname);
23059 }
23060 module.exports = exports["default"];
23061 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
23062
23063/***/ }),
23064/* 186 */
23065/***/ (function(module, exports, __webpack_require__) {
23066
23067 "use strict";
23068
23069 exports.__esModule = true;
23070 exports.CodeGenerator = undefined;
23071
23072 var _classCallCheck2 = __webpack_require__(3);
23073
23074 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
23075
23076 var _possibleConstructorReturn2 = __webpack_require__(42);
23077
23078 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
23079
23080 var _inherits2 = __webpack_require__(41);
23081
23082 var _inherits3 = _interopRequireDefault(_inherits2);
23083
23084 exports.default = function (ast, opts, code) {
23085 var gen = new Generator(ast, opts, code);
23086 return gen.generate();
23087 };
23088
23089 var _detectIndent = __webpack_require__(459);
23090
23091 var _detectIndent2 = _interopRequireDefault(_detectIndent);
23092
23093 var _sourceMap = __webpack_require__(313);
23094
23095 var _sourceMap2 = _interopRequireDefault(_sourceMap);
23096
23097 var _babelMessages = __webpack_require__(20);
23098
23099 var messages = _interopRequireWildcard(_babelMessages);
23100
23101 var _printer = __webpack_require__(312);
23102
23103 var _printer2 = _interopRequireDefault(_printer);
23104
23105 function _interopRequireWildcard(obj) {
23106 if (obj && obj.__esModule) {
23107 return obj;
23108 } else {
23109 var newObj = {};if (obj != null) {
23110 for (var key in obj) {
23111 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23112 }
23113 }newObj.default = obj;return newObj;
23114 }
23115 }
23116
23117 function _interopRequireDefault(obj) {
23118 return obj && obj.__esModule ? obj : { default: obj };
23119 }
23120
23121 var Generator = function (_Printer) {
23122 (0, _inherits3.default)(Generator, _Printer);
23123
23124 function Generator(ast) {
23125 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
23126 var code = arguments[2];
23127 (0, _classCallCheck3.default)(this, Generator);
23128
23129 var tokens = ast.tokens || [];
23130 var format = normalizeOptions(code, opts, tokens);
23131 var map = opts.sourceMaps ? new _sourceMap2.default(opts, code) : null;
23132
23133 var _this = (0, _possibleConstructorReturn3.default)(this, _Printer.call(this, format, map, tokens));
23134
23135 _this.ast = ast;
23136 return _this;
23137 }
23138
23139 Generator.prototype.generate = function generate() {
23140 return _Printer.prototype.generate.call(this, this.ast);
23141 };
23142
23143 return Generator;
23144 }(_printer2.default);
23145
23146 function normalizeOptions(code, opts, tokens) {
23147 var style = " ";
23148 if (code && typeof code === "string") {
23149 var indent = (0, _detectIndent2.default)(code).indent;
23150 if (indent && indent !== " ") style = indent;
23151 }
23152
23153 var format = {
23154 auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
23155 auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
23156 shouldPrintComment: opts.shouldPrintComment,
23157 retainLines: opts.retainLines,
23158 retainFunctionParens: opts.retainFunctionParens,
23159 comments: opts.comments == null || opts.comments,
23160 compact: opts.compact,
23161 minified: opts.minified,
23162 concise: opts.concise,
23163 quotes: opts.quotes || findCommonStringDelimiter(code, tokens),
23164 jsonCompatibleStrings: opts.jsonCompatibleStrings,
23165 indent: {
23166 adjustMultilineComment: true,
23167 style: style,
23168 base: 0
23169 },
23170 flowCommaSeparator: opts.flowCommaSeparator
23171 };
23172
23173 if (format.minified) {
23174 format.compact = true;
23175
23176 format.shouldPrintComment = format.shouldPrintComment || function () {
23177 return format.comments;
23178 };
23179 } else {
23180 format.shouldPrintComment = format.shouldPrintComment || function (value) {
23181 return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0;
23182 };
23183 }
23184
23185 if (format.compact === "auto") {
23186 format.compact = code.length > 500000;
23187
23188 if (format.compact) {
23189 console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "500KB"));
23190 }
23191 }
23192
23193 if (format.compact) {
23194 format.indent.adjustMultilineComment = false;
23195 }
23196
23197 return format;
23198 }
23199
23200 function findCommonStringDelimiter(code, tokens) {
23201 var DEFAULT_STRING_DELIMITER = "double";
23202 if (!code) {
23203 return DEFAULT_STRING_DELIMITER;
23204 }
23205
23206 var occurrences = {
23207 single: 0,
23208 double: 0
23209 };
23210
23211 var checked = 0;
23212
23213 for (var i = 0; i < tokens.length; i++) {
23214 var token = tokens[i];
23215 if (token.type.label !== "string") continue;
23216
23217 var raw = code.slice(token.start, token.end);
23218 if (raw[0] === "'") {
23219 occurrences.single++;
23220 } else {
23221 occurrences.double++;
23222 }
23223
23224 checked++;
23225 if (checked >= 3) break;
23226 }
23227 if (occurrences.single > occurrences.double) {
23228 return "single";
23229 } else {
23230 return "double";
23231 }
23232 }
23233
23234 var CodeGenerator = exports.CodeGenerator = function () {
23235 function CodeGenerator(ast, opts, code) {
23236 (0, _classCallCheck3.default)(this, CodeGenerator);
23237
23238 this._generator = new Generator(ast, opts, code);
23239 }
23240
23241 CodeGenerator.prototype.generate = function generate() {
23242 return this._generator.generate();
23243 };
23244
23245 return CodeGenerator;
23246 }();
23247
23248/***/ }),
23249/* 187 */
23250/***/ (function(module, exports, __webpack_require__) {
23251
23252 "use strict";
23253
23254 exports.__esModule = true;
23255
23256 var _getIterator2 = __webpack_require__(2);
23257
23258 var _getIterator3 = _interopRequireDefault(_getIterator2);
23259
23260 var _keys = __webpack_require__(14);
23261
23262 var _keys2 = _interopRequireDefault(_keys);
23263
23264 exports.needsWhitespace = needsWhitespace;
23265 exports.needsWhitespaceBefore = needsWhitespaceBefore;
23266 exports.needsWhitespaceAfter = needsWhitespaceAfter;
23267 exports.needsParens = needsParens;
23268
23269 var _whitespace = __webpack_require__(311);
23270
23271 var _whitespace2 = _interopRequireDefault(_whitespace);
23272
23273 var _parentheses = __webpack_require__(310);
23274
23275 var parens = _interopRequireWildcard(_parentheses);
23276
23277 var _babelTypes = __webpack_require__(1);
23278
23279 var t = _interopRequireWildcard(_babelTypes);
23280
23281 function _interopRequireWildcard(obj) {
23282 if (obj && obj.__esModule) {
23283 return obj;
23284 } else {
23285 var newObj = {};if (obj != null) {
23286 for (var key in obj) {
23287 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23288 }
23289 }newObj.default = obj;return newObj;
23290 }
23291 }
23292
23293 function _interopRequireDefault(obj) {
23294 return obj && obj.__esModule ? obj : { default: obj };
23295 }
23296
23297 function expandAliases(obj) {
23298 var newObj = {};
23299
23300 function add(type, func) {
23301 var fn = newObj[type];
23302 newObj[type] = fn ? function (node, parent, stack) {
23303 var result = fn(node, parent, stack);
23304
23305 return result == null ? func(node, parent, stack) : result;
23306 } : func;
23307 }
23308
23309 for (var _iterator = (0, _keys2.default)(obj), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
23310 var _ref;
23311
23312 if (_isArray) {
23313 if (_i >= _iterator.length) break;
23314 _ref = _iterator[_i++];
23315 } else {
23316 _i = _iterator.next();
23317 if (_i.done) break;
23318 _ref = _i.value;
23319 }
23320
23321 var type = _ref;
23322
23323 var aliases = t.FLIPPED_ALIAS_KEYS[type];
23324 if (aliases) {
23325 for (var _iterator2 = aliases, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
23326 var _ref2;
23327
23328 if (_isArray2) {
23329 if (_i2 >= _iterator2.length) break;
23330 _ref2 = _iterator2[_i2++];
23331 } else {
23332 _i2 = _iterator2.next();
23333 if (_i2.done) break;
23334 _ref2 = _i2.value;
23335 }
23336
23337 var alias = _ref2;
23338
23339 add(alias, obj[type]);
23340 }
23341 } else {
23342 add(type, obj[type]);
23343 }
23344 }
23345
23346 return newObj;
23347 }
23348
23349 var expandedParens = expandAliases(parens);
23350 var expandedWhitespaceNodes = expandAliases(_whitespace2.default.nodes);
23351 var expandedWhitespaceList = expandAliases(_whitespace2.default.list);
23352
23353 function find(obj, node, parent, printStack) {
23354 var fn = obj[node.type];
23355 return fn ? fn(node, parent, printStack) : null;
23356 }
23357
23358 function isOrHasCallExpression(node) {
23359 if (t.isCallExpression(node)) {
23360 return true;
23361 }
23362
23363 if (t.isMemberExpression(node)) {
23364 return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property);
23365 } else {
23366 return false;
23367 }
23368 }
23369
23370 function needsWhitespace(node, parent, type) {
23371 if (!node) return 0;
23372
23373 if (t.isExpressionStatement(node)) {
23374 node = node.expression;
23375 }
23376
23377 var linesInfo = find(expandedWhitespaceNodes, node, parent);
23378
23379 if (!linesInfo) {
23380 var items = find(expandedWhitespaceList, node, parent);
23381 if (items) {
23382 for (var i = 0; i < items.length; i++) {
23383 linesInfo = needsWhitespace(items[i], node, type);
23384 if (linesInfo) break;
23385 }
23386 }
23387 }
23388
23389 return linesInfo && linesInfo[type] || 0;
23390 }
23391
23392 function needsWhitespaceBefore(node, parent) {
23393 return needsWhitespace(node, parent, "before");
23394 }
23395
23396 function needsWhitespaceAfter(node, parent) {
23397 return needsWhitespace(node, parent, "after");
23398 }
23399
23400 function needsParens(node, parent, printStack) {
23401 if (!parent) return false;
23402
23403 if (t.isNewExpression(parent) && parent.callee === node) {
23404 if (isOrHasCallExpression(node)) return true;
23405 }
23406
23407 return find(expandedParens, node, parent, printStack);
23408 }
23409
23410/***/ }),
23411/* 188 */
23412/***/ (function(module, exports, __webpack_require__) {
23413
23414 "use strict";
23415
23416 exports.__esModule = true;
23417
23418 var _keys = __webpack_require__(14);
23419
23420 var _keys2 = _interopRequireDefault(_keys);
23421
23422 exports.push = push;
23423 exports.hasComputed = hasComputed;
23424 exports.toComputedObjectFromClass = toComputedObjectFromClass;
23425 exports.toClassObject = toClassObject;
23426 exports.toDefineObject = toDefineObject;
23427
23428 var _babelHelperFunctionName = __webpack_require__(40);
23429
23430 var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
23431
23432 var _has = __webpack_require__(274);
23433
23434 var _has2 = _interopRequireDefault(_has);
23435
23436 var _babelTypes = __webpack_require__(1);
23437
23438 var t = _interopRequireWildcard(_babelTypes);
23439
23440 function _interopRequireWildcard(obj) {
23441 if (obj && obj.__esModule) {
23442 return obj;
23443 } else {
23444 var newObj = {};if (obj != null) {
23445 for (var key in obj) {
23446 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23447 }
23448 }newObj.default = obj;return newObj;
23449 }
23450 }
23451
23452 function _interopRequireDefault(obj) {
23453 return obj && obj.__esModule ? obj : { default: obj };
23454 }
23455
23456 function toKind(node) {
23457 if (t.isClassMethod(node) || t.isObjectMethod(node)) {
23458 if (node.kind === "get" || node.kind === "set") {
23459 return node.kind;
23460 }
23461 }
23462
23463 return "value";
23464 }
23465
23466 function push(mutatorMap, node, kind, file, scope) {
23467 var alias = t.toKeyAlias(node);
23468
23469 var map = {};
23470 if ((0, _has2.default)(mutatorMap, alias)) map = mutatorMap[alias];
23471 mutatorMap[alias] = map;
23472
23473 map._inherits = map._inherits || [];
23474 map._inherits.push(node);
23475
23476 map._key = node.key;
23477
23478 if (node.computed) {
23479 map._computed = true;
23480 }
23481
23482 if (node.decorators) {
23483 var decorators = map.decorators = map.decorators || t.arrayExpression([]);
23484 decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) {
23485 return dec.expression;
23486 }).reverse());
23487 }
23488
23489 if (map.value || map.initializer) {
23490 throw file.buildCodeFrameError(node, "Key conflict with sibling node");
23491 }
23492
23493 var key = void 0,
23494 value = void 0;
23495
23496 if (t.isObjectProperty(node) || t.isObjectMethod(node) || t.isClassMethod(node)) {
23497 key = t.toComputedKey(node, node.key);
23498 }
23499
23500 if (t.isObjectProperty(node) || t.isClassProperty(node)) {
23501 value = node.value;
23502 } else if (t.isObjectMethod(node) || t.isClassMethod(node)) {
23503 value = t.functionExpression(null, node.params, node.body, node.generator, node.async);
23504 value.returnType = node.returnType;
23505 }
23506
23507 var inheritedKind = toKind(node);
23508 if (!kind || inheritedKind !== "value") {
23509 kind = inheritedKind;
23510 }
23511
23512 if (scope && t.isStringLiteral(key) && (kind === "value" || kind === "initializer") && t.isFunctionExpression(value)) {
23513 value = (0, _babelHelperFunctionName2.default)({ id: key, node: value, scope: scope });
23514 }
23515
23516 if (value) {
23517 t.inheritsComments(value, node);
23518 map[kind] = value;
23519 }
23520
23521 return map;
23522 }
23523
23524 function hasComputed(mutatorMap) {
23525 for (var key in mutatorMap) {
23526 if (mutatorMap[key]._computed) {
23527 return true;
23528 }
23529 }
23530 return false;
23531 }
23532
23533 function toComputedObjectFromClass(obj) {
23534 var objExpr = t.arrayExpression([]);
23535
23536 for (var i = 0; i < obj.properties.length; i++) {
23537 var prop = obj.properties[i];
23538 var val = prop.value;
23539 val.properties.unshift(t.objectProperty(t.identifier("key"), t.toComputedKey(prop)));
23540 objExpr.elements.push(val);
23541 }
23542
23543 return objExpr;
23544 }
23545
23546 function toClassObject(mutatorMap) {
23547 var objExpr = t.objectExpression([]);
23548
23549 (0, _keys2.default)(mutatorMap).forEach(function (mutatorMapKey) {
23550 var map = mutatorMap[mutatorMapKey];
23551 var mapNode = t.objectExpression([]);
23552
23553 var propNode = t.objectProperty(map._key, mapNode, map._computed);
23554
23555 (0, _keys2.default)(map).forEach(function (key) {
23556 var node = map[key];
23557 if (key[0] === "_") return;
23558
23559 var inheritNode = node;
23560 if (t.isClassMethod(node) || t.isClassProperty(node)) node = node.value;
23561
23562 var prop = t.objectProperty(t.identifier(key), node);
23563 t.inheritsComments(prop, inheritNode);
23564 t.removeComments(inheritNode);
23565
23566 mapNode.properties.push(prop);
23567 });
23568
23569 objExpr.properties.push(propNode);
23570 });
23571
23572 return objExpr;
23573 }
23574
23575 function toDefineObject(mutatorMap) {
23576 (0, _keys2.default)(mutatorMap).forEach(function (key) {
23577 var map = mutatorMap[key];
23578 if (map.value) map.writable = t.booleanLiteral(true);
23579 map.configurable = t.booleanLiteral(true);
23580 map.enumerable = t.booleanLiteral(true);
23581 });
23582
23583 return toClassObject(mutatorMap);
23584 }
23585
23586/***/ }),
23587/* 189 */
23588/***/ (function(module, exports, __webpack_require__) {
23589
23590 "use strict";
23591
23592 exports.__esModule = true;
23593
23594 exports.default = function (node) {
23595 var params = node.params;
23596 for (var i = 0; i < params.length; i++) {
23597 var param = params[i];
23598 if (t.isAssignmentPattern(param) || t.isRestElement(param)) {
23599 return i;
23600 }
23601 }
23602 return params.length;
23603 };
23604
23605 var _babelTypes = __webpack_require__(1);
23606
23607 var t = _interopRequireWildcard(_babelTypes);
23608
23609 function _interopRequireWildcard(obj) {
23610 if (obj && obj.__esModule) {
23611 return obj;
23612 } else {
23613 var newObj = {};if (obj != null) {
23614 for (var key in obj) {
23615 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23616 }
23617 }newObj.default = obj;return newObj;
23618 }
23619 }
23620
23621 module.exports = exports["default"];
23622
23623/***/ }),
23624/* 190 */
23625/***/ (function(module, exports, __webpack_require__) {
23626
23627 "use strict";
23628
23629 exports.__esModule = true;
23630
23631 var _getIterator2 = __webpack_require__(2);
23632
23633 var _getIterator3 = _interopRequireDefault(_getIterator2);
23634
23635 exports.default = function (path, emit) {
23636 var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "var";
23637
23638 path.traverse(visitor, { kind: kind, emit: emit });
23639 };
23640
23641 var _babelTypes = __webpack_require__(1);
23642
23643 var t = _interopRequireWildcard(_babelTypes);
23644
23645 function _interopRequireWildcard(obj) {
23646 if (obj && obj.__esModule) {
23647 return obj;
23648 } else {
23649 var newObj = {};if (obj != null) {
23650 for (var key in obj) {
23651 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23652 }
23653 }newObj.default = obj;return newObj;
23654 }
23655 }
23656
23657 function _interopRequireDefault(obj) {
23658 return obj && obj.__esModule ? obj : { default: obj };
23659 }
23660
23661 var visitor = {
23662 Scope: function Scope(path, state) {
23663 if (state.kind === "let") path.skip();
23664 },
23665 Function: function Function(path) {
23666 path.skip();
23667 },
23668 VariableDeclaration: function VariableDeclaration(path, state) {
23669 if (state.kind && path.node.kind !== state.kind) return;
23670
23671 var nodes = [];
23672
23673 var declarations = path.get("declarations");
23674 var firstId = void 0;
23675
23676 for (var _iterator = declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
23677 var _ref;
23678
23679 if (_isArray) {
23680 if (_i >= _iterator.length) break;
23681 _ref = _iterator[_i++];
23682 } else {
23683 _i = _iterator.next();
23684 if (_i.done) break;
23685 _ref = _i.value;
23686 }
23687
23688 var declar = _ref;
23689
23690 firstId = declar.node.id;
23691
23692 if (declar.node.init) {
23693 nodes.push(t.expressionStatement(t.assignmentExpression("=", declar.node.id, declar.node.init)));
23694 }
23695
23696 for (var name in declar.getBindingIdentifiers()) {
23697 state.emit(t.identifier(name), name);
23698 }
23699 }
23700
23701 if (path.parentPath.isFor({ left: path.node })) {
23702 path.replaceWith(firstId);
23703 } else {
23704 path.replaceWithMultiple(nodes);
23705 }
23706 }
23707 };
23708
23709 module.exports = exports["default"];
23710
23711/***/ }),
23712/* 191 */
23713/***/ (function(module, exports, __webpack_require__) {
23714
23715 "use strict";
23716
23717 exports.__esModule = true;
23718
23719 exports.default = function (callee, thisNode, args) {
23720 if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, { name: "arguments" })) {
23721 return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]);
23722 } else {
23723 return t.callExpression(t.memberExpression(callee, t.identifier("call")), [thisNode].concat(args));
23724 }
23725 };
23726
23727 var _babelTypes = __webpack_require__(1);
23728
23729 var t = _interopRequireWildcard(_babelTypes);
23730
23731 function _interopRequireWildcard(obj) {
23732 if (obj && obj.__esModule) {
23733 return obj;
23734 } else {
23735 var newObj = {};if (obj != null) {
23736 for (var key in obj) {
23737 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23738 }
23739 }newObj.default = obj;return newObj;
23740 }
23741 }
23742
23743 module.exports = exports["default"];
23744
23745/***/ }),
23746/* 192 */
23747/***/ (function(module, exports, __webpack_require__) {
23748
23749 "use strict";
23750
23751 exports.__esModule = true;
23752 exports.is = is;
23753 exports.pullFlag = pullFlag;
23754
23755 var _pull = __webpack_require__(277);
23756
23757 var _pull2 = _interopRequireDefault(_pull);
23758
23759 var _babelTypes = __webpack_require__(1);
23760
23761 var t = _interopRequireWildcard(_babelTypes);
23762
23763 function _interopRequireWildcard(obj) {
23764 if (obj && obj.__esModule) {
23765 return obj;
23766 } else {
23767 var newObj = {};if (obj != null) {
23768 for (var key in obj) {
23769 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23770 }
23771 }newObj.default = obj;return newObj;
23772 }
23773 }
23774
23775 function _interopRequireDefault(obj) {
23776 return obj && obj.__esModule ? obj : { default: obj };
23777 }
23778
23779 function is(node, flag) {
23780 return t.isRegExpLiteral(node) && node.flags.indexOf(flag) >= 0;
23781 }
23782
23783 function pullFlag(node, flag) {
23784 var flags = node.flags.split("");
23785 if (node.flags.indexOf(flag) < 0) return;
23786 (0, _pull2.default)(flags, flag);
23787 node.flags = flags.join("");
23788 }
23789
23790/***/ }),
23791/* 193 */
23792/***/ (function(module, exports, __webpack_require__) {
23793
23794 "use strict";
23795
23796 exports.__esModule = true;
23797
23798 var _classCallCheck2 = __webpack_require__(3);
23799
23800 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
23801
23802 var _symbol = __webpack_require__(10);
23803
23804 var _symbol2 = _interopRequireDefault(_symbol);
23805
23806 var _babelHelperOptimiseCallExpression = __webpack_require__(191);
23807
23808 var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression);
23809
23810 var _babelMessages = __webpack_require__(20);
23811
23812 var messages = _interopRequireWildcard(_babelMessages);
23813
23814 var _babelTypes = __webpack_require__(1);
23815
23816 var t = _interopRequireWildcard(_babelTypes);
23817
23818 function _interopRequireWildcard(obj) {
23819 if (obj && obj.__esModule) {
23820 return obj;
23821 } else {
23822 var newObj = {};if (obj != null) {
23823 for (var key in obj) {
23824 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
23825 }
23826 }newObj.default = obj;return newObj;
23827 }
23828 }
23829
23830 function _interopRequireDefault(obj) {
23831 return obj && obj.__esModule ? obj : { default: obj };
23832 }
23833
23834 var HARDCORE_THIS_REF = (0, _symbol2.default)();
23835
23836 function isIllegalBareSuper(node, parent) {
23837 if (!t.isSuper(node)) return false;
23838 if (t.isMemberExpression(parent, { computed: false })) return false;
23839 if (t.isCallExpression(parent, { callee: node })) return false;
23840 return true;
23841 }
23842
23843 function isMemberExpressionSuper(node) {
23844 return t.isMemberExpression(node) && t.isSuper(node.object);
23845 }
23846
23847 function getPrototypeOfExpression(objectRef, isStatic) {
23848 var targetRef = isStatic ? objectRef : t.memberExpression(objectRef, t.identifier("prototype"));
23849
23850 return t.logicalExpression("||", t.memberExpression(targetRef, t.identifier("__proto__")), t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [targetRef]));
23851 }
23852
23853 var visitor = {
23854 Function: function Function(path) {
23855 if (!path.inShadow("this")) {
23856 path.skip();
23857 }
23858 },
23859 ReturnStatement: function ReturnStatement(path, state) {
23860 if (!path.inShadow("this")) {
23861 state.returns.push(path);
23862 }
23863 },
23864 ThisExpression: function ThisExpression(path, state) {
23865 if (!path.node[HARDCORE_THIS_REF]) {
23866 state.thises.push(path);
23867 }
23868 },
23869 enter: function enter(path, state) {
23870 var callback = state.specHandle;
23871 if (state.isLoose) callback = state.looseHandle;
23872
23873 var isBareSuper = path.isCallExpression() && path.get("callee").isSuper();
23874
23875 var result = callback.call(state, path);
23876
23877 if (result) {
23878 state.hasSuper = true;
23879 }
23880
23881 if (isBareSuper) {
23882 state.bareSupers.push(path);
23883 }
23884
23885 if (result === true) {
23886 path.requeue();
23887 }
23888
23889 if (result !== true && result) {
23890 if (Array.isArray(result)) {
23891 path.replaceWithMultiple(result);
23892 } else {
23893 path.replaceWith(result);
23894 }
23895 }
23896 }
23897 };
23898
23899 var ReplaceSupers = function () {
23900 function ReplaceSupers(opts) {
23901 var inClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
23902 (0, _classCallCheck3.default)(this, ReplaceSupers);
23903
23904 this.forceSuperMemoisation = opts.forceSuperMemoisation;
23905 this.methodPath = opts.methodPath;
23906 this.methodNode = opts.methodNode;
23907 this.superRef = opts.superRef;
23908 this.isStatic = opts.isStatic;
23909 this.hasSuper = false;
23910 this.inClass = inClass;
23911 this.isLoose = opts.isLoose;
23912 this.scope = this.methodPath.scope;
23913 this.file = opts.file;
23914 this.opts = opts;
23915
23916 this.bareSupers = [];
23917 this.returns = [];
23918 this.thises = [];
23919 }
23920
23921 ReplaceSupers.prototype.getObjectRef = function getObjectRef() {
23922 return this.opts.objectRef || this.opts.getObjectRef();
23923 };
23924
23925 ReplaceSupers.prototype.setSuperProperty = function setSuperProperty(property, value, isComputed) {
23926 return t.callExpression(this.file.addHelper("set"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), value, t.thisExpression()]);
23927 };
23928
23929 ReplaceSupers.prototype.getSuperProperty = function getSuperProperty(property, isComputed) {
23930 return t.callExpression(this.file.addHelper("get"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), t.thisExpression()]);
23931 };
23932
23933 ReplaceSupers.prototype.replace = function replace() {
23934 this.methodPath.traverse(visitor, this);
23935 };
23936
23937 ReplaceSupers.prototype.getLooseSuperProperty = function getLooseSuperProperty(id, parent) {
23938 var methodNode = this.methodNode;
23939 var superRef = this.superRef || t.identifier("Function");
23940
23941 if (parent.property === id) {
23942 return;
23943 } else if (t.isCallExpression(parent, { callee: id })) {
23944 return;
23945 } else if (t.isMemberExpression(parent) && !methodNode.static) {
23946 return t.memberExpression(superRef, t.identifier("prototype"));
23947 } else {
23948 return superRef;
23949 }
23950 };
23951
23952 ReplaceSupers.prototype.looseHandle = function looseHandle(path) {
23953 var node = path.node;
23954 if (path.isSuper()) {
23955 return this.getLooseSuperProperty(node, path.parent);
23956 } else if (path.isCallExpression()) {
23957 var callee = node.callee;
23958 if (!t.isMemberExpression(callee)) return;
23959 if (!t.isSuper(callee.object)) return;
23960
23961 t.appendToMemberExpression(callee, t.identifier("call"));
23962 node.arguments.unshift(t.thisExpression());
23963 return true;
23964 }
23965 };
23966
23967 ReplaceSupers.prototype.specHandleAssignmentExpression = function specHandleAssignmentExpression(ref, path, node) {
23968 if (node.operator === "=") {
23969 return this.setSuperProperty(node.left.property, node.right, node.left.computed);
23970 } else {
23971 ref = ref || path.scope.generateUidIdentifier("ref");
23972 return [t.variableDeclaration("var", [t.variableDeclarator(ref, node.left)]), t.expressionStatement(t.assignmentExpression("=", node.left, t.binaryExpression(node.operator[0], ref, node.right)))];
23973 }
23974 };
23975
23976 ReplaceSupers.prototype.specHandle = function specHandle(path) {
23977 var property = void 0;
23978 var computed = void 0;
23979 var args = void 0;
23980
23981 var parent = path.parent;
23982 var node = path.node;
23983
23984 if (isIllegalBareSuper(node, parent)) {
23985 throw path.buildCodeFrameError(messages.get("classesIllegalBareSuper"));
23986 }
23987
23988 if (t.isCallExpression(node)) {
23989 var callee = node.callee;
23990 if (t.isSuper(callee)) {
23991 return;
23992 } else if (isMemberExpressionSuper(callee)) {
23993 property = callee.property;
23994 computed = callee.computed;
23995 args = node.arguments;
23996 }
23997 } else if (t.isMemberExpression(node) && t.isSuper(node.object)) {
23998 property = node.property;
23999 computed = node.computed;
24000 } else if (t.isUpdateExpression(node) && isMemberExpressionSuper(node.argument)) {
24001 var binary = t.binaryExpression(node.operator[0], node.argument, t.numericLiteral(1));
24002 if (node.prefix) {
24003 return this.specHandleAssignmentExpression(null, path, binary);
24004 } else {
24005 var ref = path.scope.generateUidIdentifier("ref");
24006 return this.specHandleAssignmentExpression(ref, path, binary).concat(t.expressionStatement(ref));
24007 }
24008 } else if (t.isAssignmentExpression(node) && isMemberExpressionSuper(node.left)) {
24009 return this.specHandleAssignmentExpression(null, path, node);
24010 }
24011
24012 if (!property) return;
24013
24014 var superProperty = this.getSuperProperty(property, computed);
24015
24016 if (args) {
24017 return this.optimiseCall(superProperty, args);
24018 } else {
24019 return superProperty;
24020 }
24021 };
24022
24023 ReplaceSupers.prototype.optimiseCall = function optimiseCall(callee, args) {
24024 var thisNode = t.thisExpression();
24025 thisNode[HARDCORE_THIS_REF] = true;
24026 return (0, _babelHelperOptimiseCallExpression2.default)(callee, thisNode, args);
24027 };
24028
24029 return ReplaceSupers;
24030 }();
24031
24032 exports.default = ReplaceSupers;
24033 module.exports = exports["default"];
24034
24035/***/ }),
24036/* 194 */
24037/***/ (function(module, exports, __webpack_require__) {
24038
24039 "use strict";
24040
24041 exports.__esModule = true;
24042 exports.list = undefined;
24043
24044 var _keys = __webpack_require__(14);
24045
24046 var _keys2 = _interopRequireDefault(_keys);
24047
24048 exports.get = get;
24049
24050 var _helpers = __webpack_require__(321);
24051
24052 var _helpers2 = _interopRequireDefault(_helpers);
24053
24054 function _interopRequireDefault(obj) {
24055 return obj && obj.__esModule ? obj : { default: obj };
24056 }
24057
24058 function get(name) {
24059 var fn = _helpers2.default[name];
24060 if (!fn) throw new ReferenceError("Unknown helper " + name);
24061
24062 return fn().expression;
24063 }
24064
24065 var list = exports.list = (0, _keys2.default)(_helpers2.default).map(function (name) {
24066 return name.replace(/^_/, "");
24067 }).filter(function (name) {
24068 return name !== "__esModule";
24069 });
24070
24071 exports.default = get;
24072
24073/***/ }),
24074/* 195 */
24075/***/ (function(module, exports) {
24076
24077 "use strict";
24078
24079 exports.__esModule = true;
24080
24081 exports.default = function () {
24082 return {
24083 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24084 parserOpts.plugins.push("asyncGenerators");
24085 }
24086 };
24087 };
24088
24089 module.exports = exports["default"];
24090
24091/***/ }),
24092/* 196 */
24093/***/ (function(module, exports) {
24094
24095 "use strict";
24096
24097 exports.__esModule = true;
24098
24099 exports.default = function () {
24100 return {
24101 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24102 parserOpts.plugins.push("classConstructorCall");
24103 }
24104 };
24105 };
24106
24107 module.exports = exports["default"];
24108
24109/***/ }),
24110/* 197 */
24111/***/ (function(module, exports) {
24112
24113 "use strict";
24114
24115 exports.__esModule = true;
24116
24117 exports.default = function () {
24118 return {
24119 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24120 parserOpts.plugins.push("classProperties");
24121 }
24122 };
24123 };
24124
24125 module.exports = exports["default"];
24126
24127/***/ }),
24128/* 198 */
24129/***/ (function(module, exports) {
24130
24131 "use strict";
24132
24133 exports.__esModule = true;
24134
24135 exports.default = function () {
24136 return {
24137 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24138 parserOpts.plugins.push("doExpressions");
24139 }
24140 };
24141 };
24142
24143 module.exports = exports["default"];
24144
24145/***/ }),
24146/* 199 */
24147/***/ (function(module, exports) {
24148
24149 "use strict";
24150
24151 exports.__esModule = true;
24152
24153 exports.default = function () {
24154 return {
24155 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24156 parserOpts.plugins.push("exponentiationOperator");
24157 }
24158 };
24159 };
24160
24161 module.exports = exports["default"];
24162
24163/***/ }),
24164/* 200 */
24165/***/ (function(module, exports) {
24166
24167 "use strict";
24168
24169 exports.__esModule = true;
24170
24171 exports.default = function () {
24172 return {
24173 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24174 parserOpts.plugins.push("exportExtensions");
24175 }
24176 };
24177 };
24178
24179 module.exports = exports["default"];
24180
24181/***/ }),
24182/* 201 */
24183/***/ (function(module, exports) {
24184
24185 "use strict";
24186
24187 exports.__esModule = true;
24188
24189 exports.default = function () {
24190 return {
24191 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24192 parserOpts.plugins.push("functionBind");
24193 }
24194 };
24195 };
24196
24197 module.exports = exports["default"];
24198
24199/***/ }),
24200/* 202 */
24201/***/ (function(module, exports) {
24202
24203 "use strict";
24204
24205 exports.__esModule = true;
24206
24207 exports.default = function () {
24208 return {
24209 manipulateOptions: function manipulateOptions(opts, parserOpts) {
24210 parserOpts.plugins.push("objectRestSpread");
24211 }
24212 };
24213 };
24214
24215 module.exports = exports["default"];
24216
24217/***/ }),
24218/* 203 */
24219/***/ (function(module, exports, __webpack_require__) {
24220
24221 "use strict";
24222
24223 exports.__esModule = true;
24224
24225 var _getIterator2 = __webpack_require__(2);
24226
24227 var _getIterator3 = _interopRequireDefault(_getIterator2);
24228
24229 var _symbol = __webpack_require__(10);
24230
24231 var _symbol2 = _interopRequireDefault(_symbol);
24232
24233 exports.default = function (_ref) {
24234 var t = _ref.types;
24235
24236 var ALREADY_VISITED = (0, _symbol2.default)();
24237
24238 function findConstructorCall(path) {
24239 var methods = path.get("body.body");
24240
24241 for (var _iterator = methods, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
24242 var _ref2;
24243
24244 if (_isArray) {
24245 if (_i >= _iterator.length) break;
24246 _ref2 = _iterator[_i++];
24247 } else {
24248 _i = _iterator.next();
24249 if (_i.done) break;
24250 _ref2 = _i.value;
24251 }
24252
24253 var method = _ref2;
24254
24255 if (method.node.kind === "constructorCall") {
24256 return method;
24257 }
24258 }
24259
24260 return null;
24261 }
24262
24263 function handleClassWithCall(constructorCall, classPath) {
24264 var _classPath = classPath,
24265 node = _classPath.node;
24266
24267 var ref = node.id || classPath.scope.generateUidIdentifier("class");
24268
24269 if (classPath.parentPath.isExportDefaultDeclaration()) {
24270 classPath = classPath.parentPath;
24271 classPath.insertAfter(t.exportDefaultDeclaration(ref));
24272 }
24273
24274 classPath.replaceWithMultiple(buildWrapper({
24275 CLASS_REF: classPath.scope.generateUidIdentifier(ref.name),
24276 CALL_REF: classPath.scope.generateUidIdentifier(ref.name + "Call"),
24277 CALL: t.functionExpression(null, constructorCall.node.params, constructorCall.node.body),
24278 CLASS: t.toExpression(node),
24279 WRAPPER_REF: ref
24280 }));
24281
24282 constructorCall.remove();
24283 }
24284
24285 return {
24286 inherits: __webpack_require__(196),
24287
24288 visitor: {
24289 Class: function Class(path) {
24290 if (path.node[ALREADY_VISITED]) return;
24291 path.node[ALREADY_VISITED] = true;
24292
24293 var constructorCall = findConstructorCall(path);
24294
24295 if (constructorCall) {
24296 handleClassWithCall(constructorCall, path);
24297 } else {
24298 return;
24299 }
24300 }
24301 }
24302 };
24303 };
24304
24305 var _babelTemplate = __webpack_require__(4);
24306
24307 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
24308
24309 function _interopRequireDefault(obj) {
24310 return obj && obj.__esModule ? obj : { default: obj };
24311 }
24312
24313 var buildWrapper = (0, _babelTemplate2.default)("\n let CLASS_REF = CLASS;\n var CALL_REF = CALL;\n var WRAPPER_REF = function (...args) {\n if (this instanceof WRAPPER_REF) {\n return Reflect.construct(CLASS_REF, args);\n } else {\n return CALL_REF.apply(this, args);\n }\n };\n WRAPPER_REF.__proto__ = CLASS_REF;\n WRAPPER_REF;\n");
24314
24315 module.exports = exports["default"];
24316
24317/***/ }),
24318/* 204 */
24319/***/ (function(module, exports, __webpack_require__) {
24320
24321 "use strict";
24322
24323 exports.__esModule = true;
24324
24325 var _getIterator2 = __webpack_require__(2);
24326
24327 var _getIterator3 = _interopRequireDefault(_getIterator2);
24328
24329 exports.default = function (_ref) {
24330 var t = _ref.types;
24331
24332 var findBareSupers = {
24333 Super: function Super(path) {
24334 if (path.parentPath.isCallExpression({ callee: path.node })) {
24335 this.push(path.parentPath);
24336 }
24337 }
24338 };
24339
24340 var referenceVisitor = {
24341 ReferencedIdentifier: function ReferencedIdentifier(path) {
24342 if (this.scope.hasOwnBinding(path.node.name)) {
24343 this.collision = true;
24344 path.skip();
24345 }
24346 }
24347 };
24348
24349 var buildObjectDefineProperty = (0, _babelTemplate2.default)("\n Object.defineProperty(REF, KEY, {\n // configurable is false by default\n enumerable: true,\n writable: true,\n value: VALUE\n });\n ");
24350
24351 var buildClassPropertySpec = function buildClassPropertySpec(ref, _ref2) {
24352 var key = _ref2.key,
24353 value = _ref2.value,
24354 computed = _ref2.computed;
24355 return buildObjectDefineProperty({
24356 REF: ref,
24357 KEY: t.isIdentifier(key) && !computed ? t.stringLiteral(key.name) : key,
24358 VALUE: value ? value : t.identifier("undefined")
24359 });
24360 };
24361
24362 var buildClassPropertyNonSpec = function buildClassPropertyNonSpec(ref, _ref3) {
24363 var key = _ref3.key,
24364 value = _ref3.value,
24365 computed = _ref3.computed;
24366 return t.expressionStatement(t.assignmentExpression("=", t.memberExpression(ref, key, computed || t.isLiteral(key)), value));
24367 };
24368
24369 return {
24370 inherits: __webpack_require__(197),
24371
24372 visitor: {
24373 Class: function Class(path, state) {
24374 var buildClassProperty = state.opts.spec ? buildClassPropertySpec : buildClassPropertyNonSpec;
24375 var isDerived = !!path.node.superClass;
24376 var constructor = void 0;
24377 var props = [];
24378 var body = path.get("body");
24379
24380 for (var _iterator = body.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
24381 var _ref4;
24382
24383 if (_isArray) {
24384 if (_i >= _iterator.length) break;
24385 _ref4 = _iterator[_i++];
24386 } else {
24387 _i = _iterator.next();
24388 if (_i.done) break;
24389 _ref4 = _i.value;
24390 }
24391
24392 var _path = _ref4;
24393
24394 if (_path.isClassProperty()) {
24395 props.push(_path);
24396 } else if (_path.isClassMethod({ kind: "constructor" })) {
24397 constructor = _path;
24398 }
24399 }
24400
24401 if (!props.length) return;
24402
24403 var nodes = [];
24404 var ref = void 0;
24405
24406 if (path.isClassExpression() || !path.node.id) {
24407 (0, _babelHelperFunctionName2.default)(path);
24408 ref = path.scope.generateUidIdentifier("class");
24409 } else {
24410 ref = path.node.id;
24411 }
24412
24413 var instanceBody = [];
24414
24415 for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
24416 var _ref5;
24417
24418 if (_isArray2) {
24419 if (_i2 >= _iterator2.length) break;
24420 _ref5 = _iterator2[_i2++];
24421 } else {
24422 _i2 = _iterator2.next();
24423 if (_i2.done) break;
24424 _ref5 = _i2.value;
24425 }
24426
24427 var _prop = _ref5;
24428
24429 var propNode = _prop.node;
24430 if (propNode.decorators && propNode.decorators.length > 0) continue;
24431
24432 if (!state.opts.spec && !propNode.value) continue;
24433
24434 var isStatic = propNode.static;
24435
24436 if (isStatic) {
24437 nodes.push(buildClassProperty(ref, propNode));
24438 } else {
24439 if (!propNode.value) continue;
24440 instanceBody.push(buildClassProperty(t.thisExpression(), propNode));
24441 }
24442 }
24443
24444 if (instanceBody.length) {
24445 if (!constructor) {
24446 var newConstructor = t.classMethod("constructor", t.identifier("constructor"), [], t.blockStatement([]));
24447 if (isDerived) {
24448 newConstructor.params = [t.restElement(t.identifier("args"))];
24449 newConstructor.body.body.push(t.returnStatement(t.callExpression(t.super(), [t.spreadElement(t.identifier("args"))])));
24450 }
24451
24452 var _body$unshiftContaine = body.unshiftContainer("body", newConstructor);
24453
24454 constructor = _body$unshiftContaine[0];
24455 }
24456
24457 var collisionState = {
24458 collision: false,
24459 scope: constructor.scope
24460 };
24461
24462 for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
24463 var _ref6;
24464
24465 if (_isArray3) {
24466 if (_i3 >= _iterator3.length) break;
24467 _ref6 = _iterator3[_i3++];
24468 } else {
24469 _i3 = _iterator3.next();
24470 if (_i3.done) break;
24471 _ref6 = _i3.value;
24472 }
24473
24474 var prop = _ref6;
24475
24476 prop.traverse(referenceVisitor, collisionState);
24477 if (collisionState.collision) break;
24478 }
24479
24480 if (collisionState.collision) {
24481 var initialisePropsRef = path.scope.generateUidIdentifier("initialiseProps");
24482
24483 nodes.push(t.variableDeclaration("var", [t.variableDeclarator(initialisePropsRef, t.functionExpression(null, [], t.blockStatement(instanceBody)))]));
24484
24485 instanceBody = [t.expressionStatement(t.callExpression(t.memberExpression(initialisePropsRef, t.identifier("call")), [t.thisExpression()]))];
24486 }
24487
24488 if (isDerived) {
24489 var bareSupers = [];
24490 constructor.traverse(findBareSupers, bareSupers);
24491 for (var _iterator4 = bareSupers, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
24492 var _ref7;
24493
24494 if (_isArray4) {
24495 if (_i4 >= _iterator4.length) break;
24496 _ref7 = _iterator4[_i4++];
24497 } else {
24498 _i4 = _iterator4.next();
24499 if (_i4.done) break;
24500 _ref7 = _i4.value;
24501 }
24502
24503 var bareSuper = _ref7;
24504
24505 bareSuper.insertAfter(instanceBody);
24506 }
24507 } else {
24508 constructor.get("body").unshiftContainer("body", instanceBody);
24509 }
24510 }
24511
24512 for (var _iterator5 = props, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
24513 var _ref8;
24514
24515 if (_isArray5) {
24516 if (_i5 >= _iterator5.length) break;
24517 _ref8 = _iterator5[_i5++];
24518 } else {
24519 _i5 = _iterator5.next();
24520 if (_i5.done) break;
24521 _ref8 = _i5.value;
24522 }
24523
24524 var _prop2 = _ref8;
24525
24526 _prop2.remove();
24527 }
24528
24529 if (!nodes.length) return;
24530
24531 if (path.isClassExpression()) {
24532 path.scope.push({ id: ref });
24533 path.replaceWith(t.assignmentExpression("=", ref, path.node));
24534 } else {
24535 if (!path.node.id) {
24536 path.node.id = ref;
24537 }
24538
24539 if (path.parentPath.isExportDeclaration()) {
24540 path = path.parentPath;
24541 }
24542 }
24543
24544 path.insertAfter(nodes);
24545 },
24546 ArrowFunctionExpression: function ArrowFunctionExpression(path) {
24547 var classExp = path.get("body");
24548 if (!classExp.isClassExpression()) return;
24549
24550 var body = classExp.get("body");
24551 var members = body.get("body");
24552 if (members.some(function (member) {
24553 return member.isClassProperty();
24554 })) {
24555 path.ensureBlock();
24556 }
24557 }
24558 }
24559 };
24560 };
24561
24562 var _babelHelperFunctionName = __webpack_require__(40);
24563
24564 var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
24565
24566 var _babelTemplate = __webpack_require__(4);
24567
24568 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
24569
24570 function _interopRequireDefault(obj) {
24571 return obj && obj.__esModule ? obj : { default: obj };
24572 }
24573
24574 module.exports = exports["default"];
24575
24576/***/ }),
24577/* 205 */
24578/***/ (function(module, exports, __webpack_require__) {
24579
24580 "use strict";
24581
24582 exports.__esModule = true;
24583
24584 var _create = __webpack_require__(9);
24585
24586 var _create2 = _interopRequireDefault(_create);
24587
24588 var _getIterator2 = __webpack_require__(2);
24589
24590 var _getIterator3 = _interopRequireDefault(_getIterator2);
24591
24592 exports.default = function (_ref) {
24593 var t = _ref.types;
24594
24595 function cleanDecorators(decorators) {
24596 return decorators.reverse().map(function (dec) {
24597 return dec.expression;
24598 });
24599 }
24600
24601 function transformClass(path, ref, state) {
24602 var nodes = [];
24603
24604 state;
24605
24606 var classDecorators = path.node.decorators;
24607 if (classDecorators) {
24608 path.node.decorators = null;
24609 classDecorators = cleanDecorators(classDecorators);
24610
24611 for (var _iterator = classDecorators, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
24612 var _ref2;
24613
24614 if (_isArray) {
24615 if (_i >= _iterator.length) break;
24616 _ref2 = _iterator[_i++];
24617 } else {
24618 _i = _iterator.next();
24619 if (_i.done) break;
24620 _ref2 = _i.value;
24621 }
24622
24623 var decorator = _ref2;
24624
24625 nodes.push(buildClassDecorator({
24626 CLASS_REF: ref,
24627 DECORATOR: decorator
24628 }));
24629 }
24630 }
24631
24632 var map = (0, _create2.default)(null);
24633
24634 for (var _iterator2 = path.get("body.body"), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
24635 var _ref3;
24636
24637 if (_isArray2) {
24638 if (_i2 >= _iterator2.length) break;
24639 _ref3 = _iterator2[_i2++];
24640 } else {
24641 _i2 = _iterator2.next();
24642 if (_i2.done) break;
24643 _ref3 = _i2.value;
24644 }
24645
24646 var method = _ref3;
24647
24648 var decorators = method.node.decorators;
24649 if (!decorators) continue;
24650
24651 var _alias = t.toKeyAlias(method.node);
24652 map[_alias] = map[_alias] || [];
24653 map[_alias].push(method.node);
24654
24655 method.remove();
24656 }
24657
24658 for (var alias in map) {
24659 var items = map[alias];
24660
24661 items;
24662 }
24663
24664 return nodes;
24665 }
24666
24667 function hasDecorators(path) {
24668 if (path.isClass()) {
24669 if (path.node.decorators) return true;
24670
24671 for (var _iterator3 = path.node.body.body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
24672 var _ref4;
24673
24674 if (_isArray3) {
24675 if (_i3 >= _iterator3.length) break;
24676 _ref4 = _iterator3[_i3++];
24677 } else {
24678 _i3 = _iterator3.next();
24679 if (_i3.done) break;
24680 _ref4 = _i3.value;
24681 }
24682
24683 var method = _ref4;
24684
24685 if (method.decorators) {
24686 return true;
24687 }
24688 }
24689 } else if (path.isObjectExpression()) {
24690 for (var _iterator4 = path.node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
24691 var _ref5;
24692
24693 if (_isArray4) {
24694 if (_i4 >= _iterator4.length) break;
24695 _ref5 = _iterator4[_i4++];
24696 } else {
24697 _i4 = _iterator4.next();
24698 if (_i4.done) break;
24699 _ref5 = _i4.value;
24700 }
24701
24702 var prop = _ref5;
24703
24704 if (prop.decorators) {
24705 return true;
24706 }
24707 }
24708 }
24709
24710 return false;
24711 }
24712
24713 function doError(path) {
24714 throw path.buildCodeFrameError("Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n \"plugins\": [\"transform-decorators-legacy\"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ");
24715 }
24716
24717 return {
24718 inherits: __webpack_require__(125),
24719
24720 visitor: {
24721 ClassExpression: function ClassExpression(path) {
24722 if (!hasDecorators(path)) return;
24723 doError(path);
24724
24725 (0, _babelHelperExplodeClass2.default)(path);
24726
24727 var ref = path.scope.generateDeclaredUidIdentifier("ref");
24728 var nodes = [];
24729
24730 nodes.push(t.assignmentExpression("=", ref, path.node));
24731
24732 nodes = nodes.concat(transformClass(path, ref, this));
24733
24734 nodes.push(ref);
24735
24736 path.replaceWith(t.sequenceExpression(nodes));
24737 },
24738 ClassDeclaration: function ClassDeclaration(path) {
24739 if (!hasDecorators(path)) return;
24740 doError(path);
24741 (0, _babelHelperExplodeClass2.default)(path);
24742
24743 var ref = path.node.id;
24744 var nodes = [];
24745
24746 nodes = nodes.concat(transformClass(path, ref, this).map(function (expr) {
24747 return t.expressionStatement(expr);
24748 }));
24749 nodes.push(t.expressionStatement(ref));
24750
24751 path.insertAfter(nodes);
24752 },
24753 ObjectExpression: function ObjectExpression(path) {
24754 if (!hasDecorators(path)) return;
24755 doError(path);
24756 }
24757 }
24758 };
24759 };
24760
24761 var _babelTemplate = __webpack_require__(4);
24762
24763 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
24764
24765 var _babelHelperExplodeClass = __webpack_require__(319);
24766
24767 var _babelHelperExplodeClass2 = _interopRequireDefault(_babelHelperExplodeClass);
24768
24769 function _interopRequireDefault(obj) {
24770 return obj && obj.__esModule ? obj : { default: obj };
24771 }
24772
24773 var buildClassDecorator = (0, _babelTemplate2.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");
24774
24775 module.exports = exports["default"];
24776
24777/***/ }),
24778/* 206 */
24779/***/ (function(module, exports, __webpack_require__) {
24780
24781 "use strict";
24782
24783 exports.__esModule = true;
24784
24785 exports.default = function () {
24786 return {
24787 inherits: __webpack_require__(198),
24788
24789 visitor: {
24790 DoExpression: function DoExpression(path) {
24791 var body = path.node.body.body;
24792 if (body.length) {
24793 path.replaceWithMultiple(body);
24794 } else {
24795 path.replaceWith(path.scope.buildUndefinedNode());
24796 }
24797 }
24798 }
24799 };
24800 };
24801
24802 module.exports = exports["default"];
24803
24804/***/ }),
24805/* 207 */
24806/***/ (function(module, exports, __webpack_require__) {
24807
24808 "use strict";
24809
24810 exports.__esModule = true;
24811
24812 var _getIterator2 = __webpack_require__(2);
24813
24814 var _getIterator3 = _interopRequireDefault(_getIterator2);
24815
24816 var _classCallCheck2 = __webpack_require__(3);
24817
24818 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
24819
24820 var _babelTraverse = __webpack_require__(7);
24821
24822 var _babelHelperReplaceSupers = __webpack_require__(193);
24823
24824 var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers);
24825
24826 var _babelHelperOptimiseCallExpression = __webpack_require__(191);
24827
24828 var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression);
24829
24830 var _babelHelperDefineMap = __webpack_require__(188);
24831
24832 var defineMap = _interopRequireWildcard(_babelHelperDefineMap);
24833
24834 var _babelTemplate = __webpack_require__(4);
24835
24836 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
24837
24838 var _babelTypes = __webpack_require__(1);
24839
24840 var t = _interopRequireWildcard(_babelTypes);
24841
24842 function _interopRequireWildcard(obj) {
24843 if (obj && obj.__esModule) {
24844 return obj;
24845 } else {
24846 var newObj = {};if (obj != null) {
24847 for (var key in obj) {
24848 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
24849 }
24850 }newObj.default = obj;return newObj;
24851 }
24852 }
24853
24854 function _interopRequireDefault(obj) {
24855 return obj && obj.__esModule ? obj : { default: obj };
24856 }
24857
24858 var buildDerivedConstructor = (0, _babelTemplate2.default)("\n (function () {\n super(...arguments);\n })\n");
24859
24860 var noMethodVisitor = {
24861 "FunctionExpression|FunctionDeclaration": function FunctionExpressionFunctionDeclaration(path) {
24862 if (!path.is("shadow")) {
24863 path.skip();
24864 }
24865 },
24866 Method: function Method(path) {
24867 path.skip();
24868 }
24869 };
24870
24871 var verifyConstructorVisitor = _babelTraverse.visitors.merge([noMethodVisitor, {
24872 Super: function Super(path) {
24873 if (this.isDerived && !this.hasBareSuper && !path.parentPath.isCallExpression({ callee: path.node })) {
24874 throw path.buildCodeFrameError("'super.*' is not allowed before super()");
24875 }
24876 },
24877
24878 CallExpression: {
24879 exit: function exit(path) {
24880 if (path.get("callee").isSuper()) {
24881 this.hasBareSuper = true;
24882
24883 if (!this.isDerived) {
24884 throw path.buildCodeFrameError("super() is only allowed in a derived constructor");
24885 }
24886 }
24887 }
24888 },
24889
24890 ThisExpression: function ThisExpression(path) {
24891 if (this.isDerived && !this.hasBareSuper) {
24892 if (!path.inShadow("this")) {
24893 throw path.buildCodeFrameError("'this' is not allowed before super()");
24894 }
24895 }
24896 }
24897 }]);
24898
24899 var findThisesVisitor = _babelTraverse.visitors.merge([noMethodVisitor, {
24900 ThisExpression: function ThisExpression(path) {
24901 this.superThises.push(path);
24902 }
24903 }]);
24904
24905 var ClassTransformer = function () {
24906 function ClassTransformer(path, file) {
24907 (0, _classCallCheck3.default)(this, ClassTransformer);
24908
24909 this.parent = path.parent;
24910 this.scope = path.scope;
24911 this.node = path.node;
24912 this.path = path;
24913 this.file = file;
24914
24915 this.clearDescriptors();
24916
24917 this.instancePropBody = [];
24918 this.instancePropRefs = {};
24919 this.staticPropBody = [];
24920 this.body = [];
24921
24922 this.bareSuperAfter = [];
24923 this.bareSupers = [];
24924
24925 this.pushedConstructor = false;
24926 this.pushedInherits = false;
24927 this.isLoose = false;
24928
24929 this.superThises = [];
24930
24931 this.classId = this.node.id;
24932
24933 this.classRef = this.node.id ? t.identifier(this.node.id.name) : this.scope.generateUidIdentifier("class");
24934
24935 this.superName = this.node.superClass || t.identifier("Function");
24936 this.isDerived = !!this.node.superClass;
24937 }
24938
24939 ClassTransformer.prototype.run = function run() {
24940 var _this = this;
24941
24942 var superName = this.superName;
24943 var file = this.file;
24944 var body = this.body;
24945
24946 var constructorBody = this.constructorBody = t.blockStatement([]);
24947 this.constructor = this.buildConstructor();
24948
24949 var closureParams = [];
24950 var closureArgs = [];
24951
24952 if (this.isDerived) {
24953 closureArgs.push(superName);
24954
24955 superName = this.scope.generateUidIdentifierBasedOnNode(superName);
24956 closureParams.push(superName);
24957
24958 this.superName = superName;
24959 }
24960
24961 this.buildBody();
24962
24963 constructorBody.body.unshift(t.expressionStatement(t.callExpression(file.addHelper("classCallCheck"), [t.thisExpression(), this.classRef])));
24964
24965 body = body.concat(this.staticPropBody.map(function (fn) {
24966 return fn(_this.classRef);
24967 }));
24968
24969 if (this.classId) {
24970 if (body.length === 1) return t.toExpression(body[0]);
24971 }
24972
24973 body.push(t.returnStatement(this.classRef));
24974
24975 var container = t.functionExpression(null, closureParams, t.blockStatement(body));
24976 container.shadow = true;
24977 return t.callExpression(container, closureArgs);
24978 };
24979
24980 ClassTransformer.prototype.buildConstructor = function buildConstructor() {
24981 var func = t.functionDeclaration(this.classRef, [], this.constructorBody);
24982 t.inherits(func, this.node);
24983 return func;
24984 };
24985
24986 ClassTransformer.prototype.pushToMap = function pushToMap(node, enumerable) {
24987 var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "value";
24988 var scope = arguments[3];
24989
24990 var mutatorMap = void 0;
24991 if (node.static) {
24992 this.hasStaticDescriptors = true;
24993 mutatorMap = this.staticMutatorMap;
24994 } else {
24995 this.hasInstanceDescriptors = true;
24996 mutatorMap = this.instanceMutatorMap;
24997 }
24998
24999 var map = defineMap.push(mutatorMap, node, kind, this.file, scope);
25000
25001 if (enumerable) {
25002 map.enumerable = t.booleanLiteral(true);
25003 }
25004
25005 return map;
25006 };
25007
25008 ClassTransformer.prototype.constructorMeMaybe = function constructorMeMaybe() {
25009 var hasConstructor = false;
25010 var paths = this.path.get("body.body");
25011 for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
25012 var _ref;
25013
25014 if (_isArray) {
25015 if (_i >= _iterator.length) break;
25016 _ref = _iterator[_i++];
25017 } else {
25018 _i = _iterator.next();
25019 if (_i.done) break;
25020 _ref = _i.value;
25021 }
25022
25023 var path = _ref;
25024
25025 hasConstructor = path.equals("kind", "constructor");
25026 if (hasConstructor) break;
25027 }
25028 if (hasConstructor) return;
25029
25030 var params = void 0,
25031 body = void 0;
25032
25033 if (this.isDerived) {
25034 var _constructor = buildDerivedConstructor().expression;
25035 params = _constructor.params;
25036 body = _constructor.body;
25037 } else {
25038 params = [];
25039 body = t.blockStatement([]);
25040 }
25041
25042 this.path.get("body").unshiftContainer("body", t.classMethod("constructor", t.identifier("constructor"), params, body));
25043 };
25044
25045 ClassTransformer.prototype.buildBody = function buildBody() {
25046 this.constructorMeMaybe();
25047 this.pushBody();
25048 this.verifyConstructor();
25049
25050 if (this.userConstructor) {
25051 var constructorBody = this.constructorBody;
25052 constructorBody.body = constructorBody.body.concat(this.userConstructor.body.body);
25053 t.inherits(this.constructor, this.userConstructor);
25054 t.inherits(constructorBody, this.userConstructor.body);
25055 }
25056
25057 this.pushDescriptors();
25058 };
25059
25060 ClassTransformer.prototype.pushBody = function pushBody() {
25061 var classBodyPaths = this.path.get("body.body");
25062
25063 for (var _iterator2 = classBodyPaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
25064 var _ref2;
25065
25066 if (_isArray2) {
25067 if (_i2 >= _iterator2.length) break;
25068 _ref2 = _iterator2[_i2++];
25069 } else {
25070 _i2 = _iterator2.next();
25071 if (_i2.done) break;
25072 _ref2 = _i2.value;
25073 }
25074
25075 var path = _ref2;
25076
25077 var node = path.node;
25078
25079 if (path.isClassProperty()) {
25080 throw path.buildCodeFrameError("Missing class properties transform.");
25081 }
25082
25083 if (node.decorators) {
25084 throw path.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");
25085 }
25086
25087 if (t.isClassMethod(node)) {
25088 var isConstructor = node.kind === "constructor";
25089
25090 if (isConstructor) {
25091 path.traverse(verifyConstructorVisitor, this);
25092
25093 if (!this.hasBareSuper && this.isDerived) {
25094 throw path.buildCodeFrameError("missing super() call in constructor");
25095 }
25096 }
25097
25098 var replaceSupers = new _babelHelperReplaceSupers2.default({
25099 forceSuperMemoisation: isConstructor,
25100 methodPath: path,
25101 methodNode: node,
25102 objectRef: this.classRef,
25103 superRef: this.superName,
25104 isStatic: node.static,
25105 isLoose: this.isLoose,
25106 scope: this.scope,
25107 file: this.file
25108 }, true);
25109
25110 replaceSupers.replace();
25111
25112 if (isConstructor) {
25113 this.pushConstructor(replaceSupers, node, path);
25114 } else {
25115 this.pushMethod(node, path);
25116 }
25117 }
25118 }
25119 };
25120
25121 ClassTransformer.prototype.clearDescriptors = function clearDescriptors() {
25122 this.hasInstanceDescriptors = false;
25123 this.hasStaticDescriptors = false;
25124
25125 this.instanceMutatorMap = {};
25126 this.staticMutatorMap = {};
25127 };
25128
25129 ClassTransformer.prototype.pushDescriptors = function pushDescriptors() {
25130 this.pushInherits();
25131
25132 var body = this.body;
25133
25134 var instanceProps = void 0;
25135 var staticProps = void 0;
25136
25137 if (this.hasInstanceDescriptors) {
25138 instanceProps = defineMap.toClassObject(this.instanceMutatorMap);
25139 }
25140
25141 if (this.hasStaticDescriptors) {
25142 staticProps = defineMap.toClassObject(this.staticMutatorMap);
25143 }
25144
25145 if (instanceProps || staticProps) {
25146 if (instanceProps) instanceProps = defineMap.toComputedObjectFromClass(instanceProps);
25147 if (staticProps) staticProps = defineMap.toComputedObjectFromClass(staticProps);
25148
25149 var nullNode = t.nullLiteral();
25150
25151 var args = [this.classRef, nullNode, nullNode, nullNode, nullNode];
25152
25153 if (instanceProps) args[1] = instanceProps;
25154 if (staticProps) args[2] = staticProps;
25155
25156 if (this.instanceInitializersId) {
25157 args[3] = this.instanceInitializersId;
25158 body.unshift(this.buildObjectAssignment(this.instanceInitializersId));
25159 }
25160
25161 if (this.staticInitializersId) {
25162 args[4] = this.staticInitializersId;
25163 body.unshift(this.buildObjectAssignment(this.staticInitializersId));
25164 }
25165
25166 var lastNonNullIndex = 0;
25167 for (var i = 0; i < args.length; i++) {
25168 if (args[i] !== nullNode) lastNonNullIndex = i;
25169 }
25170 args = args.slice(0, lastNonNullIndex + 1);
25171
25172 body.push(t.expressionStatement(t.callExpression(this.file.addHelper("createClass"), args)));
25173 }
25174
25175 this.clearDescriptors();
25176 };
25177
25178 ClassTransformer.prototype.buildObjectAssignment = function buildObjectAssignment(id) {
25179 return t.variableDeclaration("var", [t.variableDeclarator(id, t.objectExpression([]))]);
25180 };
25181
25182 ClassTransformer.prototype.wrapSuperCall = function wrapSuperCall(bareSuper, superRef, thisRef, body) {
25183 var bareSuperNode = bareSuper.node;
25184
25185 if (this.isLoose) {
25186 bareSuperNode.arguments.unshift(t.thisExpression());
25187 if (bareSuperNode.arguments.length === 2 && t.isSpreadElement(bareSuperNode.arguments[1]) && t.isIdentifier(bareSuperNode.arguments[1].argument, { name: "arguments" })) {
25188 bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;
25189 bareSuperNode.callee = t.memberExpression(superRef, t.identifier("apply"));
25190 } else {
25191 bareSuperNode.callee = t.memberExpression(superRef, t.identifier("call"));
25192 }
25193 } else {
25194 bareSuperNode = (0, _babelHelperOptimiseCallExpression2.default)(t.logicalExpression("||", t.memberExpression(this.classRef, t.identifier("__proto__")), t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [this.classRef])), t.thisExpression(), bareSuperNode.arguments);
25195 }
25196
25197 var call = t.callExpression(this.file.addHelper("possibleConstructorReturn"), [t.thisExpression(), bareSuperNode]);
25198
25199 var bareSuperAfter = this.bareSuperAfter.map(function (fn) {
25200 return fn(thisRef);
25201 });
25202
25203 if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) {
25204
25205 if (this.superThises.length || bareSuperAfter.length) {
25206 bareSuper.scope.push({ id: thisRef });
25207 call = t.assignmentExpression("=", thisRef, call);
25208 }
25209
25210 if (bareSuperAfter.length) {
25211 call = t.toSequenceExpression([call].concat(bareSuperAfter, [thisRef]));
25212 }
25213
25214 bareSuper.parentPath.replaceWith(t.returnStatement(call));
25215 } else {
25216 bareSuper.replaceWithMultiple([t.variableDeclaration("var", [t.variableDeclarator(thisRef, call)])].concat(bareSuperAfter, [t.expressionStatement(thisRef)]));
25217 }
25218 };
25219
25220 ClassTransformer.prototype.verifyConstructor = function verifyConstructor() {
25221 var _this2 = this;
25222
25223 if (!this.isDerived) return;
25224
25225 var path = this.userConstructorPath;
25226 var body = path.get("body");
25227
25228 path.traverse(findThisesVisitor, this);
25229
25230 var guaranteedSuperBeforeFinish = !!this.bareSupers.length;
25231
25232 var superRef = this.superName || t.identifier("Function");
25233 var thisRef = path.scope.generateUidIdentifier("this");
25234
25235 for (var _iterator3 = this.bareSupers, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
25236 var _ref3;
25237
25238 if (_isArray3) {
25239 if (_i3 >= _iterator3.length) break;
25240 _ref3 = _iterator3[_i3++];
25241 } else {
25242 _i3 = _iterator3.next();
25243 if (_i3.done) break;
25244 _ref3 = _i3.value;
25245 }
25246
25247 var bareSuper = _ref3;
25248
25249 this.wrapSuperCall(bareSuper, superRef, thisRef, body);
25250
25251 if (guaranteedSuperBeforeFinish) {
25252 bareSuper.find(function (parentPath) {
25253 if (parentPath === path) {
25254 return true;
25255 }
25256
25257 if (parentPath.isLoop() || parentPath.isConditional()) {
25258 guaranteedSuperBeforeFinish = false;
25259 return true;
25260 }
25261 });
25262 }
25263 }
25264
25265 for (var _iterator4 = this.superThises, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
25266 var _ref4;
25267
25268 if (_isArray4) {
25269 if (_i4 >= _iterator4.length) break;
25270 _ref4 = _iterator4[_i4++];
25271 } else {
25272 _i4 = _iterator4.next();
25273 if (_i4.done) break;
25274 _ref4 = _i4.value;
25275 }
25276
25277 var thisPath = _ref4;
25278
25279 thisPath.replaceWith(thisRef);
25280 }
25281
25282 var wrapReturn = function wrapReturn(returnArg) {
25283 return t.callExpression(_this2.file.addHelper("possibleConstructorReturn"), [thisRef].concat(returnArg || []));
25284 };
25285
25286 var bodyPaths = body.get("body");
25287 if (bodyPaths.length && !bodyPaths.pop().isReturnStatement()) {
25288 body.pushContainer("body", t.returnStatement(guaranteedSuperBeforeFinish ? thisRef : wrapReturn()));
25289 }
25290
25291 for (var _iterator5 = this.superReturns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
25292 var _ref5;
25293
25294 if (_isArray5) {
25295 if (_i5 >= _iterator5.length) break;
25296 _ref5 = _iterator5[_i5++];
25297 } else {
25298 _i5 = _iterator5.next();
25299 if (_i5.done) break;
25300 _ref5 = _i5.value;
25301 }
25302
25303 var returnPath = _ref5;
25304
25305 if (returnPath.node.argument) {
25306 var ref = returnPath.scope.generateDeclaredUidIdentifier("ret");
25307 returnPath.get("argument").replaceWithMultiple([t.assignmentExpression("=", ref, returnPath.node.argument), wrapReturn(ref)]);
25308 } else {
25309 returnPath.get("argument").replaceWith(wrapReturn());
25310 }
25311 }
25312 };
25313
25314 ClassTransformer.prototype.pushMethod = function pushMethod(node, path) {
25315 var scope = path ? path.scope : this.scope;
25316
25317 if (node.kind === "method") {
25318 if (this._processMethod(node, scope)) return;
25319 }
25320
25321 this.pushToMap(node, false, null, scope);
25322 };
25323
25324 ClassTransformer.prototype._processMethod = function _processMethod() {
25325 return false;
25326 };
25327
25328 ClassTransformer.prototype.pushConstructor = function pushConstructor(replaceSupers, method, path) {
25329 this.bareSupers = replaceSupers.bareSupers;
25330 this.superReturns = replaceSupers.returns;
25331
25332 if (path.scope.hasOwnBinding(this.classRef.name)) {
25333 path.scope.rename(this.classRef.name);
25334 }
25335
25336 var construct = this.constructor;
25337
25338 this.userConstructorPath = path;
25339 this.userConstructor = method;
25340 this.hasConstructor = true;
25341
25342 t.inheritsComments(construct, method);
25343
25344 construct._ignoreUserWhitespace = true;
25345 construct.params = method.params;
25346
25347 t.inherits(construct.body, method.body);
25348 construct.body.directives = method.body.directives;
25349
25350 this._pushConstructor();
25351 };
25352
25353 ClassTransformer.prototype._pushConstructor = function _pushConstructor() {
25354 if (this.pushedConstructor) return;
25355 this.pushedConstructor = true;
25356
25357 if (this.hasInstanceDescriptors || this.hasStaticDescriptors) {
25358 this.pushDescriptors();
25359 }
25360
25361 this.body.push(this.constructor);
25362
25363 this.pushInherits();
25364 };
25365
25366 ClassTransformer.prototype.pushInherits = function pushInherits() {
25367 if (!this.isDerived || this.pushedInherits) return;
25368
25369 this.pushedInherits = true;
25370 this.body.unshift(t.expressionStatement(t.callExpression(this.file.addHelper("inherits"), [this.classRef, this.superName])));
25371 };
25372
25373 return ClassTransformer;
25374 }();
25375
25376 exports.default = ClassTransformer;
25377 module.exports = exports["default"];
25378
25379/***/ }),
25380/* 208 */
25381/***/ (function(module, exports, __webpack_require__) {
25382
25383 "use strict";
25384
25385 exports.__esModule = true;
25386
25387 var _create = __webpack_require__(9);
25388
25389 var _create2 = _interopRequireDefault(_create);
25390
25391 var _getIterator2 = __webpack_require__(2);
25392
25393 var _getIterator3 = _interopRequireDefault(_getIterator2);
25394
25395 var _symbol = __webpack_require__(10);
25396
25397 var _symbol2 = _interopRequireDefault(_symbol);
25398
25399 exports.default = function (_ref) {
25400 var t = _ref.types;
25401
25402 var IGNORE_REASSIGNMENT_SYMBOL = (0, _symbol2.default)();
25403
25404 var reassignmentVisitor = {
25405 "AssignmentExpression|UpdateExpression": function AssignmentExpressionUpdateExpression(path) {
25406 if (path.node[IGNORE_REASSIGNMENT_SYMBOL]) return;
25407 path.node[IGNORE_REASSIGNMENT_SYMBOL] = true;
25408
25409 var arg = path.get(path.isAssignmentExpression() ? "left" : "argument");
25410 if (!arg.isIdentifier()) return;
25411
25412 var name = arg.node.name;
25413
25414 if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
25415
25416 var exportedNames = this.exports[name];
25417 if (!exportedNames) return;
25418
25419 var node = path.node;
25420
25421 var isPostUpdateExpression = path.isUpdateExpression() && !node.prefix;
25422 if (isPostUpdateExpression) {
25423 if (node.operator === "++") node = t.binaryExpression("+", node.argument, t.numericLiteral(1));else if (node.operator === "--") node = t.binaryExpression("-", node.argument, t.numericLiteral(1));else isPostUpdateExpression = false;
25424 }
25425
25426 for (var _iterator = exportedNames, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
25427 var _ref2;
25428
25429 if (_isArray) {
25430 if (_i >= _iterator.length) break;
25431 _ref2 = _iterator[_i++];
25432 } else {
25433 _i = _iterator.next();
25434 if (_i.done) break;
25435 _ref2 = _i.value;
25436 }
25437
25438 var exportedName = _ref2;
25439
25440 node = this.buildCall(exportedName, node).expression;
25441 }
25442
25443 if (isPostUpdateExpression) node = t.sequenceExpression([node, path.node]);
25444
25445 path.replaceWith(node);
25446 }
25447 };
25448
25449 return {
25450 visitor: {
25451 CallExpression: function CallExpression(path, state) {
25452 if (path.node.callee.type === TYPE_IMPORT) {
25453 var contextIdent = state.contextIdent;
25454 path.replaceWith(t.callExpression(t.memberExpression(contextIdent, t.identifier("import")), path.node.arguments));
25455 }
25456 },
25457 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
25458 if (path.node.name == "__moduleName" && !path.scope.hasBinding("__moduleName")) {
25459 path.replaceWith(t.memberExpression(state.contextIdent, t.identifier("id")));
25460 }
25461 },
25462
25463 Program: {
25464 enter: function enter(path, state) {
25465 state.contextIdent = path.scope.generateUidIdentifier("context");
25466 },
25467 exit: function exit(path, state) {
25468 var exportIdent = path.scope.generateUidIdentifier("export");
25469 var contextIdent = state.contextIdent;
25470
25471 var exportNames = (0, _create2.default)(null);
25472 var modules = [];
25473
25474 var beforeBody = [];
25475 var setters = [];
25476 var sources = [];
25477 var variableIds = [];
25478 var removedPaths = [];
25479
25480 function addExportName(key, val) {
25481 exportNames[key] = exportNames[key] || [];
25482 exportNames[key].push(val);
25483 }
25484
25485 function pushModule(source, key, specifiers) {
25486 var module = void 0;
25487 modules.forEach(function (m) {
25488 if (m.key === source) {
25489 module = m;
25490 }
25491 });
25492 if (!module) {
25493 modules.push(module = { key: source, imports: [], exports: [] });
25494 }
25495 module[key] = module[key].concat(specifiers);
25496 }
25497
25498 function buildExportCall(name, val) {
25499 return t.expressionStatement(t.callExpression(exportIdent, [t.stringLiteral(name), val]));
25500 }
25501
25502 var body = path.get("body");
25503
25504 var canHoist = true;
25505 for (var _iterator2 = body, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
25506 var _ref3;
25507
25508 if (_isArray2) {
25509 if (_i2 >= _iterator2.length) break;
25510 _ref3 = _iterator2[_i2++];
25511 } else {
25512 _i2 = _iterator2.next();
25513 if (_i2.done) break;
25514 _ref3 = _i2.value;
25515 }
25516
25517 var _path = _ref3;
25518
25519 if (_path.isExportDeclaration()) _path = _path.get("declaration");
25520 if (_path.isVariableDeclaration() && _path.node.kind !== "var") {
25521 canHoist = false;
25522 break;
25523 }
25524 }
25525
25526 for (var _iterator3 = body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
25527 var _ref4;
25528
25529 if (_isArray3) {
25530 if (_i3 >= _iterator3.length) break;
25531 _ref4 = _iterator3[_i3++];
25532 } else {
25533 _i3 = _iterator3.next();
25534 if (_i3.done) break;
25535 _ref4 = _i3.value;
25536 }
25537
25538 var _path2 = _ref4;
25539
25540 if (canHoist && _path2.isFunctionDeclaration()) {
25541 beforeBody.push(_path2.node);
25542 removedPaths.push(_path2);
25543 } else if (_path2.isImportDeclaration()) {
25544 var source = _path2.node.source.value;
25545 pushModule(source, "imports", _path2.node.specifiers);
25546 for (var name in _path2.getBindingIdentifiers()) {
25547 _path2.scope.removeBinding(name);
25548 variableIds.push(t.identifier(name));
25549 }
25550 _path2.remove();
25551 } else if (_path2.isExportAllDeclaration()) {
25552 pushModule(_path2.node.source.value, "exports", _path2.node);
25553 _path2.remove();
25554 } else if (_path2.isExportDefaultDeclaration()) {
25555 var declar = _path2.get("declaration");
25556 if (declar.isClassDeclaration() || declar.isFunctionDeclaration()) {
25557 var id = declar.node.id;
25558 var nodes = [];
25559
25560 if (id) {
25561 nodes.push(declar.node);
25562 nodes.push(buildExportCall("default", id));
25563 addExportName(id.name, "default");
25564 } else {
25565 nodes.push(buildExportCall("default", t.toExpression(declar.node)));
25566 }
25567
25568 if (!canHoist || declar.isClassDeclaration()) {
25569 _path2.replaceWithMultiple(nodes);
25570 } else {
25571 beforeBody = beforeBody.concat(nodes);
25572 removedPaths.push(_path2);
25573 }
25574 } else {
25575 _path2.replaceWith(buildExportCall("default", declar.node));
25576 }
25577 } else if (_path2.isExportNamedDeclaration()) {
25578 var _declar = _path2.get("declaration");
25579
25580 if (_declar.node) {
25581 _path2.replaceWith(_declar);
25582
25583 var _nodes = [];
25584 var bindingIdentifiers = void 0;
25585 if (_path2.isFunction()) {
25586 var node = _declar.node;
25587 var _name = node.id.name;
25588 if (canHoist) {
25589 addExportName(_name, _name);
25590 beforeBody.push(node);
25591 beforeBody.push(buildExportCall(_name, node.id));
25592 removedPaths.push(_path2);
25593 } else {
25594 var _bindingIdentifiers;
25595
25596 bindingIdentifiers = (_bindingIdentifiers = {}, _bindingIdentifiers[_name] = node.id, _bindingIdentifiers);
25597 }
25598 } else {
25599 bindingIdentifiers = _declar.getBindingIdentifiers();
25600 }
25601 for (var _name2 in bindingIdentifiers) {
25602 addExportName(_name2, _name2);
25603 _nodes.push(buildExportCall(_name2, t.identifier(_name2)));
25604 }
25605 _path2.insertAfter(_nodes);
25606 } else {
25607 var specifiers = _path2.node.specifiers;
25608 if (specifiers && specifiers.length) {
25609 if (_path2.node.source) {
25610 pushModule(_path2.node.source.value, "exports", specifiers);
25611 _path2.remove();
25612 } else {
25613 var _nodes2 = [];
25614
25615 for (var _iterator7 = specifiers, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
25616 var _ref8;
25617
25618 if (_isArray7) {
25619 if (_i7 >= _iterator7.length) break;
25620 _ref8 = _iterator7[_i7++];
25621 } else {
25622 _i7 = _iterator7.next();
25623 if (_i7.done) break;
25624 _ref8 = _i7.value;
25625 }
25626
25627 var specifier = _ref8;
25628
25629 _nodes2.push(buildExportCall(specifier.exported.name, specifier.local));
25630 addExportName(specifier.local.name, specifier.exported.name);
25631 }
25632
25633 _path2.replaceWithMultiple(_nodes2);
25634 }
25635 }
25636 }
25637 }
25638 }
25639
25640 modules.forEach(function (specifiers) {
25641 var setterBody = [];
25642 var target = path.scope.generateUidIdentifier(specifiers.key);
25643
25644 for (var _iterator4 = specifiers.imports, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
25645 var _ref5;
25646
25647 if (_isArray4) {
25648 if (_i4 >= _iterator4.length) break;
25649 _ref5 = _iterator4[_i4++];
25650 } else {
25651 _i4 = _iterator4.next();
25652 if (_i4.done) break;
25653 _ref5 = _i4.value;
25654 }
25655
25656 var specifier = _ref5;
25657
25658 if (t.isImportNamespaceSpecifier(specifier)) {
25659 setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, target)));
25660 } else if (t.isImportDefaultSpecifier(specifier)) {
25661 specifier = t.importSpecifier(specifier.local, t.identifier("default"));
25662 }
25663
25664 if (t.isImportSpecifier(specifier)) {
25665 setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, t.memberExpression(target, specifier.imported))));
25666 }
25667 }
25668
25669 if (specifiers.exports.length) {
25670 var exportObjRef = path.scope.generateUidIdentifier("exportObj");
25671
25672 setterBody.push(t.variableDeclaration("var", [t.variableDeclarator(exportObjRef, t.objectExpression([]))]));
25673
25674 for (var _iterator5 = specifiers.exports, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
25675 var _ref6;
25676
25677 if (_isArray5) {
25678 if (_i5 >= _iterator5.length) break;
25679 _ref6 = _iterator5[_i5++];
25680 } else {
25681 _i5 = _iterator5.next();
25682 if (_i5.done) break;
25683 _ref6 = _i5.value;
25684 }
25685
25686 var node = _ref6;
25687
25688 if (t.isExportAllDeclaration(node)) {
25689 setterBody.push(buildExportAll({
25690 KEY: path.scope.generateUidIdentifier("key"),
25691 EXPORT_OBJ: exportObjRef,
25692 TARGET: target
25693 }));
25694 } else if (t.isExportSpecifier(node)) {
25695 setterBody.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(exportObjRef, node.exported), t.memberExpression(target, node.local))));
25696 } else {}
25697 }
25698
25699 setterBody.push(t.expressionStatement(t.callExpression(exportIdent, [exportObjRef])));
25700 }
25701
25702 sources.push(t.stringLiteral(specifiers.key));
25703 setters.push(t.functionExpression(null, [target], t.blockStatement(setterBody)));
25704 });
25705
25706 var moduleName = this.getModuleName();
25707 if (moduleName) moduleName = t.stringLiteral(moduleName);
25708
25709 if (canHoist) {
25710 (0, _babelHelperHoistVariables2.default)(path, function (id) {
25711 return variableIds.push(id);
25712 });
25713 }
25714
25715 if (variableIds.length) {
25716 beforeBody.unshift(t.variableDeclaration("var", variableIds.map(function (id) {
25717 return t.variableDeclarator(id);
25718 })));
25719 }
25720
25721 path.traverse(reassignmentVisitor, {
25722 exports: exportNames,
25723 buildCall: buildExportCall,
25724 scope: path.scope
25725 });
25726
25727 for (var _iterator6 = removedPaths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
25728 var _ref7;
25729
25730 if (_isArray6) {
25731 if (_i6 >= _iterator6.length) break;
25732 _ref7 = _iterator6[_i6++];
25733 } else {
25734 _i6 = _iterator6.next();
25735 if (_i6.done) break;
25736 _ref7 = _i6.value;
25737 }
25738
25739 var _path3 = _ref7;
25740
25741 _path3.remove();
25742 }
25743
25744 path.node.body = [buildTemplate({
25745 SYSTEM_REGISTER: t.memberExpression(t.identifier(state.opts.systemGlobal || "System"), t.identifier("register")),
25746 BEFORE_BODY: beforeBody,
25747 MODULE_NAME: moduleName,
25748 SETTERS: setters,
25749 SOURCES: sources,
25750 BODY: path.node.body,
25751 EXPORT_IDENTIFIER: exportIdent,
25752 CONTEXT_IDENTIFIER: contextIdent
25753 })];
25754 }
25755 }
25756 }
25757 };
25758 };
25759
25760 var _babelHelperHoistVariables = __webpack_require__(190);
25761
25762 var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables);
25763
25764 var _babelTemplate = __webpack_require__(4);
25765
25766 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
25767
25768 function _interopRequireDefault(obj) {
25769 return obj && obj.__esModule ? obj : { default: obj };
25770 }
25771
25772 var buildTemplate = (0, _babelTemplate2.default)("\n SYSTEM_REGISTER(MODULE_NAME, [SOURCES], function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: [SETTERS],\n execute: function () {\n BODY;\n }\n };\n });\n");
25773
25774 var buildExportAll = (0, _babelTemplate2.default)("\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n");
25775
25776 var TYPE_IMPORT = "Import";
25777
25778 module.exports = exports["default"];
25779
25780/***/ }),
25781/* 209 */
25782/***/ (function(module, exports, __webpack_require__) {
25783
25784 "use strict";
25785
25786 exports.__esModule = true;
25787
25788 exports.default = function (_ref) {
25789 var t = _ref.types;
25790
25791 function isValidDefine(path) {
25792 if (!path.isExpressionStatement()) return;
25793
25794 var expr = path.get("expression");
25795 if (!expr.isCallExpression()) return false;
25796 if (!expr.get("callee").isIdentifier({ name: "define" })) return false;
25797
25798 var args = expr.get("arguments");
25799 if (args.length === 3 && !args.shift().isStringLiteral()) return false;
25800 if (args.length !== 2) return false;
25801 if (!args.shift().isArrayExpression()) return false;
25802 if (!args.shift().isFunctionExpression()) return false;
25803
25804 return true;
25805 }
25806
25807 return {
25808 inherits: __webpack_require__(131),
25809
25810 visitor: {
25811 Program: {
25812 exit: function exit(path, state) {
25813 var last = path.get("body").pop();
25814 if (!isValidDefine(last)) return;
25815
25816 var call = last.node.expression;
25817 var args = call.arguments;
25818
25819 var moduleName = args.length === 3 ? args.shift() : null;
25820 var amdArgs = call.arguments[0];
25821 var func = call.arguments[1];
25822 var browserGlobals = state.opts.globals || {};
25823
25824 var commonArgs = amdArgs.elements.map(function (arg) {
25825 if (arg.value === "module" || arg.value === "exports") {
25826 return t.identifier(arg.value);
25827 } else {
25828 return t.callExpression(t.identifier("require"), [arg]);
25829 }
25830 });
25831
25832 var browserArgs = amdArgs.elements.map(function (arg) {
25833 if (arg.value === "module") {
25834 return t.identifier("mod");
25835 } else if (arg.value === "exports") {
25836 return t.memberExpression(t.identifier("mod"), t.identifier("exports"));
25837 } else {
25838 var memberExpression = void 0;
25839
25840 if (state.opts.exactGlobals) {
25841 var globalRef = browserGlobals[arg.value];
25842 if (globalRef) {
25843 memberExpression = globalRef.split(".").reduce(function (accum, curr) {
25844 return t.memberExpression(accum, t.identifier(curr));
25845 }, t.identifier("global"));
25846 } else {
25847 memberExpression = t.memberExpression(t.identifier("global"), t.identifier(t.toIdentifier(arg.value)));
25848 }
25849 } else {
25850 var requireName = (0, _path.basename)(arg.value, (0, _path.extname)(arg.value));
25851 var globalName = browserGlobals[requireName] || requireName;
25852 memberExpression = t.memberExpression(t.identifier("global"), t.identifier(t.toIdentifier(globalName)));
25853 }
25854
25855 return memberExpression;
25856 }
25857 });
25858
25859 var moduleNameOrBasename = moduleName ? moduleName.value : this.file.opts.basename;
25860 var globalToAssign = t.memberExpression(t.identifier("global"), t.identifier(t.toIdentifier(moduleNameOrBasename)));
25861 var prerequisiteAssignments = null;
25862
25863 if (state.opts.exactGlobals) {
25864 var globalName = browserGlobals[moduleNameOrBasename];
25865
25866 if (globalName) {
25867 prerequisiteAssignments = [];
25868
25869 var members = globalName.split(".");
25870 globalToAssign = members.slice(1).reduce(function (accum, curr) {
25871 prerequisiteAssignments.push(buildPrerequisiteAssignment({ GLOBAL_REFERENCE: accum }));
25872 return t.memberExpression(accum, t.identifier(curr));
25873 }, t.memberExpression(t.identifier("global"), t.identifier(members[0])));
25874 }
25875 }
25876
25877 var globalExport = buildGlobalExport({
25878 BROWSER_ARGUMENTS: browserArgs,
25879 PREREQUISITE_ASSIGNMENTS: prerequisiteAssignments,
25880 GLOBAL_TO_ASSIGN: globalToAssign
25881 });
25882
25883 last.replaceWith(buildWrapper({
25884 MODULE_NAME: moduleName,
25885 AMD_ARGUMENTS: amdArgs,
25886 COMMON_ARGUMENTS: commonArgs,
25887 GLOBAL_EXPORT: globalExport,
25888 FUNC: func
25889 }));
25890 }
25891 }
25892 }
25893 };
25894 };
25895
25896 var _path = __webpack_require__(19);
25897
25898 var _babelTemplate = __webpack_require__(4);
25899
25900 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
25901
25902 function _interopRequireDefault(obj) {
25903 return obj && obj.__esModule ? obj : { default: obj };
25904 }
25905
25906 var buildPrerequisiteAssignment = (0, _babelTemplate2.default)("\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n");
25907
25908 var buildGlobalExport = (0, _babelTemplate2.default)("\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n PREREQUISITE_ASSIGNMENTS\n GLOBAL_TO_ASSIGN = mod.exports;\n");
25909
25910 var buildWrapper = (0, _babelTemplate2.default)("\n (function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== \"undefined\") {\n factory(COMMON_ARGUMENTS);\n } else {\n GLOBAL_EXPORT\n }\n })(this, FUNC);\n");
25911
25912 module.exports = exports["default"];
25913
25914/***/ }),
25915/* 210 */
25916/***/ (function(module, exports, __webpack_require__) {
25917
25918 "use strict";
25919
25920 exports.__esModule = true;
25921
25922 exports.default = function (_ref) {
25923 var t = _ref.types;
25924
25925 function build(node, nodes, scope) {
25926 var first = node.specifiers[0];
25927 if (!t.isExportNamespaceSpecifier(first) && !t.isExportDefaultSpecifier(first)) return;
25928
25929 var specifier = node.specifiers.shift();
25930 var uid = scope.generateUidIdentifier(specifier.exported.name);
25931
25932 var newSpecifier = void 0;
25933 if (t.isExportNamespaceSpecifier(specifier)) {
25934 newSpecifier = t.importNamespaceSpecifier(uid);
25935 } else {
25936 newSpecifier = t.importDefaultSpecifier(uid);
25937 }
25938
25939 nodes.push(t.importDeclaration([newSpecifier], node.source));
25940 nodes.push(t.exportNamedDeclaration(null, [t.exportSpecifier(uid, specifier.exported)]));
25941
25942 build(node, nodes, scope);
25943 }
25944
25945 return {
25946 inherits: __webpack_require__(200),
25947
25948 visitor: {
25949 ExportNamedDeclaration: function ExportNamedDeclaration(path) {
25950 var node = path.node,
25951 scope = path.scope;
25952
25953 var nodes = [];
25954 build(node, nodes, scope);
25955 if (!nodes.length) return;
25956
25957 if (node.specifiers.length >= 1) {
25958 nodes.push(node);
25959 }
25960 path.replaceWithMultiple(nodes);
25961 }
25962 }
25963 };
25964 };
25965
25966 module.exports = exports["default"];
25967
25968/***/ }),
25969/* 211 */
25970/***/ (function(module, exports, __webpack_require__) {
25971
25972 "use strict";
25973
25974 exports.__esModule = true;
25975
25976 var _getIterator2 = __webpack_require__(2);
25977
25978 var _getIterator3 = _interopRequireDefault(_getIterator2);
25979
25980 exports.default = function (_ref) {
25981 var t = _ref.types;
25982
25983 var FLOW_DIRECTIVE = "@flow";
25984
25985 return {
25986 inherits: __webpack_require__(126),
25987
25988 visitor: {
25989 Program: function Program(path, _ref2) {
25990 var comments = _ref2.file.ast.comments;
25991
25992 for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
25993 var _ref3;
25994
25995 if (_isArray) {
25996 if (_i >= _iterator.length) break;
25997 _ref3 = _iterator[_i++];
25998 } else {
25999 _i = _iterator.next();
26000 if (_i.done) break;
26001 _ref3 = _i.value;
26002 }
26003
26004 var comment = _ref3;
26005
26006 if (comment.value.indexOf(FLOW_DIRECTIVE) >= 0) {
26007 comment.value = comment.value.replace(FLOW_DIRECTIVE, "");
26008
26009 if (!comment.value.replace(/\*/g, "").trim()) comment.ignore = true;
26010 }
26011 }
26012 },
26013 Flow: function Flow(path) {
26014 path.remove();
26015 },
26016 ClassProperty: function ClassProperty(path) {
26017 path.node.variance = null;
26018 path.node.typeAnnotation = null;
26019 if (!path.node.value) path.remove();
26020 },
26021 Class: function Class(path) {
26022 path.node.implements = null;
26023
26024 path.get("body.body").forEach(function (child) {
26025 if (child.isClassProperty()) {
26026 child.node.typeAnnotation = null;
26027 if (!child.node.value) child.remove();
26028 }
26029 });
26030 },
26031 AssignmentPattern: function AssignmentPattern(_ref4) {
26032 var node = _ref4.node;
26033
26034 node.left.optional = false;
26035 },
26036 Function: function Function(_ref5) {
26037 var node = _ref5.node;
26038
26039 for (var i = 0; i < node.params.length; i++) {
26040 var param = node.params[i];
26041 param.optional = false;
26042 }
26043 },
26044 TypeCastExpression: function TypeCastExpression(path) {
26045 var node = path.node;
26046
26047 do {
26048 node = node.expression;
26049 } while (t.isTypeCastExpression(node));
26050 path.replaceWith(node);
26051 }
26052 }
26053 };
26054 };
26055
26056 function _interopRequireDefault(obj) {
26057 return obj && obj.__esModule ? obj : { default: obj };
26058 }
26059
26060 module.exports = exports["default"];
26061
26062/***/ }),
26063/* 212 */
26064/***/ (function(module, exports, __webpack_require__) {
26065
26066 "use strict";
26067
26068 exports.__esModule = true;
26069
26070 exports.default = function (_ref) {
26071 var t = _ref.types;
26072
26073 function getTempId(scope) {
26074 var id = scope.path.getData("functionBind");
26075 if (id) return id;
26076
26077 id = scope.generateDeclaredUidIdentifier("context");
26078 return scope.path.setData("functionBind", id);
26079 }
26080
26081 function getStaticContext(bind, scope) {
26082 var object = bind.object || bind.callee.object;
26083 return scope.isStatic(object) && object;
26084 }
26085
26086 function inferBindContext(bind, scope) {
26087 var staticContext = getStaticContext(bind, scope);
26088 if (staticContext) return staticContext;
26089
26090 var tempId = getTempId(scope);
26091 if (bind.object) {
26092 bind.callee = t.sequenceExpression([t.assignmentExpression("=", tempId, bind.object), bind.callee]);
26093 } else {
26094 bind.callee.object = t.assignmentExpression("=", tempId, bind.callee.object);
26095 }
26096 return tempId;
26097 }
26098
26099 return {
26100 inherits: __webpack_require__(201),
26101
26102 visitor: {
26103 CallExpression: function CallExpression(_ref2) {
26104 var node = _ref2.node,
26105 scope = _ref2.scope;
26106
26107 var bind = node.callee;
26108 if (!t.isBindExpression(bind)) return;
26109
26110 var context = inferBindContext(bind, scope);
26111 node.callee = t.memberExpression(bind.callee, t.identifier("call"));
26112 node.arguments.unshift(context);
26113 },
26114 BindExpression: function BindExpression(path) {
26115 var node = path.node,
26116 scope = path.scope;
26117
26118 var context = inferBindContext(node, scope);
26119 path.replaceWith(t.callExpression(t.memberExpression(node.callee, t.identifier("bind")), [context]));
26120 }
26121 }
26122 };
26123 };
26124
26125 module.exports = exports["default"];
26126
26127/***/ }),
26128/* 213 */
26129/***/ (function(module, exports, __webpack_require__) {
26130
26131 "use strict";
26132
26133 exports.__esModule = true;
26134
26135 var _getIterator2 = __webpack_require__(2);
26136
26137 var _getIterator3 = _interopRequireDefault(_getIterator2);
26138
26139 exports.default = function (_ref) {
26140 var t = _ref.types;
26141
26142 function hasRestProperty(path) {
26143 var foundRestProperty = false;
26144 path.traverse({
26145 RestProperty: function RestProperty() {
26146 foundRestProperty = true;
26147 path.stop();
26148 }
26149 });
26150 return foundRestProperty;
26151 }
26152
26153 function hasSpread(node) {
26154 for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
26155 var _ref2;
26156
26157 if (_isArray) {
26158 if (_i >= _iterator.length) break;
26159 _ref2 = _iterator[_i++];
26160 } else {
26161 _i = _iterator.next();
26162 if (_i.done) break;
26163 _ref2 = _i.value;
26164 }
26165
26166 var prop = _ref2;
26167
26168 if (t.isSpreadProperty(prop)) {
26169 return true;
26170 }
26171 }
26172 return false;
26173 }
26174
26175 function createObjectSpread(file, props, objRef) {
26176 var restProperty = props.pop();
26177
26178 var keys = [];
26179 for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
26180 var _ref3;
26181
26182 if (_isArray2) {
26183 if (_i2 >= _iterator2.length) break;
26184 _ref3 = _iterator2[_i2++];
26185 } else {
26186 _i2 = _iterator2.next();
26187 if (_i2.done) break;
26188 _ref3 = _i2.value;
26189 }
26190
26191 var prop = _ref3;
26192
26193 var key = prop.key;
26194 if (t.isIdentifier(key) && !prop.computed) {
26195 key = t.stringLiteral(prop.key.name);
26196 }
26197 keys.push(key);
26198 }
26199
26200 return [restProperty.argument, t.callExpression(file.addHelper("objectWithoutProperties"), [objRef, t.arrayExpression(keys)])];
26201 }
26202
26203 function replaceRestProperty(parentPath, paramPath, i, numParams) {
26204 if (paramPath.isAssignmentPattern()) {
26205 replaceRestProperty(parentPath, paramPath.get("left"), i, numParams);
26206 return;
26207 }
26208
26209 if (paramPath.isObjectPattern() && hasRestProperty(paramPath)) {
26210 var uid = parentPath.scope.generateUidIdentifier("ref");
26211
26212 var declar = t.variableDeclaration("let", [t.variableDeclarator(paramPath.node, uid)]);
26213 declar._blockHoist = i ? numParams - i : 1;
26214
26215 parentPath.ensureBlock();
26216 parentPath.get("body").unshiftContainer("body", declar);
26217 paramPath.replaceWith(uid);
26218 }
26219 }
26220
26221 return {
26222 inherits: __webpack_require__(202),
26223
26224 visitor: {
26225 Function: function Function(path) {
26226 var params = path.get("params");
26227 for (var i = 0; i < params.length; i++) {
26228 replaceRestProperty(params[i].parentPath, params[i], i, params.length);
26229 }
26230 },
26231 VariableDeclarator: function VariableDeclarator(path, file) {
26232 if (!path.get("id").isObjectPattern()) {
26233 return;
26234 }
26235
26236 var insertionPath = path;
26237
26238 path.get("id").traverse({
26239 RestProperty: function RestProperty(path) {
26240 if (this.originalPath.node.id.properties.length > 1 && !t.isIdentifier(this.originalPath.node.init)) {
26241 var initRef = path.scope.generateUidIdentifierBasedOnNode(this.originalPath.node.init, "ref");
26242
26243 this.originalPath.insertBefore(t.variableDeclarator(initRef, this.originalPath.node.init));
26244
26245 this.originalPath.replaceWith(t.variableDeclarator(this.originalPath.node.id, initRef));
26246
26247 return;
26248 }
26249
26250 var ref = this.originalPath.node.init;
26251 var refPropertyPath = [];
26252
26253 path.findParent(function (path) {
26254 if (path.isObjectProperty()) {
26255 refPropertyPath.unshift(path.node.key.name);
26256 } else if (path.isVariableDeclarator()) {
26257 return true;
26258 }
26259 });
26260
26261 if (refPropertyPath.length) {
26262 refPropertyPath.forEach(function (prop) {
26263 ref = t.memberExpression(ref, t.identifier(prop));
26264 });
26265 }
26266
26267 var _createObjectSpread = createObjectSpread(file, path.parentPath.node.properties, ref),
26268 argument = _createObjectSpread[0],
26269 callExpression = _createObjectSpread[1];
26270
26271 insertionPath.insertAfter(t.variableDeclarator(argument, callExpression));
26272
26273 insertionPath = insertionPath.getSibling(insertionPath.key + 1);
26274
26275 if (path.parentPath.node.properties.length === 0) {
26276 path.findParent(function (path) {
26277 return path.isObjectProperty() || path.isVariableDeclarator();
26278 }).remove();
26279 }
26280 }
26281 }, {
26282 originalPath: path
26283 });
26284 },
26285 ExportNamedDeclaration: function ExportNamedDeclaration(path) {
26286 var declaration = path.get("declaration");
26287 if (!declaration.isVariableDeclaration()) return;
26288 if (!hasRestProperty(declaration)) return;
26289
26290 var specifiers = [];
26291
26292 for (var name in path.getOuterBindingIdentifiers(path)) {
26293 var id = t.identifier(name);
26294 specifiers.push(t.exportSpecifier(id, id));
26295 }
26296
26297 path.replaceWith(declaration.node);
26298 path.insertAfter(t.exportNamedDeclaration(null, specifiers));
26299 },
26300 CatchClause: function CatchClause(path) {
26301 var paramPath = path.get("param");
26302 replaceRestProperty(paramPath.parentPath, paramPath);
26303 },
26304 AssignmentExpression: function AssignmentExpression(path, file) {
26305 var leftPath = path.get("left");
26306 if (leftPath.isObjectPattern() && hasRestProperty(leftPath)) {
26307 var nodes = [];
26308
26309 var ref = void 0;
26310 if (path.isCompletionRecord() || path.parentPath.isExpressionStatement()) {
26311 ref = path.scope.generateUidIdentifierBasedOnNode(path.node.right, "ref");
26312
26313 nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, path.node.right)]));
26314 }
26315
26316 var _createObjectSpread2 = createObjectSpread(file, path.node.left.properties, ref),
26317 argument = _createObjectSpread2[0],
26318 callExpression = _createObjectSpread2[1];
26319
26320 var nodeWithoutSpread = t.clone(path.node);
26321 nodeWithoutSpread.right = ref;
26322 nodes.push(t.expressionStatement(nodeWithoutSpread));
26323 nodes.push(t.toStatement(t.assignmentExpression("=", argument, callExpression)));
26324
26325 if (ref) {
26326 nodes.push(t.expressionStatement(ref));
26327 }
26328
26329 path.replaceWithMultiple(nodes);
26330 }
26331 },
26332 ForXStatement: function ForXStatement(path) {
26333 var node = path.node,
26334 scope = path.scope;
26335
26336 var leftPath = path.get("left");
26337 var left = node.left;
26338
26339 if (t.isObjectPattern(left) && hasRestProperty(leftPath)) {
26340 var temp = scope.generateUidIdentifier("ref");
26341
26342 node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]);
26343
26344 path.ensureBlock();
26345
26346 node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)]));
26347
26348 return;
26349 }
26350
26351 if (!t.isVariableDeclaration(left)) return;
26352
26353 var pattern = left.declarations[0].id;
26354 if (!t.isObjectPattern(pattern)) return;
26355
26356 var key = scope.generateUidIdentifier("ref");
26357 node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]);
26358
26359 path.ensureBlock();
26360
26361 node.body.body.unshift(t.variableDeclaration(node.left.kind, [t.variableDeclarator(pattern, key)]));
26362 },
26363 ObjectExpression: function ObjectExpression(path, file) {
26364 if (!hasSpread(path.node)) return;
26365
26366 var useBuiltIns = file.opts.useBuiltIns || false;
26367 if (typeof useBuiltIns !== "boolean") {
26368 throw new Error("transform-object-rest-spread currently only accepts a boolean " + "option for useBuiltIns (defaults to false)");
26369 }
26370
26371 var args = [];
26372 var props = [];
26373
26374 function push() {
26375 if (!props.length) return;
26376 args.push(t.objectExpression(props));
26377 props = [];
26378 }
26379
26380 for (var _iterator3 = path.node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
26381 var _ref4;
26382
26383 if (_isArray3) {
26384 if (_i3 >= _iterator3.length) break;
26385 _ref4 = _iterator3[_i3++];
26386 } else {
26387 _i3 = _iterator3.next();
26388 if (_i3.done) break;
26389 _ref4 = _i3.value;
26390 }
26391
26392 var prop = _ref4;
26393
26394 if (t.isSpreadProperty(prop)) {
26395 push();
26396 args.push(prop.argument);
26397 } else {
26398 props.push(prop);
26399 }
26400 }
26401
26402 push();
26403
26404 if (!t.isObjectExpression(args[0])) {
26405 args.unshift(t.objectExpression([]));
26406 }
26407
26408 var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends");
26409
26410 path.replaceWith(t.callExpression(helper, args));
26411 }
26412 }
26413 };
26414 };
26415
26416 function _interopRequireDefault(obj) {
26417 return obj && obj.__esModule ? obj : { default: obj };
26418 }
26419
26420 module.exports = exports["default"];
26421
26422/***/ }),
26423/* 214 */
26424/***/ (function(module, exports, __webpack_require__) {
26425
26426 "use strict";
26427
26428 exports.__esModule = true;
26429
26430 exports.default = function (_ref) {
26431 var t = _ref.types;
26432
26433 function addDisplayName(id, call) {
26434 var props = call.arguments[0].properties;
26435 var safe = true;
26436
26437 for (var i = 0; i < props.length; i++) {
26438 var prop = props[i];
26439 var key = t.toComputedKey(prop);
26440 if (t.isLiteral(key, { value: "displayName" })) {
26441 safe = false;
26442 break;
26443 }
26444 }
26445
26446 if (safe) {
26447 props.unshift(t.objectProperty(t.identifier("displayName"), t.stringLiteral(id)));
26448 }
26449 }
26450
26451 var isCreateClassCallExpression = t.buildMatchMemberExpression("React.createClass");
26452 var isCreateClassAddon = function isCreateClassAddon(callee) {
26453 return callee.name === "createReactClass";
26454 };
26455
26456 function isCreateClass(node) {
26457 if (!node || !t.isCallExpression(node)) return false;
26458
26459 if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) return false;
26460
26461 var args = node.arguments;
26462 if (args.length !== 1) return false;
26463
26464 var first = args[0];
26465 if (!t.isObjectExpression(first)) return false;
26466
26467 return true;
26468 }
26469
26470 return {
26471 visitor: {
26472 ExportDefaultDeclaration: function ExportDefaultDeclaration(_ref2, state) {
26473 var node = _ref2.node;
26474
26475 if (isCreateClass(node.declaration)) {
26476 var displayName = state.file.opts.basename;
26477
26478 if (displayName === "index") {
26479 displayName = _path2.default.basename(_path2.default.dirname(state.file.opts.filename));
26480 }
26481
26482 addDisplayName(displayName, node.declaration);
26483 }
26484 },
26485 CallExpression: function CallExpression(path) {
26486 var node = path.node;
26487
26488 if (!isCreateClass(node)) return;
26489
26490 var id = void 0;
26491
26492 path.find(function (path) {
26493 if (path.isAssignmentExpression()) {
26494 id = path.node.left;
26495 } else if (path.isObjectProperty()) {
26496 id = path.node.key;
26497 } else if (path.isVariableDeclarator()) {
26498 id = path.node.id;
26499 } else if (path.isStatement()) {
26500 return true;
26501 }
26502
26503 if (id) return true;
26504 });
26505
26506 if (!id) return;
26507
26508 if (t.isMemberExpression(id)) {
26509 id = id.property;
26510 }
26511
26512 if (t.isIdentifier(id)) {
26513 addDisplayName(id.name, node);
26514 }
26515 }
26516 }
26517 };
26518 };
26519
26520 var _path = __webpack_require__(19);
26521
26522 var _path2 = _interopRequireDefault(_path);
26523
26524 function _interopRequireDefault(obj) {
26525 return obj && obj.__esModule ? obj : { default: obj };
26526 }
26527
26528 module.exports = exports["default"];
26529
26530/***/ }),
26531/* 215 */
26532/***/ (function(module, exports, __webpack_require__) {
26533
26534 "use strict";
26535
26536 exports.__esModule = true;
26537
26538 var _getIterator2 = __webpack_require__(2);
26539
26540 var _getIterator3 = _interopRequireDefault(_getIterator2);
26541
26542 exports.default = function (_ref) {
26543 var t = _ref.types;
26544
26545 var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/;
26546
26547 var visitor = (0, _babelHelperBuilderReactJsx2.default)({
26548 pre: function pre(state) {
26549 var tagName = state.tagName;
26550 var args = state.args;
26551 if (t.react.isCompatTag(tagName)) {
26552 args.push(t.stringLiteral(tagName));
26553 } else {
26554 args.push(state.tagExpr);
26555 }
26556 },
26557 post: function post(state, pass) {
26558 state.callee = pass.get("jsxIdentifier")();
26559 }
26560 });
26561
26562 visitor.Program = function (path, state) {
26563 var file = state.file;
26564
26565 var id = state.opts.pragma || "React.createElement";
26566
26567 for (var _iterator = file.ast.comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
26568 var _ref2;
26569
26570 if (_isArray) {
26571 if (_i >= _iterator.length) break;
26572 _ref2 = _iterator[_i++];
26573 } else {
26574 _i = _iterator.next();
26575 if (_i.done) break;
26576 _ref2 = _i.value;
26577 }
26578
26579 var comment = _ref2;
26580
26581 var matches = JSX_ANNOTATION_REGEX.exec(comment.value);
26582 if (matches) {
26583 id = matches[1];
26584 if (id === "React.DOM") {
26585 throw file.buildCodeFrameError(comment, "The @jsx React.DOM pragma has been deprecated as of React 0.12");
26586 } else {
26587 break;
26588 }
26589 }
26590 }
26591
26592 state.set("jsxIdentifier", function () {
26593 return id.split(".").map(function (name) {
26594 return t.identifier(name);
26595 }).reduce(function (object, property) {
26596 return t.memberExpression(object, property);
26597 });
26598 });
26599 };
26600
26601 return {
26602 inherits: _babelPluginSyntaxJsx2.default,
26603 visitor: visitor
26604 };
26605 };
26606
26607 var _babelPluginSyntaxJsx = __webpack_require__(127);
26608
26609 var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx);
26610
26611 var _babelHelperBuilderReactJsx = __webpack_require__(351);
26612
26613 var _babelHelperBuilderReactJsx2 = _interopRequireDefault(_babelHelperBuilderReactJsx);
26614
26615 function _interopRequireDefault(obj) {
26616 return obj && obj.__esModule ? obj : { default: obj };
26617 }
26618
26619 module.exports = exports["default"];
26620
26621/***/ }),
26622/* 216 */
26623/***/ (function(module, exports, __webpack_require__) {
26624
26625 "use strict";
26626
26627 exports.__esModule = true;
26628
26629 var _getIterator2 = __webpack_require__(2);
26630
26631 var _getIterator3 = _interopRequireDefault(_getIterator2);
26632
26633 exports.default = function () {
26634 return {
26635 visitor: {
26636 Program: function Program(path, state) {
26637 if (state.opts.strict === false || state.opts.strictMode === false) return;
26638
26639 var node = path.node;
26640
26641 for (var _iterator = node.directives, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
26642 var _ref;
26643
26644 if (_isArray) {
26645 if (_i >= _iterator.length) break;
26646 _ref = _iterator[_i++];
26647 } else {
26648 _i = _iterator.next();
26649 if (_i.done) break;
26650 _ref = _i.value;
26651 }
26652
26653 var directive = _ref;
26654
26655 if (directive.value.value === "use strict") return;
26656 }
26657
26658 path.unshiftContainer("directives", t.directive(t.directiveLiteral("use strict")));
26659 }
26660 }
26661 };
26662 };
26663
26664 var _babelTypes = __webpack_require__(1);
26665
26666 var t = _interopRequireWildcard(_babelTypes);
26667
26668 function _interopRequireWildcard(obj) {
26669 if (obj && obj.__esModule) {
26670 return obj;
26671 } else {
26672 var newObj = {};if (obj != null) {
26673 for (var key in obj) {
26674 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
26675 }
26676 }newObj.default = obj;return newObj;
26677 }
26678 }
26679
26680 function _interopRequireDefault(obj) {
26681 return obj && obj.__esModule ? obj : { default: obj };
26682 }
26683
26684 module.exports = exports["default"];
26685
26686/***/ }),
26687/* 217 */
26688/***/ (function(module, exports, __webpack_require__) {
26689
26690 "use strict";
26691
26692 exports.__esModule = true;
26693
26694 var _babelPluginTransformEs2015TemplateLiterals = __webpack_require__(83);
26695
26696 var _babelPluginTransformEs2015TemplateLiterals2 = _interopRequireDefault(_babelPluginTransformEs2015TemplateLiterals);
26697
26698 var _babelPluginTransformEs2015Literals = __webpack_require__(76);
26699
26700 var _babelPluginTransformEs2015Literals2 = _interopRequireDefault(_babelPluginTransformEs2015Literals);
26701
26702 var _babelPluginTransformEs2015FunctionName = __webpack_require__(75);
26703
26704 var _babelPluginTransformEs2015FunctionName2 = _interopRequireDefault(_babelPluginTransformEs2015FunctionName);
26705
26706 var _babelPluginTransformEs2015ArrowFunctions = __webpack_require__(68);
26707
26708 var _babelPluginTransformEs2015ArrowFunctions2 = _interopRequireDefault(_babelPluginTransformEs2015ArrowFunctions);
26709
26710 var _babelPluginTransformEs2015BlockScopedFunctions = __webpack_require__(69);
26711
26712 var _babelPluginTransformEs2015BlockScopedFunctions2 = _interopRequireDefault(_babelPluginTransformEs2015BlockScopedFunctions);
26713
26714 var _babelPluginTransformEs2015Classes = __webpack_require__(71);
26715
26716 var _babelPluginTransformEs2015Classes2 = _interopRequireDefault(_babelPluginTransformEs2015Classes);
26717
26718 var _babelPluginTransformEs2015ObjectSuper = __webpack_require__(78);
26719
26720 var _babelPluginTransformEs2015ObjectSuper2 = _interopRequireDefault(_babelPluginTransformEs2015ObjectSuper);
26721
26722 var _babelPluginTransformEs2015ShorthandProperties = __webpack_require__(80);
26723
26724 var _babelPluginTransformEs2015ShorthandProperties2 = _interopRequireDefault(_babelPluginTransformEs2015ShorthandProperties);
26725
26726 var _babelPluginTransformEs2015DuplicateKeys = __webpack_require__(130);
26727
26728 var _babelPluginTransformEs2015DuplicateKeys2 = _interopRequireDefault(_babelPluginTransformEs2015DuplicateKeys);
26729
26730 var _babelPluginTransformEs2015ComputedProperties = __webpack_require__(72);
26731
26732 var _babelPluginTransformEs2015ComputedProperties2 = _interopRequireDefault(_babelPluginTransformEs2015ComputedProperties);
26733
26734 var _babelPluginTransformEs2015ForOf = __webpack_require__(74);
26735
26736 var _babelPluginTransformEs2015ForOf2 = _interopRequireDefault(_babelPluginTransformEs2015ForOf);
26737
26738 var _babelPluginTransformEs2015StickyRegex = __webpack_require__(82);
26739
26740 var _babelPluginTransformEs2015StickyRegex2 = _interopRequireDefault(_babelPluginTransformEs2015StickyRegex);
26741
26742 var _babelPluginTransformEs2015UnicodeRegex = __webpack_require__(85);
26743
26744 var _babelPluginTransformEs2015UnicodeRegex2 = _interopRequireDefault(_babelPluginTransformEs2015UnicodeRegex);
26745
26746 var _babelPluginCheckEs2015Constants = __webpack_require__(66);
26747
26748 var _babelPluginCheckEs2015Constants2 = _interopRequireDefault(_babelPluginCheckEs2015Constants);
26749
26750 var _babelPluginTransformEs2015Spread = __webpack_require__(81);
26751
26752 var _babelPluginTransformEs2015Spread2 = _interopRequireDefault(_babelPluginTransformEs2015Spread);
26753
26754 var _babelPluginTransformEs2015Parameters = __webpack_require__(79);
26755
26756 var _babelPluginTransformEs2015Parameters2 = _interopRequireDefault(_babelPluginTransformEs2015Parameters);
26757
26758 var _babelPluginTransformEs2015Destructuring = __webpack_require__(73);
26759
26760 var _babelPluginTransformEs2015Destructuring2 = _interopRequireDefault(_babelPluginTransformEs2015Destructuring);
26761
26762 var _babelPluginTransformEs2015BlockScoping = __webpack_require__(70);
26763
26764 var _babelPluginTransformEs2015BlockScoping2 = _interopRequireDefault(_babelPluginTransformEs2015BlockScoping);
26765
26766 var _babelPluginTransformEs2015TypeofSymbol = __webpack_require__(84);
26767
26768 var _babelPluginTransformEs2015TypeofSymbol2 = _interopRequireDefault(_babelPluginTransformEs2015TypeofSymbol);
26769
26770 var _babelPluginTransformEs2015ModulesCommonjs = __webpack_require__(77);
26771
26772 var _babelPluginTransformEs2015ModulesCommonjs2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesCommonjs);
26773
26774 var _babelPluginTransformEs2015ModulesSystemjs = __webpack_require__(208);
26775
26776 var _babelPluginTransformEs2015ModulesSystemjs2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesSystemjs);
26777
26778 var _babelPluginTransformEs2015ModulesAmd = __webpack_require__(131);
26779
26780 var _babelPluginTransformEs2015ModulesAmd2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesAmd);
26781
26782 var _babelPluginTransformEs2015ModulesUmd = __webpack_require__(209);
26783
26784 var _babelPluginTransformEs2015ModulesUmd2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesUmd);
26785
26786 var _babelPluginTransformRegenerator = __webpack_require__(86);
26787
26788 var _babelPluginTransformRegenerator2 = _interopRequireDefault(_babelPluginTransformRegenerator);
26789
26790 function _interopRequireDefault(obj) {
26791 return obj && obj.__esModule ? obj : { default: obj };
26792 }
26793
26794 function preset(context) {
26795 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
26796
26797 var moduleTypes = ["commonjs", "amd", "umd", "systemjs"];
26798 var loose = false;
26799 var modules = "commonjs";
26800 var spec = false;
26801
26802 if (opts !== undefined) {
26803 if (opts.loose !== undefined) loose = opts.loose;
26804 if (opts.modules !== undefined) modules = opts.modules;
26805 if (opts.spec !== undefined) spec = opts.spec;
26806 }
26807
26808 if (typeof loose !== "boolean") throw new Error("Preset es2015 'loose' option must be a boolean.");
26809 if (typeof spec !== "boolean") throw new Error("Preset es2015 'spec' option must be a boolean.");
26810 if (modules !== false && moduleTypes.indexOf(modules) === -1) {
26811 throw new Error("Preset es2015 'modules' option must be 'false' to indicate no modules\n" + "or a module type which be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'");
26812 }
26813
26814 var optsLoose = { loose: loose };
26815
26816 return {
26817 plugins: [[_babelPluginTransformEs2015TemplateLiterals2.default, { loose: loose, spec: spec }], _babelPluginTransformEs2015Literals2.default, _babelPluginTransformEs2015FunctionName2.default, [_babelPluginTransformEs2015ArrowFunctions2.default, { spec: spec }], _babelPluginTransformEs2015BlockScopedFunctions2.default, [_babelPluginTransformEs2015Classes2.default, optsLoose], _babelPluginTransformEs2015ObjectSuper2.default, _babelPluginTransformEs2015ShorthandProperties2.default, _babelPluginTransformEs2015DuplicateKeys2.default, [_babelPluginTransformEs2015ComputedProperties2.default, optsLoose], [_babelPluginTransformEs2015ForOf2.default, optsLoose], _babelPluginTransformEs2015StickyRegex2.default, _babelPluginTransformEs2015UnicodeRegex2.default, _babelPluginCheckEs2015Constants2.default, [_babelPluginTransformEs2015Spread2.default, optsLoose], _babelPluginTransformEs2015Parameters2.default, [_babelPluginTransformEs2015Destructuring2.default, optsLoose], _babelPluginTransformEs2015BlockScoping2.default, _babelPluginTransformEs2015TypeofSymbol2.default, modules === "commonjs" && [_babelPluginTransformEs2015ModulesCommonjs2.default, optsLoose], modules === "systemjs" && [_babelPluginTransformEs2015ModulesSystemjs2.default, optsLoose], modules === "amd" && [_babelPluginTransformEs2015ModulesAmd2.default, optsLoose], modules === "umd" && [_babelPluginTransformEs2015ModulesUmd2.default, optsLoose], [_babelPluginTransformRegenerator2.default, { async: false, asyncGenerators: false }]].filter(Boolean) };
26818 }
26819
26820 var oldConfig = preset({});
26821
26822 exports.default = oldConfig;
26823
26824 Object.defineProperty(oldConfig, "buildPreset", {
26825 configurable: true,
26826 writable: true,
26827
26828 enumerable: false,
26829 value: preset
26830 });
26831 module.exports = exports["default"];
26832
26833/***/ }),
26834/* 218 */
26835/***/ (function(module, exports, __webpack_require__) {
26836
26837 "use strict";
26838
26839 exports.__esModule = true;
26840
26841 var _babelPluginTransformExponentiationOperator = __webpack_require__(132);
26842
26843 var _babelPluginTransformExponentiationOperator2 = _interopRequireDefault(_babelPluginTransformExponentiationOperator);
26844
26845 function _interopRequireDefault(obj) {
26846 return obj && obj.__esModule ? obj : { default: obj };
26847 }
26848
26849 exports.default = {
26850 plugins: [_babelPluginTransformExponentiationOperator2.default]
26851 };
26852 module.exports = exports["default"];
26853
26854/***/ }),
26855/* 219 */
26856/***/ (function(module, exports, __webpack_require__) {
26857
26858 "use strict";
26859
26860 exports.__esModule = true;
26861
26862 var _babelPluginSyntaxTrailingFunctionCommas = __webpack_require__(128);
26863
26864 var _babelPluginSyntaxTrailingFunctionCommas2 = _interopRequireDefault(_babelPluginSyntaxTrailingFunctionCommas);
26865
26866 var _babelPluginTransformAsyncToGenerator = __webpack_require__(129);
26867
26868 var _babelPluginTransformAsyncToGenerator2 = _interopRequireDefault(_babelPluginTransformAsyncToGenerator);
26869
26870 function _interopRequireDefault(obj) {
26871 return obj && obj.__esModule ? obj : { default: obj };
26872 }
26873
26874 exports.default = {
26875 plugins: [_babelPluginSyntaxTrailingFunctionCommas2.default, _babelPluginTransformAsyncToGenerator2.default]
26876 };
26877 module.exports = exports["default"];
26878
26879/***/ }),
26880/* 220 */
26881/***/ (function(module, exports, __webpack_require__) {
26882
26883 "use strict";
26884
26885 exports.__esModule = true;
26886
26887 var _babelPresetStage = __webpack_require__(221);
26888
26889 var _babelPresetStage2 = _interopRequireDefault(_babelPresetStage);
26890
26891 var _babelPluginTransformClassConstructorCall = __webpack_require__(203);
26892
26893 var _babelPluginTransformClassConstructorCall2 = _interopRequireDefault(_babelPluginTransformClassConstructorCall);
26894
26895 var _babelPluginTransformExportExtensions = __webpack_require__(210);
26896
26897 var _babelPluginTransformExportExtensions2 = _interopRequireDefault(_babelPluginTransformExportExtensions);
26898
26899 function _interopRequireDefault(obj) {
26900 return obj && obj.__esModule ? obj : { default: obj };
26901 }
26902
26903 exports.default = {
26904 presets: [_babelPresetStage2.default],
26905 plugins: [_babelPluginTransformClassConstructorCall2.default, _babelPluginTransformExportExtensions2.default]
26906 };
26907 module.exports = exports["default"];
26908
26909/***/ }),
26910/* 221 */
26911/***/ (function(module, exports, __webpack_require__) {
26912
26913 "use strict";
26914
26915 exports.__esModule = true;
26916
26917 var _babelPresetStage = __webpack_require__(222);
26918
26919 var _babelPresetStage2 = _interopRequireDefault(_babelPresetStage);
26920
26921 var _babelPluginTransformClassProperties = __webpack_require__(204);
26922
26923 var _babelPluginTransformClassProperties2 = _interopRequireDefault(_babelPluginTransformClassProperties);
26924
26925 var _babelPluginTransformDecorators = __webpack_require__(205);
26926
26927 var _babelPluginTransformDecorators2 = _interopRequireDefault(_babelPluginTransformDecorators);
26928
26929 var _babelPluginSyntaxDynamicImport = __webpack_require__(324);
26930
26931 var _babelPluginSyntaxDynamicImport2 = _interopRequireDefault(_babelPluginSyntaxDynamicImport);
26932
26933 function _interopRequireDefault(obj) {
26934 return obj && obj.__esModule ? obj : { default: obj };
26935 }
26936
26937 exports.default = {
26938 presets: [_babelPresetStage2.default],
26939 plugins: [_babelPluginSyntaxDynamicImport2.default, _babelPluginTransformClassProperties2.default, _babelPluginTransformDecorators2.default]
26940 };
26941 module.exports = exports["default"];
26942
26943/***/ }),
26944/* 222 */
26945/***/ (function(module, exports, __webpack_require__) {
26946
26947 "use strict";
26948
26949 exports.__esModule = true;
26950
26951 var _babelPluginSyntaxTrailingFunctionCommas = __webpack_require__(128);
26952
26953 var _babelPluginSyntaxTrailingFunctionCommas2 = _interopRequireDefault(_babelPluginSyntaxTrailingFunctionCommas);
26954
26955 var _babelPluginTransformAsyncToGenerator = __webpack_require__(129);
26956
26957 var _babelPluginTransformAsyncToGenerator2 = _interopRequireDefault(_babelPluginTransformAsyncToGenerator);
26958
26959 var _babelPluginTransformExponentiationOperator = __webpack_require__(132);
26960
26961 var _babelPluginTransformExponentiationOperator2 = _interopRequireDefault(_babelPluginTransformExponentiationOperator);
26962
26963 var _babelPluginTransformObjectRestSpread = __webpack_require__(213);
26964
26965 var _babelPluginTransformObjectRestSpread2 = _interopRequireDefault(_babelPluginTransformObjectRestSpread);
26966
26967 var _babelPluginTransformAsyncGeneratorFunctions = __webpack_require__(327);
26968
26969 var _babelPluginTransformAsyncGeneratorFunctions2 = _interopRequireDefault(_babelPluginTransformAsyncGeneratorFunctions);
26970
26971 function _interopRequireDefault(obj) {
26972 return obj && obj.__esModule ? obj : { default: obj };
26973 }
26974
26975 exports.default = {
26976 plugins: [_babelPluginSyntaxTrailingFunctionCommas2.default, _babelPluginTransformAsyncToGenerator2.default, _babelPluginTransformExponentiationOperator2.default, _babelPluginTransformAsyncGeneratorFunctions2.default, _babelPluginTransformObjectRestSpread2.default]
26977 };
26978 module.exports = exports["default"];
26979
26980/***/ }),
26981/* 223 */
26982/***/ (function(module, exports, __webpack_require__) {
26983
26984 "use strict";
26985
26986 exports.__esModule = true;
26987
26988 var _classCallCheck2 = __webpack_require__(3);
26989
26990 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
26991
26992 function _interopRequireDefault(obj) {
26993 return obj && obj.__esModule ? obj : { default: obj };
26994 }
26995
26996 var Hub = function Hub(file, options) {
26997 (0, _classCallCheck3.default)(this, Hub);
26998
26999 this.file = file;
27000 this.options = options;
27001 };
27002
27003 exports.default = Hub;
27004 module.exports = exports["default"];
27005
27006/***/ }),
27007/* 224 */
27008/***/ (function(module, exports, __webpack_require__) {
27009
27010 "use strict";
27011
27012 exports.__esModule = true;
27013 exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = undefined;
27014
27015 var _babelTypes = __webpack_require__(1);
27016
27017 var t = _interopRequireWildcard(_babelTypes);
27018
27019 function _interopRequireWildcard(obj) {
27020 if (obj && obj.__esModule) {
27021 return obj;
27022 } else {
27023 var newObj = {};if (obj != null) {
27024 for (var key in obj) {
27025 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
27026 }
27027 }newObj.default = obj;return newObj;
27028 }
27029 }
27030
27031 var ReferencedIdentifier = exports.ReferencedIdentifier = {
27032 types: ["Identifier", "JSXIdentifier"],
27033 checkPath: function checkPath(_ref, opts) {
27034 var node = _ref.node,
27035 parent = _ref.parent;
27036
27037 if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) {
27038 if (t.isJSXIdentifier(node, opts)) {
27039 if (_babelTypes.react.isCompatTag(node.name)) return false;
27040 } else {
27041 return false;
27042 }
27043 }
27044
27045 return t.isReferenced(node, parent);
27046 }
27047 };
27048
27049 var ReferencedMemberExpression = exports.ReferencedMemberExpression = {
27050 types: ["MemberExpression"],
27051 checkPath: function checkPath(_ref2) {
27052 var node = _ref2.node,
27053 parent = _ref2.parent;
27054
27055 return t.isMemberExpression(node) && t.isReferenced(node, parent);
27056 }
27057 };
27058
27059 var BindingIdentifier = exports.BindingIdentifier = {
27060 types: ["Identifier"],
27061 checkPath: function checkPath(_ref3) {
27062 var node = _ref3.node,
27063 parent = _ref3.parent;
27064
27065 return t.isIdentifier(node) && t.isBinding(node, parent);
27066 }
27067 };
27068
27069 var Statement = exports.Statement = {
27070 types: ["Statement"],
27071 checkPath: function checkPath(_ref4) {
27072 var node = _ref4.node,
27073 parent = _ref4.parent;
27074
27075 if (t.isStatement(node)) {
27076 if (t.isVariableDeclaration(node)) {
27077 if (t.isForXStatement(parent, { left: node })) return false;
27078 if (t.isForStatement(parent, { init: node })) return false;
27079 }
27080
27081 return true;
27082 } else {
27083 return false;
27084 }
27085 }
27086 };
27087
27088 var Expression = exports.Expression = {
27089 types: ["Expression"],
27090 checkPath: function checkPath(path) {
27091 if (path.isIdentifier()) {
27092 return path.isReferencedIdentifier();
27093 } else {
27094 return t.isExpression(path.node);
27095 }
27096 }
27097 };
27098
27099 var Scope = exports.Scope = {
27100 types: ["Scopable"],
27101 checkPath: function checkPath(path) {
27102 return t.isScope(path.node, path.parent);
27103 }
27104 };
27105
27106 var Referenced = exports.Referenced = {
27107 checkPath: function checkPath(path) {
27108 return t.isReferenced(path.node, path.parent);
27109 }
27110 };
27111
27112 var BlockScoped = exports.BlockScoped = {
27113 checkPath: function checkPath(path) {
27114 return t.isBlockScoped(path.node);
27115 }
27116 };
27117
27118 var Var = exports.Var = {
27119 types: ["VariableDeclaration"],
27120 checkPath: function checkPath(path) {
27121 return t.isVar(path.node);
27122 }
27123 };
27124
27125 var User = exports.User = {
27126 checkPath: function checkPath(path) {
27127 return path.node && !!path.node.loc;
27128 }
27129 };
27130
27131 var Generated = exports.Generated = {
27132 checkPath: function checkPath(path) {
27133 return !path.isUser();
27134 }
27135 };
27136
27137 var Pure = exports.Pure = {
27138 checkPath: function checkPath(path, opts) {
27139 return path.scope.isPure(path.node, opts);
27140 }
27141 };
27142
27143 var Flow = exports.Flow = {
27144 types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
27145 checkPath: function checkPath(_ref5) {
27146 var node = _ref5.node;
27147
27148 if (t.isFlow(node)) {
27149 return true;
27150 } else if (t.isImportDeclaration(node)) {
27151 return node.importKind === "type" || node.importKind === "typeof";
27152 } else if (t.isExportDeclaration(node)) {
27153 return node.exportKind === "type";
27154 } else if (t.isImportSpecifier(node)) {
27155 return node.importKind === "type" || node.importKind === "typeof";
27156 } else {
27157 return false;
27158 }
27159 }
27160 };
27161
27162/***/ }),
27163/* 225 */
27164/***/ (function(module, exports, __webpack_require__) {
27165
27166 "use strict";
27167
27168 exports.__esModule = true;
27169
27170 var _classCallCheck2 = __webpack_require__(3);
27171
27172 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
27173
27174 function _interopRequireDefault(obj) {
27175 return obj && obj.__esModule ? obj : { default: obj };
27176 }
27177
27178 var Binding = function () {
27179 function Binding(_ref) {
27180 var existing = _ref.existing,
27181 identifier = _ref.identifier,
27182 scope = _ref.scope,
27183 path = _ref.path,
27184 kind = _ref.kind;
27185 (0, _classCallCheck3.default)(this, Binding);
27186
27187 this.identifier = identifier;
27188 this.scope = scope;
27189 this.path = path;
27190 this.kind = kind;
27191
27192 this.constantViolations = [];
27193 this.constant = true;
27194
27195 this.referencePaths = [];
27196 this.referenced = false;
27197 this.references = 0;
27198
27199 this.clearValue();
27200
27201 if (existing) {
27202 this.constantViolations = [].concat(existing.path, existing.constantViolations, this.constantViolations);
27203 }
27204 }
27205
27206 Binding.prototype.deoptValue = function deoptValue() {
27207 this.clearValue();
27208 this.hasDeoptedValue = true;
27209 };
27210
27211 Binding.prototype.setValue = function setValue(value) {
27212 if (this.hasDeoptedValue) return;
27213 this.hasValue = true;
27214 this.value = value;
27215 };
27216
27217 Binding.prototype.clearValue = function clearValue() {
27218 this.hasDeoptedValue = false;
27219 this.hasValue = false;
27220 this.value = null;
27221 };
27222
27223 Binding.prototype.reassign = function reassign(path) {
27224 this.constant = false;
27225 if (this.constantViolations.indexOf(path) !== -1) {
27226 return;
27227 }
27228 this.constantViolations.push(path);
27229 };
27230
27231 Binding.prototype.reference = function reference(path) {
27232 if (this.referencePaths.indexOf(path) !== -1) {
27233 return;
27234 }
27235 this.referenced = true;
27236 this.references++;
27237 this.referencePaths.push(path);
27238 };
27239
27240 Binding.prototype.dereference = function dereference() {
27241 this.references--;
27242 this.referenced = !!this.references;
27243 };
27244
27245 return Binding;
27246 }();
27247
27248 exports.default = Binding;
27249 module.exports = exports["default"];
27250
27251/***/ }),
27252/* 226 */
27253/***/ (function(module, exports, __webpack_require__) {
27254
27255 "use strict";
27256
27257 exports.__esModule = true;
27258
27259 var _create = __webpack_require__(9);
27260
27261 var _create2 = _interopRequireDefault(_create);
27262
27263 exports.getBindingIdentifiers = getBindingIdentifiers;
27264 exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
27265
27266 var _index = __webpack_require__(1);
27267
27268 var t = _interopRequireWildcard(_index);
27269
27270 function _interopRequireWildcard(obj) {
27271 if (obj && obj.__esModule) {
27272 return obj;
27273 } else {
27274 var newObj = {};if (obj != null) {
27275 for (var key in obj) {
27276 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
27277 }
27278 }newObj.default = obj;return newObj;
27279 }
27280 }
27281
27282 function _interopRequireDefault(obj) {
27283 return obj && obj.__esModule ? obj : { default: obj };
27284 }
27285
27286 function getBindingIdentifiers(node, duplicates, outerOnly) {
27287 var search = [].concat(node);
27288 var ids = (0, _create2.default)(null);
27289
27290 while (search.length) {
27291 var id = search.shift();
27292 if (!id) continue;
27293
27294 var keys = t.getBindingIdentifiers.keys[id.type];
27295
27296 if (t.isIdentifier(id)) {
27297 if (duplicates) {
27298 var _ids = ids[id.name] = ids[id.name] || [];
27299 _ids.push(id);
27300 } else {
27301 ids[id.name] = id;
27302 }
27303 continue;
27304 }
27305
27306 if (t.isExportDeclaration(id)) {
27307 if (t.isDeclaration(id.declaration)) {
27308 search.push(id.declaration);
27309 }
27310 continue;
27311 }
27312
27313 if (outerOnly) {
27314 if (t.isFunctionDeclaration(id)) {
27315 search.push(id.id);
27316 continue;
27317 }
27318
27319 if (t.isFunctionExpression(id)) {
27320 continue;
27321 }
27322 }
27323
27324 if (keys) {
27325 for (var i = 0; i < keys.length; i++) {
27326 var key = keys[i];
27327 if (id[key]) {
27328 search = search.concat(id[key]);
27329 }
27330 }
27331 }
27332 }
27333
27334 return ids;
27335 }
27336
27337 getBindingIdentifiers.keys = {
27338 DeclareClass: ["id"],
27339 DeclareFunction: ["id"],
27340 DeclareModule: ["id"],
27341 DeclareVariable: ["id"],
27342 InterfaceDeclaration: ["id"],
27343 TypeAlias: ["id"],
27344 OpaqueType: ["id"],
27345
27346 CatchClause: ["param"],
27347 LabeledStatement: ["label"],
27348 UnaryExpression: ["argument"],
27349 AssignmentExpression: ["left"],
27350
27351 ImportSpecifier: ["local"],
27352 ImportNamespaceSpecifier: ["local"],
27353 ImportDefaultSpecifier: ["local"],
27354 ImportDeclaration: ["specifiers"],
27355
27356 ExportSpecifier: ["exported"],
27357 ExportNamespaceSpecifier: ["exported"],
27358 ExportDefaultSpecifier: ["exported"],
27359
27360 FunctionDeclaration: ["id", "params"],
27361 FunctionExpression: ["id", "params"],
27362
27363 ClassDeclaration: ["id"],
27364 ClassExpression: ["id"],
27365
27366 RestElement: ["argument"],
27367 UpdateExpression: ["argument"],
27368
27369 RestProperty: ["argument"],
27370 ObjectProperty: ["value"],
27371
27372 AssignmentPattern: ["left"],
27373 ArrayPattern: ["elements"],
27374 ObjectPattern: ["properties"],
27375
27376 VariableDeclaration: ["declarations"],
27377 VariableDeclarator: ["id"]
27378 };
27379
27380 function getOuterBindingIdentifiers(node, duplicates) {
27381 return getBindingIdentifiers(node, duplicates, true);
27382 }
27383
27384/***/ }),
27385/* 227 */
27386/***/ (function(module, exports) {
27387
27388 'use strict';
27389
27390 module.exports = function (it) {
27391 if (typeof it != 'function') throw TypeError(it + ' is not a function!');
27392 return it;
27393 };
27394
27395/***/ }),
27396/* 228 */
27397/***/ (function(module, exports, __webpack_require__) {
27398
27399 'use strict';
27400
27401 // getting tag from 19.1.3.6 Object.prototype.toString()
27402 var cof = __webpack_require__(138);
27403 var TAG = __webpack_require__(13)('toStringTag');
27404 // ES3 wrong here
27405 var ARG = cof(function () {
27406 return arguments;
27407 }()) == 'Arguments';
27408
27409 // fallback for IE11 Script Access Denied error
27410 var tryGet = function tryGet(it, key) {
27411 try {
27412 return it[key];
27413 } catch (e) {/* empty */}
27414 };
27415
27416 module.exports = function (it) {
27417 var O, T, B;
27418 return it === undefined ? 'Undefined' : it === null ? 'Null'
27419 // @@toStringTag case
27420 : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
27421 // builtinTag case
27422 : ARG ? cof(O)
27423 // ES3 arguments fallback
27424 : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
27425 };
27426
27427/***/ }),
27428/* 229 */
27429/***/ (function(module, exports, __webpack_require__) {
27430
27431 'use strict';
27432
27433 var redefineAll = __webpack_require__(146);
27434 var getWeak = __webpack_require__(57).getWeak;
27435 var anObject = __webpack_require__(21);
27436 var isObject = __webpack_require__(16);
27437 var anInstance = __webpack_require__(136);
27438 var forOf = __webpack_require__(55);
27439 var createArrayMethod = __webpack_require__(137);
27440 var $has = __webpack_require__(28);
27441 var validate = __webpack_require__(58);
27442 var arrayFind = createArrayMethod(5);
27443 var arrayFindIndex = createArrayMethod(6);
27444 var id = 0;
27445
27446 // fallback for uncaught frozen keys
27447 var uncaughtFrozenStore = function uncaughtFrozenStore(that) {
27448 return that._l || (that._l = new UncaughtFrozenStore());
27449 };
27450 var UncaughtFrozenStore = function UncaughtFrozenStore() {
27451 this.a = [];
27452 };
27453 var findUncaughtFrozen = function findUncaughtFrozen(store, key) {
27454 return arrayFind(store.a, function (it) {
27455 return it[0] === key;
27456 });
27457 };
27458 UncaughtFrozenStore.prototype = {
27459 get: function get(key) {
27460 var entry = findUncaughtFrozen(this, key);
27461 if (entry) return entry[1];
27462 },
27463 has: function has(key) {
27464 return !!findUncaughtFrozen(this, key);
27465 },
27466 set: function set(key, value) {
27467 var entry = findUncaughtFrozen(this, key);
27468 if (entry) entry[1] = value;else this.a.push([key, value]);
27469 },
27470 'delete': function _delete(key) {
27471 var index = arrayFindIndex(this.a, function (it) {
27472 return it[0] === key;
27473 });
27474 if (~index) this.a.splice(index, 1);
27475 return !!~index;
27476 }
27477 };
27478
27479 module.exports = {
27480 getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) {
27481 var C = wrapper(function (that, iterable) {
27482 anInstance(that, C, NAME, '_i');
27483 that._t = NAME; // collection type
27484 that._i = id++; // collection id
27485 that._l = undefined; // leak store for uncaught frozen objects
27486 if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
27487 });
27488 redefineAll(C.prototype, {
27489 // 23.3.3.2 WeakMap.prototype.delete(key)
27490 // 23.4.3.3 WeakSet.prototype.delete(value)
27491 'delete': function _delete(key) {
27492 if (!isObject(key)) return false;
27493 var data = getWeak(key);
27494 if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
27495 return data && $has(data, this._i) && delete data[this._i];
27496 },
27497 // 23.3.3.4 WeakMap.prototype.has(key)
27498 // 23.4.3.4 WeakSet.prototype.has(value)
27499 has: function has(key) {
27500 if (!isObject(key)) return false;
27501 var data = getWeak(key);
27502 if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
27503 return data && $has(data, this._i);
27504 }
27505 });
27506 return C;
27507 },
27508 def: function def(that, key, value) {
27509 var data = getWeak(anObject(key), true);
27510 if (data === true) uncaughtFrozenStore(that).set(key, value);else data[that._i] = value;
27511 return that;
27512 },
27513 ufstore: uncaughtFrozenStore
27514 };
27515
27516/***/ }),
27517/* 230 */
27518/***/ (function(module, exports, __webpack_require__) {
27519
27520 'use strict';
27521
27522 var isObject = __webpack_require__(16);
27523 var document = __webpack_require__(15).document;
27524 // typeof document.createElement is 'object' in old IE
27525 var is = isObject(document) && isObject(document.createElement);
27526 module.exports = function (it) {
27527 return is ? document.createElement(it) : {};
27528 };
27529
27530/***/ }),
27531/* 231 */
27532/***/ (function(module, exports, __webpack_require__) {
27533
27534 'use strict';
27535
27536 module.exports = !__webpack_require__(22) && !__webpack_require__(27)(function () {
27537 return Object.defineProperty(__webpack_require__(230)('div'), 'a', { get: function get() {
27538 return 7;
27539 } }).a != 7;
27540 });
27541
27542/***/ }),
27543/* 232 */
27544/***/ (function(module, exports, __webpack_require__) {
27545
27546 'use strict';
27547
27548 // 7.2.2 IsArray(argument)
27549 var cof = __webpack_require__(138);
27550 module.exports = Array.isArray || function isArray(arg) {
27551 return cof(arg) == 'Array';
27552 };
27553
27554/***/ }),
27555/* 233 */
27556/***/ (function(module, exports) {
27557
27558 "use strict";
27559
27560 module.exports = function (done, value) {
27561 return { value: value, done: !!done };
27562 };
27563
27564/***/ }),
27565/* 234 */
27566/***/ (function(module, exports, __webpack_require__) {
27567
27568 'use strict';
27569 // 19.1.2.1 Object.assign(target, source, ...)
27570
27571 var getKeys = __webpack_require__(44);
27572 var gOPS = __webpack_require__(145);
27573 var pIE = __webpack_require__(91);
27574 var toObject = __webpack_require__(94);
27575 var IObject = __webpack_require__(142);
27576 var $assign = Object.assign;
27577
27578 // should work with symbols and should have deterministic property order (V8 bug)
27579 module.exports = !$assign || __webpack_require__(27)(function () {
27580 var A = {};
27581 var B = {};
27582 // eslint-disable-next-line no-undef
27583 var S = Symbol();
27584 var K = 'abcdefghijklmnopqrst';
27585 A[S] = 7;
27586 K.split('').forEach(function (k) {
27587 B[k] = k;
27588 });
27589 return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
27590 }) ? function assign(target, source) {
27591 // eslint-disable-line no-unused-vars
27592 var T = toObject(target);
27593 var aLen = arguments.length;
27594 var index = 1;
27595 var getSymbols = gOPS.f;
27596 var isEnum = pIE.f;
27597 while (aLen > index) {
27598 var S = IObject(arguments[index++]);
27599 var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
27600 var length = keys.length;
27601 var j = 0;
27602 var key;
27603 while (length > j) {
27604 if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
27605 }
27606 }return T;
27607 } : $assign;
27608
27609/***/ }),
27610/* 235 */
27611/***/ (function(module, exports, __webpack_require__) {
27612
27613 'use strict';
27614
27615 var pIE = __webpack_require__(91);
27616 var createDesc = __webpack_require__(92);
27617 var toIObject = __webpack_require__(37);
27618 var toPrimitive = __webpack_require__(154);
27619 var has = __webpack_require__(28);
27620 var IE8_DOM_DEFINE = __webpack_require__(231);
27621 var gOPD = Object.getOwnPropertyDescriptor;
27622
27623 exports.f = __webpack_require__(22) ? gOPD : function getOwnPropertyDescriptor(O, P) {
27624 O = toIObject(O);
27625 P = toPrimitive(P, true);
27626 if (IE8_DOM_DEFINE) try {
27627 return gOPD(O, P);
27628 } catch (e) {/* empty */}
27629 if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
27630 };
27631
27632/***/ }),
27633/* 236 */
27634/***/ (function(module, exports, __webpack_require__) {
27635
27636 'use strict';
27637
27638 // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
27639 var $keys = __webpack_require__(237);
27640 var hiddenKeys = __webpack_require__(141).concat('length', 'prototype');
27641
27642 exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
27643 return $keys(O, hiddenKeys);
27644 };
27645
27646/***/ }),
27647/* 237 */
27648/***/ (function(module, exports, __webpack_require__) {
27649
27650 'use strict';
27651
27652 var has = __webpack_require__(28);
27653 var toIObject = __webpack_require__(37);
27654 var arrayIndexOf = __webpack_require__(420)(false);
27655 var IE_PROTO = __webpack_require__(150)('IE_PROTO');
27656
27657 module.exports = function (object, names) {
27658 var O = toIObject(object);
27659 var i = 0;
27660 var result = [];
27661 var key;
27662 for (key in O) {
27663 if (key != IE_PROTO) has(O, key) && result.push(key);
27664 } // Don't enum bug & hidden keys
27665 while (names.length > i) {
27666 if (has(O, key = names[i++])) {
27667 ~arrayIndexOf(result, key) || result.push(key);
27668 }
27669 }return result;
27670 };
27671
27672/***/ }),
27673/* 238 */
27674/***/ (function(module, exports, __webpack_require__) {
27675
27676 'use strict';
27677
27678 var classof = __webpack_require__(228);
27679 var ITERATOR = __webpack_require__(13)('iterator');
27680 var Iterators = __webpack_require__(56);
27681 module.exports = __webpack_require__(5).getIteratorMethod = function (it) {
27682 if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];
27683 };
27684
27685/***/ }),
27686/* 239 */
27687/***/ (function(module, exports, __webpack_require__) {
27688
27689 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
27690
27691 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
27692
27693 /**
27694 * This is the web browser implementation of `debug()`.
27695 *
27696 * Expose `debug()` as the module.
27697 */
27698
27699 exports = module.exports = __webpack_require__(458);
27700 exports.log = log;
27701 exports.formatArgs = formatArgs;
27702 exports.save = save;
27703 exports.load = load;
27704 exports.useColors = useColors;
27705 exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage();
27706
27707 /**
27708 * Colors.
27709 */
27710
27711 exports.colors = ['lightseagreen', 'forestgreen', 'goldenrod', 'dodgerblue', 'darkorchid', 'crimson'];
27712
27713 /**
27714 * Currently only WebKit-based Web Inspectors, Firefox >= v31,
27715 * and the Firebug extension (any Firefox version) are known
27716 * to support "%c" CSS customizations.
27717 *
27718 * TODO: add a `localStorage` variable to explicitly enable/disable colors
27719 */
27720
27721 function useColors() {
27722 // NB: In an Electron preload script, document will be defined but not fully
27723 // initialized. Since we know we're in Chrome, we'll just detect this case
27724 // explicitly
27725 if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
27726 return true;
27727 }
27728
27729 // is webkit? http://stackoverflow.com/a/16459606/376773
27730 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
27731 return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
27732 // is firebug? http://stackoverflow.com/a/398120/376773
27733 typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||
27734 // is firefox >= v31?
27735 // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
27736 typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||
27737 // double check webkit in userAgent just in case we are in a worker
27738 typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
27739 }
27740
27741 /**
27742 * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
27743 */
27744
27745 exports.formatters.j = function (v) {
27746 try {
27747 return JSON.stringify(v);
27748 } catch (err) {
27749 return '[UnexpectedJSONParseError]: ' + err.message;
27750 }
27751 };
27752
27753 /**
27754 * Colorize log arguments if enabled.
27755 *
27756 * @api public
27757 */
27758
27759 function formatArgs(args) {
27760 var useColors = this.useColors;
27761
27762 args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff);
27763
27764 if (!useColors) return;
27765
27766 var c = 'color: ' + this.color;
27767 args.splice(1, 0, c, 'color: inherit');
27768
27769 // the final "%c" is somewhat tricky, because there could be other
27770 // arguments passed either before or after the %c, so we need to
27771 // figure out the correct index to insert the CSS into
27772 var index = 0;
27773 var lastC = 0;
27774 args[0].replace(/%[a-zA-Z%]/g, function (match) {
27775 if ('%%' === match) return;
27776 index++;
27777 if ('%c' === match) {
27778 // we only are interested in the *last* %c
27779 // (the user may have provided their own)
27780 lastC = index;
27781 }
27782 });
27783
27784 args.splice(lastC, 0, c);
27785 }
27786
27787 /**
27788 * Invokes `console.log()` when available.
27789 * No-op when `console.log` is not a "function".
27790 *
27791 * @api public
27792 */
27793
27794 function log() {
27795 // this hackery is required for IE8/9, where
27796 // the `console.log` function doesn't have 'apply'
27797 return 'object' === (typeof console === 'undefined' ? 'undefined' : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);
27798 }
27799
27800 /**
27801 * Save `namespaces`.
27802 *
27803 * @param {String} namespaces
27804 * @api private
27805 */
27806
27807 function save(namespaces) {
27808 try {
27809 if (null == namespaces) {
27810 exports.storage.removeItem('debug');
27811 } else {
27812 exports.storage.debug = namespaces;
27813 }
27814 } catch (e) {}
27815 }
27816
27817 /**
27818 * Load `namespaces`.
27819 *
27820 * @return {String} returns the previously persisted debug modes
27821 * @api private
27822 */
27823
27824 function load() {
27825 var r;
27826 try {
27827 r = exports.storage.debug;
27828 } catch (e) {}
27829
27830 // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
27831 if (!r && typeof process !== 'undefined' && 'env' in process) {
27832 r = process.env.DEBUG;
27833 }
27834
27835 return r;
27836 }
27837
27838 /**
27839 * Enable namespaces listed in `localStorage.debug` initially.
27840 */
27841
27842 exports.enable(load());
27843
27844 /**
27845 * Localstorage attempts to return the localstorage.
27846 *
27847 * This is necessary because safari throws
27848 * when a user disables cookies/localstorage
27849 * and you attempt to access it.
27850 *
27851 * @return {LocalStorage}
27852 * @api private
27853 */
27854
27855 function localstorage() {
27856 try {
27857 return window.localStorage;
27858 } catch (e) {}
27859 }
27860 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
27861
27862/***/ }),
27863/* 240 */
27864/***/ (function(module, exports) {
27865
27866 'use strict';
27867
27868 /*
27869 Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
27870 Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
27871
27872 Redistribution and use in source and binary forms, with or without
27873 modification, are permitted provided that the following conditions are met:
27874
27875 * Redistributions of source code must retain the above copyright
27876 notice, this list of conditions and the following disclaimer.
27877 * Redistributions in binary form must reproduce the above copyright
27878 notice, this list of conditions and the following disclaimer in the
27879 documentation and/or other materials provided with the distribution.
27880
27881 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27882 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27883 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27884 ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
27885 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27886 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27887 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27888 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27889 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27890 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27891 */
27892
27893 (function () {
27894 'use strict';
27895
27896 var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
27897
27898 // See `tools/generate-identifier-regex.js`.
27899 ES5Regex = {
27900 // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart:
27901 NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
27902 // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart:
27903 NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
27904 };
27905
27906 ES6Regex = {
27907 // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:
27908 NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,
27909 // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:
27910 NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
27911 };
27912
27913 function isDecimalDigit(ch) {
27914 return 0x30 <= ch && ch <= 0x39; // 0..9
27915 }
27916
27917 function isHexDigit(ch) {
27918 return 0x30 <= ch && ch <= 0x39 || // 0..9
27919 0x61 <= ch && ch <= 0x66 || // a..f
27920 0x41 <= ch && ch <= 0x46; // A..F
27921 }
27922
27923 function isOctalDigit(ch) {
27924 return ch >= 0x30 && ch <= 0x37; // 0..7
27925 }
27926
27927 // 7.2 White Space
27928
27929 NON_ASCII_WHITESPACES = [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF];
27930
27931 function isWhiteSpace(ch) {
27932 return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
27933 }
27934
27935 // 7.3 Line Terminators
27936
27937 function isLineTerminator(ch) {
27938 return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
27939 }
27940
27941 // 7.6 Identifier Names and Identifiers
27942
27943 function fromCodePoint(cp) {
27944 if (cp <= 0xFFFF) {
27945 return String.fromCharCode(cp);
27946 }
27947 var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
27948 var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00);
27949 return cu1 + cu2;
27950 }
27951
27952 IDENTIFIER_START = new Array(0x80);
27953 for (ch = 0; ch < 0x80; ++ch) {
27954 IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
27955 ch >= 0x41 && ch <= 0x5A || // A..Z
27956 ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
27957 }
27958
27959 IDENTIFIER_PART = new Array(0x80);
27960 for (ch = 0; ch < 0x80; ++ch) {
27961 IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
27962 ch >= 0x41 && ch <= 0x5A || // A..Z
27963 ch >= 0x30 && ch <= 0x39 || // 0..9
27964 ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
27965 }
27966
27967 function isIdentifierStartES5(ch) {
27968 return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
27969 }
27970
27971 function isIdentifierPartES5(ch) {
27972 return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
27973 }
27974
27975 function isIdentifierStartES6(ch) {
27976 return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
27977 }
27978
27979 function isIdentifierPartES6(ch) {
27980 return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
27981 }
27982
27983 module.exports = {
27984 isDecimalDigit: isDecimalDigit,
27985 isHexDigit: isHexDigit,
27986 isOctalDigit: isOctalDigit,
27987 isWhiteSpace: isWhiteSpace,
27988 isLineTerminator: isLineTerminator,
27989 isIdentifierStartES5: isIdentifierStartES5,
27990 isIdentifierPartES5: isIdentifierPartES5,
27991 isIdentifierStartES6: isIdentifierStartES6,
27992 isIdentifierPartES6: isIdentifierPartES6
27993 };
27994 })();
27995 /* vim: set sw=4 ts=4 et tw=80 : */
27996
27997/***/ }),
27998/* 241 */
27999/***/ (function(module, exports, __webpack_require__) {
28000
28001 'use strict';
28002
28003 var getNative = __webpack_require__(38),
28004 root = __webpack_require__(17);
28005
28006 /* Built-in method references that are verified to be native. */
28007 var Set = getNative(root, 'Set');
28008
28009 module.exports = Set;
28010
28011/***/ }),
28012/* 242 */
28013/***/ (function(module, exports, __webpack_require__) {
28014
28015 'use strict';
28016
28017 var MapCache = __webpack_require__(160),
28018 setCacheAdd = __webpack_require__(561),
28019 setCacheHas = __webpack_require__(562);
28020
28021 /**
28022 *
28023 * Creates an array cache object to store unique values.
28024 *
28025 * @private
28026 * @constructor
28027 * @param {Array} [values] The values to cache.
28028 */
28029 function SetCache(values) {
28030 var index = -1,
28031 length = values == null ? 0 : values.length;
28032
28033 this.__data__ = new MapCache();
28034 while (++index < length) {
28035 this.add(values[index]);
28036 }
28037 }
28038
28039 // Add methods to `SetCache`.
28040 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
28041 SetCache.prototype.has = setCacheHas;
28042
28043 module.exports = SetCache;
28044
28045/***/ }),
28046/* 243 */
28047/***/ (function(module, exports, __webpack_require__) {
28048
28049 'use strict';
28050
28051 var root = __webpack_require__(17);
28052
28053 /** Built-in value references. */
28054 var Uint8Array = root.Uint8Array;
28055
28056 module.exports = Uint8Array;
28057
28058/***/ }),
28059/* 244 */
28060/***/ (function(module, exports) {
28061
28062 "use strict";
28063
28064 /**
28065 * A faster alternative to `Function#apply`, this function invokes `func`
28066 * with the `this` binding of `thisArg` and the arguments of `args`.
28067 *
28068 * @private
28069 * @param {Function} func The function to invoke.
28070 * @param {*} thisArg The `this` binding of `func`.
28071 * @param {Array} args The arguments to invoke `func` with.
28072 * @returns {*} Returns the result of `func`.
28073 */
28074 function apply(func, thisArg, args) {
28075 switch (args.length) {
28076 case 0:
28077 return func.call(thisArg);
28078 case 1:
28079 return func.call(thisArg, args[0]);
28080 case 2:
28081 return func.call(thisArg, args[0], args[1]);
28082 case 3:
28083 return func.call(thisArg, args[0], args[1], args[2]);
28084 }
28085 return func.apply(thisArg, args);
28086 }
28087
28088 module.exports = apply;
28089
28090/***/ }),
28091/* 245 */
28092/***/ (function(module, exports, __webpack_require__) {
28093
28094 'use strict';
28095
28096 var baseTimes = __webpack_require__(513),
28097 isArguments = __webpack_require__(112),
28098 isArray = __webpack_require__(6),
28099 isBuffer = __webpack_require__(113),
28100 isIndex = __webpack_require__(171),
28101 isTypedArray = __webpack_require__(177);
28102
28103 /** Used for built-in method references. */
28104 var objectProto = Object.prototype;
28105
28106 /** Used to check objects for own properties. */
28107 var hasOwnProperty = objectProto.hasOwnProperty;
28108
28109 /**
28110 * Creates an array of the enumerable property names of the array-like `value`.
28111 *
28112 * @private
28113 * @param {*} value The value to query.
28114 * @param {boolean} inherited Specify returning inherited property names.
28115 * @returns {Array} Returns the array of property names.
28116 */
28117 function arrayLikeKeys(value, inherited) {
28118 var isArr = isArray(value),
28119 isArg = !isArr && isArguments(value),
28120 isBuff = !isArr && !isArg && isBuffer(value),
28121 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
28122 skipIndexes = isArr || isArg || isBuff || isType,
28123 result = skipIndexes ? baseTimes(value.length, String) : [],
28124 length = result.length;
28125
28126 for (var key in value) {
28127 if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (
28128 // Safari 9 has enumerable `arguments.length` in strict mode.
28129 key == 'length' ||
28130 // Node.js 0.10 has enumerable non-index properties on buffers.
28131 isBuff && (key == 'offset' || key == 'parent') ||
28132 // PhantomJS 2 has enumerable non-index properties on typed arrays.
28133 isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
28134 // Skip index properties.
28135 isIndex(key, length)))) {
28136 result.push(key);
28137 }
28138 }
28139 return result;
28140 }
28141
28142 module.exports = arrayLikeKeys;
28143
28144/***/ }),
28145/* 246 */
28146/***/ (function(module, exports) {
28147
28148 "use strict";
28149
28150 /**
28151 * A specialized version of `_.reduce` for arrays without support for
28152 * iteratee shorthands.
28153 *
28154 * @private
28155 * @param {Array} [array] The array to iterate over.
28156 * @param {Function} iteratee The function invoked per iteration.
28157 * @param {*} [accumulator] The initial value.
28158 * @param {boolean} [initAccum] Specify using the first element of `array` as
28159 * the initial value.
28160 * @returns {*} Returns the accumulated value.
28161 */
28162 function arrayReduce(array, iteratee, accumulator, initAccum) {
28163 var index = -1,
28164 length = array == null ? 0 : array.length;
28165
28166 if (initAccum && length) {
28167 accumulator = array[++index];
28168 }
28169 while (++index < length) {
28170 accumulator = iteratee(accumulator, array[index], index, array);
28171 }
28172 return accumulator;
28173 }
28174
28175 module.exports = arrayReduce;
28176
28177/***/ }),
28178/* 247 */
28179/***/ (function(module, exports, __webpack_require__) {
28180
28181 'use strict';
28182
28183 var baseAssignValue = __webpack_require__(163),
28184 eq = __webpack_require__(46);
28185
28186 /**
28187 * This function is like `assignValue` except that it doesn't assign
28188 * `undefined` values.
28189 *
28190 * @private
28191 * @param {Object} object The object to modify.
28192 * @param {string} key The key of the property to assign.
28193 * @param {*} value The value to assign.
28194 */
28195 function assignMergeValue(object, key, value) {
28196 if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {
28197 baseAssignValue(object, key, value);
28198 }
28199 }
28200
28201 module.exports = assignMergeValue;
28202
28203/***/ }),
28204/* 248 */
28205/***/ (function(module, exports, __webpack_require__) {
28206
28207 'use strict';
28208
28209 var createBaseFor = __webpack_require__(527);
28210
28211 /**
28212 * The base implementation of `baseForOwn` which iterates over `object`
28213 * properties returned by `keysFunc` and invokes `iteratee` for each property.
28214 * Iteratee functions may exit iteration early by explicitly returning `false`.
28215 *
28216 * @private
28217 * @param {Object} object The object to iterate over.
28218 * @param {Function} iteratee The function invoked per iteration.
28219 * @param {Function} keysFunc The function to get the keys of `object`.
28220 * @returns {Object} Returns `object`.
28221 */
28222 var baseFor = createBaseFor();
28223
28224 module.exports = baseFor;
28225
28226/***/ }),
28227/* 249 */
28228/***/ (function(module, exports, __webpack_require__) {
28229
28230 'use strict';
28231
28232 var castPath = __webpack_require__(255),
28233 toKey = __webpack_require__(108);
28234
28235 /**
28236 * The base implementation of `_.get` without support for default values.
28237 *
28238 * @private
28239 * @param {Object} object The object to query.
28240 * @param {Array|string} path The path of the property to get.
28241 * @returns {*} Returns the resolved value.
28242 */
28243 function baseGet(object, path) {
28244 path = castPath(path, object);
28245
28246 var index = 0,
28247 length = path.length;
28248
28249 while (object != null && index < length) {
28250 object = object[toKey(path[index++])];
28251 }
28252 return index && index == length ? object : undefined;
28253 }
28254
28255 module.exports = baseGet;
28256
28257/***/ }),
28258/* 250 */
28259/***/ (function(module, exports, __webpack_require__) {
28260
28261 'use strict';
28262
28263 var arrayPush = __webpack_require__(161),
28264 isArray = __webpack_require__(6);
28265
28266 /**
28267 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
28268 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
28269 * symbols of `object`.
28270 *
28271 * @private
28272 * @param {Object} object The object to query.
28273 * @param {Function} keysFunc The function to get the keys of `object`.
28274 * @param {Function} symbolsFunc The function to get the symbols of `object`.
28275 * @returns {Array} Returns the array of property names and symbols.
28276 */
28277 function baseGetAllKeys(object, keysFunc, symbolsFunc) {
28278 var result = keysFunc(object);
28279 return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
28280 }
28281
28282 module.exports = baseGetAllKeys;
28283
28284/***/ }),
28285/* 251 */
28286/***/ (function(module, exports, __webpack_require__) {
28287
28288 'use strict';
28289
28290 var baseIsEqualDeep = __webpack_require__(494),
28291 isObjectLike = __webpack_require__(25);
28292
28293 /**
28294 * The base implementation of `_.isEqual` which supports partial comparisons
28295 * and tracks traversed objects.
28296 *
28297 * @private
28298 * @param {*} value The value to compare.
28299 * @param {*} other The other value to compare.
28300 * @param {boolean} bitmask The bitmask flags.
28301 * 1 - Unordered comparison
28302 * 2 - Partial comparison
28303 * @param {Function} [customizer] The function to customize comparisons.
28304 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
28305 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
28306 */
28307 function baseIsEqual(value, other, bitmask, customizer, stack) {
28308 if (value === other) {
28309 return true;
28310 }
28311 if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
28312 return value !== value && other !== other;
28313 }
28314 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
28315 }
28316
28317 module.exports = baseIsEqual;
28318
28319/***/ }),
28320/* 252 */
28321/***/ (function(module, exports, __webpack_require__) {
28322
28323 'use strict';
28324
28325 var baseEach = __webpack_require__(487),
28326 isArrayLike = __webpack_require__(24);
28327
28328 /**
28329 * The base implementation of `_.map` without support for iteratee shorthands.
28330 *
28331 * @private
28332 * @param {Array|Object} collection The collection to iterate over.
28333 * @param {Function} iteratee The function invoked per iteration.
28334 * @returns {Array} Returns the new mapped array.
28335 */
28336 function baseMap(collection, iteratee) {
28337 var index = -1,
28338 result = isArrayLike(collection) ? Array(collection.length) : [];
28339
28340 baseEach(collection, function (value, key, collection) {
28341 result[++index] = iteratee(value, key, collection);
28342 });
28343 return result;
28344 }
28345
28346 module.exports = baseMap;
28347
28348/***/ }),
28349/* 253 */
28350/***/ (function(module, exports, __webpack_require__) {
28351
28352 'use strict';
28353
28354 var _Symbol = __webpack_require__(45),
28355 arrayMap = __webpack_require__(60),
28356 isArray = __webpack_require__(6),
28357 isSymbol = __webpack_require__(62);
28358
28359 /** Used as references for various `Number` constants. */
28360 var INFINITY = 1 / 0;
28361
28362 /** Used to convert symbols to primitives and strings. */
28363 var symbolProto = _Symbol ? _Symbol.prototype : undefined,
28364 symbolToString = symbolProto ? symbolProto.toString : undefined;
28365
28366 /**
28367 * The base implementation of `_.toString` which doesn't convert nullish
28368 * values to empty strings.
28369 *
28370 * @private
28371 * @param {*} value The value to process.
28372 * @returns {string} Returns the string.
28373 */
28374 function baseToString(value) {
28375 // Exit early for strings to avoid a performance hit in some environments.
28376 if (typeof value == 'string') {
28377 return value;
28378 }
28379 if (isArray(value)) {
28380 // Recursively convert values (susceptible to call stack limits).
28381 return arrayMap(value, baseToString) + '';
28382 }
28383 if (isSymbol(value)) {
28384 return symbolToString ? symbolToString.call(value) : '';
28385 }
28386 var result = value + '';
28387 return result == '0' && 1 / value == -INFINITY ? '-0' : result;
28388 }
28389
28390 module.exports = baseToString;
28391
28392/***/ }),
28393/* 254 */
28394/***/ (function(module, exports) {
28395
28396 "use strict";
28397
28398 /**
28399 * Checks if a `cache` value for `key` exists.
28400 *
28401 * @private
28402 * @param {Object} cache The cache to query.
28403 * @param {string} key The key of the entry to check.
28404 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
28405 */
28406 function cacheHas(cache, key) {
28407 return cache.has(key);
28408 }
28409
28410 module.exports = cacheHas;
28411
28412/***/ }),
28413/* 255 */
28414/***/ (function(module, exports, __webpack_require__) {
28415
28416 'use strict';
28417
28418 var isArray = __webpack_require__(6),
28419 isKey = __webpack_require__(173),
28420 stringToPath = __webpack_require__(571),
28421 toString = __webpack_require__(114);
28422
28423 /**
28424 * Casts `value` to a path array if it's not one.
28425 *
28426 * @private
28427 * @param {*} value The value to inspect.
28428 * @param {Object} [object] The object to query keys on.
28429 * @returns {Array} Returns the cast property path array.
28430 */
28431 function castPath(value, object) {
28432 if (isArray(value)) {
28433 return value;
28434 }
28435 return isKey(value, object) ? [value] : stringToPath(toString(value));
28436 }
28437
28438 module.exports = castPath;
28439
28440/***/ }),
28441/* 256 */
28442/***/ (function(module, exports, __webpack_require__) {
28443
28444 /* WEBPACK VAR INJECTION */(function(module) {'use strict';
28445
28446 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
28447
28448 var root = __webpack_require__(17);
28449
28450 /** Detect free variable `exports`. */
28451 var freeExports = ( false ? 'undefined' : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;
28452
28453 /** Detect free variable `module`. */
28454 var freeModule = freeExports && ( false ? 'undefined' : _typeof(module)) == 'object' && module && !module.nodeType && module;
28455
28456 /** Detect the popular CommonJS extension `module.exports`. */
28457 var moduleExports = freeModule && freeModule.exports === freeExports;
28458
28459 /** Built-in value references. */
28460 var Buffer = moduleExports ? root.Buffer : undefined,
28461 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
28462
28463 /**
28464 * Creates a clone of `buffer`.
28465 *
28466 * @private
28467 * @param {Buffer} buffer The buffer to clone.
28468 * @param {boolean} [isDeep] Specify a deep clone.
28469 * @returns {Buffer} Returns the cloned buffer.
28470 */
28471 function cloneBuffer(buffer, isDeep) {
28472 if (isDeep) {
28473 return buffer.slice();
28474 }
28475 var length = buffer.length,
28476 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
28477
28478 buffer.copy(result);
28479 return result;
28480 }
28481
28482 module.exports = cloneBuffer;
28483 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(39)(module)))
28484
28485/***/ }),
28486/* 257 */
28487/***/ (function(module, exports, __webpack_require__) {
28488
28489 'use strict';
28490
28491 var cloneArrayBuffer = __webpack_require__(167);
28492
28493 /**
28494 * Creates a clone of `typedArray`.
28495 *
28496 * @private
28497 * @param {Object} typedArray The typed array to clone.
28498 * @param {boolean} [isDeep] Specify a deep clone.
28499 * @returns {Object} Returns the cloned typed array.
28500 */
28501 function cloneTypedArray(typedArray, isDeep) {
28502 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
28503 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
28504 }
28505
28506 module.exports = cloneTypedArray;
28507
28508/***/ }),
28509/* 258 */
28510/***/ (function(module, exports, __webpack_require__) {
28511
28512 'use strict';
28513
28514 var baseIteratee = __webpack_require__(61),
28515 isArrayLike = __webpack_require__(24),
28516 keys = __webpack_require__(32);
28517
28518 /**
28519 * Creates a `_.find` or `_.findLast` function.
28520 *
28521 * @private
28522 * @param {Function} findIndexFunc The function to find the collection index.
28523 * @returns {Function} Returns the new find function.
28524 */
28525 function createFind(findIndexFunc) {
28526 return function (collection, predicate, fromIndex) {
28527 var iterable = Object(collection);
28528 if (!isArrayLike(collection)) {
28529 var iteratee = baseIteratee(predicate, 3);
28530 collection = keys(collection);
28531 predicate = function predicate(key) {
28532 return iteratee(iterable[key], key, iterable);
28533 };
28534 }
28535 var index = findIndexFunc(collection, predicate, fromIndex);
28536 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
28537 };
28538 }
28539
28540 module.exports = createFind;
28541
28542/***/ }),
28543/* 259 */
28544/***/ (function(module, exports, __webpack_require__) {
28545
28546 'use strict';
28547
28548 var getNative = __webpack_require__(38);
28549
28550 var defineProperty = function () {
28551 try {
28552 var func = getNative(Object, 'defineProperty');
28553 func({}, '', {});
28554 return func;
28555 } catch (e) {}
28556 }();
28557
28558 module.exports = defineProperty;
28559
28560/***/ }),
28561/* 260 */
28562/***/ (function(module, exports, __webpack_require__) {
28563
28564 'use strict';
28565
28566 var SetCache = __webpack_require__(242),
28567 arraySome = __webpack_require__(482),
28568 cacheHas = __webpack_require__(254);
28569
28570 /** Used to compose bitmasks for value comparisons. */
28571 var COMPARE_PARTIAL_FLAG = 1,
28572 COMPARE_UNORDERED_FLAG = 2;
28573
28574 /**
28575 * A specialized version of `baseIsEqualDeep` for arrays with support for
28576 * partial deep comparisons.
28577 *
28578 * @private
28579 * @param {Array} array The array to compare.
28580 * @param {Array} other The other array to compare.
28581 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
28582 * @param {Function} customizer The function to customize comparisons.
28583 * @param {Function} equalFunc The function to determine equivalents of values.
28584 * @param {Object} stack Tracks traversed `array` and `other` objects.
28585 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
28586 */
28587 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
28588 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
28589 arrLength = array.length,
28590 othLength = other.length;
28591
28592 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
28593 return false;
28594 }
28595 // Assume cyclic values are equal.
28596 var stacked = stack.get(array);
28597 if (stacked && stack.get(other)) {
28598 return stacked == other;
28599 }
28600 var index = -1,
28601 result = true,
28602 seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
28603
28604 stack.set(array, other);
28605 stack.set(other, array);
28606
28607 // Ignore non-index properties.
28608 while (++index < arrLength) {
28609 var arrValue = array[index],
28610 othValue = other[index];
28611
28612 if (customizer) {
28613 var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
28614 }
28615 if (compared !== undefined) {
28616 if (compared) {
28617 continue;
28618 }
28619 result = false;
28620 break;
28621 }
28622 // Recursively compare arrays (susceptible to call stack limits).
28623 if (seen) {
28624 if (!arraySome(other, function (othValue, othIndex) {
28625 if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
28626 return seen.push(othIndex);
28627 }
28628 })) {
28629 result = false;
28630 break;
28631 }
28632 } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
28633 result = false;
28634 break;
28635 }
28636 }
28637 stack['delete'](array);
28638 stack['delete'](other);
28639 return result;
28640 }
28641
28642 module.exports = equalArrays;
28643
28644/***/ }),
28645/* 261 */
28646/***/ (function(module, exports) {
28647
28648 /* WEBPACK VAR INJECTION */(function(global) {'use strict';
28649
28650 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
28651
28652 /** Detect free variable `global` from Node.js. */
28653 var freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global && global.Object === Object && global;
28654
28655 module.exports = freeGlobal;
28656 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
28657
28658/***/ }),
28659/* 262 */
28660/***/ (function(module, exports, __webpack_require__) {
28661
28662 'use strict';
28663
28664 var baseGetAllKeys = __webpack_require__(250),
28665 getSymbols = __webpack_require__(170),
28666 keys = __webpack_require__(32);
28667
28668 /**
28669 * Creates an array of own enumerable property names and symbols of `object`.
28670 *
28671 * @private
28672 * @param {Object} object The object to query.
28673 * @returns {Array} Returns the array of property names and symbols.
28674 */
28675 function getAllKeys(object) {
28676 return baseGetAllKeys(object, keys, getSymbols);
28677 }
28678
28679 module.exports = getAllKeys;
28680
28681/***/ }),
28682/* 263 */
28683/***/ (function(module, exports, __webpack_require__) {
28684
28685 'use strict';
28686
28687 var arrayPush = __webpack_require__(161),
28688 getPrototype = __webpack_require__(169),
28689 getSymbols = __webpack_require__(170),
28690 stubArray = __webpack_require__(279);
28691
28692 /* Built-in method references for those with the same name as other `lodash` methods. */
28693 var nativeGetSymbols = Object.getOwnPropertySymbols;
28694
28695 /**
28696 * Creates an array of the own and inherited enumerable symbols of `object`.
28697 *
28698 * @private
28699 * @param {Object} object The object to query.
28700 * @returns {Array} Returns the array of symbols.
28701 */
28702 var getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {
28703 var result = [];
28704 while (object) {
28705 arrayPush(result, getSymbols(object));
28706 object = getPrototype(object);
28707 }
28708 return result;
28709 };
28710
28711 module.exports = getSymbolsIn;
28712
28713/***/ }),
28714/* 264 */
28715/***/ (function(module, exports, __webpack_require__) {
28716
28717 'use strict';
28718
28719 var DataView = __webpack_require__(472),
28720 Map = __webpack_require__(159),
28721 Promise = __webpack_require__(474),
28722 Set = __webpack_require__(241),
28723 WeakMap = __webpack_require__(475),
28724 baseGetTag = __webpack_require__(30),
28725 toSource = __webpack_require__(272);
28726
28727 /** `Object#toString` result references. */
28728 var mapTag = '[object Map]',
28729 objectTag = '[object Object]',
28730 promiseTag = '[object Promise]',
28731 setTag = '[object Set]',
28732 weakMapTag = '[object WeakMap]';
28733
28734 var dataViewTag = '[object DataView]';
28735
28736 /** Used to detect maps, sets, and weakmaps. */
28737 var dataViewCtorString = toSource(DataView),
28738 mapCtorString = toSource(Map),
28739 promiseCtorString = toSource(Promise),
28740 setCtorString = toSource(Set),
28741 weakMapCtorString = toSource(WeakMap);
28742
28743 /**
28744 * Gets the `toStringTag` of `value`.
28745 *
28746 * @private
28747 * @param {*} value The value to query.
28748 * @returns {string} Returns the `toStringTag`.
28749 */
28750 var getTag = baseGetTag;
28751
28752 // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
28753 if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
28754 getTag = function getTag(value) {
28755 var result = baseGetTag(value),
28756 Ctor = result == objectTag ? value.constructor : undefined,
28757 ctorString = Ctor ? toSource(Ctor) : '';
28758
28759 if (ctorString) {
28760 switch (ctorString) {
28761 case dataViewCtorString:
28762 return dataViewTag;
28763 case mapCtorString:
28764 return mapTag;
28765 case promiseCtorString:
28766 return promiseTag;
28767 case setCtorString:
28768 return setTag;
28769 case weakMapCtorString:
28770 return weakMapTag;
28771 }
28772 }
28773 return result;
28774 };
28775 }
28776
28777 module.exports = getTag;
28778
28779/***/ }),
28780/* 265 */
28781/***/ (function(module, exports, __webpack_require__) {
28782
28783 'use strict';
28784
28785 var castPath = __webpack_require__(255),
28786 isArguments = __webpack_require__(112),
28787 isArray = __webpack_require__(6),
28788 isIndex = __webpack_require__(171),
28789 isLength = __webpack_require__(176),
28790 toKey = __webpack_require__(108);
28791
28792 /**
28793 * Checks if `path` exists on `object`.
28794 *
28795 * @private
28796 * @param {Object} object The object to query.
28797 * @param {Array|string} path The path to check.
28798 * @param {Function} hasFunc The function to check properties.
28799 * @returns {boolean} Returns `true` if `path` exists, else `false`.
28800 */
28801 function hasPath(object, path, hasFunc) {
28802 path = castPath(path, object);
28803
28804 var index = -1,
28805 length = path.length,
28806 result = false;
28807
28808 while (++index < length) {
28809 var key = toKey(path[index]);
28810 if (!(result = object != null && hasFunc(object, key))) {
28811 break;
28812 }
28813 object = object[key];
28814 }
28815 if (result || ++index != length) {
28816 return result;
28817 }
28818 length = object == null ? 0 : object.length;
28819 return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
28820 }
28821
28822 module.exports = hasPath;
28823
28824/***/ }),
28825/* 266 */
28826/***/ (function(module, exports, __webpack_require__) {
28827
28828 'use strict';
28829
28830 var baseCreate = __webpack_require__(486),
28831 getPrototype = __webpack_require__(169),
28832 isPrototype = __webpack_require__(105);
28833
28834 /**
28835 * Initializes an object clone.
28836 *
28837 * @private
28838 * @param {Object} object The object to clone.
28839 * @returns {Object} Returns the initialized clone.
28840 */
28841 function initCloneObject(object) {
28842 return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
28843 }
28844
28845 module.exports = initCloneObject;
28846
28847/***/ }),
28848/* 267 */
28849/***/ (function(module, exports, __webpack_require__) {
28850
28851 'use strict';
28852
28853 var isObject = __webpack_require__(18);
28854
28855 /**
28856 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
28857 *
28858 * @private
28859 * @param {*} value The value to check.
28860 * @returns {boolean} Returns `true` if `value` if suitable for strict
28861 * equality comparisons, else `false`.
28862 */
28863 function isStrictComparable(value) {
28864 return value === value && !isObject(value);
28865 }
28866
28867 module.exports = isStrictComparable;
28868
28869/***/ }),
28870/* 268 */
28871/***/ (function(module, exports) {
28872
28873 "use strict";
28874
28875 /**
28876 * Converts `map` to its key-value pairs.
28877 *
28878 * @private
28879 * @param {Object} map The map to convert.
28880 * @returns {Array} Returns the key-value pairs.
28881 */
28882 function mapToArray(map) {
28883 var index = -1,
28884 result = Array(map.size);
28885
28886 map.forEach(function (value, key) {
28887 result[++index] = [key, value];
28888 });
28889 return result;
28890 }
28891
28892 module.exports = mapToArray;
28893
28894/***/ }),
28895/* 269 */
28896/***/ (function(module, exports) {
28897
28898 "use strict";
28899
28900 /**
28901 * A specialized version of `matchesProperty` for source values suitable
28902 * for strict equality comparisons, i.e. `===`.
28903 *
28904 * @private
28905 * @param {string} key The key of the property to get.
28906 * @param {*} srcValue The value to match.
28907 * @returns {Function} Returns the new spec function.
28908 */
28909 function matchesStrictComparable(key, srcValue) {
28910 return function (object) {
28911 if (object == null) {
28912 return false;
28913 }
28914 return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
28915 };
28916 }
28917
28918 module.exports = matchesStrictComparable;
28919
28920/***/ }),
28921/* 270 */
28922/***/ (function(module, exports, __webpack_require__) {
28923
28924 /* WEBPACK VAR INJECTION */(function(module) {'use strict';
28925
28926 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
28927
28928 var freeGlobal = __webpack_require__(261);
28929
28930 /** Detect free variable `exports`. */
28931 var freeExports = ( false ? 'undefined' : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;
28932
28933 /** Detect free variable `module`. */
28934 var freeModule = freeExports && ( false ? 'undefined' : _typeof(module)) == 'object' && module && !module.nodeType && module;
28935
28936 /** Detect the popular CommonJS extension `module.exports`. */
28937 var moduleExports = freeModule && freeModule.exports === freeExports;
28938
28939 /** Detect free variable `process` from Node.js. */
28940 var freeProcess = moduleExports && freeGlobal.process;
28941
28942 /** Used to access faster Node.js helpers. */
28943 var nodeUtil = function () {
28944 try {
28945 return freeProcess && freeProcess.binding && freeProcess.binding('util');
28946 } catch (e) {}
28947 }();
28948
28949 module.exports = nodeUtil;
28950 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(39)(module)))
28951
28952/***/ }),
28953/* 271 */
28954/***/ (function(module, exports) {
28955
28956 "use strict";
28957
28958 /**
28959 * Creates a unary function that invokes `func` with its argument transformed.
28960 *
28961 * @private
28962 * @param {Function} func The function to wrap.
28963 * @param {Function} transform The argument transform.
28964 * @returns {Function} Returns the new function.
28965 */
28966 function overArg(func, transform) {
28967 return function (arg) {
28968 return func(transform(arg));
28969 };
28970 }
28971
28972 module.exports = overArg;
28973
28974/***/ }),
28975/* 272 */
28976/***/ (function(module, exports) {
28977
28978 'use strict';
28979
28980 /** Used for built-in method references. */
28981 var funcProto = Function.prototype;
28982
28983 /** Used to resolve the decompiled source of functions. */
28984 var funcToString = funcProto.toString;
28985
28986 /**
28987 * Converts `func` to its source code.
28988 *
28989 * @private
28990 * @param {Function} func The function to convert.
28991 * @returns {string} Returns the source code.
28992 */
28993 function toSource(func) {
28994 if (func != null) {
28995 try {
28996 return funcToString.call(func);
28997 } catch (e) {}
28998 try {
28999 return func + '';
29000 } catch (e) {}
29001 }
29002 return '';
29003 }
29004
29005 module.exports = toSource;
29006
29007/***/ }),
29008/* 273 */
29009/***/ (function(module, exports, __webpack_require__) {
29010
29011 'use strict';
29012
29013 var apply = __webpack_require__(244),
29014 assignInWith = __webpack_require__(573),
29015 baseRest = __webpack_require__(101),
29016 customDefaultsAssignIn = __webpack_require__(529);
29017
29018 /**
29019 * Assigns own and inherited enumerable string keyed properties of source
29020 * objects to the destination object for all destination properties that
29021 * resolve to `undefined`. Source objects are applied from left to right.
29022 * Once a property is set, additional values of the same property are ignored.
29023 *
29024 * **Note:** This method mutates `object`.
29025 *
29026 * @static
29027 * @since 0.1.0
29028 * @memberOf _
29029 * @category Object
29030 * @param {Object} object The destination object.
29031 * @param {...Object} [sources] The source objects.
29032 * @returns {Object} Returns `object`.
29033 * @see _.defaultsDeep
29034 * @example
29035 *
29036 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
29037 * // => { 'a': 1, 'b': 2 }
29038 */
29039 var defaults = baseRest(function (args) {
29040 args.push(undefined, customDefaultsAssignIn);
29041 return apply(assignInWith, undefined, args);
29042 });
29043
29044 module.exports = defaults;
29045
29046/***/ }),
29047/* 274 */
29048/***/ (function(module, exports, __webpack_require__) {
29049
29050 'use strict';
29051
29052 var baseHas = __webpack_require__(490),
29053 hasPath = __webpack_require__(265);
29054
29055 /**
29056 * Checks if `path` is a direct property of `object`.
29057 *
29058 * @static
29059 * @since 0.1.0
29060 * @memberOf _
29061 * @category Object
29062 * @param {Object} object The object to query.
29063 * @param {Array|string} path The path to check.
29064 * @returns {boolean} Returns `true` if `path` exists, else `false`.
29065 * @example
29066 *
29067 * var object = { 'a': { 'b': 2 } };
29068 * var other = _.create({ 'a': _.create({ 'b': 2 }) });
29069 *
29070 * _.has(object, 'a');
29071 * // => true
29072 *
29073 * _.has(object, 'a.b');
29074 * // => true
29075 *
29076 * _.has(object, ['a', 'b']);
29077 * // => true
29078 *
29079 * _.has(other, 'a');
29080 * // => false
29081 */
29082 function has(object, path) {
29083 return object != null && hasPath(object, path, baseHas);
29084 }
29085
29086 module.exports = has;
29087
29088/***/ }),
29089/* 275 */
29090/***/ (function(module, exports, __webpack_require__) {
29091
29092 'use strict';
29093
29094 var baseGetTag = __webpack_require__(30),
29095 getPrototype = __webpack_require__(169),
29096 isObjectLike = __webpack_require__(25);
29097
29098 /** `Object#toString` result references. */
29099 var objectTag = '[object Object]';
29100
29101 /** Used for built-in method references. */
29102 var funcProto = Function.prototype,
29103 objectProto = Object.prototype;
29104
29105 /** Used to resolve the decompiled source of functions. */
29106 var funcToString = funcProto.toString;
29107
29108 /** Used to check objects for own properties. */
29109 var hasOwnProperty = objectProto.hasOwnProperty;
29110
29111 /** Used to infer the `Object` constructor. */
29112 var objectCtorString = funcToString.call(Object);
29113
29114 /**
29115 * Checks if `value` is a plain object, that is, an object created by the
29116 * `Object` constructor or one with a `[[Prototype]]` of `null`.
29117 *
29118 * @static
29119 * @memberOf _
29120 * @since 0.8.0
29121 * @category Lang
29122 * @param {*} value The value to check.
29123 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
29124 * @example
29125 *
29126 * function Foo() {
29127 * this.a = 1;
29128 * }
29129 *
29130 * _.isPlainObject(new Foo);
29131 * // => false
29132 *
29133 * _.isPlainObject([1, 2, 3]);
29134 * // => false
29135 *
29136 * _.isPlainObject({ 'x': 0, 'y': 0 });
29137 * // => true
29138 *
29139 * _.isPlainObject(Object.create(null));
29140 * // => true
29141 */
29142 function isPlainObject(value) {
29143 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
29144 return false;
29145 }
29146 var proto = getPrototype(value);
29147 if (proto === null) {
29148 return true;
29149 }
29150 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
29151 return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
29152 }
29153
29154 module.exports = isPlainObject;
29155
29156/***/ }),
29157/* 276 */
29158/***/ (function(module, exports, __webpack_require__) {
29159
29160 'use strict';
29161
29162 var baseIsRegExp = __webpack_require__(498),
29163 baseUnary = __webpack_require__(102),
29164 nodeUtil = __webpack_require__(270);
29165
29166 /* Node.js helper references. */
29167 var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
29168
29169 /**
29170 * Checks if `value` is classified as a `RegExp` object.
29171 *
29172 * @static
29173 * @memberOf _
29174 * @since 0.1.0
29175 * @category Lang
29176 * @param {*} value The value to check.
29177 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
29178 * @example
29179 *
29180 * _.isRegExp(/abc/);
29181 * // => true
29182 *
29183 * _.isRegExp('/abc/');
29184 * // => false
29185 */
29186 var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
29187
29188 module.exports = isRegExp;
29189
29190/***/ }),
29191/* 277 */
29192/***/ (function(module, exports, __webpack_require__) {
29193
29194 'use strict';
29195
29196 var baseRest = __webpack_require__(101),
29197 pullAll = __webpack_require__(593);
29198
29199 /**
29200 * Removes all given values from `array` using
29201 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
29202 * for equality comparisons.
29203 *
29204 * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
29205 * to remove elements from an array by predicate.
29206 *
29207 * @static
29208 * @memberOf _
29209 * @since 2.0.0
29210 * @category Array
29211 * @param {Array} array The array to modify.
29212 * @param {...*} [values] The values to remove.
29213 * @returns {Array} Returns `array`.
29214 * @example
29215 *
29216 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
29217 *
29218 * _.pull(array, 'a', 'c');
29219 * console.log(array);
29220 * // => ['b', 'b']
29221 */
29222 var pull = baseRest(pullAll);
29223
29224 module.exports = pull;
29225
29226/***/ }),
29227/* 278 */
29228/***/ (function(module, exports, __webpack_require__) {
29229
29230 'use strict';
29231
29232 var baseRepeat = __webpack_require__(510),
29233 isIterateeCall = __webpack_require__(172),
29234 toInteger = __webpack_require__(48),
29235 toString = __webpack_require__(114);
29236
29237 /**
29238 * Repeats the given string `n` times.
29239 *
29240 * @static
29241 * @memberOf _
29242 * @since 3.0.0
29243 * @category String
29244 * @param {string} [string=''] The string to repeat.
29245 * @param {number} [n=1] The number of times to repeat the string.
29246 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
29247 * @returns {string} Returns the repeated string.
29248 * @example
29249 *
29250 * _.repeat('*', 3);
29251 * // => '***'
29252 *
29253 * _.repeat('abc', 2);
29254 * // => 'abcabc'
29255 *
29256 * _.repeat('abc', 0);
29257 * // => ''
29258 */
29259 function repeat(string, n, guard) {
29260 if (guard ? isIterateeCall(string, n, guard) : n === undefined) {
29261 n = 1;
29262 } else {
29263 n = toInteger(n);
29264 }
29265 return baseRepeat(toString(string), n);
29266 }
29267
29268 module.exports = repeat;
29269
29270/***/ }),
29271/* 279 */
29272/***/ (function(module, exports) {
29273
29274 "use strict";
29275
29276 /**
29277 * This method returns a new empty array.
29278 *
29279 * @static
29280 * @memberOf _
29281 * @since 4.13.0
29282 * @category Util
29283 * @returns {Array} Returns the new empty array.
29284 * @example
29285 *
29286 * var arrays = _.times(2, _.stubArray);
29287 *
29288 * console.log(arrays);
29289 * // => [[], []]
29290 *
29291 * console.log(arrays[0] === arrays[1]);
29292 * // => false
29293 */
29294 function stubArray() {
29295 return [];
29296 }
29297
29298 module.exports = stubArray;
29299
29300/***/ }),
29301/* 280 */
29302/***/ (function(module, exports, __webpack_require__) {
29303
29304 'use strict';
29305
29306 var baseValues = __webpack_require__(515),
29307 keys = __webpack_require__(32);
29308
29309 /**
29310 * Creates an array of the own enumerable string keyed property values of `object`.
29311 *
29312 * **Note:** Non-object values are coerced to objects.
29313 *
29314 * @static
29315 * @since 0.1.0
29316 * @memberOf _
29317 * @category Object
29318 * @param {Object} object The object to query.
29319 * @returns {Array} Returns the array of property values.
29320 * @example
29321 *
29322 * function Foo() {
29323 * this.a = 1;
29324 * this.b = 2;
29325 * }
29326 *
29327 * Foo.prototype.c = 3;
29328 *
29329 * _.values(new Foo);
29330 * // => [1, 2] (iteration order is not guaranteed)
29331 *
29332 * _.values('hi');
29333 * // => ['h', 'i']
29334 */
29335 function values(object) {
29336 return object == null ? [] : baseValues(object, keys(object));
29337 }
29338
29339 module.exports = values;
29340
29341/***/ }),
29342/* 281 */
29343/***/ (function(module, exports) {
29344
29345 "use strict";
29346
29347 var originalObject = Object;
29348 var originalDefProp = Object.defineProperty;
29349 var originalCreate = Object.create;
29350
29351 function defProp(obj, name, value) {
29352 if (originalDefProp) try {
29353 originalDefProp.call(originalObject, obj, name, { value: value });
29354 } catch (definePropertyIsBrokenInIE8) {
29355 obj[name] = value;
29356 } else {
29357 obj[name] = value;
29358 }
29359 }
29360
29361 // For functions that will be invoked using .call or .apply, we need to
29362 // define those methods on the function objects themselves, rather than
29363 // inheriting them from Function.prototype, so that a malicious or clumsy
29364 // third party cannot interfere with the functionality of this module by
29365 // redefining Function.prototype.call or .apply.
29366 function makeSafeToCall(fun) {
29367 if (fun) {
29368 defProp(fun, "call", fun.call);
29369 defProp(fun, "apply", fun.apply);
29370 }
29371 return fun;
29372 }
29373
29374 makeSafeToCall(originalDefProp);
29375 makeSafeToCall(originalCreate);
29376
29377 var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty);
29378 var numToStr = makeSafeToCall(Number.prototype.toString);
29379 var strSlice = makeSafeToCall(String.prototype.slice);
29380
29381 var cloner = function cloner() {};
29382 function create(prototype) {
29383 if (originalCreate) {
29384 return originalCreate.call(originalObject, prototype);
29385 }
29386 cloner.prototype = prototype || null;
29387 return new cloner();
29388 }
29389
29390 var rand = Math.random;
29391 var uniqueKeys = create(null);
29392
29393 function makeUniqueKey() {
29394 // Collisions are highly unlikely, but this module is in the business of
29395 // making guarantees rather than safe bets.
29396 do {
29397 var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2));
29398 } while (hasOwn.call(uniqueKeys, uniqueKey));
29399 return uniqueKeys[uniqueKey] = uniqueKey;
29400 }
29401
29402 function internString(str) {
29403 var obj = {};
29404 obj[str] = true;
29405 return Object.keys(obj)[0];
29406 }
29407
29408 // External users might find this function useful, but it is not necessary
29409 // for the typical use of this module.
29410 exports.makeUniqueKey = makeUniqueKey;
29411
29412 // Object.getOwnPropertyNames is the only way to enumerate non-enumerable
29413 // properties, so if we wrap it to ignore our secret keys, there should be
29414 // no way (except guessing) to access those properties.
29415 var originalGetOPNs = Object.getOwnPropertyNames;
29416 Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
29417 for (var names = originalGetOPNs(object), src = 0, dst = 0, len = names.length; src < len; ++src) {
29418 if (!hasOwn.call(uniqueKeys, names[src])) {
29419 if (src > dst) {
29420 names[dst] = names[src];
29421 }
29422 ++dst;
29423 }
29424 }
29425 names.length = dst;
29426 return names;
29427 };
29428
29429 function defaultCreatorFn(object) {
29430 return create(null);
29431 }
29432
29433 function makeAccessor(secretCreatorFn) {
29434 var brand = makeUniqueKey();
29435 var passkey = create(null);
29436
29437 secretCreatorFn = secretCreatorFn || defaultCreatorFn;
29438
29439 function register(object) {
29440 var secret; // Created lazily.
29441
29442 function vault(key, forget) {
29443 // Only code that has access to the passkey can retrieve (or forget)
29444 // the secret object.
29445 if (key === passkey) {
29446 return forget ? secret = null : secret || (secret = secretCreatorFn(object));
29447 }
29448 }
29449
29450 defProp(object, brand, vault);
29451 }
29452
29453 function accessor(object) {
29454 if (!hasOwn.call(object, brand)) register(object);
29455 return object[brand](passkey);
29456 }
29457
29458 accessor.forget = function (object) {
29459 if (hasOwn.call(object, brand)) object[brand](passkey, true);
29460 };
29461
29462 return accessor;
29463 }
29464
29465 exports.makeAccessor = makeAccessor;
29466
29467/***/ }),
29468/* 282 */
29469/***/ (function(module, exports, __webpack_require__) {
29470
29471 var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {'use strict';
29472
29473 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
29474
29475 /*! https://mths.be/regenerate v1.3.2 by @mathias | MIT license */
29476 ;(function (root) {
29477
29478 // Detect free variables `exports`.
29479 var freeExports = ( false ? 'undefined' : _typeof(exports)) == 'object' && exports;
29480
29481 // Detect free variable `module`.
29482 var freeModule = ( false ? 'undefined' : _typeof(module)) == 'object' && module && module.exports == freeExports && module;
29483
29484 // Detect free variable `global`, from Node.js/io.js or Browserified code,
29485 // and use it as `root`.
29486 var freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global;
29487 if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
29488 root = freeGlobal;
29489 }
29490
29491 /*--------------------------------------------------------------------------*/
29492
29493 var ERRORS = {
29494 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + 'to the `start` value.',
29495 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.'
29496 };
29497
29498 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs
29499 var HIGH_SURROGATE_MIN = 0xD800;
29500 var HIGH_SURROGATE_MAX = 0xDBFF;
29501 var LOW_SURROGATE_MIN = 0xDC00;
29502 var LOW_SURROGATE_MAX = 0xDFFF;
29503
29504 // In Regenerate output, `\0` is never preceded by `\` because we sort by
29505 // code point value, so let’s keep this regular expression simple.
29506 var regexNull = /\\x00([^0123456789]|$)/g;
29507
29508 var object = {};
29509 var hasOwnProperty = object.hasOwnProperty;
29510 var extend = function extend(destination, source) {
29511 var key;
29512 for (key in source) {
29513 if (hasOwnProperty.call(source, key)) {
29514 destination[key] = source[key];
29515 }
29516 }
29517 return destination;
29518 };
29519
29520 var forEach = function forEach(array, callback) {
29521 var index = -1;
29522 var length = array.length;
29523 while (++index < length) {
29524 callback(array[index], index);
29525 }
29526 };
29527
29528 var toString = object.toString;
29529 var isArray = function isArray(value) {
29530 return toString.call(value) == '[object Array]';
29531 };
29532 var isNumber = function isNumber(value) {
29533 return typeof value == 'number' || toString.call(value) == '[object Number]';
29534 };
29535
29536 // This assumes that `number` is a positive integer that `toString()`s nicely
29537 // (which is the case for all code point values).
29538 var zeroes = '0000';
29539 var pad = function pad(number, totalCharacters) {
29540 var string = String(number);
29541 return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string;
29542 };
29543
29544 var hex = function hex(number) {
29545 return Number(number).toString(16).toUpperCase();
29546 };
29547
29548 var slice = [].slice;
29549
29550 /*--------------------------------------------------------------------------*/
29551
29552 var dataFromCodePoints = function dataFromCodePoints(codePoints) {
29553 var index = -1;
29554 var length = codePoints.length;
29555 var max = length - 1;
29556 var result = [];
29557 var isStart = true;
29558 var tmp;
29559 var previous = 0;
29560 while (++index < length) {
29561 tmp = codePoints[index];
29562 if (isStart) {
29563 result.push(tmp);
29564 previous = tmp;
29565 isStart = false;
29566 } else {
29567 if (tmp == previous + 1) {
29568 if (index != max) {
29569 previous = tmp;
29570 continue;
29571 } else {
29572 isStart = true;
29573 result.push(tmp + 1);
29574 }
29575 } else {
29576 // End the previous range and start a new one.
29577 result.push(previous + 1, tmp);
29578 previous = tmp;
29579 }
29580 }
29581 }
29582 if (!isStart) {
29583 result.push(tmp + 1);
29584 }
29585 return result;
29586 };
29587
29588 var dataRemove = function dataRemove(data, codePoint) {
29589 // Iterate over the data per `(start, end)` pair.
29590 var index = 0;
29591 var start;
29592 var end;
29593 var length = data.length;
29594 while (index < length) {
29595 start = data[index];
29596 end = data[index + 1];
29597 if (codePoint >= start && codePoint < end) {
29598 // Modify this pair.
29599 if (codePoint == start) {
29600 if (end == start + 1) {
29601 // Just remove `start` and `end`.
29602 data.splice(index, 2);
29603 return data;
29604 } else {
29605 // Just replace `start` with a new value.
29606 data[index] = codePoint + 1;
29607 return data;
29608 }
29609 } else if (codePoint == end - 1) {
29610 // Just replace `end` with a new value.
29611 data[index + 1] = codePoint;
29612 return data;
29613 } else {
29614 // Replace `[start, end]` with `[startA, endA, startB, endB]`.
29615 data.splice(index, 2, start, codePoint, codePoint + 1, end);
29616 return data;
29617 }
29618 }
29619 index += 2;
29620 }
29621 return data;
29622 };
29623
29624 var dataRemoveRange = function dataRemoveRange(data, rangeStart, rangeEnd) {
29625 if (rangeEnd < rangeStart) {
29626 throw Error(ERRORS.rangeOrder);
29627 }
29628 // Iterate over the data per `(start, end)` pair.
29629 var index = 0;
29630 var start;
29631 var end;
29632 while (index < data.length) {
29633 start = data[index];
29634 end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
29635
29636 // Exit as soon as no more matching pairs can be found.
29637 if (start > rangeEnd) {
29638 return data;
29639 }
29640
29641 // Check if this range pair is equal to, or forms a subset of, the range
29642 // to be removed.
29643 // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`.
29644 // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`.
29645 if (rangeStart <= start && rangeEnd >= end) {
29646 // Remove this pair.
29647 data.splice(index, 2);
29648 continue;
29649 }
29650
29651 // Check if both `rangeStart` and `rangeEnd` are within the bounds of
29652 // this pair.
29653 // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`.
29654 if (rangeStart >= start && rangeEnd < end) {
29655 if (rangeStart == start) {
29656 // Replace `[start, end]` with `[startB, endB]`.
29657 data[index] = rangeEnd + 1;
29658 data[index + 1] = end + 1;
29659 return data;
29660 }
29661 // Replace `[start, end]` with `[startA, endA, startB, endB]`.
29662 data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);
29663 return data;
29664 }
29665
29666 // Check if only `rangeStart` is within the bounds of this pair.
29667 // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`.
29668 if (rangeStart >= start && rangeStart <= end) {
29669 // Replace `end` with `rangeStart`.
29670 data[index + 1] = rangeStart;
29671 // Note: we cannot `return` just yet, in case any following pairs still
29672 // contain matching code points.
29673 // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20
29674 // → `[0, 4, 21, 31]`.
29675 }
29676
29677 // Check if only `rangeEnd` is within the bounds of this pair.
29678 // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`.
29679 else if (rangeEnd >= start && rangeEnd <= end) {
29680 // Just replace `start`.
29681 data[index] = rangeEnd + 1;
29682 return data;
29683 }
29684
29685 index += 2;
29686 }
29687 return data;
29688 };
29689
29690 var dataAdd = function dataAdd(data, codePoint) {
29691 // Iterate over the data per `(start, end)` pair.
29692 var index = 0;
29693 var start;
29694 var end;
29695 var lastIndex = null;
29696 var length = data.length;
29697 if (codePoint < 0x0 || codePoint > 0x10FFFF) {
29698 throw RangeError(ERRORS.codePointRange);
29699 }
29700 while (index < length) {
29701 start = data[index];
29702 end = data[index + 1];
29703
29704 // Check if the code point is already in the set.
29705 if (codePoint >= start && codePoint < end) {
29706 return data;
29707 }
29708
29709 if (codePoint == start - 1) {
29710 // Just replace `start` with a new value.
29711 data[index] = codePoint;
29712 return data;
29713 }
29714
29715 // At this point, if `start` is `greater` than `codePoint`, insert a new
29716 // `[start, end]` pair before the current pair, or after the current pair
29717 // if there is a known `lastIndex`.
29718 if (start > codePoint) {
29719 data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1);
29720 return data;
29721 }
29722
29723 if (codePoint == end) {
29724 // Check if adding this code point causes two separate ranges to become
29725 // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`.
29726 if (codePoint + 1 == data[index + 2]) {
29727 data.splice(index, 4, start, data[index + 3]);
29728 return data;
29729 }
29730 // Else, just replace `end` with a new value.
29731 data[index + 1] = codePoint + 1;
29732 return data;
29733 }
29734 lastIndex = index;
29735 index += 2;
29736 }
29737 // The loop has finished; add the new pair to the end of the data set.
29738 data.push(codePoint, codePoint + 1);
29739 return data;
29740 };
29741
29742 var dataAddData = function dataAddData(dataA, dataB) {
29743 // Iterate over the data per `(start, end)` pair.
29744 var index = 0;
29745 var start;
29746 var end;
29747 var data = dataA.slice();
29748 var length = dataB.length;
29749 while (index < length) {
29750 start = dataB[index];
29751 end = dataB[index + 1] - 1;
29752 if (start == end) {
29753 data = dataAdd(data, start);
29754 } else {
29755 data = dataAddRange(data, start, end);
29756 }
29757 index += 2;
29758 }
29759 return data;
29760 };
29761
29762 var dataRemoveData = function dataRemoveData(dataA, dataB) {
29763 // Iterate over the data per `(start, end)` pair.
29764 var index = 0;
29765 var start;
29766 var end;
29767 var data = dataA.slice();
29768 var length = dataB.length;
29769 while (index < length) {
29770 start = dataB[index];
29771 end = dataB[index + 1] - 1;
29772 if (start == end) {
29773 data = dataRemove(data, start);
29774 } else {
29775 data = dataRemoveRange(data, start, end);
29776 }
29777 index += 2;
29778 }
29779 return data;
29780 };
29781
29782 var dataAddRange = function dataAddRange(data, rangeStart, rangeEnd) {
29783 if (rangeEnd < rangeStart) {
29784 throw Error(ERRORS.rangeOrder);
29785 }
29786 if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) {
29787 throw RangeError(ERRORS.codePointRange);
29788 }
29789 // Iterate over the data per `(start, end)` pair.
29790 var index = 0;
29791 var start;
29792 var end;
29793 var added = false;
29794 var length = data.length;
29795 while (index < length) {
29796 start = data[index];
29797 end = data[index + 1];
29798
29799 if (added) {
29800 // The range has already been added to the set; at this point, we just
29801 // need to get rid of the following ranges in case they overlap.
29802
29803 // Check if this range can be combined with the previous range.
29804 if (start == rangeEnd + 1) {
29805 data.splice(index - 1, 2);
29806 return data;
29807 }
29808
29809 // Exit as soon as no more possibly overlapping pairs can be found.
29810 if (start > rangeEnd) {
29811 return data;
29812 }
29813
29814 // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have
29815 // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the
29816 // `0,16` range that was previously added.
29817 if (start >= rangeStart && start <= rangeEnd) {
29818 // `start` lies within the range that was previously added.
29819
29820 if (end > rangeStart && end - 1 <= rangeEnd) {
29821 // `end` lies within the range that was previously added as well,
29822 // so remove this pair.
29823 data.splice(index, 2);
29824 index -= 2;
29825 // Note: we cannot `return` just yet, as there may still be other
29826 // overlapping pairs.
29827 } else {
29828 // `start` lies within the range that was previously added, but
29829 // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so
29830 // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`.
29831 // Remove the previously added `end` and the current `start`.
29832 data.splice(index - 1, 2);
29833 index -= 2;
29834 }
29835
29836 // Note: we cannot return yet.
29837 }
29838 } else if (start == rangeEnd + 1) {
29839 data[index] = rangeStart;
29840 return data;
29841 }
29842
29843 // Check if a new pair must be inserted *before* the current one.
29844 else if (start > rangeEnd) {
29845 data.splice(index, 0, rangeStart, rangeEnd + 1);
29846 return data;
29847 } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {
29848 // The new range lies entirely within an existing range pair. No action
29849 // needed.
29850 return data;
29851 } else if (
29852 // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`.
29853 rangeStart >= start && rangeStart < end ||
29854 // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`.
29855 end == rangeStart) {
29856 // Replace `end` with the new value.
29857 data[index + 1] = rangeEnd + 1;
29858 // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]`
29859 // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part.
29860 added = true;
29861 // Note: we cannot `return` just yet.
29862 } else if (rangeStart <= start && rangeEnd + 1 >= end) {
29863 // The new range is a superset of the old range.
29864 data[index] = rangeStart;
29865 data[index + 1] = rangeEnd + 1;
29866 added = true;
29867 }
29868
29869 index += 2;
29870 }
29871 // The loop has finished without doing anything; add the new pair to the end
29872 // of the data set.
29873 if (!added) {
29874 data.push(rangeStart, rangeEnd + 1);
29875 }
29876 return data;
29877 };
29878
29879 var dataContains = function dataContains(data, codePoint) {
29880 var index = 0;
29881 var length = data.length;
29882 // Exit early if `codePoint` is not within `data`’s overall range.
29883 var start = data[index];
29884 var end = data[length - 1];
29885 if (length >= 2) {
29886 if (codePoint < start || codePoint > end) {
29887 return false;
29888 }
29889 }
29890 // Iterate over the data per `(start, end)` pair.
29891 while (index < length) {
29892 start = data[index];
29893 end = data[index + 1];
29894 if (codePoint >= start && codePoint < end) {
29895 return true;
29896 }
29897 index += 2;
29898 }
29899 return false;
29900 };
29901
29902 var dataIntersection = function dataIntersection(data, codePoints) {
29903 var index = 0;
29904 var length = codePoints.length;
29905 var codePoint;
29906 var result = [];
29907 while (index < length) {
29908 codePoint = codePoints[index];
29909 if (dataContains(data, codePoint)) {
29910 result.push(codePoint);
29911 }
29912 ++index;
29913 }
29914 return dataFromCodePoints(result);
29915 };
29916
29917 var dataIsEmpty = function dataIsEmpty(data) {
29918 return !data.length;
29919 };
29920
29921 var dataIsSingleton = function dataIsSingleton(data) {
29922 // Check if the set only represents a single code point.
29923 return data.length == 2 && data[0] + 1 == data[1];
29924 };
29925
29926 var dataToArray = function dataToArray(data) {
29927 // Iterate over the data per `(start, end)` pair.
29928 var index = 0;
29929 var start;
29930 var end;
29931 var result = [];
29932 var length = data.length;
29933 while (index < length) {
29934 start = data[index];
29935 end = data[index + 1];
29936 while (start < end) {
29937 result.push(start);
29938 ++start;
29939 }
29940 index += 2;
29941 }
29942 return result;
29943 };
29944
29945 /*--------------------------------------------------------------------------*/
29946
29947 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
29948 var floor = Math.floor;
29949 var highSurrogate = function highSurrogate(codePoint) {
29950 return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10);
29951 };
29952
29953 var lowSurrogate = function lowSurrogate(codePoint) {
29954 return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10);
29955 };
29956
29957 var stringFromCharCode = String.fromCharCode;
29958 var codePointToString = function codePointToString(codePoint) {
29959 var string;
29960 // https://mathiasbynens.be/notes/javascript-escapes#single
29961 // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a
29962 // different meaning in regular expressions (word boundary), so it cannot
29963 // be used here.
29964 if (codePoint == 0x09) {
29965 string = '\\t';
29966 }
29967 // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it.
29968 // else if (codePoint == 0x0B) {
29969 // string = '\\v';
29970 // }
29971 else if (codePoint == 0x0A) {
29972 string = '\\n';
29973 } else if (codePoint == 0x0C) {
29974 string = '\\f';
29975 } else if (codePoint == 0x0D) {
29976 string = '\\r';
29977 } else if (codePoint == 0x5C) {
29978 string = '\\\\';
29979 } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) {
29980 // The code point maps to an unsafe printable ASCII character;
29981 // backslash-escape it. Here’s the list of those symbols:
29982 //
29983 // $()*+-.?[\]^{|}
29984 //
29985 // See #7 for more info.
29986 string = '\\' + stringFromCharCode(codePoint);
29987 } else if (codePoint >= 0x20 && codePoint <= 0x7E) {
29988 // The code point maps to one of these printable ASCII symbols
29989 // (including the space character):
29990 //
29991 // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO
29992 // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~
29993 //
29994 // These can safely be used directly.
29995 string = stringFromCharCode(codePoint);
29996 } else if (codePoint <= 0xFF) {
29997 // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal
29998 string = '\\x' + pad(hex(codePoint), 2);
29999 } else {
30000 // `codePoint <= 0xFFFF` holds true.
30001 // https://mathiasbynens.be/notes/javascript-escapes#unicode
30002 string = '\\u' + pad(hex(codePoint), 4);
30003 }
30004
30005 // There’s no need to account for astral symbols / surrogate pairs here,
30006 // since `codePointToString` is private and only used for BMP code points.
30007 // But if that’s what you need, just add an `else` block with this code:
30008 //
30009 // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4)
30010 // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4);
30011
30012 return string;
30013 };
30014
30015 var codePointToStringUnicode = function codePointToStringUnicode(codePoint) {
30016 if (codePoint <= 0xFFFF) {
30017 return codePointToString(codePoint);
30018 }
30019 return '\\u{' + codePoint.toString(16).toUpperCase() + '}';
30020 };
30021
30022 var symbolToCodePoint = function symbolToCodePoint(symbol) {
30023 var length = symbol.length;
30024 var first = symbol.charCodeAt(0);
30025 var second;
30026 if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1 // There is a next code unit.
30027 ) {
30028 // `first` is a high surrogate, and there is a next character. Assume
30029 // it’s a low surrogate (else it’s invalid usage of Regenerate anyway).
30030 second = symbol.charCodeAt(1);
30031 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
30032 return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000;
30033 }
30034 return first;
30035 };
30036
30037 var createBMPCharacterClasses = function createBMPCharacterClasses(data) {
30038 // Iterate over the data per `(start, end)` pair.
30039 var result = '';
30040 var index = 0;
30041 var start;
30042 var end;
30043 var length = data.length;
30044 if (dataIsSingleton(data)) {
30045 return codePointToString(data[0]);
30046 }
30047 while (index < length) {
30048 start = data[index];
30049 end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
30050 if (start == end) {
30051 result += codePointToString(start);
30052 } else if (start + 1 == end) {
30053 result += codePointToString(start) + codePointToString(end);
30054 } else {
30055 result += codePointToString(start) + '-' + codePointToString(end);
30056 }
30057 index += 2;
30058 }
30059 return '[' + result + ']';
30060 };
30061
30062 var createUnicodeCharacterClasses = function createUnicodeCharacterClasses(data) {
30063 // Iterate over the data per `(start, end)` pair.
30064 var result = '';
30065 var index = 0;
30066 var start;
30067 var end;
30068 var length = data.length;
30069 if (dataIsSingleton(data)) {
30070 return codePointToStringUnicode(data[0]);
30071 }
30072 while (index < length) {
30073 start = data[index];
30074 end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
30075 if (start == end) {
30076 result += codePointToStringUnicode(start);
30077 } else if (start + 1 == end) {
30078 result += codePointToStringUnicode(start) + codePointToStringUnicode(end);
30079 } else {
30080 result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);
30081 }
30082 index += 2;
30083 }
30084 return '[' + result + ']';
30085 };
30086
30087 var splitAtBMP = function splitAtBMP(data) {
30088 // Iterate over the data per `(start, end)` pair.
30089 var loneHighSurrogates = [];
30090 var loneLowSurrogates = [];
30091 var bmp = [];
30092 var astral = [];
30093 var index = 0;
30094 var start;
30095 var end;
30096 var length = data.length;
30097 while (index < length) {
30098 start = data[index];
30099 end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
30100
30101 if (start < HIGH_SURROGATE_MIN) {
30102
30103 // The range starts and ends before the high surrogate range.
30104 // E.g. (0, 0x10).
30105 if (end < HIGH_SURROGATE_MIN) {
30106 bmp.push(start, end + 1);
30107 }
30108
30109 // The range starts before the high surrogate range and ends within it.
30110 // E.g. (0, 0xD855).
30111 if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
30112 bmp.push(start, HIGH_SURROGATE_MIN);
30113 loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);
30114 }
30115
30116 // The range starts before the high surrogate range and ends in the low
30117 // surrogate range. E.g. (0, 0xDCFF).
30118 if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
30119 bmp.push(start, HIGH_SURROGATE_MIN);
30120 loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
30121 loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
30122 }
30123
30124 // The range starts before the high surrogate range and ends after the
30125 // low surrogate range. E.g. (0, 0x10FFFF).
30126 if (end > LOW_SURROGATE_MAX) {
30127 bmp.push(start, HIGH_SURROGATE_MIN);
30128 loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
30129 loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
30130 if (end <= 0xFFFF) {
30131 bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
30132 } else {
30133 bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
30134 astral.push(0xFFFF + 1, end + 1);
30135 }
30136 }
30137 } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {
30138
30139 // The range starts and ends in the high surrogate range.
30140 // E.g. (0xD855, 0xD866).
30141 if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
30142 loneHighSurrogates.push(start, end + 1);
30143 }
30144
30145 // The range starts in the high surrogate range and ends in the low
30146 // surrogate range. E.g. (0xD855, 0xDCFF).
30147 if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
30148 loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
30149 loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
30150 }
30151
30152 // The range starts in the high surrogate range and ends after the low
30153 // surrogate range. E.g. (0xD855, 0x10FFFF).
30154 if (end > LOW_SURROGATE_MAX) {
30155 loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
30156 loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
30157 if (end <= 0xFFFF) {
30158 bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
30159 } else {
30160 bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
30161 astral.push(0xFFFF + 1, end + 1);
30162 }
30163 }
30164 } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {
30165
30166 // The range starts and ends in the low surrogate range.
30167 // E.g. (0xDCFF, 0xDDFF).
30168 if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
30169 loneLowSurrogates.push(start, end + 1);
30170 }
30171
30172 // The range starts in the low surrogate range and ends after the low
30173 // surrogate range. E.g. (0xDCFF, 0x10FFFF).
30174 if (end > LOW_SURROGATE_MAX) {
30175 loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);
30176 if (end <= 0xFFFF) {
30177 bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
30178 } else {
30179 bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
30180 astral.push(0xFFFF + 1, end + 1);
30181 }
30182 }
30183 } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {
30184
30185 // The range starts and ends after the low surrogate range.
30186 // E.g. (0xFFAA, 0x10FFFF).
30187 if (end <= 0xFFFF) {
30188 bmp.push(start, end + 1);
30189 } else {
30190 bmp.push(start, 0xFFFF + 1);
30191 astral.push(0xFFFF + 1, end + 1);
30192 }
30193 } else {
30194
30195 // The range starts and ends in the astral range.
30196 astral.push(start, end + 1);
30197 }
30198
30199 index += 2;
30200 }
30201 return {
30202 'loneHighSurrogates': loneHighSurrogates,
30203 'loneLowSurrogates': loneLowSurrogates,
30204 'bmp': bmp,
30205 'astral': astral
30206 };
30207 };
30208
30209 var optimizeSurrogateMappings = function optimizeSurrogateMappings(surrogateMappings) {
30210 var result = [];
30211 var tmpLow = [];
30212 var addLow = false;
30213 var mapping;
30214 var nextMapping;
30215 var highSurrogates;
30216 var lowSurrogates;
30217 var nextHighSurrogates;
30218 var nextLowSurrogates;
30219 var index = -1;
30220 var length = surrogateMappings.length;
30221 while (++index < length) {
30222 mapping = surrogateMappings[index];
30223 nextMapping = surrogateMappings[index + 1];
30224 if (!nextMapping) {
30225 result.push(mapping);
30226 continue;
30227 }
30228 highSurrogates = mapping[0];
30229 lowSurrogates = mapping[1];
30230 nextHighSurrogates = nextMapping[0];
30231 nextLowSurrogates = nextMapping[1];
30232
30233 // Check for identical high surrogate ranges.
30234 tmpLow = lowSurrogates;
30235 while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) {
30236 // Merge with the next item.
30237 if (dataIsSingleton(nextLowSurrogates)) {
30238 tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);
30239 } else {
30240 tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1);
30241 }
30242 ++index;
30243 mapping = surrogateMappings[index];
30244 highSurrogates = mapping[0];
30245 lowSurrogates = mapping[1];
30246 nextMapping = surrogateMappings[index + 1];
30247 nextHighSurrogates = nextMapping && nextMapping[0];
30248 nextLowSurrogates = nextMapping && nextMapping[1];
30249 addLow = true;
30250 }
30251 result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]);
30252 addLow = false;
30253 }
30254 return optimizeByLowSurrogates(result);
30255 };
30256
30257 var optimizeByLowSurrogates = function optimizeByLowSurrogates(surrogateMappings) {
30258 if (surrogateMappings.length == 1) {
30259 return surrogateMappings;
30260 }
30261 var index = -1;
30262 var innerIndex = -1;
30263 while (++index < surrogateMappings.length) {
30264 var mapping = surrogateMappings[index];
30265 var lowSurrogates = mapping[1];
30266 var lowSurrogateStart = lowSurrogates[0];
30267 var lowSurrogateEnd = lowSurrogates[1];
30268 innerIndex = index; // Note: the loop starts at the next index.
30269 while (++innerIndex < surrogateMappings.length) {
30270 var otherMapping = surrogateMappings[innerIndex];
30271 var otherLowSurrogates = otherMapping[1];
30272 var otherLowSurrogateStart = otherLowSurrogates[0];
30273 var otherLowSurrogateEnd = otherLowSurrogates[1];
30274 if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd) {
30275 // Add the code points in the other item to this one.
30276 if (dataIsSingleton(otherMapping[0])) {
30277 mapping[0] = dataAdd(mapping[0], otherMapping[0][0]);
30278 } else {
30279 mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1);
30280 }
30281 // Remove the other, now redundant, item.
30282 surrogateMappings.splice(innerIndex, 1);
30283 --innerIndex;
30284 }
30285 }
30286 }
30287 return surrogateMappings;
30288 };
30289
30290 var surrogateSet = function surrogateSet(data) {
30291 // Exit early if `data` is an empty set.
30292 if (!data.length) {
30293 return [];
30294 }
30295
30296 // Iterate over the data per `(start, end)` pair.
30297 var index = 0;
30298 var start;
30299 var end;
30300 var startHigh;
30301 var startLow;
30302 var endHigh;
30303 var endLow;
30304 var surrogateMappings = [];
30305 var length = data.length;
30306 while (index < length) {
30307 start = data[index];
30308 end = data[index + 1] - 1;
30309
30310 startHigh = highSurrogate(start);
30311 startLow = lowSurrogate(start);
30312 endHigh = highSurrogate(end);
30313 endLow = lowSurrogate(end);
30314
30315 var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;
30316 var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;
30317 var complete = false;
30318
30319 // Append the previous high-surrogate-to-low-surrogate mappings.
30320 // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`.
30321 if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) {
30322 surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]);
30323 complete = true;
30324 } else {
30325 surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]);
30326 }
30327
30328 // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to
30329 // `(endHigh - 1, LOW_SURROGATE_MAX)`.
30330 if (!complete && startHigh + 1 < endHigh) {
30331 if (endsWithHighestLowSurrogate) {
30332 // Combine step 2 and step 3.
30333 surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
30334 complete = true;
30335 } else {
30336 surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]);
30337 }
30338 }
30339
30340 // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`.
30341 if (!complete) {
30342 surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
30343 }
30344
30345 index += 2;
30346 }
30347
30348 // The format of `surrogateMappings` is as follows:
30349 //
30350 // [ surrogateMapping1, surrogateMapping2 ]
30351 //
30352 // i.e.:
30353 //
30354 // [
30355 // [ highSurrogates1, lowSurrogates1 ],
30356 // [ highSurrogates2, lowSurrogates2 ]
30357 // ]
30358 return optimizeSurrogateMappings(surrogateMappings);
30359 };
30360
30361 var createSurrogateCharacterClasses = function createSurrogateCharacterClasses(surrogateMappings) {
30362 var result = [];
30363 forEach(surrogateMappings, function (surrogateMapping) {
30364 var highSurrogates = surrogateMapping[0];
30365 var lowSurrogates = surrogateMapping[1];
30366 result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates));
30367 });
30368 return result.join('|');
30369 };
30370
30371 var createCharacterClassesFromData = function createCharacterClassesFromData(data, bmpOnly, hasUnicodeFlag) {
30372 if (hasUnicodeFlag) {
30373 return createUnicodeCharacterClasses(data);
30374 }
30375 var result = [];
30376
30377 var parts = splitAtBMP(data);
30378 var loneHighSurrogates = parts.loneHighSurrogates;
30379 var loneLowSurrogates = parts.loneLowSurrogates;
30380 var bmp = parts.bmp;
30381 var astral = parts.astral;
30382 var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);
30383 var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);
30384
30385 var surrogateMappings = surrogateSet(astral);
30386
30387 if (bmpOnly) {
30388 bmp = dataAddData(bmp, loneHighSurrogates);
30389 hasLoneHighSurrogates = false;
30390 bmp = dataAddData(bmp, loneLowSurrogates);
30391 hasLoneLowSurrogates = false;
30392 }
30393
30394 if (!dataIsEmpty(bmp)) {
30395 // The data set contains BMP code points that are not high surrogates
30396 // needed for astral code points in the set.
30397 result.push(createBMPCharacterClasses(bmp));
30398 }
30399 if (surrogateMappings.length) {
30400 // The data set contains astral code points; append character classes
30401 // based on their surrogate pairs.
30402 result.push(createSurrogateCharacterClasses(surrogateMappings));
30403 }
30404 // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860
30405 if (hasLoneHighSurrogates) {
30406 result.push(createBMPCharacterClasses(loneHighSurrogates) +
30407 // Make sure the high surrogates aren’t part of a surrogate pair.
30408 '(?![\\uDC00-\\uDFFF])');
30409 }
30410 if (hasLoneLowSurrogates) {
30411 result.push(
30412 // It is not possible to accurately assert the low surrogates aren’t
30413 // part of a surrogate pair, since JavaScript regular expressions do
30414 // not support lookbehind.
30415 '(?:[^\\uD800-\\uDBFF]|^)' + createBMPCharacterClasses(loneLowSurrogates));
30416 }
30417 return result.join('|');
30418 };
30419
30420 /*--------------------------------------------------------------------------*/
30421
30422 // `regenerate` can be used as a constructor (and new methods can be added to
30423 // its prototype) but also as a regular function, the latter of which is the
30424 // documented and most common usage. For that reason, it’s not capitalized.
30425 var regenerate = function regenerate(value) {
30426 if (arguments.length > 1) {
30427 value = slice.call(arguments);
30428 }
30429 if (this instanceof regenerate) {
30430 this.data = [];
30431 return value ? this.add(value) : this;
30432 }
30433 return new regenerate().add(value);
30434 };
30435
30436 regenerate.version = '1.3.2';
30437
30438 var proto = regenerate.prototype;
30439 extend(proto, {
30440 'add': function add(value) {
30441 var $this = this;
30442 if (value == null) {
30443 return $this;
30444 }
30445 if (value instanceof regenerate) {
30446 // Allow passing other Regenerate instances.
30447 $this.data = dataAddData($this.data, value.data);
30448 return $this;
30449 }
30450 if (arguments.length > 1) {
30451 value = slice.call(arguments);
30452 }
30453 if (isArray(value)) {
30454 forEach(value, function (item) {
30455 $this.add(item);
30456 });
30457 return $this;
30458 }
30459 $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value));
30460 return $this;
30461 },
30462 'remove': function remove(value) {
30463 var $this = this;
30464 if (value == null) {
30465 return $this;
30466 }
30467 if (value instanceof regenerate) {
30468 // Allow passing other Regenerate instances.
30469 $this.data = dataRemoveData($this.data, value.data);
30470 return $this;
30471 }
30472 if (arguments.length > 1) {
30473 value = slice.call(arguments);
30474 }
30475 if (isArray(value)) {
30476 forEach(value, function (item) {
30477 $this.remove(item);
30478 });
30479 return $this;
30480 }
30481 $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value));
30482 return $this;
30483 },
30484 'addRange': function addRange(start, end) {
30485 var $this = this;
30486 $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end));
30487 return $this;
30488 },
30489 'removeRange': function removeRange(start, end) {
30490 var $this = this;
30491 var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);
30492 var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);
30493 $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint);
30494 return $this;
30495 },
30496 'intersection': function intersection(argument) {
30497 var $this = this;
30498 // Allow passing other Regenerate instances.
30499 // TODO: Optimize this by writing and using `dataIntersectionData()`.
30500 var array = argument instanceof regenerate ? dataToArray(argument.data) : argument;
30501 $this.data = dataIntersection($this.data, array);
30502 return $this;
30503 },
30504 'contains': function contains(codePoint) {
30505 return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint));
30506 },
30507 'clone': function clone() {
30508 var set = new regenerate();
30509 set.data = this.data.slice(0);
30510 return set;
30511 },
30512 'toString': function toString(options) {
30513 var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false);
30514 if (!result) {
30515 // For an empty set, return something that can be inserted `/here/` to
30516 // form a valid regular expression. Avoid `(?:)` since that matches the
30517 // empty string.
30518 return '[]';
30519 }
30520 // Use `\0` instead of `\x00` where possible.
30521 return result.replace(regexNull, '\\0$1');
30522 },
30523 'toRegExp': function toRegExp(flags) {
30524 var pattern = this.toString(flags && flags.indexOf('u') != -1 ? { 'hasUnicodeFlag': true } : null);
30525 return RegExp(pattern, flags || '');
30526 },
30527 'valueOf': function valueOf() {
30528 // Note: `valueOf` is aliased as `toArray`.
30529 return dataToArray(this.data);
30530 }
30531 });
30532
30533 proto.toArray = proto.valueOf;
30534
30535 // Some AMD build optimizers, like r.js, check for specific condition patterns
30536 // like the following:
30537 if ("function" == 'function' && _typeof(__webpack_require__(49)) == 'object' && __webpack_require__(49)) {
30538 !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
30539 return regenerate;
30540 }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30541 } else if (freeExports && !freeExports.nodeType) {
30542 if (freeModule) {
30543 // in Node.js, io.js, or RingoJS v0.8.0+
30544 freeModule.exports = regenerate;
30545 } else {
30546 // in Narwhal or RingoJS v0.7.0-
30547 freeExports.regenerate = regenerate;
30548 }
30549 } else {
30550 // in Rhino or a web browser
30551 root.regenerate = regenerate;
30552 }
30553 })(undefined);
30554 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(39)(module), (function() { return this; }())))
30555
30556/***/ }),
30557/* 283 */
30558/***/ (function(module, exports, __webpack_require__) {
30559
30560 "use strict";
30561
30562 var _stringify = __webpack_require__(35);
30563
30564 var _stringify2 = _interopRequireDefault(_stringify);
30565
30566 var _assert = __webpack_require__(64);
30567
30568 var _assert2 = _interopRequireDefault(_assert);
30569
30570 var _babelTypes = __webpack_require__(1);
30571
30572 var t = _interopRequireWildcard(_babelTypes);
30573
30574 var _leap = __webpack_require__(607);
30575
30576 var leap = _interopRequireWildcard(_leap);
30577
30578 var _meta = __webpack_require__(608);
30579
30580 var meta = _interopRequireWildcard(_meta);
30581
30582 var _util = __webpack_require__(116);
30583
30584 var util = _interopRequireWildcard(_util);
30585
30586 function _interopRequireWildcard(obj) {
30587 if (obj && obj.__esModule) {
30588 return obj;
30589 } else {
30590 var newObj = {};if (obj != null) {
30591 for (var key in obj) {
30592 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
30593 }
30594 }newObj.default = obj;return newObj;
30595 }
30596 }
30597
30598 function _interopRequireDefault(obj) {
30599 return obj && obj.__esModule ? obj : { default: obj };
30600 }
30601
30602 var hasOwn = Object.prototype.hasOwnProperty; /**
30603 * Copyright (c) 2014, Facebook, Inc.
30604 * All rights reserved.
30605 *
30606 * This source code is licensed under the BSD-style license found in the
30607 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
30608 * additional grant of patent rights can be found in the PATENTS file in
30609 * the same directory.
30610 */
30611
30612 function Emitter(contextId) {
30613 _assert2.default.ok(this instanceof Emitter);
30614 t.assertIdentifier(contextId);
30615
30616 // Used to generate unique temporary names.
30617 this.nextTempId = 0;
30618
30619 // In order to make sure the context object does not collide with
30620 // anything in the local scope, we might have to rename it, so we
30621 // refer to it symbolically instead of just assuming that it will be
30622 // called "context".
30623 this.contextId = contextId;
30624
30625 // An append-only list of Statements that grows each time this.emit is
30626 // called.
30627 this.listing = [];
30628
30629 // A sparse array whose keys correspond to locations in this.listing
30630 // that have been marked as branch/jump targets.
30631 this.marked = [true];
30632
30633 // The last location will be marked when this.getDispatchLoop is
30634 // called.
30635 this.finalLoc = loc();
30636
30637 // A list of all leap.TryEntry statements emitted.
30638 this.tryEntries = [];
30639
30640 // Each time we evaluate the body of a loop, we tell this.leapManager
30641 // to enter a nested loop context that determines the meaning of break
30642 // and continue statements therein.
30643 this.leapManager = new leap.LeapManager(this);
30644 }
30645
30646 var Ep = Emitter.prototype;
30647 exports.Emitter = Emitter;
30648
30649 // Offsets into this.listing that could be used as targets for branches or
30650 // jumps are represented as numeric Literal nodes. This representation has
30651 // the amazingly convenient benefit of allowing the exact value of the
30652 // location to be determined at any time, even after generating code that
30653 // refers to the location.
30654 function loc() {
30655 return t.numericLiteral(-1);
30656 }
30657
30658 // Sets the exact value of the given location to the offset of the next
30659 // Statement emitted.
30660 Ep.mark = function (loc) {
30661 t.assertLiteral(loc);
30662 var index = this.listing.length;
30663 if (loc.value === -1) {
30664 loc.value = index;
30665 } else {
30666 // Locations can be marked redundantly, but their values cannot change
30667 // once set the first time.
30668 _assert2.default.strictEqual(loc.value, index);
30669 }
30670 this.marked[index] = true;
30671 return loc;
30672 };
30673
30674 Ep.emit = function (node) {
30675 if (t.isExpression(node)) {
30676 node = t.expressionStatement(node);
30677 }
30678
30679 t.assertStatement(node);
30680 this.listing.push(node);
30681 };
30682
30683 // Shorthand for emitting assignment statements. This will come in handy
30684 // for assignments to temporary variables.
30685 Ep.emitAssign = function (lhs, rhs) {
30686 this.emit(this.assign(lhs, rhs));
30687 return lhs;
30688 };
30689
30690 // Shorthand for an assignment statement.
30691 Ep.assign = function (lhs, rhs) {
30692 return t.expressionStatement(t.assignmentExpression("=", lhs, rhs));
30693 };
30694
30695 // Convenience function for generating expressions like context.next,
30696 // context.sent, and context.rval.
30697 Ep.contextProperty = function (name, computed) {
30698 return t.memberExpression(this.contextId, computed ? t.stringLiteral(name) : t.identifier(name), !!computed);
30699 };
30700
30701 // Shorthand for setting context.rval and jumping to `context.stop()`.
30702 Ep.stop = function (rval) {
30703 if (rval) {
30704 this.setReturnValue(rval);
30705 }
30706
30707 this.jump(this.finalLoc);
30708 };
30709
30710 Ep.setReturnValue = function (valuePath) {
30711 t.assertExpression(valuePath.value);
30712
30713 this.emitAssign(this.contextProperty("rval"), this.explodeExpression(valuePath));
30714 };
30715
30716 Ep.clearPendingException = function (tryLoc, assignee) {
30717 t.assertLiteral(tryLoc);
30718
30719 var catchCall = t.callExpression(this.contextProperty("catch", true), [tryLoc]);
30720
30721 if (assignee) {
30722 this.emitAssign(assignee, catchCall);
30723 } else {
30724 this.emit(catchCall);
30725 }
30726 };
30727
30728 // Emits code for an unconditional jump to the given location, even if the
30729 // exact value of the location is not yet known.
30730 Ep.jump = function (toLoc) {
30731 this.emitAssign(this.contextProperty("next"), toLoc);
30732 this.emit(t.breakStatement());
30733 };
30734
30735 // Conditional jump.
30736 Ep.jumpIf = function (test, toLoc) {
30737 t.assertExpression(test);
30738 t.assertLiteral(toLoc);
30739
30740 this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
30741 };
30742
30743 // Conditional jump, with the condition negated.
30744 Ep.jumpIfNot = function (test, toLoc) {
30745 t.assertExpression(test);
30746 t.assertLiteral(toLoc);
30747
30748 var negatedTest = void 0;
30749 if (t.isUnaryExpression(test) && test.operator === "!") {
30750 // Avoid double negation.
30751 negatedTest = test.argument;
30752 } else {
30753 negatedTest = t.unaryExpression("!", test);
30754 }
30755
30756 this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
30757 };
30758
30759 // Returns a unique MemberExpression that can be used to store and
30760 // retrieve temporary values. Since the object of the member expression is
30761 // the context object, which is presumed to coexist peacefully with all
30762 // other local variables, and since we just increment `nextTempId`
30763 // monotonically, uniqueness is assured.
30764 Ep.makeTempVar = function () {
30765 return this.contextProperty("t" + this.nextTempId++);
30766 };
30767
30768 Ep.getContextFunction = function (id) {
30769 return t.functionExpression(id || null /*Anonymous*/
30770 , [this.contextId], t.blockStatement([this.getDispatchLoop()]), false, // Not a generator anymore!
30771 false // Nor an expression.
30772 );
30773 };
30774
30775 // Turns this.listing into a loop of the form
30776 //
30777 // while (1) switch (context.next) {
30778 // case 0:
30779 // ...
30780 // case n:
30781 // return context.stop();
30782 // }
30783 //
30784 // Each marked location in this.listing will correspond to one generated
30785 // case statement.
30786 Ep.getDispatchLoop = function () {
30787 var self = this;
30788 var cases = [];
30789 var current = void 0;
30790
30791 // If we encounter a break, continue, or return statement in a switch
30792 // case, we can skip the rest of the statements until the next case.
30793 var alreadyEnded = false;
30794
30795 self.listing.forEach(function (stmt, i) {
30796 if (self.marked.hasOwnProperty(i)) {
30797 cases.push(t.switchCase(t.numericLiteral(i), current = []));
30798 alreadyEnded = false;
30799 }
30800
30801 if (!alreadyEnded) {
30802 current.push(stmt);
30803 if (t.isCompletionStatement(stmt)) alreadyEnded = true;
30804 }
30805 });
30806
30807 // Now that we know how many statements there will be in this.listing,
30808 // we can finally resolve this.finalLoc.value.
30809 this.finalLoc.value = this.listing.length;
30810
30811 cases.push(t.switchCase(this.finalLoc, [
30812 // Intentionally fall through to the "end" case...
30813 ]),
30814
30815 // So that the runtime can jump to the final location without having
30816 // to know its offset, we provide the "end" case as a synonym.
30817 t.switchCase(t.stringLiteral("end"), [
30818 // This will check/clear both context.thrown and context.rval.
30819 t.returnStatement(t.callExpression(this.contextProperty("stop"), []))]));
30820
30821 return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression("=", this.contextProperty("prev"), this.contextProperty("next")), cases));
30822 };
30823
30824 Ep.getTryLocsList = function () {
30825 if (this.tryEntries.length === 0) {
30826 // To avoid adding a needless [] to the majority of runtime.wrap
30827 // argument lists, force the caller to handle this case specially.
30828 return null;
30829 }
30830
30831 var lastLocValue = 0;
30832
30833 return t.arrayExpression(this.tryEntries.map(function (tryEntry) {
30834 var thisLocValue = tryEntry.firstLoc.value;
30835 _assert2.default.ok(thisLocValue >= lastLocValue, "try entries out of order");
30836 lastLocValue = thisLocValue;
30837
30838 var ce = tryEntry.catchEntry;
30839 var fe = tryEntry.finallyEntry;
30840
30841 var locs = [tryEntry.firstLoc,
30842 // The null here makes a hole in the array.
30843 ce ? ce.firstLoc : null];
30844
30845 if (fe) {
30846 locs[2] = fe.firstLoc;
30847 locs[3] = fe.afterLoc;
30848 }
30849
30850 return t.arrayExpression(locs);
30851 }));
30852 };
30853
30854 // All side effects must be realized in order.
30855
30856 // If any subexpression harbors a leap, all subexpressions must be
30857 // neutered of side effects.
30858
30859 // No destructive modification of AST nodes.
30860
30861 Ep.explode = function (path, ignoreResult) {
30862 var node = path.node;
30863 var self = this;
30864
30865 t.assertNode(node);
30866
30867 if (t.isDeclaration(node)) throw getDeclError(node);
30868
30869 if (t.isStatement(node)) return self.explodeStatement(path);
30870
30871 if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult);
30872
30873 switch (node.type) {
30874 case "Program":
30875 return path.get("body").map(self.explodeStatement, self);
30876
30877 case "VariableDeclarator":
30878 throw getDeclError(node);
30879
30880 // These node types should be handled by their parent nodes
30881 // (ObjectExpression, SwitchStatement, and TryStatement, respectively).
30882 case "Property":
30883 case "SwitchCase":
30884 case "CatchClause":
30885 throw new Error(node.type + " nodes should be handled by their parents");
30886
30887 default:
30888 throw new Error("unknown Node of type " + (0, _stringify2.default)(node.type));
30889 }
30890 };
30891
30892 function getDeclError(node) {
30893 return new Error("all declarations should have been transformed into " + "assignments before the Exploder began its work: " + (0, _stringify2.default)(node));
30894 }
30895
30896 Ep.explodeStatement = function (path, labelId) {
30897 var stmt = path.node;
30898 var self = this;
30899 var before = void 0,
30900 after = void 0,
30901 head = void 0;
30902
30903 t.assertStatement(stmt);
30904
30905 if (labelId) {
30906 t.assertIdentifier(labelId);
30907 } else {
30908 labelId = null;
30909 }
30910
30911 // Explode BlockStatement nodes even if they do not contain a yield,
30912 // because we don't want or need the curly braces.
30913 if (t.isBlockStatement(stmt)) {
30914 path.get("body").forEach(function (path) {
30915 self.explodeStatement(path);
30916 });
30917 return;
30918 }
30919
30920 if (!meta.containsLeap(stmt)) {
30921 // Technically we should be able to avoid emitting the statement
30922 // altogether if !meta.hasSideEffects(stmt), but that leads to
30923 // confusing generated code (for instance, `while (true) {}` just
30924 // disappears) and is probably a more appropriate job for a dedicated
30925 // dead code elimination pass.
30926 self.emit(stmt);
30927 return;
30928 }
30929
30930 switch (stmt.type) {
30931 case "ExpressionStatement":
30932 self.explodeExpression(path.get("expression"), true);
30933 break;
30934
30935 case "LabeledStatement":
30936 after = loc();
30937
30938 // Did you know you can break from any labeled block statement or
30939 // control structure? Well, you can! Note: when a labeled loop is
30940 // encountered, the leap.LabeledEntry created here will immediately
30941 // enclose a leap.LoopEntry on the leap manager's stack, and both
30942 // entries will have the same label. Though this works just fine, it
30943 // may seem a bit redundant. In theory, we could check here to
30944 // determine if stmt knows how to handle its own label; for example,
30945 // stmt happens to be a WhileStatement and so we know it's going to
30946 // establish its own LoopEntry when we explode it (below). Then this
30947 // LabeledEntry would be unnecessary. Alternatively, we might be
30948 // tempted not to pass stmt.label down into self.explodeStatement,
30949 // because we've handled the label here, but that's a mistake because
30950 // labeled loops may contain labeled continue statements, which is not
30951 // something we can handle in this generic case. All in all, I think a
30952 // little redundancy greatly simplifies the logic of this case, since
30953 // it's clear that we handle all possible LabeledStatements correctly
30954 // here, regardless of whether they interact with the leap manager
30955 // themselves. Also remember that labels and break/continue-to-label
30956 // statements are rare, and all of this logic happens at transform
30957 // time, so it has no additional runtime cost.
30958 self.leapManager.withEntry(new leap.LabeledEntry(after, stmt.label), function () {
30959 self.explodeStatement(path.get("body"), stmt.label);
30960 });
30961
30962 self.mark(after);
30963
30964 break;
30965
30966 case "WhileStatement":
30967 before = loc();
30968 after = loc();
30969
30970 self.mark(before);
30971 self.jumpIfNot(self.explodeExpression(path.get("test")), after);
30972 self.leapManager.withEntry(new leap.LoopEntry(after, before, labelId), function () {
30973 self.explodeStatement(path.get("body"));
30974 });
30975 self.jump(before);
30976 self.mark(after);
30977
30978 break;
30979
30980 case "DoWhileStatement":
30981 var first = loc();
30982 var test = loc();
30983 after = loc();
30984
30985 self.mark(first);
30986 self.leapManager.withEntry(new leap.LoopEntry(after, test, labelId), function () {
30987 self.explode(path.get("body"));
30988 });
30989 self.mark(test);
30990 self.jumpIf(self.explodeExpression(path.get("test")), first);
30991 self.mark(after);
30992
30993 break;
30994
30995 case "ForStatement":
30996 head = loc();
30997 var update = loc();
30998 after = loc();
30999
31000 if (stmt.init) {
31001 // We pass true here to indicate that if stmt.init is an expression
31002 // then we do not care about its result.
31003 self.explode(path.get("init"), true);
31004 }
31005
31006 self.mark(head);
31007
31008 if (stmt.test) {
31009 self.jumpIfNot(self.explodeExpression(path.get("test")), after);
31010 } else {
31011 // No test means continue unconditionally.
31012 }
31013
31014 self.leapManager.withEntry(new leap.LoopEntry(after, update, labelId), function () {
31015 self.explodeStatement(path.get("body"));
31016 });
31017
31018 self.mark(update);
31019
31020 if (stmt.update) {
31021 // We pass true here to indicate that if stmt.update is an
31022 // expression then we do not care about its result.
31023 self.explode(path.get("update"), true);
31024 }
31025
31026 self.jump(head);
31027
31028 self.mark(after);
31029
31030 break;
31031
31032 case "TypeCastExpression":
31033 return self.explodeExpression(path.get("expression"));
31034
31035 case "ForInStatement":
31036 head = loc();
31037 after = loc();
31038
31039 var keyIterNextFn = self.makeTempVar();
31040 self.emitAssign(keyIterNextFn, t.callExpression(util.runtimeProperty("keys"), [self.explodeExpression(path.get("right"))]));
31041
31042 self.mark(head);
31043
31044 var keyInfoTmpVar = self.makeTempVar();
31045 self.jumpIf(t.memberExpression(t.assignmentExpression("=", keyInfoTmpVar, t.callExpression(keyIterNextFn, [])), t.identifier("done"), false), after);
31046
31047 self.emitAssign(stmt.left, t.memberExpression(keyInfoTmpVar, t.identifier("value"), false));
31048
31049 self.leapManager.withEntry(new leap.LoopEntry(after, head, labelId), function () {
31050 self.explodeStatement(path.get("body"));
31051 });
31052
31053 self.jump(head);
31054
31055 self.mark(after);
31056
31057 break;
31058
31059 case "BreakStatement":
31060 self.emitAbruptCompletion({
31061 type: "break",
31062 target: self.leapManager.getBreakLoc(stmt.label)
31063 });
31064
31065 break;
31066
31067 case "ContinueStatement":
31068 self.emitAbruptCompletion({
31069 type: "continue",
31070 target: self.leapManager.getContinueLoc(stmt.label)
31071 });
31072
31073 break;
31074
31075 case "SwitchStatement":
31076 // Always save the discriminant into a temporary variable in case the
31077 // test expressions overwrite values like context.sent.
31078 var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get("discriminant")));
31079
31080 after = loc();
31081 var defaultLoc = loc();
31082 var condition = defaultLoc;
31083 var caseLocs = [];
31084
31085 // If there are no cases, .cases might be undefined.
31086 var cases = stmt.cases || [];
31087
31088 for (var i = cases.length - 1; i >= 0; --i) {
31089 var c = cases[i];
31090 t.assertSwitchCase(c);
31091
31092 if (c.test) {
31093 condition = t.conditionalExpression(t.binaryExpression("===", disc, c.test), caseLocs[i] = loc(), condition);
31094 } else {
31095 caseLocs[i] = defaultLoc;
31096 }
31097 }
31098
31099 var discriminant = path.get("discriminant");
31100 util.replaceWithOrRemove(discriminant, condition);
31101 self.jump(self.explodeExpression(discriminant));
31102
31103 self.leapManager.withEntry(new leap.SwitchEntry(after), function () {
31104 path.get("cases").forEach(function (casePath) {
31105 var i = casePath.key;
31106 self.mark(caseLocs[i]);
31107
31108 casePath.get("consequent").forEach(function (path) {
31109 self.explodeStatement(path);
31110 });
31111 });
31112 });
31113
31114 self.mark(after);
31115 if (defaultLoc.value === -1) {
31116 self.mark(defaultLoc);
31117 _assert2.default.strictEqual(after.value, defaultLoc.value);
31118 }
31119
31120 break;
31121
31122 case "IfStatement":
31123 var elseLoc = stmt.alternate && loc();
31124 after = loc();
31125
31126 self.jumpIfNot(self.explodeExpression(path.get("test")), elseLoc || after);
31127
31128 self.explodeStatement(path.get("consequent"));
31129
31130 if (elseLoc) {
31131 self.jump(after);
31132 self.mark(elseLoc);
31133 self.explodeStatement(path.get("alternate"));
31134 }
31135
31136 self.mark(after);
31137
31138 break;
31139
31140 case "ReturnStatement":
31141 self.emitAbruptCompletion({
31142 type: "return",
31143 value: self.explodeExpression(path.get("argument"))
31144 });
31145
31146 break;
31147
31148 case "WithStatement":
31149 throw new Error("WithStatement not supported in generator functions.");
31150
31151 case "TryStatement":
31152 after = loc();
31153
31154 var handler = stmt.handler;
31155
31156 var catchLoc = handler && loc();
31157 var catchEntry = catchLoc && new leap.CatchEntry(catchLoc, handler.param);
31158
31159 var finallyLoc = stmt.finalizer && loc();
31160 var finallyEntry = finallyLoc && new leap.FinallyEntry(finallyLoc, after);
31161
31162 var tryEntry = new leap.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry);
31163
31164 self.tryEntries.push(tryEntry);
31165 self.updateContextPrevLoc(tryEntry.firstLoc);
31166
31167 self.leapManager.withEntry(tryEntry, function () {
31168 self.explodeStatement(path.get("block"));
31169
31170 if (catchLoc) {
31171 if (finallyLoc) {
31172 // If we have both a catch block and a finally block, then
31173 // because we emit the catch block first, we need to jump over
31174 // it to the finally block.
31175 self.jump(finallyLoc);
31176 } else {
31177 // If there is no finally block, then we need to jump over the
31178 // catch block to the fall-through location.
31179 self.jump(after);
31180 }
31181
31182 self.updateContextPrevLoc(self.mark(catchLoc));
31183
31184 var bodyPath = path.get("handler.body");
31185 var safeParam = self.makeTempVar();
31186 self.clearPendingException(tryEntry.firstLoc, safeParam);
31187
31188 bodyPath.traverse(catchParamVisitor, {
31189 safeParam: safeParam,
31190 catchParamName: handler.param.name
31191 });
31192
31193 self.leapManager.withEntry(catchEntry, function () {
31194 self.explodeStatement(bodyPath);
31195 });
31196 }
31197
31198 if (finallyLoc) {
31199 self.updateContextPrevLoc(self.mark(finallyLoc));
31200
31201 self.leapManager.withEntry(finallyEntry, function () {
31202 self.explodeStatement(path.get("finalizer"));
31203 });
31204
31205 self.emit(t.returnStatement(t.callExpression(self.contextProperty("finish"), [finallyEntry.firstLoc])));
31206 }
31207 });
31208
31209 self.mark(after);
31210
31211 break;
31212
31213 case "ThrowStatement":
31214 self.emit(t.throwStatement(self.explodeExpression(path.get("argument"))));
31215
31216 break;
31217
31218 default:
31219 throw new Error("unknown Statement of type " + (0, _stringify2.default)(stmt.type));
31220 }
31221 };
31222
31223 var catchParamVisitor = {
31224 Identifier: function Identifier(path, state) {
31225 if (path.node.name === state.catchParamName && util.isReference(path)) {
31226 util.replaceWithOrRemove(path, state.safeParam);
31227 }
31228 },
31229
31230 Scope: function Scope(path, state) {
31231 if (path.scope.hasOwnBinding(state.catchParamName)) {
31232 // Don't descend into nested scopes that shadow the catch
31233 // parameter with their own declarations.
31234 path.skip();
31235 }
31236 }
31237 };
31238
31239 Ep.emitAbruptCompletion = function (record) {
31240 if (!isValidCompletion(record)) {
31241 _assert2.default.ok(false, "invalid completion record: " + (0, _stringify2.default)(record));
31242 }
31243
31244 _assert2.default.notStrictEqual(record.type, "normal", "normal completions are not abrupt");
31245
31246 var abruptArgs = [t.stringLiteral(record.type)];
31247
31248 if (record.type === "break" || record.type === "continue") {
31249 t.assertLiteral(record.target);
31250 abruptArgs[1] = record.target;
31251 } else if (record.type === "return" || record.type === "throw") {
31252 if (record.value) {
31253 t.assertExpression(record.value);
31254 abruptArgs[1] = record.value;
31255 }
31256 }
31257
31258 this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"), abruptArgs)));
31259 };
31260
31261 function isValidCompletion(record) {
31262 var type = record.type;
31263
31264 if (type === "normal") {
31265 return !hasOwn.call(record, "target");
31266 }
31267
31268 if (type === "break" || type === "continue") {
31269 return !hasOwn.call(record, "value") && t.isLiteral(record.target);
31270 }
31271
31272 if (type === "return" || type === "throw") {
31273 return hasOwn.call(record, "value") && !hasOwn.call(record, "target");
31274 }
31275
31276 return false;
31277 }
31278
31279 // Not all offsets into emitter.listing are potential jump targets. For
31280 // example, execution typically falls into the beginning of a try block
31281 // without jumping directly there. This method returns the current offset
31282 // without marking it, so that a switch case will not necessarily be
31283 // generated for this offset (I say "not necessarily" because the same
31284 // location might end up being marked in the process of emitting other
31285 // statements). There's no logical harm in marking such locations as jump
31286 // targets, but minimizing the number of switch cases keeps the generated
31287 // code shorter.
31288 Ep.getUnmarkedCurrentLoc = function () {
31289 return t.numericLiteral(this.listing.length);
31290 };
31291
31292 // The context.prev property takes the value of context.next whenever we
31293 // evaluate the switch statement discriminant, which is generally good
31294 // enough for tracking the last location we jumped to, but sometimes
31295 // context.prev needs to be more precise, such as when we fall
31296 // successfully out of a try block and into a finally block without
31297 // jumping. This method exists to update context.prev to the freshest
31298 // available location. If we were implementing a full interpreter, we
31299 // would know the location of the current instruction with complete
31300 // precision at all times, but we don't have that luxury here, as it would
31301 // be costly and verbose to set context.prev before every statement.
31302 Ep.updateContextPrevLoc = function (loc) {
31303 if (loc) {
31304 t.assertLiteral(loc);
31305
31306 if (loc.value === -1) {
31307 // If an uninitialized location literal was passed in, set its value
31308 // to the current this.listing.length.
31309 loc.value = this.listing.length;
31310 } else {
31311 // Otherwise assert that the location matches the current offset.
31312 _assert2.default.strictEqual(loc.value, this.listing.length);
31313 }
31314 } else {
31315 loc = this.getUnmarkedCurrentLoc();
31316 }
31317
31318 // Make sure context.prev is up to date in case we fell into this try
31319 // statement without jumping to it. TODO Consider avoiding this
31320 // assignment when we know control must have jumped here.
31321 this.emitAssign(this.contextProperty("prev"), loc);
31322 };
31323
31324 Ep.explodeExpression = function (path, ignoreResult) {
31325 var expr = path.node;
31326 if (expr) {
31327 t.assertExpression(expr);
31328 } else {
31329 return expr;
31330 }
31331
31332 var self = this;
31333 var result = void 0; // Used optionally by several cases below.
31334 var after = void 0;
31335
31336 function finish(expr) {
31337 t.assertExpression(expr);
31338 if (ignoreResult) {
31339 self.emit(expr);
31340 } else {
31341 return expr;
31342 }
31343 }
31344
31345 // If the expression does not contain a leap, then we either emit the
31346 // expression as a standalone statement or return it whole.
31347 if (!meta.containsLeap(expr)) {
31348 return finish(expr);
31349 }
31350
31351 // If any child contains a leap (such as a yield or labeled continue or
31352 // break statement), then any sibling subexpressions will almost
31353 // certainly have to be exploded in order to maintain the order of their
31354 // side effects relative to the leaping child(ren).
31355 var hasLeapingChildren = meta.containsLeap.onlyChildren(expr);
31356
31357 // In order to save the rest of explodeExpression from a combinatorial
31358 // trainwreck of special cases, explodeViaTempVar is responsible for
31359 // deciding when a subexpression needs to be "exploded," which is my
31360 // very technical term for emitting the subexpression as an assignment
31361 // to a temporary variable and the substituting the temporary variable
31362 // for the original subexpression. Think of exploded view diagrams, not
31363 // Michael Bay movies. The point of exploding subexpressions is to
31364 // control the precise order in which the generated code realizes the
31365 // side effects of those subexpressions.
31366 function explodeViaTempVar(tempVar, childPath, ignoreChildResult) {
31367 _assert2.default.ok(!ignoreChildResult || !tempVar, "Ignoring the result of a child expression but forcing it to " + "be assigned to a temporary variable?");
31368
31369 var result = self.explodeExpression(childPath, ignoreChildResult);
31370
31371 if (ignoreChildResult) {
31372 // Side effects already emitted above.
31373
31374 } else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) {
31375 // If tempVar was provided, then the result will always be assigned
31376 // to it, even if the result does not otherwise need to be assigned
31377 // to a temporary variable. When no tempVar is provided, we have
31378 // the flexibility to decide whether a temporary variable is really
31379 // necessary. Unfortunately, in general, a temporary variable is
31380 // required whenever any child contains a yield expression, since it
31381 // is difficult to prove (at all, let alone efficiently) whether
31382 // this result would evaluate to the same value before and after the
31383 // yield (see #206). One narrow case where we can prove it doesn't
31384 // matter (and thus we do not need a temporary variable) is when the
31385 // result in question is a Literal value.
31386 result = self.emitAssign(tempVar || self.makeTempVar(), result);
31387 }
31388 return result;
31389 }
31390
31391 // If ignoreResult is true, then we must take full responsibility for
31392 // emitting the expression with all its side effects, and we should not
31393 // return a result.
31394
31395 switch (expr.type) {
31396 case "MemberExpression":
31397 return finish(t.memberExpression(self.explodeExpression(path.get("object")), expr.computed ? explodeViaTempVar(null, path.get("property")) : expr.property, expr.computed));
31398
31399 case "CallExpression":
31400 var calleePath = path.get("callee");
31401 var argsPath = path.get("arguments");
31402
31403 var newCallee = void 0;
31404 var newArgs = [];
31405
31406 var hasLeapingArgs = false;
31407 argsPath.forEach(function (argPath) {
31408 hasLeapingArgs = hasLeapingArgs || meta.containsLeap(argPath.node);
31409 });
31410
31411 if (t.isMemberExpression(calleePath.node)) {
31412 if (hasLeapingArgs) {
31413 // If the arguments of the CallExpression contained any yield
31414 // expressions, then we need to be sure to evaluate the callee
31415 // before evaluating the arguments, but if the callee was a member
31416 // expression, then we must be careful that the object of the
31417 // member expression still gets bound to `this` for the call.
31418
31419 var newObject = explodeViaTempVar(
31420 // Assign the exploded callee.object expression to a temporary
31421 // variable so that we can use it twice without reevaluating it.
31422 self.makeTempVar(), calleePath.get("object"));
31423
31424 var newProperty = calleePath.node.computed ? explodeViaTempVar(null, calleePath.get("property")) : calleePath.node.property;
31425
31426 newArgs.unshift(newObject);
31427
31428 newCallee = t.memberExpression(t.memberExpression(newObject, newProperty, calleePath.node.computed), t.identifier("call"), false);
31429 } else {
31430 newCallee = self.explodeExpression(calleePath);
31431 }
31432 } else {
31433 newCallee = explodeViaTempVar(null, calleePath);
31434
31435 if (t.isMemberExpression(newCallee)) {
31436 // If the callee was not previously a MemberExpression, then the
31437 // CallExpression was "unqualified," meaning its `this` object
31438 // should be the global object. If the exploded expression has
31439 // become a MemberExpression (e.g. a context property, probably a
31440 // temporary variable), then we need to force it to be unqualified
31441 // by using the (0, object.property)(...) trick; otherwise, it
31442 // will receive the object of the MemberExpression as its `this`
31443 // object.
31444 newCallee = t.sequenceExpression([t.numericLiteral(0), newCallee]);
31445 }
31446 }
31447
31448 argsPath.forEach(function (argPath) {
31449 newArgs.push(explodeViaTempVar(null, argPath));
31450 });
31451
31452 return finish(t.callExpression(newCallee, newArgs));
31453
31454 case "NewExpression":
31455 return finish(t.newExpression(explodeViaTempVar(null, path.get("callee")), path.get("arguments").map(function (argPath) {
31456 return explodeViaTempVar(null, argPath);
31457 })));
31458
31459 case "ObjectExpression":
31460 return finish(t.objectExpression(path.get("properties").map(function (propPath) {
31461 if (propPath.isObjectProperty()) {
31462 return t.objectProperty(propPath.node.key, explodeViaTempVar(null, propPath.get("value")), propPath.node.computed);
31463 } else {
31464 return propPath.node;
31465 }
31466 })));
31467
31468 case "ArrayExpression":
31469 return finish(t.arrayExpression(path.get("elements").map(function (elemPath) {
31470 return explodeViaTempVar(null, elemPath);
31471 })));
31472
31473 case "SequenceExpression":
31474 var lastIndex = expr.expressions.length - 1;
31475
31476 path.get("expressions").forEach(function (exprPath) {
31477 if (exprPath.key === lastIndex) {
31478 result = self.explodeExpression(exprPath, ignoreResult);
31479 } else {
31480 self.explodeExpression(exprPath, true);
31481 }
31482 });
31483
31484 return result;
31485
31486 case "LogicalExpression":
31487 after = loc();
31488
31489 if (!ignoreResult) {
31490 result = self.makeTempVar();
31491 }
31492
31493 var left = explodeViaTempVar(result, path.get("left"));
31494
31495 if (expr.operator === "&&") {
31496 self.jumpIfNot(left, after);
31497 } else {
31498 _assert2.default.strictEqual(expr.operator, "||");
31499 self.jumpIf(left, after);
31500 }
31501
31502 explodeViaTempVar(result, path.get("right"), ignoreResult);
31503
31504 self.mark(after);
31505
31506 return result;
31507
31508 case "ConditionalExpression":
31509 var elseLoc = loc();
31510 after = loc();
31511 var test = self.explodeExpression(path.get("test"));
31512
31513 self.jumpIfNot(test, elseLoc);
31514
31515 if (!ignoreResult) {
31516 result = self.makeTempVar();
31517 }
31518
31519 explodeViaTempVar(result, path.get("consequent"), ignoreResult);
31520 self.jump(after);
31521
31522 self.mark(elseLoc);
31523 explodeViaTempVar(result, path.get("alternate"), ignoreResult);
31524
31525 self.mark(after);
31526
31527 return result;
31528
31529 case "UnaryExpression":
31530 return finish(t.unaryExpression(expr.operator,
31531 // Can't (and don't need to) break up the syntax of the argument.
31532 // Think about delete a[b].
31533 self.explodeExpression(path.get("argument")), !!expr.prefix));
31534
31535 case "BinaryExpression":
31536 return finish(t.binaryExpression(expr.operator, explodeViaTempVar(null, path.get("left")), explodeViaTempVar(null, path.get("right"))));
31537
31538 case "AssignmentExpression":
31539 return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get("left")), self.explodeExpression(path.get("right"))));
31540
31541 case "UpdateExpression":
31542 return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get("argument")), expr.prefix));
31543
31544 case "YieldExpression":
31545 after = loc();
31546 var arg = expr.argument && self.explodeExpression(path.get("argument"));
31547
31548 if (arg && expr.delegate) {
31549 var _result = self.makeTempVar();
31550
31551 self.emit(t.returnStatement(t.callExpression(self.contextProperty("delegateYield"), [arg, t.stringLiteral(_result.property.name), after])));
31552
31553 self.mark(after);
31554
31555 return _result;
31556 }
31557
31558 self.emitAssign(self.contextProperty("next"), after);
31559 self.emit(t.returnStatement(arg || null));
31560 self.mark(after);
31561
31562 return self.contextProperty("sent");
31563
31564 default:
31565 throw new Error("unknown Expression of type " + (0, _stringify2.default)(expr.type));
31566 }
31567 };
31568
31569/***/ }),
31570/* 284 */
31571/***/ (function(module, exports) {
31572
31573 'use strict';
31574
31575 module.exports = function (str) {
31576 var isExtendedLengthPath = /^\\\\\?\\/.test(str);
31577 var hasNonAscii = /[^\x00-\x80]+/.test(str);
31578
31579 if (isExtendedLengthPath || hasNonAscii) {
31580 return str;
31581 }
31582
31583 return str.replace(/\\/g, '/');
31584 };
31585
31586/***/ }),
31587/* 285 */
31588/***/ (function(module, exports, __webpack_require__) {
31589
31590 'use strict';
31591
31592 /* -*- Mode: js; js-indent-level: 2; -*- */
31593 /*
31594 * Copyright 2011 Mozilla Foundation and contributors
31595 * Licensed under the New BSD license. See LICENSE or:
31596 * http://opensource.org/licenses/BSD-3-Clause
31597 */
31598
31599 var util = __webpack_require__(63);
31600 var has = Object.prototype.hasOwnProperty;
31601
31602 /**
31603 * A data structure which is a combination of an array and a set. Adding a new
31604 * member is O(1), testing for membership is O(1), and finding the index of an
31605 * element is O(1). Removing elements from the set is not supported. Only
31606 * strings are supported for membership.
31607 */
31608 function ArraySet() {
31609 this._array = [];
31610 this._set = Object.create(null);
31611 }
31612
31613 /**
31614 * Static method for creating ArraySet instances from an existing array.
31615 */
31616 ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
31617 var set = new ArraySet();
31618 for (var i = 0, len = aArray.length; i < len; i++) {
31619 set.add(aArray[i], aAllowDuplicates);
31620 }
31621 return set;
31622 };
31623
31624 /**
31625 * Return how many unique items are in this ArraySet. If duplicates have been
31626 * added, than those do not count towards the size.
31627 *
31628 * @returns Number
31629 */
31630 ArraySet.prototype.size = function ArraySet_size() {
31631 return Object.getOwnPropertyNames(this._set).length;
31632 };
31633
31634 /**
31635 * Add the given string to this set.
31636 *
31637 * @param String aStr
31638 */
31639 ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
31640 var sStr = util.toSetString(aStr);
31641 var isDuplicate = has.call(this._set, sStr);
31642 var idx = this._array.length;
31643 if (!isDuplicate || aAllowDuplicates) {
31644 this._array.push(aStr);
31645 }
31646 if (!isDuplicate) {
31647 this._set[sStr] = idx;
31648 }
31649 };
31650
31651 /**
31652 * Is the given string a member of this set?
31653 *
31654 * @param String aStr
31655 */
31656 ArraySet.prototype.has = function ArraySet_has(aStr) {
31657 var sStr = util.toSetString(aStr);
31658 return has.call(this._set, sStr);
31659 };
31660
31661 /**
31662 * What is the index of the given string in the array?
31663 *
31664 * @param String aStr
31665 */
31666 ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
31667 var sStr = util.toSetString(aStr);
31668 if (has.call(this._set, sStr)) {
31669 return this._set[sStr];
31670 }
31671 throw new Error('"' + aStr + '" is not in the set.');
31672 };
31673
31674 /**
31675 * What is the element at the given index?
31676 *
31677 * @param Number aIdx
31678 */
31679 ArraySet.prototype.at = function ArraySet_at(aIdx) {
31680 if (aIdx >= 0 && aIdx < this._array.length) {
31681 return this._array[aIdx];
31682 }
31683 throw new Error('No element indexed by ' + aIdx);
31684 };
31685
31686 /**
31687 * Returns the array representation of this set (which has the proper indices
31688 * indicated by indexOf). Note that this is a copy of the internal array used
31689 * for storing the members so that no one can mess with internal state.
31690 */
31691 ArraySet.prototype.toArray = function ArraySet_toArray() {
31692 return this._array.slice();
31693 };
31694
31695 exports.ArraySet = ArraySet;
31696
31697/***/ }),
31698/* 286 */
31699/***/ (function(module, exports, __webpack_require__) {
31700
31701 "use strict";
31702
31703 /* -*- Mode: js; js-indent-level: 2; -*- */
31704 /*
31705 * Copyright 2011 Mozilla Foundation and contributors
31706 * Licensed under the New BSD license. See LICENSE or:
31707 * http://opensource.org/licenses/BSD-3-Clause
31708 *
31709 * Based on the Base 64 VLQ implementation in Closure Compiler:
31710 * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
31711 *
31712 * Copyright 2011 The Closure Compiler Authors. All rights reserved.
31713 * Redistribution and use in source and binary forms, with or without
31714 * modification, are permitted provided that the following conditions are
31715 * met:
31716 *
31717 * * Redistributions of source code must retain the above copyright
31718 * notice, this list of conditions and the following disclaimer.
31719 * * Redistributions in binary form must reproduce the above
31720 * copyright notice, this list of conditions and the following
31721 * disclaimer in the documentation and/or other materials provided
31722 * with the distribution.
31723 * * Neither the name of Google Inc. nor the names of its
31724 * contributors may be used to endorse or promote products derived
31725 * from this software without specific prior written permission.
31726 *
31727 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31728 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31729 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31730 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31731 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31732 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31733 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31734 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31735 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31736 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31737 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31738 */
31739
31740 var base64 = __webpack_require__(616);
31741
31742 // A single base 64 digit can contain 6 bits of data. For the base 64 variable
31743 // length quantities we use in the source map spec, the first bit is the sign,
31744 // the next four bits are the actual value, and the 6th bit is the
31745 // continuation bit. The continuation bit tells us whether there are more
31746 // digits in this value following this digit.
31747 //
31748 // Continuation
31749 // | Sign
31750 // | |
31751 // V V
31752 // 101011
31753
31754 var VLQ_BASE_SHIFT = 5;
31755
31756 // binary: 100000
31757 var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
31758
31759 // binary: 011111
31760 var VLQ_BASE_MASK = VLQ_BASE - 1;
31761
31762 // binary: 100000
31763 var VLQ_CONTINUATION_BIT = VLQ_BASE;
31764
31765 /**
31766 * Converts from a two-complement value to a value where the sign bit is
31767 * placed in the least significant bit. For example, as decimals:
31768 * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
31769 * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
31770 */
31771 function toVLQSigned(aValue) {
31772 return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
31773 }
31774
31775 /**
31776 * Converts to a two-complement value from a value where the sign bit is
31777 * placed in the least significant bit. For example, as decimals:
31778 * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
31779 * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
31780 */
31781 function fromVLQSigned(aValue) {
31782 var isNegative = (aValue & 1) === 1;
31783 var shifted = aValue >> 1;
31784 return isNegative ? -shifted : shifted;
31785 }
31786
31787 /**
31788 * Returns the base 64 VLQ encoded value.
31789 */
31790 exports.encode = function base64VLQ_encode(aValue) {
31791 var encoded = "";
31792 var digit;
31793
31794 var vlq = toVLQSigned(aValue);
31795
31796 do {
31797 digit = vlq & VLQ_BASE_MASK;
31798 vlq >>>= VLQ_BASE_SHIFT;
31799 if (vlq > 0) {
31800 // There are still more digits in this value, so we must make sure the
31801 // continuation bit is marked.
31802 digit |= VLQ_CONTINUATION_BIT;
31803 }
31804 encoded += base64.encode(digit);
31805 } while (vlq > 0);
31806
31807 return encoded;
31808 };
31809
31810 /**
31811 * Decodes the next base 64 VLQ value from the given string and returns the
31812 * value and the rest of the string via the out parameter.
31813 */
31814 exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
31815 var strLen = aStr.length;
31816 var result = 0;
31817 var shift = 0;
31818 var continuation, digit;
31819
31820 do {
31821 if (aIndex >= strLen) {
31822 throw new Error("Expected more digits in base 64 VLQ value.");
31823 }
31824
31825 digit = base64.decode(aStr.charCodeAt(aIndex++));
31826 if (digit === -1) {
31827 throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
31828 }
31829
31830 continuation = !!(digit & VLQ_CONTINUATION_BIT);
31831 digit &= VLQ_BASE_MASK;
31832 result = result + (digit << shift);
31833 shift += VLQ_BASE_SHIFT;
31834 } while (continuation);
31835
31836 aOutParam.value = fromVLQSigned(result);
31837 aOutParam.rest = aIndex;
31838 };
31839
31840/***/ }),
31841/* 287 */
31842/***/ (function(module, exports, __webpack_require__) {
31843
31844 'use strict';
31845
31846 /* -*- Mode: js; js-indent-level: 2; -*- */
31847 /*
31848 * Copyright 2011 Mozilla Foundation and contributors
31849 * Licensed under the New BSD license. See LICENSE or:
31850 * http://opensource.org/licenses/BSD-3-Clause
31851 */
31852
31853 var base64VLQ = __webpack_require__(286);
31854 var util = __webpack_require__(63);
31855 var ArraySet = __webpack_require__(285).ArraySet;
31856 var MappingList = __webpack_require__(618).MappingList;
31857
31858 /**
31859 * An instance of the SourceMapGenerator represents a source map which is
31860 * being built incrementally. You may pass an object with the following
31861 * properties:
31862 *
31863 * - file: The filename of the generated source.
31864 * - sourceRoot: A root for all relative URLs in this source map.
31865 */
31866 function SourceMapGenerator(aArgs) {
31867 if (!aArgs) {
31868 aArgs = {};
31869 }
31870 this._file = util.getArg(aArgs, 'file', null);
31871 this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
31872 this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
31873 this._sources = new ArraySet();
31874 this._names = new ArraySet();
31875 this._mappings = new MappingList();
31876 this._sourcesContents = null;
31877 }
31878
31879 SourceMapGenerator.prototype._version = 3;
31880
31881 /**
31882 * Creates a new SourceMapGenerator based on a SourceMapConsumer
31883 *
31884 * @param aSourceMapConsumer The SourceMap.
31885 */
31886 SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
31887 var sourceRoot = aSourceMapConsumer.sourceRoot;
31888 var generator = new SourceMapGenerator({
31889 file: aSourceMapConsumer.file,
31890 sourceRoot: sourceRoot
31891 });
31892 aSourceMapConsumer.eachMapping(function (mapping) {
31893 var newMapping = {
31894 generated: {
31895 line: mapping.generatedLine,
31896 column: mapping.generatedColumn
31897 }
31898 };
31899
31900 if (mapping.source != null) {
31901 newMapping.source = mapping.source;
31902 if (sourceRoot != null) {
31903 newMapping.source = util.relative(sourceRoot, newMapping.source);
31904 }
31905
31906 newMapping.original = {
31907 line: mapping.originalLine,
31908 column: mapping.originalColumn
31909 };
31910
31911 if (mapping.name != null) {
31912 newMapping.name = mapping.name;
31913 }
31914 }
31915
31916 generator.addMapping(newMapping);
31917 });
31918 aSourceMapConsumer.sources.forEach(function (sourceFile) {
31919 var content = aSourceMapConsumer.sourceContentFor(sourceFile);
31920 if (content != null) {
31921 generator.setSourceContent(sourceFile, content);
31922 }
31923 });
31924 return generator;
31925 };
31926
31927 /**
31928 * Add a single mapping from original source line and column to the generated
31929 * source's line and column for this source map being created. The mapping
31930 * object should have the following properties:
31931 *
31932 * - generated: An object with the generated line and column positions.
31933 * - original: An object with the original line and column positions.
31934 * - source: The original source file (relative to the sourceRoot).
31935 * - name: An optional original token name for this mapping.
31936 */
31937 SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
31938 var generated = util.getArg(aArgs, 'generated');
31939 var original = util.getArg(aArgs, 'original', null);
31940 var source = util.getArg(aArgs, 'source', null);
31941 var name = util.getArg(aArgs, 'name', null);
31942
31943 if (!this._skipValidation) {
31944 this._validateMapping(generated, original, source, name);
31945 }
31946
31947 if (source != null) {
31948 source = String(source);
31949 if (!this._sources.has(source)) {
31950 this._sources.add(source);
31951 }
31952 }
31953
31954 if (name != null) {
31955 name = String(name);
31956 if (!this._names.has(name)) {
31957 this._names.add(name);
31958 }
31959 }
31960
31961 this._mappings.add({
31962 generatedLine: generated.line,
31963 generatedColumn: generated.column,
31964 originalLine: original != null && original.line,
31965 originalColumn: original != null && original.column,
31966 source: source,
31967 name: name
31968 });
31969 };
31970
31971 /**
31972 * Set the source content for a source file.
31973 */
31974 SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
31975 var source = aSourceFile;
31976 if (this._sourceRoot != null) {
31977 source = util.relative(this._sourceRoot, source);
31978 }
31979
31980 if (aSourceContent != null) {
31981 // Add the source content to the _sourcesContents map.
31982 // Create a new _sourcesContents map if the property is null.
31983 if (!this._sourcesContents) {
31984 this._sourcesContents = Object.create(null);
31985 }
31986 this._sourcesContents[util.toSetString(source)] = aSourceContent;
31987 } else if (this._sourcesContents) {
31988 // Remove the source file from the _sourcesContents map.
31989 // If the _sourcesContents map is empty, set the property to null.
31990 delete this._sourcesContents[util.toSetString(source)];
31991 if (Object.keys(this._sourcesContents).length === 0) {
31992 this._sourcesContents = null;
31993 }
31994 }
31995 };
31996
31997 /**
31998 * Applies the mappings of a sub-source-map for a specific source file to the
31999 * source map being generated. Each mapping to the supplied source file is
32000 * rewritten using the supplied source map. Note: The resolution for the
32001 * resulting mappings is the minimium of this map and the supplied map.
32002 *
32003 * @param aSourceMapConsumer The source map to be applied.
32004 * @param aSourceFile Optional. The filename of the source file.
32005 * If omitted, SourceMapConsumer's file property will be used.
32006 * @param aSourceMapPath Optional. The dirname of the path to the source map
32007 * to be applied. If relative, it is relative to the SourceMapConsumer.
32008 * This parameter is needed when the two source maps aren't in the same
32009 * directory, and the source map to be applied contains relative source
32010 * paths. If so, those relative source paths need to be rewritten
32011 * relative to the SourceMapGenerator.
32012 */
32013 SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
32014 var sourceFile = aSourceFile;
32015 // If aSourceFile is omitted, we will use the file property of the SourceMap
32016 if (aSourceFile == null) {
32017 if (aSourceMapConsumer.file == null) {
32018 throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
32019 }
32020 sourceFile = aSourceMapConsumer.file;
32021 }
32022 var sourceRoot = this._sourceRoot;
32023 // Make "sourceFile" relative if an absolute Url is passed.
32024 if (sourceRoot != null) {
32025 sourceFile = util.relative(sourceRoot, sourceFile);
32026 }
32027 // Applying the SourceMap can add and remove items from the sources and
32028 // the names array.
32029 var newSources = new ArraySet();
32030 var newNames = new ArraySet();
32031
32032 // Find mappings for the "sourceFile"
32033 this._mappings.unsortedForEach(function (mapping) {
32034 if (mapping.source === sourceFile && mapping.originalLine != null) {
32035 // Check if it can be mapped by the source map, then update the mapping.
32036 var original = aSourceMapConsumer.originalPositionFor({
32037 line: mapping.originalLine,
32038 column: mapping.originalColumn
32039 });
32040 if (original.source != null) {
32041 // Copy mapping
32042 mapping.source = original.source;
32043 if (aSourceMapPath != null) {
32044 mapping.source = util.join(aSourceMapPath, mapping.source);
32045 }
32046 if (sourceRoot != null) {
32047 mapping.source = util.relative(sourceRoot, mapping.source);
32048 }
32049 mapping.originalLine = original.line;
32050 mapping.originalColumn = original.column;
32051 if (original.name != null) {
32052 mapping.name = original.name;
32053 }
32054 }
32055 }
32056
32057 var source = mapping.source;
32058 if (source != null && !newSources.has(source)) {
32059 newSources.add(source);
32060 }
32061
32062 var name = mapping.name;
32063 if (name != null && !newNames.has(name)) {
32064 newNames.add(name);
32065 }
32066 }, this);
32067 this._sources = newSources;
32068 this._names = newNames;
32069
32070 // Copy sourcesContents of applied map.
32071 aSourceMapConsumer.sources.forEach(function (sourceFile) {
32072 var content = aSourceMapConsumer.sourceContentFor(sourceFile);
32073 if (content != null) {
32074 if (aSourceMapPath != null) {
32075 sourceFile = util.join(aSourceMapPath, sourceFile);
32076 }
32077 if (sourceRoot != null) {
32078 sourceFile = util.relative(sourceRoot, sourceFile);
32079 }
32080 this.setSourceContent(sourceFile, content);
32081 }
32082 }, this);
32083 };
32084
32085 /**
32086 * A mapping can have one of the three levels of data:
32087 *
32088 * 1. Just the generated position.
32089 * 2. The Generated position, original position, and original source.
32090 * 3. Generated and original position, original source, as well as a name
32091 * token.
32092 *
32093 * To maintain consistency, we validate that any new mapping being added falls
32094 * in to one of these categories.
32095 */
32096 SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
32097 if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
32098 // Case 1.
32099 return;
32100 } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
32101 // Cases 2 and 3.
32102 return;
32103 } else {
32104 throw new Error('Invalid mapping: ' + JSON.stringify({
32105 generated: aGenerated,
32106 source: aSource,
32107 original: aOriginal,
32108 name: aName
32109 }));
32110 }
32111 };
32112
32113 /**
32114 * Serialize the accumulated mappings in to the stream of base 64 VLQs
32115 * specified by the source map format.
32116 */
32117 SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
32118 var previousGeneratedColumn = 0;
32119 var previousGeneratedLine = 1;
32120 var previousOriginalColumn = 0;
32121 var previousOriginalLine = 0;
32122 var previousName = 0;
32123 var previousSource = 0;
32124 var result = '';
32125 var next;
32126 var mapping;
32127 var nameIdx;
32128 var sourceIdx;
32129
32130 var mappings = this._mappings.toArray();
32131 for (var i = 0, len = mappings.length; i < len; i++) {
32132 mapping = mappings[i];
32133 next = '';
32134
32135 if (mapping.generatedLine !== previousGeneratedLine) {
32136 previousGeneratedColumn = 0;
32137 while (mapping.generatedLine !== previousGeneratedLine) {
32138 next += ';';
32139 previousGeneratedLine++;
32140 }
32141 } else {
32142 if (i > 0) {
32143 if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
32144 continue;
32145 }
32146 next += ',';
32147 }
32148 }
32149
32150 next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
32151 previousGeneratedColumn = mapping.generatedColumn;
32152
32153 if (mapping.source != null) {
32154 sourceIdx = this._sources.indexOf(mapping.source);
32155 next += base64VLQ.encode(sourceIdx - previousSource);
32156 previousSource = sourceIdx;
32157
32158 // lines are stored 0-based in SourceMap spec version 3
32159 next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
32160 previousOriginalLine = mapping.originalLine - 1;
32161
32162 next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
32163 previousOriginalColumn = mapping.originalColumn;
32164
32165 if (mapping.name != null) {
32166 nameIdx = this._names.indexOf(mapping.name);
32167 next += base64VLQ.encode(nameIdx - previousName);
32168 previousName = nameIdx;
32169 }
32170 }
32171
32172 result += next;
32173 }
32174
32175 return result;
32176 };
32177
32178 SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
32179 return aSources.map(function (source) {
32180 if (!this._sourcesContents) {
32181 return null;
32182 }
32183 if (aSourceRoot != null) {
32184 source = util.relative(aSourceRoot, source);
32185 }
32186 var key = util.toSetString(source);
32187 return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
32188 }, this);
32189 };
32190
32191 /**
32192 * Externalize the source map.
32193 */
32194 SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
32195 var map = {
32196 version: this._version,
32197 sources: this._sources.toArray(),
32198 names: this._names.toArray(),
32199 mappings: this._serializeMappings()
32200 };
32201 if (this._file != null) {
32202 map.file = this._file;
32203 }
32204 if (this._sourceRoot != null) {
32205 map.sourceRoot = this._sourceRoot;
32206 }
32207 if (this._sourcesContents) {
32208 map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
32209 }
32210
32211 return map;
32212 };
32213
32214 /**
32215 * Render the source map being generated to a string.
32216 */
32217 SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
32218 return JSON.stringify(this.toJSON());
32219 };
32220
32221 exports.SourceMapGenerator = SourceMapGenerator;
32222
32223/***/ }),
32224/* 288 */
32225/***/ (function(module, exports, __webpack_require__) {
32226
32227 'use strict';
32228
32229 /*
32230 * Copyright 2009-2011 Mozilla Foundation and contributors
32231 * Licensed under the New BSD license. See LICENSE.txt or:
32232 * http://opensource.org/licenses/BSD-3-Clause
32233 */
32234 exports.SourceMapGenerator = __webpack_require__(287).SourceMapGenerator;
32235 exports.SourceMapConsumer = __webpack_require__(620).SourceMapConsumer;
32236 exports.SourceNode = __webpack_require__(621).SourceNode;
32237
32238/***/ }),
32239/* 289 */
32240/***/ (function(module, exports, __webpack_require__) {
32241
32242 /* WEBPACK VAR INJECTION */(function(module) {'use strict';
32243
32244 function assembleStyles() {
32245 var styles = {
32246 modifiers: {
32247 reset: [0, 0],
32248 bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
32249 dim: [2, 22],
32250 italic: [3, 23],
32251 underline: [4, 24],
32252 inverse: [7, 27],
32253 hidden: [8, 28],
32254 strikethrough: [9, 29]
32255 },
32256 colors: {
32257 black: [30, 39],
32258 red: [31, 39],
32259 green: [32, 39],
32260 yellow: [33, 39],
32261 blue: [34, 39],
32262 magenta: [35, 39],
32263 cyan: [36, 39],
32264 white: [37, 39],
32265 gray: [90, 39]
32266 },
32267 bgColors: {
32268 bgBlack: [40, 49],
32269 bgRed: [41, 49],
32270 bgGreen: [42, 49],
32271 bgYellow: [43, 49],
32272 bgBlue: [44, 49],
32273 bgMagenta: [45, 49],
32274 bgCyan: [46, 49],
32275 bgWhite: [47, 49]
32276 }
32277 };
32278
32279 // fix humans
32280 styles.colors.grey = styles.colors.gray;
32281
32282 Object.keys(styles).forEach(function (groupName) {
32283 var group = styles[groupName];
32284
32285 Object.keys(group).forEach(function (styleName) {
32286 var style = group[styleName];
32287
32288 styles[styleName] = group[styleName] = {
32289 open: '\x1B[' + style[0] + 'm',
32290 close: '\x1B[' + style[1] + 'm'
32291 };
32292 });
32293
32294 Object.defineProperty(styles, groupName, {
32295 value: group,
32296 enumerable: false
32297 });
32298 });
32299
32300 return styles;
32301 }
32302
32303 Object.defineProperty(module, 'exports', {
32304 enumerable: true,
32305 get: assembleStyles
32306 });
32307 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(39)(module)))
32308
32309/***/ }),
32310/* 290 */
32311/***/ (function(module, exports, __webpack_require__) {
32312
32313 "use strict";
32314
32315 module.exports = __webpack_require__(182);
32316
32317/***/ }),
32318/* 291 */
32319/***/ (function(module, exports) {
32320
32321 "use strict";
32322
32323 exports.__esModule = true;
32324 exports.default = getPossiblePluginNames;
32325 function getPossiblePluginNames(pluginName) {
32326 return ["babel-plugin-" + pluginName, pluginName];
32327 }
32328 module.exports = exports["default"];
32329
32330/***/ }),
32331/* 292 */
32332/***/ (function(module, exports) {
32333
32334 "use strict";
32335
32336 exports.__esModule = true;
32337 exports.default = getPossiblePresetNames;
32338 function getPossiblePresetNames(presetName) {
32339 var possibleNames = ["babel-preset-" + presetName, presetName];
32340
32341 var matches = presetName.match(/^(@[^/]+)\/(.+)$/);
32342 if (matches) {
32343 var orgName = matches[1],
32344 presetPath = matches[2];
32345
32346 possibleNames.push(orgName + "/babel-preset-" + presetPath);
32347 }
32348
32349 return possibleNames;
32350 }
32351 module.exports = exports["default"];
32352
32353/***/ }),
32354/* 293 */
32355/***/ (function(module, exports, __webpack_require__) {
32356
32357 "use strict";
32358
32359 exports.__esModule = true;
32360
32361 var _getIterator2 = __webpack_require__(2);
32362
32363 var _getIterator3 = _interopRequireDefault(_getIterator2);
32364
32365 exports.default = function (dest, src) {
32366 if (!dest || !src) return;
32367
32368 return (0, _mergeWith2.default)(dest, src, function (a, b) {
32369 if (b && Array.isArray(a)) {
32370 var newArray = b.slice(0);
32371
32372 for (var _iterator = a, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
32373 var _ref;
32374
32375 if (_isArray) {
32376 if (_i >= _iterator.length) break;
32377 _ref = _iterator[_i++];
32378 } else {
32379 _i = _iterator.next();
32380 if (_i.done) break;
32381 _ref = _i.value;
32382 }
32383
32384 var item = _ref;
32385
32386 if (newArray.indexOf(item) < 0) {
32387 newArray.push(item);
32388 }
32389 }
32390
32391 return newArray;
32392 }
32393 });
32394 };
32395
32396 var _mergeWith = __webpack_require__(590);
32397
32398 var _mergeWith2 = _interopRequireDefault(_mergeWith);
32399
32400 function _interopRequireDefault(obj) {
32401 return obj && obj.__esModule ? obj : { default: obj };
32402 }
32403
32404 module.exports = exports["default"];
32405
32406/***/ }),
32407/* 294 */
32408/***/ (function(module, exports, __webpack_require__) {
32409
32410 "use strict";
32411
32412 exports.__esModule = true;
32413
32414 exports.default = function (ast, comments, tokens) {
32415 if (ast) {
32416 if (ast.type === "Program") {
32417 return t.file(ast, comments || [], tokens || []);
32418 } else if (ast.type === "File") {
32419 return ast;
32420 }
32421 }
32422
32423 throw new Error("Not a valid ast?");
32424 };
32425
32426 var _babelTypes = __webpack_require__(1);
32427
32428 var t = _interopRequireWildcard(_babelTypes);
32429
32430 function _interopRequireWildcard(obj) {
32431 if (obj && obj.__esModule) {
32432 return obj;
32433 } else {
32434 var newObj = {};if (obj != null) {
32435 for (var key in obj) {
32436 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
32437 }
32438 }newObj.default = obj;return newObj;
32439 }
32440 }
32441
32442 module.exports = exports["default"];
32443
32444/***/ }),
32445/* 295 */
32446/***/ (function(module, exports, __webpack_require__) {
32447
32448 "use strict";
32449
32450 exports.__esModule = true;
32451
32452 exports.default = function (whitelist) {
32453 var outputType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "global";
32454
32455 var namespace = t.identifier("babelHelpers");
32456
32457 var builder = function builder(body) {
32458 return buildHelpers(body, namespace, whitelist);
32459 };
32460
32461 var tree = void 0;
32462
32463 var build = {
32464 global: buildGlobal,
32465 umd: buildUmd,
32466 var: buildVar
32467 }[outputType];
32468
32469 if (build) {
32470 tree = build(namespace, builder);
32471 } else {
32472 throw new Error(messages.get("unsupportedOutputType", outputType));
32473 }
32474
32475 return (0, _babelGenerator2.default)(tree).code;
32476 };
32477
32478 var _babelHelpers = __webpack_require__(194);
32479
32480 var helpers = _interopRequireWildcard(_babelHelpers);
32481
32482 var _babelGenerator = __webpack_require__(186);
32483
32484 var _babelGenerator2 = _interopRequireDefault(_babelGenerator);
32485
32486 var _babelMessages = __webpack_require__(20);
32487
32488 var messages = _interopRequireWildcard(_babelMessages);
32489
32490 var _babelTemplate = __webpack_require__(4);
32491
32492 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
32493
32494 var _babelTypes = __webpack_require__(1);
32495
32496 var t = _interopRequireWildcard(_babelTypes);
32497
32498 function _interopRequireDefault(obj) {
32499 return obj && obj.__esModule ? obj : { default: obj };
32500 }
32501
32502 function _interopRequireWildcard(obj) {
32503 if (obj && obj.__esModule) {
32504 return obj;
32505 } else {
32506 var newObj = {};if (obj != null) {
32507 for (var key in obj) {
32508 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
32509 }
32510 }newObj.default = obj;return newObj;
32511 }
32512 }
32513
32514 var buildUmdWrapper = (0, _babelTemplate2.default)("\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n");
32515
32516 function buildGlobal(namespace, builder) {
32517 var body = [];
32518 var container = t.functionExpression(null, [t.identifier("global")], t.blockStatement(body));
32519 var tree = t.program([t.expressionStatement(t.callExpression(container, [helpers.get("selfGlobal")]))]);
32520
32521 body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.assignmentExpression("=", t.memberExpression(t.identifier("global"), namespace), t.objectExpression([])))]));
32522
32523 builder(body);
32524
32525 return tree;
32526 }
32527
32528 function buildUmd(namespace, builder) {
32529 var body = [];
32530 body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.identifier("global"))]));
32531
32532 builder(body);
32533
32534 return t.program([buildUmdWrapper({
32535 FACTORY_PARAMETERS: t.identifier("global"),
32536 BROWSER_ARGUMENTS: t.assignmentExpression("=", t.memberExpression(t.identifier("root"), namespace), t.objectExpression([])),
32537 COMMON_ARGUMENTS: t.identifier("exports"),
32538 AMD_ARGUMENTS: t.arrayExpression([t.stringLiteral("exports")]),
32539 FACTORY_BODY: body,
32540 UMD_ROOT: t.identifier("this")
32541 })]);
32542 }
32543
32544 function buildVar(namespace, builder) {
32545 var body = [];
32546 body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.objectExpression([]))]));
32547 builder(body);
32548 body.push(t.expressionStatement(namespace));
32549 return t.program(body);
32550 }
32551
32552 function buildHelpers(body, namespace, whitelist) {
32553 helpers.list.forEach(function (name) {
32554 if (whitelist && whitelist.indexOf(name) < 0) return;
32555
32556 var key = t.identifier(name);
32557 body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(namespace, key), helpers.get(name))));
32558 });
32559 }
32560 module.exports = exports["default"];
32561
32562/***/ }),
32563/* 296 */
32564/***/ (function(module, exports, __webpack_require__) {
32565
32566 "use strict";
32567
32568 exports.__esModule = true;
32569
32570 var _plugin = __webpack_require__(65);
32571
32572 var _plugin2 = _interopRequireDefault(_plugin);
32573
32574 var _sortBy = __webpack_require__(594);
32575
32576 var _sortBy2 = _interopRequireDefault(_sortBy);
32577
32578 function _interopRequireDefault(obj) {
32579 return obj && obj.__esModule ? obj : { default: obj };
32580 }
32581
32582 exports.default = new _plugin2.default({
32583
32584 name: "internal.blockHoist",
32585
32586 visitor: {
32587 Block: {
32588 exit: function exit(_ref) {
32589 var node = _ref.node;
32590
32591 var hasChange = false;
32592 for (var i = 0; i < node.body.length; i++) {
32593 var bodyNode = node.body[i];
32594 if (bodyNode && bodyNode._blockHoist != null) {
32595 hasChange = true;
32596 break;
32597 }
32598 }
32599 if (!hasChange) return;
32600
32601 node.body = (0, _sortBy2.default)(node.body, function (bodyNode) {
32602 var priority = bodyNode && bodyNode._blockHoist;
32603 if (priority == null) priority = 1;
32604 if (priority === true) priority = 2;
32605
32606 return -1 * priority;
32607 });
32608 }
32609 }
32610 }
32611 });
32612 module.exports = exports["default"];
32613
32614/***/ }),
32615/* 297 */
32616/***/ (function(module, exports, __webpack_require__) {
32617
32618 "use strict";
32619
32620 exports.__esModule = true;
32621
32622 var _symbol = __webpack_require__(10);
32623
32624 var _symbol2 = _interopRequireDefault(_symbol);
32625
32626 var _plugin = __webpack_require__(65);
32627
32628 var _plugin2 = _interopRequireDefault(_plugin);
32629
32630 var _babelTypes = __webpack_require__(1);
32631
32632 var t = _interopRequireWildcard(_babelTypes);
32633
32634 function _interopRequireWildcard(obj) {
32635 if (obj && obj.__esModule) {
32636 return obj;
32637 } else {
32638 var newObj = {};if (obj != null) {
32639 for (var key in obj) {
32640 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
32641 }
32642 }newObj.default = obj;return newObj;
32643 }
32644 }
32645
32646 function _interopRequireDefault(obj) {
32647 return obj && obj.__esModule ? obj : { default: obj };
32648 }
32649
32650 var SUPER_THIS_BOUND = (0, _symbol2.default)("super this bound");
32651
32652 var superVisitor = {
32653 CallExpression: function CallExpression(path) {
32654 if (!path.get("callee").isSuper()) return;
32655
32656 var node = path.node;
32657
32658 if (node[SUPER_THIS_BOUND]) return;
32659 node[SUPER_THIS_BOUND] = true;
32660
32661 path.replaceWith(t.assignmentExpression("=", this.id, node));
32662 }
32663 };
32664
32665 exports.default = new _plugin2.default({
32666 name: "internal.shadowFunctions",
32667
32668 visitor: {
32669 ThisExpression: function ThisExpression(path) {
32670 remap(path, "this");
32671 },
32672 ReferencedIdentifier: function ReferencedIdentifier(path) {
32673 if (path.node.name === "arguments") {
32674 remap(path, "arguments");
32675 }
32676 }
32677 }
32678 });
32679
32680 function shouldShadow(path, shadowPath) {
32681 if (path.is("_forceShadow")) {
32682 return true;
32683 } else {
32684 return shadowPath;
32685 }
32686 }
32687
32688 function remap(path, key) {
32689 var shadowPath = path.inShadow(key);
32690 if (!shouldShadow(path, shadowPath)) return;
32691
32692 var shadowFunction = path.node._shadowedFunctionLiteral;
32693
32694 var currentFunction = void 0;
32695 var passedShadowFunction = false;
32696
32697 var fnPath = path.find(function (innerPath) {
32698 if (innerPath.parentPath && innerPath.parentPath.isClassProperty() && innerPath.key === "value") {
32699 return true;
32700 }
32701 if (path === innerPath) return false;
32702 if (innerPath.isProgram() || innerPath.isFunction()) {
32703 currentFunction = currentFunction || innerPath;
32704 }
32705
32706 if (innerPath.isProgram()) {
32707 passedShadowFunction = true;
32708
32709 return true;
32710 } else if (innerPath.isFunction() && !innerPath.isArrowFunctionExpression()) {
32711 if (shadowFunction) {
32712 if (innerPath === shadowFunction || innerPath.node === shadowFunction.node) return true;
32713 } else {
32714 if (!innerPath.is("shadow")) return true;
32715 }
32716
32717 passedShadowFunction = true;
32718 return false;
32719 }
32720
32721 return false;
32722 });
32723
32724 if (shadowFunction && fnPath.isProgram() && !shadowFunction.isProgram()) {
32725 fnPath = path.findParent(function (p) {
32726 return p.isProgram() || p.isFunction();
32727 });
32728 }
32729
32730 if (fnPath === currentFunction) return;
32731
32732 if (!passedShadowFunction) return;
32733
32734 var cached = fnPath.getData(key);
32735 if (cached) return path.replaceWith(cached);
32736
32737 var id = path.scope.generateUidIdentifier(key);
32738
32739 fnPath.setData(key, id);
32740
32741 var classPath = fnPath.findParent(function (p) {
32742 return p.isClass();
32743 });
32744 var hasSuperClass = !!(classPath && classPath.node && classPath.node.superClass);
32745
32746 if (key === "this" && fnPath.isMethod({ kind: "constructor" }) && hasSuperClass) {
32747 fnPath.scope.push({ id: id });
32748
32749 fnPath.traverse(superVisitor, { id: id });
32750 } else {
32751 var init = key === "this" ? t.thisExpression() : t.identifier(key);
32752
32753 if (shadowFunction) init._shadowedFunctionLiteral = shadowFunction;
32754
32755 fnPath.scope.push({ id: id, init: init });
32756 }
32757
32758 return path.replaceWith(id);
32759 }
32760 module.exports = exports["default"];
32761
32762/***/ }),
32763/* 298 */
32764/***/ (function(module, exports, __webpack_require__) {
32765
32766 "use strict";
32767
32768 exports.__esModule = true;
32769
32770 var _classCallCheck2 = __webpack_require__(3);
32771
32772 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
32773
32774 var _normalizeAst = __webpack_require__(294);
32775
32776 var _normalizeAst2 = _interopRequireDefault(_normalizeAst);
32777
32778 var _plugin = __webpack_require__(65);
32779
32780 var _plugin2 = _interopRequireDefault(_plugin);
32781
32782 var _file = __webpack_require__(50);
32783
32784 var _file2 = _interopRequireDefault(_file);
32785
32786 function _interopRequireDefault(obj) {
32787 return obj && obj.__esModule ? obj : { default: obj };
32788 }
32789
32790 var Pipeline = function () {
32791 function Pipeline() {
32792 (0, _classCallCheck3.default)(this, Pipeline);
32793 }
32794
32795 Pipeline.prototype.lint = function lint(code) {
32796 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
32797
32798 opts.code = false;
32799 opts.mode = "lint";
32800 return this.transform(code, opts);
32801 };
32802
32803 Pipeline.prototype.pretransform = function pretransform(code, opts) {
32804 var file = new _file2.default(opts, this);
32805 return file.wrap(code, function () {
32806 file.addCode(code);
32807 file.parseCode(code);
32808 return file;
32809 });
32810 };
32811
32812 Pipeline.prototype.transform = function transform(code, opts) {
32813 var file = new _file2.default(opts, this);
32814 return file.wrap(code, function () {
32815 file.addCode(code);
32816 file.parseCode(code);
32817 return file.transform();
32818 });
32819 };
32820
32821 Pipeline.prototype.analyse = function analyse(code) {
32822 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
32823 var visitor = arguments[2];
32824
32825 opts.code = false;
32826 if (visitor) {
32827 opts.plugins = opts.plugins || [];
32828 opts.plugins.push(new _plugin2.default({ visitor: visitor }));
32829 }
32830 return this.transform(code, opts).metadata;
32831 };
32832
32833 Pipeline.prototype.transformFromAst = function transformFromAst(ast, code, opts) {
32834 ast = (0, _normalizeAst2.default)(ast);
32835
32836 var file = new _file2.default(opts, this);
32837 return file.wrap(code, function () {
32838 file.addCode(code);
32839 file.addAst(ast);
32840 return file.transform();
32841 });
32842 };
32843
32844 return Pipeline;
32845 }();
32846
32847 exports.default = Pipeline;
32848 module.exports = exports["default"];
32849
32850/***/ }),
32851/* 299 */
32852/***/ (function(module, exports, __webpack_require__) {
32853
32854 "use strict";
32855
32856 exports.__esModule = true;
32857
32858 var _classCallCheck2 = __webpack_require__(3);
32859
32860 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
32861
32862 var _possibleConstructorReturn2 = __webpack_require__(42);
32863
32864 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
32865
32866 var _inherits2 = __webpack_require__(41);
32867
32868 var _inherits3 = _interopRequireDefault(_inherits2);
32869
32870 var _store = __webpack_require__(119);
32871
32872 var _store2 = _interopRequireDefault(_store);
32873
32874 var _file5 = __webpack_require__(50);
32875
32876 var _file6 = _interopRequireDefault(_file5);
32877
32878 function _interopRequireDefault(obj) {
32879 return obj && obj.__esModule ? obj : { default: obj };
32880 }
32881
32882 var PluginPass = function (_Store) {
32883 (0, _inherits3.default)(PluginPass, _Store);
32884
32885 function PluginPass(file, plugin) {
32886 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
32887 (0, _classCallCheck3.default)(this, PluginPass);
32888
32889 var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
32890
32891 _this.plugin = plugin;
32892 _this.key = plugin.key;
32893 _this.file = file;
32894 _this.opts = options;
32895 return _this;
32896 }
32897
32898 PluginPass.prototype.addHelper = function addHelper() {
32899 var _file;
32900
32901 return (_file = this.file).addHelper.apply(_file, arguments);
32902 };
32903
32904 PluginPass.prototype.addImport = function addImport() {
32905 var _file2;
32906
32907 return (_file2 = this.file).addImport.apply(_file2, arguments);
32908 };
32909
32910 PluginPass.prototype.getModuleName = function getModuleName() {
32911 var _file3;
32912
32913 return (_file3 = this.file).getModuleName.apply(_file3, arguments);
32914 };
32915
32916 PluginPass.prototype.buildCodeFrameError = function buildCodeFrameError() {
32917 var _file4;
32918
32919 return (_file4 = this.file).buildCodeFrameError.apply(_file4, arguments);
32920 };
32921
32922 return PluginPass;
32923 }(_store2.default);
32924
32925 exports.default = PluginPass;
32926 module.exports = exports["default"];
32927
32928/***/ }),
32929/* 300 */
32930/***/ (function(module, exports, __webpack_require__) {
32931
32932 "use strict";
32933
32934 exports.__esModule = true;
32935
32936 var _classCallCheck2 = __webpack_require__(3);
32937
32938 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
32939
32940 var _trimRight = __webpack_require__(625);
32941
32942 var _trimRight2 = _interopRequireDefault(_trimRight);
32943
32944 function _interopRequireDefault(obj) {
32945 return obj && obj.__esModule ? obj : { default: obj };
32946 }
32947
32948 var SPACES_RE = /^[ \t]+$/;
32949
32950 var Buffer = function () {
32951 function Buffer(map) {
32952 (0, _classCallCheck3.default)(this, Buffer);
32953 this._map = null;
32954 this._buf = [];
32955 this._last = "";
32956 this._queue = [];
32957 this._position = {
32958 line: 1,
32959 column: 0
32960 };
32961 this._sourcePosition = {
32962 identifierName: null,
32963 line: null,
32964 column: null,
32965 filename: null
32966 };
32967
32968 this._map = map;
32969 }
32970
32971 Buffer.prototype.get = function get() {
32972 this._flush();
32973
32974 var map = this._map;
32975 var result = {
32976 code: (0, _trimRight2.default)(this._buf.join("")),
32977 map: null,
32978 rawMappings: map && map.getRawMappings()
32979 };
32980
32981 if (map) {
32982 Object.defineProperty(result, "map", {
32983 configurable: true,
32984 enumerable: true,
32985 get: function get() {
32986 return this.map = map.get();
32987 },
32988 set: function set(value) {
32989 Object.defineProperty(this, "map", { value: value, writable: true });
32990 }
32991 });
32992 }
32993
32994 return result;
32995 };
32996
32997 Buffer.prototype.append = function append(str) {
32998 this._flush();
32999 var _sourcePosition = this._sourcePosition,
33000 line = _sourcePosition.line,
33001 column = _sourcePosition.column,
33002 filename = _sourcePosition.filename,
33003 identifierName = _sourcePosition.identifierName;
33004
33005 this._append(str, line, column, identifierName, filename);
33006 };
33007
33008 Buffer.prototype.queue = function queue(str) {
33009 if (str === "\n") while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
33010 this._queue.shift();
33011 }var _sourcePosition2 = this._sourcePosition,
33012 line = _sourcePosition2.line,
33013 column = _sourcePosition2.column,
33014 filename = _sourcePosition2.filename,
33015 identifierName = _sourcePosition2.identifierName;
33016
33017 this._queue.unshift([str, line, column, identifierName, filename]);
33018 };
33019
33020 Buffer.prototype._flush = function _flush() {
33021 var item = void 0;
33022 while (item = this._queue.pop()) {
33023 this._append.apply(this, item);
33024 }
33025 };
33026
33027 Buffer.prototype._append = function _append(str, line, column, identifierName, filename) {
33028 if (this._map && str[0] !== "\n") {
33029 this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename);
33030 }
33031
33032 this._buf.push(str);
33033 this._last = str[str.length - 1];
33034
33035 for (var i = 0; i < str.length; i++) {
33036 if (str[i] === "\n") {
33037 this._position.line++;
33038 this._position.column = 0;
33039 } else {
33040 this._position.column++;
33041 }
33042 }
33043 };
33044
33045 Buffer.prototype.removeTrailingNewline = function removeTrailingNewline() {
33046 if (this._queue.length > 0 && this._queue[0][0] === "\n") this._queue.shift();
33047 };
33048
33049 Buffer.prototype.removeLastSemicolon = function removeLastSemicolon() {
33050 if (this._queue.length > 0 && this._queue[0][0] === ";") this._queue.shift();
33051 };
33052
33053 Buffer.prototype.endsWith = function endsWith(suffix) {
33054 if (suffix.length === 1) {
33055 var last = void 0;
33056 if (this._queue.length > 0) {
33057 var str = this._queue[0][0];
33058 last = str[str.length - 1];
33059 } else {
33060 last = this._last;
33061 }
33062
33063 return last === suffix;
33064 }
33065
33066 var end = this._last + this._queue.reduce(function (acc, item) {
33067 return item[0] + acc;
33068 }, "");
33069 if (suffix.length <= end.length) {
33070 return end.slice(-suffix.length) === suffix;
33071 }
33072
33073 return false;
33074 };
33075
33076 Buffer.prototype.hasContent = function hasContent() {
33077 return this._queue.length > 0 || !!this._last;
33078 };
33079
33080 Buffer.prototype.source = function source(prop, loc) {
33081 if (prop && !loc) return;
33082
33083 var pos = loc ? loc[prop] : null;
33084
33085 this._sourcePosition.identifierName = loc && loc.identifierName || null;
33086 this._sourcePosition.line = pos ? pos.line : null;
33087 this._sourcePosition.column = pos ? pos.column : null;
33088 this._sourcePosition.filename = loc && loc.filename || null;
33089 };
33090
33091 Buffer.prototype.withSource = function withSource(prop, loc, cb) {
33092 if (!this._map) return cb();
33093
33094 var originalLine = this._sourcePosition.line;
33095 var originalColumn = this._sourcePosition.column;
33096 var originalFilename = this._sourcePosition.filename;
33097 var originalIdentifierName = this._sourcePosition.identifierName;
33098
33099 this.source(prop, loc);
33100
33101 cb();
33102
33103 this._sourcePosition.line = originalLine;
33104 this._sourcePosition.column = originalColumn;
33105 this._sourcePosition.filename = originalFilename;
33106 this._sourcePosition.identifierName = originalIdentifierName;
33107 };
33108
33109 Buffer.prototype.getCurrentColumn = function getCurrentColumn() {
33110 var extra = this._queue.reduce(function (acc, item) {
33111 return item[0] + acc;
33112 }, "");
33113 var lastIndex = extra.lastIndexOf("\n");
33114
33115 return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
33116 };
33117
33118 Buffer.prototype.getCurrentLine = function getCurrentLine() {
33119 var extra = this._queue.reduce(function (acc, item) {
33120 return item[0] + acc;
33121 }, "");
33122
33123 var count = 0;
33124 for (var i = 0; i < extra.length; i++) {
33125 if (extra[i] === "\n") count++;
33126 }
33127
33128 return this._position.line + count;
33129 };
33130
33131 return Buffer;
33132 }();
33133
33134 exports.default = Buffer;
33135 module.exports = exports["default"];
33136
33137/***/ }),
33138/* 301 */
33139/***/ (function(module, exports, __webpack_require__) {
33140
33141 "use strict";
33142
33143 exports.__esModule = true;
33144 exports.File = File;
33145 exports.Program = Program;
33146 exports.BlockStatement = BlockStatement;
33147 exports.Noop = Noop;
33148 exports.Directive = Directive;
33149
33150 var _types = __webpack_require__(123);
33151
33152 Object.defineProperty(exports, "DirectiveLiteral", {
33153 enumerable: true,
33154 get: function get() {
33155 return _types.StringLiteral;
33156 }
33157 });
33158 function File(node) {
33159 this.print(node.program, node);
33160 }
33161
33162 function Program(node) {
33163 this.printInnerComments(node, false);
33164
33165 this.printSequence(node.directives, node);
33166 if (node.directives && node.directives.length) this.newline();
33167
33168 this.printSequence(node.body, node);
33169 }
33170
33171 function BlockStatement(node) {
33172 this.token("{");
33173 this.printInnerComments(node);
33174
33175 var hasDirectives = node.directives && node.directives.length;
33176
33177 if (node.body.length || hasDirectives) {
33178 this.newline();
33179
33180 this.printSequence(node.directives, node, { indent: true });
33181 if (hasDirectives) this.newline();
33182
33183 this.printSequence(node.body, node, { indent: true });
33184 this.removeTrailingNewline();
33185
33186 this.source("end", node.loc);
33187
33188 if (!this.endsWith("\n")) this.newline();
33189
33190 this.rightBrace();
33191 } else {
33192 this.source("end", node.loc);
33193 this.token("}");
33194 }
33195 }
33196
33197 function Noop() {}
33198
33199 function Directive(node) {
33200 this.print(node.value, node);
33201 this.semicolon();
33202 }
33203
33204/***/ }),
33205/* 302 */
33206/***/ (function(module, exports) {
33207
33208 "use strict";
33209
33210 exports.__esModule = true;
33211 exports.ClassDeclaration = ClassDeclaration;
33212 exports.ClassBody = ClassBody;
33213 exports.ClassProperty = ClassProperty;
33214 exports.ClassMethod = ClassMethod;
33215 function ClassDeclaration(node) {
33216 this.printJoin(node.decorators, node);
33217 this.word("class");
33218
33219 if (node.id) {
33220 this.space();
33221 this.print(node.id, node);
33222 }
33223
33224 this.print(node.typeParameters, node);
33225
33226 if (node.superClass) {
33227 this.space();
33228 this.word("extends");
33229 this.space();
33230 this.print(node.superClass, node);
33231 this.print(node.superTypeParameters, node);
33232 }
33233
33234 if (node.implements) {
33235 this.space();
33236 this.word("implements");
33237 this.space();
33238 this.printList(node.implements, node);
33239 }
33240
33241 this.space();
33242 this.print(node.body, node);
33243 }
33244
33245 exports.ClassExpression = ClassDeclaration;
33246 function ClassBody(node) {
33247 this.token("{");
33248 this.printInnerComments(node);
33249 if (node.body.length === 0) {
33250 this.token("}");
33251 } else {
33252 this.newline();
33253
33254 this.indent();
33255 this.printSequence(node.body, node);
33256 this.dedent();
33257
33258 if (!this.endsWith("\n")) this.newline();
33259
33260 this.rightBrace();
33261 }
33262 }
33263
33264 function ClassProperty(node) {
33265 this.printJoin(node.decorators, node);
33266
33267 if (node.static) {
33268 this.word("static");
33269 this.space();
33270 }
33271 if (node.computed) {
33272 this.token("[");
33273 this.print(node.key, node);
33274 this.token("]");
33275 } else {
33276 this._variance(node);
33277 this.print(node.key, node);
33278 }
33279 this.print(node.typeAnnotation, node);
33280 if (node.value) {
33281 this.space();
33282 this.token("=");
33283 this.space();
33284 this.print(node.value, node);
33285 }
33286 this.semicolon();
33287 }
33288
33289 function ClassMethod(node) {
33290 this.printJoin(node.decorators, node);
33291
33292 if (node.static) {
33293 this.word("static");
33294 this.space();
33295 }
33296
33297 if (node.kind === "constructorCall") {
33298 this.word("call");
33299 this.space();
33300 }
33301
33302 this._method(node);
33303 }
33304
33305/***/ }),
33306/* 303 */
33307/***/ (function(module, exports, __webpack_require__) {
33308
33309 "use strict";
33310
33311 exports.__esModule = true;
33312 exports.LogicalExpression = exports.BinaryExpression = exports.AwaitExpression = exports.YieldExpression = undefined;
33313 exports.UnaryExpression = UnaryExpression;
33314 exports.DoExpression = DoExpression;
33315 exports.ParenthesizedExpression = ParenthesizedExpression;
33316 exports.UpdateExpression = UpdateExpression;
33317 exports.ConditionalExpression = ConditionalExpression;
33318 exports.NewExpression = NewExpression;
33319 exports.SequenceExpression = SequenceExpression;
33320 exports.ThisExpression = ThisExpression;
33321 exports.Super = Super;
33322 exports.Decorator = Decorator;
33323 exports.CallExpression = CallExpression;
33324 exports.Import = Import;
33325 exports.EmptyStatement = EmptyStatement;
33326 exports.ExpressionStatement = ExpressionStatement;
33327 exports.AssignmentPattern = AssignmentPattern;
33328 exports.AssignmentExpression = AssignmentExpression;
33329 exports.BindExpression = BindExpression;
33330 exports.MemberExpression = MemberExpression;
33331 exports.MetaProperty = MetaProperty;
33332
33333 var _babelTypes = __webpack_require__(1);
33334
33335 var t = _interopRequireWildcard(_babelTypes);
33336
33337 var _node = __webpack_require__(187);
33338
33339 var n = _interopRequireWildcard(_node);
33340
33341 function _interopRequireWildcard(obj) {
33342 if (obj && obj.__esModule) {
33343 return obj;
33344 } else {
33345 var newObj = {};if (obj != null) {
33346 for (var key in obj) {
33347 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
33348 }
33349 }newObj.default = obj;return newObj;
33350 }
33351 }
33352
33353 function UnaryExpression(node) {
33354 if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof") {
33355 this.word(node.operator);
33356 this.space();
33357 } else {
33358 this.token(node.operator);
33359 }
33360
33361 this.print(node.argument, node);
33362 }
33363
33364 function DoExpression(node) {
33365 this.word("do");
33366 this.space();
33367 this.print(node.body, node);
33368 }
33369
33370 function ParenthesizedExpression(node) {
33371 this.token("(");
33372 this.print(node.expression, node);
33373 this.token(")");
33374 }
33375
33376 function UpdateExpression(node) {
33377 if (node.prefix) {
33378 this.token(node.operator);
33379 this.print(node.argument, node);
33380 } else {
33381 this.print(node.argument, node);
33382 this.token(node.operator);
33383 }
33384 }
33385
33386 function ConditionalExpression(node) {
33387 this.print(node.test, node);
33388 this.space();
33389 this.token("?");
33390 this.space();
33391 this.print(node.consequent, node);
33392 this.space();
33393 this.token(":");
33394 this.space();
33395 this.print(node.alternate, node);
33396 }
33397
33398 function NewExpression(node, parent) {
33399 this.word("new");
33400 this.space();
33401 this.print(node.callee, node);
33402 if (node.arguments.length === 0 && this.format.minified && !t.isCallExpression(parent, { callee: node }) && !t.isMemberExpression(parent) && !t.isNewExpression(parent)) return;
33403
33404 this.token("(");
33405 this.printList(node.arguments, node);
33406 this.token(")");
33407 }
33408
33409 function SequenceExpression(node) {
33410 this.printList(node.expressions, node);
33411 }
33412
33413 function ThisExpression() {
33414 this.word("this");
33415 }
33416
33417 function Super() {
33418 this.word("super");
33419 }
33420
33421 function Decorator(node) {
33422 this.token("@");
33423 this.print(node.expression, node);
33424 this.newline();
33425 }
33426
33427 function commaSeparatorNewline() {
33428 this.token(",");
33429 this.newline();
33430
33431 if (!this.endsWith("\n")) this.space();
33432 }
33433
33434 function CallExpression(node) {
33435 this.print(node.callee, node);
33436
33437 this.token("(");
33438
33439 var isPrettyCall = node._prettyCall;
33440
33441 var separator = void 0;
33442 if (isPrettyCall) {
33443 separator = commaSeparatorNewline;
33444 this.newline();
33445 this.indent();
33446 }
33447
33448 this.printList(node.arguments, node, { separator: separator });
33449
33450 if (isPrettyCall) {
33451 this.newline();
33452 this.dedent();
33453 }
33454
33455 this.token(")");
33456 }
33457
33458 function Import() {
33459 this.word("import");
33460 }
33461
33462 function buildYieldAwait(keyword) {
33463 return function (node) {
33464 this.word(keyword);
33465
33466 if (node.delegate) {
33467 this.token("*");
33468 }
33469
33470 if (node.argument) {
33471 this.space();
33472 var terminatorState = this.startTerminatorless();
33473 this.print(node.argument, node);
33474 this.endTerminatorless(terminatorState);
33475 }
33476 };
33477 }
33478
33479 var YieldExpression = exports.YieldExpression = buildYieldAwait("yield");
33480 var AwaitExpression = exports.AwaitExpression = buildYieldAwait("await");
33481
33482 function EmptyStatement() {
33483 this.semicolon(true);
33484 }
33485
33486 function ExpressionStatement(node) {
33487 this.print(node.expression, node);
33488 this.semicolon();
33489 }
33490
33491 function AssignmentPattern(node) {
33492 this.print(node.left, node);
33493 if (node.left.optional) this.token("?");
33494 this.print(node.left.typeAnnotation, node);
33495 this.space();
33496 this.token("=");
33497 this.space();
33498 this.print(node.right, node);
33499 }
33500
33501 function AssignmentExpression(node, parent) {
33502 var parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
33503
33504 if (parens) {
33505 this.token("(");
33506 }
33507
33508 this.print(node.left, node);
33509
33510 this.space();
33511 if (node.operator === "in" || node.operator === "instanceof") {
33512 this.word(node.operator);
33513 } else {
33514 this.token(node.operator);
33515 }
33516 this.space();
33517
33518 this.print(node.right, node);
33519
33520 if (parens) {
33521 this.token(")");
33522 }
33523 }
33524
33525 function BindExpression(node) {
33526 this.print(node.object, node);
33527 this.token("::");
33528 this.print(node.callee, node);
33529 }
33530
33531 exports.BinaryExpression = AssignmentExpression;
33532 exports.LogicalExpression = AssignmentExpression;
33533 function MemberExpression(node) {
33534 this.print(node.object, node);
33535
33536 if (!node.computed && t.isMemberExpression(node.property)) {
33537 throw new TypeError("Got a MemberExpression for MemberExpression property");
33538 }
33539
33540 var computed = node.computed;
33541 if (t.isLiteral(node.property) && typeof node.property.value === "number") {
33542 computed = true;
33543 }
33544
33545 if (computed) {
33546 this.token("[");
33547 this.print(node.property, node);
33548 this.token("]");
33549 } else {
33550 this.token(".");
33551 this.print(node.property, node);
33552 }
33553 }
33554
33555 function MetaProperty(node) {
33556 this.print(node.meta, node);
33557 this.token(".");
33558 this.print(node.property, node);
33559 }
33560
33561/***/ }),
33562/* 304 */
33563/***/ (function(module, exports, __webpack_require__) {
33564
33565 "use strict";
33566
33567 exports.__esModule = true;
33568 exports.TypeParameterDeclaration = exports.StringLiteralTypeAnnotation = exports.NumericLiteralTypeAnnotation = exports.GenericTypeAnnotation = exports.ClassImplements = undefined;
33569 exports.AnyTypeAnnotation = AnyTypeAnnotation;
33570 exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
33571 exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
33572 exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
33573 exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
33574 exports.DeclareClass = DeclareClass;
33575 exports.DeclareFunction = DeclareFunction;
33576 exports.DeclareInterface = DeclareInterface;
33577 exports.DeclareModule = DeclareModule;
33578 exports.DeclareModuleExports = DeclareModuleExports;
33579 exports.DeclareTypeAlias = DeclareTypeAlias;
33580 exports.DeclareOpaqueType = DeclareOpaqueType;
33581 exports.DeclareVariable = DeclareVariable;
33582 exports.DeclareExportDeclaration = DeclareExportDeclaration;
33583 exports.ExistentialTypeParam = ExistentialTypeParam;
33584 exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
33585 exports.FunctionTypeParam = FunctionTypeParam;
33586 exports.InterfaceExtends = InterfaceExtends;
33587 exports._interfaceish = _interfaceish;
33588 exports._variance = _variance;
33589 exports.InterfaceDeclaration = InterfaceDeclaration;
33590 exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
33591 exports.MixedTypeAnnotation = MixedTypeAnnotation;
33592 exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
33593 exports.NullableTypeAnnotation = NullableTypeAnnotation;
33594
33595 var _types = __webpack_require__(123);
33596
33597 Object.defineProperty(exports, "NumericLiteralTypeAnnotation", {
33598 enumerable: true,
33599 get: function get() {
33600 return _types.NumericLiteral;
33601 }
33602 });
33603 Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
33604 enumerable: true,
33605 get: function get() {
33606 return _types.StringLiteral;
33607 }
33608 });
33609 exports.NumberTypeAnnotation = NumberTypeAnnotation;
33610 exports.StringTypeAnnotation = StringTypeAnnotation;
33611 exports.ThisTypeAnnotation = ThisTypeAnnotation;
33612 exports.TupleTypeAnnotation = TupleTypeAnnotation;
33613 exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
33614 exports.TypeAlias = TypeAlias;
33615 exports.OpaqueType = OpaqueType;
33616 exports.TypeAnnotation = TypeAnnotation;
33617 exports.TypeParameter = TypeParameter;
33618 exports.TypeParameterInstantiation = TypeParameterInstantiation;
33619 exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
33620 exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
33621 exports.ObjectTypeIndexer = ObjectTypeIndexer;
33622 exports.ObjectTypeProperty = ObjectTypeProperty;
33623 exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
33624 exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
33625 exports.UnionTypeAnnotation = UnionTypeAnnotation;
33626 exports.TypeCastExpression = TypeCastExpression;
33627 exports.VoidTypeAnnotation = VoidTypeAnnotation;
33628
33629 var _babelTypes = __webpack_require__(1);
33630
33631 var t = _interopRequireWildcard(_babelTypes);
33632
33633 function _interopRequireWildcard(obj) {
33634 if (obj && obj.__esModule) {
33635 return obj;
33636 } else {
33637 var newObj = {};if (obj != null) {
33638 for (var key in obj) {
33639 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
33640 }
33641 }newObj.default = obj;return newObj;
33642 }
33643 }
33644
33645 function AnyTypeAnnotation() {
33646 this.word("any");
33647 }
33648
33649 function ArrayTypeAnnotation(node) {
33650 this.print(node.elementType, node);
33651 this.token("[");
33652 this.token("]");
33653 }
33654
33655 function BooleanTypeAnnotation() {
33656 this.word("boolean");
33657 }
33658
33659 function BooleanLiteralTypeAnnotation(node) {
33660 this.word(node.value ? "true" : "false");
33661 }
33662
33663 function NullLiteralTypeAnnotation() {
33664 this.word("null");
33665 }
33666
33667 function DeclareClass(node, parent) {
33668 if (!t.isDeclareExportDeclaration(parent)) {
33669 this.word("declare");
33670 this.space();
33671 }
33672 this.word("class");
33673 this.space();
33674 this._interfaceish(node);
33675 }
33676
33677 function DeclareFunction(node, parent) {
33678 if (!t.isDeclareExportDeclaration(parent)) {
33679 this.word("declare");
33680 this.space();
33681 }
33682 this.word("function");
33683 this.space();
33684 this.print(node.id, node);
33685 this.print(node.id.typeAnnotation.typeAnnotation, node);
33686 this.semicolon();
33687 }
33688
33689 function DeclareInterface(node) {
33690 this.word("declare");
33691 this.space();
33692 this.InterfaceDeclaration(node);
33693 }
33694
33695 function DeclareModule(node) {
33696 this.word("declare");
33697 this.space();
33698 this.word("module");
33699 this.space();
33700 this.print(node.id, node);
33701 this.space();
33702 this.print(node.body, node);
33703 }
33704
33705 function DeclareModuleExports(node) {
33706 this.word("declare");
33707 this.space();
33708 this.word("module");
33709 this.token(".");
33710 this.word("exports");
33711 this.print(node.typeAnnotation, node);
33712 }
33713
33714 function DeclareTypeAlias(node) {
33715 this.word("declare");
33716 this.space();
33717 this.TypeAlias(node);
33718 }
33719
33720 function DeclareOpaqueType(node, parent) {
33721 if (!t.isDeclareExportDeclaration(parent)) {
33722 this.word("declare");
33723 this.space();
33724 }
33725 this.OpaqueType(node);
33726 }
33727
33728 function DeclareVariable(node, parent) {
33729 if (!t.isDeclareExportDeclaration(parent)) {
33730 this.word("declare");
33731 this.space();
33732 }
33733 this.word("var");
33734 this.space();
33735 this.print(node.id, node);
33736 this.print(node.id.typeAnnotation, node);
33737 this.semicolon();
33738 }
33739
33740 function DeclareExportDeclaration(node) {
33741 this.word("declare");
33742 this.space();
33743 this.word("export");
33744 this.space();
33745 if (node.default) {
33746 this.word("default");
33747 this.space();
33748 }
33749
33750 FlowExportDeclaration.apply(this, arguments);
33751 }
33752
33753 function FlowExportDeclaration(node) {
33754 if (node.declaration) {
33755 var declar = node.declaration;
33756 this.print(declar, node);
33757 if (!t.isStatement(declar)) this.semicolon();
33758 } else {
33759 this.token("{");
33760 if (node.specifiers.length) {
33761 this.space();
33762 this.printList(node.specifiers, node);
33763 this.space();
33764 }
33765 this.token("}");
33766
33767 if (node.source) {
33768 this.space();
33769 this.word("from");
33770 this.space();
33771 this.print(node.source, node);
33772 }
33773
33774 this.semicolon();
33775 }
33776 }
33777
33778 function ExistentialTypeParam() {
33779 this.token("*");
33780 }
33781
33782 function FunctionTypeAnnotation(node, parent) {
33783 this.print(node.typeParameters, node);
33784 this.token("(");
33785 this.printList(node.params, node);
33786
33787 if (node.rest) {
33788 if (node.params.length) {
33789 this.token(",");
33790 this.space();
33791 }
33792 this.token("...");
33793 this.print(node.rest, node);
33794 }
33795
33796 this.token(")");
33797
33798 if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction") {
33799 this.token(":");
33800 } else {
33801 this.space();
33802 this.token("=>");
33803 }
33804
33805 this.space();
33806 this.print(node.returnType, node);
33807 }
33808
33809 function FunctionTypeParam(node) {
33810 this.print(node.name, node);
33811 if (node.optional) this.token("?");
33812 this.token(":");
33813 this.space();
33814 this.print(node.typeAnnotation, node);
33815 }
33816
33817 function InterfaceExtends(node) {
33818 this.print(node.id, node);
33819 this.print(node.typeParameters, node);
33820 }
33821
33822 exports.ClassImplements = InterfaceExtends;
33823 exports.GenericTypeAnnotation = InterfaceExtends;
33824 function _interfaceish(node) {
33825 this.print(node.id, node);
33826 this.print(node.typeParameters, node);
33827 if (node.extends.length) {
33828 this.space();
33829 this.word("extends");
33830 this.space();
33831 this.printList(node.extends, node);
33832 }
33833 if (node.mixins && node.mixins.length) {
33834 this.space();
33835 this.word("mixins");
33836 this.space();
33837 this.printList(node.mixins, node);
33838 }
33839 this.space();
33840 this.print(node.body, node);
33841 }
33842
33843 function _variance(node) {
33844 if (node.variance === "plus") {
33845 this.token("+");
33846 } else if (node.variance === "minus") {
33847 this.token("-");
33848 }
33849 }
33850
33851 function InterfaceDeclaration(node) {
33852 this.word("interface");
33853 this.space();
33854 this._interfaceish(node);
33855 }
33856
33857 function andSeparator() {
33858 this.space();
33859 this.token("&");
33860 this.space();
33861 }
33862
33863 function IntersectionTypeAnnotation(node) {
33864 this.printJoin(node.types, node, { separator: andSeparator });
33865 }
33866
33867 function MixedTypeAnnotation() {
33868 this.word("mixed");
33869 }
33870
33871 function EmptyTypeAnnotation() {
33872 this.word("empty");
33873 }
33874
33875 function NullableTypeAnnotation(node) {
33876 this.token("?");
33877 this.print(node.typeAnnotation, node);
33878 }
33879
33880 function NumberTypeAnnotation() {
33881 this.word("number");
33882 }
33883
33884 function StringTypeAnnotation() {
33885 this.word("string");
33886 }
33887
33888 function ThisTypeAnnotation() {
33889 this.word("this");
33890 }
33891
33892 function TupleTypeAnnotation(node) {
33893 this.token("[");
33894 this.printList(node.types, node);
33895 this.token("]");
33896 }
33897
33898 function TypeofTypeAnnotation(node) {
33899 this.word("typeof");
33900 this.space();
33901 this.print(node.argument, node);
33902 }
33903
33904 function TypeAlias(node) {
33905 this.word("type");
33906 this.space();
33907 this.print(node.id, node);
33908 this.print(node.typeParameters, node);
33909 this.space();
33910 this.token("=");
33911 this.space();
33912 this.print(node.right, node);
33913 this.semicolon();
33914 }
33915 function OpaqueType(node) {
33916 this.word("opaque");
33917 this.space();
33918 this.word("type");
33919 this.space();
33920 this.print(node.id, node);
33921 this.print(node.typeParameters, node);
33922 if (node.supertype) {
33923 this.token(":");
33924 this.space();
33925 this.print(node.supertype, node);
33926 }
33927 if (node.impltype) {
33928 this.space();
33929 this.token("=");
33930 this.space();
33931 this.print(node.impltype, node);
33932 }
33933 this.semicolon();
33934 }
33935
33936 function TypeAnnotation(node) {
33937 this.token(":");
33938 this.space();
33939 if (node.optional) this.token("?");
33940 this.print(node.typeAnnotation, node);
33941 }
33942
33943 function TypeParameter(node) {
33944 this._variance(node);
33945
33946 this.word(node.name);
33947
33948 if (node.bound) {
33949 this.print(node.bound, node);
33950 }
33951
33952 if (node.default) {
33953 this.space();
33954 this.token("=");
33955 this.space();
33956 this.print(node.default, node);
33957 }
33958 }
33959
33960 function TypeParameterInstantiation(node) {
33961 this.token("<");
33962 this.printList(node.params, node, {});
33963 this.token(">");
33964 }
33965
33966 exports.TypeParameterDeclaration = TypeParameterInstantiation;
33967 function ObjectTypeAnnotation(node) {
33968 var _this = this;
33969
33970 if (node.exact) {
33971 this.token("{|");
33972 } else {
33973 this.token("{");
33974 }
33975
33976 var props = node.properties.concat(node.callProperties, node.indexers);
33977
33978 if (props.length) {
33979 this.space();
33980
33981 this.printJoin(props, node, {
33982 addNewlines: function addNewlines(leading) {
33983 if (leading && !props[0]) return 1;
33984 },
33985
33986 indent: true,
33987 statement: true,
33988 iterator: function iterator() {
33989 if (props.length !== 1) {
33990 if (_this.format.flowCommaSeparator) {
33991 _this.token(",");
33992 } else {
33993 _this.semicolon();
33994 }
33995 _this.space();
33996 }
33997 }
33998 });
33999
34000 this.space();
34001 }
34002
34003 if (node.exact) {
34004 this.token("|}");
34005 } else {
34006 this.token("}");
34007 }
34008 }
34009
34010 function ObjectTypeCallProperty(node) {
34011 if (node.static) {
34012 this.word("static");
34013 this.space();
34014 }
34015 this.print(node.value, node);
34016 }
34017
34018 function ObjectTypeIndexer(node) {
34019 if (node.static) {
34020 this.word("static");
34021 this.space();
34022 }
34023 this._variance(node);
34024 this.token("[");
34025 this.print(node.id, node);
34026 this.token(":");
34027 this.space();
34028 this.print(node.key, node);
34029 this.token("]");
34030 this.token(":");
34031 this.space();
34032 this.print(node.value, node);
34033 }
34034
34035 function ObjectTypeProperty(node) {
34036 if (node.static) {
34037 this.word("static");
34038 this.space();
34039 }
34040 this._variance(node);
34041 this.print(node.key, node);
34042 if (node.optional) this.token("?");
34043 this.token(":");
34044 this.space();
34045 this.print(node.value, node);
34046 }
34047
34048 function ObjectTypeSpreadProperty(node) {
34049 this.token("...");
34050 this.print(node.argument, node);
34051 }
34052
34053 function QualifiedTypeIdentifier(node) {
34054 this.print(node.qualification, node);
34055 this.token(".");
34056 this.print(node.id, node);
34057 }
34058
34059 function orSeparator() {
34060 this.space();
34061 this.token("|");
34062 this.space();
34063 }
34064
34065 function UnionTypeAnnotation(node) {
34066 this.printJoin(node.types, node, { separator: orSeparator });
34067 }
34068
34069 function TypeCastExpression(node) {
34070 this.token("(");
34071 this.print(node.expression, node);
34072 this.print(node.typeAnnotation, node);
34073 this.token(")");
34074 }
34075
34076 function VoidTypeAnnotation() {
34077 this.word("void");
34078 }
34079
34080/***/ }),
34081/* 305 */
34082/***/ (function(module, exports, __webpack_require__) {
34083
34084 "use strict";
34085
34086 exports.__esModule = true;
34087
34088 var _getIterator2 = __webpack_require__(2);
34089
34090 var _getIterator3 = _interopRequireDefault(_getIterator2);
34091
34092 exports.JSXAttribute = JSXAttribute;
34093 exports.JSXIdentifier = JSXIdentifier;
34094 exports.JSXNamespacedName = JSXNamespacedName;
34095 exports.JSXMemberExpression = JSXMemberExpression;
34096 exports.JSXSpreadAttribute = JSXSpreadAttribute;
34097 exports.JSXExpressionContainer = JSXExpressionContainer;
34098 exports.JSXSpreadChild = JSXSpreadChild;
34099 exports.JSXText = JSXText;
34100 exports.JSXElement = JSXElement;
34101 exports.JSXOpeningElement = JSXOpeningElement;
34102 exports.JSXClosingElement = JSXClosingElement;
34103 exports.JSXEmptyExpression = JSXEmptyExpression;
34104
34105 function _interopRequireDefault(obj) {
34106 return obj && obj.__esModule ? obj : { default: obj };
34107 }
34108
34109 function JSXAttribute(node) {
34110 this.print(node.name, node);
34111 if (node.value) {
34112 this.token("=");
34113 this.print(node.value, node);
34114 }
34115 }
34116
34117 function JSXIdentifier(node) {
34118 this.word(node.name);
34119 }
34120
34121 function JSXNamespacedName(node) {
34122 this.print(node.namespace, node);
34123 this.token(":");
34124 this.print(node.name, node);
34125 }
34126
34127 function JSXMemberExpression(node) {
34128 this.print(node.object, node);
34129 this.token(".");
34130 this.print(node.property, node);
34131 }
34132
34133 function JSXSpreadAttribute(node) {
34134 this.token("{");
34135 this.token("...");
34136 this.print(node.argument, node);
34137 this.token("}");
34138 }
34139
34140 function JSXExpressionContainer(node) {
34141 this.token("{");
34142 this.print(node.expression, node);
34143 this.token("}");
34144 }
34145
34146 function JSXSpreadChild(node) {
34147 this.token("{");
34148 this.token("...");
34149 this.print(node.expression, node);
34150 this.token("}");
34151 }
34152
34153 function JSXText(node) {
34154 this.token(node.value);
34155 }
34156
34157 function JSXElement(node) {
34158 var open = node.openingElement;
34159 this.print(open, node);
34160 if (open.selfClosing) return;
34161
34162 this.indent();
34163 for (var _iterator = node.children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
34164 var _ref;
34165
34166 if (_isArray) {
34167 if (_i >= _iterator.length) break;
34168 _ref = _iterator[_i++];
34169 } else {
34170 _i = _iterator.next();
34171 if (_i.done) break;
34172 _ref = _i.value;
34173 }
34174
34175 var child = _ref;
34176
34177 this.print(child, node);
34178 }
34179 this.dedent();
34180
34181 this.print(node.closingElement, node);
34182 }
34183
34184 function spaceSeparator() {
34185 this.space();
34186 }
34187
34188 function JSXOpeningElement(node) {
34189 this.token("<");
34190 this.print(node.name, node);
34191 if (node.attributes.length > 0) {
34192 this.space();
34193 this.printJoin(node.attributes, node, { separator: spaceSeparator });
34194 }
34195 if (node.selfClosing) {
34196 this.space();
34197 this.token("/>");
34198 } else {
34199 this.token(">");
34200 }
34201 }
34202
34203 function JSXClosingElement(node) {
34204 this.token("</");
34205 this.print(node.name, node);
34206 this.token(">");
34207 }
34208
34209 function JSXEmptyExpression() {}
34210
34211/***/ }),
34212/* 306 */
34213/***/ (function(module, exports, __webpack_require__) {
34214
34215 "use strict";
34216
34217 exports.__esModule = true;
34218 exports.FunctionDeclaration = undefined;
34219 exports._params = _params;
34220 exports._method = _method;
34221 exports.FunctionExpression = FunctionExpression;
34222 exports.ArrowFunctionExpression = ArrowFunctionExpression;
34223
34224 var _babelTypes = __webpack_require__(1);
34225
34226 var t = _interopRequireWildcard(_babelTypes);
34227
34228 function _interopRequireWildcard(obj) {
34229 if (obj && obj.__esModule) {
34230 return obj;
34231 } else {
34232 var newObj = {};if (obj != null) {
34233 for (var key in obj) {
34234 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
34235 }
34236 }newObj.default = obj;return newObj;
34237 }
34238 }
34239
34240 function _params(node) {
34241 var _this = this;
34242
34243 this.print(node.typeParameters, node);
34244 this.token("(");
34245 this.printList(node.params, node, {
34246 iterator: function iterator(node) {
34247 if (node.optional) _this.token("?");
34248 _this.print(node.typeAnnotation, node);
34249 }
34250 });
34251 this.token(")");
34252
34253 if (node.returnType) {
34254 this.print(node.returnType, node);
34255 }
34256 }
34257
34258 function _method(node) {
34259 var kind = node.kind;
34260 var key = node.key;
34261
34262 if (kind === "method" || kind === "init") {
34263 if (node.generator) {
34264 this.token("*");
34265 }
34266 }
34267
34268 if (kind === "get" || kind === "set") {
34269 this.word(kind);
34270 this.space();
34271 }
34272
34273 if (node.async) {
34274 this.word("async");
34275 this.space();
34276 }
34277
34278 if (node.computed) {
34279 this.token("[");
34280 this.print(key, node);
34281 this.token("]");
34282 } else {
34283 this.print(key, node);
34284 }
34285
34286 this._params(node);
34287 this.space();
34288 this.print(node.body, node);
34289 }
34290
34291 function FunctionExpression(node) {
34292 if (node.async) {
34293 this.word("async");
34294 this.space();
34295 }
34296 this.word("function");
34297 if (node.generator) this.token("*");
34298
34299 if (node.id) {
34300 this.space();
34301 this.print(node.id, node);
34302 } else {
34303 this.space();
34304 }
34305
34306 this._params(node);
34307 this.space();
34308 this.print(node.body, node);
34309 }
34310
34311 exports.FunctionDeclaration = FunctionExpression;
34312 function ArrowFunctionExpression(node) {
34313 if (node.async) {
34314 this.word("async");
34315 this.space();
34316 }
34317
34318 var firstParam = node.params[0];
34319
34320 if (node.params.length === 1 && t.isIdentifier(firstParam) && !hasTypes(node, firstParam)) {
34321 this.print(firstParam, node);
34322 } else {
34323 this._params(node);
34324 }
34325
34326 this.space();
34327 this.token("=>");
34328 this.space();
34329
34330 this.print(node.body, node);
34331 }
34332
34333 function hasTypes(node, param) {
34334 return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments;
34335 }
34336
34337/***/ }),
34338/* 307 */
34339/***/ (function(module, exports, __webpack_require__) {
34340
34341 "use strict";
34342
34343 exports.__esModule = true;
34344 exports.ImportSpecifier = ImportSpecifier;
34345 exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
34346 exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
34347 exports.ExportSpecifier = ExportSpecifier;
34348 exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
34349 exports.ExportAllDeclaration = ExportAllDeclaration;
34350 exports.ExportNamedDeclaration = ExportNamedDeclaration;
34351 exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
34352 exports.ImportDeclaration = ImportDeclaration;
34353 exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
34354
34355 var _babelTypes = __webpack_require__(1);
34356
34357 var t = _interopRequireWildcard(_babelTypes);
34358
34359 function _interopRequireWildcard(obj) {
34360 if (obj && obj.__esModule) {
34361 return obj;
34362 } else {
34363 var newObj = {};if (obj != null) {
34364 for (var key in obj) {
34365 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
34366 }
34367 }newObj.default = obj;return newObj;
34368 }
34369 }
34370
34371 function ImportSpecifier(node) {
34372 if (node.importKind === "type" || node.importKind === "typeof") {
34373 this.word(node.importKind);
34374 this.space();
34375 }
34376
34377 this.print(node.imported, node);
34378 if (node.local && node.local.name !== node.imported.name) {
34379 this.space();
34380 this.word("as");
34381 this.space();
34382 this.print(node.local, node);
34383 }
34384 }
34385
34386 function ImportDefaultSpecifier(node) {
34387 this.print(node.local, node);
34388 }
34389
34390 function ExportDefaultSpecifier(node) {
34391 this.print(node.exported, node);
34392 }
34393
34394 function ExportSpecifier(node) {
34395 this.print(node.local, node);
34396 if (node.exported && node.local.name !== node.exported.name) {
34397 this.space();
34398 this.word("as");
34399 this.space();
34400 this.print(node.exported, node);
34401 }
34402 }
34403
34404 function ExportNamespaceSpecifier(node) {
34405 this.token("*");
34406 this.space();
34407 this.word("as");
34408 this.space();
34409 this.print(node.exported, node);
34410 }
34411
34412 function ExportAllDeclaration(node) {
34413 this.word("export");
34414 this.space();
34415 this.token("*");
34416 this.space();
34417 this.word("from");
34418 this.space();
34419 this.print(node.source, node);
34420 this.semicolon();
34421 }
34422
34423 function ExportNamedDeclaration() {
34424 this.word("export");
34425 this.space();
34426 ExportDeclaration.apply(this, arguments);
34427 }
34428
34429 function ExportDefaultDeclaration() {
34430 this.word("export");
34431 this.space();
34432 this.word("default");
34433 this.space();
34434 ExportDeclaration.apply(this, arguments);
34435 }
34436
34437 function ExportDeclaration(node) {
34438 if (node.declaration) {
34439 var declar = node.declaration;
34440 this.print(declar, node);
34441 if (!t.isStatement(declar)) this.semicolon();
34442 } else {
34443 if (node.exportKind === "type") {
34444 this.word("type");
34445 this.space();
34446 }
34447
34448 var specifiers = node.specifiers.slice(0);
34449
34450 var hasSpecial = false;
34451 while (true) {
34452 var first = specifiers[0];
34453 if (t.isExportDefaultSpecifier(first) || t.isExportNamespaceSpecifier(first)) {
34454 hasSpecial = true;
34455 this.print(specifiers.shift(), node);
34456 if (specifiers.length) {
34457 this.token(",");
34458 this.space();
34459 }
34460 } else {
34461 break;
34462 }
34463 }
34464
34465 if (specifiers.length || !specifiers.length && !hasSpecial) {
34466 this.token("{");
34467 if (specifiers.length) {
34468 this.space();
34469 this.printList(specifiers, node);
34470 this.space();
34471 }
34472 this.token("}");
34473 }
34474
34475 if (node.source) {
34476 this.space();
34477 this.word("from");
34478 this.space();
34479 this.print(node.source, node);
34480 }
34481
34482 this.semicolon();
34483 }
34484 }
34485
34486 function ImportDeclaration(node) {
34487 this.word("import");
34488 this.space();
34489
34490 if (node.importKind === "type" || node.importKind === "typeof") {
34491 this.word(node.importKind);
34492 this.space();
34493 }
34494
34495 var specifiers = node.specifiers.slice(0);
34496 if (specifiers && specifiers.length) {
34497 while (true) {
34498 var first = specifiers[0];
34499 if (t.isImportDefaultSpecifier(first) || t.isImportNamespaceSpecifier(first)) {
34500 this.print(specifiers.shift(), node);
34501 if (specifiers.length) {
34502 this.token(",");
34503 this.space();
34504 }
34505 } else {
34506 break;
34507 }
34508 }
34509
34510 if (specifiers.length) {
34511 this.token("{");
34512 this.space();
34513 this.printList(specifiers, node);
34514 this.space();
34515 this.token("}");
34516 }
34517
34518 this.space();
34519 this.word("from");
34520 this.space();
34521 }
34522
34523 this.print(node.source, node);
34524 this.semicolon();
34525 }
34526
34527 function ImportNamespaceSpecifier(node) {
34528 this.token("*");
34529 this.space();
34530 this.word("as");
34531 this.space();
34532 this.print(node.local, node);
34533 }
34534
34535/***/ }),
34536/* 308 */
34537/***/ (function(module, exports, __webpack_require__) {
34538
34539 "use strict";
34540
34541 exports.__esModule = true;
34542 exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForAwaitStatement = exports.ForOfStatement = exports.ForInStatement = undefined;
34543
34544 var _getIterator2 = __webpack_require__(2);
34545
34546 var _getIterator3 = _interopRequireDefault(_getIterator2);
34547
34548 exports.WithStatement = WithStatement;
34549 exports.IfStatement = IfStatement;
34550 exports.ForStatement = ForStatement;
34551 exports.WhileStatement = WhileStatement;
34552 exports.DoWhileStatement = DoWhileStatement;
34553 exports.LabeledStatement = LabeledStatement;
34554 exports.TryStatement = TryStatement;
34555 exports.CatchClause = CatchClause;
34556 exports.SwitchStatement = SwitchStatement;
34557 exports.SwitchCase = SwitchCase;
34558 exports.DebuggerStatement = DebuggerStatement;
34559 exports.VariableDeclaration = VariableDeclaration;
34560 exports.VariableDeclarator = VariableDeclarator;
34561
34562 var _babelTypes = __webpack_require__(1);
34563
34564 var t = _interopRequireWildcard(_babelTypes);
34565
34566 function _interopRequireWildcard(obj) {
34567 if (obj && obj.__esModule) {
34568 return obj;
34569 } else {
34570 var newObj = {};if (obj != null) {
34571 for (var key in obj) {
34572 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
34573 }
34574 }newObj.default = obj;return newObj;
34575 }
34576 }
34577
34578 function _interopRequireDefault(obj) {
34579 return obj && obj.__esModule ? obj : { default: obj };
34580 }
34581
34582 function WithStatement(node) {
34583 this.word("with");
34584 this.space();
34585 this.token("(");
34586 this.print(node.object, node);
34587 this.token(")");
34588 this.printBlock(node);
34589 }
34590
34591 function IfStatement(node) {
34592 this.word("if");
34593 this.space();
34594 this.token("(");
34595 this.print(node.test, node);
34596 this.token(")");
34597 this.space();
34598
34599 var needsBlock = node.alternate && t.isIfStatement(getLastStatement(node.consequent));
34600 if (needsBlock) {
34601 this.token("{");
34602 this.newline();
34603 this.indent();
34604 }
34605
34606 this.printAndIndentOnComments(node.consequent, node);
34607
34608 if (needsBlock) {
34609 this.dedent();
34610 this.newline();
34611 this.token("}");
34612 }
34613
34614 if (node.alternate) {
34615 if (this.endsWith("}")) this.space();
34616 this.word("else");
34617 this.space();
34618 this.printAndIndentOnComments(node.alternate, node);
34619 }
34620 }
34621
34622 function getLastStatement(statement) {
34623 if (!t.isStatement(statement.body)) return statement;
34624 return getLastStatement(statement.body);
34625 }
34626
34627 function ForStatement(node) {
34628 this.word("for");
34629 this.space();
34630 this.token("(");
34631
34632 this.inForStatementInitCounter++;
34633 this.print(node.init, node);
34634 this.inForStatementInitCounter--;
34635 this.token(";");
34636
34637 if (node.test) {
34638 this.space();
34639 this.print(node.test, node);
34640 }
34641 this.token(";");
34642
34643 if (node.update) {
34644 this.space();
34645 this.print(node.update, node);
34646 }
34647
34648 this.token(")");
34649 this.printBlock(node);
34650 }
34651
34652 function WhileStatement(node) {
34653 this.word("while");
34654 this.space();
34655 this.token("(");
34656 this.print(node.test, node);
34657 this.token(")");
34658 this.printBlock(node);
34659 }
34660
34661 var buildForXStatement = function buildForXStatement(op) {
34662 return function (node) {
34663 this.word("for");
34664 this.space();
34665 if (op === "await") {
34666 this.word("await");
34667 this.space();
34668 }
34669 this.token("(");
34670
34671 this.print(node.left, node);
34672 this.space();
34673 this.word(op === "await" ? "of" : op);
34674 this.space();
34675 this.print(node.right, node);
34676 this.token(")");
34677 this.printBlock(node);
34678 };
34679 };
34680
34681 var ForInStatement = exports.ForInStatement = buildForXStatement("in");
34682 var ForOfStatement = exports.ForOfStatement = buildForXStatement("of");
34683 var ForAwaitStatement = exports.ForAwaitStatement = buildForXStatement("await");
34684
34685 function DoWhileStatement(node) {
34686 this.word("do");
34687 this.space();
34688 this.print(node.body, node);
34689 this.space();
34690 this.word("while");
34691 this.space();
34692 this.token("(");
34693 this.print(node.test, node);
34694 this.token(")");
34695 this.semicolon();
34696 }
34697
34698 function buildLabelStatement(prefix) {
34699 var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "label";
34700
34701 return function (node) {
34702 this.word(prefix);
34703
34704 var label = node[key];
34705 if (label) {
34706 this.space();
34707
34708 var terminatorState = this.startTerminatorless();
34709 this.print(label, node);
34710 this.endTerminatorless(terminatorState);
34711 }
34712
34713 this.semicolon();
34714 };
34715 }
34716
34717 var ContinueStatement = exports.ContinueStatement = buildLabelStatement("continue");
34718 var ReturnStatement = exports.ReturnStatement = buildLabelStatement("return", "argument");
34719 var BreakStatement = exports.BreakStatement = buildLabelStatement("break");
34720 var ThrowStatement = exports.ThrowStatement = buildLabelStatement("throw", "argument");
34721
34722 function LabeledStatement(node) {
34723 this.print(node.label, node);
34724 this.token(":");
34725 this.space();
34726 this.print(node.body, node);
34727 }
34728
34729 function TryStatement(node) {
34730 this.word("try");
34731 this.space();
34732 this.print(node.block, node);
34733 this.space();
34734
34735 if (node.handlers) {
34736 this.print(node.handlers[0], node);
34737 } else {
34738 this.print(node.handler, node);
34739 }
34740
34741 if (node.finalizer) {
34742 this.space();
34743 this.word("finally");
34744 this.space();
34745 this.print(node.finalizer, node);
34746 }
34747 }
34748
34749 function CatchClause(node) {
34750 this.word("catch");
34751 this.space();
34752 this.token("(");
34753 this.print(node.param, node);
34754 this.token(")");
34755 this.space();
34756 this.print(node.body, node);
34757 }
34758
34759 function SwitchStatement(node) {
34760 this.word("switch");
34761 this.space();
34762 this.token("(");
34763 this.print(node.discriminant, node);
34764 this.token(")");
34765 this.space();
34766 this.token("{");
34767
34768 this.printSequence(node.cases, node, {
34769 indent: true,
34770 addNewlines: function addNewlines(leading, cas) {
34771 if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
34772 }
34773 });
34774
34775 this.token("}");
34776 }
34777
34778 function SwitchCase(node) {
34779 if (node.test) {
34780 this.word("case");
34781 this.space();
34782 this.print(node.test, node);
34783 this.token(":");
34784 } else {
34785 this.word("default");
34786 this.token(":");
34787 }
34788
34789 if (node.consequent.length) {
34790 this.newline();
34791 this.printSequence(node.consequent, node, { indent: true });
34792 }
34793 }
34794
34795 function DebuggerStatement() {
34796 this.word("debugger");
34797 this.semicolon();
34798 }
34799
34800 function variableDeclarationIdent() {
34801 this.token(",");
34802 this.newline();
34803 if (this.endsWith("\n")) for (var i = 0; i < 4; i++) {
34804 this.space(true);
34805 }
34806 }
34807
34808 function constDeclarationIdent() {
34809 this.token(",");
34810 this.newline();
34811 if (this.endsWith("\n")) for (var i = 0; i < 6; i++) {
34812 this.space(true);
34813 }
34814 }
34815
34816 function VariableDeclaration(node, parent) {
34817 this.word(node.kind);
34818 this.space();
34819
34820 var hasInits = false;
34821
34822 if (!t.isFor(parent)) {
34823 for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
34824 var _ref;
34825
34826 if (_isArray) {
34827 if (_i >= _iterator.length) break;
34828 _ref = _iterator[_i++];
34829 } else {
34830 _i = _iterator.next();
34831 if (_i.done) break;
34832 _ref = _i.value;
34833 }
34834
34835 var declar = _ref;
34836
34837 if (declar.init) {
34838 hasInits = true;
34839 }
34840 }
34841 }
34842
34843 var separator = void 0;
34844 if (hasInits) {
34845 separator = node.kind === "const" ? constDeclarationIdent : variableDeclarationIdent;
34846 }
34847
34848 this.printList(node.declarations, node, { separator: separator });
34849
34850 if (t.isFor(parent)) {
34851 if (parent.left === node || parent.init === node) return;
34852 }
34853
34854 this.semicolon();
34855 }
34856
34857 function VariableDeclarator(node) {
34858 this.print(node.id, node);
34859 this.print(node.id.typeAnnotation, node);
34860 if (node.init) {
34861 this.space();
34862 this.token("=");
34863 this.space();
34864 this.print(node.init, node);
34865 }
34866 }
34867
34868/***/ }),
34869/* 309 */
34870/***/ (function(module, exports) {
34871
34872 "use strict";
34873
34874 exports.__esModule = true;
34875 exports.TaggedTemplateExpression = TaggedTemplateExpression;
34876 exports.TemplateElement = TemplateElement;
34877 exports.TemplateLiteral = TemplateLiteral;
34878 function TaggedTemplateExpression(node) {
34879 this.print(node.tag, node);
34880 this.print(node.quasi, node);
34881 }
34882
34883 function TemplateElement(node, parent) {
34884 var isFirst = parent.quasis[0] === node;
34885 var isLast = parent.quasis[parent.quasis.length - 1] === node;
34886
34887 var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
34888
34889 this.token(value);
34890 }
34891
34892 function TemplateLiteral(node) {
34893 var quasis = node.quasis;
34894
34895 for (var i = 0; i < quasis.length; i++) {
34896 this.print(quasis[i], node);
34897
34898 if (i + 1 < quasis.length) {
34899 this.print(node.expressions[i], node);
34900 }
34901 }
34902 }
34903
34904/***/ }),
34905/* 310 */
34906/***/ (function(module, exports, __webpack_require__) {
34907
34908 "use strict";
34909
34910 exports.__esModule = true;
34911 exports.AwaitExpression = exports.FunctionTypeAnnotation = undefined;
34912 exports.NullableTypeAnnotation = NullableTypeAnnotation;
34913 exports.UpdateExpression = UpdateExpression;
34914 exports.ObjectExpression = ObjectExpression;
34915 exports.DoExpression = DoExpression;
34916 exports.Binary = Binary;
34917 exports.BinaryExpression = BinaryExpression;
34918 exports.SequenceExpression = SequenceExpression;
34919 exports.YieldExpression = YieldExpression;
34920 exports.ClassExpression = ClassExpression;
34921 exports.UnaryLike = UnaryLike;
34922 exports.FunctionExpression = FunctionExpression;
34923 exports.ArrowFunctionExpression = ArrowFunctionExpression;
34924 exports.ConditionalExpression = ConditionalExpression;
34925 exports.AssignmentExpression = AssignmentExpression;
34926
34927 var _babelTypes = __webpack_require__(1);
34928
34929 var t = _interopRequireWildcard(_babelTypes);
34930
34931 function _interopRequireWildcard(obj) {
34932 if (obj && obj.__esModule) {
34933 return obj;
34934 } else {
34935 var newObj = {};if (obj != null) {
34936 for (var key in obj) {
34937 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
34938 }
34939 }newObj.default = obj;return newObj;
34940 }
34941 }
34942
34943 var PRECEDENCE = {
34944 "||": 0,
34945 "&&": 1,
34946 "|": 2,
34947 "^": 3,
34948 "&": 4,
34949 "==": 5,
34950 "===": 5,
34951 "!=": 5,
34952 "!==": 5,
34953 "<": 6,
34954 ">": 6,
34955 "<=": 6,
34956 ">=": 6,
34957 in: 6,
34958 instanceof: 6,
34959 ">>": 7,
34960 "<<": 7,
34961 ">>>": 7,
34962 "+": 8,
34963 "-": 8,
34964 "*": 9,
34965 "/": 9,
34966 "%": 9,
34967 "**": 10
34968 };
34969
34970 function NullableTypeAnnotation(node, parent) {
34971 return t.isArrayTypeAnnotation(parent);
34972 }
34973
34974 exports.FunctionTypeAnnotation = NullableTypeAnnotation;
34975 function UpdateExpression(node, parent) {
34976 return t.isMemberExpression(parent) && parent.object === node;
34977 }
34978
34979 function ObjectExpression(node, parent, printStack) {
34980 return isFirstInStatement(printStack, { considerArrow: true });
34981 }
34982
34983 function DoExpression(node, parent, printStack) {
34984 return isFirstInStatement(printStack);
34985 }
34986
34987 function Binary(node, parent) {
34988 if ((t.isCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isUnaryLike(parent) || t.isMemberExpression(parent) && parent.object === node || t.isAwaitExpression(parent)) {
34989 return true;
34990 }
34991
34992 if (t.isBinary(parent)) {
34993 var parentOp = parent.operator;
34994 var parentPos = PRECEDENCE[parentOp];
34995
34996 var nodeOp = node.operator;
34997 var nodePos = PRECEDENCE[nodeOp];
34998
34999 if (parentPos === nodePos && parent.right === node && !t.isLogicalExpression(parent) || parentPos > nodePos) {
35000 return true;
35001 }
35002 }
35003
35004 return false;
35005 }
35006
35007 function BinaryExpression(node, parent) {
35008 return node.operator === "in" && (t.isVariableDeclarator(parent) || t.isFor(parent));
35009 }
35010
35011 function SequenceExpression(node, parent) {
35012
35013 if (t.isForStatement(parent) || t.isThrowStatement(parent) || t.isReturnStatement(parent) || t.isIfStatement(parent) && parent.test === node || t.isWhileStatement(parent) && parent.test === node || t.isForInStatement(parent) && parent.right === node || t.isSwitchStatement(parent) && parent.discriminant === node || t.isExpressionStatement(parent) && parent.expression === node) {
35014 return false;
35015 }
35016
35017 return true;
35018 }
35019
35020 function YieldExpression(node, parent) {
35021 return t.isBinary(parent) || t.isUnaryLike(parent) || t.isCallExpression(parent) || t.isMemberExpression(parent) || t.isNewExpression(parent) || t.isConditionalExpression(parent) && node === parent.test;
35022 }
35023
35024 exports.AwaitExpression = YieldExpression;
35025 function ClassExpression(node, parent, printStack) {
35026 return isFirstInStatement(printStack, { considerDefaultExports: true });
35027 }
35028
35029 function UnaryLike(node, parent) {
35030 return t.isMemberExpression(parent, { object: node }) || t.isCallExpression(parent, { callee: node }) || t.isNewExpression(parent, { callee: node });
35031 }
35032
35033 function FunctionExpression(node, parent, printStack) {
35034 return isFirstInStatement(printStack, { considerDefaultExports: true });
35035 }
35036
35037 function ArrowFunctionExpression(node, parent) {
35038 if (t.isExportDeclaration(parent) || t.isBinaryExpression(parent) || t.isLogicalExpression(parent) || t.isUnaryExpression(parent) || t.isTaggedTemplateExpression(parent)) {
35039 return true;
35040 }
35041
35042 return UnaryLike(node, parent);
35043 }
35044
35045 function ConditionalExpression(node, parent) {
35046 if (t.isUnaryLike(parent) || t.isBinary(parent) || t.isConditionalExpression(parent, { test: node }) || t.isAwaitExpression(parent)) {
35047 return true;
35048 }
35049
35050 return UnaryLike(node, parent);
35051 }
35052
35053 function AssignmentExpression(node) {
35054 if (t.isObjectPattern(node.left)) {
35055 return true;
35056 } else {
35057 return ConditionalExpression.apply(undefined, arguments);
35058 }
35059 }
35060
35061 function isFirstInStatement(printStack) {
35062 var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
35063 _ref$considerArrow = _ref.considerArrow,
35064 considerArrow = _ref$considerArrow === undefined ? false : _ref$considerArrow,
35065 _ref$considerDefaultE = _ref.considerDefaultExports,
35066 considerDefaultExports = _ref$considerDefaultE === undefined ? false : _ref$considerDefaultE;
35067
35068 var i = printStack.length - 1;
35069 var node = printStack[i];
35070 i--;
35071 var parent = printStack[i];
35072 while (i > 0) {
35073 if (t.isExpressionStatement(parent, { expression: node }) || t.isTaggedTemplateExpression(parent) || considerDefaultExports && t.isExportDefaultDeclaration(parent, { declaration: node }) || considerArrow && t.isArrowFunctionExpression(parent, { body: node })) {
35074 return true;
35075 }
35076
35077 if (t.isCallExpression(parent, { callee: node }) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isMemberExpression(parent, { object: node }) || t.isConditional(parent, { test: node }) || t.isBinary(parent, { left: node }) || t.isAssignmentExpression(parent, { left: node })) {
35078 node = parent;
35079 i--;
35080 parent = printStack[i];
35081 } else {
35082 return false;
35083 }
35084 }
35085
35086 return false;
35087 }
35088
35089/***/ }),
35090/* 311 */
35091/***/ (function(module, exports, __webpack_require__) {
35092
35093 "use strict";
35094
35095 var _map = __webpack_require__(588);
35096
35097 var _map2 = _interopRequireDefault(_map);
35098
35099 var _babelTypes = __webpack_require__(1);
35100
35101 var t = _interopRequireWildcard(_babelTypes);
35102
35103 function _interopRequireWildcard(obj) {
35104 if (obj && obj.__esModule) {
35105 return obj;
35106 } else {
35107 var newObj = {};if (obj != null) {
35108 for (var key in obj) {
35109 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
35110 }
35111 }newObj.default = obj;return newObj;
35112 }
35113 }
35114
35115 function _interopRequireDefault(obj) {
35116 return obj && obj.__esModule ? obj : { default: obj };
35117 }
35118
35119 function crawl(node) {
35120 var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
35121
35122 if (t.isMemberExpression(node)) {
35123 crawl(node.object, state);
35124 if (node.computed) crawl(node.property, state);
35125 } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
35126 crawl(node.left, state);
35127 crawl(node.right, state);
35128 } else if (t.isCallExpression(node)) {
35129 state.hasCall = true;
35130 crawl(node.callee, state);
35131 } else if (t.isFunction(node)) {
35132 state.hasFunction = true;
35133 } else if (t.isIdentifier(node)) {
35134 state.hasHelper = state.hasHelper || isHelper(node.callee);
35135 }
35136
35137 return state;
35138 }
35139
35140 function isHelper(node) {
35141 if (t.isMemberExpression(node)) {
35142 return isHelper(node.object) || isHelper(node.property);
35143 } else if (t.isIdentifier(node)) {
35144 return node.name === "require" || node.name[0] === "_";
35145 } else if (t.isCallExpression(node)) {
35146 return isHelper(node.callee);
35147 } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
35148 return t.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
35149 } else {
35150 return false;
35151 }
35152 }
35153
35154 function isType(node) {
35155 return t.isLiteral(node) || t.isObjectExpression(node) || t.isArrayExpression(node) || t.isIdentifier(node) || t.isMemberExpression(node);
35156 }
35157
35158 exports.nodes = {
35159 AssignmentExpression: function AssignmentExpression(node) {
35160 var state = crawl(node.right);
35161 if (state.hasCall && state.hasHelper || state.hasFunction) {
35162 return {
35163 before: state.hasFunction,
35164 after: true
35165 };
35166 }
35167 },
35168 SwitchCase: function SwitchCase(node, parent) {
35169 return {
35170 before: node.consequent.length || parent.cases[0] === node
35171 };
35172 },
35173 LogicalExpression: function LogicalExpression(node) {
35174 if (t.isFunction(node.left) || t.isFunction(node.right)) {
35175 return {
35176 after: true
35177 };
35178 }
35179 },
35180 Literal: function Literal(node) {
35181 if (node.value === "use strict") {
35182 return {
35183 after: true
35184 };
35185 }
35186 },
35187 CallExpression: function CallExpression(node) {
35188 if (t.isFunction(node.callee) || isHelper(node)) {
35189 return {
35190 before: true,
35191 after: true
35192 };
35193 }
35194 },
35195 VariableDeclaration: function VariableDeclaration(node) {
35196 for (var i = 0; i < node.declarations.length; i++) {
35197 var declar = node.declarations[i];
35198
35199 var enabled = isHelper(declar.id) && !isType(declar.init);
35200 if (!enabled) {
35201 var state = crawl(declar.init);
35202 enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
35203 }
35204
35205 if (enabled) {
35206 return {
35207 before: true,
35208 after: true
35209 };
35210 }
35211 }
35212 },
35213 IfStatement: function IfStatement(node) {
35214 if (t.isBlockStatement(node.consequent)) {
35215 return {
35216 before: true,
35217 after: true
35218 };
35219 }
35220 }
35221 };
35222
35223 exports.nodes.ObjectProperty = exports.nodes.ObjectTypeProperty = exports.nodes.ObjectMethod = exports.nodes.SpreadProperty = function (node, parent) {
35224 if (parent.properties[0] === node) {
35225 return {
35226 before: true
35227 };
35228 }
35229 };
35230
35231 exports.list = {
35232 VariableDeclaration: function VariableDeclaration(node) {
35233 return (0, _map2.default)(node.declarations, "init");
35234 },
35235 ArrayExpression: function ArrayExpression(node) {
35236 return node.elements;
35237 },
35238 ObjectExpression: function ObjectExpression(node) {
35239 return node.properties;
35240 }
35241 };
35242
35243 [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) {
35244 var type = _ref[0],
35245 amounts = _ref[1];
35246
35247 if (typeof amounts === "boolean") {
35248 amounts = { after: amounts, before: amounts };
35249 }
35250 [type].concat(t.FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
35251 exports.nodes[type] = function () {
35252 return amounts;
35253 };
35254 });
35255 });
35256
35257/***/ }),
35258/* 312 */
35259/***/ (function(module, exports, __webpack_require__) {
35260
35261 "use strict";
35262
35263 exports.__esModule = true;
35264
35265 var _assign = __webpack_require__(87);
35266
35267 var _assign2 = _interopRequireDefault(_assign);
35268
35269 var _getIterator2 = __webpack_require__(2);
35270
35271 var _getIterator3 = _interopRequireDefault(_getIterator2);
35272
35273 var _stringify = __webpack_require__(35);
35274
35275 var _stringify2 = _interopRequireDefault(_stringify);
35276
35277 var _weakSet = __webpack_require__(365);
35278
35279 var _weakSet2 = _interopRequireDefault(_weakSet);
35280
35281 var _classCallCheck2 = __webpack_require__(3);
35282
35283 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
35284
35285 var _find = __webpack_require__(579);
35286
35287 var _find2 = _interopRequireDefault(_find);
35288
35289 var _findLast = __webpack_require__(581);
35290
35291 var _findLast2 = _interopRequireDefault(_findLast);
35292
35293 var _isInteger = __webpack_require__(586);
35294
35295 var _isInteger2 = _interopRequireDefault(_isInteger);
35296
35297 var _repeat = __webpack_require__(278);
35298
35299 var _repeat2 = _interopRequireDefault(_repeat);
35300
35301 var _buffer = __webpack_require__(300);
35302
35303 var _buffer2 = _interopRequireDefault(_buffer);
35304
35305 var _node = __webpack_require__(187);
35306
35307 var n = _interopRequireWildcard(_node);
35308
35309 var _whitespace = __webpack_require__(314);
35310
35311 var _whitespace2 = _interopRequireDefault(_whitespace);
35312
35313 var _babelTypes = __webpack_require__(1);
35314
35315 var t = _interopRequireWildcard(_babelTypes);
35316
35317 function _interopRequireWildcard(obj) {
35318 if (obj && obj.__esModule) {
35319 return obj;
35320 } else {
35321 var newObj = {};if (obj != null) {
35322 for (var key in obj) {
35323 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
35324 }
35325 }newObj.default = obj;return newObj;
35326 }
35327 }
35328
35329 function _interopRequireDefault(obj) {
35330 return obj && obj.__esModule ? obj : { default: obj };
35331 }
35332
35333 var SCIENTIFIC_NOTATION = /e/i;
35334 var ZERO_DECIMAL_INTEGER = /\.0+$/;
35335 var NON_DECIMAL_LITERAL = /^0[box]/;
35336
35337 var Printer = function () {
35338 function Printer(format, map, tokens) {
35339 (0, _classCallCheck3.default)(this, Printer);
35340 this.inForStatementInitCounter = 0;
35341 this._printStack = [];
35342 this._indent = 0;
35343 this._insideAux = false;
35344 this._printedCommentStarts = {};
35345 this._parenPushNewlineState = null;
35346 this._printAuxAfterOnNextUserNode = false;
35347 this._printedComments = new _weakSet2.default();
35348 this._endsWithInteger = false;
35349 this._endsWithWord = false;
35350
35351 this.format = format || {};
35352 this._buf = new _buffer2.default(map);
35353 this._whitespace = tokens.length > 0 ? new _whitespace2.default(tokens) : null;
35354 }
35355
35356 Printer.prototype.generate = function generate(ast) {
35357 this.print(ast);
35358 this._maybeAddAuxComment();
35359
35360 return this._buf.get();
35361 };
35362
35363 Printer.prototype.indent = function indent() {
35364 if (this.format.compact || this.format.concise) return;
35365
35366 this._indent++;
35367 };
35368
35369 Printer.prototype.dedent = function dedent() {
35370 if (this.format.compact || this.format.concise) return;
35371
35372 this._indent--;
35373 };
35374
35375 Printer.prototype.semicolon = function semicolon() {
35376 var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
35377
35378 this._maybeAddAuxComment();
35379 this._append(";", !force);
35380 };
35381
35382 Printer.prototype.rightBrace = function rightBrace() {
35383 if (this.format.minified) {
35384 this._buf.removeLastSemicolon();
35385 }
35386 this.token("}");
35387 };
35388
35389 Printer.prototype.space = function space() {
35390 var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
35391
35392 if (this.format.compact) return;
35393
35394 if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
35395 this._space();
35396 }
35397 };
35398
35399 Printer.prototype.word = function word(str) {
35400 if (this._endsWithWord) this._space();
35401
35402 this._maybeAddAuxComment();
35403 this._append(str);
35404
35405 this._endsWithWord = true;
35406 };
35407
35408 Printer.prototype.number = function number(str) {
35409 this.word(str);
35410
35411 this._endsWithInteger = (0, _isInteger2.default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
35412 };
35413
35414 Printer.prototype.token = function token(str) {
35415 if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
35416 this._space();
35417 }
35418
35419 this._maybeAddAuxComment();
35420 this._append(str);
35421 };
35422
35423 Printer.prototype.newline = function newline(i) {
35424 if (this.format.retainLines || this.format.compact) return;
35425
35426 if (this.format.concise) {
35427 this.space();
35428 return;
35429 }
35430
35431 if (this.endsWith("\n\n")) return;
35432
35433 if (typeof i !== "number") i = 1;
35434
35435 i = Math.min(2, i);
35436 if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
35437 if (i <= 0) return;
35438
35439 for (var j = 0; j < i; j++) {
35440 this._newline();
35441 }
35442 };
35443
35444 Printer.prototype.endsWith = function endsWith(str) {
35445 return this._buf.endsWith(str);
35446 };
35447
35448 Printer.prototype.removeTrailingNewline = function removeTrailingNewline() {
35449 this._buf.removeTrailingNewline();
35450 };
35451
35452 Printer.prototype.source = function source(prop, loc) {
35453 this._catchUp(prop, loc);
35454
35455 this._buf.source(prop, loc);
35456 };
35457
35458 Printer.prototype.withSource = function withSource(prop, loc, cb) {
35459 this._catchUp(prop, loc);
35460
35461 this._buf.withSource(prop, loc, cb);
35462 };
35463
35464 Printer.prototype._space = function _space() {
35465 this._append(" ", true);
35466 };
35467
35468 Printer.prototype._newline = function _newline() {
35469 this._append("\n", true);
35470 };
35471
35472 Printer.prototype._append = function _append(str) {
35473 var queue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
35474
35475 this._maybeAddParen(str);
35476 this._maybeIndent(str);
35477
35478 if (queue) this._buf.queue(str);else this._buf.append(str);
35479
35480 this._endsWithWord = false;
35481 this._endsWithInteger = false;
35482 };
35483
35484 Printer.prototype._maybeIndent = function _maybeIndent(str) {
35485 if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
35486 this._buf.queue(this._getIndent());
35487 }
35488 };
35489
35490 Printer.prototype._maybeAddParen = function _maybeAddParen(str) {
35491 var parenPushNewlineState = this._parenPushNewlineState;
35492 if (!parenPushNewlineState) return;
35493 this._parenPushNewlineState = null;
35494
35495 var i = void 0;
35496 for (i = 0; i < str.length && str[i] === " "; i++) {
35497 continue;
35498 }if (i === str.length) return;
35499
35500 var cha = str[i];
35501 if (cha === "\n" || cha === "/") {
35502 this.token("(");
35503 this.indent();
35504 parenPushNewlineState.printed = true;
35505 }
35506 };
35507
35508 Printer.prototype._catchUp = function _catchUp(prop, loc) {
35509 if (!this.format.retainLines) return;
35510
35511 var pos = loc ? loc[prop] : null;
35512 if (pos && pos.line !== null) {
35513 var count = pos.line - this._buf.getCurrentLine();
35514
35515 for (var i = 0; i < count; i++) {
35516 this._newline();
35517 }
35518 }
35519 };
35520
35521 Printer.prototype._getIndent = function _getIndent() {
35522 return (0, _repeat2.default)(this.format.indent.style, this._indent);
35523 };
35524
35525 Printer.prototype.startTerminatorless = function startTerminatorless() {
35526 return this._parenPushNewlineState = {
35527 printed: false
35528 };
35529 };
35530
35531 Printer.prototype.endTerminatorless = function endTerminatorless(state) {
35532 if (state.printed) {
35533 this.dedent();
35534 this.newline();
35535 this.token(")");
35536 }
35537 };
35538
35539 Printer.prototype.print = function print(node, parent) {
35540 var _this = this;
35541
35542 if (!node) return;
35543
35544 var oldConcise = this.format.concise;
35545 if (node._compact) {
35546 this.format.concise = true;
35547 }
35548
35549 var printMethod = this[node.type];
35550 if (!printMethod) {
35551 throw new ReferenceError("unknown node of type " + (0, _stringify2.default)(node.type) + " with constructor " + (0, _stringify2.default)(node && node.constructor.name));
35552 }
35553
35554 this._printStack.push(node);
35555
35556 var oldInAux = this._insideAux;
35557 this._insideAux = !node.loc;
35558 this._maybeAddAuxComment(this._insideAux && !oldInAux);
35559
35560 var needsParens = n.needsParens(node, parent, this._printStack);
35561 if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
35562 needsParens = true;
35563 }
35564 if (needsParens) this.token("(");
35565
35566 this._printLeadingComments(node, parent);
35567
35568 var loc = t.isProgram(node) || t.isFile(node) ? null : node.loc;
35569 this.withSource("start", loc, function () {
35570 _this[node.type](node, parent);
35571 });
35572
35573 this._printTrailingComments(node, parent);
35574
35575 if (needsParens) this.token(")");
35576
35577 this._printStack.pop();
35578
35579 this.format.concise = oldConcise;
35580 this._insideAux = oldInAux;
35581 };
35582
35583 Printer.prototype._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) {
35584 if (enteredPositionlessNode) this._printAuxBeforeComment();
35585 if (!this._insideAux) this._printAuxAfterComment();
35586 };
35587
35588 Printer.prototype._printAuxBeforeComment = function _printAuxBeforeComment() {
35589 if (this._printAuxAfterOnNextUserNode) return;
35590 this._printAuxAfterOnNextUserNode = true;
35591
35592 var comment = this.format.auxiliaryCommentBefore;
35593 if (comment) {
35594 this._printComment({
35595 type: "CommentBlock",
35596 value: comment
35597 });
35598 }
35599 };
35600
35601 Printer.prototype._printAuxAfterComment = function _printAuxAfterComment() {
35602 if (!this._printAuxAfterOnNextUserNode) return;
35603 this._printAuxAfterOnNextUserNode = false;
35604
35605 var comment = this.format.auxiliaryCommentAfter;
35606 if (comment) {
35607 this._printComment({
35608 type: "CommentBlock",
35609 value: comment
35610 });
35611 }
35612 };
35613
35614 Printer.prototype.getPossibleRaw = function getPossibleRaw(node) {
35615 var extra = node.extra;
35616 if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
35617 return extra.raw;
35618 }
35619 };
35620
35621 Printer.prototype.printJoin = function printJoin(nodes, parent) {
35622 var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
35623
35624 if (!nodes || !nodes.length) return;
35625
35626 if (opts.indent) this.indent();
35627
35628 var newlineOpts = {
35629 addNewlines: opts.addNewlines
35630 };
35631
35632 for (var i = 0; i < nodes.length; i++) {
35633 var node = nodes[i];
35634 if (!node) continue;
35635
35636 if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
35637
35638 this.print(node, parent);
35639
35640 if (opts.iterator) {
35641 opts.iterator(node, i);
35642 }
35643
35644 if (opts.separator && i < nodes.length - 1) {
35645 opts.separator.call(this);
35646 }
35647
35648 if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
35649 }
35650
35651 if (opts.indent) this.dedent();
35652 };
35653
35654 Printer.prototype.printAndIndentOnComments = function printAndIndentOnComments(node, parent) {
35655 var indent = !!node.leadingComments;
35656 if (indent) this.indent();
35657 this.print(node, parent);
35658 if (indent) this.dedent();
35659 };
35660
35661 Printer.prototype.printBlock = function printBlock(parent) {
35662 var node = parent.body;
35663
35664 if (!t.isEmptyStatement(node)) {
35665 this.space();
35666 }
35667
35668 this.print(node, parent);
35669 };
35670
35671 Printer.prototype._printTrailingComments = function _printTrailingComments(node, parent) {
35672 this._printComments(this._getComments(false, node, parent));
35673 };
35674
35675 Printer.prototype._printLeadingComments = function _printLeadingComments(node, parent) {
35676 this._printComments(this._getComments(true, node, parent));
35677 };
35678
35679 Printer.prototype.printInnerComments = function printInnerComments(node) {
35680 var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
35681
35682 if (!node.innerComments) return;
35683 if (indent) this.indent();
35684 this._printComments(node.innerComments);
35685 if (indent) this.dedent();
35686 };
35687
35688 Printer.prototype.printSequence = function printSequence(nodes, parent) {
35689 var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
35690
35691 opts.statement = true;
35692 return this.printJoin(nodes, parent, opts);
35693 };
35694
35695 Printer.prototype.printList = function printList(items, parent) {
35696 var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
35697
35698 if (opts.separator == null) {
35699 opts.separator = commaSeparator;
35700 }
35701
35702 return this.printJoin(items, parent, opts);
35703 };
35704
35705 Printer.prototype._printNewline = function _printNewline(leading, node, parent, opts) {
35706 var _this2 = this;
35707
35708 if (this.format.retainLines || this.format.compact) return;
35709
35710 if (this.format.concise) {
35711 this.space();
35712 return;
35713 }
35714
35715 var lines = 0;
35716
35717 if (node.start != null && !node._ignoreUserWhitespace && this._whitespace) {
35718 if (leading) {
35719 var _comments = node.leadingComments;
35720 var _comment = _comments && (0, _find2.default)(_comments, function (comment) {
35721 return !!comment.loc && _this2.format.shouldPrintComment(comment.value);
35722 });
35723
35724 lines = this._whitespace.getNewlinesBefore(_comment || node);
35725 } else {
35726 var _comments2 = node.trailingComments;
35727 var _comment2 = _comments2 && (0, _findLast2.default)(_comments2, function (comment) {
35728 return !!comment.loc && _this2.format.shouldPrintComment(comment.value);
35729 });
35730
35731 lines = this._whitespace.getNewlinesAfter(_comment2 || node);
35732 }
35733 } else {
35734 if (!leading) lines++;
35735 if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
35736
35737 var needs = n.needsWhitespaceAfter;
35738 if (leading) needs = n.needsWhitespaceBefore;
35739 if (needs(node, parent)) lines++;
35740
35741 if (!this._buf.hasContent()) lines = 0;
35742 }
35743
35744 this.newline(lines);
35745 };
35746
35747 Printer.prototype._getComments = function _getComments(leading, node) {
35748 return node && (leading ? node.leadingComments : node.trailingComments) || [];
35749 };
35750
35751 Printer.prototype._printComment = function _printComment(comment) {
35752 var _this3 = this;
35753
35754 if (!this.format.shouldPrintComment(comment.value)) return;
35755
35756 if (comment.ignore) return;
35757
35758 if (this._printedComments.has(comment)) return;
35759 this._printedComments.add(comment);
35760
35761 if (comment.start != null) {
35762 if (this._printedCommentStarts[comment.start]) return;
35763 this._printedCommentStarts[comment.start] = true;
35764 }
35765
35766 this.newline(this._whitespace ? this._whitespace.getNewlinesBefore(comment) : 0);
35767
35768 if (!this.endsWith("[") && !this.endsWith("{")) this.space();
35769
35770 var val = comment.type === "CommentLine" ? "//" + comment.value + "\n" : "/*" + comment.value + "*/";
35771
35772 if (comment.type === "CommentBlock" && this.format.indent.adjustMultilineComment) {
35773 var offset = comment.loc && comment.loc.start.column;
35774 if (offset) {
35775 var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
35776 val = val.replace(newlineRegex, "\n");
35777 }
35778
35779 var indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn());
35780 val = val.replace(/\n(?!$)/g, "\n" + (0, _repeat2.default)(" ", indentSize));
35781 }
35782
35783 this.withSource("start", comment.loc, function () {
35784 _this3._append(val);
35785 });
35786
35787 this.newline((this._whitespace ? this._whitespace.getNewlinesAfter(comment) : 0) + (comment.type === "CommentLine" ? -1 : 0));
35788 };
35789
35790 Printer.prototype._printComments = function _printComments(comments) {
35791 if (!comments || !comments.length) return;
35792
35793 for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
35794 var _ref;
35795
35796 if (_isArray) {
35797 if (_i >= _iterator.length) break;
35798 _ref = _iterator[_i++];
35799 } else {
35800 _i = _iterator.next();
35801 if (_i.done) break;
35802 _ref = _i.value;
35803 }
35804
35805 var _comment3 = _ref;
35806
35807 this._printComment(_comment3);
35808 }
35809 };
35810
35811 return Printer;
35812 }();
35813
35814 exports.default = Printer;
35815
35816 function commaSeparator() {
35817 this.token(",");
35818 this.space();
35819 }
35820
35821 var _arr = [__webpack_require__(309), __webpack_require__(303), __webpack_require__(308), __webpack_require__(302), __webpack_require__(306), __webpack_require__(307), __webpack_require__(123), __webpack_require__(304), __webpack_require__(301), __webpack_require__(305)];
35822 for (var _i2 = 0; _i2 < _arr.length; _i2++) {
35823 var generator = _arr[_i2];
35824 (0, _assign2.default)(Printer.prototype, generator);
35825 }
35826 module.exports = exports["default"];
35827
35828/***/ }),
35829/* 313 */
35830/***/ (function(module, exports, __webpack_require__) {
35831
35832 "use strict";
35833
35834 exports.__esModule = true;
35835
35836 var _keys = __webpack_require__(14);
35837
35838 var _keys2 = _interopRequireDefault(_keys);
35839
35840 var _typeof2 = __webpack_require__(11);
35841
35842 var _typeof3 = _interopRequireDefault(_typeof2);
35843
35844 var _classCallCheck2 = __webpack_require__(3);
35845
35846 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
35847
35848 var _sourceMap = __webpack_require__(288);
35849
35850 var _sourceMap2 = _interopRequireDefault(_sourceMap);
35851
35852 function _interopRequireDefault(obj) {
35853 return obj && obj.__esModule ? obj : { default: obj };
35854 }
35855
35856 var SourceMap = function () {
35857 function SourceMap(opts, code) {
35858 (0, _classCallCheck3.default)(this, SourceMap);
35859
35860 this._cachedMap = null;
35861 this._code = code;
35862 this._opts = opts;
35863 this._rawMappings = [];
35864 }
35865
35866 SourceMap.prototype.get = function get() {
35867 if (!this._cachedMap) {
35868 var map = this._cachedMap = new _sourceMap2.default.SourceMapGenerator({
35869 file: this._opts.sourceMapTarget,
35870 sourceRoot: this._opts.sourceRoot
35871 });
35872
35873 var code = this._code;
35874 if (typeof code === "string") {
35875 map.setSourceContent(this._opts.sourceFileName, code);
35876 } else if ((typeof code === "undefined" ? "undefined" : (0, _typeof3.default)(code)) === "object") {
35877 (0, _keys2.default)(code).forEach(function (sourceFileName) {
35878 map.setSourceContent(sourceFileName, code[sourceFileName]);
35879 });
35880 }
35881
35882 this._rawMappings.forEach(map.addMapping, map);
35883 }
35884
35885 return this._cachedMap.toJSON();
35886 };
35887
35888 SourceMap.prototype.getRawMappings = function getRawMappings() {
35889 return this._rawMappings.slice();
35890 };
35891
35892 SourceMap.prototype.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename) {
35893 if (this._lastGenLine !== generatedLine && line === null) return;
35894
35895 if (this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
35896 return;
35897 }
35898
35899 this._cachedMap = null;
35900 this._lastGenLine = generatedLine;
35901 this._lastSourceLine = line;
35902 this._lastSourceColumn = column;
35903
35904 this._rawMappings.push({
35905 name: identifierName || undefined,
35906 generated: {
35907 line: generatedLine,
35908 column: generatedColumn
35909 },
35910 source: line == null ? undefined : filename || this._opts.sourceFileName,
35911 original: line == null ? undefined : {
35912 line: line,
35913 column: column
35914 }
35915 });
35916 };
35917
35918 return SourceMap;
35919 }();
35920
35921 exports.default = SourceMap;
35922 module.exports = exports["default"];
35923
35924/***/ }),
35925/* 314 */
35926/***/ (function(module, exports, __webpack_require__) {
35927
35928 "use strict";
35929
35930 exports.__esModule = true;
35931
35932 var _classCallCheck2 = __webpack_require__(3);
35933
35934 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
35935
35936 function _interopRequireDefault(obj) {
35937 return obj && obj.__esModule ? obj : { default: obj };
35938 }
35939
35940 var Whitespace = function () {
35941 function Whitespace(tokens) {
35942 (0, _classCallCheck3.default)(this, Whitespace);
35943
35944 this.tokens = tokens;
35945 this.used = {};
35946 }
35947
35948 Whitespace.prototype.getNewlinesBefore = function getNewlinesBefore(node) {
35949 var startToken = void 0;
35950 var endToken = void 0;
35951 var tokens = this.tokens;
35952
35953 var index = this._findToken(function (token) {
35954 return token.start - node.start;
35955 }, 0, tokens.length);
35956 if (index >= 0) {
35957 while (index && node.start === tokens[index - 1].start) {
35958 --index;
35959 }startToken = tokens[index - 1];
35960 endToken = tokens[index];
35961 }
35962
35963 return this._getNewlinesBetween(startToken, endToken);
35964 };
35965
35966 Whitespace.prototype.getNewlinesAfter = function getNewlinesAfter(node) {
35967 var startToken = void 0;
35968 var endToken = void 0;
35969 var tokens = this.tokens;
35970
35971 var index = this._findToken(function (token) {
35972 return token.end - node.end;
35973 }, 0, tokens.length);
35974 if (index >= 0) {
35975 while (index && node.end === tokens[index - 1].end) {
35976 --index;
35977 }startToken = tokens[index];
35978 endToken = tokens[index + 1];
35979 if (endToken.type.label === ",") endToken = tokens[index + 2];
35980 }
35981
35982 if (endToken && endToken.type.label === "eof") {
35983 return 1;
35984 } else {
35985 return this._getNewlinesBetween(startToken, endToken);
35986 }
35987 };
35988
35989 Whitespace.prototype._getNewlinesBetween = function _getNewlinesBetween(startToken, endToken) {
35990 if (!endToken || !endToken.loc) return 0;
35991
35992 var start = startToken ? startToken.loc.end.line : 1;
35993 var end = endToken.loc.start.line;
35994 var lines = 0;
35995
35996 for (var line = start; line < end; line++) {
35997 if (typeof this.used[line] === "undefined") {
35998 this.used[line] = true;
35999 lines++;
36000 }
36001 }
36002
36003 return lines;
36004 };
36005
36006 Whitespace.prototype._findToken = function _findToken(test, start, end) {
36007 if (start >= end) return -1;
36008 var middle = start + end >>> 1;
36009 var match = test(this.tokens[middle]);
36010 if (match < 0) {
36011 return this._findToken(test, middle + 1, end);
36012 } else if (match > 0) {
36013 return this._findToken(test, start, middle);
36014 } else if (match === 0) {
36015 return middle;
36016 }
36017 return -1;
36018 };
36019
36020 return Whitespace;
36021 }();
36022
36023 exports.default = Whitespace;
36024 module.exports = exports["default"];
36025
36026/***/ }),
36027/* 315 */
36028/***/ (function(module, exports, __webpack_require__) {
36029
36030 "use strict";
36031
36032 exports.__esModule = true;
36033
36034 var _getIterator2 = __webpack_require__(2);
36035
36036 var _getIterator3 = _interopRequireDefault(_getIterator2);
36037
36038 exports.default = bindifyDecorators;
36039
36040 var _babelTypes = __webpack_require__(1);
36041
36042 var t = _interopRequireWildcard(_babelTypes);
36043
36044 function _interopRequireWildcard(obj) {
36045 if (obj && obj.__esModule) {
36046 return obj;
36047 } else {
36048 var newObj = {};if (obj != null) {
36049 for (var key in obj) {
36050 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
36051 }
36052 }newObj.default = obj;return newObj;
36053 }
36054 }
36055
36056 function _interopRequireDefault(obj) {
36057 return obj && obj.__esModule ? obj : { default: obj };
36058 }
36059
36060 function bindifyDecorators(decorators) {
36061 for (var _iterator = decorators, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
36062 var _ref;
36063
36064 if (_isArray) {
36065 if (_i >= _iterator.length) break;
36066 _ref = _iterator[_i++];
36067 } else {
36068 _i = _iterator.next();
36069 if (_i.done) break;
36070 _ref = _i.value;
36071 }
36072
36073 var decoratorPath = _ref;
36074
36075 var decorator = decoratorPath.node;
36076 var expression = decorator.expression;
36077 if (!t.isMemberExpression(expression)) continue;
36078
36079 var temp = decoratorPath.scope.maybeGenerateMemoised(expression.object);
36080 var ref = void 0;
36081
36082 var nodes = [];
36083
36084 if (temp) {
36085 ref = temp;
36086 nodes.push(t.assignmentExpression("=", temp, expression.object));
36087 } else {
36088 ref = expression.object;
36089 }
36090
36091 nodes.push(t.callExpression(t.memberExpression(t.memberExpression(ref, expression.property, expression.computed), t.identifier("bind")), [ref]));
36092
36093 if (nodes.length === 1) {
36094 decorator.expression = nodes[0];
36095 } else {
36096 decorator.expression = t.sequenceExpression(nodes);
36097 }
36098 }
36099 }
36100 module.exports = exports["default"];
36101
36102/***/ }),
36103/* 316 */
36104/***/ (function(module, exports, __webpack_require__) {
36105
36106 "use strict";
36107
36108 exports.__esModule = true;
36109
36110 exports.default = function (opts) {
36111 var visitor = {};
36112
36113 function isAssignment(node) {
36114 return node && node.operator === opts.operator + "=";
36115 }
36116
36117 function buildAssignment(left, right) {
36118 return t.assignmentExpression("=", left, right);
36119 }
36120
36121 visitor.ExpressionStatement = function (path, file) {
36122 if (path.isCompletionRecord()) return;
36123
36124 var expr = path.node.expression;
36125 if (!isAssignment(expr)) return;
36126
36127 var nodes = [];
36128 var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(expr.left, nodes, file, path.scope, true);
36129
36130 nodes.push(t.expressionStatement(buildAssignment(exploded.ref, opts.build(exploded.uid, expr.right))));
36131
36132 path.replaceWithMultiple(nodes);
36133 };
36134
36135 visitor.AssignmentExpression = function (path, file) {
36136 var node = path.node,
36137 scope = path.scope;
36138
36139 if (!isAssignment(node)) return;
36140
36141 var nodes = [];
36142 var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(node.left, nodes, file, scope);
36143 nodes.push(buildAssignment(exploded.ref, opts.build(exploded.uid, node.right)));
36144 path.replaceWithMultiple(nodes);
36145 };
36146
36147 visitor.BinaryExpression = function (path) {
36148 var node = path.node;
36149
36150 if (node.operator === opts.operator) {
36151 path.replaceWith(opts.build(node.left, node.right));
36152 }
36153 };
36154
36155 return visitor;
36156 };
36157
36158 var _babelHelperExplodeAssignableExpression = __webpack_require__(318);
36159
36160 var _babelHelperExplodeAssignableExpression2 = _interopRequireDefault(_babelHelperExplodeAssignableExpression);
36161
36162 var _babelTypes = __webpack_require__(1);
36163
36164 var t = _interopRequireWildcard(_babelTypes);
36165
36166 function _interopRequireWildcard(obj) {
36167 if (obj && obj.__esModule) {
36168 return obj;
36169 } else {
36170 var newObj = {};if (obj != null) {
36171 for (var key in obj) {
36172 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
36173 }
36174 }newObj.default = obj;return newObj;
36175 }
36176 }
36177
36178 function _interopRequireDefault(obj) {
36179 return obj && obj.__esModule ? obj : { default: obj };
36180 }
36181
36182 module.exports = exports["default"];
36183
36184/***/ }),
36185/* 317 */
36186/***/ (function(module, exports, __webpack_require__) {
36187
36188 "use strict";
36189
36190 exports.__esModule = true;
36191
36192 exports.default = function (path) {
36193 var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : path.scope;
36194 var node = path.node;
36195
36196 var container = t.functionExpression(null, [], node.body, node.generator, node.async);
36197
36198 var callee = container;
36199 var args = [];
36200
36201 (0, _babelHelperHoistVariables2.default)(path, function (id) {
36202 return scope.push({ id: id });
36203 });
36204
36205 var state = {
36206 foundThis: false,
36207 foundArguments: false
36208 };
36209
36210 path.traverse(visitor, state);
36211
36212 if (state.foundArguments) {
36213 callee = t.memberExpression(container, t.identifier("apply"));
36214 args = [];
36215
36216 if (state.foundThis) {
36217 args.push(t.thisExpression());
36218 }
36219
36220 if (state.foundArguments) {
36221 if (!state.foundThis) args.push(t.nullLiteral());
36222 args.push(t.identifier("arguments"));
36223 }
36224 }
36225
36226 var call = t.callExpression(callee, args);
36227 if (node.generator) call = t.yieldExpression(call, true);
36228
36229 return t.returnStatement(call);
36230 };
36231
36232 var _babelHelperHoistVariables = __webpack_require__(190);
36233
36234 var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables);
36235
36236 var _babelTypes = __webpack_require__(1);
36237
36238 var t = _interopRequireWildcard(_babelTypes);
36239
36240 function _interopRequireWildcard(obj) {
36241 if (obj && obj.__esModule) {
36242 return obj;
36243 } else {
36244 var newObj = {};if (obj != null) {
36245 for (var key in obj) {
36246 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
36247 }
36248 }newObj.default = obj;return newObj;
36249 }
36250 }
36251
36252 function _interopRequireDefault(obj) {
36253 return obj && obj.__esModule ? obj : { default: obj };
36254 }
36255
36256 var visitor = {
36257 enter: function enter(path, state) {
36258 if (path.isThisExpression()) {
36259 state.foundThis = true;
36260 }
36261
36262 if (path.isReferencedIdentifier({ name: "arguments" })) {
36263 state.foundArguments = true;
36264 }
36265 },
36266 Function: function Function(path) {
36267 path.skip();
36268 }
36269 };
36270
36271 module.exports = exports["default"];
36272
36273/***/ }),
36274/* 318 */
36275/***/ (function(module, exports, __webpack_require__) {
36276
36277 "use strict";
36278
36279 exports.__esModule = true;
36280
36281 exports.default = function (node, nodes, file, scope, allowedSingleIdent) {
36282 var obj = void 0;
36283 if (t.isIdentifier(node) && allowedSingleIdent) {
36284 obj = node;
36285 } else {
36286 obj = getObjRef(node, nodes, file, scope);
36287 }
36288
36289 var ref = void 0,
36290 uid = void 0;
36291
36292 if (t.isIdentifier(node)) {
36293 ref = node;
36294 uid = obj;
36295 } else {
36296 var prop = getPropRef(node, nodes, file, scope);
36297 var computed = node.computed || t.isLiteral(prop);
36298 uid = ref = t.memberExpression(obj, prop, computed);
36299 }
36300
36301 return {
36302 uid: uid,
36303 ref: ref
36304 };
36305 };
36306
36307 var _babelTypes = __webpack_require__(1);
36308
36309 var t = _interopRequireWildcard(_babelTypes);
36310
36311 function _interopRequireWildcard(obj) {
36312 if (obj && obj.__esModule) {
36313 return obj;
36314 } else {
36315 var newObj = {};if (obj != null) {
36316 for (var key in obj) {
36317 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
36318 }
36319 }newObj.default = obj;return newObj;
36320 }
36321 }
36322
36323 function getObjRef(node, nodes, file, scope) {
36324 var ref = void 0;
36325 if (t.isSuper(node)) {
36326 return node;
36327 } else if (t.isIdentifier(node)) {
36328 if (scope.hasBinding(node.name)) {
36329 return node;
36330 } else {
36331 ref = node;
36332 }
36333 } else if (t.isMemberExpression(node)) {
36334 ref = node.object;
36335
36336 if (t.isSuper(ref) || t.isIdentifier(ref) && scope.hasBinding(ref.name)) {
36337 return ref;
36338 }
36339 } else {
36340 throw new Error("We can't explode this node type " + node.type);
36341 }
36342
36343 var temp = scope.generateUidIdentifierBasedOnNode(ref);
36344 nodes.push(t.variableDeclaration("var", [t.variableDeclarator(temp, ref)]));
36345 return temp;
36346 }
36347
36348 function getPropRef(node, nodes, file, scope) {
36349 var prop = node.property;
36350 var key = t.toComputedKey(node, prop);
36351 if (t.isLiteral(key) && t.isPureish(key)) return key;
36352
36353 var temp = scope.generateUidIdentifierBasedOnNode(prop);
36354 nodes.push(t.variableDeclaration("var", [t.variableDeclarator(temp, prop)]));
36355 return temp;
36356 }
36357
36358 module.exports = exports["default"];
36359
36360/***/ }),
36361/* 319 */
36362/***/ (function(module, exports, __webpack_require__) {
36363
36364 "use strict";
36365
36366 exports.__esModule = true;
36367
36368 var _getIterator2 = __webpack_require__(2);
36369
36370 var _getIterator3 = _interopRequireDefault(_getIterator2);
36371
36372 exports.default = function (classPath) {
36373 classPath.assertClass();
36374
36375 var memoisedExpressions = [];
36376
36377 function maybeMemoise(path) {
36378 if (!path.node || path.isPure()) return;
36379
36380 var uid = classPath.scope.generateDeclaredUidIdentifier();
36381 memoisedExpressions.push(t.assignmentExpression("=", uid, path.node));
36382 path.replaceWith(uid);
36383 }
36384
36385 function memoiseDecorators(paths) {
36386 if (!Array.isArray(paths) || !paths.length) return;
36387
36388 paths = paths.reverse();
36389
36390 (0, _babelHelperBindifyDecorators2.default)(paths);
36391
36392 for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
36393 var _ref;
36394
36395 if (_isArray) {
36396 if (_i >= _iterator.length) break;
36397 _ref = _iterator[_i++];
36398 } else {
36399 _i = _iterator.next();
36400 if (_i.done) break;
36401 _ref = _i.value;
36402 }
36403
36404 var path = _ref;
36405
36406 maybeMemoise(path);
36407 }
36408 }
36409
36410 maybeMemoise(classPath.get("superClass"));
36411 memoiseDecorators(classPath.get("decorators"), true);
36412
36413 var methods = classPath.get("body.body");
36414 for (var _iterator2 = methods, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
36415 var _ref2;
36416
36417 if (_isArray2) {
36418 if (_i2 >= _iterator2.length) break;
36419 _ref2 = _iterator2[_i2++];
36420 } else {
36421 _i2 = _iterator2.next();
36422 if (_i2.done) break;
36423 _ref2 = _i2.value;
36424 }
36425
36426 var methodPath = _ref2;
36427
36428 if (methodPath.is("computed")) {
36429 maybeMemoise(methodPath.get("key"));
36430 }
36431
36432 if (methodPath.has("decorators")) {
36433 memoiseDecorators(classPath.get("decorators"));
36434 }
36435 }
36436
36437 if (memoisedExpressions) {
36438 classPath.insertBefore(memoisedExpressions.map(function (expr) {
36439 return t.expressionStatement(expr);
36440 }));
36441 }
36442 };
36443
36444 var _babelHelperBindifyDecorators = __webpack_require__(315);
36445
36446 var _babelHelperBindifyDecorators2 = _interopRequireDefault(_babelHelperBindifyDecorators);
36447
36448 var _babelTypes = __webpack_require__(1);
36449
36450 var t = _interopRequireWildcard(_babelTypes);
36451
36452 function _interopRequireWildcard(obj) {
36453 if (obj && obj.__esModule) {
36454 return obj;
36455 } else {
36456 var newObj = {};if (obj != null) {
36457 for (var key in obj) {
36458 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
36459 }
36460 }newObj.default = obj;return newObj;
36461 }
36462 }
36463
36464 function _interopRequireDefault(obj) {
36465 return obj && obj.__esModule ? obj : { default: obj };
36466 }
36467
36468 module.exports = exports["default"];
36469
36470/***/ }),
36471/* 320 */
36472/***/ (function(module, exports, __webpack_require__) {
36473
36474 "use strict";
36475
36476 exports.__esModule = true;
36477
36478 exports.default = function (path, helpers) {
36479 var node = path.node,
36480 scope = path.scope,
36481 parent = path.parent;
36482
36483 var stepKey = scope.generateUidIdentifier("step");
36484 var stepValue = scope.generateUidIdentifier("value");
36485 var left = node.left;
36486 var declar = void 0;
36487
36488 if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {
36489 declar = t.expressionStatement(t.assignmentExpression("=", left, stepValue));
36490 } else if (t.isVariableDeclaration(left)) {
36491 declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, stepValue)]);
36492 }
36493
36494 var template = buildForAwait();
36495
36496 (0, _babelTraverse2.default)(template, forAwaitVisitor, null, {
36497 ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
36498 ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
36499 ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
36500 ITERATOR_KEY: scope.generateUidIdentifier("iterator"),
36501 GET_ITERATOR: helpers.getAsyncIterator,
36502 OBJECT: node.right,
36503 STEP_VALUE: stepValue,
36504 STEP_KEY: stepKey,
36505 AWAIT: helpers.wrapAwait
36506 });
36507
36508 template = template.body.body;
36509
36510 var isLabeledParent = t.isLabeledStatement(parent);
36511 var tryBody = template[3].block.body;
36512 var loop = tryBody[0];
36513
36514 if (isLabeledParent) {
36515 tryBody[0] = t.labeledStatement(parent.label, loop);
36516 }
36517
36518 return {
36519 replaceParent: isLabeledParent,
36520 node: template,
36521 declar: declar,
36522 loop: loop
36523 };
36524 };
36525
36526 var _babelTypes = __webpack_require__(1);
36527
36528 var t = _interopRequireWildcard(_babelTypes);
36529
36530 var _babelTemplate = __webpack_require__(4);
36531
36532 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
36533
36534 var _babelTraverse = __webpack_require__(7);
36535
36536 var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
36537
36538 function _interopRequireDefault(obj) {
36539 return obj && obj.__esModule ? obj : { default: obj };
36540 }
36541
36542 function _interopRequireWildcard(obj) {
36543 if (obj && obj.__esModule) {
36544 return obj;
36545 } else {
36546 var newObj = {};if (obj != null) {
36547 for (var key in obj) {
36548 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
36549 }
36550 }newObj.default = obj;return newObj;
36551 }
36552 }
36553
36554 var buildForAwait = (0, _babelTemplate2.default)("\n function* wrapper() {\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY, STEP_VALUE;\n (\n STEP_KEY = yield AWAIT(ITERATOR_KEY.next()),\n ITERATOR_COMPLETION = STEP_KEY.done,\n STEP_VALUE = yield AWAIT(STEP_KEY.value),\n !ITERATOR_COMPLETION\n );\n ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n yield AWAIT(ITERATOR_KEY.return());\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n");
36555
36556 var forAwaitVisitor = {
36557 noScope: true,
36558
36559 Identifier: function Identifier(path, replacements) {
36560 if (path.node.name in replacements) {
36561 path.replaceInline(replacements[path.node.name]);
36562 }
36563 },
36564 CallExpression: function CallExpression(path, replacements) {
36565 var callee = path.node.callee;
36566
36567 if (t.isIdentifier(callee) && callee.name === "AWAIT" && !replacements.AWAIT) {
36568 path.replaceWith(path.node.arguments[0]);
36569 }
36570 }
36571 };
36572
36573 module.exports = exports["default"];
36574
36575/***/ }),
36576/* 321 */
36577/***/ (function(module, exports, __webpack_require__) {
36578
36579 "use strict";
36580
36581 exports.__esModule = true;
36582
36583 var _babelTemplate = __webpack_require__(4);
36584
36585 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
36586
36587 function _interopRequireDefault(obj) {
36588 return obj && obj.__esModule ? obj : { default: obj };
36589 }
36590
36591 var helpers = {};
36592 exports.default = helpers;
36593
36594 helpers.typeof = (0, _babelTemplate2.default)("\n (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj;\n };\n");
36595
36596 helpers.jsx = (0, _babelTemplate2.default)("\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we're going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n");
36597
36598 helpers.asyncIterator = (0, _babelTemplate2.default)("\n (function (iterable) {\n if (typeof Symbol === \"function\") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError(\"Object is not async iterable\");\n })\n");
36599
36600 helpers.asyncGenerator = (0, _babelTemplate2.default)("\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume(\"next\", arg); },\n function (arg) { resume(\"throw\", arg); });\n } else {\n settle(result.done ? \"return\" : \"normal\", result.value);\n }\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({ value: value, done: true });\n break;\n case \"throw\":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide \"return\" method if generator return is not supported\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke(\"next\", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke(\"throw\", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke(\"return\", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n");
36601
36602 helpers.asyncGeneratorDelegate = (0, _babelTemplate2.default)("\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === \"function\" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"next\", value);\n };\n\n if (typeof inner.throw === \"function\") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner.return === \"function\") {\n iter.return = function (value) {\n return pump(\"return\", value);\n };\n }\n\n return iter;\n })\n");
36603
36604 helpers.asyncToGenerator = (0, _babelTemplate2.default)("\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n })\n");
36605
36606 helpers.classCallCheck = (0, _babelTemplate2.default)("\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n });\n");
36607
36608 helpers.createClass = (0, _babelTemplate2.default)("\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n");
36609
36610 helpers.defineEnumerableProperties = (0, _babelTemplate2.default)("\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n");
36611
36612 helpers.defaults = (0, _babelTemplate2.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n");
36613
36614 helpers.defineProperty = (0, _babelTemplate2.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n");
36615
36616 helpers.extends = (0, _babelTemplate2.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n");
36617
36618 helpers.get = (0, _babelTemplate2.default)("\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n");
36619
36620 helpers.inherits = (0, _babelTemplate2.default)("\n (function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n");
36621
36622 helpers.instanceof = (0, _babelTemplate2.default)("\n (function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n");
36623
36624 helpers.interopRequireDefault = (0, _babelTemplate2.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n");
36625
36626 helpers.interopRequireWildcard = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n");
36627
36628 helpers.newArrowCheck = (0, _babelTemplate2.default)("\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n });\n");
36629
36630 helpers.objectDestructuringEmpty = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n });\n");
36631
36632 helpers.objectWithoutProperties = (0, _babelTemplate2.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n");
36633
36634 helpers.possibleConstructorReturn = (0, _babelTemplate2.default)("\n (function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n });\n");
36635
36636 helpers.selfGlobal = (0, _babelTemplate2.default)("\n typeof global === \"undefined\" ? self : global\n");
36637
36638 helpers.set = (0, _babelTemplate2.default)("\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n");
36639
36640 helpers.slicedToArray = (0, _babelTemplate2.default)("\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n })();\n");
36641
36642 helpers.slicedToArrayLoose = (0, _babelTemplate2.default)("\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n });\n");
36643
36644 helpers.taggedTemplateLiteral = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n");
36645
36646 helpers.taggedTemplateLiteralLoose = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n");
36647
36648 helpers.temporalRef = (0, _babelTemplate2.default)("\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n })\n");
36649
36650 helpers.temporalUndefined = (0, _babelTemplate2.default)("\n ({})\n");
36651
36652 helpers.toArray = (0, _babelTemplate2.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n");
36653
36654 helpers.toConsumableArray = (0, _babelTemplate2.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n");
36655 module.exports = exports["default"];
36656
36657/***/ }),
36658/* 322 */
36659/***/ (function(module, exports) {
36660
36661 "use strict";
36662
36663 exports.__esModule = true;
36664
36665 exports.default = function (_ref) {
36666 var t = _ref.types;
36667
36668 return {
36669 pre: function pre(file) {
36670 file.set("helpersNamespace", t.identifier("babelHelpers"));
36671 }
36672 };
36673 };
36674
36675 module.exports = exports["default"];
36676
36677/***/ }),
36678/* 323 */
36679/***/ (function(module, exports, __webpack_require__) {
36680
36681 /**
36682 * Created at 16/5/18.
36683 * @Author Ling.
36684 * @Email i@zeroling.com
36685 */
36686 'use strict';
36687
36688 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
36689
36690 var babylon = __webpack_require__(89);
36691
36692 module.exports = function (babel) {
36693 var t = babel.types;
36694 // cache for performance
36695 var parseMap = {};
36696
36697 return {
36698 visitor: {
36699 Identifier: function Identifier(path, state) {
36700 if (path.parent.type === 'MemberExpression') {
36701 return;
36702 }
36703 if (path.parent.type === 'ClassMethod') {
36704 return;
36705 }
36706 if (path.isPure()) {
36707 return;
36708 }
36709 if (!state.opts.hasOwnProperty(path.node.name)) {
36710 return;
36711 }
36712 var replacementDescriptor = state.opts[path.node.name];
36713 if (replacementDescriptor === undefined || replacementDescriptor === null) {
36714 replacementDescriptor = t.identifier(String(replacementDescriptor));
36715 }
36716
36717 var type = typeof replacementDescriptor === 'undefined' ? 'undefined' : _typeof(replacementDescriptor);
36718 if (type === 'string' || type === 'boolean') {
36719 replacementDescriptor = {
36720 type: type,
36721 replacement: replacementDescriptor
36722 };
36723 } else if (t.isNode(replacementDescriptor)) {
36724 replacementDescriptor = {
36725 type: 'node',
36726 replacement: replacementDescriptor
36727 };
36728 } else if (type === 'object' && replacementDescriptor.type === 'node' && typeof replacementDescriptor.replacement === 'string') {
36729 replacementDescriptor.replacement = parseMap[replacementDescriptor.replacement] ? parseMap[replacementDescriptor.replacement] : babylon.parseExpression(replacementDescriptor.replacement);
36730 }
36731
36732 var replacement = replacementDescriptor.replacement;
36733 switch (replacementDescriptor.type) {
36734 case 'boolean':
36735 path.replaceWith(t.booleanLiteral(replacement));
36736 break;
36737 case 'node':
36738 if (t.isNode(replacement)) {
36739 path.replaceWith(replacement);
36740 }
36741 break;
36742 default:
36743 // treat as string
36744 var str = String(replacement);
36745 path.replaceWith(t.stringLiteral(str));
36746 break;
36747 }
36748 }
36749 }
36750 };
36751 };
36752
36753/***/ }),
36754/* 324 */
36755/***/ (function(module, exports) {
36756
36757 "use strict";
36758
36759 exports.__esModule = true;
36760
36761 exports.default = function () {
36762 return {
36763 manipulateOptions: function manipulateOptions(opts, parserOpts) {
36764 parserOpts.plugins.push("dynamicImport");
36765 }
36766 };
36767 };
36768
36769 module.exports = exports["default"];
36770
36771/***/ }),
36772/* 325 */
36773/***/ (function(module, exports) {
36774
36775 "use strict";
36776
36777 exports.__esModule = true;
36778
36779 exports.default = function () {
36780 return {
36781 manipulateOptions: function manipulateOptions(opts, parserOpts) {
36782 parserOpts.plugins.push("functionSent");
36783 }
36784 };
36785 };
36786
36787 module.exports = exports["default"];
36788
36789/***/ }),
36790/* 326 */
36791/***/ (function(module, exports, __webpack_require__) {
36792
36793 "use strict";
36794
36795 exports.__esModule = true;
36796
36797 exports.default = function () {
36798 return {
36799 inherits: __webpack_require__(67)
36800 };
36801 };
36802
36803 module.exports = exports["default"];
36804
36805/***/ }),
36806/* 327 */
36807/***/ (function(module, exports, __webpack_require__) {
36808
36809 "use strict";
36810
36811 exports.__esModule = true;
36812
36813 exports.default = function (_ref) {
36814 var t = _ref.types;
36815
36816 var yieldStarVisitor = {
36817 Function: function Function(path) {
36818 path.skip();
36819 },
36820 YieldExpression: function YieldExpression(_ref2, state) {
36821 var node = _ref2.node;
36822
36823 if (!node.delegate) return;
36824 var callee = state.addHelper("asyncGeneratorDelegate");
36825 node.argument = t.callExpression(callee, [t.callExpression(state.addHelper("asyncIterator"), [node.argument]), t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await"))]);
36826 }
36827 };
36828
36829 return {
36830 inherits: __webpack_require__(195),
36831 visitor: {
36832 Function: function Function(path, state) {
36833 if (!path.node.async || !path.node.generator) return;
36834
36835 path.traverse(yieldStarVisitor, state);
36836
36837 (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, {
36838 wrapAsync: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("wrap")),
36839 wrapAwait: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await"))
36840 });
36841 }
36842 }
36843 };
36844 };
36845
36846 var _babelHelperRemapAsyncToGenerator = __webpack_require__(124);
36847
36848 var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator);
36849
36850 function _interopRequireDefault(obj) {
36851 return obj && obj.__esModule ? obj : { default: obj };
36852 }
36853
36854 module.exports = exports["default"];
36855
36856/***/ }),
36857/* 328 */
36858/***/ (function(module, exports, __webpack_require__) {
36859
36860 "use strict";
36861
36862 exports.__esModule = true;
36863
36864 exports.default = function () {
36865 return {
36866 inherits: __webpack_require__(67),
36867
36868 visitor: {
36869 Function: function Function(path, state) {
36870 if (!path.node.async || path.node.generator) return;
36871
36872 (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, {
36873 wrapAsync: state.addImport(state.opts.module, state.opts.method)
36874 });
36875 }
36876 }
36877 };
36878 };
36879
36880 var _babelHelperRemapAsyncToGenerator = __webpack_require__(124);
36881
36882 var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator);
36883
36884 function _interopRequireDefault(obj) {
36885 return obj && obj.__esModule ? obj : { default: obj };
36886 }
36887
36888 module.exports = exports["default"];
36889
36890/***/ }),
36891/* 329 */
36892/***/ (function(module, exports, __webpack_require__) {
36893
36894 'use strict';
36895
36896 Object.defineProperty(exports, "__esModule", {
36897 value: true
36898 });
36899
36900 exports.default = function (_ref) {
36901 var t = _ref.types;
36902
36903 /**
36904 * Add a helper to take an initial descriptor, apply some decorators to it, and optionally
36905 * define the property.
36906 */
36907 function ensureApplyDecoratedDescriptorHelper(path, state) {
36908 if (!state.applyDecoratedDescriptor) {
36909 state.applyDecoratedDescriptor = path.scope.generateUidIdentifier('applyDecoratedDescriptor');
36910 var helper = buildApplyDecoratedDescriptor({
36911 NAME: state.applyDecoratedDescriptor
36912 });
36913 path.scope.getProgramParent().path.unshiftContainer('body', helper);
36914 }
36915
36916 return state.applyDecoratedDescriptor;
36917 }
36918
36919 /**
36920 * Add a helper to call as a replacement for class property definition.
36921 */
36922 function ensureInitializerDefineProp(path, state) {
36923 if (!state.initializerDefineProp) {
36924 state.initializerDefineProp = path.scope.generateUidIdentifier('initDefineProp');
36925 var helper = buildInitializerDefineProperty({
36926 NAME: state.initializerDefineProp
36927 });
36928 path.scope.getProgramParent().path.unshiftContainer('body', helper);
36929 }
36930
36931 return state.initializerDefineProp;
36932 }
36933
36934 /**
36935 * Add a helper that will throw a useful error if the transform fails to detect the class
36936 * property assignment, so users know something failed.
36937 */
36938 function ensureInitializerWarning(path, state) {
36939 if (!state.initializerWarningHelper) {
36940 state.initializerWarningHelper = path.scope.generateUidIdentifier('initializerWarningHelper');
36941 var helper = buildInitializerWarningHelper({
36942 NAME: state.initializerWarningHelper
36943 });
36944 path.scope.getProgramParent().path.unshiftContainer('body', helper);
36945 }
36946
36947 return state.initializerWarningHelper;
36948 }
36949
36950 /**
36951 * If the decorator expressions are non-identifiers, hoist them to before the class so we can be sure
36952 * that they are evaluated in order.
36953 */
36954 function applyEnsureOrdering(path) {
36955 // TODO: This should probably also hoist computed properties.
36956 var decorators = (path.isClass() ? [path].concat(path.get('body.body')) : path.get('properties')).reduce(function (acc, prop) {
36957 return acc.concat(prop.node.decorators || []);
36958 }, []);
36959
36960 var identDecorators = decorators.filter(function (decorator) {
36961 return !t.isIdentifier(decorator.expression);
36962 });
36963 if (identDecorators.length === 0) return;
36964
36965 return t.sequenceExpression(identDecorators.map(function (decorator) {
36966 var expression = decorator.expression;
36967 var id = decorator.expression = path.scope.generateDeclaredUidIdentifier('dec');
36968 return t.assignmentExpression('=', id, expression);
36969 }).concat([path.node]));
36970 }
36971
36972 /**
36973 * Given a class expression with class-level decorators, create a new expression
36974 * with the proper decorated behavior.
36975 */
36976 function applyClassDecorators(classPath, state) {
36977 var decorators = classPath.node.decorators || [];
36978 classPath.node.decorators = null;
36979
36980 if (decorators.length === 0) return;
36981
36982 var name = classPath.scope.generateDeclaredUidIdentifier('class');
36983
36984 return decorators.map(function (dec) {
36985 return dec.expression;
36986 }).reverse().reduce(function (acc, decorator) {
36987 return buildClassDecorator({
36988 CLASS_REF: name,
36989 DECORATOR: decorator,
36990 INNER: acc
36991 }).expression;
36992 }, classPath.node);
36993 }
36994
36995 /**
36996 * Given a class expression with method-level decorators, create a new expression
36997 * with the proper decorated behavior.
36998 */
36999 function applyMethodDecorators(path, state) {
37000 var hasMethodDecorators = path.node.body.body.some(function (node) {
37001 return (node.decorators || []).length > 0;
37002 });
37003
37004 if (!hasMethodDecorators) return;
37005
37006 return applyTargetDecorators(path, state, path.node.body.body);
37007 }
37008
37009 /**
37010 * Given an object expression with property decorators, create a new expression
37011 * with the proper decorated behavior.
37012 */
37013 function applyObjectDecorators(path, state) {
37014 var hasMethodDecorators = path.node.properties.some(function (node) {
37015 return (node.decorators || []).length > 0;
37016 });
37017
37018 if (!hasMethodDecorators) return;
37019
37020 return applyTargetDecorators(path, state, path.node.properties);
37021 }
37022
37023 /**
37024 * A helper to pull out property decorators into a sequence expression.
37025 */
37026 function applyTargetDecorators(path, state, decoratedProps) {
37027 var descName = path.scope.generateDeclaredUidIdentifier('desc');
37028 var valueTemp = path.scope.generateDeclaredUidIdentifier('value');
37029
37030 var name = path.scope.generateDeclaredUidIdentifier(path.isClass() ? 'class' : 'obj');
37031
37032 var exprs = decoratedProps.reduce(function (acc, node) {
37033 var decorators = node.decorators || [];
37034 node.decorators = null;
37035
37036 if (decorators.length === 0) return acc;
37037
37038 if (node.computed) {
37039 throw path.buildCodeFrameError('Computed method/property decorators are not yet supported.');
37040 }
37041
37042 var property = t.isLiteral(node.key) ? node.key : t.stringLiteral(node.key.name);
37043
37044 var target = path.isClass() && !node.static ? buildClassPrototype({
37045 CLASS_REF: name
37046 }).expression : name;
37047
37048 if (t.isClassProperty(node, { static: false })) {
37049 var descriptor = path.scope.generateDeclaredUidIdentifier('descriptor');
37050
37051 var initializer = node.value ? t.functionExpression(null, [], t.blockStatement([t.returnStatement(node.value)])) : t.nullLiteral();
37052 node.value = t.callExpression(ensureInitializerWarning(path, state), [descriptor, t.thisExpression()]);
37053
37054 acc = acc.concat([t.assignmentExpression('=', descriptor, t.callExpression(ensureApplyDecoratedDescriptorHelper(path, state), [target, property, t.arrayExpression(decorators.map(function (dec) {
37055 return dec.expression;
37056 })), t.objectExpression([t.objectProperty(t.identifier('enumerable'), t.booleanLiteral(true)), t.objectProperty(t.identifier('initializer'), initializer)])]))]);
37057 } else {
37058 acc = acc.concat(t.callExpression(ensureApplyDecoratedDescriptorHelper(path, state), [target, property, t.arrayExpression(decorators.map(function (dec) {
37059 return dec.expression;
37060 })), t.isObjectProperty(node) || t.isClassProperty(node, { static: true }) ? buildGetObjectInitializer({
37061 TEMP: path.scope.generateDeclaredUidIdentifier('init'),
37062 TARGET: target,
37063 PROPERTY: property
37064 }).expression : buildGetDescriptor({
37065 TARGET: target,
37066 PROPERTY: property
37067 }).expression, target]));
37068 }
37069
37070 return acc;
37071 }, []);
37072
37073 return t.sequenceExpression([t.assignmentExpression('=', name, path.node), t.sequenceExpression(exprs), name]);
37074 }
37075
37076 return {
37077 inherits: __webpack_require__(125),
37078
37079 visitor: {
37080 ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
37081 if (!path.get("declaration").isClassDeclaration()) return;
37082
37083 var node = path.node;
37084
37085 var ref = node.declaration.id || path.scope.generateUidIdentifier("default");
37086 node.declaration.id = ref;
37087
37088 // Split the class declaration and the export into two separate statements.
37089 path.replaceWith(node.declaration);
37090 path.insertAfter(t.exportNamedDeclaration(null, [t.exportSpecifier(ref, t.identifier('default'))]));
37091 },
37092 ClassDeclaration: function ClassDeclaration(path) {
37093 var node = path.node;
37094
37095 var ref = node.id || path.scope.generateUidIdentifier("class");
37096
37097 path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(ref, t.toExpression(node))]));
37098 },
37099 ClassExpression: function ClassExpression(path, state) {
37100 // Create a replacement for the class node if there is one. We do one pass to replace classes with
37101 // class decorators, and a second pass to process method decorators.
37102 var decoratedClass = applyEnsureOrdering(path) || applyClassDecorators(path, state) || applyMethodDecorators(path, state);
37103
37104 if (decoratedClass) path.replaceWith(decoratedClass);
37105 },
37106 ObjectExpression: function ObjectExpression(path, state) {
37107 var decoratedObject = applyEnsureOrdering(path) || applyObjectDecorators(path, state);
37108
37109 if (decoratedObject) path.replaceWith(decoratedObject);
37110 },
37111 AssignmentExpression: function AssignmentExpression(path, state) {
37112 if (!state.initializerWarningHelper) return;
37113
37114 if (!path.get('left').isMemberExpression()) return;
37115 if (!path.get('left.property').isIdentifier()) return;
37116 if (!path.get('right').isCallExpression()) return;
37117 if (!path.get('right.callee').isIdentifier({ name: state.initializerWarningHelper.name })) return;
37118
37119 path.replaceWith(t.callExpression(ensureInitializerDefineProp(path, state), [path.get('left.object').node, t.stringLiteral(path.get('left.property').node.name), path.get('right.arguments')[0].node, path.get('right.arguments')[1].node]));
37120 }
37121 }
37122 };
37123 };
37124
37125 var _babelTemplate = __webpack_require__(4);
37126
37127 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
37128
37129 function _interopRequireDefault(obj) {
37130 return obj && obj.__esModule ? obj : { default: obj };
37131 }
37132
37133 var buildClassDecorator = (0, _babelTemplate2.default)('\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n');
37134
37135 var buildClassPrototype = (0, _babelTemplate2.default)('\n CLASS_REF.prototype;\n');
37136
37137 var buildGetDescriptor = (0, _babelTemplate2.default)('\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n');
37138
37139 var buildGetObjectInitializer = (0, _babelTemplate2.default)('\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n');
37140
37141 var buildInitializerWarningHelper = (0, _babelTemplate2.default)('\n function NAME(descriptor, context){\n throw new Error(\'Decorating class property failed. Please ensure that transform-class-properties is enabled.\');\n }\n');
37142
37143 var buildInitializerDefineProperty = (0, _babelTemplate2.default)('\n function NAME(target, property, descriptor, context){\n if (!descriptor) return;\n\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n');
37144
37145 var buildApplyDecoratedDescriptor = (0, _babelTemplate2.default)('\n function NAME(target, property, decorators, descriptor, context){\n var desc = {};\n Object[\'ke\' + \'ys\'](descriptor).forEach(function(key){\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if (\'value\' in desc || desc.initializer){\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function(desc, decorator){\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0){\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0){\n // This is a hack to avoid this being processed by \'transform-runtime\'.\n // See issue #9.\n Object[\'define\' + \'Property\'](target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n');
37146
37147 ;
37148
37149/***/ }),
37150/* 330 */
37151/***/ (function(module, exports, __webpack_require__) {
37152
37153 "use strict";
37154
37155 exports.__esModule = true;
37156 exports.visitor = undefined;
37157
37158 var _babelTypes = __webpack_require__(1);
37159
37160 var t = _interopRequireWildcard(_babelTypes);
37161
37162 function _interopRequireWildcard(obj) {
37163 if (obj && obj.__esModule) {
37164 return obj;
37165 } else {
37166 var newObj = {};if (obj != null) {
37167 for (var key in obj) {
37168 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
37169 }
37170 }newObj.default = obj;return newObj;
37171 }
37172 }
37173
37174 function getTDZStatus(refPath, bindingPath) {
37175 var executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath);
37176
37177 if (executionStatus === "before") {
37178 return "inside";
37179 } else if (executionStatus === "after") {
37180 return "outside";
37181 } else {
37182 return "maybe";
37183 }
37184 }
37185
37186 function buildTDZAssert(node, file) {
37187 return t.callExpression(file.addHelper("temporalRef"), [node, t.stringLiteral(node.name), file.addHelper("temporalUndefined")]);
37188 }
37189
37190 function isReference(node, scope, state) {
37191 var declared = state.letReferences[node.name];
37192 if (!declared) return false;
37193
37194 return scope.getBindingIdentifier(node.name) === declared;
37195 }
37196
37197 var visitor = exports.visitor = {
37198 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
37199 if (!this.file.opts.tdz) return;
37200
37201 var node = path.node,
37202 parent = path.parent,
37203 scope = path.scope;
37204
37205 if (path.parentPath.isFor({ left: node })) return;
37206 if (!isReference(node, scope, state)) return;
37207
37208 var bindingPath = scope.getBinding(node.name).path;
37209
37210 var status = getTDZStatus(path, bindingPath);
37211 if (status === "inside") return;
37212
37213 if (status === "maybe") {
37214 var assert = buildTDZAssert(node, state.file);
37215
37216 bindingPath.parent._tdzThis = true;
37217
37218 path.skip();
37219
37220 if (path.parentPath.isUpdateExpression()) {
37221 if (parent._ignoreBlockScopingTDZ) return;
37222 path.parentPath.replaceWith(t.sequenceExpression([assert, parent]));
37223 } else {
37224 path.replaceWith(assert);
37225 }
37226 } else if (status === "outside") {
37227 path.replaceWith(t.throwStatement(t.inherits(t.newExpression(t.identifier("ReferenceError"), [t.stringLiteral(node.name + " is not defined - temporal dead zone")]), node)));
37228 }
37229 },
37230
37231 AssignmentExpression: {
37232 exit: function exit(path, state) {
37233 if (!this.file.opts.tdz) return;
37234
37235 var node = path.node;
37236
37237 if (node._ignoreBlockScopingTDZ) return;
37238
37239 var nodes = [];
37240 var ids = path.getBindingIdentifiers();
37241
37242 for (var name in ids) {
37243 var id = ids[name];
37244
37245 if (isReference(id, path.scope, state)) {
37246 nodes.push(buildTDZAssert(id, state.file));
37247 }
37248 }
37249
37250 if (nodes.length) {
37251 node._ignoreBlockScopingTDZ = true;
37252 nodes.push(node);
37253 path.replaceWithMultiple(nodes.map(t.expressionStatement));
37254 }
37255 }
37256 }
37257 };
37258
37259/***/ }),
37260/* 331 */
37261/***/ (function(module, exports, __webpack_require__) {
37262
37263 "use strict";
37264
37265 exports.__esModule = true;
37266
37267 var _classCallCheck2 = __webpack_require__(3);
37268
37269 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
37270
37271 var _possibleConstructorReturn2 = __webpack_require__(42);
37272
37273 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
37274
37275 var _inherits2 = __webpack_require__(41);
37276
37277 var _inherits3 = _interopRequireDefault(_inherits2);
37278
37279 var _babelHelperFunctionName = __webpack_require__(40);
37280
37281 var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
37282
37283 var _vanilla = __webpack_require__(207);
37284
37285 var _vanilla2 = _interopRequireDefault(_vanilla);
37286
37287 var _babelTypes = __webpack_require__(1);
37288
37289 var t = _interopRequireWildcard(_babelTypes);
37290
37291 function _interopRequireWildcard(obj) {
37292 if (obj && obj.__esModule) {
37293 return obj;
37294 } else {
37295 var newObj = {};if (obj != null) {
37296 for (var key in obj) {
37297 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
37298 }
37299 }newObj.default = obj;return newObj;
37300 }
37301 }
37302
37303 function _interopRequireDefault(obj) {
37304 return obj && obj.__esModule ? obj : { default: obj };
37305 }
37306
37307 var LooseClassTransformer = function (_VanillaTransformer) {
37308 (0, _inherits3.default)(LooseClassTransformer, _VanillaTransformer);
37309
37310 function LooseClassTransformer() {
37311 (0, _classCallCheck3.default)(this, LooseClassTransformer);
37312
37313 var _this = (0, _possibleConstructorReturn3.default)(this, _VanillaTransformer.apply(this, arguments));
37314
37315 _this.isLoose = true;
37316 return _this;
37317 }
37318
37319 LooseClassTransformer.prototype._processMethod = function _processMethod(node, scope) {
37320 if (!node.decorators) {
37321
37322 var classRef = this.classRef;
37323 if (!node.static) classRef = t.memberExpression(classRef, t.identifier("prototype"));
37324 var methodName = t.memberExpression(classRef, node.key, node.computed || t.isLiteral(node.key));
37325
37326 var func = t.functionExpression(null, node.params, node.body, node.generator, node.async);
37327 func.returnType = node.returnType;
37328 var key = t.toComputedKey(node, node.key);
37329 if (t.isStringLiteral(key)) {
37330 func = (0, _babelHelperFunctionName2.default)({
37331 node: func,
37332 id: key,
37333 scope: scope
37334 });
37335 }
37336
37337 var expr = t.expressionStatement(t.assignmentExpression("=", methodName, func));
37338 t.inheritsComments(expr, node);
37339 this.body.push(expr);
37340 return true;
37341 }
37342 };
37343
37344 return LooseClassTransformer;
37345 }(_vanilla2.default);
37346
37347 exports.default = LooseClassTransformer;
37348 module.exports = exports["default"];
37349
37350/***/ }),
37351/* 332 */
37352/***/ (function(module, exports) {
37353
37354 "use strict";
37355
37356 exports.__esModule = true;
37357
37358 exports.default = function (_ref) {
37359 var t = _ref.types;
37360
37361 return {
37362 visitor: {
37363 BinaryExpression: function BinaryExpression(path) {
37364 var node = path.node;
37365
37366 if (node.operator === "instanceof") {
37367 path.replaceWith(t.callExpression(this.addHelper("instanceof"), [node.left, node.right]));
37368 }
37369 }
37370 }
37371 };
37372 };
37373
37374 module.exports = exports["default"];
37375
37376/***/ }),
37377/* 333 */
37378/***/ (function(module, exports, __webpack_require__) {
37379
37380 "use strict";
37381
37382 exports.__esModule = true;
37383 exports.visitor = undefined;
37384
37385 var _getIterator2 = __webpack_require__(2);
37386
37387 var _getIterator3 = _interopRequireDefault(_getIterator2);
37388
37389 var _babelHelperGetFunctionArity = __webpack_require__(189);
37390
37391 var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity);
37392
37393 var _babelHelperCallDelegate = __webpack_require__(317);
37394
37395 var _babelHelperCallDelegate2 = _interopRequireDefault(_babelHelperCallDelegate);
37396
37397 var _babelTemplate = __webpack_require__(4);
37398
37399 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
37400
37401 var _babelTypes = __webpack_require__(1);
37402
37403 var t = _interopRequireWildcard(_babelTypes);
37404
37405 function _interopRequireWildcard(obj) {
37406 if (obj && obj.__esModule) {
37407 return obj;
37408 } else {
37409 var newObj = {};if (obj != null) {
37410 for (var key in obj) {
37411 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
37412 }
37413 }newObj.default = obj;return newObj;
37414 }
37415 }
37416
37417 function _interopRequireDefault(obj) {
37418 return obj && obj.__esModule ? obj : { default: obj };
37419 }
37420
37421 var buildDefaultParam = (0, _babelTemplate2.default)("\n let VARIABLE_NAME =\n ARGUMENTS.length > ARGUMENT_KEY && ARGUMENTS[ARGUMENT_KEY] !== undefined ?\n ARGUMENTS[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n");
37422
37423 var buildCutOff = (0, _babelTemplate2.default)("\n let $0 = $1[$2];\n");
37424
37425 function hasDefaults(node) {
37426 for (var _iterator = node.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
37427 var _ref;
37428
37429 if (_isArray) {
37430 if (_i >= _iterator.length) break;
37431 _ref = _iterator[_i++];
37432 } else {
37433 _i = _iterator.next();
37434 if (_i.done) break;
37435 _ref = _i.value;
37436 }
37437
37438 var param = _ref;
37439
37440 if (!t.isIdentifier(param)) return true;
37441 }
37442 return false;
37443 }
37444
37445 function isSafeBinding(scope, node) {
37446 if (!scope.hasOwnBinding(node.name)) return true;
37447
37448 var _scope$getOwnBinding = scope.getOwnBinding(node.name),
37449 kind = _scope$getOwnBinding.kind;
37450
37451 return kind === "param" || kind === "local";
37452 }
37453
37454 var iifeVisitor = {
37455 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
37456 var scope = path.scope,
37457 node = path.node;
37458
37459 if (node.name === "eval" || !isSafeBinding(scope, node)) {
37460 state.iife = true;
37461 path.stop();
37462 }
37463 },
37464 Scope: function Scope(path) {
37465 path.skip();
37466 }
37467 };
37468
37469 var visitor = exports.visitor = {
37470 Function: function Function(path) {
37471 var node = path.node,
37472 scope = path.scope;
37473
37474 if (!hasDefaults(node)) return;
37475
37476 path.ensureBlock();
37477
37478 var state = {
37479 iife: false,
37480 scope: scope
37481 };
37482
37483 var body = [];
37484
37485 var argsIdentifier = t.identifier("arguments");
37486 argsIdentifier._shadowedFunctionLiteral = path;
37487
37488 function pushDefNode(left, right, i) {
37489 var defNode = buildDefaultParam({
37490 VARIABLE_NAME: left,
37491 DEFAULT_VALUE: right,
37492 ARGUMENT_KEY: t.numericLiteral(i),
37493 ARGUMENTS: argsIdentifier
37494 });
37495 defNode._blockHoist = node.params.length - i;
37496 body.push(defNode);
37497 }
37498
37499 var lastNonDefaultParam = (0, _babelHelperGetFunctionArity2.default)(node);
37500
37501 var params = path.get("params");
37502 for (var i = 0; i < params.length; i++) {
37503 var param = params[i];
37504
37505 if (!param.isAssignmentPattern()) {
37506 if (!state.iife && !param.isIdentifier()) {
37507 param.traverse(iifeVisitor, state);
37508 }
37509
37510 continue;
37511 }
37512
37513 var left = param.get("left");
37514 var right = param.get("right");
37515
37516 if (i >= lastNonDefaultParam || left.isPattern()) {
37517 var placeholder = scope.generateUidIdentifier("x");
37518 placeholder._isDefaultPlaceholder = true;
37519 node.params[i] = placeholder;
37520 } else {
37521 node.params[i] = left.node;
37522 }
37523
37524 if (!state.iife) {
37525 if (right.isIdentifier() && !isSafeBinding(scope, right.node)) {
37526 state.iife = true;
37527 } else {
37528 right.traverse(iifeVisitor, state);
37529 }
37530 }
37531
37532 pushDefNode(left.node, right.node, i);
37533 }
37534
37535 for (var _i2 = lastNonDefaultParam + 1; _i2 < node.params.length; _i2++) {
37536 var _param = node.params[_i2];
37537 if (_param._isDefaultPlaceholder) continue;
37538
37539 var declar = buildCutOff(_param, argsIdentifier, t.numericLiteral(_i2));
37540 declar._blockHoist = node.params.length - _i2;
37541 body.push(declar);
37542 }
37543
37544 node.params = node.params.slice(0, lastNonDefaultParam);
37545
37546 if (state.iife) {
37547 body.push((0, _babelHelperCallDelegate2.default)(path, scope));
37548 path.set("body", t.blockStatement(body));
37549 } else {
37550 path.get("body").unshiftContainer("body", body);
37551 }
37552 }
37553 };
37554
37555/***/ }),
37556/* 334 */
37557/***/ (function(module, exports, __webpack_require__) {
37558
37559 "use strict";
37560
37561 exports.__esModule = true;
37562 exports.visitor = undefined;
37563
37564 var _babelTypes = __webpack_require__(1);
37565
37566 var t = _interopRequireWildcard(_babelTypes);
37567
37568 function _interopRequireWildcard(obj) {
37569 if (obj && obj.__esModule) {
37570 return obj;
37571 } else {
37572 var newObj = {};if (obj != null) {
37573 for (var key in obj) {
37574 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
37575 }
37576 }newObj.default = obj;return newObj;
37577 }
37578 }
37579
37580 var visitor = exports.visitor = {
37581 Function: function Function(path) {
37582 var params = path.get("params");
37583
37584 var hoistTweak = t.isRestElement(params[params.length - 1]) ? 1 : 0;
37585 var outputParamsLength = params.length - hoistTweak;
37586
37587 for (var i = 0; i < outputParamsLength; i++) {
37588 var param = params[i];
37589 if (param.isArrayPattern() || param.isObjectPattern()) {
37590 var uid = path.scope.generateUidIdentifier("ref");
37591
37592 var declar = t.variableDeclaration("let", [t.variableDeclarator(param.node, uid)]);
37593 declar._blockHoist = outputParamsLength - i;
37594
37595 path.ensureBlock();
37596 path.get("body").unshiftContainer("body", declar);
37597
37598 param.replaceWith(uid);
37599 }
37600 }
37601 }
37602 };
37603
37604/***/ }),
37605/* 335 */
37606/***/ (function(module, exports, __webpack_require__) {
37607
37608 "use strict";
37609
37610 exports.__esModule = true;
37611 exports.visitor = undefined;
37612
37613 var _getIterator2 = __webpack_require__(2);
37614
37615 var _getIterator3 = _interopRequireDefault(_getIterator2);
37616
37617 var _babelTemplate = __webpack_require__(4);
37618
37619 var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
37620
37621 var _babelTypes = __webpack_require__(1);
37622
37623 var t = _interopRequireWildcard(_babelTypes);
37624
37625 function _interopRequireWildcard(obj) {
37626 if (obj && obj.__esModule) {
37627 return obj;
37628 } else {
37629 var newObj = {};if (obj != null) {
37630 for (var key in obj) {
37631 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
37632 }
37633 }newObj.default = obj;return newObj;
37634 }
37635 }
37636
37637 function _interopRequireDefault(obj) {
37638 return obj && obj.__esModule ? obj : { default: obj };
37639 }
37640
37641 var buildRest = (0, _babelTemplate2.default)("\n for (var LEN = ARGUMENTS.length,\n ARRAY = Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n");
37642
37643 var restIndex = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n");
37644
37645 var restIndexImpure = (0, _babelTemplate2.default)("\n REF = INDEX, ARGUMENTS.length <= REF ? undefined : ARGUMENTS[REF]\n");
37646
37647 var restLength = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n");
37648
37649 var memberExpressionOptimisationVisitor = {
37650 Scope: function Scope(path, state) {
37651 if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {
37652 path.skip();
37653 }
37654 },
37655 Flow: function Flow(path) {
37656 if (path.isTypeCastExpression()) return;
37657
37658 path.skip();
37659 },
37660
37661 "Function|ClassProperty": function FunctionClassProperty(path, state) {
37662 var oldNoOptimise = state.noOptimise;
37663 state.noOptimise = true;
37664 path.traverse(memberExpressionOptimisationVisitor, state);
37665 state.noOptimise = oldNoOptimise;
37666
37667 path.skip();
37668 },
37669
37670 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
37671 var node = path.node;
37672
37673 if (node.name === "arguments") {
37674 state.deopted = true;
37675 }
37676
37677 if (node.name !== state.name) return;
37678
37679 if (state.noOptimise) {
37680 state.deopted = true;
37681 } else {
37682 var parentPath = path.parentPath;
37683
37684 if (parentPath.listKey === "params" && parentPath.key < state.offset) {
37685 return;
37686 }
37687
37688 if (parentPath.isMemberExpression({ object: node })) {
37689 var grandparentPath = parentPath.parentPath;
37690
37691 var argsOptEligible = !state.deopted && !(grandparentPath.isAssignmentExpression() && parentPath.node === grandparentPath.node.left || grandparentPath.isLVal() || grandparentPath.isForXStatement() || grandparentPath.isUpdateExpression() || grandparentPath.isUnaryExpression({ operator: "delete" }) || (grandparentPath.isCallExpression() || grandparentPath.isNewExpression()) && parentPath.node === grandparentPath.node.callee);
37692
37693 if (argsOptEligible) {
37694 if (parentPath.node.computed) {
37695 if (parentPath.get("property").isBaseType("number")) {
37696 state.candidates.push({ cause: "indexGetter", path: path });
37697 return;
37698 }
37699 } else if (parentPath.node.property.name === "length") {
37700 state.candidates.push({ cause: "lengthGetter", path: path });
37701 return;
37702 }
37703 }
37704 }
37705
37706 if (state.offset === 0 && parentPath.isSpreadElement()) {
37707 var call = parentPath.parentPath;
37708 if (call.isCallExpression() && call.node.arguments.length === 1) {
37709 state.candidates.push({ cause: "argSpread", path: path });
37710 return;
37711 }
37712 }
37713
37714 state.references.push(path);
37715 }
37716 },
37717 BindingIdentifier: function BindingIdentifier(_ref, state) {
37718 var node = _ref.node;
37719
37720 if (node.name === state.name) {
37721 state.deopted = true;
37722 }
37723 }
37724 };
37725 function hasRest(node) {
37726 return t.isRestElement(node.params[node.params.length - 1]);
37727 }
37728
37729 function optimiseIndexGetter(path, argsId, offset) {
37730 var index = void 0;
37731
37732 if (t.isNumericLiteral(path.parent.property)) {
37733 index = t.numericLiteral(path.parent.property.value + offset);
37734 } else if (offset === 0) {
37735 index = path.parent.property;
37736 } else {
37737 index = t.binaryExpression("+", path.parent.property, t.numericLiteral(offset));
37738 }
37739
37740 var scope = path.scope;
37741
37742 if (!scope.isPure(index)) {
37743 var temp = scope.generateUidIdentifierBasedOnNode(index);
37744 scope.push({ id: temp, kind: "var" });
37745 path.parentPath.replaceWith(restIndexImpure({
37746 ARGUMENTS: argsId,
37747 INDEX: index,
37748 REF: temp
37749 }));
37750 } else {
37751 path.parentPath.replaceWith(restIndex({
37752 ARGUMENTS: argsId,
37753 INDEX: index
37754 }));
37755 }
37756 }
37757
37758 function optimiseLengthGetter(path, argsId, offset) {
37759 if (offset) {
37760 path.parentPath.replaceWith(restLength({
37761 ARGUMENTS: argsId,
37762 OFFSET: t.numericLiteral(offset)
37763 }));
37764 } else {
37765 path.replaceWith(argsId);
37766 }
37767 }
37768
37769 var visitor = exports.visitor = {
37770 Function: function Function(path) {
37771 var node = path.node,
37772 scope = path.scope;
37773
37774 if (!hasRest(node)) return;
37775
37776 var rest = node.params.pop().argument;
37777
37778 var argsId = t.identifier("arguments");
37779
37780 argsId._shadowedFunctionLiteral = path;
37781
37782 var state = {
37783 references: [],
37784 offset: node.params.length,
37785
37786 argumentsNode: argsId,
37787 outerBinding: scope.getBindingIdentifier(rest.name),
37788
37789 candidates: [],
37790
37791 name: rest.name,
37792
37793 deopted: false
37794 };
37795
37796 path.traverse(memberExpressionOptimisationVisitor, state);
37797
37798 if (!state.deopted && !state.references.length) {
37799 for (var _iterator = state.candidates, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
37800 var _ref3;
37801
37802 if (_isArray) {
37803 if (_i >= _iterator.length) break;
37804 _ref3 = _iterator[_i++];
37805 } else {
37806 _i = _iterator.next();
37807 if (_i.done) break;
37808 _ref3 = _i.value;
37809 }
37810
37811 var _ref4 = _ref3;
37812 var _path = _ref4.path,
37813 cause = _ref4.cause;
37814
37815 switch (cause) {
37816 case "indexGetter":
37817 optimiseIndexGetter(_path, argsId, state.offset);
37818 break;
37819 case "lengthGetter":
37820 optimiseLengthGetter(_path, argsId, state.offset);
37821 break;
37822 default:
37823 _path.replaceWith(argsId);
37824 }
37825 }
37826 return;
37827 }
37828
37829 state.references = state.references.concat(state.candidates.map(function (_ref5) {
37830 var path = _ref5.path;
37831 return path;
37832 }));
37833
37834 state.deopted = state.deopted || !!node.shadow;
37835
37836 var start = t.numericLiteral(node.params.length);
37837 var key = scope.generateUidIdentifier("key");
37838 var len = scope.generateUidIdentifier("len");
37839
37840 var arrKey = key;
37841 var arrLen = len;
37842 if (node.params.length) {
37843 arrKey = t.binaryExpression("-", key, start);
37844
37845 arrLen = t.conditionalExpression(t.binaryExpression(">", len, start), t.binaryExpression("-", len, start), t.numericLiteral(0));
37846 }
37847
37848 var loop = buildRest({
37849 ARGUMENTS: argsId,
37850 ARRAY_KEY: arrKey,
37851 ARRAY_LEN: arrLen,
37852 START: start,
37853 ARRAY: rest,
37854 KEY: key,
37855 LEN: len
37856 });
37857
37858 if (state.deopted) {
37859 loop._blockHoist = node.params.length + 1;
37860 node.body.body.unshift(loop);
37861 } else {
37862 loop._blockHoist = 1;
37863
37864 var target = path.getEarliestCommonAncestorFrom(state.references).getStatementParent();
37865
37866 target.findParent(function (path) {
37867 if (path.isLoop()) {
37868 target = path;
37869 } else {
37870 return path.isFunction();
37871 }
37872 });
37873
37874 target.insertBefore(loop);
37875 }
37876 }
37877 };
37878
37879/***/ }),
37880/* 336 */
37881/***/ (function(module, exports) {
37882
37883 "use strict";
37884
37885 exports.__esModule = true;
37886
37887 exports.default = function (_ref) {
37888 var t = _ref.types;
37889
37890 return {
37891 visitor: {
37892 MemberExpression: {
37893 exit: function exit(_ref2) {
37894 var node = _ref2.node;
37895
37896 var prop = node.property;
37897 if (!node.computed && t.isIdentifier(prop) && !t.isValidIdentifier(prop.name)) {
37898 node.property = t.stringLiteral(prop.name);
37899 node.computed = true;
37900 }
37901 }
37902 }
37903 }
37904 };
37905 };
37906
37907 module.exports = exports["default"];
37908
37909/***/ }),
37910/* 337 */
37911/***/ (function(module, exports) {
37912
37913 "use strict";
37914
37915 exports.__esModule = true;
37916
37917 exports.default = function (_ref) {
37918 var t = _ref.types;
37919
37920 return {
37921 visitor: {
37922 ObjectProperty: {
37923 exit: function exit(_ref2) {
37924 var node = _ref2.node;
37925
37926 var key = node.key;
37927 if (!node.computed && t.isIdentifier(key) && !t.isValidIdentifier(key.name)) {
37928 node.key = t.stringLiteral(key.name);
37929 }
37930 }
37931 }
37932 }
37933 };
37934 };
37935
37936 module.exports = exports["default"];
37937
37938/***/ }),
37939/* 338 */
37940/***/ (function(module, exports, __webpack_require__) {
37941
37942 "use strict";
37943
37944 exports.__esModule = true;
37945
37946 var _getIterator2 = __webpack_require__(2);
37947
37948 var _getIterator3 = _interopRequireDefault(_getIterator2);
37949
37950 exports.default = function (_ref) {
37951 var t = _ref.types;
37952
37953 return {
37954 visitor: {
37955 ObjectExpression: function ObjectExpression(path, file) {
37956 var node = path.node;
37957
37958 var hasAny = false;
37959 for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
37960 var _ref2;
37961
37962 if (_isArray) {
37963 if (_i >= _iterator.length) break;
37964 _ref2 = _iterator[_i++];
37965 } else {
37966 _i = _iterator.next();
37967 if (_i.done) break;
37968 _ref2 = _i.value;
37969 }
37970
37971 var prop = _ref2;
37972
37973 if (prop.kind === "get" || prop.kind === "set") {
37974 hasAny = true;
37975 break;
37976 }
37977 }
37978 if (!hasAny) return;
37979
37980 var mutatorMap = {};
37981
37982 node.properties = node.properties.filter(function (prop) {
37983 if (!prop.computed && (prop.kind === "get" || prop.kind === "set")) {
37984 defineMap.push(mutatorMap, prop, null, file);
37985 return false;
37986 } else {
37987 return true;
37988 }
37989 });
37990
37991 path.replaceWith(t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("defineProperties")), [node, defineMap.toDefineObject(mutatorMap)]));
37992 }
37993 }
37994 };
37995 };
37996
37997 var _babelHelperDefineMap = __webpack_require__(188);
37998
37999 var defineMap = _interopRequireWildcard(_babelHelperDefineMap);
38000
38001 function _interopRequireWildcard(obj) {
38002 if (obj && obj.__esModule) {
38003 return obj;
38004 } else {
38005 var newObj = {};if (obj != null) {
38006 for (var key in obj) {
38007 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
38008 }
38009 }newObj.default = obj;return newObj;
38010 }
38011 }
38012
38013 function _interopRequireDefault(obj) {
38014 return obj && obj.__esModule ? obj : { default: obj };
38015 }
38016
38017 module.exports = exports["default"];
38018
38019/***/ }),
38020/* 339 */
38021/***/ (function(module, exports) {
38022
38023 "use strict";
38024
38025 exports.__esModule = true;
38026
38027 exports.default = function (_ref) {
38028 var parse = _ref.parse,
38029 traverse = _ref.traverse;
38030
38031 return {
38032 visitor: {
38033 CallExpression: function CallExpression(path) {
38034 if (path.get("callee").isIdentifier({ name: "eval" }) && path.node.arguments.length === 1) {
38035 var evaluate = path.get("arguments")[0].evaluate();
38036 if (!evaluate.confident) return;
38037
38038 var code = evaluate.value;
38039 if (typeof code !== "string") return;
38040
38041 var ast = parse(code);
38042 traverse.removeProperties(ast);
38043 return ast.program;
38044 }
38045 }
38046 }
38047 };
38048 };
38049
38050 module.exports = exports["default"];
38051
38052/***/ }),
38053/* 340 */
38054/***/ (function(module, exports, __webpack_require__) {
38055
38056 "use strict";
38057
38058 exports.__esModule = true;
38059
38060 exports.default = function (_ref) {
38061 var t = _ref.types;
38062
38063 function wrapInFlowComment(path, parent) {
38064 path.addComment("trailing", generateComment(path, parent));
38065 path.replaceWith(t.noop());
38066 }
38067
38068 function generateComment(path, parent) {
38069 var comment = path.getSource().replace(/\*-\//g, "*-ESCAPED/").replace(/\*\//g, "*-/");
38070 if (parent && parent.optional) comment = "?" + comment;
38071 if (comment[0] !== ":") comment = ":: " + comment;
38072 return comment;
38073 }
38074
38075 return {
38076 inherits: __webpack_require__(126),
38077
38078 visitor: {
38079 TypeCastExpression: function TypeCastExpression(path) {
38080 var node = path.node;
38081
38082 path.get("expression").addComment("trailing", generateComment(path.get("typeAnnotation")));
38083 path.replaceWith(t.parenthesizedExpression(node.expression));
38084 },
38085 Identifier: function Identifier(path) {
38086 var node = path.node;
38087
38088 if (!node.optional || node.typeAnnotation) {
38089 return;
38090 }
38091 path.addComment("trailing", ":: ?");
38092 },
38093
38094 AssignmentPattern: {
38095 exit: function exit(_ref2) {
38096 var node = _ref2.node;
38097
38098 node.left.optional = false;
38099 }
38100 },
38101
38102 Function: {
38103 exit: function exit(_ref3) {
38104 var node = _ref3.node;
38105
38106 node.params.forEach(function (param) {
38107 return param.optional = false;
38108 });
38109 }
38110 },
38111
38112 ClassProperty: function ClassProperty(path) {
38113 var node = path.node,
38114 parent = path.parent;
38115
38116 if (!node.value) wrapInFlowComment(path, parent);
38117 },
38118 "ExportNamedDeclaration|Flow": function ExportNamedDeclarationFlow(path) {
38119 var node = path.node,
38120 parent = path.parent;
38121
38122 if (t.isExportNamedDeclaration(node) && !t.isFlow(node.declaration)) {
38123 return;
38124 }
38125 wrapInFlowComment(path, parent);
38126 },
38127 ImportDeclaration: function ImportDeclaration(path) {
38128 var node = path.node,
38129 parent = path.parent;
38130
38131 if (t.isImportDeclaration(node) && node.importKind !== "type" && node.importKind !== "typeof") {
38132 return;
38133 }
38134 wrapInFlowComment(path, parent);
38135 }
38136 }
38137 };
38138 };
38139
38140 module.exports = exports["default"];
38141
38142/***/ }),
38143/* 341 */
38144/***/ (function(module, exports) {
38145
38146 "use strict";
38147
38148 exports.__esModule = true;
38149
38150 exports.default = function (_ref) {
38151 var t = _ref.types;
38152
38153 return {
38154 visitor: {
38155 FunctionExpression: {
38156 exit: function exit(path) {
38157 var node = path.node;
38158
38159 if (!node.id) return;
38160 node._ignoreUserWhitespace = true;
38161
38162 path.replaceWith(t.callExpression(t.functionExpression(null, [], t.blockStatement([t.toStatement(node), t.returnStatement(node.id)])), []));
38163 }
38164 }
38165 }
38166 };
38167 };
38168
38169 module.exports = exports["default"];
38170
38171/***/ }),
38172/* 342 */
38173/***/ (function(module, exports) {
38174
38175 "use strict";
38176
38177 exports.__esModule = true;
38178
38179 exports.default = function () {
38180 return {
38181 visitor: {
38182 CallExpression: function CallExpression(path, file) {
38183 if (path.get("callee").matchesPattern("Object.assign")) {
38184 path.node.callee = file.addHelper("extends");
38185 }
38186 }
38187 }
38188 };
38189 };
38190
38191 module.exports = exports["default"];
38192
38193/***/ }),
38194/* 343 */
38195/***/ (function(module, exports) {
38196
38197 "use strict";
38198
38199 exports.__esModule = true;
38200
38201 exports.default = function () {
38202 return {
38203 visitor: {
38204 CallExpression: function CallExpression(path, file) {
38205 if (path.get("callee").matchesPattern("Object.setPrototypeOf")) {
38206 path.node.callee = file.addHelper("defaults");
38207 }
38208 }
38209 }
38210 };
38211 };
38212
38213 module.exports = exports["default"];
38214
38215/***/ }),
38216/* 344 */
38217/***/ (function(module, exports, __webpack_require__) {
38218
38219 "use strict";
38220
38221 exports.__esModule = true;
38222
38223 var _getIterator2 = __webpack_require__(2);
38224
38225 var _getIterator3 = _interopRequireDefault(_getIterator2);
38226
38227 exports.default = function (_ref) {
38228 var t = _ref.types;
38229
38230 function isProtoKey(node) {
38231 return t.isLiteral(t.toComputedKey(node, node.key), { value: "__proto__" });
38232 }
38233
38234 function isProtoAssignmentExpression(node) {
38235 var left = node.left;
38236 return t.isMemberExpression(left) && t.isLiteral(t.toComputedKey(left, left.property), { value: "__proto__" });
38237 }
38238
38239 function buildDefaultsCallExpression(expr, ref, file) {
38240 return t.expressionStatement(t.callExpression(file.addHelper("defaults"), [ref, expr.right]));
38241 }
38242
38243 return {
38244 visitor: {
38245 AssignmentExpression: function AssignmentExpression(path, file) {
38246 if (!isProtoAssignmentExpression(path.node)) return;
38247
38248 var nodes = [];
38249 var left = path.node.left.object;
38250 var temp = path.scope.maybeGenerateMemoised(left);
38251
38252 if (temp) nodes.push(t.expressionStatement(t.assignmentExpression("=", temp, left)));
38253 nodes.push(buildDefaultsCallExpression(path.node, temp || left, file));
38254 if (temp) nodes.push(temp);
38255
38256 path.replaceWithMultiple(nodes);
38257 },
38258 ExpressionStatement: function ExpressionStatement(path, file) {
38259 var expr = path.node.expression;
38260 if (!t.isAssignmentExpression(expr, { operator: "=" })) return;
38261
38262 if (isProtoAssignmentExpression(expr)) {
38263 path.replaceWith(buildDefaultsCallExpression(expr, expr.left.object, file));
38264 }
38265 },
38266 ObjectExpression: function ObjectExpression(path, file) {
38267 var proto = void 0;
38268 var node = path.node;
38269
38270 for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
38271 var _ref2;
38272
38273 if (_isArray) {
38274 if (_i >= _iterator.length) break;
38275 _ref2 = _iterator[_i++];
38276 } else {
38277 _i = _iterator.next();
38278 if (_i.done) break;
38279 _ref2 = _i.value;
38280 }
38281
38282 var prop = _ref2;
38283
38284 if (isProtoKey(prop)) {
38285 proto = prop.value;
38286 (0, _pull2.default)(node.properties, prop);
38287 }
38288 }
38289
38290 if (proto) {
38291 var args = [t.objectExpression([]), proto];
38292 if (node.properties.length) args.push(node);
38293 path.replaceWith(t.callExpression(file.addHelper("extends"), args));
38294 }
38295 }
38296 }
38297 };
38298 };
38299
38300 var _pull = __webpack_require__(277);
38301
38302 var _pull2 = _interopRequireDefault(_pull);
38303
38304 function _interopRequireDefault(obj) {
38305 return obj && obj.__esModule ? obj : { default: obj };
38306 }
38307
38308 module.exports = exports["default"];
38309
38310/***/ }),
38311/* 345 */
38312/***/ (function(module, exports, __webpack_require__) {
38313
38314 "use strict";
38315
38316 exports.__esModule = true;
38317
38318 var _typeof2 = __webpack_require__(11);
38319
38320 var _typeof3 = _interopRequireDefault(_typeof2);
38321
38322 exports.default = function (_ref) {
38323 var t = _ref.types;
38324
38325 var immutabilityVisitor = {
38326 enter: function enter(path, state) {
38327 var stop = function stop() {
38328 state.isImmutable = false;
38329 path.stop();
38330 };
38331
38332 if (path.isJSXClosingElement()) {
38333 path.skip();
38334 return;
38335 }
38336
38337 if (path.isJSXIdentifier({ name: "ref" }) && path.parentPath.isJSXAttribute({ name: path.node })) {
38338 return stop();
38339 }
38340
38341 if (path.isJSXIdentifier() || path.isIdentifier() || path.isJSXMemberExpression()) {
38342 return;
38343 }
38344
38345 if (!path.isImmutable()) {
38346 if (path.isPure()) {
38347 var expressionResult = path.evaluate();
38348 if (expressionResult.confident) {
38349 var value = expressionResult.value;
38350
38351 var isMutable = value && (typeof value === "undefined" ? "undefined" : (0, _typeof3.default)(value)) === "object" || typeof value === "function";
38352 if (!isMutable) {
38353 return;
38354 }
38355 } else if (t.isIdentifier(expressionResult.deopt)) {
38356 return;
38357 }
38358 }
38359 stop();
38360 }
38361 }
38362 };
38363
38364 return {
38365 visitor: {
38366 JSXElement: function JSXElement(path) {
38367 if (path.node._hoisted) return;
38368
38369 var state = { isImmutable: true };
38370 path.traverse(immutabilityVisitor, state);
38371
38372 if (state.isImmutable) {
38373 path.hoist();
38374 } else {
38375 path.node._hoisted = true;
38376 }
38377 }
38378 }
38379 };
38380 };
38381
38382 function _interopRequireDefault(obj) {
38383 return obj && obj.__esModule ? obj : { default: obj };
38384 }
38385
38386 module.exports = exports["default"];
38387
38388/***/ }),
38389/* 346 */
38390/***/ (function(module, exports, __webpack_require__) {
38391
38392 "use strict";
38393
38394 exports.__esModule = true;
38395
38396 var _getIterator2 = __webpack_require__(2);
38397
38398 var _getIterator3 = _interopRequireDefault(_getIterator2);
38399
38400 exports.default = function (_ref) {
38401 var t = _ref.types;
38402
38403 function hasRefOrSpread(attrs) {
38404 for (var i = 0; i < attrs.length; i++) {
38405 var attr = attrs[i];
38406 if (t.isJSXSpreadAttribute(attr)) return true;
38407 if (isJSXAttributeOfName(attr, "ref")) return true;
38408 }
38409 return false;
38410 }
38411
38412 function isJSXAttributeOfName(attr, name) {
38413 return t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name, { name: name });
38414 }
38415
38416 function getAttributeValue(attr) {
38417 var value = attr.value;
38418 if (!value) return t.identifier("true");
38419 if (t.isJSXExpressionContainer(value)) value = value.expression;
38420 return value;
38421 }
38422
38423 return {
38424 visitor: {
38425 JSXElement: function JSXElement(path, file) {
38426 var node = path.node;
38427
38428 var open = node.openingElement;
38429 if (hasRefOrSpread(open.attributes)) return;
38430
38431 var props = t.objectExpression([]);
38432 var key = null;
38433 var type = open.name;
38434
38435 if (t.isJSXIdentifier(type) && t.react.isCompatTag(type.name)) {
38436 type = t.stringLiteral(type.name);
38437 }
38438
38439 function pushProp(objProps, key, value) {
38440 objProps.push(t.objectProperty(key, value));
38441 }
38442
38443 for (var _iterator = open.attributes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
38444 var _ref2;
38445
38446 if (_isArray) {
38447 if (_i >= _iterator.length) break;
38448 _ref2 = _iterator[_i++];
38449 } else {
38450 _i = _iterator.next();
38451 if (_i.done) break;
38452 _ref2 = _i.value;
38453 }
38454
38455 var attr = _ref2;
38456
38457 if (isJSXAttributeOfName(attr, "key")) {
38458 key = getAttributeValue(attr);
38459 } else {
38460 var name = attr.name.name;
38461 var propertyKey = t.isValidIdentifier(name) ? t.identifier(name) : t.stringLiteral(name);
38462 pushProp(props.properties, propertyKey, getAttributeValue(attr));
38463 }
38464 }
38465
38466 var args = [type, props];
38467 if (key || node.children.length) {
38468 var children = t.react.buildChildren(node);
38469 args.push.apply(args, [key || t.unaryExpression("void", t.numericLiteral(0), true)].concat(children));
38470 }
38471
38472 var el = t.callExpression(file.addHelper("jsx"), args);
38473 path.replaceWith(el);
38474 }
38475 }
38476 };
38477 };
38478
38479 function _interopRequireDefault(obj) {
38480 return obj && obj.__esModule ? obj : { default: obj };
38481 }
38482
38483 module.exports = exports["default"];
38484
38485/***/ }),
38486/* 347 */
38487/***/ (function(module, exports, __webpack_require__) {
38488
38489 "use strict";
38490
38491 exports.__esModule = true;
38492
38493 exports.default = function (_ref) {
38494 var t = _ref.types;
38495
38496 return {
38497 manipulateOptions: function manipulateOptions(opts, parserOpts) {
38498 parserOpts.plugins.push("jsx");
38499 },
38500
38501 visitor: (0, _babelHelperBuilderReactJsx2.default)({
38502 pre: function pre(state) {
38503 state.callee = state.tagExpr;
38504 },
38505 post: function post(state) {
38506 if (t.react.isCompatTag(state.tagName)) {
38507 state.call = t.callExpression(t.memberExpression(t.memberExpression(t.identifier("React"), t.identifier("DOM")), state.tagExpr, t.isLiteral(state.tagExpr)), state.args);
38508 }
38509 }
38510 })
38511 };
38512 };
38513
38514 var _babelHelperBuilderReactJsx = __webpack_require__(348);
38515
38516 var _babelHelperBuilderReactJsx2 = _interopRequireDefault(_babelHelperBuilderReactJsx);
38517
38518 function _interopRequireDefault(obj) {
38519 return obj && obj.__esModule ? obj : { default: obj };
38520 }
38521
38522 module.exports = exports["default"];
38523
38524/***/ }),
38525/* 348 */
38526/***/ (function(module, exports, __webpack_require__) {
38527
38528 "use strict";
38529
38530 exports.__esModule = true;
38531
38532 exports.default = function (opts) {
38533 var visitor = {};
38534
38535 visitor.JSXNamespacedName = function (path) {
38536 throw path.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML.");
38537 };
38538
38539 visitor.JSXElement = {
38540 exit: function exit(path, file) {
38541 var callExpr = buildElementCall(path.get("openingElement"), file);
38542
38543 callExpr.arguments = callExpr.arguments.concat(path.node.children);
38544
38545 if (callExpr.arguments.length >= 3) {
38546 callExpr._prettyCall = true;
38547 }
38548
38549 path.replaceWith(t.inherits(callExpr, path.node));
38550 }
38551 };
38552
38553 return visitor;
38554
38555 function convertJSXIdentifier(node, parent) {
38556 if (t.isJSXIdentifier(node)) {
38557 if (node.name === "this" && t.isReferenced(node, parent)) {
38558 return t.thisExpression();
38559 } else if (_esutils2.default.keyword.isIdentifierNameES6(node.name)) {
38560 node.type = "Identifier";
38561 } else {
38562 return t.stringLiteral(node.name);
38563 }
38564 } else if (t.isJSXMemberExpression(node)) {
38565 return t.memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node));
38566 }
38567
38568 return node;
38569 }
38570
38571 function convertAttributeValue(node) {
38572 if (t.isJSXExpressionContainer(node)) {
38573 return node.expression;
38574 } else {
38575 return node;
38576 }
38577 }
38578
38579 function convertAttribute(node) {
38580 var value = convertAttributeValue(node.value || t.booleanLiteral(true));
38581
38582 if (t.isStringLiteral(value) && !t.isJSXExpressionContainer(node.value)) {
38583 value.value = value.value.replace(/\n\s+/g, " ");
38584 }
38585
38586 if (t.isValidIdentifier(node.name.name)) {
38587 node.name.type = "Identifier";
38588 } else {
38589 node.name = t.stringLiteral(node.name.name);
38590 }
38591
38592 return t.inherits(t.objectProperty(node.name, value), node);
38593 }
38594
38595 function buildElementCall(path, file) {
38596 path.parent.children = t.react.buildChildren(path.parent);
38597
38598 var tagExpr = convertJSXIdentifier(path.node.name, path.node);
38599 var args = [];
38600
38601 var tagName = void 0;
38602 if (t.isIdentifier(tagExpr)) {
38603 tagName = tagExpr.name;
38604 } else if (t.isLiteral(tagExpr)) {
38605 tagName = tagExpr.value;
38606 }
38607
38608 var state = {
38609 tagExpr: tagExpr,
38610 tagName: tagName,
38611 args: args
38612 };
38613
38614 if (opts.pre) {
38615 opts.pre(state, file);
38616 }
38617
38618 var attribs = path.node.attributes;
38619 if (attribs.length) {
38620 attribs = buildOpeningElementAttributes(attribs, file);
38621 } else {
38622 attribs = t.nullLiteral();
38623 }
38624
38625 args.push(attribs);
38626
38627 if (opts.post) {
38628 opts.post(state, file);
38629 }
38630
38631 return state.call || t.callExpression(state.callee, args);
38632 }
38633
38634 function buildOpeningElementAttributes(attribs, file) {
38635 var _props = [];
38636 var objs = [];
38637
38638 var useBuiltIns = file.opts.useBuiltIns || false;
38639 if (typeof useBuiltIns !== "boolean") {
38640 throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)");
38641 }
38642
38643 function pushProps() {
38644 if (!_props.length) return;
38645
38646 objs.push(t.objectExpression(_props));
38647 _props = [];
38648 }
38649
38650 while (attribs.length) {
38651 var prop = attribs.shift();
38652 if (t.isJSXSpreadAttribute(prop)) {
38653 pushProps();
38654 objs.push(prop.argument);
38655 } else {
38656 _props.push(convertAttribute(prop));
38657 }
38658 }
38659
38660 pushProps();
38661
38662 if (objs.length === 1) {
38663 attribs = objs[0];
38664 } else {
38665 if (!t.isObjectExpression(objs[0])) {
38666 objs.unshift(t.objectExpression([]));
38667 }
38668
38669 var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends");
38670
38671 attribs = t.callExpression(helper, objs);
38672 }
38673
38674 return attribs;
38675 }
38676 };
38677
38678 var _esutils = __webpack_require__(97);
38679
38680 var _esutils2 = _interopRequireDefault(_esutils);
38681
38682 var _babelTypes = __webpack_require__(1);
38683
38684 var t = _interopRequireWildcard(_babelTypes);
38685
38686 function _interopRequireWildcard(obj) {
38687 if (obj && obj.__esModule) {
38688 return obj;
38689 } else {
38690 var newObj = {};if (obj != null) {
38691 for (var key in obj) {
38692 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
38693 }
38694 }newObj.default = obj;return newObj;
38695 }
38696 }
38697
38698 function _interopRequireDefault(obj) {
38699 return obj && obj.__esModule ? obj : { default: obj };
38700 }
38701
38702 module.exports = exports["default"];
38703
38704/***/ }),
38705/* 349 */
38706/***/ (function(module, exports) {
38707
38708 "use strict";
38709
38710 exports.__esModule = true;
38711
38712 exports.default = function (_ref) {
38713 var t = _ref.types;
38714
38715 var visitor = {
38716 JSXOpeningElement: function JSXOpeningElement(_ref2) {
38717 var node = _ref2.node;
38718
38719 var id = t.jSXIdentifier(TRACE_ID);
38720 var trace = t.thisExpression();
38721
38722 node.attributes.push(t.jSXAttribute(id, t.jSXExpressionContainer(trace)));
38723 }
38724 };
38725
38726 return {
38727 visitor: visitor
38728 };
38729 };
38730
38731 var TRACE_ID = "__self";
38732
38733 module.exports = exports["default"];
38734
38735/***/ }),
38736/* 350 */
38737/***/ (function(module, exports) {
38738
38739 "use strict";
38740
38741 exports.__esModule = true;
38742
38743 exports.default = function (_ref) {
38744 var t = _ref.types;
38745
38746 function makeTrace(fileNameIdentifier, lineNumber) {
38747 var fileLineLiteral = lineNumber != null ? t.numericLiteral(lineNumber) : t.nullLiteral();
38748 var fileNameProperty = t.objectProperty(t.identifier("fileName"), fileNameIdentifier);
38749 var lineNumberProperty = t.objectProperty(t.identifier("lineNumber"), fileLineLiteral);
38750 return t.objectExpression([fileNameProperty, lineNumberProperty]);
38751 }
38752
38753 var visitor = {
38754 JSXOpeningElement: function JSXOpeningElement(path, state) {
38755 var id = t.jSXIdentifier(TRACE_ID);
38756 var location = path.container.openingElement.loc;
38757 if (!location) {
38758 return;
38759 }
38760
38761 var attributes = path.container.openingElement.attributes;
38762 for (var i = 0; i < attributes.length; i++) {
38763 var name = attributes[i].name;
38764 if (name && name.name === TRACE_ID) {
38765 return;
38766 }
38767 }
38768
38769 if (!state.fileNameIdentifier) {
38770 var fileName = state.file.log.filename !== "unknown" ? state.file.log.filename : null;
38771
38772 var fileNameIdentifier = path.scope.generateUidIdentifier(FILE_NAME_VAR);
38773 path.hub.file.scope.push({ id: fileNameIdentifier, init: t.stringLiteral(fileName) });
38774 state.fileNameIdentifier = fileNameIdentifier;
38775 }
38776
38777 var trace = makeTrace(state.fileNameIdentifier, location.start.line);
38778 attributes.push(t.jSXAttribute(id, t.jSXExpressionContainer(trace)));
38779 }
38780 };
38781
38782 return {
38783 visitor: visitor
38784 };
38785 };
38786
38787 var TRACE_ID = "__source";
38788 var FILE_NAME_VAR = "_jsxFileName";
38789
38790 module.exports = exports["default"];
38791
38792/***/ }),
38793/* 351 */
38794348,
38795/* 352 */
38796/***/ (function(module, exports) {
38797
38798 "use strict";
38799
38800 module.exports = {
38801 builtins: {
38802 Symbol: "symbol",
38803 Promise: "promise",
38804 Map: "map",
38805 WeakMap: "weak-map",
38806 Set: "set",
38807 WeakSet: "weak-set",
38808 Observable: "observable",
38809 setImmediate: "set-immediate",
38810 clearImmediate: "clear-immediate",
38811 asap: "asap"
38812 },
38813
38814 methods: {
38815 Array: {
38816 concat: "array/concat",
38817 copyWithin: "array/copy-within",
38818 entries: "array/entries",
38819 every: "array/every",
38820 fill: "array/fill",
38821 filter: "array/filter",
38822 findIndex: "array/find-index",
38823 find: "array/find",
38824 forEach: "array/for-each",
38825 from: "array/from",
38826 includes: "array/includes",
38827 indexOf: "array/index-of",
38828
38829 join: "array/join",
38830 keys: "array/keys",
38831 lastIndexOf: "array/last-index-of",
38832 map: "array/map",
38833 of: "array/of",
38834 pop: "array/pop",
38835 push: "array/push",
38836 reduceRight: "array/reduce-right",
38837 reduce: "array/reduce",
38838 reverse: "array/reverse",
38839 shift: "array/shift",
38840 slice: "array/slice",
38841 some: "array/some",
38842 sort: "array/sort",
38843 splice: "array/splice",
38844 unshift: "array/unshift",
38845 values: "array/values"
38846 },
38847
38848 JSON: {
38849 stringify: "json/stringify"
38850 },
38851
38852 Object: {
38853 assign: "object/assign",
38854 create: "object/create",
38855 defineProperties: "object/define-properties",
38856 defineProperty: "object/define-property",
38857 entries: "object/entries",
38858 freeze: "object/freeze",
38859 getOwnPropertyDescriptor: "object/get-own-property-descriptor",
38860 getOwnPropertyDescriptors: "object/get-own-property-descriptors",
38861 getOwnPropertyNames: "object/get-own-property-names",
38862 getOwnPropertySymbols: "object/get-own-property-symbols",
38863 getPrototypeOf: "object/get-prototype-of",
38864 isExtensible: "object/is-extensible",
38865 isFrozen: "object/is-frozen",
38866 isSealed: "object/is-sealed",
38867 is: "object/is",
38868 keys: "object/keys",
38869 preventExtensions: "object/prevent-extensions",
38870 seal: "object/seal",
38871 setPrototypeOf: "object/set-prototype-of",
38872 values: "object/values"
38873 },
38874
38875 RegExp: {
38876 escape: "regexp/escape" },
38877
38878 Math: {
38879 acosh: "math/acosh",
38880 asinh: "math/asinh",
38881 atanh: "math/atanh",
38882 cbrt: "math/cbrt",
38883 clz32: "math/clz32",
38884 cosh: "math/cosh",
38885 expm1: "math/expm1",
38886 fround: "math/fround",
38887 hypot: "math/hypot",
38888 imul: "math/imul",
38889 log10: "math/log10",
38890 log1p: "math/log1p",
38891 log2: "math/log2",
38892 sign: "math/sign",
38893 sinh: "math/sinh",
38894 tanh: "math/tanh",
38895 trunc: "math/trunc",
38896 iaddh: "math/iaddh",
38897 isubh: "math/isubh",
38898 imulh: "math/imulh",
38899 umulh: "math/umulh"
38900 },
38901
38902 Symbol: {
38903 for: "symbol/for",
38904 hasInstance: "symbol/has-instance",
38905 isConcatSpreadable: "symbol/is-concat-spreadable",
38906 iterator: "symbol/iterator",
38907 keyFor: "symbol/key-for",
38908 match: "symbol/match",
38909 replace: "symbol/replace",
38910 search: "symbol/search",
38911 species: "symbol/species",
38912 split: "symbol/split",
38913 toPrimitive: "symbol/to-primitive",
38914 toStringTag: "symbol/to-string-tag",
38915 unscopables: "symbol/unscopables"
38916 },
38917
38918 String: {
38919 at: "string/at",
38920 codePointAt: "string/code-point-at",
38921 endsWith: "string/ends-with",
38922 fromCodePoint: "string/from-code-point",
38923 includes: "string/includes",
38924 matchAll: "string/match-all",
38925 padLeft: "string/pad-left",
38926 padRight: "string/pad-right",
38927 padStart: "string/pad-start",
38928 padEnd: "string/pad-end",
38929 raw: "string/raw",
38930 repeat: "string/repeat",
38931 startsWith: "string/starts-with",
38932 trim: "string/trim",
38933 trimLeft: "string/trim-left",
38934 trimRight: "string/trim-right",
38935 trimStart: "string/trim-start",
38936 trimEnd: "string/trim-end"
38937 },
38938
38939 Number: {
38940 EPSILON: "number/epsilon",
38941 isFinite: "number/is-finite",
38942 isInteger: "number/is-integer",
38943 isNaN: "number/is-nan",
38944 isSafeInteger: "number/is-safe-integer",
38945 MAX_SAFE_INTEGER: "number/max-safe-integer",
38946 MIN_SAFE_INTEGER: "number/min-safe-integer",
38947 parseFloat: "number/parse-float",
38948 parseInt: "number/parse-int"
38949 },
38950
38951 Reflect: {
38952 apply: "reflect/apply",
38953 construct: "reflect/construct",
38954 defineProperty: "reflect/define-property",
38955 deleteProperty: "reflect/delete-property",
38956 enumerate: "reflect/enumerate",
38957 getOwnPropertyDescriptor: "reflect/get-own-property-descriptor",
38958 getPrototypeOf: "reflect/get-prototype-of",
38959 get: "reflect/get",
38960 has: "reflect/has",
38961 isExtensible: "reflect/is-extensible",
38962 ownKeys: "reflect/own-keys",
38963 preventExtensions: "reflect/prevent-extensions",
38964 setPrototypeOf: "reflect/set-prototype-of",
38965 set: "reflect/set",
38966 defineMetadata: "reflect/define-metadata",
38967 deleteMetadata: "reflect/delete-metadata",
38968 getMetadata: "reflect/get-metadata",
38969 getMetadataKeys: "reflect/get-metadata-keys",
38970 getOwnMetadata: "reflect/get-own-metadata",
38971 getOwnMetadataKeys: "reflect/get-own-metadata-keys",
38972 hasMetadata: "reflect/has-metadata",
38973 hasOwnMetadata: "reflect/has-own-metadata",
38974 metadata: "reflect/metadata"
38975 },
38976
38977 System: {
38978 global: "system/global"
38979 },
38980
38981 Error: {
38982 isError: "error/is-error" },
38983
38984 Date: {},
38985
38986 Function: {}
38987 }
38988 };
38989
38990/***/ }),
38991/* 353 */
38992/***/ (function(module, exports, __webpack_require__) {
38993
38994 "use strict";
38995
38996 exports.__esModule = true;
38997 exports.definitions = undefined;
38998
38999 exports.default = function (_ref) {
39000 var t = _ref.types;
39001
39002 function getRuntimeModuleName(opts) {
39003 return opts.moduleName || "babel-runtime";
39004 }
39005
39006 function has(obj, key) {
39007 return Object.prototype.hasOwnProperty.call(obj, key);
39008 }
39009
39010 var HELPER_BLACKLIST = ["interopRequireWildcard", "interopRequireDefault"];
39011
39012 return {
39013 pre: function pre(file) {
39014 var moduleName = getRuntimeModuleName(this.opts);
39015
39016 if (this.opts.helpers !== false) {
39017 file.set("helperGenerator", function (name) {
39018 if (HELPER_BLACKLIST.indexOf(name) < 0) {
39019 return file.addImport(moduleName + "/helpers/" + name, "default", name);
39020 }
39021 });
39022 }
39023
39024 this.setDynamic("regeneratorIdentifier", function () {
39025 return file.addImport(moduleName + "/regenerator", "default", "regeneratorRuntime");
39026 });
39027 },
39028
39029 visitor: {
39030 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
39031 var node = path.node,
39032 parent = path.parent,
39033 scope = path.scope;
39034
39035 if (node.name === "regeneratorRuntime" && state.opts.regenerator !== false) {
39036 path.replaceWith(state.get("regeneratorIdentifier"));
39037 return;
39038 }
39039
39040 if (state.opts.polyfill === false) return;
39041
39042 if (t.isMemberExpression(parent)) return;
39043 if (!has(_definitions2.default.builtins, node.name)) return;
39044 if (scope.getBindingIdentifier(node.name)) return;
39045
39046 var moduleName = getRuntimeModuleName(state.opts);
39047 path.replaceWith(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[node.name], "default", node.name));
39048 },
39049 CallExpression: function CallExpression(path, state) {
39050 if (state.opts.polyfill === false) return;
39051
39052 if (path.node.arguments.length) return;
39053
39054 var callee = path.node.callee;
39055 if (!t.isMemberExpression(callee)) return;
39056 if (!callee.computed) return;
39057 if (!path.get("callee.property").matchesPattern("Symbol.iterator")) return;
39058
39059 var moduleName = getRuntimeModuleName(state.opts);
39060 path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/get-iterator", "default", "getIterator"), [callee.object]));
39061 },
39062 BinaryExpression: function BinaryExpression(path, state) {
39063 if (state.opts.polyfill === false) return;
39064
39065 if (path.node.operator !== "in") return;
39066 if (!path.get("left").matchesPattern("Symbol.iterator")) return;
39067
39068 var moduleName = getRuntimeModuleName(state.opts);
39069 path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/is-iterable", "default", "isIterable"), [path.node.right]));
39070 },
39071
39072 MemberExpression: {
39073 enter: function enter(path, state) {
39074 if (state.opts.polyfill === false) return;
39075 if (!path.isReferenced()) return;
39076
39077 var node = path.node;
39078
39079 var obj = node.object;
39080 var prop = node.property;
39081
39082 if (!t.isReferenced(obj, node)) return;
39083 if (node.computed) return;
39084 if (!has(_definitions2.default.methods, obj.name)) return;
39085
39086 var methods = _definitions2.default.methods[obj.name];
39087 if (!has(methods, prop.name)) return;
39088
39089 if (path.scope.getBindingIdentifier(obj.name)) return;
39090
39091 if (obj.name === "Object" && prop.name === "defineProperty" && path.parentPath.isCallExpression()) {
39092 var call = path.parentPath.node;
39093 if (call.arguments.length === 3 && t.isLiteral(call.arguments[1])) return;
39094 }
39095
39096 var moduleName = getRuntimeModuleName(state.opts);
39097 path.replaceWith(state.addImport(moduleName + "/core-js/" + methods[prop.name], "default", obj.name + "$" + prop.name));
39098 },
39099 exit: function exit(path, state) {
39100 if (state.opts.polyfill === false) return;
39101 if (!path.isReferenced()) return;
39102
39103 var node = path.node;
39104
39105 var obj = node.object;
39106
39107 if (!has(_definitions2.default.builtins, obj.name)) return;
39108 if (path.scope.getBindingIdentifier(obj.name)) return;
39109
39110 var moduleName = getRuntimeModuleName(state.opts);
39111 path.replaceWith(t.memberExpression(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[obj.name], "default", obj.name), node.property, node.computed));
39112 }
39113 }
39114 }
39115 };
39116 };
39117
39118 var _definitions = __webpack_require__(352);
39119
39120 var _definitions2 = _interopRequireDefault(_definitions);
39121
39122 function _interopRequireDefault(obj) {
39123 return obj && obj.__esModule ? obj : { default: obj };
39124 }
39125
39126 exports.definitions = _definitions2.default;
39127
39128/***/ }),
39129/* 354 */
39130/***/ (function(module, exports, __webpack_require__) {
39131
39132 "use strict";
39133
39134 exports.__esModule = true;
39135
39136 exports.default = function (_ref) {
39137 var messages = _ref.messages;
39138
39139 return {
39140 visitor: {
39141 ReferencedIdentifier: function ReferencedIdentifier(path) {
39142 var node = path.node,
39143 scope = path.scope;
39144
39145 var binding = scope.getBinding(node.name);
39146 if (binding && binding.kind === "type" && !path.parentPath.isFlow()) {
39147 throw path.buildCodeFrameError(messages.get("undeclaredVariableType", node.name), ReferenceError);
39148 }
39149
39150 if (scope.hasBinding(node.name)) return;
39151
39152 var bindings = scope.getAllBindings();
39153
39154 var closest = void 0;
39155 var shortest = -1;
39156
39157 for (var name in bindings) {
39158 var distance = (0, _leven2.default)(node.name, name);
39159 if (distance <= 0 || distance > 3) continue;
39160 if (distance <= shortest) continue;
39161
39162 closest = name;
39163 shortest = distance;
39164 }
39165
39166 var msg = void 0;
39167 if (closest) {
39168 msg = messages.get("undeclaredVariableSuggestion", node.name, closest);
39169 } else {
39170 msg = messages.get("undeclaredVariable", node.name);
39171 }
39172
39173 throw path.buildCodeFrameError(msg, ReferenceError);
39174 }
39175 }
39176 };
39177 };
39178
39179 var _leven = __webpack_require__(471);
39180
39181 var _leven2 = _interopRequireDefault(_leven);
39182
39183 function _interopRequireDefault(obj) {
39184 return obj && obj.__esModule ? obj : { default: obj };
39185 }
39186
39187 module.exports = exports["default"];
39188
39189/***/ }),
39190/* 355 */
39191/***/ (function(module, exports, __webpack_require__) {
39192
39193 "use strict";
39194
39195 exports.__esModule = true;
39196
39197 var _babelPluginTransformFlowStripTypes = __webpack_require__(211);
39198
39199 var _babelPluginTransformFlowStripTypes2 = _interopRequireDefault(_babelPluginTransformFlowStripTypes);
39200
39201 function _interopRequireDefault(obj) {
39202 return obj && obj.__esModule ? obj : { default: obj };
39203 }
39204
39205 exports.default = {
39206 plugins: [_babelPluginTransformFlowStripTypes2.default]
39207 };
39208 module.exports = exports["default"];
39209
39210/***/ }),
39211/* 356 */
39212/***/ (function(module, exports, __webpack_require__) {
39213
39214 "use strict";
39215
39216 exports.__esModule = true;
39217
39218 exports.default = function (context) {
39219 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
39220
39221 return {
39222 presets: [opts.es2015 !== false && [_babelPresetEs2.default.buildPreset, opts.es2015], opts.es2016 !== false && _babelPresetEs4.default, opts.es2017 !== false && _babelPresetEs6.default].filter(Boolean) };
39223 };
39224
39225 var _babelPresetEs = __webpack_require__(217);
39226
39227 var _babelPresetEs2 = _interopRequireDefault(_babelPresetEs);
39228
39229 var _babelPresetEs3 = __webpack_require__(218);
39230
39231 var _babelPresetEs4 = _interopRequireDefault(_babelPresetEs3);
39232
39233 var _babelPresetEs5 = __webpack_require__(219);
39234
39235 var _babelPresetEs6 = _interopRequireDefault(_babelPresetEs5);
39236
39237 function _interopRequireDefault(obj) {
39238 return obj && obj.__esModule ? obj : { default: obj };
39239 }
39240
39241 module.exports = exports["default"];
39242
39243/***/ }),
39244/* 357 */
39245/***/ (function(module, exports, __webpack_require__) {
39246
39247 "use strict";
39248
39249 exports.__esModule = true;
39250
39251 var _babelPresetFlow = __webpack_require__(355);
39252
39253 var _babelPresetFlow2 = _interopRequireDefault(_babelPresetFlow);
39254
39255 var _babelPluginTransformReactJsx = __webpack_require__(215);
39256
39257 var _babelPluginTransformReactJsx2 = _interopRequireDefault(_babelPluginTransformReactJsx);
39258
39259 var _babelPluginSyntaxJsx = __webpack_require__(127);
39260
39261 var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx);
39262
39263 var _babelPluginTransformReactDisplayName = __webpack_require__(214);
39264
39265 var _babelPluginTransformReactDisplayName2 = _interopRequireDefault(_babelPluginTransformReactDisplayName);
39266
39267 function _interopRequireDefault(obj) {
39268 return obj && obj.__esModule ? obj : { default: obj };
39269 }
39270
39271 exports.default = {
39272 presets: [_babelPresetFlow2.default],
39273 plugins: [_babelPluginTransformReactJsx2.default, _babelPluginSyntaxJsx2.default, _babelPluginTransformReactDisplayName2.default],
39274 env: {
39275 development: {
39276 plugins: []
39277 }
39278 }
39279 };
39280 module.exports = exports["default"];
39281
39282/***/ }),
39283/* 358 */
39284/***/ (function(module, exports, __webpack_require__) {
39285
39286 "use strict";
39287
39288 exports.__esModule = true;
39289
39290 var _babelPresetStage = __webpack_require__(220);
39291
39292 var _babelPresetStage2 = _interopRequireDefault(_babelPresetStage);
39293
39294 var _babelPluginTransformDoExpressions = __webpack_require__(206);
39295
39296 var _babelPluginTransformDoExpressions2 = _interopRequireDefault(_babelPluginTransformDoExpressions);
39297
39298 var _babelPluginTransformFunctionBind = __webpack_require__(212);
39299
39300 var _babelPluginTransformFunctionBind2 = _interopRequireDefault(_babelPluginTransformFunctionBind);
39301
39302 function _interopRequireDefault(obj) {
39303 return obj && obj.__esModule ? obj : { default: obj };
39304 }
39305
39306 exports.default = {
39307 presets: [_babelPresetStage2.default],
39308 plugins: [_babelPluginTransformDoExpressions2.default, _babelPluginTransformFunctionBind2.default]
39309 };
39310 module.exports = exports["default"];
39311
39312/***/ }),
39313/* 359 */
39314/***/ (function(module, exports, __webpack_require__) {
39315
39316 "use strict";
39317
39318 module.exports = { "default": __webpack_require__(407), __esModule: true };
39319
39320/***/ }),
39321/* 360 */
39322/***/ (function(module, exports, __webpack_require__) {
39323
39324 "use strict";
39325
39326 module.exports = { "default": __webpack_require__(410), __esModule: true };
39327
39328/***/ }),
39329/* 361 */
39330/***/ (function(module, exports, __webpack_require__) {
39331
39332 "use strict";
39333
39334 module.exports = { "default": __webpack_require__(412), __esModule: true };
39335
39336/***/ }),
39337/* 362 */
39338/***/ (function(module, exports, __webpack_require__) {
39339
39340 "use strict";
39341
39342 module.exports = { "default": __webpack_require__(413), __esModule: true };
39343
39344/***/ }),
39345/* 363 */
39346/***/ (function(module, exports, __webpack_require__) {
39347
39348 "use strict";
39349
39350 module.exports = { "default": __webpack_require__(415), __esModule: true };
39351
39352/***/ }),
39353/* 364 */
39354/***/ (function(module, exports, __webpack_require__) {
39355
39356 "use strict";
39357
39358 module.exports = { "default": __webpack_require__(416), __esModule: true };
39359
39360/***/ }),
39361/* 365 */
39362/***/ (function(module, exports, __webpack_require__) {
39363
39364 "use strict";
39365
39366 module.exports = { "default": __webpack_require__(417), __esModule: true };
39367
39368/***/ }),
39369/* 366 */
39370/***/ (function(module, exports) {
39371
39372 "use strict";
39373
39374 exports.__esModule = true;
39375
39376 exports.default = function (obj, keys) {
39377 var target = {};
39378
39379 for (var i in obj) {
39380 if (keys.indexOf(i) >= 0) continue;
39381 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
39382 target[i] = obj[i];
39383 }
39384
39385 return target;
39386 };
39387
39388/***/ }),
39389/* 367 */
39390/***/ (function(module, exports, __webpack_require__) {
39391
39392 "use strict";
39393
39394 exports.__esModule = true;
39395
39396 var _getIterator2 = __webpack_require__(2);
39397
39398 var _getIterator3 = _interopRequireDefault(_getIterator2);
39399
39400 var _classCallCheck2 = __webpack_require__(3);
39401
39402 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
39403
39404 var _path2 = __webpack_require__(36);
39405
39406 var _path3 = _interopRequireDefault(_path2);
39407
39408 var _babelTypes = __webpack_require__(1);
39409
39410 var t = _interopRequireWildcard(_babelTypes);
39411
39412 function _interopRequireWildcard(obj) {
39413 if (obj && obj.__esModule) {
39414 return obj;
39415 } else {
39416 var newObj = {};if (obj != null) {
39417 for (var key in obj) {
39418 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
39419 }
39420 }newObj.default = obj;return newObj;
39421 }
39422 }
39423
39424 function _interopRequireDefault(obj) {
39425 return obj && obj.__esModule ? obj : { default: obj };
39426 }
39427
39428 var testing = ("production") === "test";
39429
39430 var TraversalContext = function () {
39431 function TraversalContext(scope, opts, state, parentPath) {
39432 (0, _classCallCheck3.default)(this, TraversalContext);
39433 this.queue = null;
39434
39435 this.parentPath = parentPath;
39436 this.scope = scope;
39437 this.state = state;
39438 this.opts = opts;
39439 }
39440
39441 TraversalContext.prototype.shouldVisit = function shouldVisit(node) {
39442 var opts = this.opts;
39443 if (opts.enter || opts.exit) return true;
39444
39445 if (opts[node.type]) return true;
39446
39447 var keys = t.VISITOR_KEYS[node.type];
39448 if (!keys || !keys.length) return false;
39449
39450 for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
39451 var _ref;
39452
39453 if (_isArray) {
39454 if (_i >= _iterator.length) break;
39455 _ref = _iterator[_i++];
39456 } else {
39457 _i = _iterator.next();
39458 if (_i.done) break;
39459 _ref = _i.value;
39460 }
39461
39462 var key = _ref;
39463
39464 if (node[key]) return true;
39465 }
39466
39467 return false;
39468 };
39469
39470 TraversalContext.prototype.create = function create(node, obj, key, listKey) {
39471 return _path3.default.get({
39472 parentPath: this.parentPath,
39473 parent: node,
39474 container: obj,
39475 key: key,
39476 listKey: listKey
39477 });
39478 };
39479
39480 TraversalContext.prototype.maybeQueue = function maybeQueue(path, notPriority) {
39481 if (this.trap) {
39482 throw new Error("Infinite cycle detected");
39483 }
39484
39485 if (this.queue) {
39486 if (notPriority) {
39487 this.queue.push(path);
39488 } else {
39489 this.priorityQueue.push(path);
39490 }
39491 }
39492 };
39493
39494 TraversalContext.prototype.visitMultiple = function visitMultiple(container, parent, listKey) {
39495 if (container.length === 0) return false;
39496
39497 var queue = [];
39498
39499 for (var key = 0; key < container.length; key++) {
39500 var node = container[key];
39501 if (node && this.shouldVisit(node)) {
39502 queue.push(this.create(parent, container, key, listKey));
39503 }
39504 }
39505
39506 return this.visitQueue(queue);
39507 };
39508
39509 TraversalContext.prototype.visitSingle = function visitSingle(node, key) {
39510 if (this.shouldVisit(node[key])) {
39511 return this.visitQueue([this.create(node, node, key)]);
39512 } else {
39513 return false;
39514 }
39515 };
39516
39517 TraversalContext.prototype.visitQueue = function visitQueue(queue) {
39518 this.queue = queue;
39519 this.priorityQueue = [];
39520
39521 var visited = [];
39522 var stop = false;
39523
39524 for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
39525 var _ref2;
39526
39527 if (_isArray2) {
39528 if (_i2 >= _iterator2.length) break;
39529 _ref2 = _iterator2[_i2++];
39530 } else {
39531 _i2 = _iterator2.next();
39532 if (_i2.done) break;
39533 _ref2 = _i2.value;
39534 }
39535
39536 var path = _ref2;
39537
39538 path.resync();
39539
39540 if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
39541 path.pushContext(this);
39542 }
39543
39544 if (path.key === null) continue;
39545
39546 if (testing && queue.length >= 10000) {
39547 this.trap = true;
39548 }
39549
39550 if (visited.indexOf(path.node) >= 0) continue;
39551 visited.push(path.node);
39552
39553 if (path.visit()) {
39554 stop = true;
39555 break;
39556 }
39557
39558 if (this.priorityQueue.length) {
39559 stop = this.visitQueue(this.priorityQueue);
39560 this.priorityQueue = [];
39561 this.queue = queue;
39562 if (stop) break;
39563 }
39564 }
39565
39566 for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
39567 var _ref3;
39568
39569 if (_isArray3) {
39570 if (_i3 >= _iterator3.length) break;
39571 _ref3 = _iterator3[_i3++];
39572 } else {
39573 _i3 = _iterator3.next();
39574 if (_i3.done) break;
39575 _ref3 = _i3.value;
39576 }
39577
39578 var _path = _ref3;
39579
39580 _path.popContext();
39581 }
39582
39583 this.queue = null;
39584
39585 return stop;
39586 };
39587
39588 TraversalContext.prototype.visit = function visit(node, key) {
39589 var nodes = node[key];
39590 if (!nodes) return false;
39591
39592 if (Array.isArray(nodes)) {
39593 return this.visitMultiple(nodes, node, key);
39594 } else {
39595 return this.visitSingle(node, key);
39596 }
39597 };
39598
39599 return TraversalContext;
39600 }();
39601
39602 exports.default = TraversalContext;
39603 module.exports = exports["default"];
39604
39605/***/ }),
39606/* 368 */
39607/***/ (function(module, exports, __webpack_require__) {
39608
39609 "use strict";
39610
39611 exports.__esModule = true;
39612
39613 var _getIterator2 = __webpack_require__(2);
39614
39615 var _getIterator3 = _interopRequireDefault(_getIterator2);
39616
39617 exports.findParent = findParent;
39618 exports.find = find;
39619 exports.getFunctionParent = getFunctionParent;
39620 exports.getStatementParent = getStatementParent;
39621 exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
39622 exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
39623 exports.getAncestry = getAncestry;
39624 exports.isAncestor = isAncestor;
39625 exports.isDescendant = isDescendant;
39626 exports.inType = inType;
39627 exports.inShadow = inShadow;
39628
39629 var _babelTypes = __webpack_require__(1);
39630
39631 var t = _interopRequireWildcard(_babelTypes);
39632
39633 var _index = __webpack_require__(36);
39634
39635 var _index2 = _interopRequireDefault(_index);
39636
39637 function _interopRequireWildcard(obj) {
39638 if (obj && obj.__esModule) {
39639 return obj;
39640 } else {
39641 var newObj = {};if (obj != null) {
39642 for (var key in obj) {
39643 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
39644 }
39645 }newObj.default = obj;return newObj;
39646 }
39647 }
39648
39649 function _interopRequireDefault(obj) {
39650 return obj && obj.__esModule ? obj : { default: obj };
39651 }
39652
39653 function findParent(callback) {
39654 var path = this;
39655 while (path = path.parentPath) {
39656 if (callback(path)) return path;
39657 }
39658 return null;
39659 }
39660
39661 function find(callback) {
39662 var path = this;
39663 do {
39664 if (callback(path)) return path;
39665 } while (path = path.parentPath);
39666 return null;
39667 }
39668
39669 function getFunctionParent() {
39670 return this.findParent(function (path) {
39671 return path.isFunction() || path.isProgram();
39672 });
39673 }
39674
39675 function getStatementParent() {
39676 var path = this;
39677 do {
39678 if (Array.isArray(path.container)) {
39679 return path;
39680 }
39681 } while (path = path.parentPath);
39682 }
39683
39684 function getEarliestCommonAncestorFrom(paths) {
39685 return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
39686 var earliest = void 0;
39687 var keys = t.VISITOR_KEYS[deepest.type];
39688
39689 for (var _iterator = ancestries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
39690 var _ref;
39691
39692 if (_isArray) {
39693 if (_i >= _iterator.length) break;
39694 _ref = _iterator[_i++];
39695 } else {
39696 _i = _iterator.next();
39697 if (_i.done) break;
39698 _ref = _i.value;
39699 }
39700
39701 var ancestry = _ref;
39702
39703 var path = ancestry[i + 1];
39704
39705 if (!earliest) {
39706 earliest = path;
39707 continue;
39708 }
39709
39710 if (path.listKey && earliest.listKey === path.listKey) {
39711 if (path.key < earliest.key) {
39712 earliest = path;
39713 continue;
39714 }
39715 }
39716
39717 var earliestKeyIndex = keys.indexOf(earliest.parentKey);
39718 var currentKeyIndex = keys.indexOf(path.parentKey);
39719 if (earliestKeyIndex > currentKeyIndex) {
39720 earliest = path;
39721 }
39722 }
39723
39724 return earliest;
39725 });
39726 }
39727
39728 function getDeepestCommonAncestorFrom(paths, filter) {
39729 var _this = this;
39730
39731 if (!paths.length) {
39732 return this;
39733 }
39734
39735 if (paths.length === 1) {
39736 return paths[0];
39737 }
39738
39739 var minDepth = Infinity;
39740
39741 var lastCommonIndex = void 0,
39742 lastCommon = void 0;
39743
39744 var ancestries = paths.map(function (path) {
39745 var ancestry = [];
39746
39747 do {
39748 ancestry.unshift(path);
39749 } while ((path = path.parentPath) && path !== _this);
39750
39751 if (ancestry.length < minDepth) {
39752 minDepth = ancestry.length;
39753 }
39754
39755 return ancestry;
39756 });
39757
39758 var first = ancestries[0];
39759
39760 depthLoop: for (var i = 0; i < minDepth; i++) {
39761 var shouldMatch = first[i];
39762
39763 for (var _iterator2 = ancestries, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
39764 var _ref2;
39765
39766 if (_isArray2) {
39767 if (_i2 >= _iterator2.length) break;
39768 _ref2 = _iterator2[_i2++];
39769 } else {
39770 _i2 = _iterator2.next();
39771 if (_i2.done) break;
39772 _ref2 = _i2.value;
39773 }
39774
39775 var ancestry = _ref2;
39776
39777 if (ancestry[i] !== shouldMatch) {
39778 break depthLoop;
39779 }
39780 }
39781
39782 lastCommonIndex = i;
39783 lastCommon = shouldMatch;
39784 }
39785
39786 if (lastCommon) {
39787 if (filter) {
39788 return filter(lastCommon, lastCommonIndex, ancestries);
39789 } else {
39790 return lastCommon;
39791 }
39792 } else {
39793 throw new Error("Couldn't find intersection");
39794 }
39795 }
39796
39797 function getAncestry() {
39798 var path = this;
39799 var paths = [];
39800 do {
39801 paths.push(path);
39802 } while (path = path.parentPath);
39803 return paths;
39804 }
39805
39806 function isAncestor(maybeDescendant) {
39807 return maybeDescendant.isDescendant(this);
39808 }
39809
39810 function isDescendant(maybeAncestor) {
39811 return !!this.findParent(function (parent) {
39812 return parent === maybeAncestor;
39813 });
39814 }
39815
39816 function inType() {
39817 var path = this;
39818 while (path) {
39819 for (var _iterator3 = arguments, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
39820 var _ref3;
39821
39822 if (_isArray3) {
39823 if (_i3 >= _iterator3.length) break;
39824 _ref3 = _iterator3[_i3++];
39825 } else {
39826 _i3 = _iterator3.next();
39827 if (_i3.done) break;
39828 _ref3 = _i3.value;
39829 }
39830
39831 var type = _ref3;
39832
39833 if (path.node.type === type) return true;
39834 }
39835 path = path.parentPath;
39836 }
39837
39838 return false;
39839 }
39840
39841 function inShadow(key) {
39842 var parentFn = this.isFunction() ? this : this.findParent(function (p) {
39843 return p.isFunction();
39844 });
39845 if (!parentFn) return;
39846
39847 if (parentFn.isFunctionExpression() || parentFn.isFunctionDeclaration()) {
39848 var shadow = parentFn.node.shadow;
39849
39850 if (shadow && (!key || shadow[key] !== false)) {
39851 return parentFn;
39852 }
39853 } else if (parentFn.isArrowFunctionExpression()) {
39854 return parentFn;
39855 }
39856
39857 return null;
39858 }
39859
39860/***/ }),
39861/* 369 */
39862/***/ (function(module, exports) {
39863
39864 "use strict";
39865
39866 exports.__esModule = true;
39867 exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
39868 exports.addComment = addComment;
39869 exports.addComments = addComments;
39870 function shareCommentsWithSiblings() {
39871 if (typeof this.key === "string") return;
39872
39873 var node = this.node;
39874 if (!node) return;
39875
39876 var trailing = node.trailingComments;
39877 var leading = node.leadingComments;
39878 if (!trailing && !leading) return;
39879
39880 var prev = this.getSibling(this.key - 1);
39881 var next = this.getSibling(this.key + 1);
39882
39883 if (!prev.node) prev = next;
39884 if (!next.node) next = prev;
39885
39886 prev.addComments("trailing", leading);
39887 next.addComments("leading", trailing);
39888 }
39889
39890 function addComment(type, content, line) {
39891 this.addComments(type, [{
39892 type: line ? "CommentLine" : "CommentBlock",
39893 value: content
39894 }]);
39895 }
39896
39897 function addComments(type, comments) {
39898 if (!comments) return;
39899
39900 var node = this.node;
39901 if (!node) return;
39902
39903 var key = type + "Comments";
39904
39905 if (node[key]) {
39906 node[key] = node[key].concat(comments);
39907 } else {
39908 node[key] = comments;
39909 }
39910 }
39911
39912/***/ }),
39913/* 370 */
39914/***/ (function(module, exports, __webpack_require__) {
39915
39916 "use strict";
39917
39918 exports.__esModule = true;
39919
39920 var _getIterator2 = __webpack_require__(2);
39921
39922 var _getIterator3 = _interopRequireDefault(_getIterator2);
39923
39924 exports.call = call;
39925 exports._call = _call;
39926 exports.isBlacklisted = isBlacklisted;
39927 exports.visit = visit;
39928 exports.skip = skip;
39929 exports.skipKey = skipKey;
39930 exports.stop = stop;
39931 exports.setScope = setScope;
39932 exports.setContext = setContext;
39933 exports.resync = resync;
39934 exports._resyncParent = _resyncParent;
39935 exports._resyncKey = _resyncKey;
39936 exports._resyncList = _resyncList;
39937 exports._resyncRemoved = _resyncRemoved;
39938 exports.popContext = popContext;
39939 exports.pushContext = pushContext;
39940 exports.setup = setup;
39941 exports.setKey = setKey;
39942 exports.requeue = requeue;
39943 exports._getQueueContexts = _getQueueContexts;
39944
39945 var _index = __webpack_require__(7);
39946
39947 var _index2 = _interopRequireDefault(_index);
39948
39949 function _interopRequireDefault(obj) {
39950 return obj && obj.__esModule ? obj : { default: obj };
39951 }
39952
39953 function call(key) {
39954 var opts = this.opts;
39955
39956 this.debug(function () {
39957 return key;
39958 });
39959
39960 if (this.node) {
39961 if (this._call(opts[key])) return true;
39962 }
39963
39964 if (this.node) {
39965 return this._call(opts[this.node.type] && opts[this.node.type][key]);
39966 }
39967
39968 return false;
39969 }
39970
39971 function _call(fns) {
39972 if (!fns) return false;
39973
39974 for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
39975 var _ref;
39976
39977 if (_isArray) {
39978 if (_i >= _iterator.length) break;
39979 _ref = _iterator[_i++];
39980 } else {
39981 _i = _iterator.next();
39982 if (_i.done) break;
39983 _ref = _i.value;
39984 }
39985
39986 var fn = _ref;
39987
39988 if (!fn) continue;
39989
39990 var node = this.node;
39991 if (!node) return true;
39992
39993 var ret = fn.call(this.state, this, this.state);
39994 if (ret) throw new Error("Unexpected return value from visitor method " + fn);
39995
39996 if (this.node !== node) return true;
39997
39998 if (this.shouldStop || this.shouldSkip || this.removed) return true;
39999 }
40000
40001 return false;
40002 }
40003
40004 function isBlacklisted() {
40005 var blacklist = this.opts.blacklist;
40006 return blacklist && blacklist.indexOf(this.node.type) > -1;
40007 }
40008
40009 function visit() {
40010 if (!this.node) {
40011 return false;
40012 }
40013
40014 if (this.isBlacklisted()) {
40015 return false;
40016 }
40017
40018 if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
40019 return false;
40020 }
40021
40022 if (this.call("enter") || this.shouldSkip) {
40023 this.debug(function () {
40024 return "Skip...";
40025 });
40026 return this.shouldStop;
40027 }
40028
40029 this.debug(function () {
40030 return "Recursing into...";
40031 });
40032 _index2.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
40033
40034 this.call("exit");
40035
40036 return this.shouldStop;
40037 }
40038
40039 function skip() {
40040 this.shouldSkip = true;
40041 }
40042
40043 function skipKey(key) {
40044 this.skipKeys[key] = true;
40045 }
40046
40047 function stop() {
40048 this.shouldStop = true;
40049 this.shouldSkip = true;
40050 }
40051
40052 function setScope() {
40053 if (this.opts && this.opts.noScope) return;
40054
40055 var target = this.context && this.context.scope;
40056
40057 if (!target) {
40058 var path = this.parentPath;
40059 while (path && !target) {
40060 if (path.opts && path.opts.noScope) return;
40061
40062 target = path.scope;
40063 path = path.parentPath;
40064 }
40065 }
40066
40067 this.scope = this.getScope(target);
40068 if (this.scope) this.scope.init();
40069 }
40070
40071 function setContext(context) {
40072 this.shouldSkip = false;
40073 this.shouldStop = false;
40074 this.removed = false;
40075 this.skipKeys = {};
40076
40077 if (context) {
40078 this.context = context;
40079 this.state = context.state;
40080 this.opts = context.opts;
40081 }
40082
40083 this.setScope();
40084
40085 return this;
40086 }
40087
40088 function resync() {
40089 if (this.removed) return;
40090
40091 this._resyncParent();
40092 this._resyncList();
40093 this._resyncKey();
40094 }
40095
40096 function _resyncParent() {
40097 if (this.parentPath) {
40098 this.parent = this.parentPath.node;
40099 }
40100 }
40101
40102 function _resyncKey() {
40103 if (!this.container) return;
40104
40105 if (this.node === this.container[this.key]) return;
40106
40107 if (Array.isArray(this.container)) {
40108 for (var i = 0; i < this.container.length; i++) {
40109 if (this.container[i] === this.node) {
40110 return this.setKey(i);
40111 }
40112 }
40113 } else {
40114 for (var key in this.container) {
40115 if (this.container[key] === this.node) {
40116 return this.setKey(key);
40117 }
40118 }
40119 }
40120
40121 this.key = null;
40122 }
40123
40124 function _resyncList() {
40125 if (!this.parent || !this.inList) return;
40126
40127 var newContainer = this.parent[this.listKey];
40128 if (this.container === newContainer) return;
40129
40130 this.container = newContainer || null;
40131 }
40132
40133 function _resyncRemoved() {
40134 if (this.key == null || !this.container || this.container[this.key] !== this.node) {
40135 this._markRemoved();
40136 }
40137 }
40138
40139 function popContext() {
40140 this.contexts.pop();
40141 this.setContext(this.contexts[this.contexts.length - 1]);
40142 }
40143
40144 function pushContext(context) {
40145 this.contexts.push(context);
40146 this.setContext(context);
40147 }
40148
40149 function setup(parentPath, container, listKey, key) {
40150 this.inList = !!listKey;
40151 this.listKey = listKey;
40152 this.parentKey = listKey || key;
40153 this.container = container;
40154
40155 this.parentPath = parentPath || this.parentPath;
40156 this.setKey(key);
40157 }
40158
40159 function setKey(key) {
40160 this.key = key;
40161 this.node = this.container[this.key];
40162 this.type = this.node && this.node.type;
40163 }
40164
40165 function requeue() {
40166 var pathToQueue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this;
40167
40168 if (pathToQueue.removed) return;
40169
40170 var contexts = this.contexts;
40171
40172 for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
40173 var _ref2;
40174
40175 if (_isArray2) {
40176 if (_i2 >= _iterator2.length) break;
40177 _ref2 = _iterator2[_i2++];
40178 } else {
40179 _i2 = _iterator2.next();
40180 if (_i2.done) break;
40181 _ref2 = _i2.value;
40182 }
40183
40184 var context = _ref2;
40185
40186 context.maybeQueue(pathToQueue);
40187 }
40188 }
40189
40190 function _getQueueContexts() {
40191 var path = this;
40192 var contexts = this.contexts;
40193 while (!contexts.length) {
40194 path = path.parentPath;
40195 contexts = path.contexts;
40196 }
40197 return contexts;
40198 }
40199
40200/***/ }),
40201/* 371 */
40202/***/ (function(module, exports, __webpack_require__) {
40203
40204 "use strict";
40205
40206 exports.__esModule = true;
40207 exports.toComputedKey = toComputedKey;
40208 exports.ensureBlock = ensureBlock;
40209 exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
40210
40211 var _babelTypes = __webpack_require__(1);
40212
40213 var t = _interopRequireWildcard(_babelTypes);
40214
40215 function _interopRequireWildcard(obj) {
40216 if (obj && obj.__esModule) {
40217 return obj;
40218 } else {
40219 var newObj = {};if (obj != null) {
40220 for (var key in obj) {
40221 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
40222 }
40223 }newObj.default = obj;return newObj;
40224 }
40225 }
40226
40227 function toComputedKey() {
40228 var node = this.node;
40229
40230 var key = void 0;
40231 if (this.isMemberExpression()) {
40232 key = node.property;
40233 } else if (this.isProperty() || this.isMethod()) {
40234 key = node.key;
40235 } else {
40236 throw new ReferenceError("todo");
40237 }
40238
40239 if (!node.computed) {
40240 if (t.isIdentifier(key)) key = t.stringLiteral(key.name);
40241 }
40242
40243 return key;
40244 }
40245
40246 function ensureBlock() {
40247 return t.ensureBlock(this.node);
40248 }
40249
40250 function arrowFunctionToShadowed() {
40251 if (!this.isArrowFunctionExpression()) return;
40252
40253 this.ensureBlock();
40254
40255 var node = this.node;
40256
40257 node.expression = false;
40258 node.type = "FunctionExpression";
40259 node.shadow = node.shadow || true;
40260 }
40261
40262/***/ }),
40263/* 372 */
40264/***/ (function(module, exports, __webpack_require__) {
40265
40266 /* WEBPACK VAR INJECTION */(function(global) {"use strict";
40267
40268 exports.__esModule = true;
40269
40270 var _typeof2 = __webpack_require__(11);
40271
40272 var _typeof3 = _interopRequireDefault(_typeof2);
40273
40274 var _getIterator2 = __webpack_require__(2);
40275
40276 var _getIterator3 = _interopRequireDefault(_getIterator2);
40277
40278 var _map = __webpack_require__(133);
40279
40280 var _map2 = _interopRequireDefault(_map);
40281
40282 exports.evaluateTruthy = evaluateTruthy;
40283 exports.evaluate = evaluate;
40284
40285 function _interopRequireDefault(obj) {
40286 return obj && obj.__esModule ? obj : { default: obj };
40287 }
40288
40289 var VALID_CALLEES = ["String", "Number", "Math"];
40290 var INVALID_METHODS = ["random"];
40291
40292 function evaluateTruthy() {
40293 var res = this.evaluate();
40294 if (res.confident) return !!res.value;
40295 }
40296
40297 function evaluate() {
40298 var confident = true;
40299 var deoptPath = void 0;
40300 var seen = new _map2.default();
40301
40302 function deopt(path) {
40303 if (!confident) return;
40304 deoptPath = path;
40305 confident = false;
40306 }
40307
40308 var value = evaluate(this);
40309 if (!confident) value = undefined;
40310 return {
40311 confident: confident,
40312 deopt: deoptPath,
40313 value: value
40314 };
40315
40316 function evaluate(path) {
40317 var node = path.node;
40318
40319 if (seen.has(node)) {
40320 var existing = seen.get(node);
40321 if (existing.resolved) {
40322 return existing.value;
40323 } else {
40324 deopt(path);
40325 return;
40326 }
40327 } else {
40328 var item = { resolved: false };
40329 seen.set(node, item);
40330
40331 var val = _evaluate(path);
40332 if (confident) {
40333 item.resolved = true;
40334 item.value = val;
40335 }
40336 return val;
40337 }
40338 }
40339
40340 function _evaluate(path) {
40341 if (!confident) return;
40342
40343 var node = path.node;
40344
40345 if (path.isSequenceExpression()) {
40346 var exprs = path.get("expressions");
40347 return evaluate(exprs[exprs.length - 1]);
40348 }
40349
40350 if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
40351 return node.value;
40352 }
40353
40354 if (path.isNullLiteral()) {
40355 return null;
40356 }
40357
40358 if (path.isTemplateLiteral()) {
40359 var str = "";
40360
40361 var i = 0;
40362 var _exprs = path.get("expressions");
40363
40364 for (var _iterator = node.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
40365 var _ref;
40366
40367 if (_isArray) {
40368 if (_i >= _iterator.length) break;
40369 _ref = _iterator[_i++];
40370 } else {
40371 _i = _iterator.next();
40372 if (_i.done) break;
40373 _ref = _i.value;
40374 }
40375
40376 var elem = _ref;
40377
40378 if (!confident) break;
40379
40380 str += elem.value.cooked;
40381
40382 var expr = _exprs[i++];
40383 if (expr) str += String(evaluate(expr));
40384 }
40385
40386 if (!confident) return;
40387 return str;
40388 }
40389
40390 if (path.isConditionalExpression()) {
40391 var testResult = evaluate(path.get("test"));
40392 if (!confident) return;
40393 if (testResult) {
40394 return evaluate(path.get("consequent"));
40395 } else {
40396 return evaluate(path.get("alternate"));
40397 }
40398 }
40399
40400 if (path.isExpressionWrapper()) {
40401 return evaluate(path.get("expression"));
40402 }
40403
40404 if (path.isMemberExpression() && !path.parentPath.isCallExpression({ callee: node })) {
40405 var property = path.get("property");
40406 var object = path.get("object");
40407
40408 if (object.isLiteral() && property.isIdentifier()) {
40409 var _value = object.node.value;
40410 var type = typeof _value === "undefined" ? "undefined" : (0, _typeof3.default)(_value);
40411 if (type === "number" || type === "string") {
40412 return _value[property.node.name];
40413 }
40414 }
40415 }
40416
40417 if (path.isReferencedIdentifier()) {
40418 var binding = path.scope.getBinding(node.name);
40419
40420 if (binding && binding.constantViolations.length > 0) {
40421 return deopt(binding.path);
40422 }
40423
40424 if (binding && path.node.start < binding.path.node.end) {
40425 return deopt(binding.path);
40426 }
40427
40428 if (binding && binding.hasValue) {
40429 return binding.value;
40430 } else {
40431 if (node.name === "undefined") {
40432 return binding ? deopt(binding.path) : undefined;
40433 } else if (node.name === "Infinity") {
40434 return binding ? deopt(binding.path) : Infinity;
40435 } else if (node.name === "NaN") {
40436 return binding ? deopt(binding.path) : NaN;
40437 }
40438
40439 var resolved = path.resolve();
40440 if (resolved === path) {
40441 return deopt(path);
40442 } else {
40443 return evaluate(resolved);
40444 }
40445 }
40446 }
40447
40448 if (path.isUnaryExpression({ prefix: true })) {
40449 if (node.operator === "void") {
40450 return undefined;
40451 }
40452
40453 var argument = path.get("argument");
40454 if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
40455 return "function";
40456 }
40457
40458 var arg = evaluate(argument);
40459 if (!confident) return;
40460 switch (node.operator) {
40461 case "!":
40462 return !arg;
40463 case "+":
40464 return +arg;
40465 case "-":
40466 return -arg;
40467 case "~":
40468 return ~arg;
40469 case "typeof":
40470 return typeof arg === "undefined" ? "undefined" : (0, _typeof3.default)(arg);
40471 }
40472 }
40473
40474 if (path.isArrayExpression()) {
40475 var arr = [];
40476 var elems = path.get("elements");
40477 for (var _iterator2 = elems, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
40478 var _ref2;
40479
40480 if (_isArray2) {
40481 if (_i2 >= _iterator2.length) break;
40482 _ref2 = _iterator2[_i2++];
40483 } else {
40484 _i2 = _iterator2.next();
40485 if (_i2.done) break;
40486 _ref2 = _i2.value;
40487 }
40488
40489 var _elem = _ref2;
40490
40491 _elem = _elem.evaluate();
40492
40493 if (_elem.confident) {
40494 arr.push(_elem.value);
40495 } else {
40496 return deopt(_elem);
40497 }
40498 }
40499 return arr;
40500 }
40501
40502 if (path.isObjectExpression()) {
40503 var obj = {};
40504 var props = path.get("properties");
40505 for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
40506 var _ref3;
40507
40508 if (_isArray3) {
40509 if (_i3 >= _iterator3.length) break;
40510 _ref3 = _iterator3[_i3++];
40511 } else {
40512 _i3 = _iterator3.next();
40513 if (_i3.done) break;
40514 _ref3 = _i3.value;
40515 }
40516
40517 var prop = _ref3;
40518
40519 if (prop.isObjectMethod() || prop.isSpreadProperty()) {
40520 return deopt(prop);
40521 }
40522 var keyPath = prop.get("key");
40523 var key = keyPath;
40524 if (prop.node.computed) {
40525 key = key.evaluate();
40526 if (!key.confident) {
40527 return deopt(keyPath);
40528 }
40529 key = key.value;
40530 } else if (key.isIdentifier()) {
40531 key = key.node.name;
40532 } else {
40533 key = key.node.value;
40534 }
40535 var valuePath = prop.get("value");
40536 var _value2 = valuePath.evaluate();
40537 if (!_value2.confident) {
40538 return deopt(valuePath);
40539 }
40540 _value2 = _value2.value;
40541 obj[key] = _value2;
40542 }
40543 return obj;
40544 }
40545
40546 if (path.isLogicalExpression()) {
40547 var wasConfident = confident;
40548 var left = evaluate(path.get("left"));
40549 var leftConfident = confident;
40550 confident = wasConfident;
40551 var right = evaluate(path.get("right"));
40552 var rightConfident = confident;
40553 confident = leftConfident && rightConfident;
40554
40555 switch (node.operator) {
40556 case "||":
40557 if (left && leftConfident) {
40558 confident = true;
40559 return left;
40560 }
40561
40562 if (!confident) return;
40563
40564 return left || right;
40565 case "&&":
40566 if (!left && leftConfident || !right && rightConfident) {
40567 confident = true;
40568 }
40569
40570 if (!confident) return;
40571
40572 return left && right;
40573 }
40574 }
40575
40576 if (path.isBinaryExpression()) {
40577 var _left = evaluate(path.get("left"));
40578 if (!confident) return;
40579 var _right = evaluate(path.get("right"));
40580 if (!confident) return;
40581
40582 switch (node.operator) {
40583 case "-":
40584 return _left - _right;
40585 case "+":
40586 return _left + _right;
40587 case "/":
40588 return _left / _right;
40589 case "*":
40590 return _left * _right;
40591 case "%":
40592 return _left % _right;
40593 case "**":
40594 return Math.pow(_left, _right);
40595 case "<":
40596 return _left < _right;
40597 case ">":
40598 return _left > _right;
40599 case "<=":
40600 return _left <= _right;
40601 case ">=":
40602 return _left >= _right;
40603 case "==":
40604 return _left == _right;
40605 case "!=":
40606 return _left != _right;
40607 case "===":
40608 return _left === _right;
40609 case "!==":
40610 return _left !== _right;
40611 case "|":
40612 return _left | _right;
40613 case "&":
40614 return _left & _right;
40615 case "^":
40616 return _left ^ _right;
40617 case "<<":
40618 return _left << _right;
40619 case ">>":
40620 return _left >> _right;
40621 case ">>>":
40622 return _left >>> _right;
40623 }
40624 }
40625
40626 if (path.isCallExpression()) {
40627 var callee = path.get("callee");
40628 var context = void 0;
40629 var func = void 0;
40630
40631 if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
40632 func = global[node.callee.name];
40633 }
40634
40635 if (callee.isMemberExpression()) {
40636 var _object = callee.get("object");
40637 var _property = callee.get("property");
40638
40639 if (_object.isIdentifier() && _property.isIdentifier() && VALID_CALLEES.indexOf(_object.node.name) >= 0 && INVALID_METHODS.indexOf(_property.node.name) < 0) {
40640 context = global[_object.node.name];
40641 func = context[_property.node.name];
40642 }
40643
40644 if (_object.isLiteral() && _property.isIdentifier()) {
40645 var _type = (0, _typeof3.default)(_object.node.value);
40646 if (_type === "string" || _type === "number") {
40647 context = _object.node.value;
40648 func = context[_property.node.name];
40649 }
40650 }
40651 }
40652
40653 if (func) {
40654 var args = path.get("arguments").map(evaluate);
40655 if (!confident) return;
40656
40657 return func.apply(context, args);
40658 }
40659 }
40660
40661 deopt(path);
40662 }
40663 }
40664 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
40665
40666/***/ }),
40667/* 373 */
40668/***/ (function(module, exports, __webpack_require__) {
40669
40670 "use strict";
40671
40672 exports.__esModule = true;
40673
40674 var _create = __webpack_require__(9);
40675
40676 var _create2 = _interopRequireDefault(_create);
40677
40678 var _getIterator2 = __webpack_require__(2);
40679
40680 var _getIterator3 = _interopRequireDefault(_getIterator2);
40681
40682 exports.getStatementParent = getStatementParent;
40683 exports.getOpposite = getOpposite;
40684 exports.getCompletionRecords = getCompletionRecords;
40685 exports.getSibling = getSibling;
40686 exports.getPrevSibling = getPrevSibling;
40687 exports.getNextSibling = getNextSibling;
40688 exports.getAllNextSiblings = getAllNextSiblings;
40689 exports.getAllPrevSiblings = getAllPrevSiblings;
40690 exports.get = get;
40691 exports._getKey = _getKey;
40692 exports._getPattern = _getPattern;
40693 exports.getBindingIdentifiers = getBindingIdentifiers;
40694 exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
40695 exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
40696 exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
40697
40698 var _index = __webpack_require__(36);
40699
40700 var _index2 = _interopRequireDefault(_index);
40701
40702 var _babelTypes = __webpack_require__(1);
40703
40704 var t = _interopRequireWildcard(_babelTypes);
40705
40706 function _interopRequireWildcard(obj) {
40707 if (obj && obj.__esModule) {
40708 return obj;
40709 } else {
40710 var newObj = {};if (obj != null) {
40711 for (var key in obj) {
40712 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
40713 }
40714 }newObj.default = obj;return newObj;
40715 }
40716 }
40717
40718 function _interopRequireDefault(obj) {
40719 return obj && obj.__esModule ? obj : { default: obj };
40720 }
40721
40722 function getStatementParent() {
40723 var path = this;
40724
40725 do {
40726 if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
40727 break;
40728 } else {
40729 path = path.parentPath;
40730 }
40731 } while (path);
40732
40733 if (path && (path.isProgram() || path.isFile())) {
40734 throw new Error("File/Program node, we can't possibly find a statement parent to this");
40735 }
40736
40737 return path;
40738 }
40739
40740 function getOpposite() {
40741 if (this.key === "left") {
40742 return this.getSibling("right");
40743 } else if (this.key === "right") {
40744 return this.getSibling("left");
40745 }
40746 }
40747
40748 function getCompletionRecords() {
40749 var paths = [];
40750
40751 var add = function add(path) {
40752 if (path) paths = paths.concat(path.getCompletionRecords());
40753 };
40754
40755 if (this.isIfStatement()) {
40756 add(this.get("consequent"));
40757 add(this.get("alternate"));
40758 } else if (this.isDoExpression() || this.isFor() || this.isWhile()) {
40759 add(this.get("body"));
40760 } else if (this.isProgram() || this.isBlockStatement()) {
40761 add(this.get("body").pop());
40762 } else if (this.isFunction()) {
40763 return this.get("body").getCompletionRecords();
40764 } else if (this.isTryStatement()) {
40765 add(this.get("block"));
40766 add(this.get("handler"));
40767 add(this.get("finalizer"));
40768 } else {
40769 paths.push(this);
40770 }
40771
40772 return paths;
40773 }
40774
40775 function getSibling(key) {
40776 return _index2.default.get({
40777 parentPath: this.parentPath,
40778 parent: this.parent,
40779 container: this.container,
40780 listKey: this.listKey,
40781 key: key
40782 });
40783 }
40784
40785 function getPrevSibling() {
40786 return this.getSibling(this.key - 1);
40787 }
40788
40789 function getNextSibling() {
40790 return this.getSibling(this.key + 1);
40791 }
40792
40793 function getAllNextSiblings() {
40794 var _key = this.key;
40795 var sibling = this.getSibling(++_key);
40796 var siblings = [];
40797 while (sibling.node) {
40798 siblings.push(sibling);
40799 sibling = this.getSibling(++_key);
40800 }
40801 return siblings;
40802 }
40803
40804 function getAllPrevSiblings() {
40805 var _key = this.key;
40806 var sibling = this.getSibling(--_key);
40807 var siblings = [];
40808 while (sibling.node) {
40809 siblings.push(sibling);
40810 sibling = this.getSibling(--_key);
40811 }
40812 return siblings;
40813 }
40814
40815 function get(key, context) {
40816 if (context === true) context = this.context;
40817 var parts = key.split(".");
40818 if (parts.length === 1) {
40819 return this._getKey(key, context);
40820 } else {
40821 return this._getPattern(parts, context);
40822 }
40823 }
40824
40825 function _getKey(key, context) {
40826 var _this = this;
40827
40828 var node = this.node;
40829 var container = node[key];
40830
40831 if (Array.isArray(container)) {
40832 return container.map(function (_, i) {
40833 return _index2.default.get({
40834 listKey: key,
40835 parentPath: _this,
40836 parent: node,
40837 container: container,
40838 key: i
40839 }).setContext(context);
40840 });
40841 } else {
40842 return _index2.default.get({
40843 parentPath: this,
40844 parent: node,
40845 container: node,
40846 key: key
40847 }).setContext(context);
40848 }
40849 }
40850
40851 function _getPattern(parts, context) {
40852 var path = this;
40853 for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
40854 var _ref;
40855
40856 if (_isArray) {
40857 if (_i >= _iterator.length) break;
40858 _ref = _iterator[_i++];
40859 } else {
40860 _i = _iterator.next();
40861 if (_i.done) break;
40862 _ref = _i.value;
40863 }
40864
40865 var part = _ref;
40866
40867 if (part === ".") {
40868 path = path.parentPath;
40869 } else {
40870 if (Array.isArray(path)) {
40871 path = path[part];
40872 } else {
40873 path = path.get(part, context);
40874 }
40875 }
40876 }
40877 return path;
40878 }
40879
40880 function getBindingIdentifiers(duplicates) {
40881 return t.getBindingIdentifiers(this.node, duplicates);
40882 }
40883
40884 function getOuterBindingIdentifiers(duplicates) {
40885 return t.getOuterBindingIdentifiers(this.node, duplicates);
40886 }
40887
40888 function getBindingIdentifierPaths() {
40889 var duplicates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
40890 var outerOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
40891
40892 var path = this;
40893 var search = [].concat(path);
40894 var ids = (0, _create2.default)(null);
40895
40896 while (search.length) {
40897 var id = search.shift();
40898 if (!id) continue;
40899 if (!id.node) continue;
40900
40901 var keys = t.getBindingIdentifiers.keys[id.node.type];
40902
40903 if (id.isIdentifier()) {
40904 if (duplicates) {
40905 var _ids = ids[id.node.name] = ids[id.node.name] || [];
40906 _ids.push(id);
40907 } else {
40908 ids[id.node.name] = id;
40909 }
40910 continue;
40911 }
40912
40913 if (id.isExportDeclaration()) {
40914 var declaration = id.get("declaration");
40915 if (declaration.isDeclaration()) {
40916 search.push(declaration);
40917 }
40918 continue;
40919 }
40920
40921 if (outerOnly) {
40922 if (id.isFunctionDeclaration()) {
40923 search.push(id.get("id"));
40924 continue;
40925 }
40926 if (id.isFunctionExpression()) {
40927 continue;
40928 }
40929 }
40930
40931 if (keys) {
40932 for (var i = 0; i < keys.length; i++) {
40933 var key = keys[i];
40934 var child = id.get(key);
40935 if (Array.isArray(child) || child.node) {
40936 search = search.concat(child);
40937 }
40938 }
40939 }
40940 }
40941
40942 return ids;
40943 }
40944
40945 function getOuterBindingIdentifierPaths(duplicates) {
40946 return this.getBindingIdentifierPaths(duplicates, true);
40947 }
40948
40949/***/ }),
40950/* 374 */
40951/***/ (function(module, exports, __webpack_require__) {
40952
40953 "use strict";
40954
40955 exports.__esModule = true;
40956
40957 var _getIterator2 = __webpack_require__(2);
40958
40959 var _getIterator3 = _interopRequireDefault(_getIterator2);
40960
40961 exports.getTypeAnnotation = getTypeAnnotation;
40962 exports._getTypeAnnotation = _getTypeAnnotation;
40963 exports.isBaseType = isBaseType;
40964 exports.couldBeBaseType = couldBeBaseType;
40965 exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
40966 exports.isGenericType = isGenericType;
40967
40968 var _inferers = __webpack_require__(376);
40969
40970 var inferers = _interopRequireWildcard(_inferers);
40971
40972 var _babelTypes = __webpack_require__(1);
40973
40974 var t = _interopRequireWildcard(_babelTypes);
40975
40976 function _interopRequireWildcard(obj) {
40977 if (obj && obj.__esModule) {
40978 return obj;
40979 } else {
40980 var newObj = {};if (obj != null) {
40981 for (var key in obj) {
40982 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
40983 }
40984 }newObj.default = obj;return newObj;
40985 }
40986 }
40987
40988 function _interopRequireDefault(obj) {
40989 return obj && obj.__esModule ? obj : { default: obj };
40990 }
40991
40992 function getTypeAnnotation() {
40993 if (this.typeAnnotation) return this.typeAnnotation;
40994
40995 var type = this._getTypeAnnotation() || t.anyTypeAnnotation();
40996 if (t.isTypeAnnotation(type)) type = type.typeAnnotation;
40997 return this.typeAnnotation = type;
40998 }
40999
41000 function _getTypeAnnotation() {
41001 var node = this.node;
41002
41003 if (!node) {
41004 if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
41005 var declar = this.parentPath.parentPath;
41006 var declarParent = declar.parentPath;
41007
41008 if (declar.key === "left" && declarParent.isForInStatement()) {
41009 return t.stringTypeAnnotation();
41010 }
41011
41012 if (declar.key === "left" && declarParent.isForOfStatement()) {
41013 return t.anyTypeAnnotation();
41014 }
41015
41016 return t.voidTypeAnnotation();
41017 } else {
41018 return;
41019 }
41020 }
41021
41022 if (node.typeAnnotation) {
41023 return node.typeAnnotation;
41024 }
41025
41026 var inferer = inferers[node.type];
41027 if (inferer) {
41028 return inferer.call(this, node);
41029 }
41030
41031 inferer = inferers[this.parentPath.type];
41032 if (inferer && inferer.validParent) {
41033 return this.parentPath.getTypeAnnotation();
41034 }
41035 }
41036
41037 function isBaseType(baseName, soft) {
41038 return _isBaseType(baseName, this.getTypeAnnotation(), soft);
41039 }
41040
41041 function _isBaseType(baseName, type, soft) {
41042 if (baseName === "string") {
41043 return t.isStringTypeAnnotation(type);
41044 } else if (baseName === "number") {
41045 return t.isNumberTypeAnnotation(type);
41046 } else if (baseName === "boolean") {
41047 return t.isBooleanTypeAnnotation(type);
41048 } else if (baseName === "any") {
41049 return t.isAnyTypeAnnotation(type);
41050 } else if (baseName === "mixed") {
41051 return t.isMixedTypeAnnotation(type);
41052 } else if (baseName === "empty") {
41053 return t.isEmptyTypeAnnotation(type);
41054 } else if (baseName === "void") {
41055 return t.isVoidTypeAnnotation(type);
41056 } else {
41057 if (soft) {
41058 return false;
41059 } else {
41060 throw new Error("Unknown base type " + baseName);
41061 }
41062 }
41063 }
41064
41065 function couldBeBaseType(name) {
41066 var type = this.getTypeAnnotation();
41067 if (t.isAnyTypeAnnotation(type)) return true;
41068
41069 if (t.isUnionTypeAnnotation(type)) {
41070 for (var _iterator = type.types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
41071 var _ref;
41072
41073 if (_isArray) {
41074 if (_i >= _iterator.length) break;
41075 _ref = _iterator[_i++];
41076 } else {
41077 _i = _iterator.next();
41078 if (_i.done) break;
41079 _ref = _i.value;
41080 }
41081
41082 var type2 = _ref;
41083
41084 if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
41085 return true;
41086 }
41087 }
41088 return false;
41089 } else {
41090 return _isBaseType(name, type, true);
41091 }
41092 }
41093
41094 function baseTypeStrictlyMatches(right) {
41095 var left = this.getTypeAnnotation();
41096 right = right.getTypeAnnotation();
41097
41098 if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) {
41099 return right.type === left.type;
41100 }
41101 }
41102
41103 function isGenericType(genericName) {
41104 var type = this.getTypeAnnotation();
41105 return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, { name: genericName });
41106 }
41107
41108/***/ }),
41109/* 375 */
41110/***/ (function(module, exports, __webpack_require__) {
41111
41112 "use strict";
41113
41114 exports.__esModule = true;
41115
41116 var _getIterator2 = __webpack_require__(2);
41117
41118 var _getIterator3 = _interopRequireDefault(_getIterator2);
41119
41120 exports.default = function (node) {
41121 if (!this.isReferenced()) return;
41122
41123 var binding = this.scope.getBinding(node.name);
41124 if (binding) {
41125 if (binding.identifier.typeAnnotation) {
41126 return binding.identifier.typeAnnotation;
41127 } else {
41128 return getTypeAnnotationBindingConstantViolations(this, node.name);
41129 }
41130 }
41131
41132 if (node.name === "undefined") {
41133 return t.voidTypeAnnotation();
41134 } else if (node.name === "NaN" || node.name === "Infinity") {
41135 return t.numberTypeAnnotation();
41136 } else if (node.name === "arguments") {}
41137 };
41138
41139 var _babelTypes = __webpack_require__(1);
41140
41141 var t = _interopRequireWildcard(_babelTypes);
41142
41143 function _interopRequireWildcard(obj) {
41144 if (obj && obj.__esModule) {
41145 return obj;
41146 } else {
41147 var newObj = {};if (obj != null) {
41148 for (var key in obj) {
41149 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
41150 }
41151 }newObj.default = obj;return newObj;
41152 }
41153 }
41154
41155 function _interopRequireDefault(obj) {
41156 return obj && obj.__esModule ? obj : { default: obj };
41157 }
41158
41159 function getTypeAnnotationBindingConstantViolations(path, name) {
41160 var binding = path.scope.getBinding(name);
41161
41162 var types = [];
41163 path.typeAnnotation = t.unionTypeAnnotation(types);
41164
41165 var functionConstantViolations = [];
41166 var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
41167
41168 var testType = getConditionalAnnotation(path, name);
41169 if (testType) {
41170 var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
41171
41172 constantViolations = constantViolations.filter(function (path) {
41173 return testConstantViolations.indexOf(path) < 0;
41174 });
41175
41176 types.push(testType.typeAnnotation);
41177 }
41178
41179 if (constantViolations.length) {
41180 constantViolations = constantViolations.concat(functionConstantViolations);
41181
41182 for (var _iterator = constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
41183 var _ref;
41184
41185 if (_isArray) {
41186 if (_i >= _iterator.length) break;
41187 _ref = _iterator[_i++];
41188 } else {
41189 _i = _iterator.next();
41190 if (_i.done) break;
41191 _ref = _i.value;
41192 }
41193
41194 var violation = _ref;
41195
41196 types.push(violation.getTypeAnnotation());
41197 }
41198 }
41199
41200 if (types.length) {
41201 return t.createUnionTypeAnnotation(types);
41202 }
41203 }
41204
41205 function getConstantViolationsBefore(binding, path, functions) {
41206 var violations = binding.constantViolations.slice();
41207 violations.unshift(binding.path);
41208 return violations.filter(function (violation) {
41209 violation = violation.resolve();
41210 var status = violation._guessExecutionStatusRelativeTo(path);
41211 if (functions && status === "function") functions.push(violation);
41212 return status === "before";
41213 });
41214 }
41215
41216 function inferAnnotationFromBinaryExpression(name, path) {
41217 var operator = path.node.operator;
41218
41219 var right = path.get("right").resolve();
41220 var left = path.get("left").resolve();
41221
41222 var target = void 0;
41223 if (left.isIdentifier({ name: name })) {
41224 target = right;
41225 } else if (right.isIdentifier({ name: name })) {
41226 target = left;
41227 }
41228 if (target) {
41229 if (operator === "===") {
41230 return target.getTypeAnnotation();
41231 } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
41232 return t.numberTypeAnnotation();
41233 } else {
41234 return;
41235 }
41236 } else {
41237 if (operator !== "===") return;
41238 }
41239
41240 var typeofPath = void 0;
41241 var typePath = void 0;
41242 if (left.isUnaryExpression({ operator: "typeof" })) {
41243 typeofPath = left;
41244 typePath = right;
41245 } else if (right.isUnaryExpression({ operator: "typeof" })) {
41246 typeofPath = right;
41247 typePath = left;
41248 }
41249 if (!typePath && !typeofPath) return;
41250
41251 typePath = typePath.resolve();
41252 if (!typePath.isLiteral()) return;
41253
41254 var typeValue = typePath.node.value;
41255 if (typeof typeValue !== "string") return;
41256
41257 if (!typeofPath.get("argument").isIdentifier({ name: name })) return;
41258
41259 return t.createTypeAnnotationBasedOnTypeof(typePath.node.value);
41260 }
41261
41262 function getParentConditionalPath(path) {
41263 var parentPath = void 0;
41264 while (parentPath = path.parentPath) {
41265 if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
41266 if (path.key === "test") {
41267 return;
41268 } else {
41269 return parentPath;
41270 }
41271 } else {
41272 path = parentPath;
41273 }
41274 }
41275 }
41276
41277 function getConditionalAnnotation(path, name) {
41278 var ifStatement = getParentConditionalPath(path);
41279 if (!ifStatement) return;
41280
41281 var test = ifStatement.get("test");
41282 var paths = [test];
41283 var types = [];
41284
41285 do {
41286 var _path = paths.shift().resolve();
41287
41288 if (_path.isLogicalExpression()) {
41289 paths.push(_path.get("left"));
41290 paths.push(_path.get("right"));
41291 }
41292
41293 if (_path.isBinaryExpression()) {
41294 var type = inferAnnotationFromBinaryExpression(name, _path);
41295 if (type) types.push(type);
41296 }
41297 } while (paths.length);
41298
41299 if (types.length) {
41300 return {
41301 typeAnnotation: t.createUnionTypeAnnotation(types),
41302 ifStatement: ifStatement
41303 };
41304 } else {
41305 return getConditionalAnnotation(ifStatement, name);
41306 }
41307 }
41308 module.exports = exports["default"];
41309
41310/***/ }),
41311/* 376 */
41312/***/ (function(module, exports, __webpack_require__) {
41313
41314 "use strict";
41315
41316 exports.__esModule = true;
41317 exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = exports.Identifier = undefined;
41318
41319 var _infererReference = __webpack_require__(375);
41320
41321 Object.defineProperty(exports, "Identifier", {
41322 enumerable: true,
41323 get: function get() {
41324 return _interopRequireDefault(_infererReference).default;
41325 }
41326 });
41327 exports.VariableDeclarator = VariableDeclarator;
41328 exports.TypeCastExpression = TypeCastExpression;
41329 exports.NewExpression = NewExpression;
41330 exports.TemplateLiteral = TemplateLiteral;
41331 exports.UnaryExpression = UnaryExpression;
41332 exports.BinaryExpression = BinaryExpression;
41333 exports.LogicalExpression = LogicalExpression;
41334 exports.ConditionalExpression = ConditionalExpression;
41335 exports.SequenceExpression = SequenceExpression;
41336 exports.AssignmentExpression = AssignmentExpression;
41337 exports.UpdateExpression = UpdateExpression;
41338 exports.StringLiteral = StringLiteral;
41339 exports.NumericLiteral = NumericLiteral;
41340 exports.BooleanLiteral = BooleanLiteral;
41341 exports.NullLiteral = NullLiteral;
41342 exports.RegExpLiteral = RegExpLiteral;
41343 exports.ObjectExpression = ObjectExpression;
41344 exports.ArrayExpression = ArrayExpression;
41345 exports.RestElement = RestElement;
41346 exports.CallExpression = CallExpression;
41347 exports.TaggedTemplateExpression = TaggedTemplateExpression;
41348
41349 var _babelTypes = __webpack_require__(1);
41350
41351 var t = _interopRequireWildcard(_babelTypes);
41352
41353 function _interopRequireWildcard(obj) {
41354 if (obj && obj.__esModule) {
41355 return obj;
41356 } else {
41357 var newObj = {};if (obj != null) {
41358 for (var key in obj) {
41359 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
41360 }
41361 }newObj.default = obj;return newObj;
41362 }
41363 }
41364
41365 function _interopRequireDefault(obj) {
41366 return obj && obj.__esModule ? obj : { default: obj };
41367 }
41368
41369 function VariableDeclarator() {
41370 var id = this.get("id");
41371
41372 if (id.isIdentifier()) {
41373 return this.get("init").getTypeAnnotation();
41374 } else {
41375 return;
41376 }
41377 }
41378
41379 function TypeCastExpression(node) {
41380 return node.typeAnnotation;
41381 }
41382
41383 TypeCastExpression.validParent = true;
41384
41385 function NewExpression(node) {
41386 if (this.get("callee").isIdentifier()) {
41387 return t.genericTypeAnnotation(node.callee);
41388 }
41389 }
41390
41391 function TemplateLiteral() {
41392 return t.stringTypeAnnotation();
41393 }
41394
41395 function UnaryExpression(node) {
41396 var operator = node.operator;
41397
41398 if (operator === "void") {
41399 return t.voidTypeAnnotation();
41400 } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
41401 return t.numberTypeAnnotation();
41402 } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
41403 return t.stringTypeAnnotation();
41404 } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
41405 return t.booleanTypeAnnotation();
41406 }
41407 }
41408
41409 function BinaryExpression(node) {
41410 var operator = node.operator;
41411
41412 if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
41413 return t.numberTypeAnnotation();
41414 } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
41415 return t.booleanTypeAnnotation();
41416 } else if (operator === "+") {
41417 var right = this.get("right");
41418 var left = this.get("left");
41419
41420 if (left.isBaseType("number") && right.isBaseType("number")) {
41421 return t.numberTypeAnnotation();
41422 } else if (left.isBaseType("string") || right.isBaseType("string")) {
41423 return t.stringTypeAnnotation();
41424 }
41425
41426 return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]);
41427 }
41428 }
41429
41430 function LogicalExpression() {
41431 return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]);
41432 }
41433
41434 function ConditionalExpression() {
41435 return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]);
41436 }
41437
41438 function SequenceExpression() {
41439 return this.get("expressions").pop().getTypeAnnotation();
41440 }
41441
41442 function AssignmentExpression() {
41443 return this.get("right").getTypeAnnotation();
41444 }
41445
41446 function UpdateExpression(node) {
41447 var operator = node.operator;
41448 if (operator === "++" || operator === "--") {
41449 return t.numberTypeAnnotation();
41450 }
41451 }
41452
41453 function StringLiteral() {
41454 return t.stringTypeAnnotation();
41455 }
41456
41457 function NumericLiteral() {
41458 return t.numberTypeAnnotation();
41459 }
41460
41461 function BooleanLiteral() {
41462 return t.booleanTypeAnnotation();
41463 }
41464
41465 function NullLiteral() {
41466 return t.nullLiteralTypeAnnotation();
41467 }
41468
41469 function RegExpLiteral() {
41470 return t.genericTypeAnnotation(t.identifier("RegExp"));
41471 }
41472
41473 function ObjectExpression() {
41474 return t.genericTypeAnnotation(t.identifier("Object"));
41475 }
41476
41477 function ArrayExpression() {
41478 return t.genericTypeAnnotation(t.identifier("Array"));
41479 }
41480
41481 function RestElement() {
41482 return ArrayExpression();
41483 }
41484
41485 RestElement.validParent = true;
41486
41487 function Func() {
41488 return t.genericTypeAnnotation(t.identifier("Function"));
41489 }
41490
41491 exports.FunctionExpression = Func;
41492 exports.ArrowFunctionExpression = Func;
41493 exports.FunctionDeclaration = Func;
41494 exports.ClassExpression = Func;
41495 exports.ClassDeclaration = Func;
41496 function CallExpression() {
41497 return resolveCall(this.get("callee"));
41498 }
41499
41500 function TaggedTemplateExpression() {
41501 return resolveCall(this.get("tag"));
41502 }
41503
41504 function resolveCall(callee) {
41505 callee = callee.resolve();
41506
41507 if (callee.isFunction()) {
41508 if (callee.is("async")) {
41509 if (callee.is("generator")) {
41510 return t.genericTypeAnnotation(t.identifier("AsyncIterator"));
41511 } else {
41512 return t.genericTypeAnnotation(t.identifier("Promise"));
41513 }
41514 } else {
41515 if (callee.node.returnType) {
41516 return callee.node.returnType;
41517 } else {}
41518 }
41519 }
41520 }
41521
41522/***/ }),
41523/* 377 */
41524/***/ (function(module, exports, __webpack_require__) {
41525
41526 "use strict";
41527
41528 exports.__esModule = true;
41529 exports.is = undefined;
41530
41531 var _getIterator2 = __webpack_require__(2);
41532
41533 var _getIterator3 = _interopRequireDefault(_getIterator2);
41534
41535 exports.matchesPattern = matchesPattern;
41536 exports.has = has;
41537 exports.isStatic = isStatic;
41538 exports.isnt = isnt;
41539 exports.equals = equals;
41540 exports.isNodeType = isNodeType;
41541 exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
41542 exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
41543 exports.isCompletionRecord = isCompletionRecord;
41544 exports.isStatementOrBlock = isStatementOrBlock;
41545 exports.referencesImport = referencesImport;
41546 exports.getSource = getSource;
41547 exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
41548 exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
41549 exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
41550 exports.resolve = resolve;
41551 exports._resolve = _resolve;
41552
41553 var _includes = __webpack_require__(111);
41554
41555 var _includes2 = _interopRequireDefault(_includes);
41556
41557 var _babelTypes = __webpack_require__(1);
41558
41559 var t = _interopRequireWildcard(_babelTypes);
41560
41561 function _interopRequireWildcard(obj) {
41562 if (obj && obj.__esModule) {
41563 return obj;
41564 } else {
41565 var newObj = {};if (obj != null) {
41566 for (var key in obj) {
41567 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
41568 }
41569 }newObj.default = obj;return newObj;
41570 }
41571 }
41572
41573 function _interopRequireDefault(obj) {
41574 return obj && obj.__esModule ? obj : { default: obj };
41575 }
41576
41577 function matchesPattern(pattern, allowPartial) {
41578 if (!this.isMemberExpression()) return false;
41579
41580 var parts = pattern.split(".");
41581 var search = [this.node];
41582 var i = 0;
41583
41584 function matches(name) {
41585 var part = parts[i];
41586 return part === "*" || name === part;
41587 }
41588
41589 while (search.length) {
41590 var node = search.shift();
41591
41592 if (allowPartial && i === parts.length) {
41593 return true;
41594 }
41595
41596 if (t.isIdentifier(node)) {
41597 if (!matches(node.name)) return false;
41598 } else if (t.isLiteral(node)) {
41599 if (!matches(node.value)) return false;
41600 } else if (t.isMemberExpression(node)) {
41601 if (node.computed && !t.isLiteral(node.property)) {
41602 return false;
41603 } else {
41604 search.unshift(node.property);
41605 search.unshift(node.object);
41606 continue;
41607 }
41608 } else if (t.isThisExpression(node)) {
41609 if (!matches("this")) return false;
41610 } else {
41611 return false;
41612 }
41613
41614 if (++i > parts.length) {
41615 return false;
41616 }
41617 }
41618
41619 return i === parts.length;
41620 }
41621
41622 function has(key) {
41623 var val = this.node && this.node[key];
41624 if (val && Array.isArray(val)) {
41625 return !!val.length;
41626 } else {
41627 return !!val;
41628 }
41629 }
41630
41631 function isStatic() {
41632 return this.scope.isStatic(this.node);
41633 }
41634
41635 var is = exports.is = has;
41636
41637 function isnt(key) {
41638 return !this.has(key);
41639 }
41640
41641 function equals(key, value) {
41642 return this.node[key] === value;
41643 }
41644
41645 function isNodeType(type) {
41646 return t.isType(this.type, type);
41647 }
41648
41649 function canHaveVariableDeclarationOrExpression() {
41650 return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
41651 }
41652
41653 function canSwapBetweenExpressionAndStatement(replacement) {
41654 if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
41655 return false;
41656 }
41657
41658 if (this.isExpression()) {
41659 return t.isBlockStatement(replacement);
41660 } else if (this.isBlockStatement()) {
41661 return t.isExpression(replacement);
41662 }
41663
41664 return false;
41665 }
41666
41667 function isCompletionRecord(allowInsideFunction) {
41668 var path = this;
41669 var first = true;
41670
41671 do {
41672 var container = path.container;
41673
41674 if (path.isFunction() && !first) {
41675 return !!allowInsideFunction;
41676 }
41677
41678 first = false;
41679
41680 if (Array.isArray(container) && path.key !== container.length - 1) {
41681 return false;
41682 }
41683 } while ((path = path.parentPath) && !path.isProgram());
41684
41685 return true;
41686 }
41687
41688 function isStatementOrBlock() {
41689 if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {
41690 return false;
41691 } else {
41692 return (0, _includes2.default)(t.STATEMENT_OR_BLOCK_KEYS, this.key);
41693 }
41694 }
41695
41696 function referencesImport(moduleSource, importName) {
41697 if (!this.isReferencedIdentifier()) return false;
41698
41699 var binding = this.scope.getBinding(this.node.name);
41700 if (!binding || binding.kind !== "module") return false;
41701
41702 var path = binding.path;
41703 var parent = path.parentPath;
41704 if (!parent.isImportDeclaration()) return false;
41705
41706 if (parent.node.source.value === moduleSource) {
41707 if (!importName) return true;
41708 } else {
41709 return false;
41710 }
41711
41712 if (path.isImportDefaultSpecifier() && importName === "default") {
41713 return true;
41714 }
41715
41716 if (path.isImportNamespaceSpecifier() && importName === "*") {
41717 return true;
41718 }
41719
41720 if (path.isImportSpecifier() && path.node.imported.name === importName) {
41721 return true;
41722 }
41723
41724 return false;
41725 }
41726
41727 function getSource() {
41728 var node = this.node;
41729 if (node.end) {
41730 return this.hub.file.code.slice(node.start, node.end);
41731 } else {
41732 return "";
41733 }
41734 }
41735
41736 function willIMaybeExecuteBefore(target) {
41737 return this._guessExecutionStatusRelativeTo(target) !== "after";
41738 }
41739
41740 function _guessExecutionStatusRelativeTo(target) {
41741 var targetFuncParent = target.scope.getFunctionParent();
41742 var selfFuncParent = this.scope.getFunctionParent();
41743
41744 if (targetFuncParent.node !== selfFuncParent.node) {
41745 var status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent);
41746 if (status) {
41747 return status;
41748 } else {
41749 target = targetFuncParent.path;
41750 }
41751 }
41752
41753 var targetPaths = target.getAncestry();
41754 if (targetPaths.indexOf(this) >= 0) return "after";
41755
41756 var selfPaths = this.getAncestry();
41757
41758 var commonPath = void 0;
41759 var targetIndex = void 0;
41760 var selfIndex = void 0;
41761 for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) {
41762 var selfPath = selfPaths[selfIndex];
41763 targetIndex = targetPaths.indexOf(selfPath);
41764 if (targetIndex >= 0) {
41765 commonPath = selfPath;
41766 break;
41767 }
41768 }
41769 if (!commonPath) {
41770 return "before";
41771 }
41772
41773 var targetRelationship = targetPaths[targetIndex - 1];
41774 var selfRelationship = selfPaths[selfIndex - 1];
41775 if (!targetRelationship || !selfRelationship) {
41776 return "before";
41777 }
41778
41779 if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) {
41780 return targetRelationship.key > selfRelationship.key ? "before" : "after";
41781 }
41782
41783 var targetKeyPosition = t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);
41784 var selfKeyPosition = t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);
41785 return targetKeyPosition > selfKeyPosition ? "before" : "after";
41786 }
41787
41788 function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) {
41789 var targetFuncPath = targetFuncParent.path;
41790 if (!targetFuncPath.isFunctionDeclaration()) return;
41791
41792 var binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name);
41793
41794 if (!binding.references) return "before";
41795
41796 var referencePaths = binding.referencePaths;
41797
41798 for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
41799 var _ref;
41800
41801 if (_isArray) {
41802 if (_i >= _iterator.length) break;
41803 _ref = _iterator[_i++];
41804 } else {
41805 _i = _iterator.next();
41806 if (_i.done) break;
41807 _ref = _i.value;
41808 }
41809
41810 var path = _ref;
41811
41812 if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
41813 return;
41814 }
41815 }
41816
41817 var allStatus = void 0;
41818
41819 for (var _iterator2 = referencePaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
41820 var _ref2;
41821
41822 if (_isArray2) {
41823 if (_i2 >= _iterator2.length) break;
41824 _ref2 = _iterator2[_i2++];
41825 } else {
41826 _i2 = _iterator2.next();
41827 if (_i2.done) break;
41828 _ref2 = _i2.value;
41829 }
41830
41831 var _path = _ref2;
41832
41833 var childOfFunction = !!_path.find(function (path) {
41834 return path.node === targetFuncPath.node;
41835 });
41836 if (childOfFunction) continue;
41837
41838 var status = this._guessExecutionStatusRelativeTo(_path);
41839
41840 if (allStatus) {
41841 if (allStatus !== status) return;
41842 } else {
41843 allStatus = status;
41844 }
41845 }
41846
41847 return allStatus;
41848 }
41849
41850 function resolve(dangerous, resolved) {
41851 return this._resolve(dangerous, resolved) || this;
41852 }
41853
41854 function _resolve(dangerous, resolved) {
41855 if (resolved && resolved.indexOf(this) >= 0) return;
41856
41857 resolved = resolved || [];
41858 resolved.push(this);
41859
41860 if (this.isVariableDeclarator()) {
41861 if (this.get("id").isIdentifier()) {
41862 return this.get("init").resolve(dangerous, resolved);
41863 } else {}
41864 } else if (this.isReferencedIdentifier()) {
41865 var binding = this.scope.getBinding(this.node.name);
41866 if (!binding) return;
41867
41868 if (!binding.constant) return;
41869
41870 if (binding.kind === "module") return;
41871
41872 if (binding.path !== this) {
41873 var ret = binding.path.resolve(dangerous, resolved);
41874
41875 if (this.find(function (parent) {
41876 return parent.node === ret.node;
41877 })) return;
41878 return ret;
41879 }
41880 } else if (this.isTypeCastExpression()) {
41881 return this.get("expression").resolve(dangerous, resolved);
41882 } else if (dangerous && this.isMemberExpression()) {
41883
41884 var targetKey = this.toComputedKey();
41885 if (!t.isLiteral(targetKey)) return;
41886
41887 var targetName = targetKey.value;
41888
41889 var target = this.get("object").resolve(dangerous, resolved);
41890
41891 if (target.isObjectExpression()) {
41892 var props = target.get("properties");
41893 for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
41894 var _ref3;
41895
41896 if (_isArray3) {
41897 if (_i3 >= _iterator3.length) break;
41898 _ref3 = _iterator3[_i3++];
41899 } else {
41900 _i3 = _iterator3.next();
41901 if (_i3.done) break;
41902 _ref3 = _i3.value;
41903 }
41904
41905 var prop = _ref3;
41906
41907 if (!prop.isProperty()) continue;
41908
41909 var key = prop.get("key");
41910
41911 var match = prop.isnt("computed") && key.isIdentifier({ name: targetName });
41912
41913 match = match || key.isLiteral({ value: targetName });
41914
41915 if (match) return prop.get("value").resolve(dangerous, resolved);
41916 }
41917 } else if (target.isArrayExpression() && !isNaN(+targetName)) {
41918 var elems = target.get("elements");
41919 var elem = elems[targetName];
41920 if (elem) return elem.resolve(dangerous, resolved);
41921 }
41922 }
41923 }
41924
41925/***/ }),
41926/* 378 */
41927/***/ (function(module, exports, __webpack_require__) {
41928
41929 "use strict";
41930
41931 exports.__esModule = true;
41932
41933 var _getIterator2 = __webpack_require__(2);
41934
41935 var _getIterator3 = _interopRequireDefault(_getIterator2);
41936
41937 var _classCallCheck2 = __webpack_require__(3);
41938
41939 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
41940
41941 var _babelTypes = __webpack_require__(1);
41942
41943 var t = _interopRequireWildcard(_babelTypes);
41944
41945 function _interopRequireWildcard(obj) {
41946 if (obj && obj.__esModule) {
41947 return obj;
41948 } else {
41949 var newObj = {};if (obj != null) {
41950 for (var key in obj) {
41951 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
41952 }
41953 }newObj.default = obj;return newObj;
41954 }
41955 }
41956
41957 function _interopRequireDefault(obj) {
41958 return obj && obj.__esModule ? obj : { default: obj };
41959 }
41960
41961 var referenceVisitor = {
41962 ReferencedIdentifier: function ReferencedIdentifier(path, state) {
41963 if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
41964 return;
41965 }
41966
41967 if (path.node.name === "this") {
41968 var scope = path.scope;
41969 do {
41970 if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break;
41971 } while (scope = scope.parent);
41972 if (scope) state.breakOnScopePaths.push(scope.path);
41973 }
41974
41975 var binding = path.scope.getBinding(path.node.name);
41976 if (!binding) return;
41977
41978 if (binding !== state.scope.getBinding(path.node.name)) return;
41979
41980 state.bindings[path.node.name] = binding;
41981 }
41982 };
41983
41984 var PathHoister = function () {
41985 function PathHoister(path, scope) {
41986 (0, _classCallCheck3.default)(this, PathHoister);
41987
41988 this.breakOnScopePaths = [];
41989
41990 this.bindings = {};
41991
41992 this.scopes = [];
41993
41994 this.scope = scope;
41995 this.path = path;
41996
41997 this.attachAfter = false;
41998 }
41999
42000 PathHoister.prototype.isCompatibleScope = function isCompatibleScope(scope) {
42001 for (var key in this.bindings) {
42002 var binding = this.bindings[key];
42003 if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
42004 return false;
42005 }
42006 }
42007
42008 return true;
42009 };
42010
42011 PathHoister.prototype.getCompatibleScopes = function getCompatibleScopes() {
42012 var scope = this.path.scope;
42013 do {
42014 if (this.isCompatibleScope(scope)) {
42015 this.scopes.push(scope);
42016 } else {
42017 break;
42018 }
42019
42020 if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
42021 break;
42022 }
42023 } while (scope = scope.parent);
42024 };
42025
42026 PathHoister.prototype.getAttachmentPath = function getAttachmentPath() {
42027 var path = this._getAttachmentPath();
42028 if (!path) return;
42029
42030 var targetScope = path.scope;
42031
42032 if (targetScope.path === path) {
42033 targetScope = path.scope.parent;
42034 }
42035
42036 if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
42037 for (var name in this.bindings) {
42038 if (!targetScope.hasOwnBinding(name)) continue;
42039
42040 var binding = this.bindings[name];
42041
42042 if (binding.kind === "param") continue;
42043
42044 if (this.getAttachmentParentForPath(binding.path).key > path.key) {
42045 this.attachAfter = true;
42046 path = binding.path;
42047
42048 for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
42049 var _ref;
42050
42051 if (_isArray) {
42052 if (_i >= _iterator.length) break;
42053 _ref = _iterator[_i++];
42054 } else {
42055 _i = _iterator.next();
42056 if (_i.done) break;
42057 _ref = _i.value;
42058 }
42059
42060 var violationPath = _ref;
42061
42062 if (this.getAttachmentParentForPath(violationPath).key > path.key) {
42063 path = violationPath;
42064 }
42065 }
42066 }
42067 }
42068 }
42069
42070 if (path.parentPath.isExportDeclaration()) {
42071 path = path.parentPath;
42072 }
42073
42074 return path;
42075 };
42076
42077 PathHoister.prototype._getAttachmentPath = function _getAttachmentPath() {
42078 var scopes = this.scopes;
42079
42080 var scope = scopes.pop();
42081
42082 if (!scope) return;
42083
42084 if (scope.path.isFunction()) {
42085 if (this.hasOwnParamBindings(scope)) {
42086 if (this.scope === scope) return;
42087
42088 return scope.path.get("body").get("body")[0];
42089 } else {
42090 return this.getNextScopeAttachmentParent();
42091 }
42092 } else if (scope.path.isProgram()) {
42093 return this.getNextScopeAttachmentParent();
42094 }
42095 };
42096
42097 PathHoister.prototype.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() {
42098 var scope = this.scopes.pop();
42099 if (scope) return this.getAttachmentParentForPath(scope.path);
42100 };
42101
42102 PathHoister.prototype.getAttachmentParentForPath = function getAttachmentParentForPath(path) {
42103 do {
42104 if (!path.parentPath || Array.isArray(path.container) && path.isStatement() || path.isVariableDeclarator() && path.parentPath.node !== null && path.parentPath.node.declarations.length > 1) return path;
42105 } while (path = path.parentPath);
42106 };
42107
42108 PathHoister.prototype.hasOwnParamBindings = function hasOwnParamBindings(scope) {
42109 for (var name in this.bindings) {
42110 if (!scope.hasOwnBinding(name)) continue;
42111
42112 var binding = this.bindings[name];
42113
42114 if (binding.kind === "param" && binding.constant) return true;
42115 }
42116 return false;
42117 };
42118
42119 PathHoister.prototype.run = function run() {
42120 var node = this.path.node;
42121 if (node._hoisted) return;
42122 node._hoisted = true;
42123
42124 this.path.traverse(referenceVisitor, this);
42125
42126 this.getCompatibleScopes();
42127
42128 var attachTo = this.getAttachmentPath();
42129 if (!attachTo) return;
42130
42131 if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
42132
42133 var uid = attachTo.scope.generateUidIdentifier("ref");
42134 var declarator = t.variableDeclarator(uid, this.path.node);
42135
42136 var insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
42137 attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]);
42138
42139 var parent = this.path.parentPath;
42140 if (parent.isJSXElement() && this.path.container === parent.node.children) {
42141 uid = t.JSXExpressionContainer(uid);
42142 }
42143
42144 this.path.replaceWith(uid);
42145 };
42146
42147 return PathHoister;
42148 }();
42149
42150 exports.default = PathHoister;
42151 module.exports = exports["default"];
42152
42153/***/ }),
42154/* 379 */
42155/***/ (function(module, exports) {
42156
42157 "use strict";
42158
42159 exports.__esModule = true;
42160 var hooks = exports.hooks = [function (self, parent) {
42161 var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
42162
42163 if (removeParent) {
42164 parent.remove();
42165 return true;
42166 }
42167 }, function (self, parent) {
42168 if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
42169 parent.replaceWith(parent.node.expressions[0]);
42170 return true;
42171 }
42172 }, function (self, parent) {
42173 if (parent.isBinary()) {
42174 if (self.key === "left") {
42175 parent.replaceWith(parent.node.right);
42176 } else {
42177 parent.replaceWith(parent.node.left);
42178 }
42179 return true;
42180 }
42181 }, function (self, parent) {
42182 if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
42183 self.replaceWith({
42184 type: "BlockStatement",
42185 body: []
42186 });
42187 return true;
42188 }
42189 }];
42190
42191/***/ }),
42192/* 380 */
42193/***/ (function(module, exports, __webpack_require__) {
42194
42195 "use strict";
42196
42197 exports.__esModule = true;
42198
42199 var _typeof2 = __webpack_require__(11);
42200
42201 var _typeof3 = _interopRequireDefault(_typeof2);
42202
42203 var _getIterator2 = __webpack_require__(2);
42204
42205 var _getIterator3 = _interopRequireDefault(_getIterator2);
42206
42207 exports.insertBefore = insertBefore;
42208 exports._containerInsert = _containerInsert;
42209 exports._containerInsertBefore = _containerInsertBefore;
42210 exports._containerInsertAfter = _containerInsertAfter;
42211 exports._maybePopFromStatements = _maybePopFromStatements;
42212 exports.insertAfter = insertAfter;
42213 exports.updateSiblingKeys = updateSiblingKeys;
42214 exports._verifyNodeList = _verifyNodeList;
42215 exports.unshiftContainer = unshiftContainer;
42216 exports.pushContainer = pushContainer;
42217 exports.hoist = hoist;
42218
42219 var _cache = __webpack_require__(88);
42220
42221 var _hoister = __webpack_require__(378);
42222
42223 var _hoister2 = _interopRequireDefault(_hoister);
42224
42225 var _index = __webpack_require__(36);
42226
42227 var _index2 = _interopRequireDefault(_index);
42228
42229 var _babelTypes = __webpack_require__(1);
42230
42231 var t = _interopRequireWildcard(_babelTypes);
42232
42233 function _interopRequireWildcard(obj) {
42234 if (obj && obj.__esModule) {
42235 return obj;
42236 } else {
42237 var newObj = {};if (obj != null) {
42238 for (var key in obj) {
42239 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
42240 }
42241 }newObj.default = obj;return newObj;
42242 }
42243 }
42244
42245 function _interopRequireDefault(obj) {
42246 return obj && obj.__esModule ? obj : { default: obj };
42247 }
42248
42249 function insertBefore(nodes) {
42250 this._assertUnremoved();
42251
42252 nodes = this._verifyNodeList(nodes);
42253
42254 if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) {
42255 return this.parentPath.insertBefore(nodes);
42256 } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") {
42257 if (this.node) nodes.push(this.node);
42258 this.replaceExpressionWithStatements(nodes);
42259 } else {
42260 this._maybePopFromStatements(nodes);
42261 if (Array.isArray(this.container)) {
42262 return this._containerInsertBefore(nodes);
42263 } else if (this.isStatementOrBlock()) {
42264 if (this.node) nodes.push(this.node);
42265 this._replaceWith(t.blockStatement(nodes));
42266 } else {
42267 throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
42268 }
42269 }
42270
42271 return [this];
42272 }
42273
42274 function _containerInsert(from, nodes) {
42275 this.updateSiblingKeys(from, nodes.length);
42276
42277 var paths = [];
42278
42279 for (var i = 0; i < nodes.length; i++) {
42280 var to = from + i;
42281 var node = nodes[i];
42282 this.container.splice(to, 0, node);
42283
42284 if (this.context) {
42285 var path = this.context.create(this.parent, this.container, to, this.listKey);
42286
42287 if (this.context.queue) path.pushContext(this.context);
42288 paths.push(path);
42289 } else {
42290 paths.push(_index2.default.get({
42291 parentPath: this.parentPath,
42292 parent: this.parent,
42293 container: this.container,
42294 listKey: this.listKey,
42295 key: to
42296 }));
42297 }
42298 }
42299
42300 var contexts = this._getQueueContexts();
42301
42302 for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
42303 var _ref;
42304
42305 if (_isArray) {
42306 if (_i >= _iterator.length) break;
42307 _ref = _iterator[_i++];
42308 } else {
42309 _i = _iterator.next();
42310 if (_i.done) break;
42311 _ref = _i.value;
42312 }
42313
42314 var _path = _ref;
42315
42316 _path.setScope();
42317 _path.debug(function () {
42318 return "Inserted.";
42319 });
42320
42321 for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
42322 var _ref2;
42323
42324 if (_isArray2) {
42325 if (_i2 >= _iterator2.length) break;
42326 _ref2 = _iterator2[_i2++];
42327 } else {
42328 _i2 = _iterator2.next();
42329 if (_i2.done) break;
42330 _ref2 = _i2.value;
42331 }
42332
42333 var context = _ref2;
42334
42335 context.maybeQueue(_path, true);
42336 }
42337 }
42338
42339 return paths;
42340 }
42341
42342 function _containerInsertBefore(nodes) {
42343 return this._containerInsert(this.key, nodes);
42344 }
42345
42346 function _containerInsertAfter(nodes) {
42347 return this._containerInsert(this.key + 1, nodes);
42348 }
42349
42350 function _maybePopFromStatements(nodes) {
42351 var last = nodes[nodes.length - 1];
42352 var isIdentifier = t.isIdentifier(last) || t.isExpressionStatement(last) && t.isIdentifier(last.expression);
42353
42354 if (isIdentifier && !this.isCompletionRecord()) {
42355 nodes.pop();
42356 }
42357 }
42358
42359 function insertAfter(nodes) {
42360 this._assertUnremoved();
42361
42362 nodes = this._verifyNodeList(nodes);
42363
42364 if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) {
42365 return this.parentPath.insertAfter(nodes);
42366 } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") {
42367 if (this.node) {
42368 var temp = this.scope.generateDeclaredUidIdentifier();
42369 nodes.unshift(t.expressionStatement(t.assignmentExpression("=", temp, this.node)));
42370 nodes.push(t.expressionStatement(temp));
42371 }
42372 this.replaceExpressionWithStatements(nodes);
42373 } else {
42374 this._maybePopFromStatements(nodes);
42375 if (Array.isArray(this.container)) {
42376 return this._containerInsertAfter(nodes);
42377 } else if (this.isStatementOrBlock()) {
42378 if (this.node) nodes.unshift(this.node);
42379 this._replaceWith(t.blockStatement(nodes));
42380 } else {
42381 throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
42382 }
42383 }
42384
42385 return [this];
42386 }
42387
42388 function updateSiblingKeys(fromIndex, incrementBy) {
42389 if (!this.parent) return;
42390
42391 var paths = _cache.path.get(this.parent);
42392 for (var i = 0; i < paths.length; i++) {
42393 var path = paths[i];
42394 if (path.key >= fromIndex) {
42395 path.key += incrementBy;
42396 }
42397 }
42398 }
42399
42400 function _verifyNodeList(nodes) {
42401 if (!nodes) {
42402 return [];
42403 }
42404
42405 if (nodes.constructor !== Array) {
42406 nodes = [nodes];
42407 }
42408
42409 for (var i = 0; i < nodes.length; i++) {
42410 var node = nodes[i];
42411 var msg = void 0;
42412
42413 if (!node) {
42414 msg = "has falsy node";
42415 } else if ((typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node)) !== "object") {
42416 msg = "contains a non-object node";
42417 } else if (!node.type) {
42418 msg = "without a type";
42419 } else if (node instanceof _index2.default) {
42420 msg = "has a NodePath when it expected a raw object";
42421 }
42422
42423 if (msg) {
42424 var type = Array.isArray(node) ? "array" : typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node);
42425 throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type);
42426 }
42427 }
42428
42429 return nodes;
42430 }
42431
42432 function unshiftContainer(listKey, nodes) {
42433 this._assertUnremoved();
42434
42435 nodes = this._verifyNodeList(nodes);
42436
42437 var path = _index2.default.get({
42438 parentPath: this,
42439 parent: this.node,
42440 container: this.node[listKey],
42441 listKey: listKey,
42442 key: 0
42443 });
42444
42445 return path.insertBefore(nodes);
42446 }
42447
42448 function pushContainer(listKey, nodes) {
42449 this._assertUnremoved();
42450
42451 nodes = this._verifyNodeList(nodes);
42452
42453 var container = this.node[listKey];
42454 var path = _index2.default.get({
42455 parentPath: this,
42456 parent: this.node,
42457 container: container,
42458 listKey: listKey,
42459 key: container.length
42460 });
42461
42462 return path.replaceWithMultiple(nodes);
42463 }
42464
42465 function hoist() {
42466 var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.scope;
42467
42468 var hoister = new _hoister2.default(this, scope);
42469 return hoister.run();
42470 }
42471
42472/***/ }),
42473/* 381 */
42474/***/ (function(module, exports, __webpack_require__) {
42475
42476 "use strict";
42477
42478 exports.__esModule = true;
42479
42480 var _getIterator2 = __webpack_require__(2);
42481
42482 var _getIterator3 = _interopRequireDefault(_getIterator2);
42483
42484 exports.remove = remove;
42485 exports._callRemovalHooks = _callRemovalHooks;
42486 exports._remove = _remove;
42487 exports._markRemoved = _markRemoved;
42488 exports._assertUnremoved = _assertUnremoved;
42489
42490 var _removalHooks = __webpack_require__(379);
42491
42492 function _interopRequireDefault(obj) {
42493 return obj && obj.__esModule ? obj : { default: obj };
42494 }
42495
42496 function remove() {
42497 this._assertUnremoved();
42498
42499 this.resync();
42500
42501 if (this._callRemovalHooks()) {
42502 this._markRemoved();
42503 return;
42504 }
42505
42506 this.shareCommentsWithSiblings();
42507 this._remove();
42508 this._markRemoved();
42509 }
42510
42511 function _callRemovalHooks() {
42512 for (var _iterator = _removalHooks.hooks, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
42513 var _ref;
42514
42515 if (_isArray) {
42516 if (_i >= _iterator.length) break;
42517 _ref = _iterator[_i++];
42518 } else {
42519 _i = _iterator.next();
42520 if (_i.done) break;
42521 _ref = _i.value;
42522 }
42523
42524 var fn = _ref;
42525
42526 if (fn(this, this.parentPath)) return true;
42527 }
42528 }
42529
42530 function _remove() {
42531 if (Array.isArray(this.container)) {
42532 this.container.splice(this.key, 1);
42533 this.updateSiblingKeys(this.key, -1);
42534 } else {
42535 this._replaceWith(null);
42536 }
42537 }
42538
42539 function _markRemoved() {
42540 this.shouldSkip = true;
42541 this.removed = true;
42542 this.node = null;
42543 }
42544
42545 function _assertUnremoved() {
42546 if (this.removed) {
42547 throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
42548 }
42549 }
42550
42551/***/ }),
42552/* 382 */
42553/***/ (function(module, exports, __webpack_require__) {
42554
42555 "use strict";
42556
42557 exports.__esModule = true;
42558
42559 var _getIterator2 = __webpack_require__(2);
42560
42561 var _getIterator3 = _interopRequireDefault(_getIterator2);
42562
42563 exports.replaceWithMultiple = replaceWithMultiple;
42564 exports.replaceWithSourceString = replaceWithSourceString;
42565 exports.replaceWith = replaceWith;
42566 exports._replaceWith = _replaceWith;
42567 exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
42568 exports.replaceInline = replaceInline;
42569
42570 var _babelCodeFrame = __webpack_require__(181);
42571
42572 var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame);
42573
42574 var _index = __webpack_require__(7);
42575
42576 var _index2 = _interopRequireDefault(_index);
42577
42578 var _index3 = __webpack_require__(36);
42579
42580 var _index4 = _interopRequireDefault(_index3);
42581
42582 var _babylon = __webpack_require__(89);
42583
42584 var _babelTypes = __webpack_require__(1);
42585
42586 var t = _interopRequireWildcard(_babelTypes);
42587
42588 function _interopRequireWildcard(obj) {
42589 if (obj && obj.__esModule) {
42590 return obj;
42591 } else {
42592 var newObj = {};if (obj != null) {
42593 for (var key in obj) {
42594 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
42595 }
42596 }newObj.default = obj;return newObj;
42597 }
42598 }
42599
42600 function _interopRequireDefault(obj) {
42601 return obj && obj.__esModule ? obj : { default: obj };
42602 }
42603
42604 var hoistVariablesVisitor = {
42605 Function: function Function(path) {
42606 path.skip();
42607 },
42608 VariableDeclaration: function VariableDeclaration(path) {
42609 if (path.node.kind !== "var") return;
42610
42611 var bindings = path.getBindingIdentifiers();
42612 for (var key in bindings) {
42613 path.scope.push({ id: bindings[key] });
42614 }
42615
42616 var exprs = [];
42617
42618 for (var _iterator = path.node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
42619 var _ref;
42620
42621 if (_isArray) {
42622 if (_i >= _iterator.length) break;
42623 _ref = _iterator[_i++];
42624 } else {
42625 _i = _iterator.next();
42626 if (_i.done) break;
42627 _ref = _i.value;
42628 }
42629
42630 var declar = _ref;
42631
42632 if (declar.init) {
42633 exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init)));
42634 }
42635 }
42636
42637 path.replaceWithMultiple(exprs);
42638 }
42639 };
42640
42641 function replaceWithMultiple(nodes) {
42642 this.resync();
42643
42644 nodes = this._verifyNodeList(nodes);
42645 t.inheritLeadingComments(nodes[0], this.node);
42646 t.inheritTrailingComments(nodes[nodes.length - 1], this.node);
42647 this.node = this.container[this.key] = null;
42648 this.insertAfter(nodes);
42649
42650 if (this.node) {
42651 this.requeue();
42652 } else {
42653 this.remove();
42654 }
42655 }
42656
42657 function replaceWithSourceString(replacement) {
42658 this.resync();
42659
42660 try {
42661 replacement = "(" + replacement + ")";
42662 replacement = (0, _babylon.parse)(replacement);
42663 } catch (err) {
42664 var loc = err.loc;
42665 if (loc) {
42666 err.message += " - make sure this is an expression.";
42667 err.message += "\n" + (0, _babelCodeFrame2.default)(replacement, loc.line, loc.column + 1);
42668 }
42669 throw err;
42670 }
42671
42672 replacement = replacement.program.body[0].expression;
42673 _index2.default.removeProperties(replacement);
42674 return this.replaceWith(replacement);
42675 }
42676
42677 function replaceWith(replacement) {
42678 this.resync();
42679
42680 if (this.removed) {
42681 throw new Error("You can't replace this node, we've already removed it");
42682 }
42683
42684 if (replacement instanceof _index4.default) {
42685 replacement = replacement.node;
42686 }
42687
42688 if (!replacement) {
42689 throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
42690 }
42691
42692 if (this.node === replacement) {
42693 return;
42694 }
42695
42696 if (this.isProgram() && !t.isProgram(replacement)) {
42697 throw new Error("You can only replace a Program root node with another Program node");
42698 }
42699
42700 if (Array.isArray(replacement)) {
42701 throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
42702 }
42703
42704 if (typeof replacement === "string") {
42705 throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
42706 }
42707
42708 if (this.isNodeType("Statement") && t.isExpression(replacement)) {
42709 if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
42710 replacement = t.expressionStatement(replacement);
42711 }
42712 }
42713
42714 if (this.isNodeType("Expression") && t.isStatement(replacement)) {
42715 if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
42716 return this.replaceExpressionWithStatements([replacement]);
42717 }
42718 }
42719
42720 var oldNode = this.node;
42721 if (oldNode) {
42722 t.inheritsComments(replacement, oldNode);
42723 t.removeComments(oldNode);
42724 }
42725
42726 this._replaceWith(replacement);
42727 this.type = replacement.type;
42728
42729 this.setScope();
42730
42731 this.requeue();
42732 }
42733
42734 function _replaceWith(node) {
42735 if (!this.container) {
42736 throw new ReferenceError("Container is falsy");
42737 }
42738
42739 if (this.inList) {
42740 t.validate(this.parent, this.key, [node]);
42741 } else {
42742 t.validate(this.parent, this.key, node);
42743 }
42744
42745 this.debug(function () {
42746 return "Replace with " + (node && node.type);
42747 });
42748
42749 this.node = this.container[this.key] = node;
42750 }
42751
42752 function replaceExpressionWithStatements(nodes) {
42753 this.resync();
42754
42755 var toSequenceExpression = t.toSequenceExpression(nodes, this.scope);
42756
42757 if (t.isSequenceExpression(toSequenceExpression)) {
42758 var exprs = toSequenceExpression.expressions;
42759
42760 if (exprs.length >= 2 && this.parentPath.isExpressionStatement()) {
42761 this._maybePopFromStatements(exprs);
42762 }
42763
42764 if (exprs.length === 1) {
42765 this.replaceWith(exprs[0]);
42766 } else {
42767 this.replaceWith(toSequenceExpression);
42768 }
42769 } else if (toSequenceExpression) {
42770 this.replaceWith(toSequenceExpression);
42771 } else {
42772 var container = t.functionExpression(null, [], t.blockStatement(nodes));
42773 container.shadow = true;
42774
42775 this.replaceWith(t.callExpression(container, []));
42776 this.traverse(hoistVariablesVisitor);
42777
42778 var completionRecords = this.get("callee").getCompletionRecords();
42779 for (var _iterator2 = completionRecords, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
42780 var _ref2;
42781
42782 if (_isArray2) {
42783 if (_i2 >= _iterator2.length) break;
42784 _ref2 = _iterator2[_i2++];
42785 } else {
42786 _i2 = _iterator2.next();
42787 if (_i2.done) break;
42788 _ref2 = _i2.value;
42789 }
42790
42791 var path = _ref2;
42792
42793 if (!path.isExpressionStatement()) continue;
42794
42795 var loop = path.findParent(function (path) {
42796 return path.isLoop();
42797 });
42798 if (loop) {
42799 var uid = loop.getData("expressionReplacementReturnUid");
42800
42801 if (!uid) {
42802 var callee = this.get("callee");
42803 uid = callee.scope.generateDeclaredUidIdentifier("ret");
42804 callee.get("body").pushContainer("body", t.returnStatement(uid));
42805 loop.setData("expressionReplacementReturnUid", uid);
42806 } else {
42807 uid = t.identifier(uid.name);
42808 }
42809
42810 path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression));
42811 } else {
42812 path.replaceWith(t.returnStatement(path.node.expression));
42813 }
42814 }
42815
42816 return this.node;
42817 }
42818 }
42819
42820 function replaceInline(nodes) {
42821 this.resync();
42822
42823 if (Array.isArray(nodes)) {
42824 if (Array.isArray(this.container)) {
42825 nodes = this._verifyNodeList(nodes);
42826 this._containerInsertAfter(nodes);
42827 return this.remove();
42828 } else {
42829 return this.replaceWithMultiple(nodes);
42830 }
42831 } else {
42832 return this.replaceWith(nodes);
42833 }
42834 }
42835
42836/***/ }),
42837/* 383 */
42838/***/ (function(module, exports, __webpack_require__) {
42839
42840 "use strict";
42841
42842 exports.__esModule = true;
42843
42844 var _classCallCheck2 = __webpack_require__(3);
42845
42846 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
42847
42848 var _binding = __webpack_require__(225);
42849
42850 var _binding2 = _interopRequireDefault(_binding);
42851
42852 var _babelTypes = __webpack_require__(1);
42853
42854 var t = _interopRequireWildcard(_babelTypes);
42855
42856 function _interopRequireWildcard(obj) {
42857 if (obj && obj.__esModule) {
42858 return obj;
42859 } else {
42860 var newObj = {};if (obj != null) {
42861 for (var key in obj) {
42862 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
42863 }
42864 }newObj.default = obj;return newObj;
42865 }
42866 }
42867
42868 function _interopRequireDefault(obj) {
42869 return obj && obj.__esModule ? obj : { default: obj };
42870 }
42871
42872 var renameVisitor = {
42873 ReferencedIdentifier: function ReferencedIdentifier(_ref, state) {
42874 var node = _ref.node;
42875
42876 if (node.name === state.oldName) {
42877 node.name = state.newName;
42878 }
42879 },
42880 Scope: function Scope(path, state) {
42881 if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
42882 path.skip();
42883 }
42884 },
42885 "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) {
42886 var ids = path.getOuterBindingIdentifiers();
42887
42888 for (var name in ids) {
42889 if (name === state.oldName) ids[name].name = state.newName;
42890 }
42891 }
42892 };
42893
42894 var Renamer = function () {
42895 function Renamer(binding, oldName, newName) {
42896 (0, _classCallCheck3.default)(this, Renamer);
42897
42898 this.newName = newName;
42899 this.oldName = oldName;
42900 this.binding = binding;
42901 }
42902
42903 Renamer.prototype.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) {
42904 var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath;
42905 if (!exportDeclar) return;
42906
42907 var isDefault = exportDeclar.isExportDefaultDeclaration();
42908
42909 if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) {
42910 parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default");
42911 }
42912
42913 var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers();
42914 var specifiers = [];
42915
42916 for (var name in bindingIdentifiers) {
42917 var localName = name === this.oldName ? this.newName : name;
42918 var exportedName = isDefault ? "default" : name;
42919 specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName)));
42920 }
42921
42922 if (specifiers.length) {
42923 var aliasDeclar = t.exportNamedDeclaration(null, specifiers);
42924
42925 if (parentDeclar.isFunctionDeclaration()) {
42926 aliasDeclar._blockHoist = 3;
42927 }
42928
42929 exportDeclar.insertAfter(aliasDeclar);
42930 exportDeclar.replaceWith(parentDeclar.node);
42931 }
42932 };
42933
42934 Renamer.prototype.rename = function rename(block) {
42935 var binding = this.binding,
42936 oldName = this.oldName,
42937 newName = this.newName;
42938 var scope = binding.scope,
42939 path = binding.path;
42940
42941 var parentDeclar = path.find(function (path) {
42942 return path.isDeclaration() || path.isFunctionExpression();
42943 });
42944 if (parentDeclar) {
42945 this.maybeConvertFromExportDeclaration(parentDeclar);
42946 }
42947
42948 scope.traverse(block || scope.block, renameVisitor, this);
42949
42950 if (!block) {
42951 scope.removeOwnBinding(oldName);
42952 scope.bindings[newName] = binding;
42953 this.binding.identifier.name = newName;
42954 }
42955
42956 if (binding.type === "hoisted") {}
42957 };
42958
42959 return Renamer;
42960 }();
42961
42962 exports.default = Renamer;
42963 module.exports = exports["default"];
42964
42965/***/ }),
42966/* 384 */
42967/***/ (function(module, exports, __webpack_require__) {
42968
42969 "use strict";
42970
42971 exports.__esModule = true;
42972
42973 var _typeof2 = __webpack_require__(11);
42974
42975 var _typeof3 = _interopRequireDefault(_typeof2);
42976
42977 var _keys = __webpack_require__(14);
42978
42979 var _keys2 = _interopRequireDefault(_keys);
42980
42981 var _getIterator2 = __webpack_require__(2);
42982
42983 var _getIterator3 = _interopRequireDefault(_getIterator2);
42984
42985 exports.explode = explode;
42986 exports.verify = verify;
42987 exports.merge = merge;
42988
42989 var _virtualTypes = __webpack_require__(224);
42990
42991 var virtualTypes = _interopRequireWildcard(_virtualTypes);
42992
42993 var _babelMessages = __webpack_require__(20);
42994
42995 var messages = _interopRequireWildcard(_babelMessages);
42996
42997 var _babelTypes = __webpack_require__(1);
42998
42999 var t = _interopRequireWildcard(_babelTypes);
43000
43001 var _clone = __webpack_require__(109);
43002
43003 var _clone2 = _interopRequireDefault(_clone);
43004
43005 function _interopRequireWildcard(obj) {
43006 if (obj && obj.__esModule) {
43007 return obj;
43008 } else {
43009 var newObj = {};if (obj != null) {
43010 for (var key in obj) {
43011 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
43012 }
43013 }newObj.default = obj;return newObj;
43014 }
43015 }
43016
43017 function _interopRequireDefault(obj) {
43018 return obj && obj.__esModule ? obj : { default: obj };
43019 }
43020
43021 function explode(visitor) {
43022 if (visitor._exploded) return visitor;
43023 visitor._exploded = true;
43024
43025 for (var nodeType in visitor) {
43026 if (shouldIgnoreKey(nodeType)) continue;
43027
43028 var parts = nodeType.split("|");
43029 if (parts.length === 1) continue;
43030
43031 var fns = visitor[nodeType];
43032 delete visitor[nodeType];
43033
43034 for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
43035 var _ref;
43036
43037 if (_isArray) {
43038 if (_i >= _iterator.length) break;
43039 _ref = _iterator[_i++];
43040 } else {
43041 _i = _iterator.next();
43042 if (_i.done) break;
43043 _ref = _i.value;
43044 }
43045
43046 var part = _ref;
43047
43048 visitor[part] = fns;
43049 }
43050 }
43051
43052 verify(visitor);
43053
43054 delete visitor.__esModule;
43055
43056 ensureEntranceObjects(visitor);
43057
43058 ensureCallbackArrays(visitor);
43059
43060 for (var _iterator2 = (0, _keys2.default)(visitor), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
43061 var _ref2;
43062
43063 if (_isArray2) {
43064 if (_i2 >= _iterator2.length) break;
43065 _ref2 = _iterator2[_i2++];
43066 } else {
43067 _i2 = _iterator2.next();
43068 if (_i2.done) break;
43069 _ref2 = _i2.value;
43070 }
43071
43072 var _nodeType3 = _ref2;
43073
43074 if (shouldIgnoreKey(_nodeType3)) continue;
43075
43076 var wrapper = virtualTypes[_nodeType3];
43077 if (!wrapper) continue;
43078
43079 var _fns2 = visitor[_nodeType3];
43080 for (var type in _fns2) {
43081 _fns2[type] = wrapCheck(wrapper, _fns2[type]);
43082 }
43083
43084 delete visitor[_nodeType3];
43085
43086 if (wrapper.types) {
43087 for (var _iterator4 = wrapper.types, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
43088 var _ref4;
43089
43090 if (_isArray4) {
43091 if (_i4 >= _iterator4.length) break;
43092 _ref4 = _iterator4[_i4++];
43093 } else {
43094 _i4 = _iterator4.next();
43095 if (_i4.done) break;
43096 _ref4 = _i4.value;
43097 }
43098
43099 var _type = _ref4;
43100
43101 if (visitor[_type]) {
43102 mergePair(visitor[_type], _fns2);
43103 } else {
43104 visitor[_type] = _fns2;
43105 }
43106 }
43107 } else {
43108 mergePair(visitor, _fns2);
43109 }
43110 }
43111
43112 for (var _nodeType in visitor) {
43113 if (shouldIgnoreKey(_nodeType)) continue;
43114
43115 var _fns = visitor[_nodeType];
43116
43117 var aliases = t.FLIPPED_ALIAS_KEYS[_nodeType];
43118
43119 var deprecratedKey = t.DEPRECATED_KEYS[_nodeType];
43120 if (deprecratedKey) {
43121 console.trace("Visitor defined for " + _nodeType + " but it has been renamed to " + deprecratedKey);
43122 aliases = [deprecratedKey];
43123 }
43124
43125 if (!aliases) continue;
43126
43127 delete visitor[_nodeType];
43128
43129 for (var _iterator3 = aliases, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
43130 var _ref3;
43131
43132 if (_isArray3) {
43133 if (_i3 >= _iterator3.length) break;
43134 _ref3 = _iterator3[_i3++];
43135 } else {
43136 _i3 = _iterator3.next();
43137 if (_i3.done) break;
43138 _ref3 = _i3.value;
43139 }
43140
43141 var alias = _ref3;
43142
43143 var existing = visitor[alias];
43144 if (existing) {
43145 mergePair(existing, _fns);
43146 } else {
43147 visitor[alias] = (0, _clone2.default)(_fns);
43148 }
43149 }
43150 }
43151
43152 for (var _nodeType2 in visitor) {
43153 if (shouldIgnoreKey(_nodeType2)) continue;
43154
43155 ensureCallbackArrays(visitor[_nodeType2]);
43156 }
43157
43158 return visitor;
43159 }
43160
43161 function verify(visitor) {
43162 if (visitor._verified) return;
43163
43164 if (typeof visitor === "function") {
43165 throw new Error(messages.get("traverseVerifyRootFunction"));
43166 }
43167
43168 for (var nodeType in visitor) {
43169 if (nodeType === "enter" || nodeType === "exit") {
43170 validateVisitorMethods(nodeType, visitor[nodeType]);
43171 }
43172
43173 if (shouldIgnoreKey(nodeType)) continue;
43174
43175 if (t.TYPES.indexOf(nodeType) < 0) {
43176 throw new Error(messages.get("traverseVerifyNodeType", nodeType));
43177 }
43178
43179 var visitors = visitor[nodeType];
43180 if ((typeof visitors === "undefined" ? "undefined" : (0, _typeof3.default)(visitors)) === "object") {
43181 for (var visitorKey in visitors) {
43182 if (visitorKey === "enter" || visitorKey === "exit") {
43183 validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]);
43184 } else {
43185 throw new Error(messages.get("traverseVerifyVisitorProperty", nodeType, visitorKey));
43186 }
43187 }
43188 }
43189 }
43190
43191 visitor._verified = true;
43192 }
43193
43194 function validateVisitorMethods(path, val) {
43195 var fns = [].concat(val);
43196 for (var _iterator5 = fns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
43197 var _ref5;
43198
43199 if (_isArray5) {
43200 if (_i5 >= _iterator5.length) break;
43201 _ref5 = _iterator5[_i5++];
43202 } else {
43203 _i5 = _iterator5.next();
43204 if (_i5.done) break;
43205 _ref5 = _i5.value;
43206 }
43207
43208 var fn = _ref5;
43209
43210 if (typeof fn !== "function") {
43211 throw new TypeError("Non-function found defined in " + path + " with type " + (typeof fn === "undefined" ? "undefined" : (0, _typeof3.default)(fn)));
43212 }
43213 }
43214 }
43215
43216 function merge(visitors) {
43217 var states = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
43218 var wrapper = arguments[2];
43219
43220 var rootVisitor = {};
43221
43222 for (var i = 0; i < visitors.length; i++) {
43223 var visitor = visitors[i];
43224 var state = states[i];
43225
43226 explode(visitor);
43227
43228 for (var type in visitor) {
43229 var visitorType = visitor[type];
43230
43231 if (state || wrapper) {
43232 visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
43233 }
43234
43235 var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
43236 mergePair(nodeVisitor, visitorType);
43237 }
43238 }
43239
43240 return rootVisitor;
43241 }
43242
43243 function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
43244 var newVisitor = {};
43245
43246 var _loop = function _loop(key) {
43247 var fns = oldVisitor[key];
43248
43249 if (!Array.isArray(fns)) return "continue";
43250
43251 fns = fns.map(function (fn) {
43252 var newFn = fn;
43253
43254 if (state) {
43255 newFn = function newFn(path) {
43256 return fn.call(state, path, state);
43257 };
43258 }
43259
43260 if (wrapper) {
43261 newFn = wrapper(state.key, key, newFn);
43262 }
43263
43264 return newFn;
43265 });
43266
43267 newVisitor[key] = fns;
43268 };
43269
43270 for (var key in oldVisitor) {
43271 var _ret = _loop(key);
43272
43273 if (_ret === "continue") continue;
43274 }
43275
43276 return newVisitor;
43277 }
43278
43279 function ensureEntranceObjects(obj) {
43280 for (var key in obj) {
43281 if (shouldIgnoreKey(key)) continue;
43282
43283 var fns = obj[key];
43284 if (typeof fns === "function") {
43285 obj[key] = { enter: fns };
43286 }
43287 }
43288 }
43289
43290 function ensureCallbackArrays(obj) {
43291 if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
43292 if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
43293 }
43294
43295 function wrapCheck(wrapper, fn) {
43296 var newFn = function newFn(path) {
43297 if (wrapper.checkPath(path)) {
43298 return fn.apply(this, arguments);
43299 }
43300 };
43301 newFn.toString = function () {
43302 return fn.toString();
43303 };
43304 return newFn;
43305 }
43306
43307 function shouldIgnoreKey(key) {
43308 if (key[0] === "_") return true;
43309
43310 if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
43311
43312 if (key === "blacklist" || key === "noScope" || key === "skipKeys") return true;
43313
43314 return false;
43315 }
43316
43317 function mergePair(dest, src) {
43318 for (var key in src) {
43319 dest[key] = [].concat(dest[key] || [], src[key]);
43320 }
43321 }
43322
43323/***/ }),
43324/* 385 */
43325/***/ (function(module, exports, __webpack_require__) {
43326
43327 "use strict";
43328
43329 exports.__esModule = true;
43330
43331 var _maxSafeInteger = __webpack_require__(359);
43332
43333 var _maxSafeInteger2 = _interopRequireDefault(_maxSafeInteger);
43334
43335 var _stringify = __webpack_require__(35);
43336
43337 var _stringify2 = _interopRequireDefault(_stringify);
43338
43339 var _getIterator2 = __webpack_require__(2);
43340
43341 var _getIterator3 = _interopRequireDefault(_getIterator2);
43342
43343 exports.toComputedKey = toComputedKey;
43344 exports.toSequenceExpression = toSequenceExpression;
43345 exports.toKeyAlias = toKeyAlias;
43346 exports.toIdentifier = toIdentifier;
43347 exports.toBindingIdentifierName = toBindingIdentifierName;
43348 exports.toStatement = toStatement;
43349 exports.toExpression = toExpression;
43350 exports.toBlock = toBlock;
43351 exports.valueToNode = valueToNode;
43352
43353 var _isPlainObject = __webpack_require__(275);
43354
43355 var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
43356
43357 var _isRegExp = __webpack_require__(276);
43358
43359 var _isRegExp2 = _interopRequireDefault(_isRegExp);
43360
43361 var _index = __webpack_require__(1);
43362
43363 var t = _interopRequireWildcard(_index);
43364
43365 function _interopRequireWildcard(obj) {
43366 if (obj && obj.__esModule) {
43367 return obj;
43368 } else {
43369 var newObj = {};if (obj != null) {
43370 for (var key in obj) {
43371 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
43372 }
43373 }newObj.default = obj;return newObj;
43374 }
43375 }
43376
43377 function _interopRequireDefault(obj) {
43378 return obj && obj.__esModule ? obj : { default: obj };
43379 }
43380
43381 function toComputedKey(node) {
43382 var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key || node.property;
43383
43384 if (!node.computed) {
43385 if (t.isIdentifier(key)) key = t.stringLiteral(key.name);
43386 }
43387 return key;
43388 }
43389
43390 function gatherSequenceExpressions(nodes, scope, declars) {
43391 var exprs = [];
43392 var ensureLastUndefined = true;
43393
43394 for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
43395 var _ref;
43396
43397 if (_isArray) {
43398 if (_i >= _iterator.length) break;
43399 _ref = _iterator[_i++];
43400 } else {
43401 _i = _iterator.next();
43402 if (_i.done) break;
43403 _ref = _i.value;
43404 }
43405
43406 var node = _ref;
43407
43408 ensureLastUndefined = false;
43409
43410 if (t.isExpression(node)) {
43411 exprs.push(node);
43412 } else if (t.isExpressionStatement(node)) {
43413 exprs.push(node.expression);
43414 } else if (t.isVariableDeclaration(node)) {
43415 if (node.kind !== "var") return;
43416
43417 for (var _iterator2 = node.declarations, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
43418 var _ref2;
43419
43420 if (_isArray2) {
43421 if (_i2 >= _iterator2.length) break;
43422 _ref2 = _iterator2[_i2++];
43423 } else {
43424 _i2 = _iterator2.next();
43425 if (_i2.done) break;
43426 _ref2 = _i2.value;
43427 }
43428
43429 var declar = _ref2;
43430
43431 var bindings = t.getBindingIdentifiers(declar);
43432 for (var key in bindings) {
43433 declars.push({
43434 kind: node.kind,
43435 id: bindings[key]
43436 });
43437 }
43438
43439 if (declar.init) {
43440 exprs.push(t.assignmentExpression("=", declar.id, declar.init));
43441 }
43442 }
43443
43444 ensureLastUndefined = true;
43445 } else if (t.isIfStatement(node)) {
43446 var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
43447 var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
43448 if (!consequent || !alternate) return;
43449
43450 exprs.push(t.conditionalExpression(node.test, consequent, alternate));
43451 } else if (t.isBlockStatement(node)) {
43452 var body = gatherSequenceExpressions(node.body, scope, declars);
43453 if (!body) return;
43454
43455 exprs.push(body);
43456 } else if (t.isEmptyStatement(node)) {
43457 ensureLastUndefined = true;
43458 } else {
43459 return;
43460 }
43461 }
43462
43463 if (ensureLastUndefined) {
43464 exprs.push(scope.buildUndefinedNode());
43465 }
43466
43467 if (exprs.length === 1) {
43468 return exprs[0];
43469 } else {
43470 return t.sequenceExpression(exprs);
43471 }
43472 }
43473
43474 function toSequenceExpression(nodes, scope) {
43475 if (!nodes || !nodes.length) return;
43476
43477 var declars = [];
43478 var result = gatherSequenceExpressions(nodes, scope, declars);
43479 if (!result) return;
43480
43481 for (var _iterator3 = declars, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
43482 var _ref3;
43483
43484 if (_isArray3) {
43485 if (_i3 >= _iterator3.length) break;
43486 _ref3 = _iterator3[_i3++];
43487 } else {
43488 _i3 = _iterator3.next();
43489 if (_i3.done) break;
43490 _ref3 = _i3.value;
43491 }
43492
43493 var declar = _ref3;
43494
43495 scope.push(declar);
43496 }
43497
43498 return result;
43499 }
43500
43501 function toKeyAlias(node) {
43502 var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key;
43503
43504 var alias = void 0;
43505
43506 if (node.kind === "method") {
43507 return toKeyAlias.increment() + "";
43508 } else if (t.isIdentifier(key)) {
43509 alias = key.name;
43510 } else if (t.isStringLiteral(key)) {
43511 alias = (0, _stringify2.default)(key.value);
43512 } else {
43513 alias = (0, _stringify2.default)(t.removePropertiesDeep(t.cloneDeep(key)));
43514 }
43515
43516 if (node.computed) {
43517 alias = "[" + alias + "]";
43518 }
43519
43520 if (node.static) {
43521 alias = "static:" + alias;
43522 }
43523
43524 return alias;
43525 }
43526
43527 toKeyAlias.uid = 0;
43528
43529 toKeyAlias.increment = function () {
43530 if (toKeyAlias.uid >= _maxSafeInteger2.default) {
43531 return toKeyAlias.uid = 0;
43532 } else {
43533 return toKeyAlias.uid++;
43534 }
43535 };
43536
43537 function toIdentifier(name) {
43538 name = name + "";
43539
43540 name = name.replace(/[^a-zA-Z0-9$_]/g, "-");
43541
43542 name = name.replace(/^[-0-9]+/, "");
43543
43544 name = name.replace(/[-\s]+(.)?/g, function (match, c) {
43545 return c ? c.toUpperCase() : "";
43546 });
43547
43548 if (!t.isValidIdentifier(name)) {
43549 name = "_" + name;
43550 }
43551
43552 return name || "_";
43553 }
43554
43555 function toBindingIdentifierName(name) {
43556 name = toIdentifier(name);
43557 if (name === "eval" || name === "arguments") name = "_" + name;
43558 return name;
43559 }
43560
43561 function toStatement(node, ignore) {
43562 if (t.isStatement(node)) {
43563 return node;
43564 }
43565
43566 var mustHaveId = false;
43567 var newType = void 0;
43568
43569 if (t.isClass(node)) {
43570 mustHaveId = true;
43571 newType = "ClassDeclaration";
43572 } else if (t.isFunction(node)) {
43573 mustHaveId = true;
43574 newType = "FunctionDeclaration";
43575 } else if (t.isAssignmentExpression(node)) {
43576 return t.expressionStatement(node);
43577 }
43578
43579 if (mustHaveId && !node.id) {
43580 newType = false;
43581 }
43582
43583 if (!newType) {
43584 if (ignore) {
43585 return false;
43586 } else {
43587 throw new Error("cannot turn " + node.type + " to a statement");
43588 }
43589 }
43590
43591 node.type = newType;
43592
43593 return node;
43594 }
43595
43596 function toExpression(node) {
43597 if (t.isExpressionStatement(node)) {
43598 node = node.expression;
43599 }
43600
43601 if (t.isExpression(node)) {
43602 return node;
43603 }
43604
43605 if (t.isClass(node)) {
43606 node.type = "ClassExpression";
43607 } else if (t.isFunction(node)) {
43608 node.type = "FunctionExpression";
43609 }
43610
43611 if (!t.isExpression(node)) {
43612 throw new Error("cannot turn " + node.type + " to an expression");
43613 }
43614
43615 return node;
43616 }
43617
43618 function toBlock(node, parent) {
43619 if (t.isBlockStatement(node)) {
43620 return node;
43621 }
43622
43623 if (t.isEmptyStatement(node)) {
43624 node = [];
43625 }
43626
43627 if (!Array.isArray(node)) {
43628 if (!t.isStatement(node)) {
43629 if (t.isFunction(parent)) {
43630 node = t.returnStatement(node);
43631 } else {
43632 node = t.expressionStatement(node);
43633 }
43634 }
43635
43636 node = [node];
43637 }
43638
43639 return t.blockStatement(node);
43640 }
43641
43642 function valueToNode(value) {
43643 if (value === undefined) {
43644 return t.identifier("undefined");
43645 }
43646
43647 if (value === true || value === false) {
43648 return t.booleanLiteral(value);
43649 }
43650
43651 if (value === null) {
43652 return t.nullLiteral();
43653 }
43654
43655 if (typeof value === "string") {
43656 return t.stringLiteral(value);
43657 }
43658
43659 if (typeof value === "number") {
43660 return t.numericLiteral(value);
43661 }
43662
43663 if ((0, _isRegExp2.default)(value)) {
43664 var pattern = value.source;
43665 var flags = value.toString().match(/\/([a-z]+|)$/)[1];
43666 return t.regExpLiteral(pattern, flags);
43667 }
43668
43669 if (Array.isArray(value)) {
43670 return t.arrayExpression(value.map(t.valueToNode));
43671 }
43672
43673 if ((0, _isPlainObject2.default)(value)) {
43674 var props = [];
43675 for (var key in value) {
43676 var nodeKey = void 0;
43677 if (t.isValidIdentifier(key)) {
43678 nodeKey = t.identifier(key);
43679 } else {
43680 nodeKey = t.stringLiteral(key);
43681 }
43682 props.push(t.objectProperty(nodeKey, t.valueToNode(value[key])));
43683 }
43684 return t.objectExpression(props);
43685 }
43686
43687 throw new Error("don't know how to turn this value into a node");
43688 }
43689
43690/***/ }),
43691/* 386 */
43692/***/ (function(module, exports, __webpack_require__) {
43693
43694 "use strict";
43695
43696 var _index = __webpack_require__(1);
43697
43698 var t = _interopRequireWildcard(_index);
43699
43700 var _constants = __webpack_require__(135);
43701
43702 var _index2 = __webpack_require__(26);
43703
43704 var _index3 = _interopRequireDefault(_index2);
43705
43706 function _interopRequireDefault(obj) {
43707 return obj && obj.__esModule ? obj : { default: obj };
43708 }
43709
43710 function _interopRequireWildcard(obj) {
43711 if (obj && obj.__esModule) {
43712 return obj;
43713 } else {
43714 var newObj = {};if (obj != null) {
43715 for (var key in obj) {
43716 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
43717 }
43718 }newObj.default = obj;return newObj;
43719 }
43720 }
43721
43722 (0, _index3.default)("ArrayExpression", {
43723 fields: {
43724 elements: {
43725 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
43726 default: []
43727 }
43728 },
43729 visitor: ["elements"],
43730 aliases: ["Expression"]
43731 });
43732
43733 (0, _index3.default)("AssignmentExpression", {
43734 fields: {
43735 operator: {
43736 validate: (0, _index2.assertValueType)("string")
43737 },
43738 left: {
43739 validate: (0, _index2.assertNodeType)("LVal")
43740 },
43741 right: {
43742 validate: (0, _index2.assertNodeType)("Expression")
43743 }
43744 },
43745 builder: ["operator", "left", "right"],
43746 visitor: ["left", "right"],
43747 aliases: ["Expression"]
43748 });
43749
43750 (0, _index3.default)("BinaryExpression", {
43751 builder: ["operator", "left", "right"],
43752 fields: {
43753 operator: {
43754 validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS)
43755 },
43756 left: {
43757 validate: (0, _index2.assertNodeType)("Expression")
43758 },
43759 right: {
43760 validate: (0, _index2.assertNodeType)("Expression")
43761 }
43762 },
43763 visitor: ["left", "right"],
43764 aliases: ["Binary", "Expression"]
43765 });
43766
43767 (0, _index3.default)("Directive", {
43768 visitor: ["value"],
43769 fields: {
43770 value: {
43771 validate: (0, _index2.assertNodeType)("DirectiveLiteral")
43772 }
43773 }
43774 });
43775
43776 (0, _index3.default)("DirectiveLiteral", {
43777 builder: ["value"],
43778 fields: {
43779 value: {
43780 validate: (0, _index2.assertValueType)("string")
43781 }
43782 }
43783 });
43784
43785 (0, _index3.default)("BlockStatement", {
43786 builder: ["body", "directives"],
43787 visitor: ["directives", "body"],
43788 fields: {
43789 directives: {
43790 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))),
43791 default: []
43792 },
43793 body: {
43794 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement")))
43795 }
43796 },
43797 aliases: ["Scopable", "BlockParent", "Block", "Statement"]
43798 });
43799
43800 (0, _index3.default)("BreakStatement", {
43801 visitor: ["label"],
43802 fields: {
43803 label: {
43804 validate: (0, _index2.assertNodeType)("Identifier"),
43805 optional: true
43806 }
43807 },
43808 aliases: ["Statement", "Terminatorless", "CompletionStatement"]
43809 });
43810
43811 (0, _index3.default)("CallExpression", {
43812 visitor: ["callee", "arguments"],
43813 fields: {
43814 callee: {
43815 validate: (0, _index2.assertNodeType)("Expression")
43816 },
43817 arguments: {
43818 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement")))
43819 }
43820 },
43821 aliases: ["Expression"]
43822 });
43823
43824 (0, _index3.default)("CatchClause", {
43825 visitor: ["param", "body"],
43826 fields: {
43827 param: {
43828 validate: (0, _index2.assertNodeType)("Identifier")
43829 },
43830 body: {
43831 validate: (0, _index2.assertNodeType)("BlockStatement")
43832 }
43833 },
43834 aliases: ["Scopable"]
43835 });
43836
43837 (0, _index3.default)("ConditionalExpression", {
43838 visitor: ["test", "consequent", "alternate"],
43839 fields: {
43840 test: {
43841 validate: (0, _index2.assertNodeType)("Expression")
43842 },
43843 consequent: {
43844 validate: (0, _index2.assertNodeType)("Expression")
43845 },
43846 alternate: {
43847 validate: (0, _index2.assertNodeType)("Expression")
43848 }
43849 },
43850 aliases: ["Expression", "Conditional"]
43851 });
43852
43853 (0, _index3.default)("ContinueStatement", {
43854 visitor: ["label"],
43855 fields: {
43856 label: {
43857 validate: (0, _index2.assertNodeType)("Identifier"),
43858 optional: true
43859 }
43860 },
43861 aliases: ["Statement", "Terminatorless", "CompletionStatement"]
43862 });
43863
43864 (0, _index3.default)("DebuggerStatement", {
43865 aliases: ["Statement"]
43866 });
43867
43868 (0, _index3.default)("DoWhileStatement", {
43869 visitor: ["test", "body"],
43870 fields: {
43871 test: {
43872 validate: (0, _index2.assertNodeType)("Expression")
43873 },
43874 body: {
43875 validate: (0, _index2.assertNodeType)("Statement")
43876 }
43877 },
43878 aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
43879 });
43880
43881 (0, _index3.default)("EmptyStatement", {
43882 aliases: ["Statement"]
43883 });
43884
43885 (0, _index3.default)("ExpressionStatement", {
43886 visitor: ["expression"],
43887 fields: {
43888 expression: {
43889 validate: (0, _index2.assertNodeType)("Expression")
43890 }
43891 },
43892 aliases: ["Statement", "ExpressionWrapper"]
43893 });
43894
43895 (0, _index3.default)("File", {
43896 builder: ["program", "comments", "tokens"],
43897 visitor: ["program"],
43898 fields: {
43899 program: {
43900 validate: (0, _index2.assertNodeType)("Program")
43901 }
43902 }
43903 });
43904
43905 (0, _index3.default)("ForInStatement", {
43906 visitor: ["left", "right", "body"],
43907 aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
43908 fields: {
43909 left: {
43910 validate: (0, _index2.assertNodeType)("VariableDeclaration", "LVal")
43911 },
43912 right: {
43913 validate: (0, _index2.assertNodeType)("Expression")
43914 },
43915 body: {
43916 validate: (0, _index2.assertNodeType)("Statement")
43917 }
43918 }
43919 });
43920
43921 (0, _index3.default)("ForStatement", {
43922 visitor: ["init", "test", "update", "body"],
43923 aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
43924 fields: {
43925 init: {
43926 validate: (0, _index2.assertNodeType)("VariableDeclaration", "Expression"),
43927 optional: true
43928 },
43929 test: {
43930 validate: (0, _index2.assertNodeType)("Expression"),
43931 optional: true
43932 },
43933 update: {
43934 validate: (0, _index2.assertNodeType)("Expression"),
43935 optional: true
43936 },
43937 body: {
43938 validate: (0, _index2.assertNodeType)("Statement")
43939 }
43940 }
43941 });
43942
43943 (0, _index3.default)("FunctionDeclaration", {
43944 builder: ["id", "params", "body", "generator", "async"],
43945 visitor: ["id", "params", "body", "returnType", "typeParameters"],
43946 fields: {
43947 id: {
43948 validate: (0, _index2.assertNodeType)("Identifier")
43949 },
43950 params: {
43951 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal")))
43952 },
43953 body: {
43954 validate: (0, _index2.assertNodeType)("BlockStatement")
43955 },
43956 generator: {
43957 default: false,
43958 validate: (0, _index2.assertValueType)("boolean")
43959 },
43960 async: {
43961 default: false,
43962 validate: (0, _index2.assertValueType)("boolean")
43963 }
43964 },
43965 aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"]
43966 });
43967
43968 (0, _index3.default)("FunctionExpression", {
43969 inherits: "FunctionDeclaration",
43970 aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
43971 fields: {
43972 id: {
43973 validate: (0, _index2.assertNodeType)("Identifier"),
43974 optional: true
43975 },
43976 params: {
43977 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal")))
43978 },
43979 body: {
43980 validate: (0, _index2.assertNodeType)("BlockStatement")
43981 },
43982 generator: {
43983 default: false,
43984 validate: (0, _index2.assertValueType)("boolean")
43985 },
43986 async: {
43987 default: false,
43988 validate: (0, _index2.assertValueType)("boolean")
43989 }
43990 }
43991 });
43992
43993 (0, _index3.default)("Identifier", {
43994 builder: ["name"],
43995 visitor: ["typeAnnotation"],
43996 aliases: ["Expression", "LVal"],
43997 fields: {
43998 name: {
43999 validate: function validate(node, key, val) {
44000 if (!t.isValidIdentifier(val)) {}
44001 }
44002 },
44003 decorators: {
44004 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator")))
44005 }
44006 }
44007 });
44008
44009 (0, _index3.default)("IfStatement", {
44010 visitor: ["test", "consequent", "alternate"],
44011 aliases: ["Statement", "Conditional"],
44012 fields: {
44013 test: {
44014 validate: (0, _index2.assertNodeType)("Expression")
44015 },
44016 consequent: {
44017 validate: (0, _index2.assertNodeType)("Statement")
44018 },
44019 alternate: {
44020 optional: true,
44021 validate: (0, _index2.assertNodeType)("Statement")
44022 }
44023 }
44024 });
44025
44026 (0, _index3.default)("LabeledStatement", {
44027 visitor: ["label", "body"],
44028 aliases: ["Statement"],
44029 fields: {
44030 label: {
44031 validate: (0, _index2.assertNodeType)("Identifier")
44032 },
44033 body: {
44034 validate: (0, _index2.assertNodeType)("Statement")
44035 }
44036 }
44037 });
44038
44039 (0, _index3.default)("StringLiteral", {
44040 builder: ["value"],
44041 fields: {
44042 value: {
44043 validate: (0, _index2.assertValueType)("string")
44044 }
44045 },
44046 aliases: ["Expression", "Pureish", "Literal", "Immutable"]
44047 });
44048
44049 (0, _index3.default)("NumericLiteral", {
44050 builder: ["value"],
44051 deprecatedAlias: "NumberLiteral",
44052 fields: {
44053 value: {
44054 validate: (0, _index2.assertValueType)("number")
44055 }
44056 },
44057 aliases: ["Expression", "Pureish", "Literal", "Immutable"]
44058 });
44059
44060 (0, _index3.default)("NullLiteral", {
44061 aliases: ["Expression", "Pureish", "Literal", "Immutable"]
44062 });
44063
44064 (0, _index3.default)("BooleanLiteral", {
44065 builder: ["value"],
44066 fields: {
44067 value: {
44068 validate: (0, _index2.assertValueType)("boolean")
44069 }
44070 },
44071 aliases: ["Expression", "Pureish", "Literal", "Immutable"]
44072 });
44073
44074 (0, _index3.default)("RegExpLiteral", {
44075 builder: ["pattern", "flags"],
44076 deprecatedAlias: "RegexLiteral",
44077 aliases: ["Expression", "Literal"],
44078 fields: {
44079 pattern: {
44080 validate: (0, _index2.assertValueType)("string")
44081 },
44082 flags: {
44083 validate: (0, _index2.assertValueType)("string"),
44084 default: ""
44085 }
44086 }
44087 });
44088
44089 (0, _index3.default)("LogicalExpression", {
44090 builder: ["operator", "left", "right"],
44091 visitor: ["left", "right"],
44092 aliases: ["Binary", "Expression"],
44093 fields: {
44094 operator: {
44095 validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS)
44096 },
44097 left: {
44098 validate: (0, _index2.assertNodeType)("Expression")
44099 },
44100 right: {
44101 validate: (0, _index2.assertNodeType)("Expression")
44102 }
44103 }
44104 });
44105
44106 (0, _index3.default)("MemberExpression", {
44107 builder: ["object", "property", "computed"],
44108 visitor: ["object", "property"],
44109 aliases: ["Expression", "LVal"],
44110 fields: {
44111 object: {
44112 validate: (0, _index2.assertNodeType)("Expression")
44113 },
44114 property: {
44115 validate: function validate(node, key, val) {
44116 var expectedType = node.computed ? "Expression" : "Identifier";
44117 (0, _index2.assertNodeType)(expectedType)(node, key, val);
44118 }
44119 },
44120 computed: {
44121 default: false
44122 }
44123 }
44124 });
44125
44126 (0, _index3.default)("NewExpression", {
44127 visitor: ["callee", "arguments"],
44128 aliases: ["Expression"],
44129 fields: {
44130 callee: {
44131 validate: (0, _index2.assertNodeType)("Expression")
44132 },
44133 arguments: {
44134 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement")))
44135 }
44136 }
44137 });
44138
44139 (0, _index3.default)("Program", {
44140 visitor: ["directives", "body"],
44141 builder: ["body", "directives"],
44142 fields: {
44143 directives: {
44144 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))),
44145 default: []
44146 },
44147 body: {
44148 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement")))
44149 }
44150 },
44151 aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"]
44152 });
44153
44154 (0, _index3.default)("ObjectExpression", {
44155 visitor: ["properties"],
44156 aliases: ["Expression"],
44157 fields: {
44158 properties: {
44159 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadProperty")))
44160 }
44161 }
44162 });
44163
44164 (0, _index3.default)("ObjectMethod", {
44165 builder: ["kind", "key", "params", "body", "computed"],
44166 fields: {
44167 kind: {
44168 validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("method", "get", "set")),
44169 default: "method"
44170 },
44171 computed: {
44172 validate: (0, _index2.assertValueType)("boolean"),
44173 default: false
44174 },
44175 key: {
44176 validate: function validate(node, key, val) {
44177 var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
44178 _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
44179 }
44180 },
44181 decorators: {
44182 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator")))
44183 },
44184 body: {
44185 validate: (0, _index2.assertNodeType)("BlockStatement")
44186 },
44187 generator: {
44188 default: false,
44189 validate: (0, _index2.assertValueType)("boolean")
44190 },
44191 async: {
44192 default: false,
44193 validate: (0, _index2.assertValueType)("boolean")
44194 }
44195 },
44196 visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
44197 aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
44198 });
44199
44200 (0, _index3.default)("ObjectProperty", {
44201 builder: ["key", "value", "computed", "shorthand", "decorators"],
44202 fields: {
44203 computed: {
44204 validate: (0, _index2.assertValueType)("boolean"),
44205 default: false
44206 },
44207 key: {
44208 validate: function validate(node, key, val) {
44209 var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
44210 _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
44211 }
44212 },
44213 value: {
44214 validate: (0, _index2.assertNodeType)("Expression", "Pattern", "RestElement")
44215 },
44216 shorthand: {
44217 validate: (0, _index2.assertValueType)("boolean"),
44218 default: false
44219 },
44220 decorators: {
44221 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))),
44222 optional: true
44223 }
44224 },
44225 visitor: ["key", "value", "decorators"],
44226 aliases: ["UserWhitespacable", "Property", "ObjectMember"]
44227 });
44228
44229 (0, _index3.default)("RestElement", {
44230 visitor: ["argument", "typeAnnotation"],
44231 aliases: ["LVal"],
44232 fields: {
44233 argument: {
44234 validate: (0, _index2.assertNodeType)("LVal")
44235 },
44236 decorators: {
44237 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator")))
44238 }
44239 }
44240 });
44241
44242 (0, _index3.default)("ReturnStatement", {
44243 visitor: ["argument"],
44244 aliases: ["Statement", "Terminatorless", "CompletionStatement"],
44245 fields: {
44246 argument: {
44247 validate: (0, _index2.assertNodeType)("Expression"),
44248 optional: true
44249 }
44250 }
44251 });
44252
44253 (0, _index3.default)("SequenceExpression", {
44254 visitor: ["expressions"],
44255 fields: {
44256 expressions: {
44257 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression")))
44258 }
44259 },
44260 aliases: ["Expression"]
44261 });
44262
44263 (0, _index3.default)("SwitchCase", {
44264 visitor: ["test", "consequent"],
44265 fields: {
44266 test: {
44267 validate: (0, _index2.assertNodeType)("Expression"),
44268 optional: true
44269 },
44270 consequent: {
44271 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement")))
44272 }
44273 }
44274 });
44275
44276 (0, _index3.default)("SwitchStatement", {
44277 visitor: ["discriminant", "cases"],
44278 aliases: ["Statement", "BlockParent", "Scopable"],
44279 fields: {
44280 discriminant: {
44281 validate: (0, _index2.assertNodeType)("Expression")
44282 },
44283 cases: {
44284 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("SwitchCase")))
44285 }
44286 }
44287 });
44288
44289 (0, _index3.default)("ThisExpression", {
44290 aliases: ["Expression"]
44291 });
44292
44293 (0, _index3.default)("ThrowStatement", {
44294 visitor: ["argument"],
44295 aliases: ["Statement", "Terminatorless", "CompletionStatement"],
44296 fields: {
44297 argument: {
44298 validate: (0, _index2.assertNodeType)("Expression")
44299 }
44300 }
44301 });
44302
44303 (0, _index3.default)("TryStatement", {
44304 visitor: ["block", "handler", "finalizer"],
44305 aliases: ["Statement"],
44306 fields: {
44307 body: {
44308 validate: (0, _index2.assertNodeType)("BlockStatement")
44309 },
44310 handler: {
44311 optional: true,
44312 handler: (0, _index2.assertNodeType)("BlockStatement")
44313 },
44314 finalizer: {
44315 optional: true,
44316 validate: (0, _index2.assertNodeType)("BlockStatement")
44317 }
44318 }
44319 });
44320
44321 (0, _index3.default)("UnaryExpression", {
44322 builder: ["operator", "argument", "prefix"],
44323 fields: {
44324 prefix: {
44325 default: true
44326 },
44327 argument: {
44328 validate: (0, _index2.assertNodeType)("Expression")
44329 },
44330 operator: {
44331 validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS)
44332 }
44333 },
44334 visitor: ["argument"],
44335 aliases: ["UnaryLike", "Expression"]
44336 });
44337
44338 (0, _index3.default)("UpdateExpression", {
44339 builder: ["operator", "argument", "prefix"],
44340 fields: {
44341 prefix: {
44342 default: false
44343 },
44344 argument: {
44345 validate: (0, _index2.assertNodeType)("Expression")
44346 },
44347 operator: {
44348 validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS)
44349 }
44350 },
44351 visitor: ["argument"],
44352 aliases: ["Expression"]
44353 });
44354
44355 (0, _index3.default)("VariableDeclaration", {
44356 builder: ["kind", "declarations"],
44357 visitor: ["declarations"],
44358 aliases: ["Statement", "Declaration"],
44359 fields: {
44360 kind: {
44361 validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("var", "let", "const"))
44362 },
44363 declarations: {
44364 validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("VariableDeclarator")))
44365 }
44366 }
44367 });
44368
44369 (0, _index3.default)("VariableDeclarator", {
44370 visitor: ["id", "init"],
44371 fields: {
44372 id: {
44373 validate: (0, _index2.assertNodeType)("LVal")
44374 },
44375 init: {
44376 optional: true,
44377 validate: (0, _index2.assertNodeType)("Expression")
44378 }
44379 }
44380 });
44381
44382 (0, _index3.default)("WhileStatement", {
44383 visitor: ["test", "body"],
44384 aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
44385 fields: {
44386 test: {
44387 validate: (0, _index2.assertNodeType)("Expression")
44388 },
44389 body: {
44390 validate: (0, _index2.assertNodeType)("BlockStatement", "Statement")
44391 }
44392 }
44393 });
44394
44395 (0, _index3.default)("WithStatement", {
44396 visitor: ["object", "body"],
44397 aliases: ["Statement"],
44398 fields: {
44399 object: {
44400 object: (0, _index2.assertNodeType)("Expression")
44401 },
44402 body: {
44403 validate: (0, _index2.assertNodeType)("BlockStatement", "Statement")
44404 }
44405 }
44406 });
44407
44408/***/ }),
44409/* 387 */
44410/***/ (function(module, exports, __webpack_require__) {
44411
44412 "use strict";
44413
44414 var _index = __webpack_require__(26);
44415
44416 var _index2 = _interopRequireDefault(_index);
44417
44418 function _interopRequireDefault(obj) {
44419 return obj && obj.__esModule ? obj : { default: obj };
44420 }
44421
44422 (0, _index2.default)("AssignmentPattern", {
44423 visitor: ["left", "right"],
44424 aliases: ["Pattern", "LVal"],
44425 fields: {
44426 left: {
44427 validate: (0, _index.assertNodeType)("Identifier")
44428 },
44429 right: {
44430 validate: (0, _index.assertNodeType)("Expression")
44431 },
44432 decorators: {
44433 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
44434 }
44435 }
44436 });
44437
44438 (0, _index2.default)("ArrayPattern", {
44439 visitor: ["elements", "typeAnnotation"],
44440 aliases: ["Pattern", "LVal"],
44441 fields: {
44442 elements: {
44443 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Identifier", "Pattern", "RestElement")))
44444 },
44445 decorators: {
44446 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
44447 }
44448 }
44449 });
44450
44451 (0, _index2.default)("ArrowFunctionExpression", {
44452 builder: ["params", "body", "async"],
44453 visitor: ["params", "body", "returnType", "typeParameters"],
44454 aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
44455 fields: {
44456 params: {
44457 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal")))
44458 },
44459 body: {
44460 validate: (0, _index.assertNodeType)("BlockStatement", "Expression")
44461 },
44462 async: {
44463 validate: (0, _index.assertValueType)("boolean"),
44464 default: false
44465 }
44466 }
44467 });
44468
44469 (0, _index2.default)("ClassBody", {
44470 visitor: ["body"],
44471 fields: {
44472 body: {
44473 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ClassMethod", "ClassProperty")))
44474 }
44475 }
44476 });
44477
44478 (0, _index2.default)("ClassDeclaration", {
44479 builder: ["id", "superClass", "body", "decorators"],
44480 visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
44481 aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"],
44482 fields: {
44483 id: {
44484 validate: (0, _index.assertNodeType)("Identifier")
44485 },
44486 body: {
44487 validate: (0, _index.assertNodeType)("ClassBody")
44488 },
44489 superClass: {
44490 optional: true,
44491 validate: (0, _index.assertNodeType)("Expression")
44492 },
44493 decorators: {
44494 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
44495 }
44496 }
44497 });
44498
44499 (0, _index2.default)("ClassExpression", {
44500 inherits: "ClassDeclaration",
44501 aliases: ["Scopable", "Class", "Expression", "Pureish"],
44502 fields: {
44503 id: {
44504 optional: true,
44505 validate: (0, _index.assertNodeType)("Identifier")
44506 },
44507 body: {
44508 validate: (0, _index.assertNodeType)("ClassBody")
44509 },
44510 superClass: {
44511 optional: true,
44512 validate: (0, _index.assertNodeType)("Expression")
44513 },
44514 decorators: {
44515 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
44516 }
44517 }
44518 });
44519
44520 (0, _index2.default)("ExportAllDeclaration", {
44521 visitor: ["source"],
44522 aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
44523 fields: {
44524 source: {
44525 validate: (0, _index.assertNodeType)("StringLiteral")
44526 }
44527 }
44528 });
44529
44530 (0, _index2.default)("ExportDefaultDeclaration", {
44531 visitor: ["declaration"],
44532 aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
44533 fields: {
44534 declaration: {
44535 validate: (0, _index.assertNodeType)("FunctionDeclaration", "ClassDeclaration", "Expression")
44536 }
44537 }
44538 });
44539
44540 (0, _index2.default)("ExportNamedDeclaration", {
44541 visitor: ["declaration", "specifiers", "source"],
44542 aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
44543 fields: {
44544 declaration: {
44545 validate: (0, _index.assertNodeType)("Declaration"),
44546 optional: true
44547 },
44548 specifiers: {
44549 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ExportSpecifier")))
44550 },
44551 source: {
44552 validate: (0, _index.assertNodeType)("StringLiteral"),
44553 optional: true
44554 }
44555 }
44556 });
44557
44558 (0, _index2.default)("ExportSpecifier", {
44559 visitor: ["local", "exported"],
44560 aliases: ["ModuleSpecifier"],
44561 fields: {
44562 local: {
44563 validate: (0, _index.assertNodeType)("Identifier")
44564 },
44565 exported: {
44566 validate: (0, _index.assertNodeType)("Identifier")
44567 }
44568 }
44569 });
44570
44571 (0, _index2.default)("ForOfStatement", {
44572 visitor: ["left", "right", "body"],
44573 aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
44574 fields: {
44575 left: {
44576 validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal")
44577 },
44578 right: {
44579 validate: (0, _index.assertNodeType)("Expression")
44580 },
44581 body: {
44582 validate: (0, _index.assertNodeType)("Statement")
44583 }
44584 }
44585 });
44586
44587 (0, _index2.default)("ImportDeclaration", {
44588 visitor: ["specifiers", "source"],
44589 aliases: ["Statement", "Declaration", "ModuleDeclaration"],
44590 fields: {
44591 specifiers: {
44592 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
44593 },
44594 source: {
44595 validate: (0, _index.assertNodeType)("StringLiteral")
44596 }
44597 }
44598 });
44599
44600 (0, _index2.default)("ImportDefaultSpecifier", {
44601 visitor: ["local"],
44602 aliases: ["ModuleSpecifier"],
44603 fields: {
44604 local: {
44605 validate: (0, _index.assertNodeType)("Identifier")
44606 }
44607 }
44608 });
44609
44610 (0, _index2.default)("ImportNamespaceSpecifier", {
44611 visitor: ["local"],
44612 aliases: ["ModuleSpecifier"],
44613 fields: {
44614 local: {
44615 validate: (0, _index.assertNodeType)("Identifier")
44616 }
44617 }
44618 });
44619
44620 (0, _index2.default)("ImportSpecifier", {
44621 visitor: ["local", "imported"],
44622 aliases: ["ModuleSpecifier"],
44623 fields: {
44624 local: {
44625 validate: (0, _index.assertNodeType)("Identifier")
44626 },
44627 imported: {
44628 validate: (0, _index.assertNodeType)("Identifier")
44629 },
44630 importKind: {
44631 validate: (0, _index.assertOneOf)(null, "type", "typeof")
44632 }
44633 }
44634 });
44635
44636 (0, _index2.default)("MetaProperty", {
44637 visitor: ["meta", "property"],
44638 aliases: ["Expression"],
44639 fields: {
44640 meta: {
44641 validate: (0, _index.assertValueType)("string")
44642 },
44643 property: {
44644 validate: (0, _index.assertValueType)("string")
44645 }
44646 }
44647 });
44648
44649 (0, _index2.default)("ClassMethod", {
44650 aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
44651 builder: ["kind", "key", "params", "body", "computed", "static"],
44652 visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
44653 fields: {
44654 kind: {
44655 validate: (0, _index.chain)((0, _index.assertValueType)("string"), (0, _index.assertOneOf)("get", "set", "method", "constructor")),
44656 default: "method"
44657 },
44658 computed: {
44659 default: false,
44660 validate: (0, _index.assertValueType)("boolean")
44661 },
44662 static: {
44663 default: false,
44664 validate: (0, _index.assertValueType)("boolean")
44665 },
44666 key: {
44667 validate: function validate(node, key, val) {
44668 var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
44669 _index.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
44670 }
44671 },
44672 params: {
44673 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal")))
44674 },
44675 body: {
44676 validate: (0, _index.assertNodeType)("BlockStatement")
44677 },
44678 generator: {
44679 default: false,
44680 validate: (0, _index.assertValueType)("boolean")
44681 },
44682 async: {
44683 default: false,
44684 validate: (0, _index.assertValueType)("boolean")
44685 }
44686 }
44687 });
44688
44689 (0, _index2.default)("ObjectPattern", {
44690 visitor: ["properties", "typeAnnotation"],
44691 aliases: ["Pattern", "LVal"],
44692 fields: {
44693 properties: {
44694 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("RestProperty", "Property")))
44695 },
44696 decorators: {
44697 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
44698 }
44699 }
44700 });
44701
44702 (0, _index2.default)("SpreadElement", {
44703 visitor: ["argument"],
44704 aliases: ["UnaryLike"],
44705 fields: {
44706 argument: {
44707 validate: (0, _index.assertNodeType)("Expression")
44708 }
44709 }
44710 });
44711
44712 (0, _index2.default)("Super", {
44713 aliases: ["Expression"]
44714 });
44715
44716 (0, _index2.default)("TaggedTemplateExpression", {
44717 visitor: ["tag", "quasi"],
44718 aliases: ["Expression"],
44719 fields: {
44720 tag: {
44721 validate: (0, _index.assertNodeType)("Expression")
44722 },
44723 quasi: {
44724 validate: (0, _index.assertNodeType)("TemplateLiteral")
44725 }
44726 }
44727 });
44728
44729 (0, _index2.default)("TemplateElement", {
44730 builder: ["value", "tail"],
44731 fields: {
44732 value: {},
44733 tail: {
44734 validate: (0, _index.assertValueType)("boolean"),
44735 default: false
44736 }
44737 }
44738 });
44739
44740 (0, _index2.default)("TemplateLiteral", {
44741 visitor: ["quasis", "expressions"],
44742 aliases: ["Expression", "Literal"],
44743 fields: {
44744 quasis: {
44745 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("TemplateElement")))
44746 },
44747 expressions: {
44748 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Expression")))
44749 }
44750 }
44751 });
44752
44753 (0, _index2.default)("YieldExpression", {
44754 builder: ["argument", "delegate"],
44755 visitor: ["argument"],
44756 aliases: ["Expression", "Terminatorless"],
44757 fields: {
44758 delegate: {
44759 validate: (0, _index.assertValueType)("boolean"),
44760 default: false
44761 },
44762 argument: {
44763 optional: true,
44764 validate: (0, _index.assertNodeType)("Expression")
44765 }
44766 }
44767 });
44768
44769/***/ }),
44770/* 388 */
44771/***/ (function(module, exports, __webpack_require__) {
44772
44773 "use strict";
44774
44775 var _index = __webpack_require__(26);
44776
44777 var _index2 = _interopRequireDefault(_index);
44778
44779 function _interopRequireDefault(obj) {
44780 return obj && obj.__esModule ? obj : { default: obj };
44781 }
44782
44783 (0, _index2.default)("AwaitExpression", {
44784 builder: ["argument"],
44785 visitor: ["argument"],
44786 aliases: ["Expression", "Terminatorless"],
44787 fields: {
44788 argument: {
44789 validate: (0, _index.assertNodeType)("Expression")
44790 }
44791 }
44792 });
44793
44794 (0, _index2.default)("ForAwaitStatement", {
44795 visitor: ["left", "right", "body"],
44796 aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
44797 fields: {
44798 left: {
44799 validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal")
44800 },
44801 right: {
44802 validate: (0, _index.assertNodeType)("Expression")
44803 },
44804 body: {
44805 validate: (0, _index.assertNodeType)("Statement")
44806 }
44807 }
44808 });
44809
44810 (0, _index2.default)("BindExpression", {
44811 visitor: ["object", "callee"],
44812 aliases: ["Expression"],
44813 fields: {}
44814 });
44815
44816 (0, _index2.default)("Import", {
44817 aliases: ["Expression"]
44818 });
44819
44820 (0, _index2.default)("Decorator", {
44821 visitor: ["expression"],
44822 fields: {
44823 expression: {
44824 validate: (0, _index.assertNodeType)("Expression")
44825 }
44826 }
44827 });
44828
44829 (0, _index2.default)("DoExpression", {
44830 visitor: ["body"],
44831 aliases: ["Expression"],
44832 fields: {
44833 body: {
44834 validate: (0, _index.assertNodeType)("BlockStatement")
44835 }
44836 }
44837 });
44838
44839 (0, _index2.default)("ExportDefaultSpecifier", {
44840 visitor: ["exported"],
44841 aliases: ["ModuleSpecifier"],
44842 fields: {
44843 exported: {
44844 validate: (0, _index.assertNodeType)("Identifier")
44845 }
44846 }
44847 });
44848
44849 (0, _index2.default)("ExportNamespaceSpecifier", {
44850 visitor: ["exported"],
44851 aliases: ["ModuleSpecifier"],
44852 fields: {
44853 exported: {
44854 validate: (0, _index.assertNodeType)("Identifier")
44855 }
44856 }
44857 });
44858
44859 (0, _index2.default)("RestProperty", {
44860 visitor: ["argument"],
44861 aliases: ["UnaryLike"],
44862 fields: {
44863 argument: {
44864 validate: (0, _index.assertNodeType)("LVal")
44865 }
44866 }
44867 });
44868
44869 (0, _index2.default)("SpreadProperty", {
44870 visitor: ["argument"],
44871 aliases: ["UnaryLike"],
44872 fields: {
44873 argument: {
44874 validate: (0, _index.assertNodeType)("Expression")
44875 }
44876 }
44877 });
44878
44879/***/ }),
44880/* 389 */
44881/***/ (function(module, exports, __webpack_require__) {
44882
44883 "use strict";
44884
44885 var _index = __webpack_require__(26);
44886
44887 var _index2 = _interopRequireDefault(_index);
44888
44889 function _interopRequireDefault(obj) {
44890 return obj && obj.__esModule ? obj : { default: obj };
44891 }
44892
44893 (0, _index2.default)("AnyTypeAnnotation", {
44894 aliases: ["Flow", "FlowBaseAnnotation"],
44895 fields: {}
44896 });
44897
44898 (0, _index2.default)("ArrayTypeAnnotation", {
44899 visitor: ["elementType"],
44900 aliases: ["Flow"],
44901 fields: {}
44902 });
44903
44904 (0, _index2.default)("BooleanTypeAnnotation", {
44905 aliases: ["Flow", "FlowBaseAnnotation"],
44906 fields: {}
44907 });
44908
44909 (0, _index2.default)("BooleanLiteralTypeAnnotation", {
44910 aliases: ["Flow"],
44911 fields: {}
44912 });
44913
44914 (0, _index2.default)("NullLiteralTypeAnnotation", {
44915 aliases: ["Flow", "FlowBaseAnnotation"],
44916 fields: {}
44917 });
44918
44919 (0, _index2.default)("ClassImplements", {
44920 visitor: ["id", "typeParameters"],
44921 aliases: ["Flow"],
44922 fields: {}
44923 });
44924
44925 (0, _index2.default)("ClassProperty", {
44926 visitor: ["key", "value", "typeAnnotation", "decorators"],
44927 builder: ["key", "value", "typeAnnotation", "decorators", "computed"],
44928 aliases: ["Property"],
44929 fields: {
44930 computed: {
44931 validate: (0, _index.assertValueType)("boolean"),
44932 default: false
44933 }
44934 }
44935 });
44936
44937 (0, _index2.default)("DeclareClass", {
44938 visitor: ["id", "typeParameters", "extends", "body"],
44939 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44940 fields: {}
44941 });
44942
44943 (0, _index2.default)("DeclareFunction", {
44944 visitor: ["id"],
44945 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44946 fields: {}
44947 });
44948
44949 (0, _index2.default)("DeclareInterface", {
44950 visitor: ["id", "typeParameters", "extends", "body"],
44951 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44952 fields: {}
44953 });
44954
44955 (0, _index2.default)("DeclareModule", {
44956 visitor: ["id", "body"],
44957 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44958 fields: {}
44959 });
44960
44961 (0, _index2.default)("DeclareModuleExports", {
44962 visitor: ["typeAnnotation"],
44963 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44964 fields: {}
44965 });
44966
44967 (0, _index2.default)("DeclareTypeAlias", {
44968 visitor: ["id", "typeParameters", "right"],
44969 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44970 fields: {}
44971 });
44972
44973 (0, _index2.default)("DeclareOpaqueType", {
44974 visitor: ["id", "typeParameters", "supertype"],
44975 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44976 fields: {}
44977 });
44978
44979 (0, _index2.default)("DeclareVariable", {
44980 visitor: ["id"],
44981 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44982 fields: {}
44983 });
44984
44985 (0, _index2.default)("DeclareExportDeclaration", {
44986 visitor: ["declaration", "specifiers", "source"],
44987 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
44988 fields: {}
44989 });
44990
44991 (0, _index2.default)("ExistentialTypeParam", {
44992 aliases: ["Flow"]
44993 });
44994
44995 (0, _index2.default)("FunctionTypeAnnotation", {
44996 visitor: ["typeParameters", "params", "rest", "returnType"],
44997 aliases: ["Flow"],
44998 fields: {}
44999 });
45000
45001 (0, _index2.default)("FunctionTypeParam", {
45002 visitor: ["name", "typeAnnotation"],
45003 aliases: ["Flow"],
45004 fields: {}
45005 });
45006
45007 (0, _index2.default)("GenericTypeAnnotation", {
45008 visitor: ["id", "typeParameters"],
45009 aliases: ["Flow"],
45010 fields: {}
45011 });
45012
45013 (0, _index2.default)("InterfaceExtends", {
45014 visitor: ["id", "typeParameters"],
45015 aliases: ["Flow"],
45016 fields: {}
45017 });
45018
45019 (0, _index2.default)("InterfaceDeclaration", {
45020 visitor: ["id", "typeParameters", "extends", "body"],
45021 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
45022 fields: {}
45023 });
45024
45025 (0, _index2.default)("IntersectionTypeAnnotation", {
45026 visitor: ["types"],
45027 aliases: ["Flow"],
45028 fields: {}
45029 });
45030
45031 (0, _index2.default)("MixedTypeAnnotation", {
45032 aliases: ["Flow", "FlowBaseAnnotation"]
45033 });
45034
45035 (0, _index2.default)("EmptyTypeAnnotation", {
45036 aliases: ["Flow", "FlowBaseAnnotation"]
45037 });
45038
45039 (0, _index2.default)("NullableTypeAnnotation", {
45040 visitor: ["typeAnnotation"],
45041 aliases: ["Flow"],
45042 fields: {}
45043 });
45044
45045 (0, _index2.default)("NumericLiteralTypeAnnotation", {
45046 aliases: ["Flow"],
45047 fields: {}
45048 });
45049
45050 (0, _index2.default)("NumberTypeAnnotation", {
45051 aliases: ["Flow", "FlowBaseAnnotation"],
45052 fields: {}
45053 });
45054
45055 (0, _index2.default)("StringLiteralTypeAnnotation", {
45056 aliases: ["Flow"],
45057 fields: {}
45058 });
45059
45060 (0, _index2.default)("StringTypeAnnotation", {
45061 aliases: ["Flow", "FlowBaseAnnotation"],
45062 fields: {}
45063 });
45064
45065 (0, _index2.default)("ThisTypeAnnotation", {
45066 aliases: ["Flow", "FlowBaseAnnotation"],
45067 fields: {}
45068 });
45069
45070 (0, _index2.default)("TupleTypeAnnotation", {
45071 visitor: ["types"],
45072 aliases: ["Flow"],
45073 fields: {}
45074 });
45075
45076 (0, _index2.default)("TypeofTypeAnnotation", {
45077 visitor: ["argument"],
45078 aliases: ["Flow"],
45079 fields: {}
45080 });
45081
45082 (0, _index2.default)("TypeAlias", {
45083 visitor: ["id", "typeParameters", "right"],
45084 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
45085 fields: {}
45086 });
45087
45088 (0, _index2.default)("OpaqueType", {
45089 visitor: ["id", "typeParameters", "impltype", "supertype"],
45090 aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
45091 fields: {}
45092 });
45093
45094 (0, _index2.default)("TypeAnnotation", {
45095 visitor: ["typeAnnotation"],
45096 aliases: ["Flow"],
45097 fields: {}
45098 });
45099
45100 (0, _index2.default)("TypeCastExpression", {
45101 visitor: ["expression", "typeAnnotation"],
45102 aliases: ["Flow", "ExpressionWrapper", "Expression"],
45103 fields: {}
45104 });
45105
45106 (0, _index2.default)("TypeParameter", {
45107 visitor: ["bound"],
45108 aliases: ["Flow"],
45109 fields: {}
45110 });
45111
45112 (0, _index2.default)("TypeParameterDeclaration", {
45113 visitor: ["params"],
45114 aliases: ["Flow"],
45115 fields: {}
45116 });
45117
45118 (0, _index2.default)("TypeParameterInstantiation", {
45119 visitor: ["params"],
45120 aliases: ["Flow"],
45121 fields: {}
45122 });
45123
45124 (0, _index2.default)("ObjectTypeAnnotation", {
45125 visitor: ["properties", "indexers", "callProperties"],
45126 aliases: ["Flow"],
45127 fields: {}
45128 });
45129
45130 (0, _index2.default)("ObjectTypeCallProperty", {
45131 visitor: ["value"],
45132 aliases: ["Flow", "UserWhitespacable"],
45133 fields: {}
45134 });
45135
45136 (0, _index2.default)("ObjectTypeIndexer", {
45137 visitor: ["id", "key", "value"],
45138 aliases: ["Flow", "UserWhitespacable"],
45139 fields: {}
45140 });
45141
45142 (0, _index2.default)("ObjectTypeProperty", {
45143 visitor: ["key", "value"],
45144 aliases: ["Flow", "UserWhitespacable"],
45145 fields: {}
45146 });
45147
45148 (0, _index2.default)("ObjectTypeSpreadProperty", {
45149 visitor: ["argument"],
45150 aliases: ["Flow", "UserWhitespacable"],
45151 fields: {}
45152 });
45153
45154 (0, _index2.default)("QualifiedTypeIdentifier", {
45155 visitor: ["id", "qualification"],
45156 aliases: ["Flow"],
45157 fields: {}
45158 });
45159
45160 (0, _index2.default)("UnionTypeAnnotation", {
45161 visitor: ["types"],
45162 aliases: ["Flow"],
45163 fields: {}
45164 });
45165
45166 (0, _index2.default)("VoidTypeAnnotation", {
45167 aliases: ["Flow", "FlowBaseAnnotation"],
45168 fields: {}
45169 });
45170
45171/***/ }),
45172/* 390 */
45173/***/ (function(module, exports, __webpack_require__) {
45174
45175 "use strict";
45176
45177 __webpack_require__(26);
45178
45179 __webpack_require__(386);
45180
45181 __webpack_require__(387);
45182
45183 __webpack_require__(389);
45184
45185 __webpack_require__(391);
45186
45187 __webpack_require__(392);
45188
45189 __webpack_require__(388);
45190
45191/***/ }),
45192/* 391 */
45193/***/ (function(module, exports, __webpack_require__) {
45194
45195 "use strict";
45196
45197 var _index = __webpack_require__(26);
45198
45199 var _index2 = _interopRequireDefault(_index);
45200
45201 function _interopRequireDefault(obj) {
45202 return obj && obj.__esModule ? obj : { default: obj };
45203 }
45204
45205 (0, _index2.default)("JSXAttribute", {
45206 visitor: ["name", "value"],
45207 aliases: ["JSX", "Immutable"],
45208 fields: {
45209 name: {
45210 validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
45211 },
45212 value: {
45213 optional: true,
45214 validate: (0, _index.assertNodeType)("JSXElement", "StringLiteral", "JSXExpressionContainer")
45215 }
45216 }
45217 });
45218
45219 (0, _index2.default)("JSXClosingElement", {
45220 visitor: ["name"],
45221 aliases: ["JSX", "Immutable"],
45222 fields: {
45223 name: {
45224 validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
45225 }
45226 }
45227 });
45228
45229 (0, _index2.default)("JSXElement", {
45230 builder: ["openingElement", "closingElement", "children", "selfClosing"],
45231 visitor: ["openingElement", "children", "closingElement"],
45232 aliases: ["JSX", "Immutable", "Expression"],
45233 fields: {
45234 openingElement: {
45235 validate: (0, _index.assertNodeType)("JSXOpeningElement")
45236 },
45237 closingElement: {
45238 optional: true,
45239 validate: (0, _index.assertNodeType)("JSXClosingElement")
45240 },
45241 children: {
45242 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement")))
45243 }
45244 }
45245 });
45246
45247 (0, _index2.default)("JSXEmptyExpression", {
45248 aliases: ["JSX", "Expression"]
45249 });
45250
45251 (0, _index2.default)("JSXExpressionContainer", {
45252 visitor: ["expression"],
45253 aliases: ["JSX", "Immutable"],
45254 fields: {
45255 expression: {
45256 validate: (0, _index.assertNodeType)("Expression")
45257 }
45258 }
45259 });
45260
45261 (0, _index2.default)("JSXSpreadChild", {
45262 visitor: ["expression"],
45263 aliases: ["JSX", "Immutable"],
45264 fields: {
45265 expression: {
45266 validate: (0, _index.assertNodeType)("Expression")
45267 }
45268 }
45269 });
45270
45271 (0, _index2.default)("JSXIdentifier", {
45272 builder: ["name"],
45273 aliases: ["JSX", "Expression"],
45274 fields: {
45275 name: {
45276 validate: (0, _index.assertValueType)("string")
45277 }
45278 }
45279 });
45280
45281 (0, _index2.default)("JSXMemberExpression", {
45282 visitor: ["object", "property"],
45283 aliases: ["JSX", "Expression"],
45284 fields: {
45285 object: {
45286 validate: (0, _index.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
45287 },
45288 property: {
45289 validate: (0, _index.assertNodeType)("JSXIdentifier")
45290 }
45291 }
45292 });
45293
45294 (0, _index2.default)("JSXNamespacedName", {
45295 visitor: ["namespace", "name"],
45296 aliases: ["JSX"],
45297 fields: {
45298 namespace: {
45299 validate: (0, _index.assertNodeType)("JSXIdentifier")
45300 },
45301 name: {
45302 validate: (0, _index.assertNodeType)("JSXIdentifier")
45303 }
45304 }
45305 });
45306
45307 (0, _index2.default)("JSXOpeningElement", {
45308 builder: ["name", "attributes", "selfClosing"],
45309 visitor: ["name", "attributes"],
45310 aliases: ["JSX", "Immutable"],
45311 fields: {
45312 name: {
45313 validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
45314 },
45315 selfClosing: {
45316 default: false,
45317 validate: (0, _index.assertValueType)("boolean")
45318 },
45319 attributes: {
45320 validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
45321 }
45322 }
45323 });
45324
45325 (0, _index2.default)("JSXSpreadAttribute", {
45326 visitor: ["argument"],
45327 aliases: ["JSX"],
45328 fields: {
45329 argument: {
45330 validate: (0, _index.assertNodeType)("Expression")
45331 }
45332 }
45333 });
45334
45335 (0, _index2.default)("JSXText", {
45336 aliases: ["JSX", "Immutable"],
45337 builder: ["value"],
45338 fields: {
45339 value: {
45340 validate: (0, _index.assertValueType)("string")
45341 }
45342 }
45343 });
45344
45345/***/ }),
45346/* 392 */
45347/***/ (function(module, exports, __webpack_require__) {
45348
45349 "use strict";
45350
45351 var _index = __webpack_require__(26);
45352
45353 var _index2 = _interopRequireDefault(_index);
45354
45355 function _interopRequireDefault(obj) {
45356 return obj && obj.__esModule ? obj : { default: obj };
45357 }
45358
45359 (0, _index2.default)("Noop", {
45360 visitor: []
45361 });
45362
45363 (0, _index2.default)("ParenthesizedExpression", {
45364 visitor: ["expression"],
45365 aliases: ["Expression", "ExpressionWrapper"],
45366 fields: {
45367 expression: {
45368 validate: (0, _index.assertNodeType)("Expression")
45369 }
45370 }
45371 });
45372
45373/***/ }),
45374/* 393 */
45375/***/ (function(module, exports, __webpack_require__) {
45376
45377 "use strict";
45378
45379 exports.__esModule = true;
45380 exports.createUnionTypeAnnotation = createUnionTypeAnnotation;
45381 exports.removeTypeDuplicates = removeTypeDuplicates;
45382 exports.createTypeAnnotationBasedOnTypeof = createTypeAnnotationBasedOnTypeof;
45383
45384 var _index = __webpack_require__(1);
45385
45386 var t = _interopRequireWildcard(_index);
45387
45388 function _interopRequireWildcard(obj) {
45389 if (obj && obj.__esModule) {
45390 return obj;
45391 } else {
45392 var newObj = {};if (obj != null) {
45393 for (var key in obj) {
45394 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
45395 }
45396 }newObj.default = obj;return newObj;
45397 }
45398 }
45399
45400 function createUnionTypeAnnotation(types) {
45401 var flattened = removeTypeDuplicates(types);
45402
45403 if (flattened.length === 1) {
45404 return flattened[0];
45405 } else {
45406 return t.unionTypeAnnotation(flattened);
45407 }
45408 }
45409
45410 function removeTypeDuplicates(nodes) {
45411 var generics = {};
45412 var bases = {};
45413
45414 var typeGroups = [];
45415
45416 var types = [];
45417
45418 for (var i = 0; i < nodes.length; i++) {
45419 var node = nodes[i];
45420 if (!node) continue;
45421
45422 if (types.indexOf(node) >= 0) {
45423 continue;
45424 }
45425
45426 if (t.isAnyTypeAnnotation(node)) {
45427 return [node];
45428 }
45429
45430 if (t.isFlowBaseAnnotation(node)) {
45431 bases[node.type] = node;
45432 continue;
45433 }
45434
45435 if (t.isUnionTypeAnnotation(node)) {
45436 if (typeGroups.indexOf(node.types) < 0) {
45437 nodes = nodes.concat(node.types);
45438 typeGroups.push(node.types);
45439 }
45440 continue;
45441 }
45442
45443 if (t.isGenericTypeAnnotation(node)) {
45444 var name = node.id.name;
45445
45446 if (generics[name]) {
45447 var existing = generics[name];
45448 if (existing.typeParameters) {
45449 if (node.typeParameters) {
45450 existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
45451 }
45452 } else {
45453 existing = node.typeParameters;
45454 }
45455 } else {
45456 generics[name] = node;
45457 }
45458
45459 continue;
45460 }
45461
45462 types.push(node);
45463 }
45464
45465 for (var type in bases) {
45466 types.push(bases[type]);
45467 }
45468
45469 for (var _name in generics) {
45470 types.push(generics[_name]);
45471 }
45472
45473 return types;
45474 }
45475
45476 function createTypeAnnotationBasedOnTypeof(type) {
45477 if (type === "string") {
45478 return t.stringTypeAnnotation();
45479 } else if (type === "number") {
45480 return t.numberTypeAnnotation();
45481 } else if (type === "undefined") {
45482 return t.voidTypeAnnotation();
45483 } else if (type === "boolean") {
45484 return t.booleanTypeAnnotation();
45485 } else if (type === "function") {
45486 return t.genericTypeAnnotation(t.identifier("Function"));
45487 } else if (type === "object") {
45488 return t.genericTypeAnnotation(t.identifier("Object"));
45489 } else if (type === "symbol") {
45490 return t.genericTypeAnnotation(t.identifier("Symbol"));
45491 } else {
45492 throw new Error("Invalid typeof value");
45493 }
45494 }
45495
45496/***/ }),
45497/* 394 */
45498/***/ (function(module, exports, __webpack_require__) {
45499
45500 "use strict";
45501
45502 exports.__esModule = true;
45503 exports.isReactComponent = undefined;
45504 exports.isCompatTag = isCompatTag;
45505 exports.buildChildren = buildChildren;
45506
45507 var _index = __webpack_require__(1);
45508
45509 var t = _interopRequireWildcard(_index);
45510
45511 function _interopRequireWildcard(obj) {
45512 if (obj && obj.__esModule) {
45513 return obj;
45514 } else {
45515 var newObj = {};if (obj != null) {
45516 for (var key in obj) {
45517 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
45518 }
45519 }newObj.default = obj;return newObj;
45520 }
45521 }
45522
45523 var isReactComponent = exports.isReactComponent = t.buildMatchMemberExpression("React.Component");
45524
45525 function isCompatTag(tagName) {
45526 return !!tagName && /^[a-z]|\-/.test(tagName);
45527 }
45528
45529 function cleanJSXElementLiteralChild(child, args) {
45530 var lines = child.value.split(/\r\n|\n|\r/);
45531
45532 var lastNonEmptyLine = 0;
45533
45534 for (var i = 0; i < lines.length; i++) {
45535 if (lines[i].match(/[^ \t]/)) {
45536 lastNonEmptyLine = i;
45537 }
45538 }
45539
45540 var str = "";
45541
45542 for (var _i = 0; _i < lines.length; _i++) {
45543 var line = lines[_i];
45544
45545 var isFirstLine = _i === 0;
45546 var isLastLine = _i === lines.length - 1;
45547 var isLastNonEmptyLine = _i === lastNonEmptyLine;
45548
45549 var trimmedLine = line.replace(/\t/g, " ");
45550
45551 if (!isFirstLine) {
45552 trimmedLine = trimmedLine.replace(/^[ ]+/, "");
45553 }
45554
45555 if (!isLastLine) {
45556 trimmedLine = trimmedLine.replace(/[ ]+$/, "");
45557 }
45558
45559 if (trimmedLine) {
45560 if (!isLastNonEmptyLine) {
45561 trimmedLine += " ";
45562 }
45563
45564 str += trimmedLine;
45565 }
45566 }
45567
45568 if (str) args.push(t.stringLiteral(str));
45569 }
45570
45571 function buildChildren(node) {
45572 var elems = [];
45573
45574 for (var i = 0; i < node.children.length; i++) {
45575 var child = node.children[i];
45576
45577 if (t.isJSXText(child)) {
45578 cleanJSXElementLiteralChild(child, elems);
45579 continue;
45580 }
45581
45582 if (t.isJSXExpressionContainer(child)) child = child.expression;
45583 if (t.isJSXEmptyExpression(child)) continue;
45584
45585 elems.push(child);
45586 }
45587
45588 return elems;
45589 }
45590
45591/***/ }),
45592/* 395 */
45593/***/ (function(module, exports, __webpack_require__) {
45594
45595 "use strict";
45596
45597 exports.__esModule = true;
45598
45599 var _keys = __webpack_require__(14);
45600
45601 var _keys2 = _interopRequireDefault(_keys);
45602
45603 var _typeof2 = __webpack_require__(11);
45604
45605 var _typeof3 = _interopRequireDefault(_typeof2);
45606
45607 var _getIterator2 = __webpack_require__(2);
45608
45609 var _getIterator3 = _interopRequireDefault(_getIterator2);
45610
45611 exports.isBinding = isBinding;
45612 exports.isReferenced = isReferenced;
45613 exports.isValidIdentifier = isValidIdentifier;
45614 exports.isLet = isLet;
45615 exports.isBlockScoped = isBlockScoped;
45616 exports.isVar = isVar;
45617 exports.isSpecifierDefault = isSpecifierDefault;
45618 exports.isScope = isScope;
45619 exports.isImmutable = isImmutable;
45620 exports.isNodesEquivalent = isNodesEquivalent;
45621
45622 var _retrievers = __webpack_require__(226);
45623
45624 var _esutils = __webpack_require__(97);
45625
45626 var _esutils2 = _interopRequireDefault(_esutils);
45627
45628 var _index = __webpack_require__(1);
45629
45630 var t = _interopRequireWildcard(_index);
45631
45632 var _constants = __webpack_require__(135);
45633
45634 function _interopRequireWildcard(obj) {
45635 if (obj && obj.__esModule) {
45636 return obj;
45637 } else {
45638 var newObj = {};if (obj != null) {
45639 for (var key in obj) {
45640 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
45641 }
45642 }newObj.default = obj;return newObj;
45643 }
45644 }
45645
45646 function _interopRequireDefault(obj) {
45647 return obj && obj.__esModule ? obj : { default: obj };
45648 }
45649
45650 function isBinding(node, parent) {
45651 var keys = _retrievers.getBindingIdentifiers.keys[parent.type];
45652 if (keys) {
45653 for (var i = 0; i < keys.length; i++) {
45654 var key = keys[i];
45655 var val = parent[key];
45656 if (Array.isArray(val)) {
45657 if (val.indexOf(node) >= 0) return true;
45658 } else {
45659 if (val === node) return true;
45660 }
45661 }
45662 }
45663
45664 return false;
45665 }
45666
45667 function isReferenced(node, parent) {
45668 switch (parent.type) {
45669 case "BindExpression":
45670 return parent.object === node || parent.callee === node;
45671
45672 case "MemberExpression":
45673 case "JSXMemberExpression":
45674 if (parent.property === node && parent.computed) {
45675 return true;
45676 } else if (parent.object === node) {
45677 return true;
45678 } else {
45679 return false;
45680 }
45681
45682 case "MetaProperty":
45683 return false;
45684
45685 case "ObjectProperty":
45686 if (parent.key === node) {
45687 return parent.computed;
45688 }
45689
45690 case "VariableDeclarator":
45691 return parent.id !== node;
45692
45693 case "ArrowFunctionExpression":
45694 case "FunctionDeclaration":
45695 case "FunctionExpression":
45696 for (var _iterator = parent.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
45697 var _ref;
45698
45699 if (_isArray) {
45700 if (_i >= _iterator.length) break;
45701 _ref = _iterator[_i++];
45702 } else {
45703 _i = _iterator.next();
45704 if (_i.done) break;
45705 _ref = _i.value;
45706 }
45707
45708 var param = _ref;
45709
45710 if (param === node) return false;
45711 }
45712
45713 return parent.id !== node;
45714
45715 case "ExportSpecifier":
45716 if (parent.source) {
45717 return false;
45718 } else {
45719 return parent.local === node;
45720 }
45721
45722 case "ExportNamespaceSpecifier":
45723 case "ExportDefaultSpecifier":
45724 return false;
45725
45726 case "JSXAttribute":
45727 return parent.name !== node;
45728
45729 case "ClassProperty":
45730 if (parent.key === node) {
45731 return parent.computed;
45732 } else {
45733 return parent.value === node;
45734 }
45735
45736 case "ImportDefaultSpecifier":
45737 case "ImportNamespaceSpecifier":
45738 case "ImportSpecifier":
45739 return false;
45740
45741 case "ClassDeclaration":
45742 case "ClassExpression":
45743 return parent.id !== node;
45744
45745 case "ClassMethod":
45746 case "ObjectMethod":
45747 return parent.key === node && parent.computed;
45748
45749 case "LabeledStatement":
45750 return false;
45751
45752 case "CatchClause":
45753 return parent.param !== node;
45754
45755 case "RestElement":
45756 return false;
45757
45758 case "AssignmentExpression":
45759 return parent.right === node;
45760
45761 case "AssignmentPattern":
45762 return parent.right === node;
45763
45764 case "ObjectPattern":
45765 case "ArrayPattern":
45766 return false;
45767 }
45768
45769 return true;
45770 }
45771
45772 function isValidIdentifier(name) {
45773 if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) {
45774 return false;
45775 } else if (name === "await") {
45776 return false;
45777 } else {
45778 return _esutils2.default.keyword.isIdentifierNameES6(name);
45779 }
45780 }
45781
45782 function isLet(node) {
45783 return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
45784 }
45785
45786 function isBlockScoped(node) {
45787 return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node);
45788 }
45789
45790 function isVar(node) {
45791 return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
45792 }
45793
45794 function isSpecifierDefault(specifier) {
45795 return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" });
45796 }
45797
45798 function isScope(node, parent) {
45799 if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) {
45800 return false;
45801 }
45802
45803 return t.isScopable(node);
45804 }
45805
45806 function isImmutable(node) {
45807 if (t.isType(node.type, "Immutable")) return true;
45808
45809 if (t.isIdentifier(node)) {
45810 if (node.name === "undefined") {
45811 return true;
45812 } else {
45813 return false;
45814 }
45815 }
45816
45817 return false;
45818 }
45819
45820 function isNodesEquivalent(a, b) {
45821 if ((typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || (typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || a == null || b == null) {
45822 return a === b;
45823 }
45824
45825 if (a.type !== b.type) {
45826 return false;
45827 }
45828
45829 var fields = (0, _keys2.default)(t.NODE_FIELDS[a.type] || a.type);
45830
45831 for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
45832 var _ref2;
45833
45834 if (_isArray2) {
45835 if (_i2 >= _iterator2.length) break;
45836 _ref2 = _iterator2[_i2++];
45837 } else {
45838 _i2 = _iterator2.next();
45839 if (_i2.done) break;
45840 _ref2 = _i2.value;
45841 }
45842
45843 var field = _ref2;
45844
45845 if ((0, _typeof3.default)(a[field]) !== (0, _typeof3.default)(b[field])) {
45846 return false;
45847 }
45848
45849 if (Array.isArray(a[field])) {
45850 if (!Array.isArray(b[field])) {
45851 return false;
45852 }
45853 if (a[field].length !== b[field].length) {
45854 return false;
45855 }
45856
45857 for (var i = 0; i < a[field].length; i++) {
45858 if (!isNodesEquivalent(a[field][i], b[field][i])) {
45859 return false;
45860 }
45861 }
45862 continue;
45863 }
45864
45865 if (!isNodesEquivalent(a[field], b[field])) {
45866 return false;
45867 }
45868 }
45869
45870 return true;
45871 }
45872
45873/***/ }),
45874/* 396 */
45875/***/ (function(module, exports) {
45876
45877 'use strict';
45878
45879 module.exports = balanced;
45880 function balanced(a, b, str) {
45881 if (a instanceof RegExp) a = maybeMatch(a, str);
45882 if (b instanceof RegExp) b = maybeMatch(b, str);
45883
45884 var r = range(a, b, str);
45885
45886 return r && {
45887 start: r[0],
45888 end: r[1],
45889 pre: str.slice(0, r[0]),
45890 body: str.slice(r[0] + a.length, r[1]),
45891 post: str.slice(r[1] + b.length)
45892 };
45893 }
45894
45895 function maybeMatch(reg, str) {
45896 var m = str.match(reg);
45897 return m ? m[0] : null;
45898 }
45899
45900 balanced.range = range;
45901 function range(a, b, str) {
45902 var begs, beg, left, right, result;
45903 var ai = str.indexOf(a);
45904 var bi = str.indexOf(b, ai + 1);
45905 var i = ai;
45906
45907 if (ai >= 0 && bi > 0) {
45908 begs = [];
45909 left = str.length;
45910
45911 while (i >= 0 && !result) {
45912 if (i == ai) {
45913 begs.push(i);
45914 ai = str.indexOf(a, i + 1);
45915 } else if (begs.length == 1) {
45916 result = [begs.pop(), bi];
45917 } else {
45918 beg = begs.pop();
45919 if (beg < left) {
45920 left = beg;
45921 right = bi;
45922 }
45923
45924 bi = str.indexOf(b, i + 1);
45925 }
45926
45927 i = ai < bi && ai >= 0 ? ai : bi;
45928 }
45929
45930 if (begs.length) {
45931 result = [left, right];
45932 }
45933 }
45934
45935 return result;
45936 }
45937
45938/***/ }),
45939/* 397 */
45940/***/ (function(module, exports) {
45941
45942 'use strict';
45943
45944 exports.byteLength = byteLength;
45945 exports.toByteArray = toByteArray;
45946 exports.fromByteArray = fromByteArray;
45947
45948 var lookup = [];
45949 var revLookup = [];
45950 var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
45951
45952 var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
45953 for (var i = 0, len = code.length; i < len; ++i) {
45954 lookup[i] = code[i];
45955 revLookup[code.charCodeAt(i)] = i;
45956 }
45957
45958 revLookup['-'.charCodeAt(0)] = 62;
45959 revLookup['_'.charCodeAt(0)] = 63;
45960
45961 function placeHoldersCount(b64) {
45962 var len = b64.length;
45963 if (len % 4 > 0) {
45964 throw new Error('Invalid string. Length must be a multiple of 4');
45965 }
45966
45967 // the number of equal signs (place holders)
45968 // if there are two placeholders, than the two characters before it
45969 // represent one byte
45970 // if there is only one, then the three characters before it represent 2 bytes
45971 // this is just a cheap hack to not do indexOf twice
45972 return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;
45973 }
45974
45975 function byteLength(b64) {
45976 // base64 is 4/3 + up to two characters of the original data
45977 return b64.length * 3 / 4 - placeHoldersCount(b64);
45978 }
45979
45980 function toByteArray(b64) {
45981 var i, l, tmp, placeHolders, arr;
45982 var len = b64.length;
45983 placeHolders = placeHoldersCount(b64);
45984
45985 arr = new Arr(len * 3 / 4 - placeHolders);
45986
45987 // if there are placeholders, only get up to the last complete 4 chars
45988 l = placeHolders > 0 ? len - 4 : len;
45989
45990 var L = 0;
45991
45992 for (i = 0; i < l; i += 4) {
45993 tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
45994 arr[L++] = tmp >> 16 & 0xFF;
45995 arr[L++] = tmp >> 8 & 0xFF;
45996 arr[L++] = tmp & 0xFF;
45997 }
45998
45999 if (placeHolders === 2) {
46000 tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
46001 arr[L++] = tmp & 0xFF;
46002 } else if (placeHolders === 1) {
46003 tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
46004 arr[L++] = tmp >> 8 & 0xFF;
46005 arr[L++] = tmp & 0xFF;
46006 }
46007
46008 return arr;
46009 }
46010
46011 function tripletToBase64(num) {
46012 return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
46013 }
46014
46015 function encodeChunk(uint8, start, end) {
46016 var tmp;
46017 var output = [];
46018 for (var i = start; i < end; i += 3) {
46019 tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
46020 output.push(tripletToBase64(tmp));
46021 }
46022 return output.join('');
46023 }
46024
46025 function fromByteArray(uint8) {
46026 var tmp;
46027 var len = uint8.length;
46028 var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
46029 var output = '';
46030 var parts = [];
46031 var maxChunkLength = 16383; // must be multiple of 3
46032
46033 // go through the array every three bytes, we'll deal with trailing stuff later
46034 for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
46035 parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
46036 }
46037
46038 // pad the end with zeros, but make sure to not forget the extra bytes
46039 if (extraBytes === 1) {
46040 tmp = uint8[len - 1];
46041 output += lookup[tmp >> 2];
46042 output += lookup[tmp << 4 & 0x3F];
46043 output += '==';
46044 } else if (extraBytes === 2) {
46045 tmp = (uint8[len - 2] << 8) + uint8[len - 1];
46046 output += lookup[tmp >> 10];
46047 output += lookup[tmp >> 4 & 0x3F];
46048 output += lookup[tmp << 2 & 0x3F];
46049 output += '=';
46050 }
46051
46052 parts.push(output);
46053
46054 return parts.join('');
46055 }
46056
46057/***/ }),
46058/* 398 */
46059/***/ (function(module, exports, __webpack_require__) {
46060
46061 'use strict';
46062
46063 var concatMap = __webpack_require__(402);
46064 var balanced = __webpack_require__(396);
46065
46066 module.exports = expandTop;
46067
46068 var escSlash = '\0SLASH' + Math.random() + '\0';
46069 var escOpen = '\0OPEN' + Math.random() + '\0';
46070 var escClose = '\0CLOSE' + Math.random() + '\0';
46071 var escComma = '\0COMMA' + Math.random() + '\0';
46072 var escPeriod = '\0PERIOD' + Math.random() + '\0';
46073
46074 function numeric(str) {
46075 return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
46076 }
46077
46078 function escapeBraces(str) {
46079 return str.split('\\\\').join(escSlash).split('\\{').join(escOpen).split('\\}').join(escClose).split('\\,').join(escComma).split('\\.').join(escPeriod);
46080 }
46081
46082 function unescapeBraces(str) {
46083 return str.split(escSlash).join('\\').split(escOpen).join('{').split(escClose).join('}').split(escComma).join(',').split(escPeriod).join('.');
46084 }
46085
46086 // Basically just str.split(","), but handling cases
46087 // where we have nested braced sections, which should be
46088 // treated as individual members, like {a,{b,c},d}
46089 function parseCommaParts(str) {
46090 if (!str) return [''];
46091
46092 var parts = [];
46093 var m = balanced('{', '}', str);
46094
46095 if (!m) return str.split(',');
46096
46097 var pre = m.pre;
46098 var body = m.body;
46099 var post = m.post;
46100 var p = pre.split(',');
46101
46102 p[p.length - 1] += '{' + body + '}';
46103 var postParts = parseCommaParts(post);
46104 if (post.length) {
46105 p[p.length - 1] += postParts.shift();
46106 p.push.apply(p, postParts);
46107 }
46108
46109 parts.push.apply(parts, p);
46110
46111 return parts;
46112 }
46113
46114 function expandTop(str) {
46115 if (!str) return [];
46116
46117 // I don't know why Bash 4.3 does this, but it does.
46118 // Anything starting with {} will have the first two bytes preserved
46119 // but *only* at the top level, so {},a}b will not expand to anything,
46120 // but a{},b}c will be expanded to [a}c,abc].
46121 // One could argue that this is a bug in Bash, but since the goal of
46122 // this module is to match Bash's rules, we escape a leading {}
46123 if (str.substr(0, 2) === '{}') {
46124 str = '\\{\\}' + str.substr(2);
46125 }
46126
46127 return expand(escapeBraces(str), true).map(unescapeBraces);
46128 }
46129
46130 function identity(e) {
46131 return e;
46132 }
46133
46134 function embrace(str) {
46135 return '{' + str + '}';
46136 }
46137 function isPadded(el) {
46138 return (/^-?0\d/.test(el)
46139 );
46140 }
46141
46142 function lte(i, y) {
46143 return i <= y;
46144 }
46145 function gte(i, y) {
46146 return i >= y;
46147 }
46148
46149 function expand(str, isTop) {
46150 var expansions = [];
46151
46152 var m = balanced('{', '}', str);
46153 if (!m || /\$$/.test(m.pre)) return [str];
46154
46155 var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
46156 var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
46157 var isSequence = isNumericSequence || isAlphaSequence;
46158 var isOptions = m.body.indexOf(',') >= 0;
46159 if (!isSequence && !isOptions) {
46160 // {a},b}
46161 if (m.post.match(/,.*\}/)) {
46162 str = m.pre + '{' + m.body + escClose + m.post;
46163 return expand(str);
46164 }
46165 return [str];
46166 }
46167
46168 var n;
46169 if (isSequence) {
46170 n = m.body.split(/\.\./);
46171 } else {
46172 n = parseCommaParts(m.body);
46173 if (n.length === 1) {
46174 // x{{a,b}}y ==> x{a}y x{b}y
46175 n = expand(n[0], false).map(embrace);
46176 if (n.length === 1) {
46177 var post = m.post.length ? expand(m.post, false) : [''];
46178 return post.map(function (p) {
46179 return m.pre + n[0] + p;
46180 });
46181 }
46182 }
46183 }
46184
46185 // at this point, n is the parts, and we know it's not a comma set
46186 // with a single entry.
46187
46188 // no need to expand pre, since it is guaranteed to be free of brace-sets
46189 var pre = m.pre;
46190 var post = m.post.length ? expand(m.post, false) : [''];
46191
46192 var N;
46193
46194 if (isSequence) {
46195 var x = numeric(n[0]);
46196 var y = numeric(n[1]);
46197 var width = Math.max(n[0].length, n[1].length);
46198 var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
46199 var test = lte;
46200 var reverse = y < x;
46201 if (reverse) {
46202 incr *= -1;
46203 test = gte;
46204 }
46205 var pad = n.some(isPadded);
46206
46207 N = [];
46208
46209 for (var i = x; test(i, y); i += incr) {
46210 var c;
46211 if (isAlphaSequence) {
46212 c = String.fromCharCode(i);
46213 if (c === '\\') c = '';
46214 } else {
46215 c = String(i);
46216 if (pad) {
46217 var need = width - c.length;
46218 if (need > 0) {
46219 var z = new Array(need + 1).join('0');
46220 if (i < 0) c = '-' + z + c.slice(1);else c = z + c;
46221 }
46222 }
46223 }
46224 N.push(c);
46225 }
46226 } else {
46227 N = concatMap(n, function (el) {
46228 return expand(el, false);
46229 });
46230 }
46231
46232 for (var j = 0; j < N.length; j++) {
46233 for (var k = 0; k < post.length; k++) {
46234 var expansion = pre + N[j] + post[k];
46235 if (!isTop || isSequence || expansion) expansions.push(expansion);
46236 }
46237 }
46238
46239 return expansions;
46240 }
46241
46242/***/ }),
46243/* 399 */
46244/***/ (function(module, exports, __webpack_require__) {
46245
46246 /* WEBPACK VAR INJECTION */(function(global) {/*!
46247 * The buffer module from node.js, for the browser.
46248 *
46249 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
46250 * @license MIT
46251 */
46252 /* eslint-disable no-proto */
46253
46254 'use strict';
46255
46256 var base64 = __webpack_require__(397);
46257 var ieee754 = __webpack_require__(465);
46258 var isArray = __webpack_require__(400);
46259
46260 exports.Buffer = Buffer;
46261 exports.SlowBuffer = SlowBuffer;
46262 exports.INSPECT_MAX_BYTES = 50;
46263
46264 /**
46265 * If `Buffer.TYPED_ARRAY_SUPPORT`:
46266 * === true Use Uint8Array implementation (fastest)
46267 * === false Use Object implementation (most compatible, even IE6)
46268 *
46269 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
46270 * Opera 11.6+, iOS 4.2+.
46271 *
46272 * Due to various browser bugs, sometimes the Object implementation will be used even
46273 * when the browser supports typed arrays.
46274 *
46275 * Note:
46276 *
46277 * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
46278 * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
46279 *
46280 * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
46281 *
46282 * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
46283 * incorrect length in some situations.
46284
46285 * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
46286 * get the Object implementation, which is slower but behaves correctly.
46287 */
46288 Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();
46289
46290 /*
46291 * Export kMaxLength after typed array support is determined.
46292 */
46293 exports.kMaxLength = kMaxLength();
46294
46295 function typedArraySupport() {
46296 try {
46297 var arr = new Uint8Array(1);
46298 arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function foo() {
46299 return 42;
46300 } };
46301 return arr.foo() === 42 && // typed array instances can be augmented
46302 typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
46303 arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`
46304 } catch (e) {
46305 return false;
46306 }
46307 }
46308
46309 function kMaxLength() {
46310 return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
46311 }
46312
46313 function createBuffer(that, length) {
46314 if (kMaxLength() < length) {
46315 throw new RangeError('Invalid typed array length');
46316 }
46317 if (Buffer.TYPED_ARRAY_SUPPORT) {
46318 // Return an augmented `Uint8Array` instance, for best performance
46319 that = new Uint8Array(length);
46320 that.__proto__ = Buffer.prototype;
46321 } else {
46322 // Fallback: Return an object instance of the Buffer class
46323 if (that === null) {
46324 that = new Buffer(length);
46325 }
46326 that.length = length;
46327 }
46328
46329 return that;
46330 }
46331
46332 /**
46333 * The Buffer constructor returns instances of `Uint8Array` that have their
46334 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
46335 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
46336 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
46337 * returns a single octet.
46338 *
46339 * The `Uint8Array` prototype remains unmodified.
46340 */
46341
46342 function Buffer(arg, encodingOrOffset, length) {
46343 if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
46344 return new Buffer(arg, encodingOrOffset, length);
46345 }
46346
46347 // Common case.
46348 if (typeof arg === 'number') {
46349 if (typeof encodingOrOffset === 'string') {
46350 throw new Error('If encoding is specified then the first argument must be a string');
46351 }
46352 return allocUnsafe(this, arg);
46353 }
46354 return from(this, arg, encodingOrOffset, length);
46355 }
46356
46357 Buffer.poolSize = 8192; // not used by this implementation
46358
46359 // TODO: Legacy, not needed anymore. Remove in next major version.
46360 Buffer._augment = function (arr) {
46361 arr.__proto__ = Buffer.prototype;
46362 return arr;
46363 };
46364
46365 function from(that, value, encodingOrOffset, length) {
46366 if (typeof value === 'number') {
46367 throw new TypeError('"value" argument must not be a number');
46368 }
46369
46370 if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
46371 return fromArrayBuffer(that, value, encodingOrOffset, length);
46372 }
46373
46374 if (typeof value === 'string') {
46375 return fromString(that, value, encodingOrOffset);
46376 }
46377
46378 return fromObject(that, value);
46379 }
46380
46381 /**
46382 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
46383 * if value is a number.
46384 * Buffer.from(str[, encoding])
46385 * Buffer.from(array)
46386 * Buffer.from(buffer)
46387 * Buffer.from(arrayBuffer[, byteOffset[, length]])
46388 **/
46389 Buffer.from = function (value, encodingOrOffset, length) {
46390 return from(null, value, encodingOrOffset, length);
46391 };
46392
46393 if (Buffer.TYPED_ARRAY_SUPPORT) {
46394 Buffer.prototype.__proto__ = Uint8Array.prototype;
46395 Buffer.__proto__ = Uint8Array;
46396 if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {
46397 // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
46398 Object.defineProperty(Buffer, Symbol.species, {
46399 value: null,
46400 configurable: true
46401 });
46402 }
46403 }
46404
46405 function assertSize(size) {
46406 if (typeof size !== 'number') {
46407 throw new TypeError('"size" argument must be a number');
46408 } else if (size < 0) {
46409 throw new RangeError('"size" argument must not be negative');
46410 }
46411 }
46412
46413 function alloc(that, size, fill, encoding) {
46414 assertSize(size);
46415 if (size <= 0) {
46416 return createBuffer(that, size);
46417 }
46418 if (fill !== undefined) {
46419 // Only pay attention to encoding if it's a string. This
46420 // prevents accidentally sending in a number that would
46421 // be interpretted as a start offset.
46422 return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
46423 }
46424 return createBuffer(that, size);
46425 }
46426
46427 /**
46428 * Creates a new filled Buffer instance.
46429 * alloc(size[, fill[, encoding]])
46430 **/
46431 Buffer.alloc = function (size, fill, encoding) {
46432 return alloc(null, size, fill, encoding);
46433 };
46434
46435 function allocUnsafe(that, size) {
46436 assertSize(size);
46437 that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
46438 if (!Buffer.TYPED_ARRAY_SUPPORT) {
46439 for (var i = 0; i < size; ++i) {
46440 that[i] = 0;
46441 }
46442 }
46443 return that;
46444 }
46445
46446 /**
46447 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
46448 * */
46449 Buffer.allocUnsafe = function (size) {
46450 return allocUnsafe(null, size);
46451 };
46452 /**
46453 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
46454 */
46455 Buffer.allocUnsafeSlow = function (size) {
46456 return allocUnsafe(null, size);
46457 };
46458
46459 function fromString(that, string, encoding) {
46460 if (typeof encoding !== 'string' || encoding === '') {
46461 encoding = 'utf8';
46462 }
46463
46464 if (!Buffer.isEncoding(encoding)) {
46465 throw new TypeError('"encoding" must be a valid string encoding');
46466 }
46467
46468 var length = byteLength(string, encoding) | 0;
46469 that = createBuffer(that, length);
46470
46471 var actual = that.write(string, encoding);
46472
46473 if (actual !== length) {
46474 // Writing a hex string, for example, that contains invalid characters will
46475 // cause everything after the first invalid character to be ignored. (e.g.
46476 // 'abxxcd' will be treated as 'ab')
46477 that = that.slice(0, actual);
46478 }
46479
46480 return that;
46481 }
46482
46483 function fromArrayLike(that, array) {
46484 var length = array.length < 0 ? 0 : checked(array.length) | 0;
46485 that = createBuffer(that, length);
46486 for (var i = 0; i < length; i += 1) {
46487 that[i] = array[i] & 255;
46488 }
46489 return that;
46490 }
46491
46492 function fromArrayBuffer(that, array, byteOffset, length) {
46493 array.byteLength; // this throws if `array` is not a valid ArrayBuffer
46494
46495 if (byteOffset < 0 || array.byteLength < byteOffset) {
46496 throw new RangeError('\'offset\' is out of bounds');
46497 }
46498
46499 if (array.byteLength < byteOffset + (length || 0)) {
46500 throw new RangeError('\'length\' is out of bounds');
46501 }
46502
46503 if (byteOffset === undefined && length === undefined) {
46504 array = new Uint8Array(array);
46505 } else if (length === undefined) {
46506 array = new Uint8Array(array, byteOffset);
46507 } else {
46508 array = new Uint8Array(array, byteOffset, length);
46509 }
46510
46511 if (Buffer.TYPED_ARRAY_SUPPORT) {
46512 // Return an augmented `Uint8Array` instance, for best performance
46513 that = array;
46514 that.__proto__ = Buffer.prototype;
46515 } else {
46516 // Fallback: Return an object instance of the Buffer class
46517 that = fromArrayLike(that, array);
46518 }
46519 return that;
46520 }
46521
46522 function fromObject(that, obj) {
46523 if (Buffer.isBuffer(obj)) {
46524 var len = checked(obj.length) | 0;
46525 that = createBuffer(that, len);
46526
46527 if (that.length === 0) {
46528 return that;
46529 }
46530
46531 obj.copy(that, 0, 0, len);
46532 return that;
46533 }
46534
46535 if (obj) {
46536 if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
46537 if (typeof obj.length !== 'number' || isnan(obj.length)) {
46538 return createBuffer(that, 0);
46539 }
46540 return fromArrayLike(that, obj);
46541 }
46542
46543 if (obj.type === 'Buffer' && isArray(obj.data)) {
46544 return fromArrayLike(that, obj.data);
46545 }
46546 }
46547
46548 throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
46549 }
46550
46551 function checked(length) {
46552 // Note: cannot use `length < kMaxLength()` here because that fails when
46553 // length is NaN (which is otherwise coerced to zero.)
46554 if (length >= kMaxLength()) {
46555 throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
46556 }
46557 return length | 0;
46558 }
46559
46560 function SlowBuffer(length) {
46561 if (+length != length) {
46562 // eslint-disable-line eqeqeq
46563 length = 0;
46564 }
46565 return Buffer.alloc(+length);
46566 }
46567
46568 Buffer.isBuffer = function isBuffer(b) {
46569 return !!(b != null && b._isBuffer);
46570 };
46571
46572 Buffer.compare = function compare(a, b) {
46573 if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
46574 throw new TypeError('Arguments must be Buffers');
46575 }
46576
46577 if (a === b) return 0;
46578
46579 var x = a.length;
46580 var y = b.length;
46581
46582 for (var i = 0, len = Math.min(x, y); i < len; ++i) {
46583 if (a[i] !== b[i]) {
46584 x = a[i];
46585 y = b[i];
46586 break;
46587 }
46588 }
46589
46590 if (x < y) return -1;
46591 if (y < x) return 1;
46592 return 0;
46593 };
46594
46595 Buffer.isEncoding = function isEncoding(encoding) {
46596 switch (String(encoding).toLowerCase()) {
46597 case 'hex':
46598 case 'utf8':
46599 case 'utf-8':
46600 case 'ascii':
46601 case 'latin1':
46602 case 'binary':
46603 case 'base64':
46604 case 'ucs2':
46605 case 'ucs-2':
46606 case 'utf16le':
46607 case 'utf-16le':
46608 return true;
46609 default:
46610 return false;
46611 }
46612 };
46613
46614 Buffer.concat = function concat(list, length) {
46615 if (!isArray(list)) {
46616 throw new TypeError('"list" argument must be an Array of Buffers');
46617 }
46618
46619 if (list.length === 0) {
46620 return Buffer.alloc(0);
46621 }
46622
46623 var i;
46624 if (length === undefined) {
46625 length = 0;
46626 for (i = 0; i < list.length; ++i) {
46627 length += list[i].length;
46628 }
46629 }
46630
46631 var buffer = Buffer.allocUnsafe(length);
46632 var pos = 0;
46633 for (i = 0; i < list.length; ++i) {
46634 var buf = list[i];
46635 if (!Buffer.isBuffer(buf)) {
46636 throw new TypeError('"list" argument must be an Array of Buffers');
46637 }
46638 buf.copy(buffer, pos);
46639 pos += buf.length;
46640 }
46641 return buffer;
46642 };
46643
46644 function byteLength(string, encoding) {
46645 if (Buffer.isBuffer(string)) {
46646 return string.length;
46647 }
46648 if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
46649 return string.byteLength;
46650 }
46651 if (typeof string !== 'string') {
46652 string = '' + string;
46653 }
46654
46655 var len = string.length;
46656 if (len === 0) return 0;
46657
46658 // Use a for loop to avoid recursion
46659 var loweredCase = false;
46660 for (;;) {
46661 switch (encoding) {
46662 case 'ascii':
46663 case 'latin1':
46664 case 'binary':
46665 return len;
46666 case 'utf8':
46667 case 'utf-8':
46668 case undefined:
46669 return utf8ToBytes(string).length;
46670 case 'ucs2':
46671 case 'ucs-2':
46672 case 'utf16le':
46673 case 'utf-16le':
46674 return len * 2;
46675 case 'hex':
46676 return len >>> 1;
46677 case 'base64':
46678 return base64ToBytes(string).length;
46679 default:
46680 if (loweredCase) return utf8ToBytes(string).length; // assume utf8
46681 encoding = ('' + encoding).toLowerCase();
46682 loweredCase = true;
46683 }
46684 }
46685 }
46686 Buffer.byteLength = byteLength;
46687
46688 function slowToString(encoding, start, end) {
46689 var loweredCase = false;
46690
46691 // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
46692 // property of a typed array.
46693
46694 // This behaves neither like String nor Uint8Array in that we set start/end
46695 // to their upper/lower bounds if the value passed is out of range.
46696 // undefined is handled specially as per ECMA-262 6th Edition,
46697 // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
46698 if (start === undefined || start < 0) {
46699 start = 0;
46700 }
46701 // Return early if start > this.length. Done here to prevent potential uint32
46702 // coercion fail below.
46703 if (start > this.length) {
46704 return '';
46705 }
46706
46707 if (end === undefined || end > this.length) {
46708 end = this.length;
46709 }
46710
46711 if (end <= 0) {
46712 return '';
46713 }
46714
46715 // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
46716 end >>>= 0;
46717 start >>>= 0;
46718
46719 if (end <= start) {
46720 return '';
46721 }
46722
46723 if (!encoding) encoding = 'utf8';
46724
46725 while (true) {
46726 switch (encoding) {
46727 case 'hex':
46728 return hexSlice(this, start, end);
46729
46730 case 'utf8':
46731 case 'utf-8':
46732 return utf8Slice(this, start, end);
46733
46734 case 'ascii':
46735 return asciiSlice(this, start, end);
46736
46737 case 'latin1':
46738 case 'binary':
46739 return latin1Slice(this, start, end);
46740
46741 case 'base64':
46742 return base64Slice(this, start, end);
46743
46744 case 'ucs2':
46745 case 'ucs-2':
46746 case 'utf16le':
46747 case 'utf-16le':
46748 return utf16leSlice(this, start, end);
46749
46750 default:
46751 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
46752 encoding = (encoding + '').toLowerCase();
46753 loweredCase = true;
46754 }
46755 }
46756 }
46757
46758 // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
46759 // Buffer instances.
46760 Buffer.prototype._isBuffer = true;
46761
46762 function swap(b, n, m) {
46763 var i = b[n];
46764 b[n] = b[m];
46765 b[m] = i;
46766 }
46767
46768 Buffer.prototype.swap16 = function swap16() {
46769 var len = this.length;
46770 if (len % 2 !== 0) {
46771 throw new RangeError('Buffer size must be a multiple of 16-bits');
46772 }
46773 for (var i = 0; i < len; i += 2) {
46774 swap(this, i, i + 1);
46775 }
46776 return this;
46777 };
46778
46779 Buffer.prototype.swap32 = function swap32() {
46780 var len = this.length;
46781 if (len % 4 !== 0) {
46782 throw new RangeError('Buffer size must be a multiple of 32-bits');
46783 }
46784 for (var i = 0; i < len; i += 4) {
46785 swap(this, i, i + 3);
46786 swap(this, i + 1, i + 2);
46787 }
46788 return this;
46789 };
46790
46791 Buffer.prototype.swap64 = function swap64() {
46792 var len = this.length;
46793 if (len % 8 !== 0) {
46794 throw new RangeError('Buffer size must be a multiple of 64-bits');
46795 }
46796 for (var i = 0; i < len; i += 8) {
46797 swap(this, i, i + 7);
46798 swap(this, i + 1, i + 6);
46799 swap(this, i + 2, i + 5);
46800 swap(this, i + 3, i + 4);
46801 }
46802 return this;
46803 };
46804
46805 Buffer.prototype.toString = function toString() {
46806 var length = this.length | 0;
46807 if (length === 0) return '';
46808 if (arguments.length === 0) return utf8Slice(this, 0, length);
46809 return slowToString.apply(this, arguments);
46810 };
46811
46812 Buffer.prototype.equals = function equals(b) {
46813 if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
46814 if (this === b) return true;
46815 return Buffer.compare(this, b) === 0;
46816 };
46817
46818 Buffer.prototype.inspect = function inspect() {
46819 var str = '';
46820 var max = exports.INSPECT_MAX_BYTES;
46821 if (this.length > 0) {
46822 str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
46823 if (this.length > max) str += ' ... ';
46824 }
46825 return '<Buffer ' + str + '>';
46826 };
46827
46828 Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
46829 if (!Buffer.isBuffer(target)) {
46830 throw new TypeError('Argument must be a Buffer');
46831 }
46832
46833 if (start === undefined) {
46834 start = 0;
46835 }
46836 if (end === undefined) {
46837 end = target ? target.length : 0;
46838 }
46839 if (thisStart === undefined) {
46840 thisStart = 0;
46841 }
46842 if (thisEnd === undefined) {
46843 thisEnd = this.length;
46844 }
46845
46846 if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
46847 throw new RangeError('out of range index');
46848 }
46849
46850 if (thisStart >= thisEnd && start >= end) {
46851 return 0;
46852 }
46853 if (thisStart >= thisEnd) {
46854 return -1;
46855 }
46856 if (start >= end) {
46857 return 1;
46858 }
46859
46860 start >>>= 0;
46861 end >>>= 0;
46862 thisStart >>>= 0;
46863 thisEnd >>>= 0;
46864
46865 if (this === target) return 0;
46866
46867 var x = thisEnd - thisStart;
46868 var y = end - start;
46869 var len = Math.min(x, y);
46870
46871 var thisCopy = this.slice(thisStart, thisEnd);
46872 var targetCopy = target.slice(start, end);
46873
46874 for (var i = 0; i < len; ++i) {
46875 if (thisCopy[i] !== targetCopy[i]) {
46876 x = thisCopy[i];
46877 y = targetCopy[i];
46878 break;
46879 }
46880 }
46881
46882 if (x < y) return -1;
46883 if (y < x) return 1;
46884 return 0;
46885 };
46886
46887 // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
46888 // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
46889 //
46890 // Arguments:
46891 // - buffer - a Buffer to search
46892 // - val - a string, Buffer, or number
46893 // - byteOffset - an index into `buffer`; will be clamped to an int32
46894 // - encoding - an optional encoding, relevant is val is a string
46895 // - dir - true for indexOf, false for lastIndexOf
46896 function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
46897 // Empty buffer means no match
46898 if (buffer.length === 0) return -1;
46899
46900 // Normalize byteOffset
46901 if (typeof byteOffset === 'string') {
46902 encoding = byteOffset;
46903 byteOffset = 0;
46904 } else if (byteOffset > 0x7fffffff) {
46905 byteOffset = 0x7fffffff;
46906 } else if (byteOffset < -0x80000000) {
46907 byteOffset = -0x80000000;
46908 }
46909 byteOffset = +byteOffset; // Coerce to Number.
46910 if (isNaN(byteOffset)) {
46911 // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
46912 byteOffset = dir ? 0 : buffer.length - 1;
46913 }
46914
46915 // Normalize byteOffset: negative offsets start from the end of the buffer
46916 if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
46917 if (byteOffset >= buffer.length) {
46918 if (dir) return -1;else byteOffset = buffer.length - 1;
46919 } else if (byteOffset < 0) {
46920 if (dir) byteOffset = 0;else return -1;
46921 }
46922
46923 // Normalize val
46924 if (typeof val === 'string') {
46925 val = Buffer.from(val, encoding);
46926 }
46927
46928 // Finally, search either indexOf (if dir is true) or lastIndexOf
46929 if (Buffer.isBuffer(val)) {
46930 // Special case: looking for empty string/buffer always fails
46931 if (val.length === 0) {
46932 return -1;
46933 }
46934 return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
46935 } else if (typeof val === 'number') {
46936 val = val & 0xFF; // Search for a byte value [0-255]
46937 if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
46938 if (dir) {
46939 return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
46940 } else {
46941 return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
46942 }
46943 }
46944 return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
46945 }
46946
46947 throw new TypeError('val must be string, number or Buffer');
46948 }
46949
46950 function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
46951 var indexSize = 1;
46952 var arrLength = arr.length;
46953 var valLength = val.length;
46954
46955 if (encoding !== undefined) {
46956 encoding = String(encoding).toLowerCase();
46957 if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
46958 if (arr.length < 2 || val.length < 2) {
46959 return -1;
46960 }
46961 indexSize = 2;
46962 arrLength /= 2;
46963 valLength /= 2;
46964 byteOffset /= 2;
46965 }
46966 }
46967
46968 function read(buf, i) {
46969 if (indexSize === 1) {
46970 return buf[i];
46971 } else {
46972 return buf.readUInt16BE(i * indexSize);
46973 }
46974 }
46975
46976 var i;
46977 if (dir) {
46978 var foundIndex = -1;
46979 for (i = byteOffset; i < arrLength; i++) {
46980 if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
46981 if (foundIndex === -1) foundIndex = i;
46982 if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
46983 } else {
46984 if (foundIndex !== -1) i -= i - foundIndex;
46985 foundIndex = -1;
46986 }
46987 }
46988 } else {
46989 if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
46990 for (i = byteOffset; i >= 0; i--) {
46991 var found = true;
46992 for (var j = 0; j < valLength; j++) {
46993 if (read(arr, i + j) !== read(val, j)) {
46994 found = false;
46995 break;
46996 }
46997 }
46998 if (found) return i;
46999 }
47000 }
47001
47002 return -1;
47003 }
47004
47005 Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
47006 return this.indexOf(val, byteOffset, encoding) !== -1;
47007 };
47008
47009 Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
47010 return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
47011 };
47012
47013 Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
47014 return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
47015 };
47016
47017 function hexWrite(buf, string, offset, length) {
47018 offset = Number(offset) || 0;
47019 var remaining = buf.length - offset;
47020 if (!length) {
47021 length = remaining;
47022 } else {
47023 length = Number(length);
47024 if (length > remaining) {
47025 length = remaining;
47026 }
47027 }
47028
47029 // must be an even number of digits
47030 var strLen = string.length;
47031 if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
47032
47033 if (length > strLen / 2) {
47034 length = strLen / 2;
47035 }
47036 for (var i = 0; i < length; ++i) {
47037 var parsed = parseInt(string.substr(i * 2, 2), 16);
47038 if (isNaN(parsed)) return i;
47039 buf[offset + i] = parsed;
47040 }
47041 return i;
47042 }
47043
47044 function utf8Write(buf, string, offset, length) {
47045 return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
47046 }
47047
47048 function asciiWrite(buf, string, offset, length) {
47049 return blitBuffer(asciiToBytes(string), buf, offset, length);
47050 }
47051
47052 function latin1Write(buf, string, offset, length) {
47053 return asciiWrite(buf, string, offset, length);
47054 }
47055
47056 function base64Write(buf, string, offset, length) {
47057 return blitBuffer(base64ToBytes(string), buf, offset, length);
47058 }
47059
47060 function ucs2Write(buf, string, offset, length) {
47061 return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
47062 }
47063
47064 Buffer.prototype.write = function write(string, offset, length, encoding) {
47065 // Buffer#write(string)
47066 if (offset === undefined) {
47067 encoding = 'utf8';
47068 length = this.length;
47069 offset = 0;
47070 // Buffer#write(string, encoding)
47071 } else if (length === undefined && typeof offset === 'string') {
47072 encoding = offset;
47073 length = this.length;
47074 offset = 0;
47075 // Buffer#write(string, offset[, length][, encoding])
47076 } else if (isFinite(offset)) {
47077 offset = offset | 0;
47078 if (isFinite(length)) {
47079 length = length | 0;
47080 if (encoding === undefined) encoding = 'utf8';
47081 } else {
47082 encoding = length;
47083 length = undefined;
47084 }
47085 // legacy write(string, encoding, offset, length) - remove in v0.13
47086 } else {
47087 throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
47088 }
47089
47090 var remaining = this.length - offset;
47091 if (length === undefined || length > remaining) length = remaining;
47092
47093 if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
47094 throw new RangeError('Attempt to write outside buffer bounds');
47095 }
47096
47097 if (!encoding) encoding = 'utf8';
47098
47099 var loweredCase = false;
47100 for (;;) {
47101 switch (encoding) {
47102 case 'hex':
47103 return hexWrite(this, string, offset, length);
47104
47105 case 'utf8':
47106 case 'utf-8':
47107 return utf8Write(this, string, offset, length);
47108
47109 case 'ascii':
47110 return asciiWrite(this, string, offset, length);
47111
47112 case 'latin1':
47113 case 'binary':
47114 return latin1Write(this, string, offset, length);
47115
47116 case 'base64':
47117 // Warning: maxLength not taken into account in base64Write
47118 return base64Write(this, string, offset, length);
47119
47120 case 'ucs2':
47121 case 'ucs-2':
47122 case 'utf16le':
47123 case 'utf-16le':
47124 return ucs2Write(this, string, offset, length);
47125
47126 default:
47127 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
47128 encoding = ('' + encoding).toLowerCase();
47129 loweredCase = true;
47130 }
47131 }
47132 };
47133
47134 Buffer.prototype.toJSON = function toJSON() {
47135 return {
47136 type: 'Buffer',
47137 data: Array.prototype.slice.call(this._arr || this, 0)
47138 };
47139 };
47140
47141 function base64Slice(buf, start, end) {
47142 if (start === 0 && end === buf.length) {
47143 return base64.fromByteArray(buf);
47144 } else {
47145 return base64.fromByteArray(buf.slice(start, end));
47146 }
47147 }
47148
47149 function utf8Slice(buf, start, end) {
47150 end = Math.min(buf.length, end);
47151 var res = [];
47152
47153 var i = start;
47154 while (i < end) {
47155 var firstByte = buf[i];
47156 var codePoint = null;
47157 var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
47158
47159 if (i + bytesPerSequence <= end) {
47160 var secondByte, thirdByte, fourthByte, tempCodePoint;
47161
47162 switch (bytesPerSequence) {
47163 case 1:
47164 if (firstByte < 0x80) {
47165 codePoint = firstByte;
47166 }
47167 break;
47168 case 2:
47169 secondByte = buf[i + 1];
47170 if ((secondByte & 0xC0) === 0x80) {
47171 tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
47172 if (tempCodePoint > 0x7F) {
47173 codePoint = tempCodePoint;
47174 }
47175 }
47176 break;
47177 case 3:
47178 secondByte = buf[i + 1];
47179 thirdByte = buf[i + 2];
47180 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
47181 tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
47182 if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
47183 codePoint = tempCodePoint;
47184 }
47185 }
47186 break;
47187 case 4:
47188 secondByte = buf[i + 1];
47189 thirdByte = buf[i + 2];
47190 fourthByte = buf[i + 3];
47191 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
47192 tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
47193 if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
47194 codePoint = tempCodePoint;
47195 }
47196 }
47197 }
47198 }
47199
47200 if (codePoint === null) {
47201 // we did not generate a valid codePoint so insert a
47202 // replacement char (U+FFFD) and advance only 1 byte
47203 codePoint = 0xFFFD;
47204 bytesPerSequence = 1;
47205 } else if (codePoint > 0xFFFF) {
47206 // encode to utf16 (surrogate pair dance)
47207 codePoint -= 0x10000;
47208 res.push(codePoint >>> 10 & 0x3FF | 0xD800);
47209 codePoint = 0xDC00 | codePoint & 0x3FF;
47210 }
47211
47212 res.push(codePoint);
47213 i += bytesPerSequence;
47214 }
47215
47216 return decodeCodePointsArray(res);
47217 }
47218
47219 // Based on http://stackoverflow.com/a/22747272/680742, the browser with
47220 // the lowest limit is Chrome, with 0x10000 args.
47221 // We go 1 magnitude less, for safety
47222 var MAX_ARGUMENTS_LENGTH = 0x1000;
47223
47224 function decodeCodePointsArray(codePoints) {
47225 var len = codePoints.length;
47226 if (len <= MAX_ARGUMENTS_LENGTH) {
47227 return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
47228 }
47229
47230 // Decode in chunks to avoid "call stack size exceeded".
47231 var res = '';
47232 var i = 0;
47233 while (i < len) {
47234 res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
47235 }
47236 return res;
47237 }
47238
47239 function asciiSlice(buf, start, end) {
47240 var ret = '';
47241 end = Math.min(buf.length, end);
47242
47243 for (var i = start; i < end; ++i) {
47244 ret += String.fromCharCode(buf[i] & 0x7F);
47245 }
47246 return ret;
47247 }
47248
47249 function latin1Slice(buf, start, end) {
47250 var ret = '';
47251 end = Math.min(buf.length, end);
47252
47253 for (var i = start; i < end; ++i) {
47254 ret += String.fromCharCode(buf[i]);
47255 }
47256 return ret;
47257 }
47258
47259 function hexSlice(buf, start, end) {
47260 var len = buf.length;
47261
47262 if (!start || start < 0) start = 0;
47263 if (!end || end < 0 || end > len) end = len;
47264
47265 var out = '';
47266 for (var i = start; i < end; ++i) {
47267 out += toHex(buf[i]);
47268 }
47269 return out;
47270 }
47271
47272 function utf16leSlice(buf, start, end) {
47273 var bytes = buf.slice(start, end);
47274 var res = '';
47275 for (var i = 0; i < bytes.length; i += 2) {
47276 res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
47277 }
47278 return res;
47279 }
47280
47281 Buffer.prototype.slice = function slice(start, end) {
47282 var len = this.length;
47283 start = ~~start;
47284 end = end === undefined ? len : ~~end;
47285
47286 if (start < 0) {
47287 start += len;
47288 if (start < 0) start = 0;
47289 } else if (start > len) {
47290 start = len;
47291 }
47292
47293 if (end < 0) {
47294 end += len;
47295 if (end < 0) end = 0;
47296 } else if (end > len) {
47297 end = len;
47298 }
47299
47300 if (end < start) end = start;
47301
47302 var newBuf;
47303 if (Buffer.TYPED_ARRAY_SUPPORT) {
47304 newBuf = this.subarray(start, end);
47305 newBuf.__proto__ = Buffer.prototype;
47306 } else {
47307 var sliceLen = end - start;
47308 newBuf = new Buffer(sliceLen, undefined);
47309 for (var i = 0; i < sliceLen; ++i) {
47310 newBuf[i] = this[i + start];
47311 }
47312 }
47313
47314 return newBuf;
47315 };
47316
47317 /*
47318 * Need to make sure that buffer isn't trying to write out of bounds.
47319 */
47320 function checkOffset(offset, ext, length) {
47321 if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
47322 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
47323 }
47324
47325 Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
47326 offset = offset | 0;
47327 byteLength = byteLength | 0;
47328 if (!noAssert) checkOffset(offset, byteLength, this.length);
47329
47330 var val = this[offset];
47331 var mul = 1;
47332 var i = 0;
47333 while (++i < byteLength && (mul *= 0x100)) {
47334 val += this[offset + i] * mul;
47335 }
47336
47337 return val;
47338 };
47339
47340 Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
47341 offset = offset | 0;
47342 byteLength = byteLength | 0;
47343 if (!noAssert) {
47344 checkOffset(offset, byteLength, this.length);
47345 }
47346
47347 var val = this[offset + --byteLength];
47348 var mul = 1;
47349 while (byteLength > 0 && (mul *= 0x100)) {
47350 val += this[offset + --byteLength] * mul;
47351 }
47352
47353 return val;
47354 };
47355
47356 Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
47357 if (!noAssert) checkOffset(offset, 1, this.length);
47358 return this[offset];
47359 };
47360
47361 Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
47362 if (!noAssert) checkOffset(offset, 2, this.length);
47363 return this[offset] | this[offset + 1] << 8;
47364 };
47365
47366 Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
47367 if (!noAssert) checkOffset(offset, 2, this.length);
47368 return this[offset] << 8 | this[offset + 1];
47369 };
47370
47371 Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
47372 if (!noAssert) checkOffset(offset, 4, this.length);
47373
47374 return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
47375 };
47376
47377 Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
47378 if (!noAssert) checkOffset(offset, 4, this.length);
47379
47380 return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
47381 };
47382
47383 Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
47384 offset = offset | 0;
47385 byteLength = byteLength | 0;
47386 if (!noAssert) checkOffset(offset, byteLength, this.length);
47387
47388 var val = this[offset];
47389 var mul = 1;
47390 var i = 0;
47391 while (++i < byteLength && (mul *= 0x100)) {
47392 val += this[offset + i] * mul;
47393 }
47394 mul *= 0x80;
47395
47396 if (val >= mul) val -= Math.pow(2, 8 * byteLength);
47397
47398 return val;
47399 };
47400
47401 Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
47402 offset = offset | 0;
47403 byteLength = byteLength | 0;
47404 if (!noAssert) checkOffset(offset, byteLength, this.length);
47405
47406 var i = byteLength;
47407 var mul = 1;
47408 var val = this[offset + --i];
47409 while (i > 0 && (mul *= 0x100)) {
47410 val += this[offset + --i] * mul;
47411 }
47412 mul *= 0x80;
47413
47414 if (val >= mul) val -= Math.pow(2, 8 * byteLength);
47415
47416 return val;
47417 };
47418
47419 Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
47420 if (!noAssert) checkOffset(offset, 1, this.length);
47421 if (!(this[offset] & 0x80)) return this[offset];
47422 return (0xff - this[offset] + 1) * -1;
47423 };
47424
47425 Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
47426 if (!noAssert) checkOffset(offset, 2, this.length);
47427 var val = this[offset] | this[offset + 1] << 8;
47428 return val & 0x8000 ? val | 0xFFFF0000 : val;
47429 };
47430
47431 Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
47432 if (!noAssert) checkOffset(offset, 2, this.length);
47433 var val = this[offset + 1] | this[offset] << 8;
47434 return val & 0x8000 ? val | 0xFFFF0000 : val;
47435 };
47436
47437 Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
47438 if (!noAssert) checkOffset(offset, 4, this.length);
47439
47440 return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
47441 };
47442
47443 Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
47444 if (!noAssert) checkOffset(offset, 4, this.length);
47445
47446 return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
47447 };
47448
47449 Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
47450 if (!noAssert) checkOffset(offset, 4, this.length);
47451 return ieee754.read(this, offset, true, 23, 4);
47452 };
47453
47454 Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
47455 if (!noAssert) checkOffset(offset, 4, this.length);
47456 return ieee754.read(this, offset, false, 23, 4);
47457 };
47458
47459 Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
47460 if (!noAssert) checkOffset(offset, 8, this.length);
47461 return ieee754.read(this, offset, true, 52, 8);
47462 };
47463
47464 Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
47465 if (!noAssert) checkOffset(offset, 8, this.length);
47466 return ieee754.read(this, offset, false, 52, 8);
47467 };
47468
47469 function checkInt(buf, value, offset, ext, max, min) {
47470 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
47471 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
47472 if (offset + ext > buf.length) throw new RangeError('Index out of range');
47473 }
47474
47475 Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
47476 value = +value;
47477 offset = offset | 0;
47478 byteLength = byteLength | 0;
47479 if (!noAssert) {
47480 var maxBytes = Math.pow(2, 8 * byteLength) - 1;
47481 checkInt(this, value, offset, byteLength, maxBytes, 0);
47482 }
47483
47484 var mul = 1;
47485 var i = 0;
47486 this[offset] = value & 0xFF;
47487 while (++i < byteLength && (mul *= 0x100)) {
47488 this[offset + i] = value / mul & 0xFF;
47489 }
47490
47491 return offset + byteLength;
47492 };
47493
47494 Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
47495 value = +value;
47496 offset = offset | 0;
47497 byteLength = byteLength | 0;
47498 if (!noAssert) {
47499 var maxBytes = Math.pow(2, 8 * byteLength) - 1;
47500 checkInt(this, value, offset, byteLength, maxBytes, 0);
47501 }
47502
47503 var i = byteLength - 1;
47504 var mul = 1;
47505 this[offset + i] = value & 0xFF;
47506 while (--i >= 0 && (mul *= 0x100)) {
47507 this[offset + i] = value / mul & 0xFF;
47508 }
47509
47510 return offset + byteLength;
47511 };
47512
47513 Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
47514 value = +value;
47515 offset = offset | 0;
47516 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
47517 if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
47518 this[offset] = value & 0xff;
47519 return offset + 1;
47520 };
47521
47522 function objectWriteUInt16(buf, value, offset, littleEndian) {
47523 if (value < 0) value = 0xffff + value + 1;
47524 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
47525 buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
47526 }
47527 }
47528
47529 Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
47530 value = +value;
47531 offset = offset | 0;
47532 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
47533 if (Buffer.TYPED_ARRAY_SUPPORT) {
47534 this[offset] = value & 0xff;
47535 this[offset + 1] = value >>> 8;
47536 } else {
47537 objectWriteUInt16(this, value, offset, true);
47538 }
47539 return offset + 2;
47540 };
47541
47542 Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
47543 value = +value;
47544 offset = offset | 0;
47545 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
47546 if (Buffer.TYPED_ARRAY_SUPPORT) {
47547 this[offset] = value >>> 8;
47548 this[offset + 1] = value & 0xff;
47549 } else {
47550 objectWriteUInt16(this, value, offset, false);
47551 }
47552 return offset + 2;
47553 };
47554
47555 function objectWriteUInt32(buf, value, offset, littleEndian) {
47556 if (value < 0) value = 0xffffffff + value + 1;
47557 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
47558 buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
47559 }
47560 }
47561
47562 Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
47563 value = +value;
47564 offset = offset | 0;
47565 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
47566 if (Buffer.TYPED_ARRAY_SUPPORT) {
47567 this[offset + 3] = value >>> 24;
47568 this[offset + 2] = value >>> 16;
47569 this[offset + 1] = value >>> 8;
47570 this[offset] = value & 0xff;
47571 } else {
47572 objectWriteUInt32(this, value, offset, true);
47573 }
47574 return offset + 4;
47575 };
47576
47577 Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
47578 value = +value;
47579 offset = offset | 0;
47580 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
47581 if (Buffer.TYPED_ARRAY_SUPPORT) {
47582 this[offset] = value >>> 24;
47583 this[offset + 1] = value >>> 16;
47584 this[offset + 2] = value >>> 8;
47585 this[offset + 3] = value & 0xff;
47586 } else {
47587 objectWriteUInt32(this, value, offset, false);
47588 }
47589 return offset + 4;
47590 };
47591
47592 Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
47593 value = +value;
47594 offset = offset | 0;
47595 if (!noAssert) {
47596 var limit = Math.pow(2, 8 * byteLength - 1);
47597
47598 checkInt(this, value, offset, byteLength, limit - 1, -limit);
47599 }
47600
47601 var i = 0;
47602 var mul = 1;
47603 var sub = 0;
47604 this[offset] = value & 0xFF;
47605 while (++i < byteLength && (mul *= 0x100)) {
47606 if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
47607 sub = 1;
47608 }
47609 this[offset + i] = (value / mul >> 0) - sub & 0xFF;
47610 }
47611
47612 return offset + byteLength;
47613 };
47614
47615 Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
47616 value = +value;
47617 offset = offset | 0;
47618 if (!noAssert) {
47619 var limit = Math.pow(2, 8 * byteLength - 1);
47620
47621 checkInt(this, value, offset, byteLength, limit - 1, -limit);
47622 }
47623
47624 var i = byteLength - 1;
47625 var mul = 1;
47626 var sub = 0;
47627 this[offset + i] = value & 0xFF;
47628 while (--i >= 0 && (mul *= 0x100)) {
47629 if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
47630 sub = 1;
47631 }
47632 this[offset + i] = (value / mul >> 0) - sub & 0xFF;
47633 }
47634
47635 return offset + byteLength;
47636 };
47637
47638 Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
47639 value = +value;
47640 offset = offset | 0;
47641 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
47642 if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
47643 if (value < 0) value = 0xff + value + 1;
47644 this[offset] = value & 0xff;
47645 return offset + 1;
47646 };
47647
47648 Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
47649 value = +value;
47650 offset = offset | 0;
47651 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
47652 if (Buffer.TYPED_ARRAY_SUPPORT) {
47653 this[offset] = value & 0xff;
47654 this[offset + 1] = value >>> 8;
47655 } else {
47656 objectWriteUInt16(this, value, offset, true);
47657 }
47658 return offset + 2;
47659 };
47660
47661 Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
47662 value = +value;
47663 offset = offset | 0;
47664 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
47665 if (Buffer.TYPED_ARRAY_SUPPORT) {
47666 this[offset] = value >>> 8;
47667 this[offset + 1] = value & 0xff;
47668 } else {
47669 objectWriteUInt16(this, value, offset, false);
47670 }
47671 return offset + 2;
47672 };
47673
47674 Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
47675 value = +value;
47676 offset = offset | 0;
47677 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
47678 if (Buffer.TYPED_ARRAY_SUPPORT) {
47679 this[offset] = value & 0xff;
47680 this[offset + 1] = value >>> 8;
47681 this[offset + 2] = value >>> 16;
47682 this[offset + 3] = value >>> 24;
47683 } else {
47684 objectWriteUInt32(this, value, offset, true);
47685 }
47686 return offset + 4;
47687 };
47688
47689 Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
47690 value = +value;
47691 offset = offset | 0;
47692 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
47693 if (value < 0) value = 0xffffffff + value + 1;
47694 if (Buffer.TYPED_ARRAY_SUPPORT) {
47695 this[offset] = value >>> 24;
47696 this[offset + 1] = value >>> 16;
47697 this[offset + 2] = value >>> 8;
47698 this[offset + 3] = value & 0xff;
47699 } else {
47700 objectWriteUInt32(this, value, offset, false);
47701 }
47702 return offset + 4;
47703 };
47704
47705 function checkIEEE754(buf, value, offset, ext, max, min) {
47706 if (offset + ext > buf.length) throw new RangeError('Index out of range');
47707 if (offset < 0) throw new RangeError('Index out of range');
47708 }
47709
47710 function writeFloat(buf, value, offset, littleEndian, noAssert) {
47711 if (!noAssert) {
47712 checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
47713 }
47714 ieee754.write(buf, value, offset, littleEndian, 23, 4);
47715 return offset + 4;
47716 }
47717
47718 Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
47719 return writeFloat(this, value, offset, true, noAssert);
47720 };
47721
47722 Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
47723 return writeFloat(this, value, offset, false, noAssert);
47724 };
47725
47726 function writeDouble(buf, value, offset, littleEndian, noAssert) {
47727 if (!noAssert) {
47728 checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
47729 }
47730 ieee754.write(buf, value, offset, littleEndian, 52, 8);
47731 return offset + 8;
47732 }
47733
47734 Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
47735 return writeDouble(this, value, offset, true, noAssert);
47736 };
47737
47738 Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
47739 return writeDouble(this, value, offset, false, noAssert);
47740 };
47741
47742 // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
47743 Buffer.prototype.copy = function copy(target, targetStart, start, end) {
47744 if (!start) start = 0;
47745 if (!end && end !== 0) end = this.length;
47746 if (targetStart >= target.length) targetStart = target.length;
47747 if (!targetStart) targetStart = 0;
47748 if (end > 0 && end < start) end = start;
47749
47750 // Copy 0 bytes; we're done
47751 if (end === start) return 0;
47752 if (target.length === 0 || this.length === 0) return 0;
47753
47754 // Fatal error conditions
47755 if (targetStart < 0) {
47756 throw new RangeError('targetStart out of bounds');
47757 }
47758 if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
47759 if (end < 0) throw new RangeError('sourceEnd out of bounds');
47760
47761 // Are we oob?
47762 if (end > this.length) end = this.length;
47763 if (target.length - targetStart < end - start) {
47764 end = target.length - targetStart + start;
47765 }
47766
47767 var len = end - start;
47768 var i;
47769
47770 if (this === target && start < targetStart && targetStart < end) {
47771 // descending copy from end
47772 for (i = len - 1; i >= 0; --i) {
47773 target[i + targetStart] = this[i + start];
47774 }
47775 } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
47776 // ascending copy from start
47777 for (i = 0; i < len; ++i) {
47778 target[i + targetStart] = this[i + start];
47779 }
47780 } else {
47781 Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
47782 }
47783
47784 return len;
47785 };
47786
47787 // Usage:
47788 // buffer.fill(number[, offset[, end]])
47789 // buffer.fill(buffer[, offset[, end]])
47790 // buffer.fill(string[, offset[, end]][, encoding])
47791 Buffer.prototype.fill = function fill(val, start, end, encoding) {
47792 // Handle string cases:
47793 if (typeof val === 'string') {
47794 if (typeof start === 'string') {
47795 encoding = start;
47796 start = 0;
47797 end = this.length;
47798 } else if (typeof end === 'string') {
47799 encoding = end;
47800 end = this.length;
47801 }
47802 if (val.length === 1) {
47803 var code = val.charCodeAt(0);
47804 if (code < 256) {
47805 val = code;
47806 }
47807 }
47808 if (encoding !== undefined && typeof encoding !== 'string') {
47809 throw new TypeError('encoding must be a string');
47810 }
47811 if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
47812 throw new TypeError('Unknown encoding: ' + encoding);
47813 }
47814 } else if (typeof val === 'number') {
47815 val = val & 255;
47816 }
47817
47818 // Invalid ranges are not set to a default, so can range check early.
47819 if (start < 0 || this.length < start || this.length < end) {
47820 throw new RangeError('Out of range index');
47821 }
47822
47823 if (end <= start) {
47824 return this;
47825 }
47826
47827 start = start >>> 0;
47828 end = end === undefined ? this.length : end >>> 0;
47829
47830 if (!val) val = 0;
47831
47832 var i;
47833 if (typeof val === 'number') {
47834 for (i = start; i < end; ++i) {
47835 this[i] = val;
47836 }
47837 } else {
47838 var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
47839 var len = bytes.length;
47840 for (i = 0; i < end - start; ++i) {
47841 this[i + start] = bytes[i % len];
47842 }
47843 }
47844
47845 return this;
47846 };
47847
47848 // HELPER FUNCTIONS
47849 // ================
47850
47851 var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
47852
47853 function base64clean(str) {
47854 // Node strips out invalid characters like \n and \t from the string, base64-js does not
47855 str = stringtrim(str).replace(INVALID_BASE64_RE, '');
47856 // Node converts strings with length < 2 to ''
47857 if (str.length < 2) return '';
47858 // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
47859 while (str.length % 4 !== 0) {
47860 str = str + '=';
47861 }
47862 return str;
47863 }
47864
47865 function stringtrim(str) {
47866 if (str.trim) return str.trim();
47867 return str.replace(/^\s+|\s+$/g, '');
47868 }
47869
47870 function toHex(n) {
47871 if (n < 16) return '0' + n.toString(16);
47872 return n.toString(16);
47873 }
47874
47875 function utf8ToBytes(string, units) {
47876 units = units || Infinity;
47877 var codePoint;
47878 var length = string.length;
47879 var leadSurrogate = null;
47880 var bytes = [];
47881
47882 for (var i = 0; i < length; ++i) {
47883 codePoint = string.charCodeAt(i);
47884
47885 // is surrogate component
47886 if (codePoint > 0xD7FF && codePoint < 0xE000) {
47887 // last char was a lead
47888 if (!leadSurrogate) {
47889 // no lead yet
47890 if (codePoint > 0xDBFF) {
47891 // unexpected trail
47892 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
47893 continue;
47894 } else if (i + 1 === length) {
47895 // unpaired lead
47896 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
47897 continue;
47898 }
47899
47900 // valid lead
47901 leadSurrogate = codePoint;
47902
47903 continue;
47904 }
47905
47906 // 2 leads in a row
47907 if (codePoint < 0xDC00) {
47908 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
47909 leadSurrogate = codePoint;
47910 continue;
47911 }
47912
47913 // valid surrogate pair
47914 codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
47915 } else if (leadSurrogate) {
47916 // valid bmp char, but last char was a lead
47917 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
47918 }
47919
47920 leadSurrogate = null;
47921
47922 // encode utf8
47923 if (codePoint < 0x80) {
47924 if ((units -= 1) < 0) break;
47925 bytes.push(codePoint);
47926 } else if (codePoint < 0x800) {
47927 if ((units -= 2) < 0) break;
47928 bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
47929 } else if (codePoint < 0x10000) {
47930 if ((units -= 3) < 0) break;
47931 bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
47932 } else if (codePoint < 0x110000) {
47933 if ((units -= 4) < 0) break;
47934 bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
47935 } else {
47936 throw new Error('Invalid code point');
47937 }
47938 }
47939
47940 return bytes;
47941 }
47942
47943 function asciiToBytes(str) {
47944 var byteArray = [];
47945 for (var i = 0; i < str.length; ++i) {
47946 // Node's code seems to be doing this and not & 0x7F..
47947 byteArray.push(str.charCodeAt(i) & 0xFF);
47948 }
47949 return byteArray;
47950 }
47951
47952 function utf16leToBytes(str, units) {
47953 var c, hi, lo;
47954 var byteArray = [];
47955 for (var i = 0; i < str.length; ++i) {
47956 if ((units -= 2) < 0) break;
47957
47958 c = str.charCodeAt(i);
47959 hi = c >> 8;
47960 lo = c % 256;
47961 byteArray.push(lo);
47962 byteArray.push(hi);
47963 }
47964
47965 return byteArray;
47966 }
47967
47968 function base64ToBytes(str) {
47969 return base64.toByteArray(base64clean(str));
47970 }
47971
47972 function blitBuffer(src, dst, offset, length) {
47973 for (var i = 0; i < length; ++i) {
47974 if (i + offset >= dst.length || i >= src.length) break;
47975 dst[i + offset] = src[i];
47976 }
47977 return i;
47978 }
47979
47980 function isnan(val) {
47981 return val !== val; // eslint-disable-line no-self-compare
47982 }
47983 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
47984
47985/***/ }),
47986/* 400 */
47987/***/ (function(module, exports) {
47988
47989 'use strict';
47990
47991 var toString = {}.toString;
47992
47993 module.exports = Array.isArray || function (arr) {
47994 return toString.call(arr) == '[object Array]';
47995 };
47996
47997/***/ }),
47998/* 401 */
47999/***/ (function(module, exports, __webpack_require__) {
48000
48001 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
48002
48003 var escapeStringRegexp = __webpack_require__(460);
48004 var ansiStyles = __webpack_require__(289);
48005 var stripAnsi = __webpack_require__(622);
48006 var hasAnsi = __webpack_require__(464);
48007 var supportsColor = __webpack_require__(623);
48008 var defineProps = Object.defineProperties;
48009 var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);
48010
48011 function Chalk(options) {
48012 // detect mode if not set manually
48013 this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
48014 }
48015
48016 // use bright blue on Windows as the normal blue color is illegible
48017 if (isSimpleWindowsTerm) {
48018 ansiStyles.blue.open = '\x1B[94m';
48019 }
48020
48021 var styles = function () {
48022 var ret = {};
48023
48024 Object.keys(ansiStyles).forEach(function (key) {
48025 ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
48026
48027 ret[key] = {
48028 get: function get() {
48029 return build.call(this, this._styles.concat(key));
48030 }
48031 };
48032 });
48033
48034 return ret;
48035 }();
48036
48037 var proto = defineProps(function chalk() {}, styles);
48038
48039 function build(_styles) {
48040 var builder = function builder() {
48041 return applyStyle.apply(builder, arguments);
48042 };
48043
48044 builder._styles = _styles;
48045 builder.enabled = this.enabled;
48046 // __proto__ is used because we must return a function, but there is
48047 // no way to create a function with a different prototype.
48048 /* eslint-disable no-proto */
48049 builder.__proto__ = proto;
48050
48051 return builder;
48052 }
48053
48054 function applyStyle() {
48055 // support varags, but simply cast to string in case there's only one arg
48056 var args = arguments;
48057 var argsLen = args.length;
48058 var str = argsLen !== 0 && String(arguments[0]);
48059
48060 if (argsLen > 1) {
48061 // don't slice `arguments`, it prevents v8 optimizations
48062 for (var a = 1; a < argsLen; a++) {
48063 str += ' ' + args[a];
48064 }
48065 }
48066
48067 if (!this.enabled || !str) {
48068 return str;
48069 }
48070
48071 var nestedStyles = this._styles;
48072 var i = nestedStyles.length;
48073
48074 // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
48075 // see https://github.com/chalk/chalk/issues/58
48076 // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
48077 var originalDim = ansiStyles.dim.open;
48078 if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
48079 ansiStyles.dim.open = '';
48080 }
48081
48082 while (i--) {
48083 var code = ansiStyles[nestedStyles[i]];
48084
48085 // Replace any instances already present with a re-opening code
48086 // otherwise only the part of the string until said closing code
48087 // will be colored, and the rest will simply be 'plain'.
48088 str = code.open + str.replace(code.closeRe, code.open) + code.close;
48089 }
48090
48091 // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
48092 ansiStyles.dim.open = originalDim;
48093
48094 return str;
48095 }
48096
48097 function init() {
48098 var ret = {};
48099
48100 Object.keys(styles).forEach(function (name) {
48101 ret[name] = {
48102 get: function get() {
48103 return build.call(this, [name]);
48104 }
48105 };
48106 });
48107
48108 return ret;
48109 }
48110
48111 defineProps(Chalk.prototype, init());
48112
48113 module.exports = new Chalk();
48114 module.exports.styles = ansiStyles;
48115 module.exports.hasColor = hasAnsi;
48116 module.exports.stripColor = stripAnsi;
48117 module.exports.supportsColor = supportsColor;
48118 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
48119
48120/***/ }),
48121/* 402 */
48122/***/ (function(module, exports) {
48123
48124 'use strict';
48125
48126 module.exports = function (xs, fn) {
48127 var res = [];
48128 for (var i = 0; i < xs.length; i++) {
48129 var x = fn(xs[i], i);
48130 if (isArray(x)) res.push.apply(res, x);else res.push(x);
48131 }
48132 return res;
48133 };
48134
48135 var isArray = Array.isArray || function (xs) {
48136 return Object.prototype.toString.call(xs) === '[object Array]';
48137 };
48138
48139/***/ }),
48140/* 403 */
48141/***/ (function(module, exports, __webpack_require__) {
48142
48143 /* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';
48144
48145 var fs = __webpack_require__(115);
48146 var path = __webpack_require__(19);
48147
48148 Object.defineProperty(exports, 'commentRegex', {
48149 get: function getCommentRegex() {
48150 return (/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg
48151 );
48152 }
48153 });
48154
48155 Object.defineProperty(exports, 'mapFileCommentRegex', {
48156 get: function getMapFileCommentRegex() {
48157 //Example (Extra space between slashes added to solve Safari bug. Exclude space in production):
48158 // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */
48159 return (/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg
48160 );
48161 }
48162 });
48163
48164 function decodeBase64(base64) {
48165 return new Buffer(base64, 'base64').toString();
48166 }
48167
48168 function stripComment(sm) {
48169 return sm.split(',').pop();
48170 }
48171
48172 function readFromFileMap(sm, dir) {
48173 // NOTE: this will only work on the server since it attempts to read the map file
48174
48175 var r = exports.mapFileCommentRegex.exec(sm);
48176
48177 // for some odd reason //# .. captures in 1 and /* .. */ in 2
48178 var filename = r[1] || r[2];
48179 var filepath = path.resolve(dir, filename);
48180
48181 try {
48182 return fs.readFileSync(filepath, 'utf8');
48183 } catch (e) {
48184 throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
48185 }
48186 }
48187
48188 function Converter(sm, opts) {
48189 opts = opts || {};
48190
48191 if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
48192 if (opts.hasComment) sm = stripComment(sm);
48193 if (opts.isEncoded) sm = decodeBase64(sm);
48194 if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
48195
48196 this.sourcemap = sm;
48197 }
48198
48199 Converter.prototype.toJSON = function (space) {
48200 return JSON.stringify(this.sourcemap, null, space);
48201 };
48202
48203 Converter.prototype.toBase64 = function () {
48204 var json = this.toJSON();
48205 return new Buffer(json).toString('base64');
48206 };
48207
48208 Converter.prototype.toComment = function (options) {
48209 var base64 = this.toBase64();
48210 var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
48211 return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
48212 };
48213
48214 // returns copy instead of original
48215 Converter.prototype.toObject = function () {
48216 return JSON.parse(this.toJSON());
48217 };
48218
48219 Converter.prototype.addProperty = function (key, value) {
48220 if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead');
48221 return this.setProperty(key, value);
48222 };
48223
48224 Converter.prototype.setProperty = function (key, value) {
48225 this.sourcemap[key] = value;
48226 return this;
48227 };
48228
48229 Converter.prototype.getProperty = function (key) {
48230 return this.sourcemap[key];
48231 };
48232
48233 exports.fromObject = function (obj) {
48234 return new Converter(obj);
48235 };
48236
48237 exports.fromJSON = function (json) {
48238 return new Converter(json, { isJSON: true });
48239 };
48240
48241 exports.fromBase64 = function (base64) {
48242 return new Converter(base64, { isEncoded: true });
48243 };
48244
48245 exports.fromComment = function (comment) {
48246 comment = comment.replace(/^\/\*/g, '//').replace(/\*\/$/g, '');
48247
48248 return new Converter(comment, { isEncoded: true, hasComment: true });
48249 };
48250
48251 exports.fromMapFileComment = function (comment, dir) {
48252 return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true });
48253 };
48254
48255 // Finds last sourcemap comment in file or returns null if none was found
48256 exports.fromSource = function (content) {
48257 var m = content.match(exports.commentRegex);
48258 return m ? exports.fromComment(m.pop()) : null;
48259 };
48260
48261 // Finds last sourcemap comment in file or returns null if none was found
48262 exports.fromMapFileSource = function (content, dir) {
48263 var m = content.match(exports.mapFileCommentRegex);
48264 return m ? exports.fromMapFileComment(m.pop(), dir) : null;
48265 };
48266
48267 exports.removeComments = function (src) {
48268 return src.replace(exports.commentRegex, '');
48269 };
48270
48271 exports.removeMapFileComments = function (src) {
48272 return src.replace(exports.mapFileCommentRegex, '');
48273 };
48274
48275 exports.generateMapFileComment = function (file, options) {
48276 var data = 'sourceMappingURL=' + file;
48277 return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
48278 };
48279 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(399).Buffer))
48280
48281/***/ }),
48282/* 404 */
48283/***/ (function(module, exports, __webpack_require__) {
48284
48285 'use strict';
48286
48287 __webpack_require__(59);
48288 __webpack_require__(157);
48289 module.exports = __webpack_require__(439);
48290
48291/***/ }),
48292/* 405 */
48293/***/ (function(module, exports, __webpack_require__) {
48294
48295 'use strict';
48296
48297 var core = __webpack_require__(5);
48298 var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });
48299 module.exports = function stringify(it) {
48300 // eslint-disable-line no-unused-vars
48301 return $JSON.stringify.apply($JSON, arguments);
48302 };
48303
48304/***/ }),
48305/* 406 */
48306/***/ (function(module, exports, __webpack_require__) {
48307
48308 'use strict';
48309
48310 __webpack_require__(96);
48311 __webpack_require__(157);
48312 __webpack_require__(59);
48313 __webpack_require__(441);
48314 __webpack_require__(451);
48315 __webpack_require__(450);
48316 __webpack_require__(449);
48317 module.exports = __webpack_require__(5).Map;
48318
48319/***/ }),
48320/* 407 */
48321/***/ (function(module, exports, __webpack_require__) {
48322
48323 'use strict';
48324
48325 __webpack_require__(442);
48326 module.exports = 0x1fffffffffffff;
48327
48328/***/ }),
48329/* 408 */
48330/***/ (function(module, exports, __webpack_require__) {
48331
48332 'use strict';
48333
48334 __webpack_require__(443);
48335 module.exports = __webpack_require__(5).Object.assign;
48336
48337/***/ }),
48338/* 409 */
48339/***/ (function(module, exports, __webpack_require__) {
48340
48341 'use strict';
48342
48343 __webpack_require__(444);
48344 var $Object = __webpack_require__(5).Object;
48345 module.exports = function create(P, D) {
48346 return $Object.create(P, D);
48347 };
48348
48349/***/ }),
48350/* 410 */
48351/***/ (function(module, exports, __webpack_require__) {
48352
48353 'use strict';
48354
48355 __webpack_require__(158);
48356 module.exports = __webpack_require__(5).Object.getOwnPropertySymbols;
48357
48358/***/ }),
48359/* 411 */
48360/***/ (function(module, exports, __webpack_require__) {
48361
48362 'use strict';
48363
48364 __webpack_require__(445);
48365 module.exports = __webpack_require__(5).Object.keys;
48366
48367/***/ }),
48368/* 412 */
48369/***/ (function(module, exports, __webpack_require__) {
48370
48371 'use strict';
48372
48373 __webpack_require__(446);
48374 module.exports = __webpack_require__(5).Object.setPrototypeOf;
48375
48376/***/ }),
48377/* 413 */
48378/***/ (function(module, exports, __webpack_require__) {
48379
48380 'use strict';
48381
48382 __webpack_require__(158);
48383 module.exports = __webpack_require__(5).Symbol['for'];
48384
48385/***/ }),
48386/* 414 */
48387/***/ (function(module, exports, __webpack_require__) {
48388
48389 'use strict';
48390
48391 __webpack_require__(158);
48392 __webpack_require__(96);
48393 __webpack_require__(452);
48394 __webpack_require__(453);
48395 module.exports = __webpack_require__(5).Symbol;
48396
48397/***/ }),
48398/* 415 */
48399/***/ (function(module, exports, __webpack_require__) {
48400
48401 'use strict';
48402
48403 __webpack_require__(157);
48404 __webpack_require__(59);
48405 module.exports = __webpack_require__(156).f('iterator');
48406
48407/***/ }),
48408/* 416 */
48409/***/ (function(module, exports, __webpack_require__) {
48410
48411 'use strict';
48412
48413 __webpack_require__(96);
48414 __webpack_require__(59);
48415 __webpack_require__(447);
48416 __webpack_require__(455);
48417 __webpack_require__(454);
48418 module.exports = __webpack_require__(5).WeakMap;
48419
48420/***/ }),
48421/* 417 */
48422/***/ (function(module, exports, __webpack_require__) {
48423
48424 'use strict';
48425
48426 __webpack_require__(96);
48427 __webpack_require__(59);
48428 __webpack_require__(448);
48429 __webpack_require__(457);
48430 __webpack_require__(456);
48431 module.exports = __webpack_require__(5).WeakSet;
48432
48433/***/ }),
48434/* 418 */
48435/***/ (function(module, exports) {
48436
48437 "use strict";
48438
48439 module.exports = function () {/* empty */};
48440
48441/***/ }),
48442/* 419 */
48443/***/ (function(module, exports, __webpack_require__) {
48444
48445 'use strict';
48446
48447 var forOf = __webpack_require__(55);
48448
48449 module.exports = function (iter, ITERATOR) {
48450 var result = [];
48451 forOf(iter, false, result.push, result, ITERATOR);
48452 return result;
48453 };
48454
48455/***/ }),
48456/* 420 */
48457/***/ (function(module, exports, __webpack_require__) {
48458
48459 'use strict';
48460
48461 // false -> Array#indexOf
48462 // true -> Array#includes
48463 var toIObject = __webpack_require__(37);
48464 var toLength = __webpack_require__(153);
48465 var toAbsoluteIndex = __webpack_require__(438);
48466 module.exports = function (IS_INCLUDES) {
48467 return function ($this, el, fromIndex) {
48468 var O = toIObject($this);
48469 var length = toLength(O.length);
48470 var index = toAbsoluteIndex(fromIndex, length);
48471 var value;
48472 // Array#includes uses SameValueZero equality algorithm
48473 // eslint-disable-next-line no-self-compare
48474 if (IS_INCLUDES && el != el) while (length > index) {
48475 value = O[index++];
48476 // eslint-disable-next-line no-self-compare
48477 if (value != value) return true;
48478 // Array#indexOf ignores holes, Array#includes - not
48479 } else for (; length > index; index++) {
48480 if (IS_INCLUDES || index in O) {
48481 if (O[index] === el) return IS_INCLUDES || index || 0;
48482 }
48483 }return !IS_INCLUDES && -1;
48484 };
48485 };
48486
48487/***/ }),
48488/* 421 */
48489/***/ (function(module, exports, __webpack_require__) {
48490
48491 'use strict';
48492
48493 var isObject = __webpack_require__(16);
48494 var isArray = __webpack_require__(232);
48495 var SPECIES = __webpack_require__(13)('species');
48496
48497 module.exports = function (original) {
48498 var C;
48499 if (isArray(original)) {
48500 C = original.constructor;
48501 // cross-realm fallback
48502 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
48503 if (isObject(C)) {
48504 C = C[SPECIES];
48505 if (C === null) C = undefined;
48506 }
48507 }return C === undefined ? Array : C;
48508 };
48509
48510/***/ }),
48511/* 422 */
48512/***/ (function(module, exports, __webpack_require__) {
48513
48514 'use strict';
48515
48516 // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
48517 var speciesConstructor = __webpack_require__(421);
48518
48519 module.exports = function (original, length) {
48520 return new (speciesConstructor(original))(length);
48521 };
48522
48523/***/ }),
48524/* 423 */
48525/***/ (function(module, exports, __webpack_require__) {
48526
48527 'use strict';
48528
48529 var dP = __webpack_require__(23).f;
48530 var create = __webpack_require__(90);
48531 var redefineAll = __webpack_require__(146);
48532 var ctx = __webpack_require__(43);
48533 var anInstance = __webpack_require__(136);
48534 var forOf = __webpack_require__(55);
48535 var $iterDefine = __webpack_require__(143);
48536 var step = __webpack_require__(233);
48537 var setSpecies = __webpack_require__(436);
48538 var DESCRIPTORS = __webpack_require__(22);
48539 var fastKey = __webpack_require__(57).fastKey;
48540 var validate = __webpack_require__(58);
48541 var SIZE = DESCRIPTORS ? '_s' : 'size';
48542
48543 var getEntry = function getEntry(that, key) {
48544 // fast case
48545 var index = fastKey(key);
48546 var entry;
48547 if (index !== 'F') return that._i[index];
48548 // frozen object case
48549 for (entry = that._f; entry; entry = entry.n) {
48550 if (entry.k == key) return entry;
48551 }
48552 };
48553
48554 module.exports = {
48555 getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) {
48556 var C = wrapper(function (that, iterable) {
48557 anInstance(that, C, NAME, '_i');
48558 that._t = NAME; // collection type
48559 that._i = create(null); // index
48560 that._f = undefined; // first entry
48561 that._l = undefined; // last entry
48562 that[SIZE] = 0; // size
48563 if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
48564 });
48565 redefineAll(C.prototype, {
48566 // 23.1.3.1 Map.prototype.clear()
48567 // 23.2.3.2 Set.prototype.clear()
48568 clear: function clear() {
48569 for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
48570 entry.r = true;
48571 if (entry.p) entry.p = entry.p.n = undefined;
48572 delete data[entry.i];
48573 }
48574 that._f = that._l = undefined;
48575 that[SIZE] = 0;
48576 },
48577 // 23.1.3.3 Map.prototype.delete(key)
48578 // 23.2.3.4 Set.prototype.delete(value)
48579 'delete': function _delete(key) {
48580 var that = validate(this, NAME);
48581 var entry = getEntry(that, key);
48582 if (entry) {
48583 var next = entry.n;
48584 var prev = entry.p;
48585 delete that._i[entry.i];
48586 entry.r = true;
48587 if (prev) prev.n = next;
48588 if (next) next.p = prev;
48589 if (that._f == entry) that._f = next;
48590 if (that._l == entry) that._l = prev;
48591 that[SIZE]--;
48592 }return !!entry;
48593 },
48594 // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
48595 // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
48596 forEach: function forEach(callbackfn /* , that = undefined */) {
48597 validate(this, NAME);
48598 var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
48599 var entry;
48600 while (entry = entry ? entry.n : this._f) {
48601 f(entry.v, entry.k, this);
48602 // revert to the last existing entry
48603 while (entry && entry.r) {
48604 entry = entry.p;
48605 }
48606 }
48607 },
48608 // 23.1.3.7 Map.prototype.has(key)
48609 // 23.2.3.7 Set.prototype.has(value)
48610 has: function has(key) {
48611 return !!getEntry(validate(this, NAME), key);
48612 }
48613 });
48614 if (DESCRIPTORS) dP(C.prototype, 'size', {
48615 get: function get() {
48616 return validate(this, NAME)[SIZE];
48617 }
48618 });
48619 return C;
48620 },
48621 def: function def(that, key, value) {
48622 var entry = getEntry(that, key);
48623 var prev, index;
48624 // change existing entry
48625 if (entry) {
48626 entry.v = value;
48627 // create new entry
48628 } else {
48629 that._l = entry = {
48630 i: index = fastKey(key, true), // <- index
48631 k: key, // <- key
48632 v: value, // <- value
48633 p: prev = that._l, // <- previous entry
48634 n: undefined, // <- next entry
48635 r: false // <- removed
48636 };
48637 if (!that._f) that._f = entry;
48638 if (prev) prev.n = entry;
48639 that[SIZE]++;
48640 // add to index
48641 if (index !== 'F') that._i[index] = entry;
48642 }return that;
48643 },
48644 getEntry: getEntry,
48645 setStrong: function setStrong(C, NAME, IS_MAP) {
48646 // add .keys, .values, .entries, [@@iterator]
48647 // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
48648 $iterDefine(C, NAME, function (iterated, kind) {
48649 this._t = validate(iterated, NAME); // target
48650 this._k = kind; // kind
48651 this._l = undefined; // previous
48652 }, function () {
48653 var that = this;
48654 var kind = that._k;
48655 var entry = that._l;
48656 // revert to the last existing entry
48657 while (entry && entry.r) {
48658 entry = entry.p;
48659 } // get next entry
48660 if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
48661 // or finish the iteration
48662 that._t = undefined;
48663 return step(1);
48664 }
48665 // return step by kind
48666 if (kind == 'keys') return step(0, entry.k);
48667 if (kind == 'values') return step(0, entry.v);
48668 return step(0, [entry.k, entry.v]);
48669 }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
48670
48671 // add [@@species], 23.1.2.2, 23.2.2.2
48672 setSpecies(NAME);
48673 }
48674 };
48675
48676/***/ }),
48677/* 424 */
48678/***/ (function(module, exports, __webpack_require__) {
48679
48680 'use strict';
48681
48682 // https://github.com/DavidBruant/Map-Set.prototype.toJSON
48683 var classof = __webpack_require__(228);
48684 var from = __webpack_require__(419);
48685 module.exports = function (NAME) {
48686 return function toJSON() {
48687 if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
48688 return from(this);
48689 };
48690 };
48691
48692/***/ }),
48693/* 425 */
48694/***/ (function(module, exports, __webpack_require__) {
48695
48696 'use strict';
48697
48698 // all enumerable object keys, includes symbols
48699 var getKeys = __webpack_require__(44);
48700 var gOPS = __webpack_require__(145);
48701 var pIE = __webpack_require__(91);
48702 module.exports = function (it) {
48703 var result = getKeys(it);
48704 var getSymbols = gOPS.f;
48705 if (getSymbols) {
48706 var symbols = getSymbols(it);
48707 var isEnum = pIE.f;
48708 var i = 0;
48709 var key;
48710 while (symbols.length > i) {
48711 if (isEnum.call(it, key = symbols[i++])) result.push(key);
48712 }
48713 }return result;
48714 };
48715
48716/***/ }),
48717/* 426 */
48718/***/ (function(module, exports, __webpack_require__) {
48719
48720 'use strict';
48721
48722 var document = __webpack_require__(15).document;
48723 module.exports = document && document.documentElement;
48724
48725/***/ }),
48726/* 427 */
48727/***/ (function(module, exports, __webpack_require__) {
48728
48729 'use strict';
48730
48731 // check on default Array iterator
48732 var Iterators = __webpack_require__(56);
48733 var ITERATOR = __webpack_require__(13)('iterator');
48734 var ArrayProto = Array.prototype;
48735
48736 module.exports = function (it) {
48737 return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
48738 };
48739
48740/***/ }),
48741/* 428 */
48742/***/ (function(module, exports, __webpack_require__) {
48743
48744 'use strict';
48745
48746 // call something on iterator step with safe closing on error
48747 var anObject = __webpack_require__(21);
48748 module.exports = function (iterator, fn, value, entries) {
48749 try {
48750 return entries ? fn(anObject(value)[0], value[1]) : fn(value);
48751 // 7.4.6 IteratorClose(iterator, completion)
48752 } catch (e) {
48753 var ret = iterator['return'];
48754 if (ret !== undefined) anObject(ret.call(iterator));
48755 throw e;
48756 }
48757 };
48758
48759/***/ }),
48760/* 429 */
48761/***/ (function(module, exports, __webpack_require__) {
48762
48763 'use strict';
48764
48765 var create = __webpack_require__(90);
48766 var descriptor = __webpack_require__(92);
48767 var setToStringTag = __webpack_require__(93);
48768 var IteratorPrototype = {};
48769
48770 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
48771 __webpack_require__(29)(IteratorPrototype, __webpack_require__(13)('iterator'), function () {
48772 return this;
48773 });
48774
48775 module.exports = function (Constructor, NAME, next) {
48776 Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
48777 setToStringTag(Constructor, NAME + ' Iterator');
48778 };
48779
48780/***/ }),
48781/* 430 */
48782/***/ (function(module, exports, __webpack_require__) {
48783
48784 'use strict';
48785
48786 var getKeys = __webpack_require__(44);
48787 var toIObject = __webpack_require__(37);
48788 module.exports = function (object, el) {
48789 var O = toIObject(object);
48790 var keys = getKeys(O);
48791 var length = keys.length;
48792 var index = 0;
48793 var key;
48794 while (length > index) {
48795 if (O[key = keys[index++]] === el) return key;
48796 }
48797 };
48798
48799/***/ }),
48800/* 431 */
48801/***/ (function(module, exports, __webpack_require__) {
48802
48803 'use strict';
48804
48805 var dP = __webpack_require__(23);
48806 var anObject = __webpack_require__(21);
48807 var getKeys = __webpack_require__(44);
48808
48809 module.exports = __webpack_require__(22) ? Object.defineProperties : function defineProperties(O, Properties) {
48810 anObject(O);
48811 var keys = getKeys(Properties);
48812 var length = keys.length;
48813 var i = 0;
48814 var P;
48815 while (length > i) {
48816 dP.f(O, P = keys[i++], Properties[P]);
48817 }return O;
48818 };
48819
48820/***/ }),
48821/* 432 */
48822/***/ (function(module, exports, __webpack_require__) {
48823
48824 'use strict';
48825
48826 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
48827
48828 // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
48829 var toIObject = __webpack_require__(37);
48830 var gOPN = __webpack_require__(236).f;
48831 var toString = {}.toString;
48832
48833 var windowNames = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
48834
48835 var getWindowNames = function getWindowNames(it) {
48836 try {
48837 return gOPN(it);
48838 } catch (e) {
48839 return windowNames.slice();
48840 }
48841 };
48842
48843 module.exports.f = function getOwnPropertyNames(it) {
48844 return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
48845 };
48846
48847/***/ }),
48848/* 433 */
48849/***/ (function(module, exports, __webpack_require__) {
48850
48851 'use strict';
48852
48853 // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
48854 var has = __webpack_require__(28);
48855 var toObject = __webpack_require__(94);
48856 var IE_PROTO = __webpack_require__(150)('IE_PROTO');
48857 var ObjectProto = Object.prototype;
48858
48859 module.exports = Object.getPrototypeOf || function (O) {
48860 O = toObject(O);
48861 if (has(O, IE_PROTO)) return O[IE_PROTO];
48862 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
48863 return O.constructor.prototype;
48864 }return O instanceof Object ? ObjectProto : null;
48865 };
48866
48867/***/ }),
48868/* 434 */
48869/***/ (function(module, exports, __webpack_require__) {
48870
48871 'use strict';
48872
48873 // most Object methods by ES6 should accept primitives
48874 var $export = __webpack_require__(12);
48875 var core = __webpack_require__(5);
48876 var fails = __webpack_require__(27);
48877 module.exports = function (KEY, exec) {
48878 var fn = (core.Object || {})[KEY] || Object[KEY];
48879 var exp = {};
48880 exp[KEY] = exec(fn);
48881 $export($export.S + $export.F * fails(function () {
48882 fn(1);
48883 }), 'Object', exp);
48884 };
48885
48886/***/ }),
48887/* 435 */
48888/***/ (function(module, exports, __webpack_require__) {
48889
48890 'use strict';
48891
48892 // Works with __proto__ only. Old v8 can't work with null proto objects.
48893 /* eslint-disable no-proto */
48894 var isObject = __webpack_require__(16);
48895 var anObject = __webpack_require__(21);
48896 var check = function check(O, proto) {
48897 anObject(O);
48898 if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
48899 };
48900 module.exports = {
48901 set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
48902 function (test, buggy, set) {
48903 try {
48904 set = __webpack_require__(43)(Function.call, __webpack_require__(235).f(Object.prototype, '__proto__').set, 2);
48905 set(test, []);
48906 buggy = !(test instanceof Array);
48907 } catch (e) {
48908 buggy = true;
48909 }
48910 return function setPrototypeOf(O, proto) {
48911 check(O, proto);
48912 if (buggy) O.__proto__ = proto;else set(O, proto);
48913 return O;
48914 };
48915 }({}, false) : undefined),
48916 check: check
48917 };
48918
48919/***/ }),
48920/* 436 */
48921/***/ (function(module, exports, __webpack_require__) {
48922
48923 'use strict';
48924
48925 var global = __webpack_require__(15);
48926 var core = __webpack_require__(5);
48927 var dP = __webpack_require__(23);
48928 var DESCRIPTORS = __webpack_require__(22);
48929 var SPECIES = __webpack_require__(13)('species');
48930
48931 module.exports = function (KEY) {
48932 var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
48933 if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
48934 configurable: true,
48935 get: function get() {
48936 return this;
48937 }
48938 });
48939 };
48940
48941/***/ }),
48942/* 437 */
48943/***/ (function(module, exports, __webpack_require__) {
48944
48945 'use strict';
48946
48947 var toInteger = __webpack_require__(152);
48948 var defined = __webpack_require__(140);
48949 // true -> String#at
48950 // false -> String#codePointAt
48951 module.exports = function (TO_STRING) {
48952 return function (that, pos) {
48953 var s = String(defined(that));
48954 var i = toInteger(pos);
48955 var l = s.length;
48956 var a, b;
48957 if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
48958 a = s.charCodeAt(i);
48959 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
48960 };
48961 };
48962
48963/***/ }),
48964/* 438 */
48965/***/ (function(module, exports, __webpack_require__) {
48966
48967 'use strict';
48968
48969 var toInteger = __webpack_require__(152);
48970 var max = Math.max;
48971 var min = Math.min;
48972 module.exports = function (index, length) {
48973 index = toInteger(index);
48974 return index < 0 ? max(index + length, 0) : min(index, length);
48975 };
48976
48977/***/ }),
48978/* 439 */
48979/***/ (function(module, exports, __webpack_require__) {
48980
48981 'use strict';
48982
48983 var anObject = __webpack_require__(21);
48984 var get = __webpack_require__(238);
48985 module.exports = __webpack_require__(5).getIterator = function (it) {
48986 var iterFn = get(it);
48987 if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
48988 return anObject(iterFn.call(it));
48989 };
48990
48991/***/ }),
48992/* 440 */
48993/***/ (function(module, exports, __webpack_require__) {
48994
48995 'use strict';
48996
48997 var addToUnscopables = __webpack_require__(418);
48998 var step = __webpack_require__(233);
48999 var Iterators = __webpack_require__(56);
49000 var toIObject = __webpack_require__(37);
49001
49002 // 22.1.3.4 Array.prototype.entries()
49003 // 22.1.3.13 Array.prototype.keys()
49004 // 22.1.3.29 Array.prototype.values()
49005 // 22.1.3.30 Array.prototype[@@iterator]()
49006 module.exports = __webpack_require__(143)(Array, 'Array', function (iterated, kind) {
49007 this._t = toIObject(iterated); // target
49008 this._i = 0; // next index
49009 this._k = kind; // kind
49010 // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
49011 }, function () {
49012 var O = this._t;
49013 var kind = this._k;
49014 var index = this._i++;
49015 if (!O || index >= O.length) {
49016 this._t = undefined;
49017 return step(1);
49018 }
49019 if (kind == 'keys') return step(0, index);
49020 if (kind == 'values') return step(0, O[index]);
49021 return step(0, [index, O[index]]);
49022 }, 'values');
49023
49024 // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
49025 Iterators.Arguments = Iterators.Array;
49026
49027 addToUnscopables('keys');
49028 addToUnscopables('values');
49029 addToUnscopables('entries');
49030
49031/***/ }),
49032/* 441 */
49033/***/ (function(module, exports, __webpack_require__) {
49034
49035 'use strict';
49036
49037 var strong = __webpack_require__(423);
49038 var validate = __webpack_require__(58);
49039 var MAP = 'Map';
49040
49041 // 23.1 Map Objects
49042 module.exports = __webpack_require__(139)(MAP, function (get) {
49043 return function Map() {
49044 return get(this, arguments.length > 0 ? arguments[0] : undefined);
49045 };
49046 }, {
49047 // 23.1.3.6 Map.prototype.get(key)
49048 get: function get(key) {
49049 var entry = strong.getEntry(validate(this, MAP), key);
49050 return entry && entry.v;
49051 },
49052 // 23.1.3.9 Map.prototype.set(key, value)
49053 set: function set(key, value) {
49054 return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
49055 }
49056 }, strong, true);
49057
49058/***/ }),
49059/* 442 */
49060/***/ (function(module, exports, __webpack_require__) {
49061
49062 'use strict';
49063
49064 // 20.1.2.6 Number.MAX_SAFE_INTEGER
49065 var $export = __webpack_require__(12);
49066
49067 $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
49068
49069/***/ }),
49070/* 443 */
49071/***/ (function(module, exports, __webpack_require__) {
49072
49073 'use strict';
49074
49075 // 19.1.3.1 Object.assign(target, source)
49076 var $export = __webpack_require__(12);
49077
49078 $export($export.S + $export.F, 'Object', { assign: __webpack_require__(234) });
49079
49080/***/ }),
49081/* 444 */
49082/***/ (function(module, exports, __webpack_require__) {
49083
49084 'use strict';
49085
49086 var $export = __webpack_require__(12);
49087 // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
49088 $export($export.S, 'Object', { create: __webpack_require__(90) });
49089
49090/***/ }),
49091/* 445 */
49092/***/ (function(module, exports, __webpack_require__) {
49093
49094 'use strict';
49095
49096 // 19.1.2.14 Object.keys(O)
49097 var toObject = __webpack_require__(94);
49098 var $keys = __webpack_require__(44);
49099
49100 __webpack_require__(434)('keys', function () {
49101 return function keys(it) {
49102 return $keys(toObject(it));
49103 };
49104 });
49105
49106/***/ }),
49107/* 446 */
49108/***/ (function(module, exports, __webpack_require__) {
49109
49110 'use strict';
49111
49112 // 19.1.3.19 Object.setPrototypeOf(O, proto)
49113 var $export = __webpack_require__(12);
49114 $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(435).set });
49115
49116/***/ }),
49117/* 447 */
49118/***/ (function(module, exports, __webpack_require__) {
49119
49120 'use strict';
49121
49122 var each = __webpack_require__(137)(0);
49123 var redefine = __webpack_require__(147);
49124 var meta = __webpack_require__(57);
49125 var assign = __webpack_require__(234);
49126 var weak = __webpack_require__(229);
49127 var isObject = __webpack_require__(16);
49128 var fails = __webpack_require__(27);
49129 var validate = __webpack_require__(58);
49130 var WEAK_MAP = 'WeakMap';
49131 var getWeak = meta.getWeak;
49132 var isExtensible = Object.isExtensible;
49133 var uncaughtFrozenStore = weak.ufstore;
49134 var tmp = {};
49135 var InternalMap;
49136
49137 var wrapper = function wrapper(get) {
49138 return function WeakMap() {
49139 return get(this, arguments.length > 0 ? arguments[0] : undefined);
49140 };
49141 };
49142
49143 var methods = {
49144 // 23.3.3.3 WeakMap.prototype.get(key)
49145 get: function get(key) {
49146 if (isObject(key)) {
49147 var data = getWeak(key);
49148 if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
49149 return data ? data[this._i] : undefined;
49150 }
49151 },
49152 // 23.3.3.5 WeakMap.prototype.set(key, value)
49153 set: function set(key, value) {
49154 return weak.def(validate(this, WEAK_MAP), key, value);
49155 }
49156 };
49157
49158 // 23.3 WeakMap Objects
49159 var $WeakMap = module.exports = __webpack_require__(139)(WEAK_MAP, wrapper, methods, weak, true, true);
49160
49161 // IE11 WeakMap frozen keys fix
49162 if (fails(function () {
49163 return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7;
49164 })) {
49165 InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
49166 assign(InternalMap.prototype, methods);
49167 meta.NEED = true;
49168 each(['delete', 'has', 'get', 'set'], function (key) {
49169 var proto = $WeakMap.prototype;
49170 var method = proto[key];
49171 redefine(proto, key, function (a, b) {
49172 // store frozen objects on internal weakmap shim
49173 if (isObject(a) && !isExtensible(a)) {
49174 if (!this._f) this._f = new InternalMap();
49175 var result = this._f[key](a, b);
49176 return key == 'set' ? this : result;
49177 // store all the rest on native weakmap
49178 }return method.call(this, a, b);
49179 });
49180 });
49181 }
49182
49183/***/ }),
49184/* 448 */
49185/***/ (function(module, exports, __webpack_require__) {
49186
49187 'use strict';
49188
49189 var weak = __webpack_require__(229);
49190 var validate = __webpack_require__(58);
49191 var WEAK_SET = 'WeakSet';
49192
49193 // 23.4 WeakSet Objects
49194 __webpack_require__(139)(WEAK_SET, function (get) {
49195 return function WeakSet() {
49196 return get(this, arguments.length > 0 ? arguments[0] : undefined);
49197 };
49198 }, {
49199 // 23.4.3.1 WeakSet.prototype.add(value)
49200 add: function add(value) {
49201 return weak.def(validate(this, WEAK_SET), value, true);
49202 }
49203 }, weak, false, true);
49204
49205/***/ }),
49206/* 449 */
49207/***/ (function(module, exports, __webpack_require__) {
49208
49209 'use strict';
49210
49211 // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
49212 __webpack_require__(148)('Map');
49213
49214/***/ }),
49215/* 450 */
49216/***/ (function(module, exports, __webpack_require__) {
49217
49218 'use strict';
49219
49220 // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
49221 __webpack_require__(149)('Map');
49222
49223/***/ }),
49224/* 451 */
49225/***/ (function(module, exports, __webpack_require__) {
49226
49227 'use strict';
49228
49229 // https://github.com/DavidBruant/Map-Set.prototype.toJSON
49230 var $export = __webpack_require__(12);
49231
49232 $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(424)('Map') });
49233
49234/***/ }),
49235/* 452 */
49236/***/ (function(module, exports, __webpack_require__) {
49237
49238 'use strict';
49239
49240 __webpack_require__(155)('asyncIterator');
49241
49242/***/ }),
49243/* 453 */
49244/***/ (function(module, exports, __webpack_require__) {
49245
49246 'use strict';
49247
49248 __webpack_require__(155)('observable');
49249
49250/***/ }),
49251/* 454 */
49252/***/ (function(module, exports, __webpack_require__) {
49253
49254 'use strict';
49255
49256 // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
49257 __webpack_require__(148)('WeakMap');
49258
49259/***/ }),
49260/* 455 */
49261/***/ (function(module, exports, __webpack_require__) {
49262
49263 'use strict';
49264
49265 // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
49266 __webpack_require__(149)('WeakMap');
49267
49268/***/ }),
49269/* 456 */
49270/***/ (function(module, exports, __webpack_require__) {
49271
49272 'use strict';
49273
49274 // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
49275 __webpack_require__(148)('WeakSet');
49276
49277/***/ }),
49278/* 457 */
49279/***/ (function(module, exports, __webpack_require__) {
49280
49281 'use strict';
49282
49283 // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
49284 __webpack_require__(149)('WeakSet');
49285
49286/***/ }),
49287/* 458 */
49288/***/ (function(module, exports, __webpack_require__) {
49289
49290 'use strict';
49291
49292 /**
49293 * This is the common logic for both the Node.js and web browser
49294 * implementations of `debug()`.
49295 *
49296 * Expose `debug()` as the module.
49297 */
49298
49299 exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
49300 exports.coerce = coerce;
49301 exports.disable = disable;
49302 exports.enable = enable;
49303 exports.enabled = enabled;
49304 exports.humanize = __webpack_require__(602);
49305
49306 /**
49307 * The currently active debug mode names, and names to skip.
49308 */
49309
49310 exports.names = [];
49311 exports.skips = [];
49312
49313 /**
49314 * Map of special "%n" handling functions, for the debug "format" argument.
49315 *
49316 * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
49317 */
49318
49319 exports.formatters = {};
49320
49321 /**
49322 * Previous log timestamp.
49323 */
49324
49325 var prevTime;
49326
49327 /**
49328 * Select a color.
49329 * @param {String} namespace
49330 * @return {Number}
49331 * @api private
49332 */
49333
49334 function selectColor(namespace) {
49335 var hash = 0,
49336 i;
49337
49338 for (i in namespace) {
49339 hash = (hash << 5) - hash + namespace.charCodeAt(i);
49340 hash |= 0; // Convert to 32bit integer
49341 }
49342
49343 return exports.colors[Math.abs(hash) % exports.colors.length];
49344 }
49345
49346 /**
49347 * Create a debugger with the given `namespace`.
49348 *
49349 * @param {String} namespace
49350 * @return {Function}
49351 * @api public
49352 */
49353
49354 function createDebug(namespace) {
49355
49356 function debug() {
49357 // disabled?
49358 if (!debug.enabled) return;
49359
49360 var self = debug;
49361
49362 // set `diff` timestamp
49363 var curr = +new Date();
49364 var ms = curr - (prevTime || curr);
49365 self.diff = ms;
49366 self.prev = prevTime;
49367 self.curr = curr;
49368 prevTime = curr;
49369
49370 // turn the `arguments` into a proper Array
49371 var args = new Array(arguments.length);
49372 for (var i = 0; i < args.length; i++) {
49373 args[i] = arguments[i];
49374 }
49375
49376 args[0] = exports.coerce(args[0]);
49377
49378 if ('string' !== typeof args[0]) {
49379 // anything else let's inspect with %O
49380 args.unshift('%O');
49381 }
49382
49383 // apply any `formatters` transformations
49384 var index = 0;
49385 args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
49386 // if we encounter an escaped % then don't increase the array index
49387 if (match === '%%') return match;
49388 index++;
49389 var formatter = exports.formatters[format];
49390 if ('function' === typeof formatter) {
49391 var val = args[index];
49392 match = formatter.call(self, val);
49393
49394 // now we need to remove `args[index]` since it's inlined in the `format`
49395 args.splice(index, 1);
49396 index--;
49397 }
49398 return match;
49399 });
49400
49401 // apply env-specific formatting (colors, etc.)
49402 exports.formatArgs.call(self, args);
49403
49404 var logFn = debug.log || exports.log || console.log.bind(console);
49405 logFn.apply(self, args);
49406 }
49407
49408 debug.namespace = namespace;
49409 debug.enabled = exports.enabled(namespace);
49410 debug.useColors = exports.useColors();
49411 debug.color = selectColor(namespace);
49412
49413 // env-specific initialization logic for debug instances
49414 if ('function' === typeof exports.init) {
49415 exports.init(debug);
49416 }
49417
49418 return debug;
49419 }
49420
49421 /**
49422 * Enables a debug mode by namespaces. This can include modes
49423 * separated by a colon and wildcards.
49424 *
49425 * @param {String} namespaces
49426 * @api public
49427 */
49428
49429 function enable(namespaces) {
49430 exports.save(namespaces);
49431
49432 exports.names = [];
49433 exports.skips = [];
49434
49435 var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
49436 var len = split.length;
49437
49438 for (var i = 0; i < len; i++) {
49439 if (!split[i]) continue; // ignore empty strings
49440 namespaces = split[i].replace(/\*/g, '.*?');
49441 if (namespaces[0] === '-') {
49442 exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
49443 } else {
49444 exports.names.push(new RegExp('^' + namespaces + '$'));
49445 }
49446 }
49447 }
49448
49449 /**
49450 * Disable debug output.
49451 *
49452 * @api public
49453 */
49454
49455 function disable() {
49456 exports.enable('');
49457 }
49458
49459 /**
49460 * Returns true if the given mode name is enabled, false otherwise.
49461 *
49462 * @param {String} name
49463 * @return {Boolean}
49464 * @api public
49465 */
49466
49467 function enabled(name) {
49468 var i, len;
49469 for (i = 0, len = exports.skips.length; i < len; i++) {
49470 if (exports.skips[i].test(name)) {
49471 return false;
49472 }
49473 }
49474 for (i = 0, len = exports.names.length; i < len; i++) {
49475 if (exports.names[i].test(name)) {
49476 return true;
49477 }
49478 }
49479 return false;
49480 }
49481
49482 /**
49483 * Coerce `val`.
49484 *
49485 * @param {Mixed} val
49486 * @return {Mixed}
49487 * @api private
49488 */
49489
49490 function coerce(val) {
49491 if (val instanceof Error) return val.stack || val.message;
49492 return val;
49493 }
49494
49495/***/ }),
49496/* 459 */
49497/***/ (function(module, exports, __webpack_require__) {
49498
49499 /* eslint-disable guard-for-in */
49500 'use strict';
49501
49502 var repeating = __webpack_require__(615);
49503
49504 // detect either spaces or tabs but not both to properly handle tabs
49505 // for indentation and spaces for alignment
49506 var INDENT_RE = /^(?:( )+|\t+)/;
49507
49508 function getMostUsed(indents) {
49509 var result = 0;
49510 var maxUsed = 0;
49511 var maxWeight = 0;
49512
49513 for (var n in indents) {
49514 var indent = indents[n];
49515 var u = indent[0];
49516 var w = indent[1];
49517
49518 if (u > maxUsed || u === maxUsed && w > maxWeight) {
49519 maxUsed = u;
49520 maxWeight = w;
49521 result = Number(n);
49522 }
49523 }
49524
49525 return result;
49526 }
49527
49528 module.exports = function (str) {
49529 if (typeof str !== 'string') {
49530 throw new TypeError('Expected a string');
49531 }
49532
49533 // used to see if tabs or spaces are the most used
49534 var tabs = 0;
49535 var spaces = 0;
49536
49537 // remember the size of previous line's indentation
49538 var prev = 0;
49539
49540 // remember how many indents/unindents as occurred for a given size
49541 // and how much lines follow a given indentation
49542 //
49543 // indents = {
49544 // 3: [1, 0],
49545 // 4: [1, 5],
49546 // 5: [1, 0],
49547 // 12: [1, 0],
49548 // }
49549 var indents = {};
49550
49551 // pointer to the array of last used indent
49552 var current;
49553
49554 // whether the last action was an indent (opposed to an unindent)
49555 var isIndent;
49556
49557 str.split(/\n/g).forEach(function (line) {
49558 if (!line) {
49559 // ignore empty lines
49560 return;
49561 }
49562
49563 var indent;
49564 var matches = line.match(INDENT_RE);
49565
49566 if (!matches) {
49567 indent = 0;
49568 } else {
49569 indent = matches[0].length;
49570
49571 if (matches[1]) {
49572 spaces++;
49573 } else {
49574 tabs++;
49575 }
49576 }
49577
49578 var diff = indent - prev;
49579 prev = indent;
49580
49581 if (diff) {
49582 // an indent or unindent has been detected
49583
49584 isIndent = diff > 0;
49585
49586 current = indents[isIndent ? diff : -diff];
49587
49588 if (current) {
49589 current[0]++;
49590 } else {
49591 current = indents[diff] = [1, 0];
49592 }
49593 } else if (current) {
49594 // if the last action was an indent, increment the weight
49595 current[1] += Number(isIndent);
49596 }
49597 });
49598
49599 var amount = getMostUsed(indents);
49600
49601 var type;
49602 var actual;
49603 if (!amount) {
49604 type = null;
49605 actual = '';
49606 } else if (spaces >= tabs) {
49607 type = 'space';
49608 actual = repeating(' ', amount);
49609 } else {
49610 type = 'tab';
49611 actual = repeating('\t', amount);
49612 }
49613
49614 return {
49615 amount: amount,
49616 type: type,
49617 indent: actual
49618 };
49619 };
49620
49621/***/ }),
49622/* 460 */
49623/***/ (function(module, exports) {
49624
49625 'use strict';
49626
49627 var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
49628
49629 module.exports = function (str) {
49630 if (typeof str !== 'string') {
49631 throw new TypeError('Expected a string');
49632 }
49633
49634 return str.replace(matchOperatorsRe, '\\$&');
49635 };
49636
49637/***/ }),
49638/* 461 */
49639/***/ (function(module, exports) {
49640
49641 'use strict';
49642
49643 /*
49644 Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
49645
49646 Redistribution and use in source and binary forms, with or without
49647 modification, are permitted provided that the following conditions are met:
49648
49649 * Redistributions of source code must retain the above copyright
49650 notice, this list of conditions and the following disclaimer.
49651 * Redistributions in binary form must reproduce the above copyright
49652 notice, this list of conditions and the following disclaimer in the
49653 documentation and/or other materials provided with the distribution.
49654
49655 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
49656 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49657 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49658 ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
49659 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
49660 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
49661 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
49662 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49663 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
49664 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49665 */
49666
49667 (function () {
49668 'use strict';
49669
49670 function isExpression(node) {
49671 if (node == null) {
49672 return false;
49673 }
49674 switch (node.type) {
49675 case 'ArrayExpression':
49676 case 'AssignmentExpression':
49677 case 'BinaryExpression':
49678 case 'CallExpression':
49679 case 'ConditionalExpression':
49680 case 'FunctionExpression':
49681 case 'Identifier':
49682 case 'Literal':
49683 case 'LogicalExpression':
49684 case 'MemberExpression':
49685 case 'NewExpression':
49686 case 'ObjectExpression':
49687 case 'SequenceExpression':
49688 case 'ThisExpression':
49689 case 'UnaryExpression':
49690 case 'UpdateExpression':
49691 return true;
49692 }
49693 return false;
49694 }
49695
49696 function isIterationStatement(node) {
49697 if (node == null) {
49698 return false;
49699 }
49700 switch (node.type) {
49701 case 'DoWhileStatement':
49702 case 'ForInStatement':
49703 case 'ForStatement':
49704 case 'WhileStatement':
49705 return true;
49706 }
49707 return false;
49708 }
49709
49710 function isStatement(node) {
49711 if (node == null) {
49712 return false;
49713 }
49714 switch (node.type) {
49715 case 'BlockStatement':
49716 case 'BreakStatement':
49717 case 'ContinueStatement':
49718 case 'DebuggerStatement':
49719 case 'DoWhileStatement':
49720 case 'EmptyStatement':
49721 case 'ExpressionStatement':
49722 case 'ForInStatement':
49723 case 'ForStatement':
49724 case 'IfStatement':
49725 case 'LabeledStatement':
49726 case 'ReturnStatement':
49727 case 'SwitchStatement':
49728 case 'ThrowStatement':
49729 case 'TryStatement':
49730 case 'VariableDeclaration':
49731 case 'WhileStatement':
49732 case 'WithStatement':
49733 return true;
49734 }
49735 return false;
49736 }
49737
49738 function isSourceElement(node) {
49739 return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
49740 }
49741
49742 function trailingStatement(node) {
49743 switch (node.type) {
49744 case 'IfStatement':
49745 if (node.alternate != null) {
49746 return node.alternate;
49747 }
49748 return node.consequent;
49749
49750 case 'LabeledStatement':
49751 case 'ForStatement':
49752 case 'ForInStatement':
49753 case 'WhileStatement':
49754 case 'WithStatement':
49755 return node.body;
49756 }
49757 return null;
49758 }
49759
49760 function isProblematicIfStatement(node) {
49761 var current;
49762
49763 if (node.type !== 'IfStatement') {
49764 return false;
49765 }
49766 if (node.alternate == null) {
49767 return false;
49768 }
49769 current = node.consequent;
49770 do {
49771 if (current.type === 'IfStatement') {
49772 if (current.alternate == null) {
49773 return true;
49774 }
49775 }
49776 current = trailingStatement(current);
49777 } while (current);
49778
49779 return false;
49780 }
49781
49782 module.exports = {
49783 isExpression: isExpression,
49784 isStatement: isStatement,
49785 isIterationStatement: isIterationStatement,
49786 isSourceElement: isSourceElement,
49787 isProblematicIfStatement: isProblematicIfStatement,
49788
49789 trailingStatement: trailingStatement
49790 };
49791 })();
49792 /* vim: set sw=4 ts=4 et tw=80 : */
49793
49794/***/ }),
49795/* 462 */
49796/***/ (function(module, exports, __webpack_require__) {
49797
49798 'use strict';
49799
49800 /*
49801 Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
49802
49803 Redistribution and use in source and binary forms, with or without
49804 modification, are permitted provided that the following conditions are met:
49805
49806 * Redistributions of source code must retain the above copyright
49807 notice, this list of conditions and the following disclaimer.
49808 * Redistributions in binary form must reproduce the above copyright
49809 notice, this list of conditions and the following disclaimer in the
49810 documentation and/or other materials provided with the distribution.
49811
49812 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
49813 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49814 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49815 ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
49816 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
49817 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
49818 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
49819 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49820 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
49821 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49822 */
49823
49824 (function () {
49825 'use strict';
49826
49827 var code = __webpack_require__(240);
49828
49829 function isStrictModeReservedWordES6(id) {
49830 switch (id) {
49831 case 'implements':
49832 case 'interface':
49833 case 'package':
49834 case 'private':
49835 case 'protected':
49836 case 'public':
49837 case 'static':
49838 case 'let':
49839 return true;
49840 default:
49841 return false;
49842 }
49843 }
49844
49845 function isKeywordES5(id, strict) {
49846 // yield should not be treated as keyword under non-strict mode.
49847 if (!strict && id === 'yield') {
49848 return false;
49849 }
49850 return isKeywordES6(id, strict);
49851 }
49852
49853 function isKeywordES6(id, strict) {
49854 if (strict && isStrictModeReservedWordES6(id)) {
49855 return true;
49856 }
49857
49858 switch (id.length) {
49859 case 2:
49860 return id === 'if' || id === 'in' || id === 'do';
49861 case 3:
49862 return id === 'var' || id === 'for' || id === 'new' || id === 'try';
49863 case 4:
49864 return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum';
49865 case 5:
49866 return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super';
49867 case 6:
49868 return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import';
49869 case 7:
49870 return id === 'default' || id === 'finally' || id === 'extends';
49871 case 8:
49872 return id === 'function' || id === 'continue' || id === 'debugger';
49873 case 10:
49874 return id === 'instanceof';
49875 default:
49876 return false;
49877 }
49878 }
49879
49880 function isReservedWordES5(id, strict) {
49881 return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
49882 }
49883
49884 function isReservedWordES6(id, strict) {
49885 return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
49886 }
49887
49888 function isRestrictedWord(id) {
49889 return id === 'eval' || id === 'arguments';
49890 }
49891
49892 function isIdentifierNameES5(id) {
49893 var i, iz, ch;
49894
49895 if (id.length === 0) {
49896 return false;
49897 }
49898
49899 ch = id.charCodeAt(0);
49900 if (!code.isIdentifierStartES5(ch)) {
49901 return false;
49902 }
49903
49904 for (i = 1, iz = id.length; i < iz; ++i) {
49905 ch = id.charCodeAt(i);
49906 if (!code.isIdentifierPartES5(ch)) {
49907 return false;
49908 }
49909 }
49910 return true;
49911 }
49912
49913 function decodeUtf16(lead, trail) {
49914 return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
49915 }
49916
49917 function isIdentifierNameES6(id) {
49918 var i, iz, ch, lowCh, check;
49919
49920 if (id.length === 0) {
49921 return false;
49922 }
49923
49924 check = code.isIdentifierStartES6;
49925 for (i = 0, iz = id.length; i < iz; ++i) {
49926 ch = id.charCodeAt(i);
49927 if (0xD800 <= ch && ch <= 0xDBFF) {
49928 ++i;
49929 if (i >= iz) {
49930 return false;
49931 }
49932 lowCh = id.charCodeAt(i);
49933 if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
49934 return false;
49935 }
49936 ch = decodeUtf16(ch, lowCh);
49937 }
49938 if (!check(ch)) {
49939 return false;
49940 }
49941 check = code.isIdentifierPartES6;
49942 }
49943 return true;
49944 }
49945
49946 function isIdentifierES5(id, strict) {
49947 return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
49948 }
49949
49950 function isIdentifierES6(id, strict) {
49951 return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
49952 }
49953
49954 module.exports = {
49955 isKeywordES5: isKeywordES5,
49956 isKeywordES6: isKeywordES6,
49957 isReservedWordES5: isReservedWordES5,
49958 isReservedWordES6: isReservedWordES6,
49959 isRestrictedWord: isRestrictedWord,
49960 isIdentifierNameES5: isIdentifierNameES5,
49961 isIdentifierNameES6: isIdentifierNameES6,
49962 isIdentifierES5: isIdentifierES5,
49963 isIdentifierES6: isIdentifierES6
49964 };
49965 })();
49966 /* vim: set sw=4 ts=4 et tw=80 : */
49967
49968/***/ }),
49969/* 463 */
49970/***/ (function(module, exports, __webpack_require__) {
49971
49972 'use strict';
49973
49974 module.exports = __webpack_require__(630);
49975
49976/***/ }),
49977/* 464 */
49978/***/ (function(module, exports, __webpack_require__) {
49979
49980 'use strict';
49981
49982 var ansiRegex = __webpack_require__(180);
49983 var re = new RegExp(ansiRegex().source); // remove the `g` flag
49984 module.exports = re.test.bind(re);
49985
49986/***/ }),
49987/* 465 */
49988/***/ (function(module, exports) {
49989
49990 "use strict";
49991
49992 exports.read = function (buffer, offset, isLE, mLen, nBytes) {
49993 var e, m;
49994 var eLen = nBytes * 8 - mLen - 1;
49995 var eMax = (1 << eLen) - 1;
49996 var eBias = eMax >> 1;
49997 var nBits = -7;
49998 var i = isLE ? nBytes - 1 : 0;
49999 var d = isLE ? -1 : 1;
50000 var s = buffer[offset + i];
50001
50002 i += d;
50003
50004 e = s & (1 << -nBits) - 1;
50005 s >>= -nBits;
50006 nBits += eLen;
50007 for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
50008
50009 m = e & (1 << -nBits) - 1;
50010 e >>= -nBits;
50011 nBits += mLen;
50012 for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
50013
50014 if (e === 0) {
50015 e = 1 - eBias;
50016 } else if (e === eMax) {
50017 return m ? NaN : (s ? -1 : 1) * Infinity;
50018 } else {
50019 m = m + Math.pow(2, mLen);
50020 e = e - eBias;
50021 }
50022 return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
50023 };
50024
50025 exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
50026 var e, m, c;
50027 var eLen = nBytes * 8 - mLen - 1;
50028 var eMax = (1 << eLen) - 1;
50029 var eBias = eMax >> 1;
50030 var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
50031 var i = isLE ? 0 : nBytes - 1;
50032 var d = isLE ? 1 : -1;
50033 var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
50034
50035 value = Math.abs(value);
50036
50037 if (isNaN(value) || value === Infinity) {
50038 m = isNaN(value) ? 1 : 0;
50039 e = eMax;
50040 } else {
50041 e = Math.floor(Math.log(value) / Math.LN2);
50042 if (value * (c = Math.pow(2, -e)) < 1) {
50043 e--;
50044 c *= 2;
50045 }
50046 if (e + eBias >= 1) {
50047 value += rt / c;
50048 } else {
50049 value += rt * Math.pow(2, 1 - eBias);
50050 }
50051 if (value * c >= 2) {
50052 e++;
50053 c /= 2;
50054 }
50055
50056 if (e + eBias >= eMax) {
50057 m = 0;
50058 e = eMax;
50059 } else if (e + eBias >= 1) {
50060 m = (value * c - 1) * Math.pow(2, mLen);
50061 e = e + eBias;
50062 } else {
50063 m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
50064 e = 0;
50065 }
50066 }
50067
50068 for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
50069
50070 e = e << mLen | m;
50071 eLen += mLen;
50072 for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
50073
50074 buffer[offset + i - d] |= s * 128;
50075 };
50076
50077/***/ }),
50078/* 466 */
50079/***/ (function(module, exports, __webpack_require__) {
50080
50081 /**
50082 * Copyright 2013-2015, Facebook, Inc.
50083 * All rights reserved.
50084 *
50085 * This source code is licensed under the BSD-style license found in the
50086 * LICENSE file in the root directory of this source tree. An additional grant
50087 * of patent rights can be found in the PATENTS file in the same directory.
50088 */
50089
50090 'use strict';
50091
50092 /**
50093 * Use invariant() to assert state which your program assumes to be true.
50094 *
50095 * Provide sprintf-style format (only %s is supported) and arguments
50096 * to provide information about what broke and what you were
50097 * expecting.
50098 *
50099 * The invariant message will be stripped in production, but the invariant
50100 * will remain to ensure logic does not differ in production.
50101 */
50102
50103 var invariant = function invariant(condition, format, a, b, c, d, e, f) {
50104 if (false) {
50105 if (format === undefined) {
50106 throw new Error('invariant requires an error message argument');
50107 }
50108 }
50109
50110 if (!condition) {
50111 var error;
50112 if (format === undefined) {
50113 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
50114 } else {
50115 var args = [a, b, c, d, e, f];
50116 var argIndex = 0;
50117 error = new Error(format.replace(/%s/g, function () {
50118 return args[argIndex++];
50119 }));
50120 error.name = 'Invariant Violation';
50121 }
50122
50123 error.framesToPop = 1; // we don't care about invariant's own frame
50124 throw error;
50125 }
50126 };
50127
50128 module.exports = invariant;
50129
50130/***/ }),
50131/* 467 */
50132/***/ (function(module, exports, __webpack_require__) {
50133
50134 'use strict';
50135
50136 var numberIsNan = __webpack_require__(603);
50137
50138 module.exports = Number.isFinite || function (val) {
50139 return !(typeof val !== 'number' || numberIsNan(val) || val === Infinity || val === -Infinity);
50140 };
50141
50142/***/ }),
50143/* 468 */
50144/***/ (function(module, exports) {
50145
50146 "use strict";
50147
50148 // Copyright 2014, 2015, 2016, 2017 Simon Lydell
50149 // License: MIT. (See LICENSE.)
50150
50151 Object.defineProperty(exports, "__esModule", {
50152 value: true
50153 });
50154
50155 // This regex comes from regex.coffee, and is inserted here by generate-index.js
50156 // (run `npm run build`).
50157 exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
50158
50159 exports.matchToToken = function (match) {
50160 var token = { type: "invalid", value: match[0] };
50161 if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace";
50162 return token;
50163 };
50164
50165/***/ }),
50166/* 469 */
50167/***/ (function(module, exports, __webpack_require__) {
50168
50169 var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {'use strict';
50170
50171 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
50172
50173 /*! https://mths.be/jsesc v1.3.0 by @mathias */
50174 ;(function (root) {
50175
50176 // Detect free variables `exports`
50177 var freeExports = ( false ? 'undefined' : _typeof(exports)) == 'object' && exports;
50178
50179 // Detect free variable `module`
50180 var freeModule = ( false ? 'undefined' : _typeof(module)) == 'object' && module && module.exports == freeExports && module;
50181
50182 // Detect free variable `global`, from Node.js or Browserified code,
50183 // and use it as `root`
50184 var freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global;
50185 if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
50186 root = freeGlobal;
50187 }
50188
50189 /*--------------------------------------------------------------------------*/
50190
50191 var object = {};
50192 var hasOwnProperty = object.hasOwnProperty;
50193 var forOwn = function forOwn(object, callback) {
50194 var key;
50195 for (key in object) {
50196 if (hasOwnProperty.call(object, key)) {
50197 callback(key, object[key]);
50198 }
50199 }
50200 };
50201
50202 var extend = function extend(destination, source) {
50203 if (!source) {
50204 return destination;
50205 }
50206 forOwn(source, function (key, value) {
50207 destination[key] = value;
50208 });
50209 return destination;
50210 };
50211
50212 var forEach = function forEach(array, callback) {
50213 var length = array.length;
50214 var index = -1;
50215 while (++index < length) {
50216 callback(array[index]);
50217 }
50218 };
50219
50220 var toString = object.toString;
50221 var isArray = function isArray(value) {
50222 return toString.call(value) == '[object Array]';
50223 };
50224 var isObject = function isObject(value) {
50225 // This is a very simple check, but it’s good enough for what we need.
50226 return toString.call(value) == '[object Object]';
50227 };
50228 var isString = function isString(value) {
50229 return typeof value == 'string' || toString.call(value) == '[object String]';
50230 };
50231 var isNumber = function isNumber(value) {
50232 return typeof value == 'number' || toString.call(value) == '[object Number]';
50233 };
50234 var isFunction = function isFunction(value) {
50235 // In a perfect world, the `typeof` check would be sufficient. However,
50236 // in Chrome 1–12, `typeof /x/ == 'object'`, and in IE 6–8
50237 // `typeof alert == 'object'` and similar for other host objects.
50238 return typeof value == 'function' || toString.call(value) == '[object Function]';
50239 };
50240 var isMap = function isMap(value) {
50241 return toString.call(value) == '[object Map]';
50242 };
50243 var isSet = function isSet(value) {
50244 return toString.call(value) == '[object Set]';
50245 };
50246
50247 /*--------------------------------------------------------------------------*/
50248
50249 // https://mathiasbynens.be/notes/javascript-escapes#single
50250 var singleEscapes = {
50251 '"': '\\"',
50252 '\'': '\\\'',
50253 '\\': '\\\\',
50254 '\b': '\\b',
50255 '\f': '\\f',
50256 '\n': '\\n',
50257 '\r': '\\r',
50258 '\t': '\\t'
50259 // `\v` is omitted intentionally, because in IE < 9, '\v' == 'v'.
50260 // '\v': '\\x0B'
50261 };
50262 var regexSingleEscape = /["'\\\b\f\n\r\t]/;
50263
50264 var regexDigit = /[0-9]/;
50265 var regexWhitelist = /[ !#-&\(-\[\]-~]/;
50266
50267 var jsesc = function jsesc(argument, options) {
50268 // Handle options
50269 var defaults = {
50270 'escapeEverything': false,
50271 'escapeEtago': false,
50272 'quotes': 'single',
50273 'wrap': false,
50274 'es6': false,
50275 'json': false,
50276 'compact': true,
50277 'lowercaseHex': false,
50278 'numbers': 'decimal',
50279 'indent': '\t',
50280 '__indent__': '',
50281 '__inline1__': false,
50282 '__inline2__': false
50283 };
50284 var json = options && options.json;
50285 if (json) {
50286 defaults.quotes = 'double';
50287 defaults.wrap = true;
50288 }
50289 options = extend(defaults, options);
50290 if (options.quotes != 'single' && options.quotes != 'double') {
50291 options.quotes = 'single';
50292 }
50293 var quote = options.quotes == 'double' ? '"' : '\'';
50294 var compact = options.compact;
50295 var indent = options.indent;
50296 var lowercaseHex = options.lowercaseHex;
50297 var oldIndent = '';
50298 var inline1 = options.__inline1__;
50299 var inline2 = options.__inline2__;
50300 var newLine = compact ? '' : '\n';
50301 var result;
50302 var isEmpty = true;
50303 var useBinNumbers = options.numbers == 'binary';
50304 var useOctNumbers = options.numbers == 'octal';
50305 var useDecNumbers = options.numbers == 'decimal';
50306 var useHexNumbers = options.numbers == 'hexadecimal';
50307
50308 if (json && argument && isFunction(argument.toJSON)) {
50309 argument = argument.toJSON();
50310 }
50311
50312 if (!isString(argument)) {
50313 if (isMap(argument)) {
50314 if (argument.size == 0) {
50315 return 'new Map()';
50316 }
50317 if (!compact) {
50318 options.__inline1__ = true;
50319 }
50320 return 'new Map(' + jsesc(Array.from(argument), options) + ')';
50321 }
50322 if (isSet(argument)) {
50323 if (argument.size == 0) {
50324 return 'new Set()';
50325 }
50326 return 'new Set(' + jsesc(Array.from(argument), options) + ')';
50327 }
50328 if (isArray(argument)) {
50329 result = [];
50330 options.wrap = true;
50331 if (inline1) {
50332 options.__inline1__ = false;
50333 options.__inline2__ = true;
50334 } else {
50335 oldIndent = options.__indent__;
50336 indent += oldIndent;
50337 options.__indent__ = indent;
50338 }
50339 forEach(argument, function (value) {
50340 isEmpty = false;
50341 if (inline2) {
50342 options.__inline2__ = false;
50343 }
50344 result.push((compact || inline2 ? '' : indent) + jsesc(value, options));
50345 });
50346 if (isEmpty) {
50347 return '[]';
50348 }
50349 if (inline2) {
50350 return '[' + result.join(', ') + ']';
50351 }
50352 return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
50353 } else if (isNumber(argument)) {
50354 if (json) {
50355 // Some number values (e.g. `Infinity`) cannot be represented in JSON.
50356 return JSON.stringify(argument);
50357 }
50358 if (useDecNumbers) {
50359 return String(argument);
50360 }
50361 if (useHexNumbers) {
50362 var tmp = argument.toString(16);
50363 if (!lowercaseHex) {
50364 tmp = tmp.toUpperCase();
50365 }
50366 return '0x' + tmp;
50367 }
50368 if (useBinNumbers) {
50369 return '0b' + argument.toString(2);
50370 }
50371 if (useOctNumbers) {
50372 return '0o' + argument.toString(8);
50373 }
50374 } else if (!isObject(argument)) {
50375 if (json) {
50376 // For some values (e.g. `undefined`, `function` objects),
50377 // `JSON.stringify(value)` returns `undefined` (which isn’t valid
50378 // JSON) instead of `'null'`.
50379 return JSON.stringify(argument) || 'null';
50380 }
50381 return String(argument);
50382 } else {
50383 // it’s an object
50384 result = [];
50385 options.wrap = true;
50386 oldIndent = options.__indent__;
50387 indent += oldIndent;
50388 options.__indent__ = indent;
50389 forOwn(argument, function (key, value) {
50390 isEmpty = false;
50391 result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options));
50392 });
50393 if (isEmpty) {
50394 return '{}';
50395 }
50396 return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
50397 }
50398 }
50399
50400 var string = argument;
50401 // Loop over each code unit in the string and escape it
50402 var index = -1;
50403 var length = string.length;
50404 var first;
50405 var second;
50406 var codePoint;
50407 result = '';
50408 while (++index < length) {
50409 var character = string.charAt(index);
50410 if (options.es6) {
50411 first = string.charCodeAt(index);
50412 if ( // check if it’s the start of a surrogate pair
50413 first >= 0xD800 && first <= 0xDBFF && // high surrogate
50414 length > index + 1 // there is a next code unit
50415 ) {
50416 second = string.charCodeAt(index + 1);
50417 if (second >= 0xDC00 && second <= 0xDFFF) {
50418 // low surrogate
50419 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
50420 codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
50421 var hexadecimal = codePoint.toString(16);
50422 if (!lowercaseHex) {
50423 hexadecimal = hexadecimal.toUpperCase();
50424 }
50425 result += '\\u{' + hexadecimal + '}';
50426 index++;
50427 continue;
50428 }
50429 }
50430 }
50431 if (!options.escapeEverything) {
50432 if (regexWhitelist.test(character)) {
50433 // It’s a printable ASCII character that is not `"`, `'` or `\`,
50434 // so don’t escape it.
50435 result += character;
50436 continue;
50437 }
50438 if (character == '"') {
50439 result += quote == character ? '\\"' : character;
50440 continue;
50441 }
50442 if (character == '\'') {
50443 result += quote == character ? '\\\'' : character;
50444 continue;
50445 }
50446 }
50447 if (character == '\0' && !json && !regexDigit.test(string.charAt(index + 1))) {
50448 result += '\\0';
50449 continue;
50450 }
50451 if (regexSingleEscape.test(character)) {
50452 // no need for a `hasOwnProperty` check here
50453 result += singleEscapes[character];
50454 continue;
50455 }
50456 var charCode = character.charCodeAt(0);
50457 var hexadecimal = charCode.toString(16);
50458 if (!lowercaseHex) {
50459 hexadecimal = hexadecimal.toUpperCase();
50460 }
50461 var longhand = hexadecimal.length > 2 || json;
50462 var escaped = '\\' + (longhand ? 'u' : 'x') + ('0000' + hexadecimal).slice(longhand ? -4 : -2);
50463 result += escaped;
50464 continue;
50465 }
50466 if (options.wrap) {
50467 result = quote + result + quote;
50468 }
50469 if (options.escapeEtago) {
50470 // https://mathiasbynens.be/notes/etago
50471 return result.replace(/<\/(script|style)/gi, '<\\/$1');
50472 }
50473 return result;
50474 };
50475
50476 jsesc.version = '1.3.0';
50477
50478 /*--------------------------------------------------------------------------*/
50479
50480 // Some AMD build optimizers, like r.js, check for specific condition patterns
50481 // like the following:
50482 if ("function" == 'function' && _typeof(__webpack_require__(49)) == 'object' && __webpack_require__(49)) {
50483 !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
50484 return jsesc;
50485 }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
50486 } else if (freeExports && !freeExports.nodeType) {
50487 if (freeModule) {
50488 // in Node.js or RingoJS v0.8.0+
50489 freeModule.exports = jsesc;
50490 } else {
50491 // in Narwhal or RingoJS v0.7.0-
50492 freeExports.jsesc = jsesc;
50493 }
50494 } else {
50495 // in Rhino or a web browser
50496 root.jsesc = jsesc;
50497 }
50498 })(undefined);
50499 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(39)(module), (function() { return this; }())))
50500
50501/***/ }),
50502/* 470 */
50503/***/ (function(module, exports, __webpack_require__) {
50504
50505 "use strict";
50506
50507 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
50508
50509 // json5.js
50510 // Modern JSON. See README.md for details.
50511 //
50512 // This file is based directly off of Douglas Crockford's json_parse.js:
50513 // https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js
50514
50515 var JSON5 = ( false ? "undefined" : _typeof(exports)) === 'object' ? exports : {};
50516
50517 JSON5.parse = function () {
50518 "use strict";
50519
50520 // This is a function that can parse a JSON5 text, producing a JavaScript
50521 // data structure. It is a simple, recursive descent parser. It does not use
50522 // eval or regular expressions, so it can be used as a model for implementing
50523 // a JSON5 parser in other languages.
50524
50525 // We are defining the function inside of another function to avoid creating
50526 // global variables.
50527
50528 var at,
50529 // The index of the current character
50530 lineNumber,
50531 // The current line number
50532 columnNumber,
50533 // The current column number
50534 ch,
50535 // The current character
50536 escapee = {
50537 "'": "'",
50538 '"': '"',
50539 '\\': '\\',
50540 '/': '/',
50541 '\n': '', // Replace escaped newlines in strings w/ empty string
50542 b: '\b',
50543 f: '\f',
50544 n: '\n',
50545 r: '\r',
50546 t: '\t'
50547 },
50548 ws = [' ', '\t', '\r', '\n', '\v', '\f', '\xA0', "\uFEFF"],
50549 text,
50550 renderChar = function renderChar(chr) {
50551 return chr === '' ? 'EOF' : "'" + chr + "'";
50552 },
50553 error = function error(m) {
50554
50555 // Call error when something is wrong.
50556
50557 var error = new SyntaxError();
50558 // beginning of message suffix to agree with that provided by Gecko - see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
50559 error.message = m + " at line " + lineNumber + " column " + columnNumber + " of the JSON5 data. Still to read: " + JSON.stringify(text.substring(at - 1, at + 19));
50560 error.at = at;
50561 // These two property names have been chosen to agree with the ones in Gecko, the only popular
50562 // environment which seems to supply this info on JSON.parse
50563 error.lineNumber = lineNumber;
50564 error.columnNumber = columnNumber;
50565 throw error;
50566 },
50567 next = function next(c) {
50568
50569 // If a c parameter is provided, verify that it matches the current character.
50570
50571 if (c && c !== ch) {
50572 error("Expected " + renderChar(c) + " instead of " + renderChar(ch));
50573 }
50574
50575 // Get the next character. When there are no more characters,
50576 // return the empty string.
50577
50578 ch = text.charAt(at);
50579 at++;
50580 columnNumber++;
50581 if (ch === '\n' || ch === '\r' && peek() !== '\n') {
50582 lineNumber++;
50583 columnNumber = 0;
50584 }
50585 return ch;
50586 },
50587 peek = function peek() {
50588
50589 // Get the next character without consuming it or
50590 // assigning it to the ch varaible.
50591
50592 return text.charAt(at);
50593 },
50594 identifier = function identifier() {
50595
50596 // Parse an identifier. Normally, reserved words are disallowed here, but we
50597 // only use this for unquoted object keys, where reserved words are allowed,
50598 // so we don't check for those here. References:
50599 // - http://es5.github.com/#x7.6
50600 // - https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#Variables
50601 // - http://docstore.mik.ua/orelly/webprog/jscript/ch02_07.htm
50602 // TODO Identifiers can have Unicode "letters" in them; add support for those.
50603
50604 var key = ch;
50605
50606 // Identifiers must start with a letter, _ or $.
50607 if (ch !== '_' && ch !== '$' && (ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z')) {
50608 error("Bad identifier as unquoted key");
50609 }
50610
50611 // Subsequent characters can contain digits.
50612 while (next() && (ch === '_' || ch === '$' || ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || ch >= '0' && ch <= '9')) {
50613 key += ch;
50614 }
50615
50616 return key;
50617 },
50618 number = function number() {
50619
50620 // Parse a number value.
50621
50622 var number,
50623 sign = '',
50624 string = '',
50625 base = 10;
50626
50627 if (ch === '-' || ch === '+') {
50628 sign = ch;
50629 next(ch);
50630 }
50631
50632 // support for Infinity (could tweak to allow other words):
50633 if (ch === 'I') {
50634 number = word();
50635 if (typeof number !== 'number' || isNaN(number)) {
50636 error('Unexpected word for number');
50637 }
50638 return sign === '-' ? -number : number;
50639 }
50640
50641 // support for NaN
50642 if (ch === 'N') {
50643 number = word();
50644 if (!isNaN(number)) {
50645 error('expected word to be NaN');
50646 }
50647 // ignore sign as -NaN also is NaN
50648 return number;
50649 }
50650
50651 if (ch === '0') {
50652 string += ch;
50653 next();
50654 if (ch === 'x' || ch === 'X') {
50655 string += ch;
50656 next();
50657 base = 16;
50658 } else if (ch >= '0' && ch <= '9') {
50659 error('Octal literal');
50660 }
50661 }
50662
50663 switch (base) {
50664 case 10:
50665 while (ch >= '0' && ch <= '9') {
50666 string += ch;
50667 next();
50668 }
50669 if (ch === '.') {
50670 string += '.';
50671 while (next() && ch >= '0' && ch <= '9') {
50672 string += ch;
50673 }
50674 }
50675 if (ch === 'e' || ch === 'E') {
50676 string += ch;
50677 next();
50678 if (ch === '-' || ch === '+') {
50679 string += ch;
50680 next();
50681 }
50682 while (ch >= '0' && ch <= '9') {
50683 string += ch;
50684 next();
50685 }
50686 }
50687 break;
50688 case 16:
50689 while (ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'F' || ch >= 'a' && ch <= 'f') {
50690 string += ch;
50691 next();
50692 }
50693 break;
50694 }
50695
50696 if (sign === '-') {
50697 number = -string;
50698 } else {
50699 number = +string;
50700 }
50701
50702 if (!isFinite(number)) {
50703 error("Bad number");
50704 } else {
50705 return number;
50706 }
50707 },
50708 string = function string() {
50709
50710 // Parse a string value.
50711
50712 var hex,
50713 i,
50714 string = '',
50715 delim,
50716 // double quote or single quote
50717 uffff;
50718
50719 // When parsing for string values, we must look for ' or " and \ characters.
50720
50721 if (ch === '"' || ch === "'") {
50722 delim = ch;
50723 while (next()) {
50724 if (ch === delim) {
50725 next();
50726 return string;
50727 } else if (ch === '\\') {
50728 next();
50729 if (ch === 'u') {
50730 uffff = 0;
50731 for (i = 0; i < 4; i += 1) {
50732 hex = parseInt(next(), 16);
50733 if (!isFinite(hex)) {
50734 break;
50735 }
50736 uffff = uffff * 16 + hex;
50737 }
50738 string += String.fromCharCode(uffff);
50739 } else if (ch === '\r') {
50740 if (peek() === '\n') {
50741 next();
50742 }
50743 } else if (typeof escapee[ch] === 'string') {
50744 string += escapee[ch];
50745 } else {
50746 break;
50747 }
50748 } else if (ch === '\n') {
50749 // unescaped newlines are invalid; see:
50750 // https://github.com/aseemk/json5/issues/24
50751 // TODO this feels special-cased; are there other
50752 // invalid unescaped chars?
50753 break;
50754 } else {
50755 string += ch;
50756 }
50757 }
50758 }
50759 error("Bad string");
50760 },
50761 inlineComment = function inlineComment() {
50762
50763 // Skip an inline comment, assuming this is one. The current character should
50764 // be the second / character in the // pair that begins this inline comment.
50765 // To finish the inline comment, we look for a newline or the end of the text.
50766
50767 if (ch !== '/') {
50768 error("Not an inline comment");
50769 }
50770
50771 do {
50772 next();
50773 if (ch === '\n' || ch === '\r') {
50774 next();
50775 return;
50776 }
50777 } while (ch);
50778 },
50779 blockComment = function blockComment() {
50780
50781 // Skip a block comment, assuming this is one. The current character should be
50782 // the * character in the /* pair that begins this block comment.
50783 // To finish the block comment, we look for an ending */ pair of characters,
50784 // but we also watch for the end of text before the comment is terminated.
50785
50786 if (ch !== '*') {
50787 error("Not a block comment");
50788 }
50789
50790 do {
50791 next();
50792 while (ch === '*') {
50793 next('*');
50794 if (ch === '/') {
50795 next('/');
50796 return;
50797 }
50798 }
50799 } while (ch);
50800
50801 error("Unterminated block comment");
50802 },
50803 comment = function comment() {
50804
50805 // Skip a comment, whether inline or block-level, assuming this is one.
50806 // Comments always begin with a / character.
50807
50808 if (ch !== '/') {
50809 error("Not a comment");
50810 }
50811
50812 next('/');
50813
50814 if (ch === '/') {
50815 inlineComment();
50816 } else if (ch === '*') {
50817 blockComment();
50818 } else {
50819 error("Unrecognized comment");
50820 }
50821 },
50822 white = function white() {
50823
50824 // Skip whitespace and comments.
50825 // Note that we're detecting comments by only a single / character.
50826 // This works since regular expressions are not valid JSON(5), but this will
50827 // break if there are other valid values that begin with a / character!
50828
50829 while (ch) {
50830 if (ch === '/') {
50831 comment();
50832 } else if (ws.indexOf(ch) >= 0) {
50833 next();
50834 } else {
50835 return;
50836 }
50837 }
50838 },
50839 word = function word() {
50840
50841 // true, false, or null.
50842
50843 switch (ch) {
50844 case 't':
50845 next('t');
50846 next('r');
50847 next('u');
50848 next('e');
50849 return true;
50850 case 'f':
50851 next('f');
50852 next('a');
50853 next('l');
50854 next('s');
50855 next('e');
50856 return false;
50857 case 'n':
50858 next('n');
50859 next('u');
50860 next('l');
50861 next('l');
50862 return null;
50863 case 'I':
50864 next('I');
50865 next('n');
50866 next('f');
50867 next('i');
50868 next('n');
50869 next('i');
50870 next('t');
50871 next('y');
50872 return Infinity;
50873 case 'N':
50874 next('N');
50875 next('a');
50876 next('N');
50877 return NaN;
50878 }
50879 error("Unexpected " + renderChar(ch));
50880 },
50881 value,
50882 // Place holder for the value function.
50883
50884 array = function array() {
50885
50886 // Parse an array value.
50887
50888 var array = [];
50889
50890 if (ch === '[') {
50891 next('[');
50892 white();
50893 while (ch) {
50894 if (ch === ']') {
50895 next(']');
50896 return array; // Potentially empty array
50897 }
50898 // ES5 allows omitting elements in arrays, e.g. [,] and
50899 // [,null]. We don't allow this in JSON5.
50900 if (ch === ',') {
50901 error("Missing array element");
50902 } else {
50903 array.push(value());
50904 }
50905 white();
50906 // If there's no comma after this value, this needs to
50907 // be the end of the array.
50908 if (ch !== ',') {
50909 next(']');
50910 return array;
50911 }
50912 next(',');
50913 white();
50914 }
50915 }
50916 error("Bad array");
50917 },
50918 object = function object() {
50919
50920 // Parse an object value.
50921
50922 var key,
50923 object = {};
50924
50925 if (ch === '{') {
50926 next('{');
50927 white();
50928 while (ch) {
50929 if (ch === '}') {
50930 next('}');
50931 return object; // Potentially empty object
50932 }
50933
50934 // Keys can be unquoted. If they are, they need to be
50935 // valid JS identifiers.
50936 if (ch === '"' || ch === "'") {
50937 key = string();
50938 } else {
50939 key = identifier();
50940 }
50941
50942 white();
50943 next(':');
50944 object[key] = value();
50945 white();
50946 // If there's no comma after this pair, this needs to be
50947 // the end of the object.
50948 if (ch !== ',') {
50949 next('}');
50950 return object;
50951 }
50952 next(',');
50953 white();
50954 }
50955 }
50956 error("Bad object");
50957 };
50958
50959 value = function value() {
50960
50961 // Parse a JSON value. It could be an object, an array, a string, a number,
50962 // or a word.
50963
50964 white();
50965 switch (ch) {
50966 case '{':
50967 return object();
50968 case '[':
50969 return array();
50970 case '"':
50971 case "'":
50972 return string();
50973 case '-':
50974 case '+':
50975 case '.':
50976 return number();
50977 default:
50978 return ch >= '0' && ch <= '9' ? number() : word();
50979 }
50980 };
50981
50982 // Return the json_parse function. It will have access to all of the above
50983 // functions and variables.
50984
50985 return function (source, reviver) {
50986 var result;
50987
50988 text = String(source);
50989 at = 0;
50990 lineNumber = 1;
50991 columnNumber = 1;
50992 ch = ' ';
50993 result = value();
50994 white();
50995 if (ch) {
50996 error("Syntax error");
50997 }
50998
50999 // If there is a reviver function, we recursively walk the new structure,
51000 // passing each name/value pair to the reviver function for possible
51001 // transformation, starting with a temporary root object that holds the result
51002 // in an empty key. If there is not a reviver function, we simply return the
51003 // result.
51004
51005 return typeof reviver === 'function' ? function walk(holder, key) {
51006 var k,
51007 v,
51008 value = holder[key];
51009 if (value && (typeof value === "undefined" ? "undefined" : _typeof(value)) === 'object') {
51010 for (k in value) {
51011 if (Object.prototype.hasOwnProperty.call(value, k)) {
51012 v = walk(value, k);
51013 if (v !== undefined) {
51014 value[k] = v;
51015 } else {
51016 delete value[k];
51017 }
51018 }
51019 }
51020 }
51021 return reviver.call(holder, key, value);
51022 }({ '': result }, '') : result;
51023 };
51024 }();
51025
51026 // JSON5 stringify will not quote keys where appropriate
51027 JSON5.stringify = function (obj, replacer, space) {
51028 if (replacer && typeof replacer !== "function" && !isArray(replacer)) {
51029 throw new Error('Replacer must be a function or an array');
51030 }
51031 var getReplacedValueOrUndefined = function getReplacedValueOrUndefined(holder, key, isTopLevel) {
51032 var value = holder[key];
51033
51034 // Replace the value with its toJSON value first, if possible
51035 if (value && value.toJSON && typeof value.toJSON === "function") {
51036 value = value.toJSON();
51037 }
51038
51039 // If the user-supplied replacer if a function, call it. If it's an array, check objects' string keys for
51040 // presence in the array (removing the key/value pair from the resulting JSON if the key is missing).
51041 if (typeof replacer === "function") {
51042 return replacer.call(holder, key, value);
51043 } else if (replacer) {
51044 if (isTopLevel || isArray(holder) || replacer.indexOf(key) >= 0) {
51045 return value;
51046 } else {
51047 return undefined;
51048 }
51049 } else {
51050 return value;
51051 }
51052 };
51053
51054 function isWordChar(c) {
51055 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '_' || c === '$';
51056 }
51057
51058 function isWordStart(c) {
51059 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '_' || c === '$';
51060 }
51061
51062 function isWord(key) {
51063 if (typeof key !== 'string') {
51064 return false;
51065 }
51066 if (!isWordStart(key[0])) {
51067 return false;
51068 }
51069 var i = 1,
51070 length = key.length;
51071 while (i < length) {
51072 if (!isWordChar(key[i])) {
51073 return false;
51074 }
51075 i++;
51076 }
51077 return true;
51078 }
51079
51080 // export for use in tests
51081 JSON5.isWord = isWord;
51082
51083 // polyfills
51084 function isArray(obj) {
51085 if (Array.isArray) {
51086 return Array.isArray(obj);
51087 } else {
51088 return Object.prototype.toString.call(obj) === '[object Array]';
51089 }
51090 }
51091
51092 function isDate(obj) {
51093 return Object.prototype.toString.call(obj) === '[object Date]';
51094 }
51095
51096 var objStack = [];
51097 function checkForCircular(obj) {
51098 for (var i = 0; i < objStack.length; i++) {
51099 if (objStack[i] === obj) {
51100 throw new TypeError("Converting circular structure to JSON");
51101 }
51102 }
51103 }
51104
51105 function makeIndent(str, num, noNewLine) {
51106 if (!str) {
51107 return "";
51108 }
51109 // indentation no more than 10 chars
51110 if (str.length > 10) {
51111 str = str.substring(0, 10);
51112 }
51113
51114 var indent = noNewLine ? "" : "\n";
51115 for (var i = 0; i < num; i++) {
51116 indent += str;
51117 }
51118
51119 return indent;
51120 }
51121
51122 var indentStr;
51123 if (space) {
51124 if (typeof space === "string") {
51125 indentStr = space;
51126 } else if (typeof space === "number" && space >= 0) {
51127 indentStr = makeIndent(" ", space, true);
51128 } else {
51129 // ignore space parameter
51130 }
51131 }
51132
51133 // Copied from Crokford's implementation of JSON
51134 // See https://github.com/douglascrockford/JSON-js/blob/e39db4b7e6249f04a195e7dd0840e610cc9e941e/json2.js#L195
51135 // Begin
51136 var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
51137 escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
51138 meta = { // table of character substitutions
51139 '\b': '\\b',
51140 '\t': '\\t',
51141 '\n': '\\n',
51142 '\f': '\\f',
51143 '\r': '\\r',
51144 '"': '\\"',
51145 '\\': '\\\\'
51146 };
51147 function escapeString(string) {
51148
51149 // If the string contains no control characters, no quote characters, and no
51150 // backslash characters, then we can safely slap some quotes around it.
51151 // Otherwise we must also replace the offending characters with safe escape
51152 // sequences.
51153 escapable.lastIndex = 0;
51154 return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
51155 var c = meta[a];
51156 return typeof c === 'string' ? c : "\\u" + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
51157 }) + '"' : '"' + string + '"';
51158 }
51159 // End
51160
51161 function internalStringify(holder, key, isTopLevel) {
51162 var buffer, res;
51163
51164 // Replace the value, if necessary
51165 var obj_part = getReplacedValueOrUndefined(holder, key, isTopLevel);
51166
51167 if (obj_part && !isDate(obj_part)) {
51168 // unbox objects
51169 // don't unbox dates, since will turn it into number
51170 obj_part = obj_part.valueOf();
51171 }
51172 switch (typeof obj_part === "undefined" ? "undefined" : _typeof(obj_part)) {
51173 case "boolean":
51174 return obj_part.toString();
51175
51176 case "number":
51177 if (isNaN(obj_part) || !isFinite(obj_part)) {
51178 return "null";
51179 }
51180 return obj_part.toString();
51181
51182 case "string":
51183 return escapeString(obj_part.toString());
51184
51185 case "object":
51186 if (obj_part === null) {
51187 return "null";
51188 } else if (isArray(obj_part)) {
51189 checkForCircular(obj_part);
51190 buffer = "[";
51191 objStack.push(obj_part);
51192
51193 for (var i = 0; i < obj_part.length; i++) {
51194 res = internalStringify(obj_part, i, false);
51195 buffer += makeIndent(indentStr, objStack.length);
51196 if (res === null || typeof res === "undefined") {
51197 buffer += "null";
51198 } else {
51199 buffer += res;
51200 }
51201 if (i < obj_part.length - 1) {
51202 buffer += ",";
51203 } else if (indentStr) {
51204 buffer += "\n";
51205 }
51206 }
51207 objStack.pop();
51208 if (obj_part.length) {
51209 buffer += makeIndent(indentStr, objStack.length, true);
51210 }
51211 buffer += "]";
51212 } else {
51213 checkForCircular(obj_part);
51214 buffer = "{";
51215 var nonEmpty = false;
51216 objStack.push(obj_part);
51217 for (var prop in obj_part) {
51218 if (obj_part.hasOwnProperty(prop)) {
51219 var value = internalStringify(obj_part, prop, false);
51220 isTopLevel = false;
51221 if (typeof value !== "undefined" && value !== null) {
51222 buffer += makeIndent(indentStr, objStack.length);
51223 nonEmpty = true;
51224 key = isWord(prop) ? prop : escapeString(prop);
51225 buffer += key + ":" + (indentStr ? ' ' : '') + value + ",";
51226 }
51227 }
51228 }
51229 objStack.pop();
51230 if (nonEmpty) {
51231 buffer = buffer.substring(0, buffer.length - 1) + makeIndent(indentStr, objStack.length) + "}";
51232 } else {
51233 buffer = '{}';
51234 }
51235 }
51236 return buffer;
51237 default:
51238 // functions and undefined should be ignored
51239 return undefined;
51240 }
51241 }
51242
51243 // special case...when undefined is used inside of
51244 // a compound object/array, return null.
51245 // but when top-level, return undefined
51246 var topLevelHolder = { "": obj };
51247 if (obj === undefined) {
51248 return getReplacedValueOrUndefined(topLevelHolder, '', true);
51249 }
51250 return internalStringify(topLevelHolder, '', true);
51251 };
51252
51253/***/ }),
51254/* 471 */
51255/***/ (function(module, exports) {
51256
51257 'use strict';
51258
51259 var arr = [];
51260 var charCodeCache = [];
51261
51262 module.exports = function (a, b) {
51263 if (a === b) {
51264 return 0;
51265 }
51266
51267 var aLen = a.length;
51268 var bLen = b.length;
51269
51270 if (aLen === 0) {
51271 return bLen;
51272 }
51273
51274 if (bLen === 0) {
51275 return aLen;
51276 }
51277
51278 var bCharCode;
51279 var ret;
51280 var tmp;
51281 var tmp2;
51282 var i = 0;
51283 var j = 0;
51284
51285 while (i < aLen) {
51286 charCodeCache[i] = a.charCodeAt(i);
51287 arr[i] = ++i;
51288 }
51289
51290 while (j < bLen) {
51291 bCharCode = b.charCodeAt(j);
51292 tmp = j++;
51293 ret = j;
51294
51295 for (i = 0; i < aLen; i++) {
51296 tmp2 = bCharCode === charCodeCache[i] ? tmp : tmp + 1;
51297 tmp = arr[i];
51298 ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2;
51299 }
51300 }
51301
51302 return ret;
51303 };
51304
51305/***/ }),
51306/* 472 */
51307/***/ (function(module, exports, __webpack_require__) {
51308
51309 'use strict';
51310
51311 var getNative = __webpack_require__(38),
51312 root = __webpack_require__(17);
51313
51314 /* Built-in method references that are verified to be native. */
51315 var DataView = getNative(root, 'DataView');
51316
51317 module.exports = DataView;
51318
51319/***/ }),
51320/* 473 */
51321/***/ (function(module, exports, __webpack_require__) {
51322
51323 'use strict';
51324
51325 var hashClear = __webpack_require__(536),
51326 hashDelete = __webpack_require__(537),
51327 hashGet = __webpack_require__(538),
51328 hashHas = __webpack_require__(539),
51329 hashSet = __webpack_require__(540);
51330
51331 /**
51332 * Creates a hash object.
51333 *
51334 * @private
51335 * @constructor
51336 * @param {Array} [entries] The key-value pairs to cache.
51337 */
51338 function Hash(entries) {
51339 var index = -1,
51340 length = entries == null ? 0 : entries.length;
51341
51342 this.clear();
51343 while (++index < length) {
51344 var entry = entries[index];
51345 this.set(entry[0], entry[1]);
51346 }
51347 }
51348
51349 // Add methods to `Hash`.
51350 Hash.prototype.clear = hashClear;
51351 Hash.prototype['delete'] = hashDelete;
51352 Hash.prototype.get = hashGet;
51353 Hash.prototype.has = hashHas;
51354 Hash.prototype.set = hashSet;
51355
51356 module.exports = Hash;
51357
51358/***/ }),
51359/* 474 */
51360/***/ (function(module, exports, __webpack_require__) {
51361
51362 'use strict';
51363
51364 var getNative = __webpack_require__(38),
51365 root = __webpack_require__(17);
51366
51367 /* Built-in method references that are verified to be native. */
51368 var Promise = getNative(root, 'Promise');
51369
51370 module.exports = Promise;
51371
51372/***/ }),
51373/* 475 */
51374/***/ (function(module, exports, __webpack_require__) {
51375
51376 'use strict';
51377
51378 var getNative = __webpack_require__(38),
51379 root = __webpack_require__(17);
51380
51381 /* Built-in method references that are verified to be native. */
51382 var WeakMap = getNative(root, 'WeakMap');
51383
51384 module.exports = WeakMap;
51385
51386/***/ }),
51387/* 476 */
51388/***/ (function(module, exports) {
51389
51390 "use strict";
51391
51392 /**
51393 * Adds the key-value `pair` to `map`.
51394 *
51395 * @private
51396 * @param {Object} map The map to modify.
51397 * @param {Array} pair The key-value pair to add.
51398 * @returns {Object} Returns `map`.
51399 */
51400 function addMapEntry(map, pair) {
51401 // Don't return `map.set` because it's not chainable in IE 11.
51402 map.set(pair[0], pair[1]);
51403 return map;
51404 }
51405
51406 module.exports = addMapEntry;
51407
51408/***/ }),
51409/* 477 */
51410/***/ (function(module, exports) {
51411
51412 "use strict";
51413
51414 /**
51415 * Adds `value` to `set`.
51416 *
51417 * @private
51418 * @param {Object} set The set to modify.
51419 * @param {*} value The value to add.
51420 * @returns {Object} Returns `set`.
51421 */
51422 function addSetEntry(set, value) {
51423 // Don't return `set.add` because it's not chainable in IE 11.
51424 set.add(value);
51425 return set;
51426 }
51427
51428 module.exports = addSetEntry;
51429
51430/***/ }),
51431/* 478 */
51432/***/ (function(module, exports) {
51433
51434 "use strict";
51435
51436 /**
51437 * A specialized version of `_.forEach` for arrays without support for
51438 * iteratee shorthands.
51439 *
51440 * @private
51441 * @param {Array} [array] The array to iterate over.
51442 * @param {Function} iteratee The function invoked per iteration.
51443 * @returns {Array} Returns `array`.
51444 */
51445 function arrayEach(array, iteratee) {
51446 var index = -1,
51447 length = array == null ? 0 : array.length;
51448
51449 while (++index < length) {
51450 if (iteratee(array[index], index, array) === false) {
51451 break;
51452 }
51453 }
51454 return array;
51455 }
51456
51457 module.exports = arrayEach;
51458
51459/***/ }),
51460/* 479 */
51461/***/ (function(module, exports) {
51462
51463 "use strict";
51464
51465 /**
51466 * A specialized version of `_.filter` for arrays without support for
51467 * iteratee shorthands.
51468 *
51469 * @private
51470 * @param {Array} [array] The array to iterate over.
51471 * @param {Function} predicate The function invoked per iteration.
51472 * @returns {Array} Returns the new filtered array.
51473 */
51474 function arrayFilter(array, predicate) {
51475 var index = -1,
51476 length = array == null ? 0 : array.length,
51477 resIndex = 0,
51478 result = [];
51479
51480 while (++index < length) {
51481 var value = array[index];
51482 if (predicate(value, index, array)) {
51483 result[resIndex++] = value;
51484 }
51485 }
51486 return result;
51487 }
51488
51489 module.exports = arrayFilter;
51490
51491/***/ }),
51492/* 480 */
51493/***/ (function(module, exports, __webpack_require__) {
51494
51495 'use strict';
51496
51497 var baseIndexOf = __webpack_require__(166);
51498
51499 /**
51500 * A specialized version of `_.includes` for arrays without support for
51501 * specifying an index to search from.
51502 *
51503 * @private
51504 * @param {Array} [array] The array to inspect.
51505 * @param {*} target The value to search for.
51506 * @returns {boolean} Returns `true` if `target` is found, else `false`.
51507 */
51508 function arrayIncludes(array, value) {
51509 var length = array == null ? 0 : array.length;
51510 return !!length && baseIndexOf(array, value, 0) > -1;
51511 }
51512
51513 module.exports = arrayIncludes;
51514
51515/***/ }),
51516/* 481 */
51517/***/ (function(module, exports) {
51518
51519 "use strict";
51520
51521 /**
51522 * This function is like `arrayIncludes` except that it accepts a comparator.
51523 *
51524 * @private
51525 * @param {Array} [array] The array to inspect.
51526 * @param {*} target The value to search for.
51527 * @param {Function} comparator The comparator invoked per element.
51528 * @returns {boolean} Returns `true` if `target` is found, else `false`.
51529 */
51530 function arrayIncludesWith(array, value, comparator) {
51531 var index = -1,
51532 length = array == null ? 0 : array.length;
51533
51534 while (++index < length) {
51535 if (comparator(value, array[index])) {
51536 return true;
51537 }
51538 }
51539 return false;
51540 }
51541
51542 module.exports = arrayIncludesWith;
51543
51544/***/ }),
51545/* 482 */
51546/***/ (function(module, exports) {
51547
51548 "use strict";
51549
51550 /**
51551 * A specialized version of `_.some` for arrays without support for iteratee
51552 * shorthands.
51553 *
51554 * @private
51555 * @param {Array} [array] The array to iterate over.
51556 * @param {Function} predicate The function invoked per iteration.
51557 * @returns {boolean} Returns `true` if any element passes the predicate check,
51558 * else `false`.
51559 */
51560 function arraySome(array, predicate) {
51561 var index = -1,
51562 length = array == null ? 0 : array.length;
51563
51564 while (++index < length) {
51565 if (predicate(array[index], index, array)) {
51566 return true;
51567 }
51568 }
51569 return false;
51570 }
51571
51572 module.exports = arraySome;
51573
51574/***/ }),
51575/* 483 */
51576/***/ (function(module, exports, __webpack_require__) {
51577
51578 'use strict';
51579
51580 var copyObject = __webpack_require__(31),
51581 keys = __webpack_require__(32);
51582
51583 /**
51584 * The base implementation of `_.assign` without support for multiple sources
51585 * or `customizer` functions.
51586 *
51587 * @private
51588 * @param {Object} object The destination object.
51589 * @param {Object} source The source object.
51590 * @returns {Object} Returns `object`.
51591 */
51592 function baseAssign(object, source) {
51593 return object && copyObject(source, keys(source), object);
51594 }
51595
51596 module.exports = baseAssign;
51597
51598/***/ }),
51599/* 484 */
51600/***/ (function(module, exports, __webpack_require__) {
51601
51602 'use strict';
51603
51604 var copyObject = __webpack_require__(31),
51605 keysIn = __webpack_require__(47);
51606
51607 /**
51608 * The base implementation of `_.assignIn` without support for multiple sources
51609 * or `customizer` functions.
51610 *
51611 * @private
51612 * @param {Object} object The destination object.
51613 * @param {Object} source The source object.
51614 * @returns {Object} Returns `object`.
51615 */
51616 function baseAssignIn(object, source) {
51617 return object && copyObject(source, keysIn(source), object);
51618 }
51619
51620 module.exports = baseAssignIn;
51621
51622/***/ }),
51623/* 485 */
51624/***/ (function(module, exports) {
51625
51626 "use strict";
51627
51628 /**
51629 * The base implementation of `_.clamp` which doesn't coerce arguments.
51630 *
51631 * @private
51632 * @param {number} number The number to clamp.
51633 * @param {number} [lower] The lower bound.
51634 * @param {number} upper The upper bound.
51635 * @returns {number} Returns the clamped number.
51636 */
51637 function baseClamp(number, lower, upper) {
51638 if (number === number) {
51639 if (upper !== undefined) {
51640 number = number <= upper ? number : upper;
51641 }
51642 if (lower !== undefined) {
51643 number = number >= lower ? number : lower;
51644 }
51645 }
51646 return number;
51647 }
51648
51649 module.exports = baseClamp;
51650
51651/***/ }),
51652/* 486 */
51653/***/ (function(module, exports, __webpack_require__) {
51654
51655 'use strict';
51656
51657 var isObject = __webpack_require__(18);
51658
51659 /** Built-in value references. */
51660 var objectCreate = Object.create;
51661
51662 /**
51663 * The base implementation of `_.create` without support for assigning
51664 * properties to the created object.
51665 *
51666 * @private
51667 * @param {Object} proto The object to inherit from.
51668 * @returns {Object} Returns the new object.
51669 */
51670 var baseCreate = function () {
51671 function object() {}
51672 return function (proto) {
51673 if (!isObject(proto)) {
51674 return {};
51675 }
51676 if (objectCreate) {
51677 return objectCreate(proto);
51678 }
51679 object.prototype = proto;
51680 var result = new object();
51681 object.prototype = undefined;
51682 return result;
51683 };
51684 }();
51685
51686 module.exports = baseCreate;
51687
51688/***/ }),
51689/* 487 */
51690/***/ (function(module, exports, __webpack_require__) {
51691
51692 'use strict';
51693
51694 var baseForOwn = __webpack_require__(489),
51695 createBaseEach = __webpack_require__(526);
51696
51697 /**
51698 * The base implementation of `_.forEach` without support for iteratee shorthands.
51699 *
51700 * @private
51701 * @param {Array|Object} collection The collection to iterate over.
51702 * @param {Function} iteratee The function invoked per iteration.
51703 * @returns {Array|Object} Returns `collection`.
51704 */
51705 var baseEach = createBaseEach(baseForOwn);
51706
51707 module.exports = baseEach;
51708
51709/***/ }),
51710/* 488 */
51711/***/ (function(module, exports, __webpack_require__) {
51712
51713 'use strict';
51714
51715 var arrayPush = __webpack_require__(161),
51716 isFlattenable = __webpack_require__(543);
51717
51718 /**
51719 * The base implementation of `_.flatten` with support for restricting flattening.
51720 *
51721 * @private
51722 * @param {Array} array The array to flatten.
51723 * @param {number} depth The maximum recursion depth.
51724 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
51725 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
51726 * @param {Array} [result=[]] The initial result value.
51727 * @returns {Array} Returns the new flattened array.
51728 */
51729 function baseFlatten(array, depth, predicate, isStrict, result) {
51730 var index = -1,
51731 length = array.length;
51732
51733 predicate || (predicate = isFlattenable);
51734 result || (result = []);
51735
51736 while (++index < length) {
51737 var value = array[index];
51738 if (depth > 0 && predicate(value)) {
51739 if (depth > 1) {
51740 // Recursively flatten arrays (susceptible to call stack limits).
51741 baseFlatten(value, depth - 1, predicate, isStrict, result);
51742 } else {
51743 arrayPush(result, value);
51744 }
51745 } else if (!isStrict) {
51746 result[result.length] = value;
51747 }
51748 }
51749 return result;
51750 }
51751
51752 module.exports = baseFlatten;
51753
51754/***/ }),
51755/* 489 */
51756/***/ (function(module, exports, __webpack_require__) {
51757
51758 'use strict';
51759
51760 var baseFor = __webpack_require__(248),
51761 keys = __webpack_require__(32);
51762
51763 /**
51764 * The base implementation of `_.forOwn` without support for iteratee shorthands.
51765 *
51766 * @private
51767 * @param {Object} object The object to iterate over.
51768 * @param {Function} iteratee The function invoked per iteration.
51769 * @returns {Object} Returns `object`.
51770 */
51771 function baseForOwn(object, iteratee) {
51772 return object && baseFor(object, iteratee, keys);
51773 }
51774
51775 module.exports = baseForOwn;
51776
51777/***/ }),
51778/* 490 */
51779/***/ (function(module, exports) {
51780
51781 "use strict";
51782
51783 /** Used for built-in method references. */
51784 var objectProto = Object.prototype;
51785
51786 /** Used to check objects for own properties. */
51787 var hasOwnProperty = objectProto.hasOwnProperty;
51788
51789 /**
51790 * The base implementation of `_.has` without support for deep paths.
51791 *
51792 * @private
51793 * @param {Object} [object] The object to query.
51794 * @param {Array|string} key The key to check.
51795 * @returns {boolean} Returns `true` if `key` exists, else `false`.
51796 */
51797 function baseHas(object, key) {
51798 return object != null && hasOwnProperty.call(object, key);
51799 }
51800
51801 module.exports = baseHas;
51802
51803/***/ }),
51804/* 491 */
51805/***/ (function(module, exports) {
51806
51807 "use strict";
51808
51809 /**
51810 * The base implementation of `_.hasIn` without support for deep paths.
51811 *
51812 * @private
51813 * @param {Object} [object] The object to query.
51814 * @param {Array|string} key The key to check.
51815 * @returns {boolean} Returns `true` if `key` exists, else `false`.
51816 */
51817 function baseHasIn(object, key) {
51818 return object != null && key in Object(object);
51819 }
51820
51821 module.exports = baseHasIn;
51822
51823/***/ }),
51824/* 492 */
51825/***/ (function(module, exports) {
51826
51827 "use strict";
51828
51829 /**
51830 * This function is like `baseIndexOf` except that it accepts a comparator.
51831 *
51832 * @private
51833 * @param {Array} array The array to inspect.
51834 * @param {*} value The value to search for.
51835 * @param {number} fromIndex The index to search from.
51836 * @param {Function} comparator The comparator invoked per element.
51837 * @returns {number} Returns the index of the matched value, else `-1`.
51838 */
51839 function baseIndexOfWith(array, value, fromIndex, comparator) {
51840 var index = fromIndex - 1,
51841 length = array.length;
51842
51843 while (++index < length) {
51844 if (comparator(array[index], value)) {
51845 return index;
51846 }
51847 }
51848 return -1;
51849 }
51850
51851 module.exports = baseIndexOfWith;
51852
51853/***/ }),
51854/* 493 */
51855/***/ (function(module, exports, __webpack_require__) {
51856
51857 'use strict';
51858
51859 var baseGetTag = __webpack_require__(30),
51860 isObjectLike = __webpack_require__(25);
51861
51862 /** `Object#toString` result references. */
51863 var argsTag = '[object Arguments]';
51864
51865 /**
51866 * The base implementation of `_.isArguments`.
51867 *
51868 * @private
51869 * @param {*} value The value to check.
51870 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
51871 */
51872 function baseIsArguments(value) {
51873 return isObjectLike(value) && baseGetTag(value) == argsTag;
51874 }
51875
51876 module.exports = baseIsArguments;
51877
51878/***/ }),
51879/* 494 */
51880/***/ (function(module, exports, __webpack_require__) {
51881
51882 'use strict';
51883
51884 var Stack = __webpack_require__(99),
51885 equalArrays = __webpack_require__(260),
51886 equalByTag = __webpack_require__(530),
51887 equalObjects = __webpack_require__(531),
51888 getTag = __webpack_require__(264),
51889 isArray = __webpack_require__(6),
51890 isBuffer = __webpack_require__(113),
51891 isTypedArray = __webpack_require__(177);
51892
51893 /** Used to compose bitmasks for value comparisons. */
51894 var COMPARE_PARTIAL_FLAG = 1;
51895
51896 /** `Object#toString` result references. */
51897 var argsTag = '[object Arguments]',
51898 arrayTag = '[object Array]',
51899 objectTag = '[object Object]';
51900
51901 /** Used for built-in method references. */
51902 var objectProto = Object.prototype;
51903
51904 /** Used to check objects for own properties. */
51905 var hasOwnProperty = objectProto.hasOwnProperty;
51906
51907 /**
51908 * A specialized version of `baseIsEqual` for arrays and objects which performs
51909 * deep comparisons and tracks traversed objects enabling objects with circular
51910 * references to be compared.
51911 *
51912 * @private
51913 * @param {Object} object The object to compare.
51914 * @param {Object} other The other object to compare.
51915 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
51916 * @param {Function} customizer The function to customize comparisons.
51917 * @param {Function} equalFunc The function to determine equivalents of values.
51918 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
51919 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
51920 */
51921 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
51922 var objIsArr = isArray(object),
51923 othIsArr = isArray(other),
51924 objTag = objIsArr ? arrayTag : getTag(object),
51925 othTag = othIsArr ? arrayTag : getTag(other);
51926
51927 objTag = objTag == argsTag ? objectTag : objTag;
51928 othTag = othTag == argsTag ? objectTag : othTag;
51929
51930 var objIsObj = objTag == objectTag,
51931 othIsObj = othTag == objectTag,
51932 isSameTag = objTag == othTag;
51933
51934 if (isSameTag && isBuffer(object)) {
51935 if (!isBuffer(other)) {
51936 return false;
51937 }
51938 objIsArr = true;
51939 objIsObj = false;
51940 }
51941 if (isSameTag && !objIsObj) {
51942 stack || (stack = new Stack());
51943 return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
51944 }
51945 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
51946 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
51947 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
51948
51949 if (objIsWrapped || othIsWrapped) {
51950 var objUnwrapped = objIsWrapped ? object.value() : object,
51951 othUnwrapped = othIsWrapped ? other.value() : other;
51952
51953 stack || (stack = new Stack());
51954 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
51955 }
51956 }
51957 if (!isSameTag) {
51958 return false;
51959 }
51960 stack || (stack = new Stack());
51961 return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
51962 }
51963
51964 module.exports = baseIsEqualDeep;
51965
51966/***/ }),
51967/* 495 */
51968/***/ (function(module, exports, __webpack_require__) {
51969
51970 'use strict';
51971
51972 var Stack = __webpack_require__(99),
51973 baseIsEqual = __webpack_require__(251);
51974
51975 /** Used to compose bitmasks for value comparisons. */
51976 var COMPARE_PARTIAL_FLAG = 1,
51977 COMPARE_UNORDERED_FLAG = 2;
51978
51979 /**
51980 * The base implementation of `_.isMatch` without support for iteratee shorthands.
51981 *
51982 * @private
51983 * @param {Object} object The object to inspect.
51984 * @param {Object} source The object of property values to match.
51985 * @param {Array} matchData The property names, values, and compare flags to match.
51986 * @param {Function} [customizer] The function to customize comparisons.
51987 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
51988 */
51989 function baseIsMatch(object, source, matchData, customizer) {
51990 var index = matchData.length,
51991 length = index,
51992 noCustomizer = !customizer;
51993
51994 if (object == null) {
51995 return !length;
51996 }
51997 object = Object(object);
51998 while (index--) {
51999 var data = matchData[index];
52000 if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
52001 return false;
52002 }
52003 }
52004 while (++index < length) {
52005 data = matchData[index];
52006 var key = data[0],
52007 objValue = object[key],
52008 srcValue = data[1];
52009
52010 if (noCustomizer && data[2]) {
52011 if (objValue === undefined && !(key in object)) {
52012 return false;
52013 }
52014 } else {
52015 var stack = new Stack();
52016 if (customizer) {
52017 var result = customizer(objValue, srcValue, key, object, source, stack);
52018 }
52019 if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
52020 return false;
52021 }
52022 }
52023 }
52024 return true;
52025 }
52026
52027 module.exports = baseIsMatch;
52028
52029/***/ }),
52030/* 496 */
52031/***/ (function(module, exports) {
52032
52033 "use strict";
52034
52035 /**
52036 * The base implementation of `_.isNaN` without support for number objects.
52037 *
52038 * @private
52039 * @param {*} value The value to check.
52040 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
52041 */
52042 function baseIsNaN(value) {
52043 return value !== value;
52044 }
52045
52046 module.exports = baseIsNaN;
52047
52048/***/ }),
52049/* 497 */
52050/***/ (function(module, exports, __webpack_require__) {
52051
52052 'use strict';
52053
52054 var isFunction = __webpack_require__(175),
52055 isMasked = __webpack_require__(545),
52056 isObject = __webpack_require__(18),
52057 toSource = __webpack_require__(272);
52058
52059 /**
52060 * Used to match `RegExp`
52061 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
52062 */
52063 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
52064
52065 /** Used to detect host constructors (Safari). */
52066 var reIsHostCtor = /^\[object .+?Constructor\]$/;
52067
52068 /** Used for built-in method references. */
52069 var funcProto = Function.prototype,
52070 objectProto = Object.prototype;
52071
52072 /** Used to resolve the decompiled source of functions. */
52073 var funcToString = funcProto.toString;
52074
52075 /** Used to check objects for own properties. */
52076 var hasOwnProperty = objectProto.hasOwnProperty;
52077
52078 /** Used to detect if a method is native. */
52079 var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
52080
52081 /**
52082 * The base implementation of `_.isNative` without bad shim checks.
52083 *
52084 * @private
52085 * @param {*} value The value to check.
52086 * @returns {boolean} Returns `true` if `value` is a native function,
52087 * else `false`.
52088 */
52089 function baseIsNative(value) {
52090 if (!isObject(value) || isMasked(value)) {
52091 return false;
52092 }
52093 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
52094 return pattern.test(toSource(value));
52095 }
52096
52097 module.exports = baseIsNative;
52098
52099/***/ }),
52100/* 498 */
52101/***/ (function(module, exports, __webpack_require__) {
52102
52103 'use strict';
52104
52105 var baseGetTag = __webpack_require__(30),
52106 isObjectLike = __webpack_require__(25);
52107
52108 /** `Object#toString` result references. */
52109 var regexpTag = '[object RegExp]';
52110
52111 /**
52112 * The base implementation of `_.isRegExp` without Node.js optimizations.
52113 *
52114 * @private
52115 * @param {*} value The value to check.
52116 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
52117 */
52118 function baseIsRegExp(value) {
52119 return isObjectLike(value) && baseGetTag(value) == regexpTag;
52120 }
52121
52122 module.exports = baseIsRegExp;
52123
52124/***/ }),
52125/* 499 */
52126/***/ (function(module, exports, __webpack_require__) {
52127
52128 'use strict';
52129
52130 var baseGetTag = __webpack_require__(30),
52131 isLength = __webpack_require__(176),
52132 isObjectLike = __webpack_require__(25);
52133
52134 /** `Object#toString` result references. */
52135 var argsTag = '[object Arguments]',
52136 arrayTag = '[object Array]',
52137 boolTag = '[object Boolean]',
52138 dateTag = '[object Date]',
52139 errorTag = '[object Error]',
52140 funcTag = '[object Function]',
52141 mapTag = '[object Map]',
52142 numberTag = '[object Number]',
52143 objectTag = '[object Object]',
52144 regexpTag = '[object RegExp]',
52145 setTag = '[object Set]',
52146 stringTag = '[object String]',
52147 weakMapTag = '[object WeakMap]';
52148
52149 var arrayBufferTag = '[object ArrayBuffer]',
52150 dataViewTag = '[object DataView]',
52151 float32Tag = '[object Float32Array]',
52152 float64Tag = '[object Float64Array]',
52153 int8Tag = '[object Int8Array]',
52154 int16Tag = '[object Int16Array]',
52155 int32Tag = '[object Int32Array]',
52156 uint8Tag = '[object Uint8Array]',
52157 uint8ClampedTag = '[object Uint8ClampedArray]',
52158 uint16Tag = '[object Uint16Array]',
52159 uint32Tag = '[object Uint32Array]';
52160
52161 /** Used to identify `toStringTag` values of typed arrays. */
52162 var typedArrayTags = {};
52163 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
52164 typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
52165
52166 /**
52167 * The base implementation of `_.isTypedArray` without Node.js optimizations.
52168 *
52169 * @private
52170 * @param {*} value The value to check.
52171 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
52172 */
52173 function baseIsTypedArray(value) {
52174 return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
52175 }
52176
52177 module.exports = baseIsTypedArray;
52178
52179/***/ }),
52180/* 500 */
52181/***/ (function(module, exports, __webpack_require__) {
52182
52183 'use strict';
52184
52185 var isPrototype = __webpack_require__(105),
52186 nativeKeys = __webpack_require__(557);
52187
52188 /** Used for built-in method references. */
52189 var objectProto = Object.prototype;
52190
52191 /** Used to check objects for own properties. */
52192 var hasOwnProperty = objectProto.hasOwnProperty;
52193
52194 /**
52195 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
52196 *
52197 * @private
52198 * @param {Object} object The object to query.
52199 * @returns {Array} Returns the array of property names.
52200 */
52201 function baseKeys(object) {
52202 if (!isPrototype(object)) {
52203 return nativeKeys(object);
52204 }
52205 var result = [];
52206 for (var key in Object(object)) {
52207 if (hasOwnProperty.call(object, key) && key != 'constructor') {
52208 result.push(key);
52209 }
52210 }
52211 return result;
52212 }
52213
52214 module.exports = baseKeys;
52215
52216/***/ }),
52217/* 501 */
52218/***/ (function(module, exports, __webpack_require__) {
52219
52220 'use strict';
52221
52222 var isObject = __webpack_require__(18),
52223 isPrototype = __webpack_require__(105),
52224 nativeKeysIn = __webpack_require__(558);
52225
52226 /** Used for built-in method references. */
52227 var objectProto = Object.prototype;
52228
52229 /** Used to check objects for own properties. */
52230 var hasOwnProperty = objectProto.hasOwnProperty;
52231
52232 /**
52233 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
52234 *
52235 * @private
52236 * @param {Object} object The object to query.
52237 * @returns {Array} Returns the array of property names.
52238 */
52239 function baseKeysIn(object) {
52240 if (!isObject(object)) {
52241 return nativeKeysIn(object);
52242 }
52243 var isProto = isPrototype(object),
52244 result = [];
52245
52246 for (var key in object) {
52247 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
52248 result.push(key);
52249 }
52250 }
52251 return result;
52252 }
52253
52254 module.exports = baseKeysIn;
52255
52256/***/ }),
52257/* 502 */
52258/***/ (function(module, exports, __webpack_require__) {
52259
52260 'use strict';
52261
52262 var baseIsMatch = __webpack_require__(495),
52263 getMatchData = __webpack_require__(533),
52264 matchesStrictComparable = __webpack_require__(269);
52265
52266 /**
52267 * The base implementation of `_.matches` which doesn't clone `source`.
52268 *
52269 * @private
52270 * @param {Object} source The object of property values to match.
52271 * @returns {Function} Returns the new spec function.
52272 */
52273 function baseMatches(source) {
52274 var matchData = getMatchData(source);
52275 if (matchData.length == 1 && matchData[0][2]) {
52276 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
52277 }
52278 return function (object) {
52279 return object === source || baseIsMatch(object, source, matchData);
52280 };
52281 }
52282
52283 module.exports = baseMatches;
52284
52285/***/ }),
52286/* 503 */
52287/***/ (function(module, exports, __webpack_require__) {
52288
52289 'use strict';
52290
52291 var baseIsEqual = __webpack_require__(251),
52292 get = __webpack_require__(583),
52293 hasIn = __webpack_require__(584),
52294 isKey = __webpack_require__(173),
52295 isStrictComparable = __webpack_require__(267),
52296 matchesStrictComparable = __webpack_require__(269),
52297 toKey = __webpack_require__(108);
52298
52299 /** Used to compose bitmasks for value comparisons. */
52300 var COMPARE_PARTIAL_FLAG = 1,
52301 COMPARE_UNORDERED_FLAG = 2;
52302
52303 /**
52304 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
52305 *
52306 * @private
52307 * @param {string} path The path of the property to get.
52308 * @param {*} srcValue The value to match.
52309 * @returns {Function} Returns the new spec function.
52310 */
52311 function baseMatchesProperty(path, srcValue) {
52312 if (isKey(path) && isStrictComparable(srcValue)) {
52313 return matchesStrictComparable(toKey(path), srcValue);
52314 }
52315 return function (object) {
52316 var objValue = get(object, path);
52317 return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
52318 };
52319 }
52320
52321 module.exports = baseMatchesProperty;
52322
52323/***/ }),
52324/* 504 */
52325/***/ (function(module, exports, __webpack_require__) {
52326
52327 'use strict';
52328
52329 var Stack = __webpack_require__(99),
52330 assignMergeValue = __webpack_require__(247),
52331 baseFor = __webpack_require__(248),
52332 baseMergeDeep = __webpack_require__(505),
52333 isObject = __webpack_require__(18),
52334 keysIn = __webpack_require__(47);
52335
52336 /**
52337 * The base implementation of `_.merge` without support for multiple sources.
52338 *
52339 * @private
52340 * @param {Object} object The destination object.
52341 * @param {Object} source The source object.
52342 * @param {number} srcIndex The index of `source`.
52343 * @param {Function} [customizer] The function to customize merged values.
52344 * @param {Object} [stack] Tracks traversed source values and their merged
52345 * counterparts.
52346 */
52347 function baseMerge(object, source, srcIndex, customizer, stack) {
52348 if (object === source) {
52349 return;
52350 }
52351 baseFor(source, function (srcValue, key) {
52352 if (isObject(srcValue)) {
52353 stack || (stack = new Stack());
52354 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
52355 } else {
52356 var newValue = customizer ? customizer(object[key], srcValue, key + '', object, source, stack) : undefined;
52357
52358 if (newValue === undefined) {
52359 newValue = srcValue;
52360 }
52361 assignMergeValue(object, key, newValue);
52362 }
52363 }, keysIn);
52364 }
52365
52366 module.exports = baseMerge;
52367
52368/***/ }),
52369/* 505 */
52370/***/ (function(module, exports, __webpack_require__) {
52371
52372 'use strict';
52373
52374 var assignMergeValue = __webpack_require__(247),
52375 cloneBuffer = __webpack_require__(256),
52376 cloneTypedArray = __webpack_require__(257),
52377 copyArray = __webpack_require__(168),
52378 initCloneObject = __webpack_require__(266),
52379 isArguments = __webpack_require__(112),
52380 isArray = __webpack_require__(6),
52381 isArrayLikeObject = __webpack_require__(585),
52382 isBuffer = __webpack_require__(113),
52383 isFunction = __webpack_require__(175),
52384 isObject = __webpack_require__(18),
52385 isPlainObject = __webpack_require__(275),
52386 isTypedArray = __webpack_require__(177),
52387 toPlainObject = __webpack_require__(599);
52388
52389 /**
52390 * A specialized version of `baseMerge` for arrays and objects which performs
52391 * deep merges and tracks traversed objects enabling objects with circular
52392 * references to be merged.
52393 *
52394 * @private
52395 * @param {Object} object The destination object.
52396 * @param {Object} source The source object.
52397 * @param {string} key The key of the value to merge.
52398 * @param {number} srcIndex The index of `source`.
52399 * @param {Function} mergeFunc The function to merge values.
52400 * @param {Function} [customizer] The function to customize assigned values.
52401 * @param {Object} [stack] Tracks traversed source values and their merged
52402 * counterparts.
52403 */
52404 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
52405 var objValue = object[key],
52406 srcValue = source[key],
52407 stacked = stack.get(srcValue);
52408
52409 if (stacked) {
52410 assignMergeValue(object, key, stacked);
52411 return;
52412 }
52413 var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;
52414
52415 var isCommon = newValue === undefined;
52416
52417 if (isCommon) {
52418 var isArr = isArray(srcValue),
52419 isBuff = !isArr && isBuffer(srcValue),
52420 isTyped = !isArr && !isBuff && isTypedArray(srcValue);
52421
52422 newValue = srcValue;
52423 if (isArr || isBuff || isTyped) {
52424 if (isArray(objValue)) {
52425 newValue = objValue;
52426 } else if (isArrayLikeObject(objValue)) {
52427 newValue = copyArray(objValue);
52428 } else if (isBuff) {
52429 isCommon = false;
52430 newValue = cloneBuffer(srcValue, true);
52431 } else if (isTyped) {
52432 isCommon = false;
52433 newValue = cloneTypedArray(srcValue, true);
52434 } else {
52435 newValue = [];
52436 }
52437 } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
52438 newValue = objValue;
52439 if (isArguments(objValue)) {
52440 newValue = toPlainObject(objValue);
52441 } else if (!isObject(objValue) || srcIndex && isFunction(objValue)) {
52442 newValue = initCloneObject(srcValue);
52443 }
52444 } else {
52445 isCommon = false;
52446 }
52447 }
52448 if (isCommon) {
52449 // Recursively merge objects and arrays (susceptible to call stack limits).
52450 stack.set(srcValue, newValue);
52451 mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
52452 stack['delete'](srcValue);
52453 }
52454 assignMergeValue(object, key, newValue);
52455 }
52456
52457 module.exports = baseMergeDeep;
52458
52459/***/ }),
52460/* 506 */
52461/***/ (function(module, exports, __webpack_require__) {
52462
52463 'use strict';
52464
52465 var arrayMap = __webpack_require__(60),
52466 baseIteratee = __webpack_require__(61),
52467 baseMap = __webpack_require__(252),
52468 baseSortBy = __webpack_require__(512),
52469 baseUnary = __webpack_require__(102),
52470 compareMultiple = __webpack_require__(522),
52471 identity = __webpack_require__(110);
52472
52473 /**
52474 * The base implementation of `_.orderBy` without param guards.
52475 *
52476 * @private
52477 * @param {Array|Object} collection The collection to iterate over.
52478 * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
52479 * @param {string[]} orders The sort orders of `iteratees`.
52480 * @returns {Array} Returns the new sorted array.
52481 */
52482 function baseOrderBy(collection, iteratees, orders) {
52483 var index = -1;
52484 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
52485
52486 var result = baseMap(collection, function (value, key, collection) {
52487 var criteria = arrayMap(iteratees, function (iteratee) {
52488 return iteratee(value);
52489 });
52490 return { 'criteria': criteria, 'index': ++index, 'value': value };
52491 });
52492
52493 return baseSortBy(result, function (object, other) {
52494 return compareMultiple(object, other, orders);
52495 });
52496 }
52497
52498 module.exports = baseOrderBy;
52499
52500/***/ }),
52501/* 507 */
52502/***/ (function(module, exports) {
52503
52504 "use strict";
52505
52506 /**
52507 * The base implementation of `_.property` without support for deep paths.
52508 *
52509 * @private
52510 * @param {string} key The key of the property to get.
52511 * @returns {Function} Returns the new accessor function.
52512 */
52513 function baseProperty(key) {
52514 return function (object) {
52515 return object == null ? undefined : object[key];
52516 };
52517 }
52518
52519 module.exports = baseProperty;
52520
52521/***/ }),
52522/* 508 */
52523/***/ (function(module, exports, __webpack_require__) {
52524
52525 'use strict';
52526
52527 var baseGet = __webpack_require__(249);
52528
52529 /**
52530 * A specialized version of `baseProperty` which supports deep paths.
52531 *
52532 * @private
52533 * @param {Array|string} path The path of the property to get.
52534 * @returns {Function} Returns the new accessor function.
52535 */
52536 function basePropertyDeep(path) {
52537 return function (object) {
52538 return baseGet(object, path);
52539 };
52540 }
52541
52542 module.exports = basePropertyDeep;
52543
52544/***/ }),
52545/* 509 */
52546/***/ (function(module, exports, __webpack_require__) {
52547
52548 'use strict';
52549
52550 var arrayMap = __webpack_require__(60),
52551 baseIndexOf = __webpack_require__(166),
52552 baseIndexOfWith = __webpack_require__(492),
52553 baseUnary = __webpack_require__(102),
52554 copyArray = __webpack_require__(168);
52555
52556 /** Used for built-in method references. */
52557 var arrayProto = Array.prototype;
52558
52559 /** Built-in value references. */
52560 var splice = arrayProto.splice;
52561
52562 /**
52563 * The base implementation of `_.pullAllBy` without support for iteratee
52564 * shorthands.
52565 *
52566 * @private
52567 * @param {Array} array The array to modify.
52568 * @param {Array} values The values to remove.
52569 * @param {Function} [iteratee] The iteratee invoked per element.
52570 * @param {Function} [comparator] The comparator invoked per element.
52571 * @returns {Array} Returns `array`.
52572 */
52573 function basePullAll(array, values, iteratee, comparator) {
52574 var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
52575 index = -1,
52576 length = values.length,
52577 seen = array;
52578
52579 if (array === values) {
52580 values = copyArray(values);
52581 }
52582 if (iteratee) {
52583 seen = arrayMap(array, baseUnary(iteratee));
52584 }
52585 while (++index < length) {
52586 var fromIndex = 0,
52587 value = values[index],
52588 computed = iteratee ? iteratee(value) : value;
52589
52590 while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
52591 if (seen !== array) {
52592 splice.call(seen, fromIndex, 1);
52593 }
52594 splice.call(array, fromIndex, 1);
52595 }
52596 }
52597 return array;
52598 }
52599
52600 module.exports = basePullAll;
52601
52602/***/ }),
52603/* 510 */
52604/***/ (function(module, exports) {
52605
52606 'use strict';
52607
52608 /** Used as references for various `Number` constants. */
52609 var MAX_SAFE_INTEGER = 9007199254740991;
52610
52611 /* Built-in method references for those with the same name as other `lodash` methods. */
52612 var nativeFloor = Math.floor;
52613
52614 /**
52615 * The base implementation of `_.repeat` which doesn't coerce arguments.
52616 *
52617 * @private
52618 * @param {string} string The string to repeat.
52619 * @param {number} n The number of times to repeat the string.
52620 * @returns {string} Returns the repeated string.
52621 */
52622 function baseRepeat(string, n) {
52623 var result = '';
52624 if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
52625 return result;
52626 }
52627 // Leverage the exponentiation by squaring algorithm for a faster repeat.
52628 // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
52629 do {
52630 if (n % 2) {
52631 result += string;
52632 }
52633 n = nativeFloor(n / 2);
52634 if (n) {
52635 string += string;
52636 }
52637 } while (n);
52638
52639 return result;
52640 }
52641
52642 module.exports = baseRepeat;
52643
52644/***/ }),
52645/* 511 */
52646/***/ (function(module, exports, __webpack_require__) {
52647
52648 'use strict';
52649
52650 var constant = __webpack_require__(576),
52651 defineProperty = __webpack_require__(259),
52652 identity = __webpack_require__(110);
52653
52654 /**
52655 * The base implementation of `setToString` without support for hot loop shorting.
52656 *
52657 * @private
52658 * @param {Function} func The function to modify.
52659 * @param {Function} string The `toString` result.
52660 * @returns {Function} Returns `func`.
52661 */
52662 var baseSetToString = !defineProperty ? identity : function (func, string) {
52663 return defineProperty(func, 'toString', {
52664 'configurable': true,
52665 'enumerable': false,
52666 'value': constant(string),
52667 'writable': true
52668 });
52669 };
52670
52671 module.exports = baseSetToString;
52672
52673/***/ }),
52674/* 512 */
52675/***/ (function(module, exports) {
52676
52677 "use strict";
52678
52679 /**
52680 * The base implementation of `_.sortBy` which uses `comparer` to define the
52681 * sort order of `array` and replaces criteria objects with their corresponding
52682 * values.
52683 *
52684 * @private
52685 * @param {Array} array The array to sort.
52686 * @param {Function} comparer The function to define sort order.
52687 * @returns {Array} Returns `array`.
52688 */
52689 function baseSortBy(array, comparer) {
52690 var length = array.length;
52691
52692 array.sort(comparer);
52693 while (length--) {
52694 array[length] = array[length].value;
52695 }
52696 return array;
52697 }
52698
52699 module.exports = baseSortBy;
52700
52701/***/ }),
52702/* 513 */
52703/***/ (function(module, exports) {
52704
52705 "use strict";
52706
52707 /**
52708 * The base implementation of `_.times` without support for iteratee shorthands
52709 * or max array length checks.
52710 *
52711 * @private
52712 * @param {number} n The number of times to invoke `iteratee`.
52713 * @param {Function} iteratee The function invoked per iteration.
52714 * @returns {Array} Returns the array of results.
52715 */
52716 function baseTimes(n, iteratee) {
52717 var index = -1,
52718 result = Array(n);
52719
52720 while (++index < n) {
52721 result[index] = iteratee(index);
52722 }
52723 return result;
52724 }
52725
52726 module.exports = baseTimes;
52727
52728/***/ }),
52729/* 514 */
52730/***/ (function(module, exports, __webpack_require__) {
52731
52732 'use strict';
52733
52734 var SetCache = __webpack_require__(242),
52735 arrayIncludes = __webpack_require__(480),
52736 arrayIncludesWith = __webpack_require__(481),
52737 cacheHas = __webpack_require__(254),
52738 createSet = __webpack_require__(528),
52739 setToArray = __webpack_require__(107);
52740
52741 /** Used as the size to enable large array optimizations. */
52742 var LARGE_ARRAY_SIZE = 200;
52743
52744 /**
52745 * The base implementation of `_.uniqBy` without support for iteratee shorthands.
52746 *
52747 * @private
52748 * @param {Array} array The array to inspect.
52749 * @param {Function} [iteratee] The iteratee invoked per element.
52750 * @param {Function} [comparator] The comparator invoked per element.
52751 * @returns {Array} Returns the new duplicate free array.
52752 */
52753 function baseUniq(array, iteratee, comparator) {
52754 var index = -1,
52755 includes = arrayIncludes,
52756 length = array.length,
52757 isCommon = true,
52758 result = [],
52759 seen = result;
52760
52761 if (comparator) {
52762 isCommon = false;
52763 includes = arrayIncludesWith;
52764 } else if (length >= LARGE_ARRAY_SIZE) {
52765 var set = iteratee ? null : createSet(array);
52766 if (set) {
52767 return setToArray(set);
52768 }
52769 isCommon = false;
52770 includes = cacheHas;
52771 seen = new SetCache();
52772 } else {
52773 seen = iteratee ? [] : result;
52774 }
52775 outer: while (++index < length) {
52776 var value = array[index],
52777 computed = iteratee ? iteratee(value) : value;
52778
52779 value = comparator || value !== 0 ? value : 0;
52780 if (isCommon && computed === computed) {
52781 var seenIndex = seen.length;
52782 while (seenIndex--) {
52783 if (seen[seenIndex] === computed) {
52784 continue outer;
52785 }
52786 }
52787 if (iteratee) {
52788 seen.push(computed);
52789 }
52790 result.push(value);
52791 } else if (!includes(seen, computed, comparator)) {
52792 if (seen !== result) {
52793 seen.push(computed);
52794 }
52795 result.push(value);
52796 }
52797 }
52798 return result;
52799 }
52800
52801 module.exports = baseUniq;
52802
52803/***/ }),
52804/* 515 */
52805/***/ (function(module, exports, __webpack_require__) {
52806
52807 'use strict';
52808
52809 var arrayMap = __webpack_require__(60);
52810
52811 /**
52812 * The base implementation of `_.values` and `_.valuesIn` which creates an
52813 * array of `object` property values corresponding to the property names
52814 * of `props`.
52815 *
52816 * @private
52817 * @param {Object} object The object to query.
52818 * @param {Array} props The property names to get values for.
52819 * @returns {Object} Returns the array of property values.
52820 */
52821 function baseValues(object, props) {
52822 return arrayMap(props, function (key) {
52823 return object[key];
52824 });
52825 }
52826
52827 module.exports = baseValues;
52828
52829/***/ }),
52830/* 516 */
52831/***/ (function(module, exports, __webpack_require__) {
52832
52833 'use strict';
52834
52835 var cloneArrayBuffer = __webpack_require__(167);
52836
52837 /**
52838 * Creates a clone of `dataView`.
52839 *
52840 * @private
52841 * @param {Object} dataView The data view to clone.
52842 * @param {boolean} [isDeep] Specify a deep clone.
52843 * @returns {Object} Returns the cloned data view.
52844 */
52845 function cloneDataView(dataView, isDeep) {
52846 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
52847 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
52848 }
52849
52850 module.exports = cloneDataView;
52851
52852/***/ }),
52853/* 517 */
52854/***/ (function(module, exports, __webpack_require__) {
52855
52856 'use strict';
52857
52858 var addMapEntry = __webpack_require__(476),
52859 arrayReduce = __webpack_require__(246),
52860 mapToArray = __webpack_require__(268);
52861
52862 /** Used to compose bitmasks for cloning. */
52863 var CLONE_DEEP_FLAG = 1;
52864
52865 /**
52866 * Creates a clone of `map`.
52867 *
52868 * @private
52869 * @param {Object} map The map to clone.
52870 * @param {Function} cloneFunc The function to clone values.
52871 * @param {boolean} [isDeep] Specify a deep clone.
52872 * @returns {Object} Returns the cloned map.
52873 */
52874 function cloneMap(map, isDeep, cloneFunc) {
52875 var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
52876 return arrayReduce(array, addMapEntry, new map.constructor());
52877 }
52878
52879 module.exports = cloneMap;
52880
52881/***/ }),
52882/* 518 */
52883/***/ (function(module, exports) {
52884
52885 "use strict";
52886
52887 /** Used to match `RegExp` flags from their coerced string values. */
52888 var reFlags = /\w*$/;
52889
52890 /**
52891 * Creates a clone of `regexp`.
52892 *
52893 * @private
52894 * @param {Object} regexp The regexp to clone.
52895 * @returns {Object} Returns the cloned regexp.
52896 */
52897 function cloneRegExp(regexp) {
52898 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
52899 result.lastIndex = regexp.lastIndex;
52900 return result;
52901 }
52902
52903 module.exports = cloneRegExp;
52904
52905/***/ }),
52906/* 519 */
52907/***/ (function(module, exports, __webpack_require__) {
52908
52909 'use strict';
52910
52911 var addSetEntry = __webpack_require__(477),
52912 arrayReduce = __webpack_require__(246),
52913 setToArray = __webpack_require__(107);
52914
52915 /** Used to compose bitmasks for cloning. */
52916 var CLONE_DEEP_FLAG = 1;
52917
52918 /**
52919 * Creates a clone of `set`.
52920 *
52921 * @private
52922 * @param {Object} set The set to clone.
52923 * @param {Function} cloneFunc The function to clone values.
52924 * @param {boolean} [isDeep] Specify a deep clone.
52925 * @returns {Object} Returns the cloned set.
52926 */
52927 function cloneSet(set, isDeep, cloneFunc) {
52928 var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
52929 return arrayReduce(array, addSetEntry, new set.constructor());
52930 }
52931
52932 module.exports = cloneSet;
52933
52934/***/ }),
52935/* 520 */
52936/***/ (function(module, exports, __webpack_require__) {
52937
52938 'use strict';
52939
52940 var _Symbol = __webpack_require__(45);
52941
52942 /** Used to convert symbols to primitives and strings. */
52943 var symbolProto = _Symbol ? _Symbol.prototype : undefined,
52944 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
52945
52946 /**
52947 * Creates a clone of the `symbol` object.
52948 *
52949 * @private
52950 * @param {Object} symbol The symbol object to clone.
52951 * @returns {Object} Returns the cloned symbol object.
52952 */
52953 function cloneSymbol(symbol) {
52954 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
52955 }
52956
52957 module.exports = cloneSymbol;
52958
52959/***/ }),
52960/* 521 */
52961/***/ (function(module, exports, __webpack_require__) {
52962
52963 'use strict';
52964
52965 var isSymbol = __webpack_require__(62);
52966
52967 /**
52968 * Compares values to sort them in ascending order.
52969 *
52970 * @private
52971 * @param {*} value The value to compare.
52972 * @param {*} other The other value to compare.
52973 * @returns {number} Returns the sort order indicator for `value`.
52974 */
52975 function compareAscending(value, other) {
52976 if (value !== other) {
52977 var valIsDefined = value !== undefined,
52978 valIsNull = value === null,
52979 valIsReflexive = value === value,
52980 valIsSymbol = isSymbol(value);
52981
52982 var othIsDefined = other !== undefined,
52983 othIsNull = other === null,
52984 othIsReflexive = other === other,
52985 othIsSymbol = isSymbol(other);
52986
52987 if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
52988 return 1;
52989 }
52990 if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
52991 return -1;
52992 }
52993 }
52994 return 0;
52995 }
52996
52997 module.exports = compareAscending;
52998
52999/***/ }),
53000/* 522 */
53001/***/ (function(module, exports, __webpack_require__) {
53002
53003 'use strict';
53004
53005 var compareAscending = __webpack_require__(521);
53006
53007 /**
53008 * Used by `_.orderBy` to compare multiple properties of a value to another
53009 * and stable sort them.
53010 *
53011 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
53012 * specify an order of "desc" for descending or "asc" for ascending sort order
53013 * of corresponding values.
53014 *
53015 * @private
53016 * @param {Object} object The object to compare.
53017 * @param {Object} other The other object to compare.
53018 * @param {boolean[]|string[]} orders The order to sort by for each property.
53019 * @returns {number} Returns the sort order indicator for `object`.
53020 */
53021 function compareMultiple(object, other, orders) {
53022 var index = -1,
53023 objCriteria = object.criteria,
53024 othCriteria = other.criteria,
53025 length = objCriteria.length,
53026 ordersLength = orders.length;
53027
53028 while (++index < length) {
53029 var result = compareAscending(objCriteria[index], othCriteria[index]);
53030 if (result) {
53031 if (index >= ordersLength) {
53032 return result;
53033 }
53034 var order = orders[index];
53035 return result * (order == 'desc' ? -1 : 1);
53036 }
53037 }
53038 // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
53039 // that causes it, under certain circumstances, to provide the same value for
53040 // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
53041 // for more details.
53042 //
53043 // This also ensures a stable sort in V8 and other engines.
53044 // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
53045 return object.index - other.index;
53046 }
53047
53048 module.exports = compareMultiple;
53049
53050/***/ }),
53051/* 523 */
53052/***/ (function(module, exports, __webpack_require__) {
53053
53054 'use strict';
53055
53056 var copyObject = __webpack_require__(31),
53057 getSymbols = __webpack_require__(170);
53058
53059 /**
53060 * Copies own symbols of `source` to `object`.
53061 *
53062 * @private
53063 * @param {Object} source The object to copy symbols from.
53064 * @param {Object} [object={}] The object to copy symbols to.
53065 * @returns {Object} Returns `object`.
53066 */
53067 function copySymbols(source, object) {
53068 return copyObject(source, getSymbols(source), object);
53069 }
53070
53071 module.exports = copySymbols;
53072
53073/***/ }),
53074/* 524 */
53075/***/ (function(module, exports, __webpack_require__) {
53076
53077 'use strict';
53078
53079 var copyObject = __webpack_require__(31),
53080 getSymbolsIn = __webpack_require__(263);
53081
53082 /**
53083 * Copies own and inherited symbols of `source` to `object`.
53084 *
53085 * @private
53086 * @param {Object} source The object to copy symbols from.
53087 * @param {Object} [object={}] The object to copy symbols to.
53088 * @returns {Object} Returns `object`.
53089 */
53090 function copySymbolsIn(source, object) {
53091 return copyObject(source, getSymbolsIn(source), object);
53092 }
53093
53094 module.exports = copySymbolsIn;
53095
53096/***/ }),
53097/* 525 */
53098/***/ (function(module, exports, __webpack_require__) {
53099
53100 'use strict';
53101
53102 var root = __webpack_require__(17);
53103
53104 /** Used to detect overreaching core-js shims. */
53105 var coreJsData = root['__core-js_shared__'];
53106
53107 module.exports = coreJsData;
53108
53109/***/ }),
53110/* 526 */
53111/***/ (function(module, exports, __webpack_require__) {
53112
53113 'use strict';
53114
53115 var isArrayLike = __webpack_require__(24);
53116
53117 /**
53118 * Creates a `baseEach` or `baseEachRight` function.
53119 *
53120 * @private
53121 * @param {Function} eachFunc The function to iterate over a collection.
53122 * @param {boolean} [fromRight] Specify iterating from right to left.
53123 * @returns {Function} Returns the new base function.
53124 */
53125 function createBaseEach(eachFunc, fromRight) {
53126 return function (collection, iteratee) {
53127 if (collection == null) {
53128 return collection;
53129 }
53130 if (!isArrayLike(collection)) {
53131 return eachFunc(collection, iteratee);
53132 }
53133 var length = collection.length,
53134 index = fromRight ? length : -1,
53135 iterable = Object(collection);
53136
53137 while (fromRight ? index-- : ++index < length) {
53138 if (iteratee(iterable[index], index, iterable) === false) {
53139 break;
53140 }
53141 }
53142 return collection;
53143 };
53144 }
53145
53146 module.exports = createBaseEach;
53147
53148/***/ }),
53149/* 527 */
53150/***/ (function(module, exports) {
53151
53152 "use strict";
53153
53154 /**
53155 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
53156 *
53157 * @private
53158 * @param {boolean} [fromRight] Specify iterating from right to left.
53159 * @returns {Function} Returns the new base function.
53160 */
53161 function createBaseFor(fromRight) {
53162 return function (object, iteratee, keysFunc) {
53163 var index = -1,
53164 iterable = Object(object),
53165 props = keysFunc(object),
53166 length = props.length;
53167
53168 while (length--) {
53169 var key = props[fromRight ? length : ++index];
53170 if (iteratee(iterable[key], key, iterable) === false) {
53171 break;
53172 }
53173 }
53174 return object;
53175 };
53176 }
53177
53178 module.exports = createBaseFor;
53179
53180/***/ }),
53181/* 528 */
53182/***/ (function(module, exports, __webpack_require__) {
53183
53184 'use strict';
53185
53186 var Set = __webpack_require__(241),
53187 noop = __webpack_require__(591),
53188 setToArray = __webpack_require__(107);
53189
53190 /** Used as references for various `Number` constants. */
53191 var INFINITY = 1 / 0;
53192
53193 /**
53194 * Creates a set object of `values`.
53195 *
53196 * @private
53197 * @param {Array} values The values to add to the set.
53198 * @returns {Object} Returns the new set.
53199 */
53200 var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function (values) {
53201 return new Set(values);
53202 };
53203
53204 module.exports = createSet;
53205
53206/***/ }),
53207/* 529 */
53208/***/ (function(module, exports, __webpack_require__) {
53209
53210 'use strict';
53211
53212 var eq = __webpack_require__(46);
53213
53214 /** Used for built-in method references. */
53215 var objectProto = Object.prototype;
53216
53217 /** Used to check objects for own properties. */
53218 var hasOwnProperty = objectProto.hasOwnProperty;
53219
53220 /**
53221 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
53222 * of source objects to the destination object for all destination properties
53223 * that resolve to `undefined`.
53224 *
53225 * @private
53226 * @param {*} objValue The destination value.
53227 * @param {*} srcValue The source value.
53228 * @param {string} key The key of the property to assign.
53229 * @param {Object} object The parent object of `objValue`.
53230 * @returns {*} Returns the value to assign.
53231 */
53232 function customDefaultsAssignIn(objValue, srcValue, key, object) {
53233 if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
53234 return srcValue;
53235 }
53236 return objValue;
53237 }
53238
53239 module.exports = customDefaultsAssignIn;
53240
53241/***/ }),
53242/* 530 */
53243/***/ (function(module, exports, __webpack_require__) {
53244
53245 'use strict';
53246
53247 var _Symbol = __webpack_require__(45),
53248 Uint8Array = __webpack_require__(243),
53249 eq = __webpack_require__(46),
53250 equalArrays = __webpack_require__(260),
53251 mapToArray = __webpack_require__(268),
53252 setToArray = __webpack_require__(107);
53253
53254 /** Used to compose bitmasks for value comparisons. */
53255 var COMPARE_PARTIAL_FLAG = 1,
53256 COMPARE_UNORDERED_FLAG = 2;
53257
53258 /** `Object#toString` result references. */
53259 var boolTag = '[object Boolean]',
53260 dateTag = '[object Date]',
53261 errorTag = '[object Error]',
53262 mapTag = '[object Map]',
53263 numberTag = '[object Number]',
53264 regexpTag = '[object RegExp]',
53265 setTag = '[object Set]',
53266 stringTag = '[object String]',
53267 symbolTag = '[object Symbol]';
53268
53269 var arrayBufferTag = '[object ArrayBuffer]',
53270 dataViewTag = '[object DataView]';
53271
53272 /** Used to convert symbols to primitives and strings. */
53273 var symbolProto = _Symbol ? _Symbol.prototype : undefined,
53274 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
53275
53276 /**
53277 * A specialized version of `baseIsEqualDeep` for comparing objects of
53278 * the same `toStringTag`.
53279 *
53280 * **Note:** This function only supports comparing values with tags of
53281 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
53282 *
53283 * @private
53284 * @param {Object} object The object to compare.
53285 * @param {Object} other The other object to compare.
53286 * @param {string} tag The `toStringTag` of the objects to compare.
53287 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
53288 * @param {Function} customizer The function to customize comparisons.
53289 * @param {Function} equalFunc The function to determine equivalents of values.
53290 * @param {Object} stack Tracks traversed `object` and `other` objects.
53291 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
53292 */
53293 function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
53294 switch (tag) {
53295 case dataViewTag:
53296 if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
53297 return false;
53298 }
53299 object = object.buffer;
53300 other = other.buffer;
53301
53302 case arrayBufferTag:
53303 if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
53304 return false;
53305 }
53306 return true;
53307
53308 case boolTag:
53309 case dateTag:
53310 case numberTag:
53311 // Coerce booleans to `1` or `0` and dates to milliseconds.
53312 // Invalid dates are coerced to `NaN`.
53313 return eq(+object, +other);
53314
53315 case errorTag:
53316 return object.name == other.name && object.message == other.message;
53317
53318 case regexpTag:
53319 case stringTag:
53320 // Coerce regexes to strings and treat strings, primitives and objects,
53321 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
53322 // for more details.
53323 return object == other + '';
53324
53325 case mapTag:
53326 var convert = mapToArray;
53327
53328 case setTag:
53329 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
53330 convert || (convert = setToArray);
53331
53332 if (object.size != other.size && !isPartial) {
53333 return false;
53334 }
53335 // Assume cyclic values are equal.
53336 var stacked = stack.get(object);
53337 if (stacked) {
53338 return stacked == other;
53339 }
53340 bitmask |= COMPARE_UNORDERED_FLAG;
53341
53342 // Recursively compare objects (susceptible to call stack limits).
53343 stack.set(object, other);
53344 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
53345 stack['delete'](object);
53346 return result;
53347
53348 case symbolTag:
53349 if (symbolValueOf) {
53350 return symbolValueOf.call(object) == symbolValueOf.call(other);
53351 }
53352 }
53353 return false;
53354 }
53355
53356 module.exports = equalByTag;
53357
53358/***/ }),
53359/* 531 */
53360/***/ (function(module, exports, __webpack_require__) {
53361
53362 'use strict';
53363
53364 var getAllKeys = __webpack_require__(262);
53365
53366 /** Used to compose bitmasks for value comparisons. */
53367 var COMPARE_PARTIAL_FLAG = 1;
53368
53369 /** Used for built-in method references. */
53370 var objectProto = Object.prototype;
53371
53372 /** Used to check objects for own properties. */
53373 var hasOwnProperty = objectProto.hasOwnProperty;
53374
53375 /**
53376 * A specialized version of `baseIsEqualDeep` for objects with support for
53377 * partial deep comparisons.
53378 *
53379 * @private
53380 * @param {Object} object The object to compare.
53381 * @param {Object} other The other object to compare.
53382 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
53383 * @param {Function} customizer The function to customize comparisons.
53384 * @param {Function} equalFunc The function to determine equivalents of values.
53385 * @param {Object} stack Tracks traversed `object` and `other` objects.
53386 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
53387 */
53388 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
53389 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
53390 objProps = getAllKeys(object),
53391 objLength = objProps.length,
53392 othProps = getAllKeys(other),
53393 othLength = othProps.length;
53394
53395 if (objLength != othLength && !isPartial) {
53396 return false;
53397 }
53398 var index = objLength;
53399 while (index--) {
53400 var key = objProps[index];
53401 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
53402 return false;
53403 }
53404 }
53405 // Assume cyclic values are equal.
53406 var stacked = stack.get(object);
53407 if (stacked && stack.get(other)) {
53408 return stacked == other;
53409 }
53410 var result = true;
53411 stack.set(object, other);
53412 stack.set(other, object);
53413
53414 var skipCtor = isPartial;
53415 while (++index < objLength) {
53416 key = objProps[index];
53417 var objValue = object[key],
53418 othValue = other[key];
53419
53420 if (customizer) {
53421 var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
53422 }
53423 // Recursively compare objects (susceptible to call stack limits).
53424 if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
53425 result = false;
53426 break;
53427 }
53428 skipCtor || (skipCtor = key == 'constructor');
53429 }
53430 if (result && !skipCtor) {
53431 var objCtor = object.constructor,
53432 othCtor = other.constructor;
53433
53434 // Non `Object` object instances with different constructors are not equal.
53435 if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
53436 result = false;
53437 }
53438 }
53439 stack['delete'](object);
53440 stack['delete'](other);
53441 return result;
53442 }
53443
53444 module.exports = equalObjects;
53445
53446/***/ }),
53447/* 532 */
53448/***/ (function(module, exports, __webpack_require__) {
53449
53450 'use strict';
53451
53452 var baseGetAllKeys = __webpack_require__(250),
53453 getSymbolsIn = __webpack_require__(263),
53454 keysIn = __webpack_require__(47);
53455
53456 /**
53457 * Creates an array of own and inherited enumerable property names and
53458 * symbols of `object`.
53459 *
53460 * @private
53461 * @param {Object} object The object to query.
53462 * @returns {Array} Returns the array of property names and symbols.
53463 */
53464 function getAllKeysIn(object) {
53465 return baseGetAllKeys(object, keysIn, getSymbolsIn);
53466 }
53467
53468 module.exports = getAllKeysIn;
53469
53470/***/ }),
53471/* 533 */
53472/***/ (function(module, exports, __webpack_require__) {
53473
53474 'use strict';
53475
53476 var isStrictComparable = __webpack_require__(267),
53477 keys = __webpack_require__(32);
53478
53479 /**
53480 * Gets the property names, values, and compare flags of `object`.
53481 *
53482 * @private
53483 * @param {Object} object The object to query.
53484 * @returns {Array} Returns the match data of `object`.
53485 */
53486 function getMatchData(object) {
53487 var result = keys(object),
53488 length = result.length;
53489
53490 while (length--) {
53491 var key = result[length],
53492 value = object[key];
53493
53494 result[length] = [key, value, isStrictComparable(value)];
53495 }
53496 return result;
53497 }
53498
53499 module.exports = getMatchData;
53500
53501/***/ }),
53502/* 534 */
53503/***/ (function(module, exports, __webpack_require__) {
53504
53505 'use strict';
53506
53507 var _Symbol = __webpack_require__(45);
53508
53509 /** Used for built-in method references. */
53510 var objectProto = Object.prototype;
53511
53512 /** Used to check objects for own properties. */
53513 var hasOwnProperty = objectProto.hasOwnProperty;
53514
53515 /**
53516 * Used to resolve the
53517 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
53518 * of values.
53519 */
53520 var nativeObjectToString = objectProto.toString;
53521
53522 /** Built-in value references. */
53523 var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
53524
53525 /**
53526 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
53527 *
53528 * @private
53529 * @param {*} value The value to query.
53530 * @returns {string} Returns the raw `toStringTag`.
53531 */
53532 function getRawTag(value) {
53533 var isOwn = hasOwnProperty.call(value, symToStringTag),
53534 tag = value[symToStringTag];
53535
53536 try {
53537 value[symToStringTag] = undefined;
53538 var unmasked = true;
53539 } catch (e) {}
53540
53541 var result = nativeObjectToString.call(value);
53542 if (unmasked) {
53543 if (isOwn) {
53544 value[symToStringTag] = tag;
53545 } else {
53546 delete value[symToStringTag];
53547 }
53548 }
53549 return result;
53550 }
53551
53552 module.exports = getRawTag;
53553
53554/***/ }),
53555/* 535 */
53556/***/ (function(module, exports) {
53557
53558 "use strict";
53559
53560 /**
53561 * Gets the value at `key` of `object`.
53562 *
53563 * @private
53564 * @param {Object} [object] The object to query.
53565 * @param {string} key The key of the property to get.
53566 * @returns {*} Returns the property value.
53567 */
53568 function getValue(object, key) {
53569 return object == null ? undefined : object[key];
53570 }
53571
53572 module.exports = getValue;
53573
53574/***/ }),
53575/* 536 */
53576/***/ (function(module, exports, __webpack_require__) {
53577
53578 'use strict';
53579
53580 var nativeCreate = __webpack_require__(106);
53581
53582 /**
53583 * Removes all key-value entries from the hash.
53584 *
53585 * @private
53586 * @name clear
53587 * @memberOf Hash
53588 */
53589 function hashClear() {
53590 this.__data__ = nativeCreate ? nativeCreate(null) : {};
53591 this.size = 0;
53592 }
53593
53594 module.exports = hashClear;
53595
53596/***/ }),
53597/* 537 */
53598/***/ (function(module, exports) {
53599
53600 "use strict";
53601
53602 /**
53603 * Removes `key` and its value from the hash.
53604 *
53605 * @private
53606 * @name delete
53607 * @memberOf Hash
53608 * @param {Object} hash The hash to modify.
53609 * @param {string} key The key of the value to remove.
53610 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
53611 */
53612 function hashDelete(key) {
53613 var result = this.has(key) && delete this.__data__[key];
53614 this.size -= result ? 1 : 0;
53615 return result;
53616 }
53617
53618 module.exports = hashDelete;
53619
53620/***/ }),
53621/* 538 */
53622/***/ (function(module, exports, __webpack_require__) {
53623
53624 'use strict';
53625
53626 var nativeCreate = __webpack_require__(106);
53627
53628 /** Used to stand-in for `undefined` hash values. */
53629 var HASH_UNDEFINED = '__lodash_hash_undefined__';
53630
53631 /** Used for built-in method references. */
53632 var objectProto = Object.prototype;
53633
53634 /** Used to check objects for own properties. */
53635 var hasOwnProperty = objectProto.hasOwnProperty;
53636
53637 /**
53638 * Gets the hash value for `key`.
53639 *
53640 * @private
53641 * @name get
53642 * @memberOf Hash
53643 * @param {string} key The key of the value to get.
53644 * @returns {*} Returns the entry value.
53645 */
53646 function hashGet(key) {
53647 var data = this.__data__;
53648 if (nativeCreate) {
53649 var result = data[key];
53650 return result === HASH_UNDEFINED ? undefined : result;
53651 }
53652 return hasOwnProperty.call(data, key) ? data[key] : undefined;
53653 }
53654
53655 module.exports = hashGet;
53656
53657/***/ }),
53658/* 539 */
53659/***/ (function(module, exports, __webpack_require__) {
53660
53661 'use strict';
53662
53663 var nativeCreate = __webpack_require__(106);
53664
53665 /** Used for built-in method references. */
53666 var objectProto = Object.prototype;
53667
53668 /** Used to check objects for own properties. */
53669 var hasOwnProperty = objectProto.hasOwnProperty;
53670
53671 /**
53672 * Checks if a hash value for `key` exists.
53673 *
53674 * @private
53675 * @name has
53676 * @memberOf Hash
53677 * @param {string} key The key of the entry to check.
53678 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
53679 */
53680 function hashHas(key) {
53681 var data = this.__data__;
53682 return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
53683 }
53684
53685 module.exports = hashHas;
53686
53687/***/ }),
53688/* 540 */
53689/***/ (function(module, exports, __webpack_require__) {
53690
53691 'use strict';
53692
53693 var nativeCreate = __webpack_require__(106);
53694
53695 /** Used to stand-in for `undefined` hash values. */
53696 var HASH_UNDEFINED = '__lodash_hash_undefined__';
53697
53698 /**
53699 * Sets the hash `key` to `value`.
53700 *
53701 * @private
53702 * @name set
53703 * @memberOf Hash
53704 * @param {string} key The key of the value to set.
53705 * @param {*} value The value to set.
53706 * @returns {Object} Returns the hash instance.
53707 */
53708 function hashSet(key, value) {
53709 var data = this.__data__;
53710 this.size += this.has(key) ? 0 : 1;
53711 data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
53712 return this;
53713 }
53714
53715 module.exports = hashSet;
53716
53717/***/ }),
53718/* 541 */
53719/***/ (function(module, exports) {
53720
53721 'use strict';
53722
53723 /** Used for built-in method references. */
53724 var objectProto = Object.prototype;
53725
53726 /** Used to check objects for own properties. */
53727 var hasOwnProperty = objectProto.hasOwnProperty;
53728
53729 /**
53730 * Initializes an array clone.
53731 *
53732 * @private
53733 * @param {Array} array The array to clone.
53734 * @returns {Array} Returns the initialized clone.
53735 */
53736 function initCloneArray(array) {
53737 var length = array.length,
53738 result = array.constructor(length);
53739
53740 // Add properties assigned by `RegExp#exec`.
53741 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
53742 result.index = array.index;
53743 result.input = array.input;
53744 }
53745 return result;
53746 }
53747
53748 module.exports = initCloneArray;
53749
53750/***/ }),
53751/* 542 */
53752/***/ (function(module, exports, __webpack_require__) {
53753
53754 'use strict';
53755
53756 var cloneArrayBuffer = __webpack_require__(167),
53757 cloneDataView = __webpack_require__(516),
53758 cloneMap = __webpack_require__(517),
53759 cloneRegExp = __webpack_require__(518),
53760 cloneSet = __webpack_require__(519),
53761 cloneSymbol = __webpack_require__(520),
53762 cloneTypedArray = __webpack_require__(257);
53763
53764 /** `Object#toString` result references. */
53765 var boolTag = '[object Boolean]',
53766 dateTag = '[object Date]',
53767 mapTag = '[object Map]',
53768 numberTag = '[object Number]',
53769 regexpTag = '[object RegExp]',
53770 setTag = '[object Set]',
53771 stringTag = '[object String]',
53772 symbolTag = '[object Symbol]';
53773
53774 var arrayBufferTag = '[object ArrayBuffer]',
53775 dataViewTag = '[object DataView]',
53776 float32Tag = '[object Float32Array]',
53777 float64Tag = '[object Float64Array]',
53778 int8Tag = '[object Int8Array]',
53779 int16Tag = '[object Int16Array]',
53780 int32Tag = '[object Int32Array]',
53781 uint8Tag = '[object Uint8Array]',
53782 uint8ClampedTag = '[object Uint8ClampedArray]',
53783 uint16Tag = '[object Uint16Array]',
53784 uint32Tag = '[object Uint32Array]';
53785
53786 /**
53787 * Initializes an object clone based on its `toStringTag`.
53788 *
53789 * **Note:** This function only supports cloning values with tags of
53790 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
53791 *
53792 * @private
53793 * @param {Object} object The object to clone.
53794 * @param {string} tag The `toStringTag` of the object to clone.
53795 * @param {Function} cloneFunc The function to clone values.
53796 * @param {boolean} [isDeep] Specify a deep clone.
53797 * @returns {Object} Returns the initialized clone.
53798 */
53799 function initCloneByTag(object, tag, cloneFunc, isDeep) {
53800 var Ctor = object.constructor;
53801 switch (tag) {
53802 case arrayBufferTag:
53803 return cloneArrayBuffer(object);
53804
53805 case boolTag:
53806 case dateTag:
53807 return new Ctor(+object);
53808
53809 case dataViewTag:
53810 return cloneDataView(object, isDeep);
53811
53812 case float32Tag:case float64Tag:
53813 case int8Tag:case int16Tag:case int32Tag:
53814 case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:
53815 return cloneTypedArray(object, isDeep);
53816
53817 case mapTag:
53818 return cloneMap(object, isDeep, cloneFunc);
53819
53820 case numberTag:
53821 case stringTag:
53822 return new Ctor(object);
53823
53824 case regexpTag:
53825 return cloneRegExp(object);
53826
53827 case setTag:
53828 return cloneSet(object, isDeep, cloneFunc);
53829
53830 case symbolTag:
53831 return cloneSymbol(object);
53832 }
53833 }
53834
53835 module.exports = initCloneByTag;
53836
53837/***/ }),
53838/* 543 */
53839/***/ (function(module, exports, __webpack_require__) {
53840
53841 'use strict';
53842
53843 var _Symbol = __webpack_require__(45),
53844 isArguments = __webpack_require__(112),
53845 isArray = __webpack_require__(6);
53846
53847 /** Built-in value references. */
53848 var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
53849
53850 /**
53851 * Checks if `value` is a flattenable `arguments` object or array.
53852 *
53853 * @private
53854 * @param {*} value The value to check.
53855 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
53856 */
53857 function isFlattenable(value) {
53858 return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
53859 }
53860
53861 module.exports = isFlattenable;
53862
53863/***/ }),
53864/* 544 */
53865/***/ (function(module, exports) {
53866
53867 'use strict';
53868
53869 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
53870
53871 /**
53872 * Checks if `value` is suitable for use as unique object key.
53873 *
53874 * @private
53875 * @param {*} value The value to check.
53876 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
53877 */
53878 function isKeyable(value) {
53879 var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
53880 return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
53881 }
53882
53883 module.exports = isKeyable;
53884
53885/***/ }),
53886/* 545 */
53887/***/ (function(module, exports, __webpack_require__) {
53888
53889 'use strict';
53890
53891 var coreJsData = __webpack_require__(525);
53892
53893 /** Used to detect methods masquerading as native. */
53894 var maskSrcKey = function () {
53895 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
53896 return uid ? 'Symbol(src)_1.' + uid : '';
53897 }();
53898
53899 /**
53900 * Checks if `func` has its source masked.
53901 *
53902 * @private
53903 * @param {Function} func The function to check.
53904 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
53905 */
53906 function isMasked(func) {
53907 return !!maskSrcKey && maskSrcKey in func;
53908 }
53909
53910 module.exports = isMasked;
53911
53912/***/ }),
53913/* 546 */
53914/***/ (function(module, exports) {
53915
53916 "use strict";
53917
53918 /**
53919 * Removes all key-value entries from the list cache.
53920 *
53921 * @private
53922 * @name clear
53923 * @memberOf ListCache
53924 */
53925 function listCacheClear() {
53926 this.__data__ = [];
53927 this.size = 0;
53928 }
53929
53930 module.exports = listCacheClear;
53931
53932/***/ }),
53933/* 547 */
53934/***/ (function(module, exports, __webpack_require__) {
53935
53936 'use strict';
53937
53938 var assocIndexOf = __webpack_require__(100);
53939
53940 /** Used for built-in method references. */
53941 var arrayProto = Array.prototype;
53942
53943 /** Built-in value references. */
53944 var splice = arrayProto.splice;
53945
53946 /**
53947 * Removes `key` and its value from the list cache.
53948 *
53949 * @private
53950 * @name delete
53951 * @memberOf ListCache
53952 * @param {string} key The key of the value to remove.
53953 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
53954 */
53955 function listCacheDelete(key) {
53956 var data = this.__data__,
53957 index = assocIndexOf(data, key);
53958
53959 if (index < 0) {
53960 return false;
53961 }
53962 var lastIndex = data.length - 1;
53963 if (index == lastIndex) {
53964 data.pop();
53965 } else {
53966 splice.call(data, index, 1);
53967 }
53968 --this.size;
53969 return true;
53970 }
53971
53972 module.exports = listCacheDelete;
53973
53974/***/ }),
53975/* 548 */
53976/***/ (function(module, exports, __webpack_require__) {
53977
53978 'use strict';
53979
53980 var assocIndexOf = __webpack_require__(100);
53981
53982 /**
53983 * Gets the list cache value for `key`.
53984 *
53985 * @private
53986 * @name get
53987 * @memberOf ListCache
53988 * @param {string} key The key of the value to get.
53989 * @returns {*} Returns the entry value.
53990 */
53991 function listCacheGet(key) {
53992 var data = this.__data__,
53993 index = assocIndexOf(data, key);
53994
53995 return index < 0 ? undefined : data[index][1];
53996 }
53997
53998 module.exports = listCacheGet;
53999
54000/***/ }),
54001/* 549 */
54002/***/ (function(module, exports, __webpack_require__) {
54003
54004 'use strict';
54005
54006 var assocIndexOf = __webpack_require__(100);
54007
54008 /**
54009 * Checks if a list cache value for `key` exists.
54010 *
54011 * @private
54012 * @name has
54013 * @memberOf ListCache
54014 * @param {string} key The key of the entry to check.
54015 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
54016 */
54017 function listCacheHas(key) {
54018 return assocIndexOf(this.__data__, key) > -1;
54019 }
54020
54021 module.exports = listCacheHas;
54022
54023/***/ }),
54024/* 550 */
54025/***/ (function(module, exports, __webpack_require__) {
54026
54027 'use strict';
54028
54029 var assocIndexOf = __webpack_require__(100);
54030
54031 /**
54032 * Sets the list cache `key` to `value`.
54033 *
54034 * @private
54035 * @name set
54036 * @memberOf ListCache
54037 * @param {string} key The key of the value to set.
54038 * @param {*} value The value to set.
54039 * @returns {Object} Returns the list cache instance.
54040 */
54041 function listCacheSet(key, value) {
54042 var data = this.__data__,
54043 index = assocIndexOf(data, key);
54044
54045 if (index < 0) {
54046 ++this.size;
54047 data.push([key, value]);
54048 } else {
54049 data[index][1] = value;
54050 }
54051 return this;
54052 }
54053
54054 module.exports = listCacheSet;
54055
54056/***/ }),
54057/* 551 */
54058/***/ (function(module, exports, __webpack_require__) {
54059
54060 'use strict';
54061
54062 var Hash = __webpack_require__(473),
54063 ListCache = __webpack_require__(98),
54064 Map = __webpack_require__(159);
54065
54066 /**
54067 * Removes all key-value entries from the map.
54068 *
54069 * @private
54070 * @name clear
54071 * @memberOf MapCache
54072 */
54073 function mapCacheClear() {
54074 this.size = 0;
54075 this.__data__ = {
54076 'hash': new Hash(),
54077 'map': new (Map || ListCache)(),
54078 'string': new Hash()
54079 };
54080 }
54081
54082 module.exports = mapCacheClear;
54083
54084/***/ }),
54085/* 552 */
54086/***/ (function(module, exports, __webpack_require__) {
54087
54088 'use strict';
54089
54090 var getMapData = __webpack_require__(104);
54091
54092 /**
54093 * Removes `key` and its value from the map.
54094 *
54095 * @private
54096 * @name delete
54097 * @memberOf MapCache
54098 * @param {string} key The key of the value to remove.
54099 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
54100 */
54101 function mapCacheDelete(key) {
54102 var result = getMapData(this, key)['delete'](key);
54103 this.size -= result ? 1 : 0;
54104 return result;
54105 }
54106
54107 module.exports = mapCacheDelete;
54108
54109/***/ }),
54110/* 553 */
54111/***/ (function(module, exports, __webpack_require__) {
54112
54113 'use strict';
54114
54115 var getMapData = __webpack_require__(104);
54116
54117 /**
54118 * Gets the map value for `key`.
54119 *
54120 * @private
54121 * @name get
54122 * @memberOf MapCache
54123 * @param {string} key The key of the value to get.
54124 * @returns {*} Returns the entry value.
54125 */
54126 function mapCacheGet(key) {
54127 return getMapData(this, key).get(key);
54128 }
54129
54130 module.exports = mapCacheGet;
54131
54132/***/ }),
54133/* 554 */
54134/***/ (function(module, exports, __webpack_require__) {
54135
54136 'use strict';
54137
54138 var getMapData = __webpack_require__(104);
54139
54140 /**
54141 * Checks if a map value for `key` exists.
54142 *
54143 * @private
54144 * @name has
54145 * @memberOf MapCache
54146 * @param {string} key The key of the entry to check.
54147 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
54148 */
54149 function mapCacheHas(key) {
54150 return getMapData(this, key).has(key);
54151 }
54152
54153 module.exports = mapCacheHas;
54154
54155/***/ }),
54156/* 555 */
54157/***/ (function(module, exports, __webpack_require__) {
54158
54159 'use strict';
54160
54161 var getMapData = __webpack_require__(104);
54162
54163 /**
54164 * Sets the map `key` to `value`.
54165 *
54166 * @private
54167 * @name set
54168 * @memberOf MapCache
54169 * @param {string} key The key of the value to set.
54170 * @param {*} value The value to set.
54171 * @returns {Object} Returns the map cache instance.
54172 */
54173 function mapCacheSet(key, value) {
54174 var data = getMapData(this, key),
54175 size = data.size;
54176
54177 data.set(key, value);
54178 this.size += data.size == size ? 0 : 1;
54179 return this;
54180 }
54181
54182 module.exports = mapCacheSet;
54183
54184/***/ }),
54185/* 556 */
54186/***/ (function(module, exports, __webpack_require__) {
54187
54188 'use strict';
54189
54190 var memoize = __webpack_require__(589);
54191
54192 /** Used as the maximum memoize cache size. */
54193 var MAX_MEMOIZE_SIZE = 500;
54194
54195 /**
54196 * A specialized version of `_.memoize` which clears the memoized function's
54197 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
54198 *
54199 * @private
54200 * @param {Function} func The function to have its output memoized.
54201 * @returns {Function} Returns the new memoized function.
54202 */
54203 function memoizeCapped(func) {
54204 var result = memoize(func, function (key) {
54205 if (cache.size === MAX_MEMOIZE_SIZE) {
54206 cache.clear();
54207 }
54208 return key;
54209 });
54210
54211 var cache = result.cache;
54212 return result;
54213 }
54214
54215 module.exports = memoizeCapped;
54216
54217/***/ }),
54218/* 557 */
54219/***/ (function(module, exports, __webpack_require__) {
54220
54221 'use strict';
54222
54223 var overArg = __webpack_require__(271);
54224
54225 /* Built-in method references for those with the same name as other `lodash` methods. */
54226 var nativeKeys = overArg(Object.keys, Object);
54227
54228 module.exports = nativeKeys;
54229
54230/***/ }),
54231/* 558 */
54232/***/ (function(module, exports) {
54233
54234 "use strict";
54235
54236 /**
54237 * This function is like
54238 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
54239 * except that it includes inherited enumerable properties.
54240 *
54241 * @private
54242 * @param {Object} object The object to query.
54243 * @returns {Array} Returns the array of property names.
54244 */
54245 function nativeKeysIn(object) {
54246 var result = [];
54247 if (object != null) {
54248 for (var key in Object(object)) {
54249 result.push(key);
54250 }
54251 }
54252 return result;
54253 }
54254
54255 module.exports = nativeKeysIn;
54256
54257/***/ }),
54258/* 559 */
54259/***/ (function(module, exports) {
54260
54261 "use strict";
54262
54263 /** Used for built-in method references. */
54264 var objectProto = Object.prototype;
54265
54266 /**
54267 * Used to resolve the
54268 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
54269 * of values.
54270 */
54271 var nativeObjectToString = objectProto.toString;
54272
54273 /**
54274 * Converts `value` to a string using `Object.prototype.toString`.
54275 *
54276 * @private
54277 * @param {*} value The value to convert.
54278 * @returns {string} Returns the converted string.
54279 */
54280 function objectToString(value) {
54281 return nativeObjectToString.call(value);
54282 }
54283
54284 module.exports = objectToString;
54285
54286/***/ }),
54287/* 560 */
54288/***/ (function(module, exports, __webpack_require__) {
54289
54290 'use strict';
54291
54292 var apply = __webpack_require__(244);
54293
54294 /* Built-in method references for those with the same name as other `lodash` methods. */
54295 var nativeMax = Math.max;
54296
54297 /**
54298 * A specialized version of `baseRest` which transforms the rest array.
54299 *
54300 * @private
54301 * @param {Function} func The function to apply a rest parameter to.
54302 * @param {number} [start=func.length-1] The start position of the rest parameter.
54303 * @param {Function} transform The rest array transform.
54304 * @returns {Function} Returns the new function.
54305 */
54306 function overRest(func, start, transform) {
54307 start = nativeMax(start === undefined ? func.length - 1 : start, 0);
54308 return function () {
54309 var args = arguments,
54310 index = -1,
54311 length = nativeMax(args.length - start, 0),
54312 array = Array(length);
54313
54314 while (++index < length) {
54315 array[index] = args[start + index];
54316 }
54317 index = -1;
54318 var otherArgs = Array(start + 1);
54319 while (++index < start) {
54320 otherArgs[index] = args[index];
54321 }
54322 otherArgs[start] = transform(array);
54323 return apply(func, this, otherArgs);
54324 };
54325 }
54326
54327 module.exports = overRest;
54328
54329/***/ }),
54330/* 561 */
54331/***/ (function(module, exports) {
54332
54333 'use strict';
54334
54335 /** Used to stand-in for `undefined` hash values. */
54336 var HASH_UNDEFINED = '__lodash_hash_undefined__';
54337
54338 /**
54339 * Adds `value` to the array cache.
54340 *
54341 * @private
54342 * @name add
54343 * @memberOf SetCache
54344 * @alias push
54345 * @param {*} value The value to cache.
54346 * @returns {Object} Returns the cache instance.
54347 */
54348 function setCacheAdd(value) {
54349 this.__data__.set(value, HASH_UNDEFINED);
54350 return this;
54351 }
54352
54353 module.exports = setCacheAdd;
54354
54355/***/ }),
54356/* 562 */
54357/***/ (function(module, exports) {
54358
54359 "use strict";
54360
54361 /**
54362 * Checks if `value` is in the array cache.
54363 *
54364 * @private
54365 * @name has
54366 * @memberOf SetCache
54367 * @param {*} value The value to search for.
54368 * @returns {number} Returns `true` if `value` is found, else `false`.
54369 */
54370 function setCacheHas(value) {
54371 return this.__data__.has(value);
54372 }
54373
54374 module.exports = setCacheHas;
54375
54376/***/ }),
54377/* 563 */
54378/***/ (function(module, exports, __webpack_require__) {
54379
54380 'use strict';
54381
54382 var baseSetToString = __webpack_require__(511),
54383 shortOut = __webpack_require__(564);
54384
54385 /**
54386 * Sets the `toString` method of `func` to return `string`.
54387 *
54388 * @private
54389 * @param {Function} func The function to modify.
54390 * @param {Function} string The `toString` result.
54391 * @returns {Function} Returns `func`.
54392 */
54393 var setToString = shortOut(baseSetToString);
54394
54395 module.exports = setToString;
54396
54397/***/ }),
54398/* 564 */
54399/***/ (function(module, exports) {
54400
54401 "use strict";
54402
54403 /** Used to detect hot functions by number of calls within a span of milliseconds. */
54404 var HOT_COUNT = 800,
54405 HOT_SPAN = 16;
54406
54407 /* Built-in method references for those with the same name as other `lodash` methods. */
54408 var nativeNow = Date.now;
54409
54410 /**
54411 * Creates a function that'll short out and invoke `identity` instead
54412 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
54413 * milliseconds.
54414 *
54415 * @private
54416 * @param {Function} func The function to restrict.
54417 * @returns {Function} Returns the new shortable function.
54418 */
54419 function shortOut(func) {
54420 var count = 0,
54421 lastCalled = 0;
54422
54423 return function () {
54424 var stamp = nativeNow(),
54425 remaining = HOT_SPAN - (stamp - lastCalled);
54426
54427 lastCalled = stamp;
54428 if (remaining > 0) {
54429 if (++count >= HOT_COUNT) {
54430 return arguments[0];
54431 }
54432 } else {
54433 count = 0;
54434 }
54435 return func.apply(undefined, arguments);
54436 };
54437 }
54438
54439 module.exports = shortOut;
54440
54441/***/ }),
54442/* 565 */
54443/***/ (function(module, exports, __webpack_require__) {
54444
54445 'use strict';
54446
54447 var ListCache = __webpack_require__(98);
54448
54449 /**
54450 * Removes all key-value entries from the stack.
54451 *
54452 * @private
54453 * @name clear
54454 * @memberOf Stack
54455 */
54456 function stackClear() {
54457 this.__data__ = new ListCache();
54458 this.size = 0;
54459 }
54460
54461 module.exports = stackClear;
54462
54463/***/ }),
54464/* 566 */
54465/***/ (function(module, exports) {
54466
54467 'use strict';
54468
54469 /**
54470 * Removes `key` and its value from the stack.
54471 *
54472 * @private
54473 * @name delete
54474 * @memberOf Stack
54475 * @param {string} key The key of the value to remove.
54476 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
54477 */
54478 function stackDelete(key) {
54479 var data = this.__data__,
54480 result = data['delete'](key);
54481
54482 this.size = data.size;
54483 return result;
54484 }
54485
54486 module.exports = stackDelete;
54487
54488/***/ }),
54489/* 567 */
54490/***/ (function(module, exports) {
54491
54492 "use strict";
54493
54494 /**
54495 * Gets the stack value for `key`.
54496 *
54497 * @private
54498 * @name get
54499 * @memberOf Stack
54500 * @param {string} key The key of the value to get.
54501 * @returns {*} Returns the entry value.
54502 */
54503 function stackGet(key) {
54504 return this.__data__.get(key);
54505 }
54506
54507 module.exports = stackGet;
54508
54509/***/ }),
54510/* 568 */
54511/***/ (function(module, exports) {
54512
54513 "use strict";
54514
54515 /**
54516 * Checks if a stack value for `key` exists.
54517 *
54518 * @private
54519 * @name has
54520 * @memberOf Stack
54521 * @param {string} key The key of the entry to check.
54522 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
54523 */
54524 function stackHas(key) {
54525 return this.__data__.has(key);
54526 }
54527
54528 module.exports = stackHas;
54529
54530/***/ }),
54531/* 569 */
54532/***/ (function(module, exports, __webpack_require__) {
54533
54534 'use strict';
54535
54536 var ListCache = __webpack_require__(98),
54537 Map = __webpack_require__(159),
54538 MapCache = __webpack_require__(160);
54539
54540 /** Used as the size to enable large array optimizations. */
54541 var LARGE_ARRAY_SIZE = 200;
54542
54543 /**
54544 * Sets the stack `key` to `value`.
54545 *
54546 * @private
54547 * @name set
54548 * @memberOf Stack
54549 * @param {string} key The key of the value to set.
54550 * @param {*} value The value to set.
54551 * @returns {Object} Returns the stack cache instance.
54552 */
54553 function stackSet(key, value) {
54554 var data = this.__data__;
54555 if (data instanceof ListCache) {
54556 var pairs = data.__data__;
54557 if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
54558 pairs.push([key, value]);
54559 this.size = ++data.size;
54560 return this;
54561 }
54562 data = this.__data__ = new MapCache(pairs);
54563 }
54564 data.set(key, value);
54565 this.size = data.size;
54566 return this;
54567 }
54568
54569 module.exports = stackSet;
54570
54571/***/ }),
54572/* 570 */
54573/***/ (function(module, exports) {
54574
54575 "use strict";
54576
54577 /**
54578 * A specialized version of `_.indexOf` which performs strict equality
54579 * comparisons of values, i.e. `===`.
54580 *
54581 * @private
54582 * @param {Array} array The array to inspect.
54583 * @param {*} value The value to search for.
54584 * @param {number} fromIndex The index to search from.
54585 * @returns {number} Returns the index of the matched value, else `-1`.
54586 */
54587 function strictIndexOf(array, value, fromIndex) {
54588 var index = fromIndex - 1,
54589 length = array.length;
54590
54591 while (++index < length) {
54592 if (array[index] === value) {
54593 return index;
54594 }
54595 }
54596 return -1;
54597 }
54598
54599 module.exports = strictIndexOf;
54600
54601/***/ }),
54602/* 571 */
54603/***/ (function(module, exports, __webpack_require__) {
54604
54605 'use strict';
54606
54607 var memoizeCapped = __webpack_require__(556);
54608
54609 /** Used to match property names within property paths. */
54610 var reLeadingDot = /^\./,
54611 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
54612
54613 /** Used to match backslashes in property paths. */
54614 var reEscapeChar = /\\(\\)?/g;
54615
54616 /**
54617 * Converts `string` to a property path array.
54618 *
54619 * @private
54620 * @param {string} string The string to convert.
54621 * @returns {Array} Returns the property path array.
54622 */
54623 var stringToPath = memoizeCapped(function (string) {
54624 var result = [];
54625 if (reLeadingDot.test(string)) {
54626 result.push('');
54627 }
54628 string.replace(rePropName, function (match, number, quote, string) {
54629 result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
54630 });
54631 return result;
54632 });
54633
54634 module.exports = stringToPath;
54635
54636/***/ }),
54637/* 572 */
54638/***/ (function(module, exports, __webpack_require__) {
54639
54640 'use strict';
54641
54642 var copyObject = __webpack_require__(31),
54643 createAssigner = __webpack_require__(103),
54644 keysIn = __webpack_require__(47);
54645
54646 /**
54647 * This method is like `_.assign` except that it iterates over own and
54648 * inherited source properties.
54649 *
54650 * **Note:** This method mutates `object`.
54651 *
54652 * @static
54653 * @memberOf _
54654 * @since 4.0.0
54655 * @alias extend
54656 * @category Object
54657 * @param {Object} object The destination object.
54658 * @param {...Object} [sources] The source objects.
54659 * @returns {Object} Returns `object`.
54660 * @see _.assign
54661 * @example
54662 *
54663 * function Foo() {
54664 * this.a = 1;
54665 * }
54666 *
54667 * function Bar() {
54668 * this.c = 3;
54669 * }
54670 *
54671 * Foo.prototype.b = 2;
54672 * Bar.prototype.d = 4;
54673 *
54674 * _.assignIn({ 'a': 0 }, new Foo, new Bar);
54675 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
54676 */
54677 var assignIn = createAssigner(function (object, source) {
54678 copyObject(source, keysIn(source), object);
54679 });
54680
54681 module.exports = assignIn;
54682
54683/***/ }),
54684/* 573 */
54685/***/ (function(module, exports, __webpack_require__) {
54686
54687 'use strict';
54688
54689 var copyObject = __webpack_require__(31),
54690 createAssigner = __webpack_require__(103),
54691 keysIn = __webpack_require__(47);
54692
54693 /**
54694 * This method is like `_.assignIn` except that it accepts `customizer`
54695 * which is invoked to produce the assigned values. If `customizer` returns
54696 * `undefined`, assignment is handled by the method instead. The `customizer`
54697 * is invoked with five arguments: (objValue, srcValue, key, object, source).
54698 *
54699 * **Note:** This method mutates `object`.
54700 *
54701 * @static
54702 * @memberOf _
54703 * @since 4.0.0
54704 * @alias extendWith
54705 * @category Object
54706 * @param {Object} object The destination object.
54707 * @param {...Object} sources The source objects.
54708 * @param {Function} [customizer] The function to customize assigned values.
54709 * @returns {Object} Returns `object`.
54710 * @see _.assignWith
54711 * @example
54712 *
54713 * function customizer(objValue, srcValue) {
54714 * return _.isUndefined(objValue) ? srcValue : objValue;
54715 * }
54716 *
54717 * var defaults = _.partialRight(_.assignInWith, customizer);
54718 *
54719 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
54720 * // => { 'a': 1, 'b': 2 }
54721 */
54722 var assignInWith = createAssigner(function (object, source, srcIndex, customizer) {
54723 copyObject(source, keysIn(source), object, customizer);
54724 });
54725
54726 module.exports = assignInWith;
54727
54728/***/ }),
54729/* 574 */
54730/***/ (function(module, exports, __webpack_require__) {
54731
54732 'use strict';
54733
54734 var baseClone = __webpack_require__(164);
54735
54736 /** Used to compose bitmasks for cloning. */
54737 var CLONE_DEEP_FLAG = 1,
54738 CLONE_SYMBOLS_FLAG = 4;
54739
54740 /**
54741 * This method is like `_.clone` except that it recursively clones `value`.
54742 *
54743 * @static
54744 * @memberOf _
54745 * @since 1.0.0
54746 * @category Lang
54747 * @param {*} value The value to recursively clone.
54748 * @returns {*} Returns the deep cloned value.
54749 * @see _.clone
54750 * @example
54751 *
54752 * var objects = [{ 'a': 1 }, { 'b': 2 }];
54753 *
54754 * var deep = _.cloneDeep(objects);
54755 * console.log(deep[0] === objects[0]);
54756 * // => false
54757 */
54758 function cloneDeep(value) {
54759 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
54760 }
54761
54762 module.exports = cloneDeep;
54763
54764/***/ }),
54765/* 575 */
54766/***/ (function(module, exports, __webpack_require__) {
54767
54768 'use strict';
54769
54770 var baseClone = __webpack_require__(164);
54771
54772 /** Used to compose bitmasks for cloning. */
54773 var CLONE_DEEP_FLAG = 1,
54774 CLONE_SYMBOLS_FLAG = 4;
54775
54776 /**
54777 * This method is like `_.cloneWith` except that it recursively clones `value`.
54778 *
54779 * @static
54780 * @memberOf _
54781 * @since 4.0.0
54782 * @category Lang
54783 * @param {*} value The value to recursively clone.
54784 * @param {Function} [customizer] The function to customize cloning.
54785 * @returns {*} Returns the deep cloned value.
54786 * @see _.cloneWith
54787 * @example
54788 *
54789 * function customizer(value) {
54790 * if (_.isElement(value)) {
54791 * return value.cloneNode(true);
54792 * }
54793 * }
54794 *
54795 * var el = _.cloneDeepWith(document.body, customizer);
54796 *
54797 * console.log(el === document.body);
54798 * // => false
54799 * console.log(el.nodeName);
54800 * // => 'BODY'
54801 * console.log(el.childNodes.length);
54802 * // => 20
54803 */
54804 function cloneDeepWith(value, customizer) {
54805 customizer = typeof customizer == 'function' ? customizer : undefined;
54806 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
54807 }
54808
54809 module.exports = cloneDeepWith;
54810
54811/***/ }),
54812/* 576 */
54813/***/ (function(module, exports) {
54814
54815 "use strict";
54816
54817 /**
54818 * Creates a function that returns `value`.
54819 *
54820 * @static
54821 * @memberOf _
54822 * @since 2.4.0
54823 * @category Util
54824 * @param {*} value The value to return from the new function.
54825 * @returns {Function} Returns the new constant function.
54826 * @example
54827 *
54828 * var objects = _.times(2, _.constant({ 'a': 1 }));
54829 *
54830 * console.log(objects);
54831 * // => [{ 'a': 1 }, { 'a': 1 }]
54832 *
54833 * console.log(objects[0] === objects[1]);
54834 * // => true
54835 */
54836 function constant(value) {
54837 return function () {
54838 return value;
54839 };
54840 }
54841
54842 module.exports = constant;
54843
54844/***/ }),
54845/* 577 */
54846/***/ (function(module, exports, __webpack_require__) {
54847
54848 'use strict';
54849
54850 var toString = __webpack_require__(114);
54851
54852 /**
54853 * Used to match `RegExp`
54854 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
54855 */
54856 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
54857 reHasRegExpChar = RegExp(reRegExpChar.source);
54858
54859 /**
54860 * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
54861 * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
54862 *
54863 * @static
54864 * @memberOf _
54865 * @since 3.0.0
54866 * @category String
54867 * @param {string} [string=''] The string to escape.
54868 * @returns {string} Returns the escaped string.
54869 * @example
54870 *
54871 * _.escapeRegExp('[lodash](https://lodash.com/)');
54872 * // => '\[lodash\]\(https://lodash\.com/\)'
54873 */
54874 function escapeRegExp(string) {
54875 string = toString(string);
54876 return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;
54877 }
54878
54879 module.exports = escapeRegExp;
54880
54881/***/ }),
54882/* 578 */
54883/***/ (function(module, exports, __webpack_require__) {
54884
54885 'use strict';
54886
54887 module.exports = __webpack_require__(572);
54888
54889/***/ }),
54890/* 579 */
54891/***/ (function(module, exports, __webpack_require__) {
54892
54893 'use strict';
54894
54895 var createFind = __webpack_require__(258),
54896 findIndex = __webpack_require__(580);
54897
54898 /**
54899 * Iterates over elements of `collection`, returning the first element
54900 * `predicate` returns truthy for. The predicate is invoked with three
54901 * arguments: (value, index|key, collection).
54902 *
54903 * @static
54904 * @memberOf _
54905 * @since 0.1.0
54906 * @category Collection
54907 * @param {Array|Object} collection The collection to inspect.
54908 * @param {Function} [predicate=_.identity] The function invoked per iteration.
54909 * @param {number} [fromIndex=0] The index to search from.
54910 * @returns {*} Returns the matched element, else `undefined`.
54911 * @example
54912 *
54913 * var users = [
54914 * { 'user': 'barney', 'age': 36, 'active': true },
54915 * { 'user': 'fred', 'age': 40, 'active': false },
54916 * { 'user': 'pebbles', 'age': 1, 'active': true }
54917 * ];
54918 *
54919 * _.find(users, function(o) { return o.age < 40; });
54920 * // => object for 'barney'
54921 *
54922 * // The `_.matches` iteratee shorthand.
54923 * _.find(users, { 'age': 1, 'active': true });
54924 * // => object for 'pebbles'
54925 *
54926 * // The `_.matchesProperty` iteratee shorthand.
54927 * _.find(users, ['active', false]);
54928 * // => object for 'fred'
54929 *
54930 * // The `_.property` iteratee shorthand.
54931 * _.find(users, 'active');
54932 * // => object for 'barney'
54933 */
54934 var find = createFind(findIndex);
54935
54936 module.exports = find;
54937
54938/***/ }),
54939/* 580 */
54940/***/ (function(module, exports, __webpack_require__) {
54941
54942 'use strict';
54943
54944 var baseFindIndex = __webpack_require__(165),
54945 baseIteratee = __webpack_require__(61),
54946 toInteger = __webpack_require__(48);
54947
54948 /* Built-in method references for those with the same name as other `lodash` methods. */
54949 var nativeMax = Math.max;
54950
54951 /**
54952 * This method is like `_.find` except that it returns the index of the first
54953 * element `predicate` returns truthy for instead of the element itself.
54954 *
54955 * @static
54956 * @memberOf _
54957 * @since 1.1.0
54958 * @category Array
54959 * @param {Array} array The array to inspect.
54960 * @param {Function} [predicate=_.identity] The function invoked per iteration.
54961 * @param {number} [fromIndex=0] The index to search from.
54962 * @returns {number} Returns the index of the found element, else `-1`.
54963 * @example
54964 *
54965 * var users = [
54966 * { 'user': 'barney', 'active': false },
54967 * { 'user': 'fred', 'active': false },
54968 * { 'user': 'pebbles', 'active': true }
54969 * ];
54970 *
54971 * _.findIndex(users, function(o) { return o.user == 'barney'; });
54972 * // => 0
54973 *
54974 * // The `_.matches` iteratee shorthand.
54975 * _.findIndex(users, { 'user': 'fred', 'active': false });
54976 * // => 1
54977 *
54978 * // The `_.matchesProperty` iteratee shorthand.
54979 * _.findIndex(users, ['active', false]);
54980 * // => 0
54981 *
54982 * // The `_.property` iteratee shorthand.
54983 * _.findIndex(users, 'active');
54984 * // => 2
54985 */
54986 function findIndex(array, predicate, fromIndex) {
54987 var length = array == null ? 0 : array.length;
54988 if (!length) {
54989 return -1;
54990 }
54991 var index = fromIndex == null ? 0 : toInteger(fromIndex);
54992 if (index < 0) {
54993 index = nativeMax(length + index, 0);
54994 }
54995 return baseFindIndex(array, baseIteratee(predicate, 3), index);
54996 }
54997
54998 module.exports = findIndex;
54999
55000/***/ }),
55001/* 581 */
55002/***/ (function(module, exports, __webpack_require__) {
55003
55004 'use strict';
55005
55006 var createFind = __webpack_require__(258),
55007 findLastIndex = __webpack_require__(582);
55008
55009 /**
55010 * This method is like `_.find` except that it iterates over elements of
55011 * `collection` from right to left.
55012 *
55013 * @static
55014 * @memberOf _
55015 * @since 2.0.0
55016 * @category Collection
55017 * @param {Array|Object} collection The collection to inspect.
55018 * @param {Function} [predicate=_.identity] The function invoked per iteration.
55019 * @param {number} [fromIndex=collection.length-1] The index to search from.
55020 * @returns {*} Returns the matched element, else `undefined`.
55021 * @example
55022 *
55023 * _.findLast([1, 2, 3, 4], function(n) {
55024 * return n % 2 == 1;
55025 * });
55026 * // => 3
55027 */
55028 var findLast = createFind(findLastIndex);
55029
55030 module.exports = findLast;
55031
55032/***/ }),
55033/* 582 */
55034/***/ (function(module, exports, __webpack_require__) {
55035
55036 'use strict';
55037
55038 var baseFindIndex = __webpack_require__(165),
55039 baseIteratee = __webpack_require__(61),
55040 toInteger = __webpack_require__(48);
55041
55042 /* Built-in method references for those with the same name as other `lodash` methods. */
55043 var nativeMax = Math.max,
55044 nativeMin = Math.min;
55045
55046 /**
55047 * This method is like `_.findIndex` except that it iterates over elements
55048 * of `collection` from right to left.
55049 *
55050 * @static
55051 * @memberOf _
55052 * @since 2.0.0
55053 * @category Array
55054 * @param {Array} array The array to inspect.
55055 * @param {Function} [predicate=_.identity] The function invoked per iteration.
55056 * @param {number} [fromIndex=array.length-1] The index to search from.
55057 * @returns {number} Returns the index of the found element, else `-1`.
55058 * @example
55059 *
55060 * var users = [
55061 * { 'user': 'barney', 'active': true },
55062 * { 'user': 'fred', 'active': false },
55063 * { 'user': 'pebbles', 'active': false }
55064 * ];
55065 *
55066 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
55067 * // => 2
55068 *
55069 * // The `_.matches` iteratee shorthand.
55070 * _.findLastIndex(users, { 'user': 'barney', 'active': true });
55071 * // => 0
55072 *
55073 * // The `_.matchesProperty` iteratee shorthand.
55074 * _.findLastIndex(users, ['active', false]);
55075 * // => 2
55076 *
55077 * // The `_.property` iteratee shorthand.
55078 * _.findLastIndex(users, 'active');
55079 * // => 0
55080 */
55081 function findLastIndex(array, predicate, fromIndex) {
55082 var length = array == null ? 0 : array.length;
55083 if (!length) {
55084 return -1;
55085 }
55086 var index = length - 1;
55087 if (fromIndex !== undefined) {
55088 index = toInteger(fromIndex);
55089 index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
55090 }
55091 return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
55092 }
55093
55094 module.exports = findLastIndex;
55095
55096/***/ }),
55097/* 583 */
55098/***/ (function(module, exports, __webpack_require__) {
55099
55100 'use strict';
55101
55102 var baseGet = __webpack_require__(249);
55103
55104 /**
55105 * Gets the value at `path` of `object`. If the resolved value is
55106 * `undefined`, the `defaultValue` is returned in its place.
55107 *
55108 * @static
55109 * @memberOf _
55110 * @since 3.7.0
55111 * @category Object
55112 * @param {Object} object The object to query.
55113 * @param {Array|string} path The path of the property to get.
55114 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
55115 * @returns {*} Returns the resolved value.
55116 * @example
55117 *
55118 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
55119 *
55120 * _.get(object, 'a[0].b.c');
55121 * // => 3
55122 *
55123 * _.get(object, ['a', '0', 'b', 'c']);
55124 * // => 3
55125 *
55126 * _.get(object, 'a.b.c', 'default');
55127 * // => 'default'
55128 */
55129 function get(object, path, defaultValue) {
55130 var result = object == null ? undefined : baseGet(object, path);
55131 return result === undefined ? defaultValue : result;
55132 }
55133
55134 module.exports = get;
55135
55136/***/ }),
55137/* 584 */
55138/***/ (function(module, exports, __webpack_require__) {
55139
55140 'use strict';
55141
55142 var baseHasIn = __webpack_require__(491),
55143 hasPath = __webpack_require__(265);
55144
55145 /**
55146 * Checks if `path` is a direct or inherited property of `object`.
55147 *
55148 * @static
55149 * @memberOf _
55150 * @since 4.0.0
55151 * @category Object
55152 * @param {Object} object The object to query.
55153 * @param {Array|string} path The path to check.
55154 * @returns {boolean} Returns `true` if `path` exists, else `false`.
55155 * @example
55156 *
55157 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
55158 *
55159 * _.hasIn(object, 'a');
55160 * // => true
55161 *
55162 * _.hasIn(object, 'a.b');
55163 * // => true
55164 *
55165 * _.hasIn(object, ['a', 'b']);
55166 * // => true
55167 *
55168 * _.hasIn(object, 'b');
55169 * // => false
55170 */
55171 function hasIn(object, path) {
55172 return object != null && hasPath(object, path, baseHasIn);
55173 }
55174
55175 module.exports = hasIn;
55176
55177/***/ }),
55178/* 585 */
55179/***/ (function(module, exports, __webpack_require__) {
55180
55181 'use strict';
55182
55183 var isArrayLike = __webpack_require__(24),
55184 isObjectLike = __webpack_require__(25);
55185
55186 /**
55187 * This method is like `_.isArrayLike` except that it also checks if `value`
55188 * is an object.
55189 *
55190 * @static
55191 * @memberOf _
55192 * @since 4.0.0
55193 * @category Lang
55194 * @param {*} value The value to check.
55195 * @returns {boolean} Returns `true` if `value` is an array-like object,
55196 * else `false`.
55197 * @example
55198 *
55199 * _.isArrayLikeObject([1, 2, 3]);
55200 * // => true
55201 *
55202 * _.isArrayLikeObject(document.body.children);
55203 * // => true
55204 *
55205 * _.isArrayLikeObject('abc');
55206 * // => false
55207 *
55208 * _.isArrayLikeObject(_.noop);
55209 * // => false
55210 */
55211 function isArrayLikeObject(value) {
55212 return isObjectLike(value) && isArrayLike(value);
55213 }
55214
55215 module.exports = isArrayLikeObject;
55216
55217/***/ }),
55218/* 586 */
55219/***/ (function(module, exports, __webpack_require__) {
55220
55221 'use strict';
55222
55223 var toInteger = __webpack_require__(48);
55224
55225 /**
55226 * Checks if `value` is an integer.
55227 *
55228 * **Note:** This method is based on
55229 * [`Number.isInteger`](https://mdn.io/Number/isInteger).
55230 *
55231 * @static
55232 * @memberOf _
55233 * @since 4.0.0
55234 * @category Lang
55235 * @param {*} value The value to check.
55236 * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
55237 * @example
55238 *
55239 * _.isInteger(3);
55240 * // => true
55241 *
55242 * _.isInteger(Number.MIN_VALUE);
55243 * // => false
55244 *
55245 * _.isInteger(Infinity);
55246 * // => false
55247 *
55248 * _.isInteger('3');
55249 * // => false
55250 */
55251 function isInteger(value) {
55252 return typeof value == 'number' && value == toInteger(value);
55253 }
55254
55255 module.exports = isInteger;
55256
55257/***/ }),
55258/* 587 */
55259/***/ (function(module, exports, __webpack_require__) {
55260
55261 'use strict';
55262
55263 var baseGetTag = __webpack_require__(30),
55264 isArray = __webpack_require__(6),
55265 isObjectLike = __webpack_require__(25);
55266
55267 /** `Object#toString` result references. */
55268 var stringTag = '[object String]';
55269
55270 /**
55271 * Checks if `value` is classified as a `String` primitive or object.
55272 *
55273 * @static
55274 * @since 0.1.0
55275 * @memberOf _
55276 * @category Lang
55277 * @param {*} value The value to check.
55278 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
55279 * @example
55280 *
55281 * _.isString('abc');
55282 * // => true
55283 *
55284 * _.isString(1);
55285 * // => false
55286 */
55287 function isString(value) {
55288 return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
55289 }
55290
55291 module.exports = isString;
55292
55293/***/ }),
55294/* 588 */
55295/***/ (function(module, exports, __webpack_require__) {
55296
55297 'use strict';
55298
55299 var arrayMap = __webpack_require__(60),
55300 baseIteratee = __webpack_require__(61),
55301 baseMap = __webpack_require__(252),
55302 isArray = __webpack_require__(6);
55303
55304 /**
55305 * Creates an array of values by running each element in `collection` thru
55306 * `iteratee`. The iteratee is invoked with three arguments:
55307 * (value, index|key, collection).
55308 *
55309 * Many lodash methods are guarded to work as iteratees for methods like
55310 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
55311 *
55312 * The guarded methods are:
55313 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
55314 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
55315 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
55316 * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
55317 *
55318 * @static
55319 * @memberOf _
55320 * @since 0.1.0
55321 * @category Collection
55322 * @param {Array|Object} collection The collection to iterate over.
55323 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
55324 * @returns {Array} Returns the new mapped array.
55325 * @example
55326 *
55327 * function square(n) {
55328 * return n * n;
55329 * }
55330 *
55331 * _.map([4, 8], square);
55332 * // => [16, 64]
55333 *
55334 * _.map({ 'a': 4, 'b': 8 }, square);
55335 * // => [16, 64] (iteration order is not guaranteed)
55336 *
55337 * var users = [
55338 * { 'user': 'barney' },
55339 * { 'user': 'fred' }
55340 * ];
55341 *
55342 * // The `_.property` iteratee shorthand.
55343 * _.map(users, 'user');
55344 * // => ['barney', 'fred']
55345 */
55346 function map(collection, iteratee) {
55347 var func = isArray(collection) ? arrayMap : baseMap;
55348 return func(collection, baseIteratee(iteratee, 3));
55349 }
55350
55351 module.exports = map;
55352
55353/***/ }),
55354/* 589 */
55355/***/ (function(module, exports, __webpack_require__) {
55356
55357 'use strict';
55358
55359 var MapCache = __webpack_require__(160);
55360
55361 /** Error message constants. */
55362 var FUNC_ERROR_TEXT = 'Expected a function';
55363
55364 /**
55365 * Creates a function that memoizes the result of `func`. If `resolver` is
55366 * provided, it determines the cache key for storing the result based on the
55367 * arguments provided to the memoized function. By default, the first argument
55368 * provided to the memoized function is used as the map cache key. The `func`
55369 * is invoked with the `this` binding of the memoized function.
55370 *
55371 * **Note:** The cache is exposed as the `cache` property on the memoized
55372 * function. Its creation may be customized by replacing the `_.memoize.Cache`
55373 * constructor with one whose instances implement the
55374 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
55375 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
55376 *
55377 * @static
55378 * @memberOf _
55379 * @since 0.1.0
55380 * @category Function
55381 * @param {Function} func The function to have its output memoized.
55382 * @param {Function} [resolver] The function to resolve the cache key.
55383 * @returns {Function} Returns the new memoized function.
55384 * @example
55385 *
55386 * var object = { 'a': 1, 'b': 2 };
55387 * var other = { 'c': 3, 'd': 4 };
55388 *
55389 * var values = _.memoize(_.values);
55390 * values(object);
55391 * // => [1, 2]
55392 *
55393 * values(other);
55394 * // => [3, 4]
55395 *
55396 * object.a = 2;
55397 * values(object);
55398 * // => [1, 2]
55399 *
55400 * // Modify the result cache.
55401 * values.cache.set(object, ['a', 'b']);
55402 * values(object);
55403 * // => ['a', 'b']
55404 *
55405 * // Replace `_.memoize.Cache`.
55406 * _.memoize.Cache = WeakMap;
55407 */
55408 function memoize(func, resolver) {
55409 if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
55410 throw new TypeError(FUNC_ERROR_TEXT);
55411 }
55412 var memoized = function memoized() {
55413 var args = arguments,
55414 key = resolver ? resolver.apply(this, args) : args[0],
55415 cache = memoized.cache;
55416
55417 if (cache.has(key)) {
55418 return cache.get(key);
55419 }
55420 var result = func.apply(this, args);
55421 memoized.cache = cache.set(key, result) || cache;
55422 return result;
55423 };
55424 memoized.cache = new (memoize.Cache || MapCache)();
55425 return memoized;
55426 }
55427
55428 // Expose `MapCache`.
55429 memoize.Cache = MapCache;
55430
55431 module.exports = memoize;
55432
55433/***/ }),
55434/* 590 */
55435/***/ (function(module, exports, __webpack_require__) {
55436
55437 'use strict';
55438
55439 var baseMerge = __webpack_require__(504),
55440 createAssigner = __webpack_require__(103);
55441
55442 /**
55443 * This method is like `_.merge` except that it accepts `customizer` which
55444 * is invoked to produce the merged values of the destination and source
55445 * properties. If `customizer` returns `undefined`, merging is handled by the
55446 * method instead. The `customizer` is invoked with six arguments:
55447 * (objValue, srcValue, key, object, source, stack).
55448 *
55449 * **Note:** This method mutates `object`.
55450 *
55451 * @static
55452 * @memberOf _
55453 * @since 4.0.0
55454 * @category Object
55455 * @param {Object} object The destination object.
55456 * @param {...Object} sources The source objects.
55457 * @param {Function} customizer The function to customize assigned values.
55458 * @returns {Object} Returns `object`.
55459 * @example
55460 *
55461 * function customizer(objValue, srcValue) {
55462 * if (_.isArray(objValue)) {
55463 * return objValue.concat(srcValue);
55464 * }
55465 * }
55466 *
55467 * var object = { 'a': [1], 'b': [2] };
55468 * var other = { 'a': [3], 'b': [4] };
55469 *
55470 * _.mergeWith(object, other, customizer);
55471 * // => { 'a': [1, 3], 'b': [2, 4] }
55472 */
55473 var mergeWith = createAssigner(function (object, source, srcIndex, customizer) {
55474 baseMerge(object, source, srcIndex, customizer);
55475 });
55476
55477 module.exports = mergeWith;
55478
55479/***/ }),
55480/* 591 */
55481/***/ (function(module, exports) {
55482
55483 "use strict";
55484
55485 /**
55486 * This method returns `undefined`.
55487 *
55488 * @static
55489 * @memberOf _
55490 * @since 2.3.0
55491 * @category Util
55492 * @example
55493 *
55494 * _.times(2, _.noop);
55495 * // => [undefined, undefined]
55496 */
55497 function noop() {
55498 // No operation performed.
55499 }
55500
55501 module.exports = noop;
55502
55503/***/ }),
55504/* 592 */
55505/***/ (function(module, exports, __webpack_require__) {
55506
55507 'use strict';
55508
55509 var baseProperty = __webpack_require__(507),
55510 basePropertyDeep = __webpack_require__(508),
55511 isKey = __webpack_require__(173),
55512 toKey = __webpack_require__(108);
55513
55514 /**
55515 * Creates a function that returns the value at `path` of a given object.
55516 *
55517 * @static
55518 * @memberOf _
55519 * @since 2.4.0
55520 * @category Util
55521 * @param {Array|string} path The path of the property to get.
55522 * @returns {Function} Returns the new accessor function.
55523 * @example
55524 *
55525 * var objects = [
55526 * { 'a': { 'b': 2 } },
55527 * { 'a': { 'b': 1 } }
55528 * ];
55529 *
55530 * _.map(objects, _.property('a.b'));
55531 * // => [2, 1]
55532 *
55533 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
55534 * // => [1, 2]
55535 */
55536 function property(path) {
55537 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
55538 }
55539
55540 module.exports = property;
55541
55542/***/ }),
55543/* 593 */
55544/***/ (function(module, exports, __webpack_require__) {
55545
55546 'use strict';
55547
55548 var basePullAll = __webpack_require__(509);
55549
55550 /**
55551 * This method is like `_.pull` except that it accepts an array of values to remove.
55552 *
55553 * **Note:** Unlike `_.difference`, this method mutates `array`.
55554 *
55555 * @static
55556 * @memberOf _
55557 * @since 4.0.0
55558 * @category Array
55559 * @param {Array} array The array to modify.
55560 * @param {Array} values The values to remove.
55561 * @returns {Array} Returns `array`.
55562 * @example
55563 *
55564 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
55565 *
55566 * _.pullAll(array, ['a', 'c']);
55567 * console.log(array);
55568 * // => ['b', 'b']
55569 */
55570 function pullAll(array, values) {
55571 return array && array.length && values && values.length ? basePullAll(array, values) : array;
55572 }
55573
55574 module.exports = pullAll;
55575
55576/***/ }),
55577/* 594 */
55578/***/ (function(module, exports, __webpack_require__) {
55579
55580 'use strict';
55581
55582 var baseFlatten = __webpack_require__(488),
55583 baseOrderBy = __webpack_require__(506),
55584 baseRest = __webpack_require__(101),
55585 isIterateeCall = __webpack_require__(172);
55586
55587 /**
55588 * Creates an array of elements, sorted in ascending order by the results of
55589 * running each element in a collection thru each iteratee. This method
55590 * performs a stable sort, that is, it preserves the original sort order of
55591 * equal elements. The iteratees are invoked with one argument: (value).
55592 *
55593 * @static
55594 * @memberOf _
55595 * @since 0.1.0
55596 * @category Collection
55597 * @param {Array|Object} collection The collection to iterate over.
55598 * @param {...(Function|Function[])} [iteratees=[_.identity]]
55599 * The iteratees to sort by.
55600 * @returns {Array} Returns the new sorted array.
55601 * @example
55602 *
55603 * var users = [
55604 * { 'user': 'fred', 'age': 48 },
55605 * { 'user': 'barney', 'age': 36 },
55606 * { 'user': 'fred', 'age': 40 },
55607 * { 'user': 'barney', 'age': 34 }
55608 * ];
55609 *
55610 * _.sortBy(users, [function(o) { return o.user; }]);
55611 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
55612 *
55613 * _.sortBy(users, ['user', 'age']);
55614 * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
55615 */
55616 var sortBy = baseRest(function (collection, iteratees) {
55617 if (collection == null) {
55618 return [];
55619 }
55620 var length = iteratees.length;
55621 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
55622 iteratees = [];
55623 } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
55624 iteratees = [iteratees[0]];
55625 }
55626 return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
55627 });
55628
55629 module.exports = sortBy;
55630
55631/***/ }),
55632/* 595 */
55633/***/ (function(module, exports, __webpack_require__) {
55634
55635 'use strict';
55636
55637 var baseClamp = __webpack_require__(485),
55638 baseToString = __webpack_require__(253),
55639 toInteger = __webpack_require__(48),
55640 toString = __webpack_require__(114);
55641
55642 /**
55643 * Checks if `string` starts with the given target string.
55644 *
55645 * @static
55646 * @memberOf _
55647 * @since 3.0.0
55648 * @category String
55649 * @param {string} [string=''] The string to inspect.
55650 * @param {string} [target] The string to search for.
55651 * @param {number} [position=0] The position to search from.
55652 * @returns {boolean} Returns `true` if `string` starts with `target`,
55653 * else `false`.
55654 * @example
55655 *
55656 * _.startsWith('abc', 'a');
55657 * // => true
55658 *
55659 * _.startsWith('abc', 'b');
55660 * // => false
55661 *
55662 * _.startsWith('abc', 'b', 1);
55663 * // => true
55664 */
55665 function startsWith(string, target, position) {
55666 string = toString(string);
55667 position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
55668
55669 target = baseToString(target);
55670 return string.slice(position, position + target.length) == target;
55671 }
55672
55673 module.exports = startsWith;
55674
55675/***/ }),
55676/* 596 */
55677/***/ (function(module, exports) {
55678
55679 "use strict";
55680
55681 /**
55682 * This method returns `false`.
55683 *
55684 * @static
55685 * @memberOf _
55686 * @since 4.13.0
55687 * @category Util
55688 * @returns {boolean} Returns `false`.
55689 * @example
55690 *
55691 * _.times(2, _.stubFalse);
55692 * // => [false, false]
55693 */
55694 function stubFalse() {
55695 return false;
55696 }
55697
55698 module.exports = stubFalse;
55699
55700/***/ }),
55701/* 597 */
55702/***/ (function(module, exports, __webpack_require__) {
55703
55704 'use strict';
55705
55706 var toNumber = __webpack_require__(598);
55707
55708 /** Used as references for various `Number` constants. */
55709 var INFINITY = 1 / 0,
55710 MAX_INTEGER = 1.7976931348623157e+308;
55711
55712 /**
55713 * Converts `value` to a finite number.
55714 *
55715 * @static
55716 * @memberOf _
55717 * @since 4.12.0
55718 * @category Lang
55719 * @param {*} value The value to convert.
55720 * @returns {number} Returns the converted number.
55721 * @example
55722 *
55723 * _.toFinite(3.2);
55724 * // => 3.2
55725 *
55726 * _.toFinite(Number.MIN_VALUE);
55727 * // => 5e-324
55728 *
55729 * _.toFinite(Infinity);
55730 * // => 1.7976931348623157e+308
55731 *
55732 * _.toFinite('3.2');
55733 * // => 3.2
55734 */
55735 function toFinite(value) {
55736 if (!value) {
55737 return value === 0 ? value : 0;
55738 }
55739 value = toNumber(value);
55740 if (value === INFINITY || value === -INFINITY) {
55741 var sign = value < 0 ? -1 : 1;
55742 return sign * MAX_INTEGER;
55743 }
55744 return value === value ? value : 0;
55745 }
55746
55747 module.exports = toFinite;
55748
55749/***/ }),
55750/* 598 */
55751/***/ (function(module, exports, __webpack_require__) {
55752
55753 'use strict';
55754
55755 var isObject = __webpack_require__(18),
55756 isSymbol = __webpack_require__(62);
55757
55758 /** Used as references for various `Number` constants. */
55759 var NAN = 0 / 0;
55760
55761 /** Used to match leading and trailing whitespace. */
55762 var reTrim = /^\s+|\s+$/g;
55763
55764 /** Used to detect bad signed hexadecimal string values. */
55765 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
55766
55767 /** Used to detect binary string values. */
55768 var reIsBinary = /^0b[01]+$/i;
55769
55770 /** Used to detect octal string values. */
55771 var reIsOctal = /^0o[0-7]+$/i;
55772
55773 /** Built-in method references without a dependency on `root`. */
55774 var freeParseInt = parseInt;
55775
55776 /**
55777 * Converts `value` to a number.
55778 *
55779 * @static
55780 * @memberOf _
55781 * @since 4.0.0
55782 * @category Lang
55783 * @param {*} value The value to process.
55784 * @returns {number} Returns the number.
55785 * @example
55786 *
55787 * _.toNumber(3.2);
55788 * // => 3.2
55789 *
55790 * _.toNumber(Number.MIN_VALUE);
55791 * // => 5e-324
55792 *
55793 * _.toNumber(Infinity);
55794 * // => Infinity
55795 *
55796 * _.toNumber('3.2');
55797 * // => 3.2
55798 */
55799 function toNumber(value) {
55800 if (typeof value == 'number') {
55801 return value;
55802 }
55803 if (isSymbol(value)) {
55804 return NAN;
55805 }
55806 if (isObject(value)) {
55807 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
55808 value = isObject(other) ? other + '' : other;
55809 }
55810 if (typeof value != 'string') {
55811 return value === 0 ? value : +value;
55812 }
55813 value = value.replace(reTrim, '');
55814 var isBinary = reIsBinary.test(value);
55815 return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
55816 }
55817
55818 module.exports = toNumber;
55819
55820/***/ }),
55821/* 599 */
55822/***/ (function(module, exports, __webpack_require__) {
55823
55824 'use strict';
55825
55826 var copyObject = __webpack_require__(31),
55827 keysIn = __webpack_require__(47);
55828
55829 /**
55830 * Converts `value` to a plain object flattening inherited enumerable string
55831 * keyed properties of `value` to own properties of the plain object.
55832 *
55833 * @static
55834 * @memberOf _
55835 * @since 3.0.0
55836 * @category Lang
55837 * @param {*} value The value to convert.
55838 * @returns {Object} Returns the converted plain object.
55839 * @example
55840 *
55841 * function Foo() {
55842 * this.b = 2;
55843 * }
55844 *
55845 * Foo.prototype.c = 3;
55846 *
55847 * _.assign({ 'a': 1 }, new Foo);
55848 * // => { 'a': 1, 'b': 2 }
55849 *
55850 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
55851 * // => { 'a': 1, 'b': 2, 'c': 3 }
55852 */
55853 function toPlainObject(value) {
55854 return copyObject(value, keysIn(value));
55855 }
55856
55857 module.exports = toPlainObject;
55858
55859/***/ }),
55860/* 600 */
55861/***/ (function(module, exports, __webpack_require__) {
55862
55863 'use strict';
55864
55865 var baseUniq = __webpack_require__(514);
55866
55867 /**
55868 * Creates a duplicate-free version of an array, using
55869 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
55870 * for equality comparisons, in which only the first occurrence of each element
55871 * is kept. The order of result values is determined by the order they occur
55872 * in the array.
55873 *
55874 * @static
55875 * @memberOf _
55876 * @since 0.1.0
55877 * @category Array
55878 * @param {Array} array The array to inspect.
55879 * @returns {Array} Returns the new duplicate free array.
55880 * @example
55881 *
55882 * _.uniq([2, 1, 2]);
55883 * // => [2, 1]
55884 */
55885 function uniq(array) {
55886 return array && array.length ? baseUniq(array) : [];
55887 }
55888
55889 module.exports = uniq;
55890
55891/***/ }),
55892/* 601 */
55893/***/ (function(module, exports, __webpack_require__) {
55894
55895 'use strict';
55896
55897 module.exports = minimatch;
55898 minimatch.Minimatch = Minimatch;
55899
55900 var path = { sep: '/' };
55901 try {
55902 path = __webpack_require__(19);
55903 } catch (er) {}
55904
55905 var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
55906 var expand = __webpack_require__(398);
55907
55908 var plTypes = {
55909 '!': { open: '(?:(?!(?:', close: '))[^/]*?)' },
55910 '?': { open: '(?:', close: ')?' },
55911 '+': { open: '(?:', close: ')+' },
55912 '*': { open: '(?:', close: ')*' },
55913 '@': { open: '(?:', close: ')' }
55914
55915 // any single thing other than /
55916 // don't need to escape / when using new RegExp()
55917 };var qmark = '[^/]';
55918
55919 // * => any number of characters
55920 var star = qmark + '*?';
55921
55922 // ** when dots are allowed. Anything goes, except .. and .
55923 // not (^ or / followed by one or two dots followed by $ or /),
55924 // followed by anything, any number of times.
55925 var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?';
55926
55927 // not a ^ or / followed by a dot,
55928 // followed by anything, any number of times.
55929 var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?';
55930
55931 // characters that need to be escaped in RegExp.
55932 var reSpecials = charSet('().*{}+?[]^$\\!');
55933
55934 // "abc" -> { a:true, b:true, c:true }
55935 function charSet(s) {
55936 return s.split('').reduce(function (set, c) {
55937 set[c] = true;
55938 return set;
55939 }, {});
55940 }
55941
55942 // normalizes slashes.
55943 var slashSplit = /\/+/;
55944
55945 minimatch.filter = filter;
55946 function filter(pattern, options) {
55947 options = options || {};
55948 return function (p, i, list) {
55949 return minimatch(p, pattern, options);
55950 };
55951 }
55952
55953 function ext(a, b) {
55954 a = a || {};
55955 b = b || {};
55956 var t = {};
55957 Object.keys(b).forEach(function (k) {
55958 t[k] = b[k];
55959 });
55960 Object.keys(a).forEach(function (k) {
55961 t[k] = a[k];
55962 });
55963 return t;
55964 }
55965
55966 minimatch.defaults = function (def) {
55967 if (!def || !Object.keys(def).length) return minimatch;
55968
55969 var orig = minimatch;
55970
55971 var m = function minimatch(p, pattern, options) {
55972 return orig.minimatch(p, pattern, ext(def, options));
55973 };
55974
55975 m.Minimatch = function Minimatch(pattern, options) {
55976 return new orig.Minimatch(pattern, ext(def, options));
55977 };
55978
55979 return m;
55980 };
55981
55982 Minimatch.defaults = function (def) {
55983 if (!def || !Object.keys(def).length) return Minimatch;
55984 return minimatch.defaults(def).Minimatch;
55985 };
55986
55987 function minimatch(p, pattern, options) {
55988 if (typeof pattern !== 'string') {
55989 throw new TypeError('glob pattern string required');
55990 }
55991
55992 if (!options) options = {};
55993
55994 // shortcut: comments match nothing.
55995 if (!options.nocomment && pattern.charAt(0) === '#') {
55996 return false;
55997 }
55998
55999 // "" only matches ""
56000 if (pattern.trim() === '') return p === '';
56001
56002 return new Minimatch(pattern, options).match(p);
56003 }
56004
56005 function Minimatch(pattern, options) {
56006 if (!(this instanceof Minimatch)) {
56007 return new Minimatch(pattern, options);
56008 }
56009
56010 if (typeof pattern !== 'string') {
56011 throw new TypeError('glob pattern string required');
56012 }
56013
56014 if (!options) options = {};
56015 pattern = pattern.trim();
56016
56017 // windows support: need to use /, not \
56018 if (path.sep !== '/') {
56019 pattern = pattern.split(path.sep).join('/');
56020 }
56021
56022 this.options = options;
56023 this.set = [];
56024 this.pattern = pattern;
56025 this.regexp = null;
56026 this.negate = false;
56027 this.comment = false;
56028 this.empty = false;
56029
56030 // make the set of regexps etc.
56031 this.make();
56032 }
56033
56034 Minimatch.prototype.debug = function () {};
56035
56036 Minimatch.prototype.make = make;
56037 function make() {
56038 // don't do it more than once.
56039 if (this._made) return;
56040
56041 var pattern = this.pattern;
56042 var options = this.options;
56043
56044 // empty patterns and comments match nothing.
56045 if (!options.nocomment && pattern.charAt(0) === '#') {
56046 this.comment = true;
56047 return;
56048 }
56049 if (!pattern) {
56050 this.empty = true;
56051 return;
56052 }
56053
56054 // step 1: figure out negation, etc.
56055 this.parseNegate();
56056
56057 // step 2: expand braces
56058 var set = this.globSet = this.braceExpand();
56059
56060 if (options.debug) this.debug = console.error;
56061
56062 this.debug(this.pattern, set);
56063
56064 // step 3: now we have a set, so turn each one into a series of path-portion
56065 // matching patterns.
56066 // These will be regexps, except in the case of "**", which is
56067 // set to the GLOBSTAR object for globstar behavior,
56068 // and will not contain any / characters
56069 set = this.globParts = set.map(function (s) {
56070 return s.split(slashSplit);
56071 });
56072
56073 this.debug(this.pattern, set);
56074
56075 // glob --> regexps
56076 set = set.map(function (s, si, set) {
56077 return s.map(this.parse, this);
56078 }, this);
56079
56080 this.debug(this.pattern, set);
56081
56082 // filter out everything that didn't compile properly.
56083 set = set.filter(function (s) {
56084 return s.indexOf(false) === -1;
56085 });
56086
56087 this.debug(this.pattern, set);
56088
56089 this.set = set;
56090 }
56091
56092 Minimatch.prototype.parseNegate = parseNegate;
56093 function parseNegate() {
56094 var pattern = this.pattern;
56095 var negate = false;
56096 var options = this.options;
56097 var negateOffset = 0;
56098
56099 if (options.nonegate) return;
56100
56101 for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++) {
56102 negate = !negate;
56103 negateOffset++;
56104 }
56105
56106 if (negateOffset) this.pattern = pattern.substr(negateOffset);
56107 this.negate = negate;
56108 }
56109
56110 // Brace expansion:
56111 // a{b,c}d -> abd acd
56112 // a{b,}c -> abc ac
56113 // a{0..3}d -> a0d a1d a2d a3d
56114 // a{b,c{d,e}f}g -> abg acdfg acefg
56115 // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
56116 //
56117 // Invalid sets are not expanded.
56118 // a{2..}b -> a{2..}b
56119 // a{b}c -> a{b}c
56120 minimatch.braceExpand = function (pattern, options) {
56121 return braceExpand(pattern, options);
56122 };
56123
56124 Minimatch.prototype.braceExpand = braceExpand;
56125
56126 function braceExpand(pattern, options) {
56127 if (!options) {
56128 if (this instanceof Minimatch) {
56129 options = this.options;
56130 } else {
56131 options = {};
56132 }
56133 }
56134
56135 pattern = typeof pattern === 'undefined' ? this.pattern : pattern;
56136
56137 if (typeof pattern === 'undefined') {
56138 throw new TypeError('undefined pattern');
56139 }
56140
56141 if (options.nobrace || !pattern.match(/\{.*\}/)) {
56142 // shortcut. no need to expand.
56143 return [pattern];
56144 }
56145
56146 return expand(pattern);
56147 }
56148
56149 // parse a component of the expanded set.
56150 // At this point, no pattern may contain "/" in it
56151 // so we're going to return a 2d array, where each entry is the full
56152 // pattern, split on '/', and then turned into a regular expression.
56153 // A regexp is made at the end which joins each array with an
56154 // escaped /, and another full one which joins each regexp with |.
56155 //
56156 // Following the lead of Bash 4.1, note that "**" only has special meaning
56157 // when it is the *only* thing in a path portion. Otherwise, any series
56158 // of * is equivalent to a single *. Globstar behavior is enabled by
56159 // default, and can be disabled by setting options.noglobstar.
56160 Minimatch.prototype.parse = parse;
56161 var SUBPARSE = {};
56162 function parse(pattern, isSub) {
56163 if (pattern.length > 1024 * 64) {
56164 throw new TypeError('pattern is too long');
56165 }
56166
56167 var options = this.options;
56168
56169 // shortcuts
56170 if (!options.noglobstar && pattern === '**') return GLOBSTAR;
56171 if (pattern === '') return '';
56172
56173 var re = '';
56174 var hasMagic = !!options.nocase;
56175 var escaping = false;
56176 // ? => one single character
56177 var patternListStack = [];
56178 var negativeLists = [];
56179 var stateChar;
56180 var inClass = false;
56181 var reClassStart = -1;
56182 var classStart = -1;
56183 // . and .. never match anything that doesn't start with .,
56184 // even when options.dot is set.
56185 var patternStart = pattern.charAt(0) === '.' ? '' // anything
56186 // not (start or / followed by . or .. followed by / or end)
56187 : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)';
56188 var self = this;
56189
56190 function clearStateChar() {
56191 if (stateChar) {
56192 // we had some state-tracking character
56193 // that wasn't consumed by this pass.
56194 switch (stateChar) {
56195 case '*':
56196 re += star;
56197 hasMagic = true;
56198 break;
56199 case '?':
56200 re += qmark;
56201 hasMagic = true;
56202 break;
56203 default:
56204 re += '\\' + stateChar;
56205 break;
56206 }
56207 self.debug('clearStateChar %j %j', stateChar, re);
56208 stateChar = false;
56209 }
56210 }
56211
56212 for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
56213 this.debug('%s\t%s %s %j', pattern, i, re, c);
56214
56215 // skip over any that are escaped.
56216 if (escaping && reSpecials[c]) {
56217 re += '\\' + c;
56218 escaping = false;
56219 continue;
56220 }
56221
56222 switch (c) {
56223 case '/':
56224 // completely not allowed, even escaped.
56225 // Should already be path-split by now.
56226 return false;
56227
56228 case '\\':
56229 clearStateChar();
56230 escaping = true;
56231 continue;
56232
56233 // the various stateChar values
56234 // for the "extglob" stuff.
56235 case '?':
56236 case '*':
56237 case '+':
56238 case '@':
56239 case '!':
56240 this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c);
56241
56242 // all of those are literals inside a class, except that
56243 // the glob [!a] means [^a] in regexp
56244 if (inClass) {
56245 this.debug(' in class');
56246 if (c === '!' && i === classStart + 1) c = '^';
56247 re += c;
56248 continue;
56249 }
56250
56251 // if we already have a stateChar, then it means
56252 // that there was something like ** or +? in there.
56253 // Handle the stateChar, then proceed with this one.
56254 self.debug('call clearStateChar %j', stateChar);
56255 clearStateChar();
56256 stateChar = c;
56257 // if extglob is disabled, then +(asdf|foo) isn't a thing.
56258 // just clear the statechar *now*, rather than even diving into
56259 // the patternList stuff.
56260 if (options.noext) clearStateChar();
56261 continue;
56262
56263 case '(':
56264 if (inClass) {
56265 re += '(';
56266 continue;
56267 }
56268
56269 if (!stateChar) {
56270 re += '\\(';
56271 continue;
56272 }
56273
56274 patternListStack.push({
56275 type: stateChar,
56276 start: i - 1,
56277 reStart: re.length,
56278 open: plTypes[stateChar].open,
56279 close: plTypes[stateChar].close
56280 });
56281 // negation is (?:(?!js)[^/]*)
56282 re += stateChar === '!' ? '(?:(?!(?:' : '(?:';
56283 this.debug('plType %j %j', stateChar, re);
56284 stateChar = false;
56285 continue;
56286
56287 case ')':
56288 if (inClass || !patternListStack.length) {
56289 re += '\\)';
56290 continue;
56291 }
56292
56293 clearStateChar();
56294 hasMagic = true;
56295 var pl = patternListStack.pop();
56296 // negation is (?:(?!js)[^/]*)
56297 // The others are (?:<pattern>)<type>
56298 re += pl.close;
56299 if (pl.type === '!') {
56300 negativeLists.push(pl);
56301 }
56302 pl.reEnd = re.length;
56303 continue;
56304
56305 case '|':
56306 if (inClass || !patternListStack.length || escaping) {
56307 re += '\\|';
56308 escaping = false;
56309 continue;
56310 }
56311
56312 clearStateChar();
56313 re += '|';
56314 continue;
56315
56316 // these are mostly the same in regexp and glob
56317 case '[':
56318 // swallow any state-tracking char before the [
56319 clearStateChar();
56320
56321 if (inClass) {
56322 re += '\\' + c;
56323 continue;
56324 }
56325
56326 inClass = true;
56327 classStart = i;
56328 reClassStart = re.length;
56329 re += c;
56330 continue;
56331
56332 case ']':
56333 // a right bracket shall lose its special
56334 // meaning and represent itself in
56335 // a bracket expression if it occurs
56336 // first in the list. -- POSIX.2 2.8.3.2
56337 if (i === classStart + 1 || !inClass) {
56338 re += '\\' + c;
56339 escaping = false;
56340 continue;
56341 }
56342
56343 // handle the case where we left a class open.
56344 // "[z-a]" is valid, equivalent to "\[z-a\]"
56345 if (inClass) {
56346 // split where the last [ was, make sure we don't have
56347 // an invalid re. if so, re-walk the contents of the
56348 // would-be class to re-translate any characters that
56349 // were passed through as-is
56350 // TODO: It would probably be faster to determine this
56351 // without a try/catch and a new RegExp, but it's tricky
56352 // to do safely. For now, this is safe and works.
56353 var cs = pattern.substring(classStart + 1, i);
56354 try {
56355 RegExp('[' + cs + ']');
56356 } catch (er) {
56357 // not a valid class!
56358 var sp = this.parse(cs, SUBPARSE);
56359 re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]';
56360 hasMagic = hasMagic || sp[1];
56361 inClass = false;
56362 continue;
56363 }
56364 }
56365
56366 // finish up the class.
56367 hasMagic = true;
56368 inClass = false;
56369 re += c;
56370 continue;
56371
56372 default:
56373 // swallow any state char that wasn't consumed
56374 clearStateChar();
56375
56376 if (escaping) {
56377 // no need
56378 escaping = false;
56379 } else if (reSpecials[c] && !(c === '^' && inClass)) {
56380 re += '\\';
56381 }
56382
56383 re += c;
56384
56385 } // switch
56386 } // for
56387
56388 // handle the case where we left a class open.
56389 // "[abc" is valid, equivalent to "\[abc"
56390 if (inClass) {
56391 // split where the last [ was, and escape it
56392 // this is a huge pita. We now have to re-walk
56393 // the contents of the would-be class to re-translate
56394 // any characters that were passed through as-is
56395 cs = pattern.substr(classStart + 1);
56396 sp = this.parse(cs, SUBPARSE);
56397 re = re.substr(0, reClassStart) + '\\[' + sp[0];
56398 hasMagic = hasMagic || sp[1];
56399 }
56400
56401 // handle the case where we had a +( thing at the *end*
56402 // of the pattern.
56403 // each pattern list stack adds 3 chars, and we need to go through
56404 // and escape any | chars that were passed through as-is for the regexp.
56405 // Go through and escape them, taking care not to double-escape any
56406 // | chars that were already escaped.
56407 for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
56408 var tail = re.slice(pl.reStart + pl.open.length);
56409 this.debug('setting tail', re, pl);
56410 // maybe some even number of \, then maybe 1 \, followed by a |
56411 tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
56412 if (!$2) {
56413 // the | isn't already escaped, so escape it.
56414 $2 = '\\';
56415 }
56416
56417 // need to escape all those slashes *again*, without escaping the
56418 // one that we need for escaping the | character. As it works out,
56419 // escaping an even number of slashes can be done by simply repeating
56420 // it exactly after itself. That's why this trick works.
56421 //
56422 // I am sorry that you have to see this.
56423 return $1 + $1 + $2 + '|';
56424 });
56425
56426 this.debug('tail=%j\n %s', tail, tail, pl, re);
56427 var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type;
56428
56429 hasMagic = true;
56430 re = re.slice(0, pl.reStart) + t + '\\(' + tail;
56431 }
56432
56433 // handle trailing things that only matter at the very end.
56434 clearStateChar();
56435 if (escaping) {
56436 // trailing \\
56437 re += '\\\\';
56438 }
56439
56440 // only need to apply the nodot start if the re starts with
56441 // something that could conceivably capture a dot
56442 var addPatternStart = false;
56443 switch (re.charAt(0)) {
56444 case '.':
56445 case '[':
56446 case '(':
56447 addPatternStart = true;
56448 }
56449
56450 // Hack to work around lack of negative lookbehind in JS
56451 // A pattern like: *.!(x).!(y|z) needs to ensure that a name
56452 // like 'a.xyz.yz' doesn't match. So, the first negative
56453 // lookahead, has to look ALL the way ahead, to the end of
56454 // the pattern.
56455 for (var n = negativeLists.length - 1; n > -1; n--) {
56456 var nl = negativeLists[n];
56457
56458 var nlBefore = re.slice(0, nl.reStart);
56459 var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
56460 var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
56461 var nlAfter = re.slice(nl.reEnd);
56462
56463 nlLast += nlAfter;
56464
56465 // Handle nested stuff like *(*.js|!(*.json)), where open parens
56466 // mean that we should *not* include the ) in the bit that is considered
56467 // "after" the negated section.
56468 var openParensBefore = nlBefore.split('(').length - 1;
56469 var cleanAfter = nlAfter;
56470 for (i = 0; i < openParensBefore; i++) {
56471 cleanAfter = cleanAfter.replace(/\)[+*?]?/, '');
56472 }
56473 nlAfter = cleanAfter;
56474
56475 var dollar = '';
56476 if (nlAfter === '' && isSub !== SUBPARSE) {
56477 dollar = '$';
56478 }
56479 var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
56480 re = newRe;
56481 }
56482
56483 // if the re is not "" at this point, then we need to make sure
56484 // it doesn't match against an empty path part.
56485 // Otherwise a/* will match a/, which it should not.
56486 if (re !== '' && hasMagic) {
56487 re = '(?=.)' + re;
56488 }
56489
56490 if (addPatternStart) {
56491 re = patternStart + re;
56492 }
56493
56494 // parsing just a piece of a larger pattern.
56495 if (isSub === SUBPARSE) {
56496 return [re, hasMagic];
56497 }
56498
56499 // skip the regexp for non-magical patterns
56500 // unescape anything in it, though, so that it'll be
56501 // an exact match against a file etc.
56502 if (!hasMagic) {
56503 return globUnescape(pattern);
56504 }
56505
56506 var flags = options.nocase ? 'i' : '';
56507 try {
56508 var regExp = new RegExp('^' + re + '$', flags);
56509 } catch (er) {
56510 // If it was an invalid regular expression, then it can't match
56511 // anything. This trick looks for a character after the end of
56512 // the string, which is of course impossible, except in multi-line
56513 // mode, but it's not a /m regex.
56514 return new RegExp('$.');
56515 }
56516
56517 regExp._glob = pattern;
56518 regExp._src = re;
56519
56520 return regExp;
56521 }
56522
56523 minimatch.makeRe = function (pattern, options) {
56524 return new Minimatch(pattern, options || {}).makeRe();
56525 };
56526
56527 Minimatch.prototype.makeRe = makeRe;
56528 function makeRe() {
56529 if (this.regexp || this.regexp === false) return this.regexp;
56530
56531 // at this point, this.set is a 2d array of partial
56532 // pattern strings, or "**".
56533 //
56534 // It's better to use .match(). This function shouldn't
56535 // be used, really, but it's pretty convenient sometimes,
56536 // when you just want to work with a regex.
56537 var set = this.set;
56538
56539 if (!set.length) {
56540 this.regexp = false;
56541 return this.regexp;
56542 }
56543 var options = this.options;
56544
56545 var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
56546 var flags = options.nocase ? 'i' : '';
56547
56548 var re = set.map(function (pattern) {
56549 return pattern.map(function (p) {
56550 return p === GLOBSTAR ? twoStar : typeof p === 'string' ? regExpEscape(p) : p._src;
56551 }).join('\\\/');
56552 }).join('|');
56553
56554 // must match entire pattern
56555 // ending in a * or ** will make it less strict.
56556 re = '^(?:' + re + ')$';
56557
56558 // can match anything, as long as it's not this.
56559 if (this.negate) re = '^(?!' + re + ').*$';
56560
56561 try {
56562 this.regexp = new RegExp(re, flags);
56563 } catch (ex) {
56564 this.regexp = false;
56565 }
56566 return this.regexp;
56567 }
56568
56569 minimatch.match = function (list, pattern, options) {
56570 options = options || {};
56571 var mm = new Minimatch(pattern, options);
56572 list = list.filter(function (f) {
56573 return mm.match(f);
56574 });
56575 if (mm.options.nonull && !list.length) {
56576 list.push(pattern);
56577 }
56578 return list;
56579 };
56580
56581 Minimatch.prototype.match = match;
56582 function match(f, partial) {
56583 this.debug('match', f, this.pattern);
56584 // short-circuit in the case of busted things.
56585 // comments, etc.
56586 if (this.comment) return false;
56587 if (this.empty) return f === '';
56588
56589 if (f === '/' && partial) return true;
56590
56591 var options = this.options;
56592
56593 // windows: need to use /, not \
56594 if (path.sep !== '/') {
56595 f = f.split(path.sep).join('/');
56596 }
56597
56598 // treat the test path as a set of pathparts.
56599 f = f.split(slashSplit);
56600 this.debug(this.pattern, 'split', f);
56601
56602 // just ONE of the pattern sets in this.set needs to match
56603 // in order for it to be valid. If negating, then just one
56604 // match means that we have failed.
56605 // Either way, return on the first hit.
56606
56607 var set = this.set;
56608 this.debug(this.pattern, 'set', set);
56609
56610 // Find the basename of the path by looking for the last non-empty segment
56611 var filename;
56612 var i;
56613 for (i = f.length - 1; i >= 0; i--) {
56614 filename = f[i];
56615 if (filename) break;
56616 }
56617
56618 for (i = 0; i < set.length; i++) {
56619 var pattern = set[i];
56620 var file = f;
56621 if (options.matchBase && pattern.length === 1) {
56622 file = [filename];
56623 }
56624 var hit = this.matchOne(file, pattern, partial);
56625 if (hit) {
56626 if (options.flipNegate) return true;
56627 return !this.negate;
56628 }
56629 }
56630
56631 // didn't get any hits. this is success if it's a negative
56632 // pattern, failure otherwise.
56633 if (options.flipNegate) return false;
56634 return this.negate;
56635 }
56636
56637 // set partial to true to test if, for example,
56638 // "/a/b" matches the start of "/*/b/*/d"
56639 // Partial means, if you run out of file before you run
56640 // out of pattern, then that's fine, as long as all
56641 // the parts match.
56642 Minimatch.prototype.matchOne = function (file, pattern, partial) {
56643 var options = this.options;
56644
56645 this.debug('matchOne', { 'this': this, file: file, pattern: pattern });
56646
56647 this.debug('matchOne', file.length, pattern.length);
56648
56649 for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
56650 this.debug('matchOne loop');
56651 var p = pattern[pi];
56652 var f = file[fi];
56653
56654 this.debug(pattern, p, f);
56655
56656 // should be impossible.
56657 // some invalid regexp stuff in the set.
56658 if (p === false) return false;
56659
56660 if (p === GLOBSTAR) {
56661 this.debug('GLOBSTAR', [pattern, p, f]);
56662
56663 // "**"
56664 // a/**/b/**/c would match the following:
56665 // a/b/x/y/z/c
56666 // a/x/y/z/b/c
56667 // a/b/x/b/x/c
56668 // a/b/c
56669 // To do this, take the rest of the pattern after
56670 // the **, and see if it would match the file remainder.
56671 // If so, return success.
56672 // If not, the ** "swallows" a segment, and try again.
56673 // This is recursively awful.
56674 //
56675 // a/**/b/**/c matching a/b/x/y/z/c
56676 // - a matches a
56677 // - doublestar
56678 // - matchOne(b/x/y/z/c, b/**/c)
56679 // - b matches b
56680 // - doublestar
56681 // - matchOne(x/y/z/c, c) -> no
56682 // - matchOne(y/z/c, c) -> no
56683 // - matchOne(z/c, c) -> no
56684 // - matchOne(c, c) yes, hit
56685 var fr = fi;
56686 var pr = pi + 1;
56687 if (pr === pl) {
56688 this.debug('** at the end');
56689 // a ** at the end will just swallow the rest.
56690 // We have found a match.
56691 // however, it will not swallow /.x, unless
56692 // options.dot is set.
56693 // . and .. are *never* matched by **, for explosively
56694 // exponential reasons.
56695 for (; fi < fl; fi++) {
56696 if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false;
56697 }
56698 return true;
56699 }
56700
56701 // ok, let's see if we can swallow whatever we can.
56702 while (fr < fl) {
56703 var swallowee = file[fr];
56704
56705 this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
56706
56707 // XXX remove this slice. Just pass the start index.
56708 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
56709 this.debug('globstar found match!', fr, fl, swallowee);
56710 // found a match.
56711 return true;
56712 } else {
56713 // can't swallow "." or ".." ever.
56714 // can only swallow ".foo" when explicitly asked.
56715 if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') {
56716 this.debug('dot detected!', file, fr, pattern, pr);
56717 break;
56718 }
56719
56720 // ** swallows a segment, and continue.
56721 this.debug('globstar swallow a segment, and continue');
56722 fr++;
56723 }
56724 }
56725
56726 // no match was found.
56727 // However, in partial mode, we can't say this is necessarily over.
56728 // If there's more *pattern* left, then
56729 if (partial) {
56730 // ran out of file
56731 this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
56732 if (fr === fl) return true;
56733 }
56734 return false;
56735 }
56736
56737 // something other than **
56738 // non-magic patterns just have to match exactly
56739 // patterns with magic have been turned into regexps.
56740 var hit;
56741 if (typeof p === 'string') {
56742 if (options.nocase) {
56743 hit = f.toLowerCase() === p.toLowerCase();
56744 } else {
56745 hit = f === p;
56746 }
56747 this.debug('string match', p, f, hit);
56748 } else {
56749 hit = f.match(p);
56750 this.debug('pattern match', p, f, hit);
56751 }
56752
56753 if (!hit) return false;
56754 }
56755
56756 // Note: ending in / means that we'll get a final ""
56757 // at the end of the pattern. This can only match a
56758 // corresponding "" at the end of the file.
56759 // If the file ends in /, then it can only match a
56760 // a pattern that ends in /, unless the pattern just
56761 // doesn't have any more for it. But, a/b/ should *not*
56762 // match "a/b/*", even though "" matches against the
56763 // [^/]*? pattern, except in partial mode, where it might
56764 // simply not be reached yet.
56765 // However, a/b/ should still satisfy a/*
56766
56767 // now either we fell off the end of the pattern, or we're done.
56768 if (fi === fl && pi === pl) {
56769 // ran out of pattern and filename at the same time.
56770 // an exact hit!
56771 return true;
56772 } else if (fi === fl) {
56773 // ran out of file, but still had pattern left.
56774 // this is ok if we're doing the match as part of
56775 // a glob fs traversal.
56776 return partial;
56777 } else if (pi === pl) {
56778 // ran out of pattern, still have file left.
56779 // this is only acceptable if we're on the very last
56780 // empty segment of a file with a trailing slash.
56781 // a/* should match a/b/
56782 var emptyFileEnd = fi === fl - 1 && file[fi] === '';
56783 return emptyFileEnd;
56784 }
56785
56786 // should be unreachable.
56787 throw new Error('wtf?');
56788 };
56789
56790 // replace stuff like \* with *
56791 function globUnescape(s) {
56792 return s.replace(/\\(.)/g, '$1');
56793 }
56794
56795 function regExpEscape(s) {
56796 return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
56797 }
56798
56799/***/ }),
56800/* 602 */
56801/***/ (function(module, exports) {
56802
56803 'use strict';
56804
56805 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
56806
56807 /**
56808 * Helpers.
56809 */
56810
56811 var s = 1000;
56812 var m = s * 60;
56813 var h = m * 60;
56814 var d = h * 24;
56815 var y = d * 365.25;
56816
56817 /**
56818 * Parse or format the given `val`.
56819 *
56820 * Options:
56821 *
56822 * - `long` verbose formatting [false]
56823 *
56824 * @param {String|Number} val
56825 * @param {Object} [options]
56826 * @throws {Error} throw an error if val is not a non-empty string or a number
56827 * @return {String|Number}
56828 * @api public
56829 */
56830
56831 module.exports = function (val, options) {
56832 options = options || {};
56833 var type = typeof val === 'undefined' ? 'undefined' : _typeof(val);
56834 if (type === 'string' && val.length > 0) {
56835 return parse(val);
56836 } else if (type === 'number' && isNaN(val) === false) {
56837 return options.long ? fmtLong(val) : fmtShort(val);
56838 }
56839 throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
56840 };
56841
56842 /**
56843 * Parse the given `str` and return milliseconds.
56844 *
56845 * @param {String} str
56846 * @return {Number}
56847 * @api private
56848 */
56849
56850 function parse(str) {
56851 str = String(str);
56852 if (str.length > 100) {
56853 return;
56854 }
56855 var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
56856 if (!match) {
56857 return;
56858 }
56859 var n = parseFloat(match[1]);
56860 var type = (match[2] || 'ms').toLowerCase();
56861 switch (type) {
56862 case 'years':
56863 case 'year':
56864 case 'yrs':
56865 case 'yr':
56866 case 'y':
56867 return n * y;
56868 case 'days':
56869 case 'day':
56870 case 'd':
56871 return n * d;
56872 case 'hours':
56873 case 'hour':
56874 case 'hrs':
56875 case 'hr':
56876 case 'h':
56877 return n * h;
56878 case 'minutes':
56879 case 'minute':
56880 case 'mins':
56881 case 'min':
56882 case 'm':
56883 return n * m;
56884 case 'seconds':
56885 case 'second':
56886 case 'secs':
56887 case 'sec':
56888 case 's':
56889 return n * s;
56890 case 'milliseconds':
56891 case 'millisecond':
56892 case 'msecs':
56893 case 'msec':
56894 case 'ms':
56895 return n;
56896 default:
56897 return undefined;
56898 }
56899 }
56900
56901 /**
56902 * Short format for `ms`.
56903 *
56904 * @param {Number} ms
56905 * @return {String}
56906 * @api private
56907 */
56908
56909 function fmtShort(ms) {
56910 if (ms >= d) {
56911 return Math.round(ms / d) + 'd';
56912 }
56913 if (ms >= h) {
56914 return Math.round(ms / h) + 'h';
56915 }
56916 if (ms >= m) {
56917 return Math.round(ms / m) + 'm';
56918 }
56919 if (ms >= s) {
56920 return Math.round(ms / s) + 's';
56921 }
56922 return ms + 'ms';
56923 }
56924
56925 /**
56926 * Long format for `ms`.
56927 *
56928 * @param {Number} ms
56929 * @return {String}
56930 * @api private
56931 */
56932
56933 function fmtLong(ms) {
56934 return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms';
56935 }
56936
56937 /**
56938 * Pluralization helper.
56939 */
56940
56941 function plural(ms, n, name) {
56942 if (ms < n) {
56943 return;
56944 }
56945 if (ms < n * 1.5) {
56946 return Math.floor(ms / n) + ' ' + name;
56947 }
56948 return Math.ceil(ms / n) + ' ' + name + 's';
56949 }
56950
56951/***/ }),
56952/* 603 */
56953/***/ (function(module, exports) {
56954
56955 'use strict';
56956
56957 module.exports = Number.isNaN || function (x) {
56958 return x !== x;
56959 };
56960
56961/***/ }),
56962/* 604 */
56963/***/ (function(module, exports, __webpack_require__) {
56964
56965 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
56966
56967 function posix(path) {
56968 return path.charAt(0) === '/';
56969 }
56970
56971 function win32(path) {
56972 // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
56973 var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
56974 var result = splitDeviceRe.exec(path);
56975 var device = result[1] || '';
56976 var isUnc = Boolean(device && device.charAt(1) !== ':');
56977
56978 // UNC paths are always absolute
56979 return Boolean(result[2] || isUnc);
56980 }
56981
56982 module.exports = process.platform === 'win32' ? win32 : posix;
56983 module.exports.posix = posix;
56984 module.exports.win32 = win32;
56985 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
56986
56987/***/ }),
56988/* 605 */
56989/***/ (function(module, exports, __webpack_require__) {
56990
56991 "use strict";
56992
56993 var _keys = __webpack_require__(14);
56994
56995 var _keys2 = _interopRequireDefault(_keys);
56996
56997 var _babelTypes = __webpack_require__(1);
56998
56999 var t = _interopRequireWildcard(_babelTypes);
57000
57001 var _util = __webpack_require__(116);
57002
57003 var util = _interopRequireWildcard(_util);
57004
57005 function _interopRequireWildcard(obj) {
57006 if (obj && obj.__esModule) {
57007 return obj;
57008 } else {
57009 var newObj = {};if (obj != null) {
57010 for (var key in obj) {
57011 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
57012 }
57013 }newObj.default = obj;return newObj;
57014 }
57015 }
57016
57017 function _interopRequireDefault(obj) {
57018 return obj && obj.__esModule ? obj : { default: obj };
57019 }
57020
57021 /**
57022 * Copyright (c) 2014, Facebook, Inc.
57023 * All rights reserved.
57024 *
57025 * This source code is licensed under the BSD-style license found in the
57026 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
57027 * additional grant of patent rights can be found in the PATENTS file in
57028 * the same directory.
57029 */
57030
57031 var hasOwn = Object.prototype.hasOwnProperty;
57032
57033 // The hoist function takes a FunctionExpression or FunctionDeclaration
57034 // and replaces any Declaration nodes in its body with assignments, then
57035 // returns a VariableDeclaration containing just the names of the removed
57036 // declarations.
57037 exports.hoist = function (funPath) {
57038 t.assertFunction(funPath.node);
57039
57040 var vars = {};
57041
57042 function varDeclToExpr(vdec, includeIdentifiers) {
57043 t.assertVariableDeclaration(vdec);
57044 // TODO assert.equal(vdec.kind, "var");
57045 var exprs = [];
57046
57047 vdec.declarations.forEach(function (dec) {
57048 // Note: We duplicate 'dec.id' here to ensure that the variable declaration IDs don't
57049 // have the same 'loc' value, since that can make sourcemaps and retainLines behave poorly.
57050 vars[dec.id.name] = t.identifier(dec.id.name);
57051
57052 if (dec.init) {
57053 exprs.push(t.assignmentExpression("=", dec.id, dec.init));
57054 } else if (includeIdentifiers) {
57055 exprs.push(dec.id);
57056 }
57057 });
57058
57059 if (exprs.length === 0) return null;
57060
57061 if (exprs.length === 1) return exprs[0];
57062
57063 return t.sequenceExpression(exprs);
57064 }
57065
57066 funPath.get("body").traverse({
57067 VariableDeclaration: {
57068 exit: function exit(path) {
57069 var expr = varDeclToExpr(path.node, false);
57070 if (expr === null) {
57071 path.remove();
57072 } else {
57073 // We don't need to traverse this expression any further because
57074 // there can't be any new declarations inside an expression.
57075 util.replaceWithOrRemove(path, t.expressionStatement(expr));
57076 }
57077
57078 // Since the original node has been either removed or replaced,
57079 // avoid traversing it any further.
57080 path.skip();
57081 }
57082 },
57083
57084 ForStatement: function ForStatement(path) {
57085 var init = path.node.init;
57086 if (t.isVariableDeclaration(init)) {
57087 util.replaceWithOrRemove(path.get("init"), varDeclToExpr(init, false));
57088 }
57089 },
57090
57091 ForXStatement: function ForXStatement(path) {
57092 var left = path.get("left");
57093 if (left.isVariableDeclaration()) {
57094 util.replaceWithOrRemove(left, varDeclToExpr(left.node, true));
57095 }
57096 },
57097
57098 FunctionDeclaration: function FunctionDeclaration(path) {
57099 var node = path.node;
57100 vars[node.id.name] = node.id;
57101
57102 var assignment = t.expressionStatement(t.assignmentExpression("=", node.id, t.functionExpression(node.id, node.params, node.body, node.generator, node.expression)));
57103
57104 if (path.parentPath.isBlockStatement()) {
57105 // Insert the assignment form before the first statement in the
57106 // enclosing block.
57107 path.parentPath.unshiftContainer("body", assignment);
57108
57109 // Remove the function declaration now that we've inserted the
57110 // equivalent assignment form at the beginning of the block.
57111 path.remove();
57112 } else {
57113 // If the parent node is not a block statement, then we can just
57114 // replace the declaration with the equivalent assignment form
57115 // without worrying about hoisting it.
57116 util.replaceWithOrRemove(path, assignment);
57117 }
57118
57119 // Don't hoist variables out of inner functions.
57120 path.skip();
57121 },
57122
57123 FunctionExpression: function FunctionExpression(path) {
57124 // Don't descend into nested function expressions.
57125 path.skip();
57126 }
57127 });
57128
57129 var paramNames = {};
57130 funPath.get("params").forEach(function (paramPath) {
57131 var param = paramPath.node;
57132 if (t.isIdentifier(param)) {
57133 paramNames[param.name] = param;
57134 } else {
57135 // Variables declared by destructuring parameter patterns will be
57136 // harmlessly re-declared.
57137 }
57138 });
57139
57140 var declarations = [];
57141
57142 (0, _keys2.default)(vars).forEach(function (name) {
57143 if (!hasOwn.call(paramNames, name)) {
57144 declarations.push(t.variableDeclarator(vars[name], null));
57145 }
57146 });
57147
57148 if (declarations.length === 0) {
57149 return null; // Be sure to handle this case!
57150 }
57151
57152 return t.variableDeclaration("var", declarations);
57153 };
57154
57155/***/ }),
57156/* 606 */
57157/***/ (function(module, exports, __webpack_require__) {
57158
57159 "use strict";
57160
57161 exports.__esModule = true;
57162
57163 exports.default = function () {
57164 return __webpack_require__(610);
57165 };
57166
57167/***/ }),
57168/* 607 */
57169/***/ (function(module, exports, __webpack_require__) {
57170
57171 "use strict";
57172
57173 var _assert = __webpack_require__(64);
57174
57175 var _assert2 = _interopRequireDefault(_assert);
57176
57177 var _babelTypes = __webpack_require__(1);
57178
57179 var t = _interopRequireWildcard(_babelTypes);
57180
57181 var _util = __webpack_require__(117);
57182
57183 function _interopRequireWildcard(obj) {
57184 if (obj && obj.__esModule) {
57185 return obj;
57186 } else {
57187 var newObj = {};if (obj != null) {
57188 for (var key in obj) {
57189 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
57190 }
57191 }newObj.default = obj;return newObj;
57192 }
57193 }
57194
57195 function _interopRequireDefault(obj) {
57196 return obj && obj.__esModule ? obj : { default: obj };
57197 }
57198
57199 function Entry() {
57200 _assert2.default.ok(this instanceof Entry);
57201 } /**
57202 * Copyright (c) 2014, Facebook, Inc.
57203 * All rights reserved.
57204 *
57205 * This source code is licensed under the BSD-style license found in the
57206 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
57207 * additional grant of patent rights can be found in the PATENTS file in
57208 * the same directory.
57209 */
57210
57211 function FunctionEntry(returnLoc) {
57212 Entry.call(this);
57213 t.assertLiteral(returnLoc);
57214 this.returnLoc = returnLoc;
57215 }
57216
57217 (0, _util.inherits)(FunctionEntry, Entry);
57218 exports.FunctionEntry = FunctionEntry;
57219
57220 function LoopEntry(breakLoc, continueLoc, label) {
57221 Entry.call(this);
57222
57223 t.assertLiteral(breakLoc);
57224 t.assertLiteral(continueLoc);
57225
57226 if (label) {
57227 t.assertIdentifier(label);
57228 } else {
57229 label = null;
57230 }
57231
57232 this.breakLoc = breakLoc;
57233 this.continueLoc = continueLoc;
57234 this.label = label;
57235 }
57236
57237 (0, _util.inherits)(LoopEntry, Entry);
57238 exports.LoopEntry = LoopEntry;
57239
57240 function SwitchEntry(breakLoc) {
57241 Entry.call(this);
57242 t.assertLiteral(breakLoc);
57243 this.breakLoc = breakLoc;
57244 }
57245
57246 (0, _util.inherits)(SwitchEntry, Entry);
57247 exports.SwitchEntry = SwitchEntry;
57248
57249 function TryEntry(firstLoc, catchEntry, finallyEntry) {
57250 Entry.call(this);
57251
57252 t.assertLiteral(firstLoc);
57253
57254 if (catchEntry) {
57255 _assert2.default.ok(catchEntry instanceof CatchEntry);
57256 } else {
57257 catchEntry = null;
57258 }
57259
57260 if (finallyEntry) {
57261 _assert2.default.ok(finallyEntry instanceof FinallyEntry);
57262 } else {
57263 finallyEntry = null;
57264 }
57265
57266 // Have to have one or the other (or both).
57267 _assert2.default.ok(catchEntry || finallyEntry);
57268
57269 this.firstLoc = firstLoc;
57270 this.catchEntry = catchEntry;
57271 this.finallyEntry = finallyEntry;
57272 }
57273
57274 (0, _util.inherits)(TryEntry, Entry);
57275 exports.TryEntry = TryEntry;
57276
57277 function CatchEntry(firstLoc, paramId) {
57278 Entry.call(this);
57279
57280 t.assertLiteral(firstLoc);
57281 t.assertIdentifier(paramId);
57282
57283 this.firstLoc = firstLoc;
57284 this.paramId = paramId;
57285 }
57286
57287 (0, _util.inherits)(CatchEntry, Entry);
57288 exports.CatchEntry = CatchEntry;
57289
57290 function FinallyEntry(firstLoc, afterLoc) {
57291 Entry.call(this);
57292 t.assertLiteral(firstLoc);
57293 t.assertLiteral(afterLoc);
57294 this.firstLoc = firstLoc;
57295 this.afterLoc = afterLoc;
57296 }
57297
57298 (0, _util.inherits)(FinallyEntry, Entry);
57299 exports.FinallyEntry = FinallyEntry;
57300
57301 function LabeledEntry(breakLoc, label) {
57302 Entry.call(this);
57303
57304 t.assertLiteral(breakLoc);
57305 t.assertIdentifier(label);
57306
57307 this.breakLoc = breakLoc;
57308 this.label = label;
57309 }
57310
57311 (0, _util.inherits)(LabeledEntry, Entry);
57312 exports.LabeledEntry = LabeledEntry;
57313
57314 function LeapManager(emitter) {
57315 _assert2.default.ok(this instanceof LeapManager);
57316
57317 var Emitter = __webpack_require__(283).Emitter;
57318 _assert2.default.ok(emitter instanceof Emitter);
57319
57320 this.emitter = emitter;
57321 this.entryStack = [new FunctionEntry(emitter.finalLoc)];
57322 }
57323
57324 var LMp = LeapManager.prototype;
57325 exports.LeapManager = LeapManager;
57326
57327 LMp.withEntry = function (entry, callback) {
57328 _assert2.default.ok(entry instanceof Entry);
57329 this.entryStack.push(entry);
57330 try {
57331 callback.call(this.emitter);
57332 } finally {
57333 var popped = this.entryStack.pop();
57334 _assert2.default.strictEqual(popped, entry);
57335 }
57336 };
57337
57338 LMp._findLeapLocation = function (property, label) {
57339 for (var i = this.entryStack.length - 1; i >= 0; --i) {
57340 var entry = this.entryStack[i];
57341 var loc = entry[property];
57342 if (loc) {
57343 if (label) {
57344 if (entry.label && entry.label.name === label.name) {
57345 return loc;
57346 }
57347 } else if (entry instanceof LabeledEntry) {
57348 // Ignore LabeledEntry entries unless we are actually breaking to
57349 // a label.
57350 } else {
57351 return loc;
57352 }
57353 }
57354 }
57355
57356 return null;
57357 };
57358
57359 LMp.getBreakLoc = function (label) {
57360 return this._findLeapLocation("breakLoc", label);
57361 };
57362
57363 LMp.getContinueLoc = function (label) {
57364 return this._findLeapLocation("continueLoc", label);
57365 };
57366
57367/***/ }),
57368/* 608 */
57369/***/ (function(module, exports, __webpack_require__) {
57370
57371 "use strict";
57372
57373 var _assert = __webpack_require__(64);
57374
57375 var _assert2 = _interopRequireDefault(_assert);
57376
57377 var _babelTypes = __webpack_require__(1);
57378
57379 var t = _interopRequireWildcard(_babelTypes);
57380
57381 function _interopRequireWildcard(obj) {
57382 if (obj && obj.__esModule) {
57383 return obj;
57384 } else {
57385 var newObj = {};if (obj != null) {
57386 for (var key in obj) {
57387 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
57388 }
57389 }newObj.default = obj;return newObj;
57390 }
57391 }
57392
57393 function _interopRequireDefault(obj) {
57394 return obj && obj.__esModule ? obj : { default: obj };
57395 }
57396
57397 var m = __webpack_require__(281).makeAccessor(); /**
57398 * Copyright (c) 2014, Facebook, Inc.
57399 * All rights reserved.
57400 *
57401 * This source code is licensed under the BSD-style license found in the
57402 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
57403 * additional grant of patent rights can be found in the PATENTS file in
57404 * the same directory.
57405 */
57406
57407 var hasOwn = Object.prototype.hasOwnProperty;
57408
57409 function makePredicate(propertyName, knownTypes) {
57410 function onlyChildren(node) {
57411 t.assertNode(node);
57412
57413 // Assume no side effects until we find out otherwise.
57414 var result = false;
57415
57416 function check(child) {
57417 if (result) {
57418 // Do nothing.
57419 } else if (Array.isArray(child)) {
57420 child.some(check);
57421 } else if (t.isNode(child)) {
57422 _assert2.default.strictEqual(result, false);
57423 result = predicate(child);
57424 }
57425 return result;
57426 }
57427
57428 var keys = t.VISITOR_KEYS[node.type];
57429 if (keys) {
57430 for (var i = 0; i < keys.length; i++) {
57431 var key = keys[i];
57432 var child = node[key];
57433 check(child);
57434 }
57435 }
57436
57437 return result;
57438 }
57439
57440 function predicate(node) {
57441 t.assertNode(node);
57442
57443 var meta = m(node);
57444 if (hasOwn.call(meta, propertyName)) return meta[propertyName];
57445
57446 // Certain types are "opaque," which means they have no side
57447 // effects or leaps and we don't care about their subexpressions.
57448 if (hasOwn.call(opaqueTypes, node.type)) return meta[propertyName] = false;
57449
57450 if (hasOwn.call(knownTypes, node.type)) return meta[propertyName] = true;
57451
57452 return meta[propertyName] = onlyChildren(node);
57453 }
57454
57455 predicate.onlyChildren = onlyChildren;
57456
57457 return predicate;
57458 }
57459
57460 var opaqueTypes = {
57461 FunctionExpression: true,
57462 ArrowFunctionExpression: true
57463 };
57464
57465 // These types potentially have side effects regardless of what side
57466 // effects their subexpressions have.
57467 var sideEffectTypes = {
57468 CallExpression: true, // Anything could happen!
57469 ForInStatement: true, // Modifies the key variable.
57470 UnaryExpression: true, // Think delete.
57471 BinaryExpression: true, // Might invoke .toString() or .valueOf().
57472 AssignmentExpression: true, // Side-effecting by definition.
57473 UpdateExpression: true, // Updates are essentially assignments.
57474 NewExpression: true // Similar to CallExpression.
57475 };
57476
57477 // These types are the direct cause of all leaps in control flow.
57478 var leapTypes = {
57479 YieldExpression: true,
57480 BreakStatement: true,
57481 ContinueStatement: true,
57482 ReturnStatement: true,
57483 ThrowStatement: true
57484 };
57485
57486 // All leap types are also side effect types.
57487 for (var type in leapTypes) {
57488 if (hasOwn.call(leapTypes, type)) {
57489 sideEffectTypes[type] = leapTypes[type];
57490 }
57491 }
57492
57493 exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes);
57494 exports.containsLeap = makePredicate("containsLeap", leapTypes);
57495
57496/***/ }),
57497/* 609 */
57498/***/ (function(module, exports, __webpack_require__) {
57499
57500 "use strict";
57501
57502 exports.__esModule = true;
57503 exports.default = replaceShorthandObjectMethod;
57504
57505 var _babelTypes = __webpack_require__(1);
57506
57507 var t = _interopRequireWildcard(_babelTypes);
57508
57509 var _util = __webpack_require__(116);
57510
57511 var util = _interopRequireWildcard(_util);
57512
57513 function _interopRequireWildcard(obj) {
57514 if (obj && obj.__esModule) {
57515 return obj;
57516 } else {
57517 var newObj = {};if (obj != null) {
57518 for (var key in obj) {
57519 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
57520 }
57521 }newObj.default = obj;return newObj;
57522 }
57523 }
57524
57525 // this function converts a shorthand object generator method into a normal
57526 // (non-shorthand) object property which is a generator function expression. for
57527 // example, this:
57528 //
57529 // var foo = {
57530 // *bar(baz) { return 5; }
57531 // }
57532 //
57533 // should be replaced with:
57534 //
57535 // var foo = {
57536 // bar: function*(baz) { return 5; }
57537 // }
57538 //
57539 // to do this, it clones the parameter array and the body of the object generator
57540 // method into a new FunctionExpression.
57541 //
57542 // this method can be passed any Function AST node path, and it will return
57543 // either:
57544 // a) the path that was passed in (iff the path did not need to be replaced) or
57545 // b) the path of the new FunctionExpression that was created as a replacement
57546 // (iff the path did need to be replaced)
57547 //
57548 // In either case, though, the caller can count on the fact that the return value
57549 // is a Function AST node path.
57550 //
57551 // If this function is called with an AST node path that is not a Function (or with an
57552 // argument that isn't an AST node path), it will throw an error.
57553 function replaceShorthandObjectMethod(path) {
57554 if (!path.node || !t.isFunction(path.node)) {
57555 throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");
57556 }
57557
57558 // this function only replaces shorthand object methods (called ObjectMethod
57559 // in Babel-speak).
57560 if (!t.isObjectMethod(path.node)) {
57561 return path;
57562 }
57563
57564 // this function only replaces generators.
57565 if (!path.node.generator) {
57566 return path;
57567 }
57568
57569 var parameters = path.node.params.map(function (param) {
57570 return t.cloneDeep(param);
57571 });
57572
57573 var functionExpression = t.functionExpression(null, // id
57574 parameters, // params
57575 t.cloneDeep(path.node.body), // body
57576 path.node.generator, path.node.async);
57577
57578 util.replaceWithOrRemove(path, t.objectProperty(t.cloneDeep(path.node.key), // key
57579 functionExpression, //value
57580 path.node.computed, // computed
57581 false // shorthand
57582 ));
57583
57584 // path now refers to the ObjectProperty AST node path, but we want to return a
57585 // Function AST node path for the function expression we created. we know that
57586 // the FunctionExpression we just created is the value of the ObjectProperty,
57587 // so return the "value" path off of this path.
57588 return path.get("value");
57589 }
57590
57591/***/ }),
57592/* 610 */
57593/***/ (function(module, exports, __webpack_require__) {
57594
57595 /**
57596 * Copyright (c) 2014, Facebook, Inc.
57597 * All rights reserved.
57598 *
57599 * This source code is licensed under the BSD-style license found in the
57600 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
57601 * additional grant of patent rights can be found in the PATENTS file in
57602 * the same directory.
57603 */
57604
57605 "use strict";
57606
57607 var _assert = __webpack_require__(64);
57608
57609 var _assert2 = _interopRequireDefault(_assert);
57610
57611 var _babelTypes = __webpack_require__(1);
57612
57613 var t = _interopRequireWildcard(_babelTypes);
57614
57615 var _hoist = __webpack_require__(605);
57616
57617 var _emit = __webpack_require__(283);
57618
57619 var _replaceShorthandObjectMethod = __webpack_require__(609);
57620
57621 var _replaceShorthandObjectMethod2 = _interopRequireDefault(_replaceShorthandObjectMethod);
57622
57623 var _util = __webpack_require__(116);
57624
57625 var util = _interopRequireWildcard(_util);
57626
57627 function _interopRequireWildcard(obj) {
57628 if (obj && obj.__esModule) {
57629 return obj;
57630 } else {
57631 var newObj = {};if (obj != null) {
57632 for (var key in obj) {
57633 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
57634 }
57635 }newObj.default = obj;return newObj;
57636 }
57637 }
57638
57639 function _interopRequireDefault(obj) {
57640 return obj && obj.__esModule ? obj : { default: obj };
57641 }
57642
57643 exports.name = "regenerator-transform";
57644
57645 exports.visitor = {
57646 Function: {
57647 exit: function exit(path, state) {
57648 var node = path.node;
57649
57650 if (node.generator) {
57651 if (node.async) {
57652 // Async generator
57653 if (state.opts.asyncGenerators === false) return;
57654 } else {
57655 // Plain generator
57656 if (state.opts.generators === false) return;
57657 }
57658 } else if (node.async) {
57659 // Async function
57660 if (state.opts.async === false) return;
57661 } else {
57662 // Not a generator or async function.
57663 return;
57664 }
57665
57666 // if this is an ObjectMethod, we need to convert it to an ObjectProperty
57667 path = (0, _replaceShorthandObjectMethod2.default)(path);
57668 node = path.node;
57669
57670 var contextId = path.scope.generateUidIdentifier("context");
57671 var argsId = path.scope.generateUidIdentifier("args");
57672
57673 path.ensureBlock();
57674 var bodyBlockPath = path.get("body");
57675
57676 if (node.async) {
57677 bodyBlockPath.traverse(awaitVisitor);
57678 }
57679
57680 bodyBlockPath.traverse(functionSentVisitor, {
57681 context: contextId
57682 });
57683
57684 var outerBody = [];
57685 var innerBody = [];
57686
57687 bodyBlockPath.get("body").forEach(function (childPath) {
57688 var node = childPath.node;
57689 if (t.isExpressionStatement(node) && t.isStringLiteral(node.expression)) {
57690 // Babylon represents directives like "use strict" as elements
57691 // of a bodyBlockPath.node.directives array, but they could just
57692 // as easily be represented (by other parsers) as traditional
57693 // string-literal-valued expression statements, so we need to
57694 // handle that here. (#248)
57695 outerBody.push(node);
57696 } else if (node && node._blockHoist != null) {
57697 outerBody.push(node);
57698 } else {
57699 innerBody.push(node);
57700 }
57701 });
57702
57703 if (outerBody.length > 0) {
57704 // Only replace the inner body if we actually hoisted any statements
57705 // to the outer body.
57706 bodyBlockPath.node.body = innerBody;
57707 }
57708
57709 var outerFnExpr = getOuterFnExpr(path);
57710 // Note that getOuterFnExpr has the side-effect of ensuring that the
57711 // function has a name (so node.id will always be an Identifier), even
57712 // if a temporary name has to be synthesized.
57713 t.assertIdentifier(node.id);
57714 var innerFnId = t.identifier(node.id.name + "$");
57715
57716 // Turn all declarations into vars, and replace the original
57717 // declarations with equivalent assignment expressions.
57718 var vars = (0, _hoist.hoist)(path);
57719
57720 var didRenameArguments = renameArguments(path, argsId);
57721 if (didRenameArguments) {
57722 vars = vars || t.variableDeclaration("var", []);
57723 var argumentIdentifier = t.identifier("arguments");
57724 // we need to do this as otherwise arguments in arrow functions gets hoisted
57725 argumentIdentifier._shadowedFunctionLiteral = path;
57726 vars.declarations.push(t.variableDeclarator(argsId, argumentIdentifier));
57727 }
57728
57729 var emitter = new _emit.Emitter(contextId);
57730 emitter.explode(path.get("body"));
57731
57732 if (vars && vars.declarations.length > 0) {
57733 outerBody.push(vars);
57734 }
57735
57736 var wrapArgs = [emitter.getContextFunction(innerFnId),
57737 // Async functions that are not generators don't care about the
57738 // outer function because they don't need it to be marked and don't
57739 // inherit from its .prototype.
57740 node.generator ? outerFnExpr : t.nullLiteral(), t.thisExpression()];
57741
57742 var tryLocsList = emitter.getTryLocsList();
57743 if (tryLocsList) {
57744 wrapArgs.push(tryLocsList);
57745 }
57746
57747 var wrapCall = t.callExpression(util.runtimeProperty(node.async ? "async" : "wrap"), wrapArgs);
57748
57749 outerBody.push(t.returnStatement(wrapCall));
57750 node.body = t.blockStatement(outerBody);
57751
57752 var oldDirectives = bodyBlockPath.node.directives;
57753 if (oldDirectives) {
57754 // Babylon represents directives like "use strict" as elements of
57755 // a bodyBlockPath.node.directives array. (#248)
57756 node.body.directives = oldDirectives;
57757 }
57758
57759 var wasGeneratorFunction = node.generator;
57760 if (wasGeneratorFunction) {
57761 node.generator = false;
57762 }
57763
57764 if (node.async) {
57765 node.async = false;
57766 }
57767
57768 if (wasGeneratorFunction && t.isExpression(node)) {
57769 util.replaceWithOrRemove(path, t.callExpression(util.runtimeProperty("mark"), [node]));
57770 path.addComment("leading", "#__PURE__");
57771 }
57772
57773 // Generators are processed in 'exit' handlers so that regenerator only has to run on
57774 // an ES5 AST, but that means traversal will not pick up newly inserted references
57775 // to things like 'regeneratorRuntime'. To avoid this, we explicitly requeue.
57776 path.requeue();
57777 }
57778 }
57779 };
57780
57781 // Given a NodePath for a Function, return an Expression node that can be
57782 // used to refer reliably to the function object from inside the function.
57783 // This expression is essentially a replacement for arguments.callee, with
57784 // the key advantage that it works in strict mode.
57785 function getOuterFnExpr(funPath) {
57786 var node = funPath.node;
57787 t.assertFunction(node);
57788
57789 if (!node.id) {
57790 // Default-exported function declarations, and function expressions may not
57791 // have a name to reference, so we explicitly add one.
57792 node.id = funPath.scope.parent.generateUidIdentifier("callee");
57793 }
57794
57795 if (node.generator && // Non-generator functions don't need to be marked.
57796 t.isFunctionDeclaration(node)) {
57797 // Return the identifier returned by runtime.mark(<node.id>).
57798 return getMarkedFunctionId(funPath);
57799 }
57800
57801 return node.id;
57802 }
57803
57804 var getMarkInfo = __webpack_require__(281).makeAccessor();
57805
57806 function getMarkedFunctionId(funPath) {
57807 var node = funPath.node;
57808 t.assertIdentifier(node.id);
57809
57810 var blockPath = funPath.findParent(function (path) {
57811 return path.isProgram() || path.isBlockStatement();
57812 });
57813
57814 if (!blockPath) {
57815 return node.id;
57816 }
57817
57818 var block = blockPath.node;
57819 _assert2.default.ok(Array.isArray(block.body));
57820
57821 var info = getMarkInfo(block);
57822 if (!info.decl) {
57823 info.decl = t.variableDeclaration("var", []);
57824 blockPath.unshiftContainer("body", info.decl);
57825 info.declPath = blockPath.get("body.0");
57826 }
57827
57828 _assert2.default.strictEqual(info.declPath.node, info.decl);
57829
57830 // Get a new unique identifier for our marked variable.
57831 var markedId = blockPath.scope.generateUidIdentifier("marked");
57832 var markCallExp = t.callExpression(util.runtimeProperty("mark"), [node.id]);
57833
57834 var index = info.decl.declarations.push(t.variableDeclarator(markedId, markCallExp)) - 1;
57835
57836 var markCallExpPath = info.declPath.get("declarations." + index + ".init");
57837
57838 _assert2.default.strictEqual(markCallExpPath.node, markCallExp);
57839
57840 markCallExpPath.addComment("leading", "#__PURE__");
57841
57842 return markedId;
57843 }
57844
57845 function renameArguments(funcPath, argsId) {
57846 var state = {
57847 didRenameArguments: false,
57848 argsId: argsId
57849 };
57850
57851 funcPath.traverse(argumentsVisitor, state);
57852
57853 // If the traversal replaced any arguments references, then we need to
57854 // alias the outer function's arguments binding (be it the implicit
57855 // arguments object or some other parameter or variable) to the variable
57856 // named by argsId.
57857 return state.didRenameArguments;
57858 }
57859
57860 var argumentsVisitor = {
57861 "FunctionExpression|FunctionDeclaration": function FunctionExpressionFunctionDeclaration(path) {
57862 path.skip();
57863 },
57864
57865 Identifier: function Identifier(path, state) {
57866 if (path.node.name === "arguments" && util.isReference(path)) {
57867 util.replaceWithOrRemove(path, state.argsId);
57868 state.didRenameArguments = true;
57869 }
57870 }
57871 };
57872
57873 var functionSentVisitor = {
57874 MetaProperty: function MetaProperty(path) {
57875 var node = path.node;
57876
57877 if (node.meta.name === "function" && node.property.name === "sent") {
57878 util.replaceWithOrRemove(path, t.memberExpression(this.context, t.identifier("_sent")));
57879 }
57880 }
57881 };
57882
57883 var awaitVisitor = {
57884 Function: function Function(path) {
57885 path.skip(); // Don't descend into nested function scopes.
57886 },
57887
57888 AwaitExpression: function AwaitExpression(path) {
57889 // Convert await expressions to yield expressions.
57890 var argument = path.node.argument;
57891
57892 // Transforming `await x` to `yield regeneratorRuntime.awrap(x)`
57893 // causes the argument to be wrapped in such a way that the runtime
57894 // can distinguish between awaited and merely yielded values.
57895 util.replaceWithOrRemove(path, t.yieldExpression(t.callExpression(util.runtimeProperty("awrap"), [argument]), false));
57896 }
57897 };
57898
57899/***/ }),
57900/* 611 */
57901/***/ (function(module, exports, __webpack_require__) {
57902
57903 'use strict';
57904
57905 // Generated by `/scripts/character-class-escape-sets.js`. Do not edit.
57906 var regenerate = __webpack_require__(282);
57907
57908 exports.REGULAR = {
57909 'd': regenerate().addRange(0x30, 0x39),
57910 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0xFFFF),
57911 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029),
57912 'S': regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0xFFFF),
57913 'w': regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A),
57914 'W': regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0xFFFF)
57915 };
57916
57917 exports.UNICODE = {
57918 'd': regenerate().addRange(0x30, 0x39),
57919 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF),
57920 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029),
57921 'S': regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0x10FFFF),
57922 'w': regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A),
57923 'W': regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x10FFFF)
57924 };
57925
57926 exports.UNICODE_IGNORE_CASE = {
57927 'd': regenerate().addRange(0x30, 0x39),
57928 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF),
57929 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029),
57930 'S': regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0x10FFFF),
57931 'w': regenerate(0x5F, 0x17F, 0x212A).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A),
57932 'W': regenerate(0x4B, 0x53, 0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x10FFFF)
57933 };
57934
57935/***/ }),
57936/* 612 */
57937/***/ (function(module, exports, __webpack_require__) {
57938
57939 'use strict';
57940
57941 var generate = __webpack_require__(613).generate;
57942 var parse = __webpack_require__(614).parse;
57943 var regenerate = __webpack_require__(282);
57944 var iuMappings = __webpack_require__(631);
57945 var ESCAPE_SETS = __webpack_require__(611);
57946
57947 function getCharacterClassEscapeSet(character) {
57948 if (unicode) {
57949 if (ignoreCase) {
57950 return ESCAPE_SETS.UNICODE_IGNORE_CASE[character];
57951 }
57952 return ESCAPE_SETS.UNICODE[character];
57953 }
57954 return ESCAPE_SETS.REGULAR[character];
57955 }
57956
57957 var object = {};
57958 var hasOwnProperty = object.hasOwnProperty;
57959 function has(object, property) {
57960 return hasOwnProperty.call(object, property);
57961 }
57962
57963 // Prepare a Regenerate set containing all code points, used for negative
57964 // character classes (if any).
57965 var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
57966 // Without the `u` flag, the range stops at 0xFFFF.
57967 // https://mths.be/es6#sec-pattern-semantics
57968 var BMP_SET = regenerate().addRange(0x0, 0xFFFF);
57969
57970 // Prepare a Regenerate set containing all code points that are supposed to be
57971 // matched by `/./u`. https://mths.be/es6#sec-atom
57972 var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points
57973 .remove(
57974 // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators):
57975 0x000A, // Line Feed <LF>
57976 0x000D, // Carriage Return <CR>
57977 0x2028, // Line Separator <LS>
57978 0x2029 // Paragraph Separator <PS>
57979 );
57980 // Prepare a Regenerate set containing all code points that are supposed to be
57981 // matched by `/./` (only BMP code points).
57982 var DOT_SET = DOT_SET_UNICODE.clone().intersection(BMP_SET);
57983
57984 // Add a range of code points + any case-folded code points in that range to a
57985 // set.
57986 regenerate.prototype.iuAddRange = function (min, max) {
57987 var $this = this;
57988 do {
57989 var folded = caseFold(min);
57990 if (folded) {
57991 $this.add(folded);
57992 }
57993 } while (++min <= max);
57994 return $this;
57995 };
57996
57997 function assign(target, source) {
57998 for (var key in source) {
57999 // Note: `hasOwnProperty` is not needed here.
58000 target[key] = source[key];
58001 }
58002 }
58003
58004 function update(item, pattern) {
58005 // TODO: Test if memoizing `pattern` here is worth the effort.
58006 if (!pattern) {
58007 return;
58008 }
58009 var tree = parse(pattern, '');
58010 switch (tree.type) {
58011 case 'characterClass':
58012 case 'group':
58013 case 'value':
58014 // No wrapping needed.
58015 break;
58016 default:
58017 // Wrap the pattern in a non-capturing group.
58018 tree = wrap(tree, pattern);
58019 }
58020 assign(item, tree);
58021 }
58022
58023 function wrap(tree, pattern) {
58024 // Wrap the pattern in a non-capturing group.
58025 return {
58026 'type': 'group',
58027 'behavior': 'ignore',
58028 'body': [tree],
58029 'raw': '(?:' + pattern + ')'
58030 };
58031 }
58032
58033 function caseFold(codePoint) {
58034 return has(iuMappings, codePoint) ? iuMappings[codePoint] : false;
58035 }
58036
58037 var ignoreCase = false;
58038 var unicode = false;
58039 function processCharacterClass(characterClassItem) {
58040 var set = regenerate();
58041 var body = characterClassItem.body.forEach(function (item) {
58042 switch (item.type) {
58043 case 'value':
58044 set.add(item.codePoint);
58045 if (ignoreCase && unicode) {
58046 var folded = caseFold(item.codePoint);
58047 if (folded) {
58048 set.add(folded);
58049 }
58050 }
58051 break;
58052 case 'characterClassRange':
58053 var min = item.min.codePoint;
58054 var max = item.max.codePoint;
58055 set.addRange(min, max);
58056 if (ignoreCase && unicode) {
58057 set.iuAddRange(min, max);
58058 }
58059 break;
58060 case 'characterClassEscape':
58061 set.add(getCharacterClassEscapeSet(item.value));
58062 break;
58063 // The `default` clause is only here as a safeguard; it should never be
58064 // reached. Code coverage tools should ignore it.
58065 /* istanbul ignore next */
58066 default:
58067 throw Error('Unknown term type: ' + item.type);
58068 }
58069 });
58070 if (characterClassItem.negative) {
58071 set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set);
58072 }
58073 update(characterClassItem, set.toString());
58074 return characterClassItem;
58075 }
58076
58077 function processTerm(item) {
58078 switch (item.type) {
58079 case 'dot':
58080 update(item, (unicode ? DOT_SET_UNICODE : DOT_SET).toString());
58081 break;
58082 case 'characterClass':
58083 item = processCharacterClass(item);
58084 break;
58085 case 'characterClassEscape':
58086 update(item, getCharacterClassEscapeSet(item.value).toString());
58087 break;
58088 case 'alternative':
58089 case 'disjunction':
58090 case 'group':
58091 case 'quantifier':
58092 item.body = item.body.map(processTerm);
58093 break;
58094 case 'value':
58095 var codePoint = item.codePoint;
58096 var set = regenerate(codePoint);
58097 if (ignoreCase && unicode) {
58098 var folded = caseFold(codePoint);
58099 if (folded) {
58100 set.add(folded);
58101 }
58102 }
58103 update(item, set.toString());
58104 break;
58105 case 'anchor':
58106 case 'empty':
58107 case 'group':
58108 case 'reference':
58109 // Nothing to do here.
58110 break;
58111 // The `default` clause is only here as a safeguard; it should never be
58112 // reached. Code coverage tools should ignore it.
58113 /* istanbul ignore next */
58114 default:
58115 throw Error('Unknown term type: ' + item.type);
58116 }
58117 return item;
58118 };
58119
58120 module.exports = function (pattern, flags) {
58121 var tree = parse(pattern, flags);
58122 ignoreCase = flags ? flags.indexOf('i') > -1 : false;
58123 unicode = flags ? flags.indexOf('u') > -1 : false;
58124 assign(tree, processTerm(tree));
58125 return generate(tree);
58126 };
58127
58128/***/ }),
58129/* 613 */
58130/***/ (function(module, exports, __webpack_require__) {
58131
58132 var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {'use strict';
58133
58134 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
58135
58136 /*!
58137 * RegJSGen
58138 * Copyright 2014 Benjamin Tan <https://d10.github.io/>
58139 * Available under MIT license <http://d10.mit-license.org/>
58140 */
58141 ;(function () {
58142 'use strict';
58143
58144 /** Used to determine if values are of the language type `Object` */
58145
58146 var objectTypes = {
58147 'function': true,
58148 'object': true
58149 };
58150
58151 /** Used as a reference to the global object */
58152 var root = objectTypes[typeof window === 'undefined' ? 'undefined' : _typeof(window)] && window || this;
58153
58154 /** Backup possible global object */
58155 var oldRoot = root;
58156
58157 /** Detect free variable `exports` */
58158 var freeExports = objectTypes[ false ? 'undefined' : _typeof(exports)] && exports;
58159
58160 /** Detect free variable `module` */
58161 var freeModule = objectTypes[ false ? 'undefined' : _typeof(module)] && module && !module.nodeType && module;
58162
58163 /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */
58164 var freeGlobal = freeExports && freeModule && (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global;
58165 if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
58166 root = freeGlobal;
58167 }
58168
58169 /*--------------------------------------------------------------------------*/
58170
58171 /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */
58172
58173 var stringFromCharCode = String.fromCharCode;
58174 var floor = Math.floor;
58175 function fromCodePoint() {
58176 var MAX_SIZE = 0x4000;
58177 var codeUnits = [];
58178 var highSurrogate;
58179 var lowSurrogate;
58180 var index = -1;
58181 var length = arguments.length;
58182 if (!length) {
58183 return '';
58184 }
58185 var result = '';
58186 while (++index < length) {
58187 var codePoint = Number(arguments[index]);
58188 if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
58189 codePoint < 0 || // not a valid Unicode code point
58190 codePoint > 0x10FFFF || // not a valid Unicode code point
58191 floor(codePoint) != codePoint // not an integer
58192 ) {
58193 throw RangeError('Invalid code point: ' + codePoint);
58194 }
58195 if (codePoint <= 0xFFFF) {
58196 // BMP code point
58197 codeUnits.push(codePoint);
58198 } else {
58199 // Astral code point; split in surrogate halves
58200 // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
58201 codePoint -= 0x10000;
58202 highSurrogate = (codePoint >> 10) + 0xD800;
58203 lowSurrogate = codePoint % 0x400 + 0xDC00;
58204 codeUnits.push(highSurrogate, lowSurrogate);
58205 }
58206 if (index + 1 == length || codeUnits.length > MAX_SIZE) {
58207 result += stringFromCharCode.apply(null, codeUnits);
58208 codeUnits.length = 0;
58209 }
58210 }
58211 return result;
58212 }
58213
58214 function assertType(type, expected) {
58215 if (expected.indexOf('|') == -1) {
58216 if (type == expected) {
58217 return;
58218 }
58219
58220 throw Error('Invalid node type: ' + type);
58221 }
58222
58223 expected = assertType.hasOwnProperty(expected) ? assertType[expected] : assertType[expected] = RegExp('^(?:' + expected + ')$');
58224
58225 if (expected.test(type)) {
58226 return;
58227 }
58228
58229 throw Error('Invalid node type: ' + type);
58230 }
58231
58232 /*--------------------------------------------------------------------------*/
58233
58234 function generate(node) {
58235 var type = node.type;
58236
58237 if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') {
58238 return generate[type](node);
58239 }
58240
58241 throw Error('Invalid node type: ' + type);
58242 }
58243
58244 /*--------------------------------------------------------------------------*/
58245
58246 function generateAlternative(node) {
58247 assertType(node.type, 'alternative');
58248
58249 var terms = node.body,
58250 length = terms ? terms.length : 0;
58251
58252 if (length == 1) {
58253 return generateTerm(terms[0]);
58254 } else {
58255 var i = -1,
58256 result = '';
58257
58258 while (++i < length) {
58259 result += generateTerm(terms[i]);
58260 }
58261
58262 return result;
58263 }
58264 }
58265
58266 function generateAnchor(node) {
58267 assertType(node.type, 'anchor');
58268
58269 switch (node.kind) {
58270 case 'start':
58271 return '^';
58272 case 'end':
58273 return '$';
58274 case 'boundary':
58275 return '\\b';
58276 case 'not-boundary':
58277 return '\\B';
58278 default:
58279 throw Error('Invalid assertion');
58280 }
58281 }
58282
58283 function generateAtom(node) {
58284 assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value');
58285
58286 return generate(node);
58287 }
58288
58289 function generateCharacterClass(node) {
58290 assertType(node.type, 'characterClass');
58291
58292 var classRanges = node.body,
58293 length = classRanges ? classRanges.length : 0;
58294
58295 var i = -1,
58296 result = '[';
58297
58298 if (node.negative) {
58299 result += '^';
58300 }
58301
58302 while (++i < length) {
58303 result += generateClassAtom(classRanges[i]);
58304 }
58305
58306 result += ']';
58307
58308 return result;
58309 }
58310
58311 function generateCharacterClassEscape(node) {
58312 assertType(node.type, 'characterClassEscape');
58313
58314 return '\\' + node.value;
58315 }
58316
58317 function generateCharacterClassRange(node) {
58318 assertType(node.type, 'characterClassRange');
58319
58320 var min = node.min,
58321 max = node.max;
58322
58323 if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {
58324 throw Error('Invalid character class range');
58325 }
58326
58327 return generateClassAtom(min) + '-' + generateClassAtom(max);
58328 }
58329
58330 function generateClassAtom(node) {
58331 assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value');
58332
58333 return generate(node);
58334 }
58335
58336 function generateDisjunction(node) {
58337 assertType(node.type, 'disjunction');
58338
58339 var body = node.body,
58340 length = body ? body.length : 0;
58341
58342 if (length == 0) {
58343 throw Error('No body');
58344 } else if (length == 1) {
58345 return generate(body[0]);
58346 } else {
58347 var i = -1,
58348 result = '';
58349
58350 while (++i < length) {
58351 if (i != 0) {
58352 result += '|';
58353 }
58354 result += generate(body[i]);
58355 }
58356
58357 return result;
58358 }
58359 }
58360
58361 function generateDot(node) {
58362 assertType(node.type, 'dot');
58363
58364 return '.';
58365 }
58366
58367 function generateGroup(node) {
58368 assertType(node.type, 'group');
58369
58370 var result = '(';
58371
58372 switch (node.behavior) {
58373 case 'normal':
58374 break;
58375 case 'ignore':
58376 result += '?:';
58377 break;
58378 case 'lookahead':
58379 result += '?=';
58380 break;
58381 case 'negativeLookahead':
58382 result += '?!';
58383 break;
58384 default:
58385 throw Error('Invalid behaviour: ' + node.behaviour);
58386 }
58387
58388 var body = node.body,
58389 length = body ? body.length : 0;
58390
58391 if (length == 1) {
58392 result += generate(body[0]);
58393 } else {
58394 var i = -1;
58395
58396 while (++i < length) {
58397 result += generate(body[i]);
58398 }
58399 }
58400
58401 result += ')';
58402
58403 return result;
58404 }
58405
58406 function generateQuantifier(node) {
58407 assertType(node.type, 'quantifier');
58408
58409 var quantifier = '',
58410 min = node.min,
58411 max = node.max;
58412
58413 switch (max) {
58414 case undefined:
58415 case null:
58416 switch (min) {
58417 case 0:
58418 quantifier = '*';
58419 break;
58420 case 1:
58421 quantifier = '+';
58422 break;
58423 default:
58424 quantifier = '{' + min + ',}';
58425 break;
58426 }
58427 break;
58428 default:
58429 if (min == max) {
58430 quantifier = '{' + min + '}';
58431 } else if (min == 0 && max == 1) {
58432 quantifier = '?';
58433 } else {
58434 quantifier = '{' + min + ',' + max + '}';
58435 }
58436 break;
58437 }
58438
58439 if (!node.greedy) {
58440 quantifier += '?';
58441 }
58442
58443 return generateAtom(node.body[0]) + quantifier;
58444 }
58445
58446 function generateReference(node) {
58447 assertType(node.type, 'reference');
58448
58449 return '\\' + node.matchIndex;
58450 }
58451
58452 function generateTerm(node) {
58453 assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value');
58454
58455 return generate(node);
58456 }
58457
58458 function generateValue(node) {
58459 assertType(node.type, 'value');
58460
58461 var kind = node.kind,
58462 codePoint = node.codePoint;
58463
58464 switch (kind) {
58465 case 'controlLetter':
58466 return '\\c' + fromCodePoint(codePoint + 64);
58467 case 'hexadecimalEscape':
58468 return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2);
58469 case 'identifier':
58470 return '\\' + fromCodePoint(codePoint);
58471 case 'null':
58472 return '\\' + codePoint;
58473 case 'octal':
58474 return '\\' + codePoint.toString(8);
58475 case 'singleEscape':
58476 switch (codePoint) {
58477 case 0x0008:
58478 return '\\b';
58479 case 0x009:
58480 return '\\t';
58481 case 0x00A:
58482 return '\\n';
58483 case 0x00B:
58484 return '\\v';
58485 case 0x00C:
58486 return '\\f';
58487 case 0x00D:
58488 return '\\r';
58489 default:
58490 throw Error('Invalid codepoint: ' + codePoint);
58491 }
58492 case 'symbol':
58493 return fromCodePoint(codePoint);
58494 case 'unicodeEscape':
58495 return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4);
58496 case 'unicodeCodePointEscape':
58497 return '\\u{' + codePoint.toString(16).toUpperCase() + '}';
58498 default:
58499 throw Error('Unsupported node kind: ' + kind);
58500 }
58501 }
58502
58503 /*--------------------------------------------------------------------------*/
58504
58505 generate.alternative = generateAlternative;
58506 generate.anchor = generateAnchor;
58507 generate.characterClass = generateCharacterClass;
58508 generate.characterClassEscape = generateCharacterClassEscape;
58509 generate.characterClassRange = generateCharacterClassRange;
58510 generate.disjunction = generateDisjunction;
58511 generate.dot = generateDot;
58512 generate.group = generateGroup;
58513 generate.quantifier = generateQuantifier;
58514 generate.reference = generateReference;
58515 generate.value = generateValue;
58516
58517 /*--------------------------------------------------------------------------*/
58518
58519 // export regjsgen
58520 // some AMD build optimizers, like r.js, check for condition patterns like the following:
58521 if ("function" == 'function' && _typeof(__webpack_require__(49)) == 'object' && __webpack_require__(49)) {
58522 // define as an anonymous module so, through path mapping, it can be aliased
58523 !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
58524 return {
58525 'generate': generate
58526 };
58527 }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
58528 }
58529 // check for `exports` after `define` in case a build optimizer adds an `exports` object
58530 else if (freeExports && freeModule) {
58531 // in Narwhal, Node.js, Rhino -require, or RingoJS
58532 freeExports.generate = generate;
58533 }
58534 // in a browser or Rhino
58535 else {
58536 root.regjsgen = {
58537 'generate': generate
58538 };
58539 }
58540 }).call(undefined);
58541 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(39)(module), (function() { return this; }())))
58542
58543/***/ }),
58544/* 614 */
58545/***/ (function(module, exports) {
58546
58547 'use strict';
58548
58549 // regjsparser
58550 //
58551 // ==================================================================
58552 //
58553 // See ECMA-262 Standard: 15.10.1
58554 //
58555 // NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the
58556 // term "Anchor" is used.
58557 //
58558 // Pattern ::
58559 // Disjunction
58560 //
58561 // Disjunction ::
58562 // Alternative
58563 // Alternative | Disjunction
58564 //
58565 // Alternative ::
58566 // [empty]
58567 // Alternative Term
58568 //
58569 // Term ::
58570 // Anchor
58571 // Atom
58572 // Atom Quantifier
58573 //
58574 // Anchor ::
58575 // ^
58576 // $
58577 // \ b
58578 // \ B
58579 // ( ? = Disjunction )
58580 // ( ? ! Disjunction )
58581 //
58582 // Quantifier ::
58583 // QuantifierPrefix
58584 // QuantifierPrefix ?
58585 //
58586 // QuantifierPrefix ::
58587 // *
58588 // +
58589 // ?
58590 // { DecimalDigits }
58591 // { DecimalDigits , }
58592 // { DecimalDigits , DecimalDigits }
58593 //
58594 // Atom ::
58595 // PatternCharacter
58596 // .
58597 // \ AtomEscape
58598 // CharacterClass
58599 // ( Disjunction )
58600 // ( ? : Disjunction )
58601 //
58602 // PatternCharacter ::
58603 // SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } |
58604 //
58605 // AtomEscape ::
58606 // DecimalEscape
58607 // CharacterEscape
58608 // CharacterClassEscape
58609 //
58610 // CharacterEscape[U] ::
58611 // ControlEscape
58612 // c ControlLetter
58613 // HexEscapeSequence
58614 // RegExpUnicodeEscapeSequence[?U] (ES6)
58615 // IdentityEscape[?U]
58616 //
58617 // ControlEscape ::
58618 // one of f n r t v
58619 // ControlLetter ::
58620 // one of
58621 // a b c d e f g h i j k l m n o p q r s t u v w x y z
58622 // A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
58623 //
58624 // IdentityEscape ::
58625 // SourceCharacter but not IdentifierPart
58626 // <ZWJ>
58627 // <ZWNJ>
58628 //
58629 // DecimalEscape ::
58630 // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]
58631 //
58632 // CharacterClassEscape ::
58633 // one of d D s S w W
58634 //
58635 // CharacterClass ::
58636 // [ [lookahead ∉ {^}] ClassRanges ]
58637 // [ ^ ClassRanges ]
58638 //
58639 // ClassRanges ::
58640 // [empty]
58641 // NonemptyClassRanges
58642 //
58643 // NonemptyClassRanges ::
58644 // ClassAtom
58645 // ClassAtom NonemptyClassRangesNoDash
58646 // ClassAtom - ClassAtom ClassRanges
58647 //
58648 // NonemptyClassRangesNoDash ::
58649 // ClassAtom
58650 // ClassAtomNoDash NonemptyClassRangesNoDash
58651 // ClassAtomNoDash - ClassAtom ClassRanges
58652 //
58653 // ClassAtom ::
58654 // -
58655 // ClassAtomNoDash
58656 //
58657 // ClassAtomNoDash ::
58658 // SourceCharacter but not one of \ or ] or -
58659 // \ ClassEscape
58660 //
58661 // ClassEscape ::
58662 // DecimalEscape
58663 // b
58664 // CharacterEscape
58665 // CharacterClassEscape
58666
58667 (function () {
58668
58669 function parse(str, flags) {
58670 function addRaw(node) {
58671 node.raw = str.substring(node.range[0], node.range[1]);
58672 return node;
58673 }
58674
58675 function updateRawStart(node, start) {
58676 node.range[0] = start;
58677 return addRaw(node);
58678 }
58679
58680 function createAnchor(kind, rawLength) {
58681 return addRaw({
58682 type: 'anchor',
58683 kind: kind,
58684 range: [pos - rawLength, pos]
58685 });
58686 }
58687
58688 function createValue(kind, codePoint, from, to) {
58689 return addRaw({
58690 type: 'value',
58691 kind: kind,
58692 codePoint: codePoint,
58693 range: [from, to]
58694 });
58695 }
58696
58697 function createEscaped(kind, codePoint, value, fromOffset) {
58698 fromOffset = fromOffset || 0;
58699 return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);
58700 }
58701
58702 function createCharacter(matches) {
58703 var _char = matches[0];
58704 var first = _char.charCodeAt(0);
58705 if (hasUnicodeFlag) {
58706 var second;
58707 if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {
58708 second = lookahead().charCodeAt(0);
58709 if (second >= 0xDC00 && second <= 0xDFFF) {
58710 // Unicode surrogate pair
58711 pos++;
58712 return createValue('symbol', (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, pos - 2, pos);
58713 }
58714 }
58715 }
58716 return createValue('symbol', first, pos - 1, pos);
58717 }
58718
58719 function createDisjunction(alternatives, from, to) {
58720 return addRaw({
58721 type: 'disjunction',
58722 body: alternatives,
58723 range: [from, to]
58724 });
58725 }
58726
58727 function createDot() {
58728 return addRaw({
58729 type: 'dot',
58730 range: [pos - 1, pos]
58731 });
58732 }
58733
58734 function createCharacterClassEscape(value) {
58735 return addRaw({
58736 type: 'characterClassEscape',
58737 value: value,
58738 range: [pos - 2, pos]
58739 });
58740 }
58741
58742 function createReference(matchIndex) {
58743 return addRaw({
58744 type: 'reference',
58745 matchIndex: parseInt(matchIndex, 10),
58746 range: [pos - 1 - matchIndex.length, pos]
58747 });
58748 }
58749
58750 function createGroup(behavior, disjunction, from, to) {
58751 return addRaw({
58752 type: 'group',
58753 behavior: behavior,
58754 body: disjunction,
58755 range: [from, to]
58756 });
58757 }
58758
58759 function createQuantifier(min, max, from, to) {
58760 if (to == null) {
58761 from = pos - 1;
58762 to = pos;
58763 }
58764
58765 return addRaw({
58766 type: 'quantifier',
58767 min: min,
58768 max: max,
58769 greedy: true,
58770 body: null, // set later on
58771 range: [from, to]
58772 });
58773 }
58774
58775 function createAlternative(terms, from, to) {
58776 return addRaw({
58777 type: 'alternative',
58778 body: terms,
58779 range: [from, to]
58780 });
58781 }
58782
58783 function createCharacterClass(classRanges, negative, from, to) {
58784 return addRaw({
58785 type: 'characterClass',
58786 body: classRanges,
58787 negative: negative,
58788 range: [from, to]
58789 });
58790 }
58791
58792 function createClassRange(min, max, from, to) {
58793 // See 15.10.2.15:
58794 if (min.codePoint > max.codePoint) {
58795 bail('invalid range in character class', min.raw + '-' + max.raw, from, to);
58796 }
58797
58798 return addRaw({
58799 type: 'characterClassRange',
58800 min: min,
58801 max: max,
58802 range: [from, to]
58803 });
58804 }
58805
58806 function flattenBody(body) {
58807 if (body.type === 'alternative') {
58808 return body.body;
58809 } else {
58810 return [body];
58811 }
58812 }
58813
58814 function isEmpty(obj) {
58815 return obj.type === 'empty';
58816 }
58817
58818 function incr(amount) {
58819 amount = amount || 1;
58820 var res = str.substring(pos, pos + amount);
58821 pos += amount || 1;
58822 return res;
58823 }
58824
58825 function skip(value) {
58826 if (!match(value)) {
58827 bail('character', value);
58828 }
58829 }
58830
58831 function match(value) {
58832 if (str.indexOf(value, pos) === pos) {
58833 return incr(value.length);
58834 }
58835 }
58836
58837 function lookahead() {
58838 return str[pos];
58839 }
58840
58841 function current(value) {
58842 return str.indexOf(value, pos) === pos;
58843 }
58844
58845 function next(value) {
58846 return str[pos + 1] === value;
58847 }
58848
58849 function matchReg(regExp) {
58850 var subStr = str.substring(pos);
58851 var res = subStr.match(regExp);
58852 if (res) {
58853 res.range = [];
58854 res.range[0] = pos;
58855 incr(res[0].length);
58856 res.range[1] = pos;
58857 }
58858 return res;
58859 }
58860
58861 function parseDisjunction() {
58862 // Disjunction ::
58863 // Alternative
58864 // Alternative | Disjunction
58865 var res = [],
58866 from = pos;
58867 res.push(parseAlternative());
58868
58869 while (match('|')) {
58870 res.push(parseAlternative());
58871 }
58872
58873 if (res.length === 1) {
58874 return res[0];
58875 }
58876
58877 return createDisjunction(res, from, pos);
58878 }
58879
58880 function parseAlternative() {
58881 var res = [],
58882 from = pos;
58883 var term;
58884
58885 // Alternative ::
58886 // [empty]
58887 // Alternative Term
58888 while (term = parseTerm()) {
58889 res.push(term);
58890 }
58891
58892 if (res.length === 1) {
58893 return res[0];
58894 }
58895
58896 return createAlternative(res, from, pos);
58897 }
58898
58899 function parseTerm() {
58900 // Term ::
58901 // Anchor
58902 // Atom
58903 // Atom Quantifier
58904
58905 if (pos >= str.length || current('|') || current(')')) {
58906 return null; /* Means: The term is empty */
58907 }
58908
58909 var anchor = parseAnchor();
58910
58911 if (anchor) {
58912 return anchor;
58913 }
58914
58915 var atom = parseAtom();
58916 if (!atom) {
58917 bail('Expected atom');
58918 }
58919 var quantifier = parseQuantifier() || false;
58920 if (quantifier) {
58921 quantifier.body = flattenBody(atom);
58922 // The quantifier contains the atom. Therefore, the beginning of the
58923 // quantifier range is given by the beginning of the atom.
58924 updateRawStart(quantifier, atom.range[0]);
58925 return quantifier;
58926 }
58927 return atom;
58928 }
58929
58930 function parseGroup(matchA, typeA, matchB, typeB) {
58931 var type = null,
58932 from = pos;
58933
58934 if (match(matchA)) {
58935 type = typeA;
58936 } else if (match(matchB)) {
58937 type = typeB;
58938 } else {
58939 return false;
58940 }
58941
58942 var body = parseDisjunction();
58943 if (!body) {
58944 bail('Expected disjunction');
58945 }
58946 skip(')');
58947 var group = createGroup(type, flattenBody(body), from, pos);
58948
58949 if (type == 'normal') {
58950 // Keep track of the number of closed groups. This is required for
58951 // parseDecimalEscape(). In case the string is parsed a second time the
58952 // value already holds the total count and no incrementation is required.
58953 if (firstIteration) {
58954 closedCaptureCounter++;
58955 }
58956 }
58957 return group;
58958 }
58959
58960 function parseAnchor() {
58961 // Anchor ::
58962 // ^
58963 // $
58964 // \ b
58965 // \ B
58966 // ( ? = Disjunction )
58967 // ( ? ! Disjunction )
58968 var res,
58969 from = pos;
58970
58971 if (match('^')) {
58972 return createAnchor('start', 1 /* rawLength */);
58973 } else if (match('$')) {
58974 return createAnchor('end', 1 /* rawLength */);
58975 } else if (match('\\b')) {
58976 return createAnchor('boundary', 2 /* rawLength */);
58977 } else if (match('\\B')) {
58978 return createAnchor('not-boundary', 2 /* rawLength */);
58979 } else {
58980 return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead');
58981 }
58982 }
58983
58984 function parseQuantifier() {
58985 // Quantifier ::
58986 // QuantifierPrefix
58987 // QuantifierPrefix ?
58988 //
58989 // QuantifierPrefix ::
58990 // *
58991 // +
58992 // ?
58993 // { DecimalDigits }
58994 // { DecimalDigits , }
58995 // { DecimalDigits , DecimalDigits }
58996
58997 var res,
58998 from = pos;
58999 var quantifier;
59000 var min, max;
59001
59002 if (match('*')) {
59003 quantifier = createQuantifier(0);
59004 } else if (match('+')) {
59005 quantifier = createQuantifier(1);
59006 } else if (match('?')) {
59007 quantifier = createQuantifier(0, 1);
59008 } else if (res = matchReg(/^\{([0-9]+)\}/)) {
59009 min = parseInt(res[1], 10);
59010 quantifier = createQuantifier(min, min, res.range[0], res.range[1]);
59011 } else if (res = matchReg(/^\{([0-9]+),\}/)) {
59012 min = parseInt(res[1], 10);
59013 quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]);
59014 } else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) {
59015 min = parseInt(res[1], 10);
59016 max = parseInt(res[2], 10);
59017 if (min > max) {
59018 bail('numbers out of order in {} quantifier', '', from, pos);
59019 }
59020 quantifier = createQuantifier(min, max, res.range[0], res.range[1]);
59021 }
59022
59023 if (quantifier) {
59024 if (match('?')) {
59025 quantifier.greedy = false;
59026 quantifier.range[1] += 1;
59027 }
59028 }
59029
59030 return quantifier;
59031 }
59032
59033 function parseAtom() {
59034 // Atom ::
59035 // PatternCharacter
59036 // .
59037 // \ AtomEscape
59038 // CharacterClass
59039 // ( Disjunction )
59040 // ( ? : Disjunction )
59041
59042 var res;
59043
59044 // jviereck: allow ']', '}' here as well to be compatible with browser's
59045 // implementations: ']'.match(/]/);
59046 // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) {
59047 if (res = matchReg(/^[^^$\\.*+?(){[|]/)) {
59048 // PatternCharacter
59049 return createCharacter(res);
59050 } else if (match('.')) {
59051 // .
59052 return createDot();
59053 } else if (match('\\')) {
59054 // \ AtomEscape
59055 res = parseAtomEscape();
59056 if (!res) {
59057 bail('atomEscape');
59058 }
59059 return res;
59060 } else if (res = parseCharacterClass()) {
59061 return res;
59062 } else {
59063 // ( Disjunction )
59064 // ( ? : Disjunction )
59065 return parseGroup('(?:', 'ignore', '(', 'normal');
59066 }
59067 }
59068
59069 function parseUnicodeSurrogatePairEscape(firstEscape) {
59070 if (hasUnicodeFlag) {
59071 var first, second;
59072 if (firstEscape.kind == 'unicodeEscape' && (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && current('\\') && next('u')) {
59073 var prevPos = pos;
59074 pos++;
59075 var secondEscape = parseClassEscape();
59076 if (secondEscape.kind == 'unicodeEscape' && (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) {
59077 // Unicode surrogate pair
59078 firstEscape.range[1] = secondEscape.range[1];
59079 firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
59080 firstEscape.type = 'value';
59081 firstEscape.kind = 'unicodeCodePointEscape';
59082 addRaw(firstEscape);
59083 } else {
59084 pos = prevPos;
59085 }
59086 }
59087 }
59088 return firstEscape;
59089 }
59090
59091 function parseClassEscape() {
59092 return parseAtomEscape(true);
59093 }
59094
59095 function parseAtomEscape(insideCharacterClass) {
59096 // AtomEscape ::
59097 // DecimalEscape
59098 // CharacterEscape
59099 // CharacterClassEscape
59100
59101 var res,
59102 from = pos;
59103
59104 res = parseDecimalEscape();
59105 if (res) {
59106 return res;
59107 }
59108
59109 // For ClassEscape
59110 if (insideCharacterClass) {
59111 if (match('b')) {
59112 // 15.10.2.19
59113 // The production ClassEscape :: b evaluates by returning the
59114 // CharSet containing the one character <BS> (Unicode value 0008).
59115 return createEscaped('singleEscape', 0x0008, '\\b');
59116 } else if (match('B')) {
59117 bail('\\B not possible inside of CharacterClass', '', from);
59118 }
59119 }
59120
59121 res = parseCharacterEscape();
59122
59123 return res;
59124 }
59125
59126 function parseDecimalEscape() {
59127 // DecimalEscape ::
59128 // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]
59129 // CharacterClassEscape :: one of d D s S w W
59130
59131 var res, match;
59132
59133 if (res = matchReg(/^(?!0)\d+/)) {
59134 match = res[0];
59135 var refIdx = parseInt(res[0], 10);
59136 if (refIdx <= closedCaptureCounter) {
59137 // If the number is smaller than the normal-groups found so
59138 // far, then it is a reference...
59139 return createReference(res[0]);
59140 } else {
59141 // ... otherwise it needs to be interpreted as a octal (if the
59142 // number is in an octal format). If it is NOT octal format,
59143 // then the slash is ignored and the number is matched later
59144 // as normal characters.
59145
59146 // Recall the negative decision to decide if the input must be parsed
59147 // a second time with the total normal-groups.
59148 backrefDenied.push(refIdx);
59149
59150 // Reset the position again, as maybe only parts of the previous
59151 // matched numbers are actual octal numbers. E.g. in '019' only
59152 // the '01' should be matched.
59153 incr(-res[0].length);
59154 if (res = matchReg(/^[0-7]{1,3}/)) {
59155 return createEscaped('octal', parseInt(res[0], 8), res[0], 1);
59156 } else {
59157 // If we end up here, we have a case like /\91/. Then the
59158 // first slash is to be ignored and the 9 & 1 to be treated
59159 // like ordinary characters. Create a character for the
59160 // first number only here - other number-characters
59161 // (if available) will be matched later.
59162 res = createCharacter(matchReg(/^[89]/));
59163 return updateRawStart(res, res.range[0] - 1);
59164 }
59165 }
59166 }
59167 // Only allow octal numbers in the following. All matched numbers start
59168 // with a zero (if the do not, the previous if-branch is executed).
59169 // If the number is not octal format and starts with zero (e.g. `091`)
59170 // then only the zeros `0` is treated here and the `91` are ordinary
59171 // characters.
59172 // Example:
59173 // /\091/.exec('\091')[0].length === 3
59174 else if (res = matchReg(/^[0-7]{1,3}/)) {
59175 match = res[0];
59176 if (/^0{1,3}$/.test(match)) {
59177 // If they are all zeros, then only take the first one.
59178 return createEscaped('null', 0x0000, '0', match.length + 1);
59179 } else {
59180 return createEscaped('octal', parseInt(match, 8), match, 1);
59181 }
59182 } else if (res = matchReg(/^[dDsSwW]/)) {
59183 return createCharacterClassEscape(res[0]);
59184 }
59185 return false;
59186 }
59187
59188 function parseCharacterEscape() {
59189 // CharacterEscape ::
59190 // ControlEscape
59191 // c ControlLetter
59192 // HexEscapeSequence
59193 // UnicodeEscapeSequence
59194 // IdentityEscape
59195
59196 var res;
59197 if (res = matchReg(/^[fnrtv]/)) {
59198 // ControlEscape
59199 var codePoint = 0;
59200 switch (res[0]) {
59201 case 't':
59202 codePoint = 0x009;break;
59203 case 'n':
59204 codePoint = 0x00A;break;
59205 case 'v':
59206 codePoint = 0x00B;break;
59207 case 'f':
59208 codePoint = 0x00C;break;
59209 case 'r':
59210 codePoint = 0x00D;break;
59211 }
59212 return createEscaped('singleEscape', codePoint, '\\' + res[0]);
59213 } else if (res = matchReg(/^c([a-zA-Z])/)) {
59214 // c ControlLetter
59215 return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2);
59216 } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) {
59217 // HexEscapeSequence
59218 return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2);
59219 } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) {
59220 // UnicodeEscapeSequence
59221 return parseUnicodeSurrogatePairEscape(createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2));
59222 } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) {
59223 // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape)
59224 return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4);
59225 } else {
59226 // IdentityEscape
59227 return parseIdentityEscape();
59228 }
59229 }
59230
59231 // Taken from the Esprima parser.
59232 function isIdentifierPart(ch) {
59233 // Generated by `tools/generate-identifier-regex.js`.
59234 var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]');
59235
59236 return ch === 36 || ch === 95 || // $ (dollar) and _ (underscore)
59237 ch >= 65 && ch <= 90 || // A..Z
59238 ch >= 97 && ch <= 122 || // a..z
59239 ch >= 48 && ch <= 57 || // 0..9
59240 ch === 92 || // \ (backslash)
59241 ch >= 0x80 && NonAsciiIdentifierPart.test(String.fromCharCode(ch));
59242 }
59243
59244 function parseIdentityEscape() {
59245 // IdentityEscape ::
59246 // SourceCharacter but not IdentifierPart
59247 // <ZWJ>
59248 // <ZWNJ>
59249
59250 var ZWJ = '\u200C';
59251 var ZWNJ = '\u200D';
59252
59253 var tmp;
59254
59255 if (!isIdentifierPart(lookahead())) {
59256 tmp = incr();
59257 return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);
59258 }
59259
59260 if (match(ZWJ)) {
59261 // <ZWJ>
59262 return createEscaped('identifier', 0x200C, ZWJ);
59263 } else if (match(ZWNJ)) {
59264 // <ZWNJ>
59265 return createEscaped('identifier', 0x200D, ZWNJ);
59266 }
59267
59268 return null;
59269 }
59270
59271 function parseCharacterClass() {
59272 // CharacterClass ::
59273 // [ [lookahead ∉ {^}] ClassRanges ]
59274 // [ ^ ClassRanges ]
59275
59276 var res,
59277 from = pos;
59278 if (res = matchReg(/^\[\^/)) {
59279 res = parseClassRanges();
59280 skip(']');
59281 return createCharacterClass(res, true, from, pos);
59282 } else if (match('[')) {
59283 res = parseClassRanges();
59284 skip(']');
59285 return createCharacterClass(res, false, from, pos);
59286 }
59287
59288 return null;
59289 }
59290
59291 function parseClassRanges() {
59292 // ClassRanges ::
59293 // [empty]
59294 // NonemptyClassRanges
59295
59296 var res;
59297 if (current(']')) {
59298 // Empty array means nothing insinde of the ClassRange.
59299 return [];
59300 } else {
59301 res = parseNonemptyClassRanges();
59302 if (!res) {
59303 bail('nonEmptyClassRanges');
59304 }
59305 return res;
59306 }
59307 }
59308
59309 function parseHelperClassRanges(atom) {
59310 var from, to, res;
59311 if (current('-') && !next(']')) {
59312 // ClassAtom - ClassAtom ClassRanges
59313 skip('-');
59314
59315 res = parseClassAtom();
59316 if (!res) {
59317 bail('classAtom');
59318 }
59319 to = pos;
59320 var classRanges = parseClassRanges();
59321 if (!classRanges) {
59322 bail('classRanges');
59323 }
59324 from = atom.range[0];
59325 if (classRanges.type === 'empty') {
59326 return [createClassRange(atom, res, from, to)];
59327 }
59328 return [createClassRange(atom, res, from, to)].concat(classRanges);
59329 }
59330
59331 res = parseNonemptyClassRangesNoDash();
59332 if (!res) {
59333 bail('nonEmptyClassRangesNoDash');
59334 }
59335
59336 return [atom].concat(res);
59337 }
59338
59339 function parseNonemptyClassRanges() {
59340 // NonemptyClassRanges ::
59341 // ClassAtom
59342 // ClassAtom NonemptyClassRangesNoDash
59343 // ClassAtom - ClassAtom ClassRanges
59344
59345 var atom = parseClassAtom();
59346 if (!atom) {
59347 bail('classAtom');
59348 }
59349
59350 if (current(']')) {
59351 // ClassAtom
59352 return [atom];
59353 }
59354
59355 // ClassAtom NonemptyClassRangesNoDash
59356 // ClassAtom - ClassAtom ClassRanges
59357 return parseHelperClassRanges(atom);
59358 }
59359
59360 function parseNonemptyClassRangesNoDash() {
59361 // NonemptyClassRangesNoDash ::
59362 // ClassAtom
59363 // ClassAtomNoDash NonemptyClassRangesNoDash
59364 // ClassAtomNoDash - ClassAtom ClassRanges
59365
59366 var res = parseClassAtom();
59367 if (!res) {
59368 bail('classAtom');
59369 }
59370 if (current(']')) {
59371 // ClassAtom
59372 return res;
59373 }
59374
59375 // ClassAtomNoDash NonemptyClassRangesNoDash
59376 // ClassAtomNoDash - ClassAtom ClassRanges
59377 return parseHelperClassRanges(res);
59378 }
59379
59380 function parseClassAtom() {
59381 // ClassAtom ::
59382 // -
59383 // ClassAtomNoDash
59384 if (match('-')) {
59385 return createCharacter('-');
59386 } else {
59387 return parseClassAtomNoDash();
59388 }
59389 }
59390
59391 function parseClassAtomNoDash() {
59392 // ClassAtomNoDash ::
59393 // SourceCharacter but not one of \ or ] or -
59394 // \ ClassEscape
59395
59396 var res;
59397 if (res = matchReg(/^[^\\\]-]/)) {
59398 return createCharacter(res[0]);
59399 } else if (match('\\')) {
59400 res = parseClassEscape();
59401 if (!res) {
59402 bail('classEscape');
59403 }
59404
59405 return parseUnicodeSurrogatePairEscape(res);
59406 }
59407 }
59408
59409 function bail(message, details, from, to) {
59410 from = from == null ? pos : from;
59411 to = to == null ? from : to;
59412
59413 var contextStart = Math.max(0, from - 10);
59414 var contextEnd = Math.min(to + 10, str.length);
59415
59416 // Output a bit of context and a line pointing to where our error is.
59417 //
59418 // We are assuming that there are no actual newlines in the content as this is a regular expression.
59419 var context = ' ' + str.substring(contextStart, contextEnd);
59420 var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^';
59421
59422 throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\n' + context + '\n' + pointer);
59423 }
59424
59425 var backrefDenied = [];
59426 var closedCaptureCounter = 0;
59427 var firstIteration = true;
59428 var hasUnicodeFlag = (flags || "").indexOf("u") !== -1;
59429 var pos = 0;
59430
59431 // Convert the input to a string and treat the empty string special.
59432 str = String(str);
59433 if (str === '') {
59434 str = '(?:)';
59435 }
59436
59437 var result = parseDisjunction();
59438
59439 if (result.range[1] !== str.length) {
59440 bail('Could not parse entire input - got stuck', '', result.range[1]);
59441 }
59442
59443 // The spec requires to interpret the `\2` in `/\2()()/` as backreference.
59444 // As the parser collects the number of capture groups as the string is
59445 // parsed it is impossible to make these decisions at the point when the
59446 // `\2` is handled. In case the local decision turns out to be wrong after
59447 // the parsing has finished, the input string is parsed a second time with
59448 // the total number of capture groups set.
59449 //
59450 // SEE: https://github.com/jviereck/regjsparser/issues/70
59451 for (var i = 0; i < backrefDenied.length; i++) {
59452 if (backrefDenied[i] <= closedCaptureCounter) {
59453 // Parse the input a second time.
59454 pos = 0;
59455 firstIteration = false;
59456 return parseDisjunction();
59457 }
59458 }
59459
59460 return result;
59461 }
59462
59463 var regjsparser = {
59464 parse: parse
59465 };
59466
59467 if (typeof module !== 'undefined' && module.exports) {
59468 module.exports = regjsparser;
59469 } else {
59470 window.regjsparser = regjsparser;
59471 }
59472 })();
59473
59474/***/ }),
59475/* 615 */
59476/***/ (function(module, exports, __webpack_require__) {
59477
59478 'use strict';
59479
59480 var isFinite = __webpack_require__(467);
59481
59482 module.exports = function (str, n) {
59483 if (typeof str !== 'string') {
59484 throw new TypeError('Expected `input` to be a string');
59485 }
59486
59487 if (n < 0 || !isFinite(n)) {
59488 throw new TypeError('Expected `count` to be a positive finite number');
59489 }
59490
59491 var ret = '';
59492
59493 do {
59494 if (n & 1) {
59495 ret += str;
59496 }
59497
59498 str += str;
59499 } while (n >>= 1);
59500
59501 return ret;
59502 };
59503
59504/***/ }),
59505/* 616 */
59506/***/ (function(module, exports) {
59507
59508 'use strict';
59509
59510 /* -*- Mode: js; js-indent-level: 2; -*- */
59511 /*
59512 * Copyright 2011 Mozilla Foundation and contributors
59513 * Licensed under the New BSD license. See LICENSE or:
59514 * http://opensource.org/licenses/BSD-3-Clause
59515 */
59516
59517 var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
59518
59519 /**
59520 * Encode an integer in the range of 0 to 63 to a single base 64 digit.
59521 */
59522 exports.encode = function (number) {
59523 if (0 <= number && number < intToCharMap.length) {
59524 return intToCharMap[number];
59525 }
59526 throw new TypeError("Must be between 0 and 63: " + number);
59527 };
59528
59529 /**
59530 * Decode a single base 64 character code digit to an integer. Returns -1 on
59531 * failure.
59532 */
59533 exports.decode = function (charCode) {
59534 var bigA = 65; // 'A'
59535 var bigZ = 90; // 'Z'
59536
59537 var littleA = 97; // 'a'
59538 var littleZ = 122; // 'z'
59539
59540 var zero = 48; // '0'
59541 var nine = 57; // '9'
59542
59543 var plus = 43; // '+'
59544 var slash = 47; // '/'
59545
59546 var littleOffset = 26;
59547 var numberOffset = 52;
59548
59549 // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
59550 if (bigA <= charCode && charCode <= bigZ) {
59551 return charCode - bigA;
59552 }
59553
59554 // 26 - 51: abcdefghijklmnopqrstuvwxyz
59555 if (littleA <= charCode && charCode <= littleZ) {
59556 return charCode - littleA + littleOffset;
59557 }
59558
59559 // 52 - 61: 0123456789
59560 if (zero <= charCode && charCode <= nine) {
59561 return charCode - zero + numberOffset;
59562 }
59563
59564 // 62: +
59565 if (charCode == plus) {
59566 return 62;
59567 }
59568
59569 // 63: /
59570 if (charCode == slash) {
59571 return 63;
59572 }
59573
59574 // Invalid base64 digit.
59575 return -1;
59576 };
59577
59578/***/ }),
59579/* 617 */
59580/***/ (function(module, exports) {
59581
59582 "use strict";
59583
59584 /* -*- Mode: js; js-indent-level: 2; -*- */
59585 /*
59586 * Copyright 2011 Mozilla Foundation and contributors
59587 * Licensed under the New BSD license. See LICENSE or:
59588 * http://opensource.org/licenses/BSD-3-Clause
59589 */
59590
59591 exports.GREATEST_LOWER_BOUND = 1;
59592 exports.LEAST_UPPER_BOUND = 2;
59593
59594 /**
59595 * Recursive implementation of binary search.
59596 *
59597 * @param aLow Indices here and lower do not contain the needle.
59598 * @param aHigh Indices here and higher do not contain the needle.
59599 * @param aNeedle The element being searched for.
59600 * @param aHaystack The non-empty array being searched.
59601 * @param aCompare Function which takes two elements and returns -1, 0, or 1.
59602 * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
59603 * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
59604 * closest element that is smaller than or greater than the one we are
59605 * searching for, respectively, if the exact element cannot be found.
59606 */
59607 function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
59608 // This function terminates when one of the following is true:
59609 //
59610 // 1. We find the exact element we are looking for.
59611 //
59612 // 2. We did not find the exact element, but we can return the index of
59613 // the next-closest element.
59614 //
59615 // 3. We did not find the exact element, and there is no next-closest
59616 // element than the one we are searching for, so we return -1.
59617 var mid = Math.floor((aHigh - aLow) / 2) + aLow;
59618 var cmp = aCompare(aNeedle, aHaystack[mid], true);
59619 if (cmp === 0) {
59620 // Found the element we are looking for.
59621 return mid;
59622 } else if (cmp > 0) {
59623 // Our needle is greater than aHaystack[mid].
59624 if (aHigh - mid > 1) {
59625 // The element is in the upper half.
59626 return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
59627 }
59628
59629 // The exact needle element was not found in this haystack. Determine if
59630 // we are in termination case (3) or (2) and return the appropriate thing.
59631 if (aBias == exports.LEAST_UPPER_BOUND) {
59632 return aHigh < aHaystack.length ? aHigh : -1;
59633 } else {
59634 return mid;
59635 }
59636 } else {
59637 // Our needle is less than aHaystack[mid].
59638 if (mid - aLow > 1) {
59639 // The element is in the lower half.
59640 return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
59641 }
59642
59643 // we are in termination case (3) or (2) and return the appropriate thing.
59644 if (aBias == exports.LEAST_UPPER_BOUND) {
59645 return mid;
59646 } else {
59647 return aLow < 0 ? -1 : aLow;
59648 }
59649 }
59650 }
59651
59652 /**
59653 * This is an implementation of binary search which will always try and return
59654 * the index of the closest element if there is no exact hit. This is because
59655 * mappings between original and generated line/col pairs are single points,
59656 * and there is an implicit region between each of them, so a miss just means
59657 * that you aren't on the very start of a region.
59658 *
59659 * @param aNeedle The element you are looking for.
59660 * @param aHaystack The array that is being searched.
59661 * @param aCompare A function which takes the needle and an element in the
59662 * array and returns -1, 0, or 1 depending on whether the needle is less
59663 * than, equal to, or greater than the element, respectively.
59664 * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
59665 * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
59666 * closest element that is smaller than or greater than the one we are
59667 * searching for, respectively, if the exact element cannot be found.
59668 * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
59669 */
59670 exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
59671 if (aHaystack.length === 0) {
59672 return -1;
59673 }
59674
59675 var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
59676 if (index < 0) {
59677 return -1;
59678 }
59679
59680 // We have found either the exact element, or the next-closest element than
59681 // the one we are searching for. However, there may be more than one such
59682 // element. Make sure we always return the smallest of these.
59683 while (index - 1 >= 0) {
59684 if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
59685 break;
59686 }
59687 --index;
59688 }
59689
59690 return index;
59691 };
59692
59693/***/ }),
59694/* 618 */
59695/***/ (function(module, exports, __webpack_require__) {
59696
59697 'use strict';
59698
59699 /* -*- Mode: js; js-indent-level: 2; -*- */
59700 /*
59701 * Copyright 2014 Mozilla Foundation and contributors
59702 * Licensed under the New BSD license. See LICENSE or:
59703 * http://opensource.org/licenses/BSD-3-Clause
59704 */
59705
59706 var util = __webpack_require__(63);
59707
59708 /**
59709 * Determine whether mappingB is after mappingA with respect to generated
59710 * position.
59711 */
59712 function generatedPositionAfter(mappingA, mappingB) {
59713 // Optimized for most common case
59714 var lineA = mappingA.generatedLine;
59715 var lineB = mappingB.generatedLine;
59716 var columnA = mappingA.generatedColumn;
59717 var columnB = mappingB.generatedColumn;
59718 return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
59719 }
59720
59721 /**
59722 * A data structure to provide a sorted view of accumulated mappings in a
59723 * performance conscious manner. It trades a neglibable overhead in general
59724 * case for a large speedup in case of mappings being added in order.
59725 */
59726 function MappingList() {
59727 this._array = [];
59728 this._sorted = true;
59729 // Serves as infimum
59730 this._last = { generatedLine: -1, generatedColumn: 0 };
59731 }
59732
59733 /**
59734 * Iterate through internal items. This method takes the same arguments that
59735 * `Array.prototype.forEach` takes.
59736 *
59737 * NOTE: The order of the mappings is NOT guaranteed.
59738 */
59739 MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
59740 this._array.forEach(aCallback, aThisArg);
59741 };
59742
59743 /**
59744 * Add the given source mapping.
59745 *
59746 * @param Object aMapping
59747 */
59748 MappingList.prototype.add = function MappingList_add(aMapping) {
59749 if (generatedPositionAfter(this._last, aMapping)) {
59750 this._last = aMapping;
59751 this._array.push(aMapping);
59752 } else {
59753 this._sorted = false;
59754 this._array.push(aMapping);
59755 }
59756 };
59757
59758 /**
59759 * Returns the flat, sorted array of mappings. The mappings are sorted by
59760 * generated position.
59761 *
59762 * WARNING: This method returns internal data without copying, for
59763 * performance. The return value must NOT be mutated, and should be treated as
59764 * an immutable borrow. If you want to take ownership, you must make your own
59765 * copy.
59766 */
59767 MappingList.prototype.toArray = function MappingList_toArray() {
59768 if (!this._sorted) {
59769 this._array.sort(util.compareByGeneratedPositionsInflated);
59770 this._sorted = true;
59771 }
59772 return this._array;
59773 };
59774
59775 exports.MappingList = MappingList;
59776
59777/***/ }),
59778/* 619 */
59779/***/ (function(module, exports) {
59780
59781 "use strict";
59782
59783 /* -*- Mode: js; js-indent-level: 2; -*- */
59784 /*
59785 * Copyright 2011 Mozilla Foundation and contributors
59786 * Licensed under the New BSD license. See LICENSE or:
59787 * http://opensource.org/licenses/BSD-3-Clause
59788 */
59789
59790 // It turns out that some (most?) JavaScript engines don't self-host
59791 // `Array.prototype.sort`. This makes sense because C++ will likely remain
59792 // faster than JS when doing raw CPU-intensive sorting. However, when using a
59793 // custom comparator function, calling back and forth between the VM's C++ and
59794 // JIT'd JS is rather slow *and* loses JIT type information, resulting in
59795 // worse generated code for the comparator function than would be optimal. In
59796 // fact, when sorting with a comparator, these costs outweigh the benefits of
59797 // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
59798 // a ~3500ms mean speed-up in `bench/bench.html`.
59799
59800 /**
59801 * Swap the elements indexed by `x` and `y` in the array `ary`.
59802 *
59803 * @param {Array} ary
59804 * The array.
59805 * @param {Number} x
59806 * The index of the first item.
59807 * @param {Number} y
59808 * The index of the second item.
59809 */
59810 function swap(ary, x, y) {
59811 var temp = ary[x];
59812 ary[x] = ary[y];
59813 ary[y] = temp;
59814 }
59815
59816 /**
59817 * Returns a random integer within the range `low .. high` inclusive.
59818 *
59819 * @param {Number} low
59820 * The lower bound on the range.
59821 * @param {Number} high
59822 * The upper bound on the range.
59823 */
59824 function randomIntInRange(low, high) {
59825 return Math.round(low + Math.random() * (high - low));
59826 }
59827
59828 /**
59829 * The Quick Sort algorithm.
59830 *
59831 * @param {Array} ary
59832 * An array to sort.
59833 * @param {function} comparator
59834 * Function to use to compare two items.
59835 * @param {Number} p
59836 * Start index of the array
59837 * @param {Number} r
59838 * End index of the array
59839 */
59840 function doQuickSort(ary, comparator, p, r) {
59841 // If our lower bound is less than our upper bound, we (1) partition the
59842 // array into two pieces and (2) recurse on each half. If it is not, this is
59843 // the empty array and our base case.
59844
59845 if (p < r) {
59846 // (1) Partitioning.
59847 //
59848 // The partitioning chooses a pivot between `p` and `r` and moves all
59849 // elements that are less than or equal to the pivot to the before it, and
59850 // all the elements that are greater than it after it. The effect is that
59851 // once partition is done, the pivot is in the exact place it will be when
59852 // the array is put in sorted order, and it will not need to be moved
59853 // again. This runs in O(n) time.
59854
59855 // Always choose a random pivot so that an input array which is reverse
59856 // sorted does not cause O(n^2) running time.
59857 var pivotIndex = randomIntInRange(p, r);
59858 var i = p - 1;
59859
59860 swap(ary, pivotIndex, r);
59861 var pivot = ary[r];
59862
59863 // Immediately after `j` is incremented in this loop, the following hold
59864 // true:
59865 //
59866 // * Every element in `ary[p .. i]` is less than or equal to the pivot.
59867 //
59868 // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
59869 for (var j = p; j < r; j++) {
59870 if (comparator(ary[j], pivot) <= 0) {
59871 i += 1;
59872 swap(ary, i, j);
59873 }
59874 }
59875
59876 swap(ary, i + 1, j);
59877 var q = i + 1;
59878
59879 // (2) Recurse on each half.
59880
59881 doQuickSort(ary, comparator, p, q - 1);
59882 doQuickSort(ary, comparator, q + 1, r);
59883 }
59884 }
59885
59886 /**
59887 * Sort the given array in-place with the given comparator function.
59888 *
59889 * @param {Array} ary
59890 * An array to sort.
59891 * @param {function} comparator
59892 * Function to use to compare two items.
59893 */
59894 exports.quickSort = function (ary, comparator) {
59895 doQuickSort(ary, comparator, 0, ary.length - 1);
59896 };
59897
59898/***/ }),
59899/* 620 */
59900/***/ (function(module, exports, __webpack_require__) {
59901
59902 'use strict';
59903
59904 /* -*- Mode: js; js-indent-level: 2; -*- */
59905 /*
59906 * Copyright 2011 Mozilla Foundation and contributors
59907 * Licensed under the New BSD license. See LICENSE or:
59908 * http://opensource.org/licenses/BSD-3-Clause
59909 */
59910
59911 var util = __webpack_require__(63);
59912 var binarySearch = __webpack_require__(617);
59913 var ArraySet = __webpack_require__(285).ArraySet;
59914 var base64VLQ = __webpack_require__(286);
59915 var quickSort = __webpack_require__(619).quickSort;
59916
59917 function SourceMapConsumer(aSourceMap) {
59918 var sourceMap = aSourceMap;
59919 if (typeof aSourceMap === 'string') {
59920 sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
59921 }
59922
59923 return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap);
59924 }
59925
59926 SourceMapConsumer.fromSourceMap = function (aSourceMap) {
59927 return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
59928 };
59929
59930 /**
59931 * The version of the source mapping spec that we are consuming.
59932 */
59933 SourceMapConsumer.prototype._version = 3;
59934
59935 // `__generatedMappings` and `__originalMappings` are arrays that hold the
59936 // parsed mapping coordinates from the source map's "mappings" attribute. They
59937 // are lazily instantiated, accessed via the `_generatedMappings` and
59938 // `_originalMappings` getters respectively, and we only parse the mappings
59939 // and create these arrays once queried for a source location. We jump through
59940 // these hoops because there can be many thousands of mappings, and parsing
59941 // them is expensive, so we only want to do it if we must.
59942 //
59943 // Each object in the arrays is of the form:
59944 //
59945 // {
59946 // generatedLine: The line number in the generated code,
59947 // generatedColumn: The column number in the generated code,
59948 // source: The path to the original source file that generated this
59949 // chunk of code,
59950 // originalLine: The line number in the original source that
59951 // corresponds to this chunk of generated code,
59952 // originalColumn: The column number in the original source that
59953 // corresponds to this chunk of generated code,
59954 // name: The name of the original symbol which generated this chunk of
59955 // code.
59956 // }
59957 //
59958 // All properties except for `generatedLine` and `generatedColumn` can be
59959 // `null`.
59960 //
59961 // `_generatedMappings` is ordered by the generated positions.
59962 //
59963 // `_originalMappings` is ordered by the original positions.
59964
59965 SourceMapConsumer.prototype.__generatedMappings = null;
59966 Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
59967 get: function get() {
59968 if (!this.__generatedMappings) {
59969 this._parseMappings(this._mappings, this.sourceRoot);
59970 }
59971
59972 return this.__generatedMappings;
59973 }
59974 });
59975
59976 SourceMapConsumer.prototype.__originalMappings = null;
59977 Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
59978 get: function get() {
59979 if (!this.__originalMappings) {
59980 this._parseMappings(this._mappings, this.sourceRoot);
59981 }
59982
59983 return this.__originalMappings;
59984 }
59985 });
59986
59987 SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
59988 var c = aStr.charAt(index);
59989 return c === ";" || c === ",";
59990 };
59991
59992 /**
59993 * Parse the mappings in a string in to a data structure which we can easily
59994 * query (the ordered arrays in the `this.__generatedMappings` and
59995 * `this.__originalMappings` properties).
59996 */
59997 SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
59998 throw new Error("Subclasses must implement _parseMappings");
59999 };
60000
60001 SourceMapConsumer.GENERATED_ORDER = 1;
60002 SourceMapConsumer.ORIGINAL_ORDER = 2;
60003
60004 SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
60005 SourceMapConsumer.LEAST_UPPER_BOUND = 2;
60006
60007 /**
60008 * Iterate over each mapping between an original source/line/column and a
60009 * generated line/column in this source map.
60010 *
60011 * @param Function aCallback
60012 * The function that is called with each mapping.
60013 * @param Object aContext
60014 * Optional. If specified, this object will be the value of `this` every
60015 * time that `aCallback` is called.
60016 * @param aOrder
60017 * Either `SourceMapConsumer.GENERATED_ORDER` or
60018 * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
60019 * iterate over the mappings sorted by the generated file's line/column
60020 * order or the original's source/line/column order, respectively. Defaults to
60021 * `SourceMapConsumer.GENERATED_ORDER`.
60022 */
60023 SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
60024 var context = aContext || null;
60025 var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
60026
60027 var mappings;
60028 switch (order) {
60029 case SourceMapConsumer.GENERATED_ORDER:
60030 mappings = this._generatedMappings;
60031 break;
60032 case SourceMapConsumer.ORIGINAL_ORDER:
60033 mappings = this._originalMappings;
60034 break;
60035 default:
60036 throw new Error("Unknown order of iteration.");
60037 }
60038
60039 var sourceRoot = this.sourceRoot;
60040 mappings.map(function (mapping) {
60041 var source = mapping.source === null ? null : this._sources.at(mapping.source);
60042 if (source != null && sourceRoot != null) {
60043 source = util.join(sourceRoot, source);
60044 }
60045 return {
60046 source: source,
60047 generatedLine: mapping.generatedLine,
60048 generatedColumn: mapping.generatedColumn,
60049 originalLine: mapping.originalLine,
60050 originalColumn: mapping.originalColumn,
60051 name: mapping.name === null ? null : this._names.at(mapping.name)
60052 };
60053 }, this).forEach(aCallback, context);
60054 };
60055
60056 /**
60057 * Returns all generated line and column information for the original source,
60058 * line, and column provided. If no column is provided, returns all mappings
60059 * corresponding to a either the line we are searching for or the next
60060 * closest line that has any mappings. Otherwise, returns all mappings
60061 * corresponding to the given line and either the column we are searching for
60062 * or the next closest column that has any offsets.
60063 *
60064 * The only argument is an object with the following properties:
60065 *
60066 * - source: The filename of the original source.
60067 * - line: The line number in the original source.
60068 * - column: Optional. the column number in the original source.
60069 *
60070 * and an array of objects is returned, each with the following properties:
60071 *
60072 * - line: The line number in the generated source, or null.
60073 * - column: The column number in the generated source, or null.
60074 */
60075 SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
60076 var line = util.getArg(aArgs, 'line');
60077
60078 // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
60079 // returns the index of the closest mapping less than the needle. By
60080 // setting needle.originalColumn to 0, we thus find the last mapping for
60081 // the given line, provided such a mapping exists.
60082 var needle = {
60083 source: util.getArg(aArgs, 'source'),
60084 originalLine: line,
60085 originalColumn: util.getArg(aArgs, 'column', 0)
60086 };
60087
60088 if (this.sourceRoot != null) {
60089 needle.source = util.relative(this.sourceRoot, needle.source);
60090 }
60091 if (!this._sources.has(needle.source)) {
60092 return [];
60093 }
60094 needle.source = this._sources.indexOf(needle.source);
60095
60096 var mappings = [];
60097
60098 var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
60099 if (index >= 0) {
60100 var mapping = this._originalMappings[index];
60101
60102 if (aArgs.column === undefined) {
60103 var originalLine = mapping.originalLine;
60104
60105 // Iterate until either we run out of mappings, or we run into
60106 // a mapping for a different line than the one we found. Since
60107 // mappings are sorted, this is guaranteed to find all mappings for
60108 // the line we found.
60109 while (mapping && mapping.originalLine === originalLine) {
60110 mappings.push({
60111 line: util.getArg(mapping, 'generatedLine', null),
60112 column: util.getArg(mapping, 'generatedColumn', null),
60113 lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
60114 });
60115
60116 mapping = this._originalMappings[++index];
60117 }
60118 } else {
60119 var originalColumn = mapping.originalColumn;
60120
60121 // Iterate until either we run out of mappings, or we run into
60122 // a mapping for a different line than the one we were searching for.
60123 // Since mappings are sorted, this is guaranteed to find all mappings for
60124 // the line we are searching for.
60125 while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
60126 mappings.push({
60127 line: util.getArg(mapping, 'generatedLine', null),
60128 column: util.getArg(mapping, 'generatedColumn', null),
60129 lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
60130 });
60131
60132 mapping = this._originalMappings[++index];
60133 }
60134 }
60135 }
60136
60137 return mappings;
60138 };
60139
60140 exports.SourceMapConsumer = SourceMapConsumer;
60141
60142 /**
60143 * A BasicSourceMapConsumer instance represents a parsed source map which we can
60144 * query for information about the original file positions by giving it a file
60145 * position in the generated source.
60146 *
60147 * The only parameter is the raw source map (either as a JSON string, or
60148 * already parsed to an object). According to the spec, source maps have the
60149 * following attributes:
60150 *
60151 * - version: Which version of the source map spec this map is following.
60152 * - sources: An array of URLs to the original source files.
60153 * - names: An array of identifiers which can be referrenced by individual mappings.
60154 * - sourceRoot: Optional. The URL root from which all sources are relative.
60155 * - sourcesContent: Optional. An array of contents of the original source files.
60156 * - mappings: A string of base64 VLQs which contain the actual mappings.
60157 * - file: Optional. The generated file this source map is associated with.
60158 *
60159 * Here is an example source map, taken from the source map spec[0]:
60160 *
60161 * {
60162 * version : 3,
60163 * file: "out.js",
60164 * sourceRoot : "",
60165 * sources: ["foo.js", "bar.js"],
60166 * names: ["src", "maps", "are", "fun"],
60167 * mappings: "AA,AB;;ABCDE;"
60168 * }
60169 *
60170 * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
60171 */
60172 function BasicSourceMapConsumer(aSourceMap) {
60173 var sourceMap = aSourceMap;
60174 if (typeof aSourceMap === 'string') {
60175 sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
60176 }
60177
60178 var version = util.getArg(sourceMap, 'version');
60179 var sources = util.getArg(sourceMap, 'sources');
60180 // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
60181 // requires the array) to play nice here.
60182 var names = util.getArg(sourceMap, 'names', []);
60183 var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
60184 var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
60185 var mappings = util.getArg(sourceMap, 'mappings');
60186 var file = util.getArg(sourceMap, 'file', null);
60187
60188 // Once again, Sass deviates from the spec and supplies the version as a
60189 // string rather than a number, so we use loose equality checking here.
60190 if (version != this._version) {
60191 throw new Error('Unsupported version: ' + version);
60192 }
60193
60194 sources = sources.map(String)
60195 // Some source maps produce relative source paths like "./foo.js" instead of
60196 // "foo.js". Normalize these first so that future comparisons will succeed.
60197 // See bugzil.la/1090768.
60198 .map(util.normalize)
60199 // Always ensure that absolute sources are internally stored relative to
60200 // the source root, if the source root is absolute. Not doing this would
60201 // be particularly problematic when the source root is a prefix of the
60202 // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
60203 .map(function (source) {
60204 return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
60205 });
60206
60207 // Pass `true` below to allow duplicate names and sources. While source maps
60208 // are intended to be compressed and deduplicated, the TypeScript compiler
60209 // sometimes generates source maps with duplicates in them. See Github issue
60210 // #72 and bugzil.la/889492.
60211 this._names = ArraySet.fromArray(names.map(String), true);
60212 this._sources = ArraySet.fromArray(sources, true);
60213
60214 this.sourceRoot = sourceRoot;
60215 this.sourcesContent = sourcesContent;
60216 this._mappings = mappings;
60217 this.file = file;
60218 }
60219
60220 BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
60221 BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
60222
60223 /**
60224 * Create a BasicSourceMapConsumer from a SourceMapGenerator.
60225 *
60226 * @param SourceMapGenerator aSourceMap
60227 * The source map that will be consumed.
60228 * @returns BasicSourceMapConsumer
60229 */
60230 BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
60231 var smc = Object.create(BasicSourceMapConsumer.prototype);
60232
60233 var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
60234 var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
60235 smc.sourceRoot = aSourceMap._sourceRoot;
60236 smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
60237 smc.file = aSourceMap._file;
60238
60239 // Because we are modifying the entries (by converting string sources and
60240 // names to indices into the sources and names ArraySets), we have to make
60241 // a copy of the entry or else bad things happen. Shared mutable state
60242 // strikes again! See github issue #191.
60243
60244 var generatedMappings = aSourceMap._mappings.toArray().slice();
60245 var destGeneratedMappings = smc.__generatedMappings = [];
60246 var destOriginalMappings = smc.__originalMappings = [];
60247
60248 for (var i = 0, length = generatedMappings.length; i < length; i++) {
60249 var srcMapping = generatedMappings[i];
60250 var destMapping = new Mapping();
60251 destMapping.generatedLine = srcMapping.generatedLine;
60252 destMapping.generatedColumn = srcMapping.generatedColumn;
60253
60254 if (srcMapping.source) {
60255 destMapping.source = sources.indexOf(srcMapping.source);
60256 destMapping.originalLine = srcMapping.originalLine;
60257 destMapping.originalColumn = srcMapping.originalColumn;
60258
60259 if (srcMapping.name) {
60260 destMapping.name = names.indexOf(srcMapping.name);
60261 }
60262
60263 destOriginalMappings.push(destMapping);
60264 }
60265
60266 destGeneratedMappings.push(destMapping);
60267 }
60268
60269 quickSort(smc.__originalMappings, util.compareByOriginalPositions);
60270
60271 return smc;
60272 };
60273
60274 /**
60275 * The version of the source mapping spec that we are consuming.
60276 */
60277 BasicSourceMapConsumer.prototype._version = 3;
60278
60279 /**
60280 * The list of original sources.
60281 */
60282 Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
60283 get: function get() {
60284 return this._sources.toArray().map(function (s) {
60285 return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
60286 }, this);
60287 }
60288 });
60289
60290 /**
60291 * Provide the JIT with a nice shape / hidden class.
60292 */
60293 function Mapping() {
60294 this.generatedLine = 0;
60295 this.generatedColumn = 0;
60296 this.source = null;
60297 this.originalLine = null;
60298 this.originalColumn = null;
60299 this.name = null;
60300 }
60301
60302 /**
60303 * Parse the mappings in a string in to a data structure which we can easily
60304 * query (the ordered arrays in the `this.__generatedMappings` and
60305 * `this.__originalMappings` properties).
60306 */
60307 BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
60308 var generatedLine = 1;
60309 var previousGeneratedColumn = 0;
60310 var previousOriginalLine = 0;
60311 var previousOriginalColumn = 0;
60312 var previousSource = 0;
60313 var previousName = 0;
60314 var length = aStr.length;
60315 var index = 0;
60316 var cachedSegments = {};
60317 var temp = {};
60318 var originalMappings = [];
60319 var generatedMappings = [];
60320 var mapping, str, segment, end, value;
60321
60322 while (index < length) {
60323 if (aStr.charAt(index) === ';') {
60324 generatedLine++;
60325 index++;
60326 previousGeneratedColumn = 0;
60327 } else if (aStr.charAt(index) === ',') {
60328 index++;
60329 } else {
60330 mapping = new Mapping();
60331 mapping.generatedLine = generatedLine;
60332
60333 // Because each offset is encoded relative to the previous one,
60334 // many segments often have the same encoding. We can exploit this
60335 // fact by caching the parsed variable length fields of each segment,
60336 // allowing us to avoid a second parse if we encounter the same
60337 // segment again.
60338 for (end = index; end < length; end++) {
60339 if (this._charIsMappingSeparator(aStr, end)) {
60340 break;
60341 }
60342 }
60343 str = aStr.slice(index, end);
60344
60345 segment = cachedSegments[str];
60346 if (segment) {
60347 index += str.length;
60348 } else {
60349 segment = [];
60350 while (index < end) {
60351 base64VLQ.decode(aStr, index, temp);
60352 value = temp.value;
60353 index = temp.rest;
60354 segment.push(value);
60355 }
60356
60357 if (segment.length === 2) {
60358 throw new Error('Found a source, but no line and column');
60359 }
60360
60361 if (segment.length === 3) {
60362 throw new Error('Found a source and line, but no column');
60363 }
60364
60365 cachedSegments[str] = segment;
60366 }
60367
60368 // Generated column.
60369 mapping.generatedColumn = previousGeneratedColumn + segment[0];
60370 previousGeneratedColumn = mapping.generatedColumn;
60371
60372 if (segment.length > 1) {
60373 // Original source.
60374 mapping.source = previousSource + segment[1];
60375 previousSource += segment[1];
60376
60377 // Original line.
60378 mapping.originalLine = previousOriginalLine + segment[2];
60379 previousOriginalLine = mapping.originalLine;
60380 // Lines are stored 0-based
60381 mapping.originalLine += 1;
60382
60383 // Original column.
60384 mapping.originalColumn = previousOriginalColumn + segment[3];
60385 previousOriginalColumn = mapping.originalColumn;
60386
60387 if (segment.length > 4) {
60388 // Original name.
60389 mapping.name = previousName + segment[4];
60390 previousName += segment[4];
60391 }
60392 }
60393
60394 generatedMappings.push(mapping);
60395 if (typeof mapping.originalLine === 'number') {
60396 originalMappings.push(mapping);
60397 }
60398 }
60399 }
60400
60401 quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
60402 this.__generatedMappings = generatedMappings;
60403
60404 quickSort(originalMappings, util.compareByOriginalPositions);
60405 this.__originalMappings = originalMappings;
60406 };
60407
60408 /**
60409 * Find the mapping that best matches the hypothetical "needle" mapping that
60410 * we are searching for in the given "haystack" of mappings.
60411 */
60412 BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
60413 // To return the position we are searching for, we must first find the
60414 // mapping for the given position and then return the opposite position it
60415 // points to. Because the mappings are sorted, we can use binary search to
60416 // find the best mapping.
60417
60418 if (aNeedle[aLineName] <= 0) {
60419 throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
60420 }
60421 if (aNeedle[aColumnName] < 0) {
60422 throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
60423 }
60424
60425 return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
60426 };
60427
60428 /**
60429 * Compute the last column for each generated mapping. The last column is
60430 * inclusive.
60431 */
60432 BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
60433 for (var index = 0; index < this._generatedMappings.length; ++index) {
60434 var mapping = this._generatedMappings[index];
60435
60436 // Mappings do not contain a field for the last generated columnt. We
60437 // can come up with an optimistic estimate, however, by assuming that
60438 // mappings are contiguous (i.e. given two consecutive mappings, the
60439 // first mapping ends where the second one starts).
60440 if (index + 1 < this._generatedMappings.length) {
60441 var nextMapping = this._generatedMappings[index + 1];
60442
60443 if (mapping.generatedLine === nextMapping.generatedLine) {
60444 mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
60445 continue;
60446 }
60447 }
60448
60449 // The last mapping for each line spans the entire line.
60450 mapping.lastGeneratedColumn = Infinity;
60451 }
60452 };
60453
60454 /**
60455 * Returns the original source, line, and column information for the generated
60456 * source's line and column positions provided. The only argument is an object
60457 * with the following properties:
60458 *
60459 * - line: The line number in the generated source.
60460 * - column: The column number in the generated source.
60461 * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
60462 * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
60463 * closest element that is smaller than or greater than the one we are
60464 * searching for, respectively, if the exact element cannot be found.
60465 * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
60466 *
60467 * and an object is returned with the following properties:
60468 *
60469 * - source: The original source file, or null.
60470 * - line: The line number in the original source, or null.
60471 * - column: The column number in the original source, or null.
60472 * - name: The original identifier, or null.
60473 */
60474 BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
60475 var needle = {
60476 generatedLine: util.getArg(aArgs, 'line'),
60477 generatedColumn: util.getArg(aArgs, 'column')
60478 };
60479
60480 var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
60481
60482 if (index >= 0) {
60483 var mapping = this._generatedMappings[index];
60484
60485 if (mapping.generatedLine === needle.generatedLine) {
60486 var source = util.getArg(mapping, 'source', null);
60487 if (source !== null) {
60488 source = this._sources.at(source);
60489 if (this.sourceRoot != null) {
60490 source = util.join(this.sourceRoot, source);
60491 }
60492 }
60493 var name = util.getArg(mapping, 'name', null);
60494 if (name !== null) {
60495 name = this._names.at(name);
60496 }
60497 return {
60498 source: source,
60499 line: util.getArg(mapping, 'originalLine', null),
60500 column: util.getArg(mapping, 'originalColumn', null),
60501 name: name
60502 };
60503 }
60504 }
60505
60506 return {
60507 source: null,
60508 line: null,
60509 column: null,
60510 name: null
60511 };
60512 };
60513
60514 /**
60515 * Return true if we have the source content for every source in the source
60516 * map, false otherwise.
60517 */
60518 BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
60519 if (!this.sourcesContent) {
60520 return false;
60521 }
60522 return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) {
60523 return sc == null;
60524 });
60525 };
60526
60527 /**
60528 * Returns the original source content. The only argument is the url of the
60529 * original source file. Returns null if no original source content is
60530 * available.
60531 */
60532 BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
60533 if (!this.sourcesContent) {
60534 return null;
60535 }
60536
60537 if (this.sourceRoot != null) {
60538 aSource = util.relative(this.sourceRoot, aSource);
60539 }
60540
60541 if (this._sources.has(aSource)) {
60542 return this.sourcesContent[this._sources.indexOf(aSource)];
60543 }
60544
60545 var url;
60546 if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
60547 // XXX: file:// URIs and absolute paths lead to unexpected behavior for
60548 // many users. We can help them out when they expect file:// URIs to
60549 // behave like it would if they were running a local HTTP server. See
60550 // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
60551 var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
60552 if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
60553 return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
60554 }
60555
60556 if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) {
60557 return this.sourcesContent[this._sources.indexOf("/" + aSource)];
60558 }
60559 }
60560
60561 // This function is used recursively from
60562 // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
60563 // don't want to throw if we can't find the source - we just want to
60564 // return null, so we provide a flag to exit gracefully.
60565 if (nullOnMissing) {
60566 return null;
60567 } else {
60568 throw new Error('"' + aSource + '" is not in the SourceMap.');
60569 }
60570 };
60571
60572 /**
60573 * Returns the generated line and column information for the original source,
60574 * line, and column positions provided. The only argument is an object with
60575 * the following properties:
60576 *
60577 * - source: The filename of the original source.
60578 * - line: The line number in the original source.
60579 * - column: The column number in the original source.
60580 * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
60581 * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
60582 * closest element that is smaller than or greater than the one we are
60583 * searching for, respectively, if the exact element cannot be found.
60584 * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
60585 *
60586 * and an object is returned with the following properties:
60587 *
60588 * - line: The line number in the generated source, or null.
60589 * - column: The column number in the generated source, or null.
60590 */
60591 BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
60592 var source = util.getArg(aArgs, 'source');
60593 if (this.sourceRoot != null) {
60594 source = util.relative(this.sourceRoot, source);
60595 }
60596 if (!this._sources.has(source)) {
60597 return {
60598 line: null,
60599 column: null,
60600 lastColumn: null
60601 };
60602 }
60603 source = this._sources.indexOf(source);
60604
60605 var needle = {
60606 source: source,
60607 originalLine: util.getArg(aArgs, 'line'),
60608 originalColumn: util.getArg(aArgs, 'column')
60609 };
60610
60611 var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
60612
60613 if (index >= 0) {
60614 var mapping = this._originalMappings[index];
60615
60616 if (mapping.source === needle.source) {
60617 return {
60618 line: util.getArg(mapping, 'generatedLine', null),
60619 column: util.getArg(mapping, 'generatedColumn', null),
60620 lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
60621 };
60622 }
60623 }
60624
60625 return {
60626 line: null,
60627 column: null,
60628 lastColumn: null
60629 };
60630 };
60631
60632 exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
60633
60634 /**
60635 * An IndexedSourceMapConsumer instance represents a parsed source map which
60636 * we can query for information. It differs from BasicSourceMapConsumer in
60637 * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
60638 * input.
60639 *
60640 * The only parameter is a raw source map (either as a JSON string, or already
60641 * parsed to an object). According to the spec for indexed source maps, they
60642 * have the following attributes:
60643 *
60644 * - version: Which version of the source map spec this map is following.
60645 * - file: Optional. The generated file this source map is associated with.
60646 * - sections: A list of section definitions.
60647 *
60648 * Each value under the "sections" field has two fields:
60649 * - offset: The offset into the original specified at which this section
60650 * begins to apply, defined as an object with a "line" and "column"
60651 * field.
60652 * - map: A source map definition. This source map could also be indexed,
60653 * but doesn't have to be.
60654 *
60655 * Instead of the "map" field, it's also possible to have a "url" field
60656 * specifying a URL to retrieve a source map from, but that's currently
60657 * unsupported.
60658 *
60659 * Here's an example source map, taken from the source map spec[0], but
60660 * modified to omit a section which uses the "url" field.
60661 *
60662 * {
60663 * version : 3,
60664 * file: "app.js",
60665 * sections: [{
60666 * offset: {line:100, column:10},
60667 * map: {
60668 * version : 3,
60669 * file: "section.js",
60670 * sources: ["foo.js", "bar.js"],
60671 * names: ["src", "maps", "are", "fun"],
60672 * mappings: "AAAA,E;;ABCDE;"
60673 * }
60674 * }],
60675 * }
60676 *
60677 * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
60678 */
60679 function IndexedSourceMapConsumer(aSourceMap) {
60680 var sourceMap = aSourceMap;
60681 if (typeof aSourceMap === 'string') {
60682 sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
60683 }
60684
60685 var version = util.getArg(sourceMap, 'version');
60686 var sections = util.getArg(sourceMap, 'sections');
60687
60688 if (version != this._version) {
60689 throw new Error('Unsupported version: ' + version);
60690 }
60691
60692 this._sources = new ArraySet();
60693 this._names = new ArraySet();
60694
60695 var lastOffset = {
60696 line: -1,
60697 column: 0
60698 };
60699 this._sections = sections.map(function (s) {
60700 if (s.url) {
60701 // The url field will require support for asynchronicity.
60702 // See https://github.com/mozilla/source-map/issues/16
60703 throw new Error('Support for url field in sections not implemented.');
60704 }
60705 var offset = util.getArg(s, 'offset');
60706 var offsetLine = util.getArg(offset, 'line');
60707 var offsetColumn = util.getArg(offset, 'column');
60708
60709 if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
60710 throw new Error('Section offsets must be ordered and non-overlapping.');
60711 }
60712 lastOffset = offset;
60713
60714 return {
60715 generatedOffset: {
60716 // The offset fields are 0-based, but we use 1-based indices when
60717 // encoding/decoding from VLQ.
60718 generatedLine: offsetLine + 1,
60719 generatedColumn: offsetColumn + 1
60720 },
60721 consumer: new SourceMapConsumer(util.getArg(s, 'map'))
60722 };
60723 });
60724 }
60725
60726 IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
60727 IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
60728
60729 /**
60730 * The version of the source mapping spec that we are consuming.
60731 */
60732 IndexedSourceMapConsumer.prototype._version = 3;
60733
60734 /**
60735 * The list of original sources.
60736 */
60737 Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
60738 get: function get() {
60739 var sources = [];
60740 for (var i = 0; i < this._sections.length; i++) {
60741 for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
60742 sources.push(this._sections[i].consumer.sources[j]);
60743 }
60744 }
60745 return sources;
60746 }
60747 });
60748
60749 /**
60750 * Returns the original source, line, and column information for the generated
60751 * source's line and column positions provided. The only argument is an object
60752 * with the following properties:
60753 *
60754 * - line: The line number in the generated source.
60755 * - column: The column number in the generated source.
60756 *
60757 * and an object is returned with the following properties:
60758 *
60759 * - source: The original source file, or null.
60760 * - line: The line number in the original source, or null.
60761 * - column: The column number in the original source, or null.
60762 * - name: The original identifier, or null.
60763 */
60764 IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
60765 var needle = {
60766 generatedLine: util.getArg(aArgs, 'line'),
60767 generatedColumn: util.getArg(aArgs, 'column')
60768 };
60769
60770 // Find the section containing the generated position we're trying to map
60771 // to an original position.
60772 var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) {
60773 var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
60774 if (cmp) {
60775 return cmp;
60776 }
60777
60778 return needle.generatedColumn - section.generatedOffset.generatedColumn;
60779 });
60780 var section = this._sections[sectionIndex];
60781
60782 if (!section) {
60783 return {
60784 source: null,
60785 line: null,
60786 column: null,
60787 name: null
60788 };
60789 }
60790
60791 return section.consumer.originalPositionFor({
60792 line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
60793 column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
60794 bias: aArgs.bias
60795 });
60796 };
60797
60798 /**
60799 * Return true if we have the source content for every source in the source
60800 * map, false otherwise.
60801 */
60802 IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
60803 return this._sections.every(function (s) {
60804 return s.consumer.hasContentsOfAllSources();
60805 });
60806 };
60807
60808 /**
60809 * Returns the original source content. The only argument is the url of the
60810 * original source file. Returns null if no original source content is
60811 * available.
60812 */
60813 IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
60814 for (var i = 0; i < this._sections.length; i++) {
60815 var section = this._sections[i];
60816
60817 var content = section.consumer.sourceContentFor(aSource, true);
60818 if (content) {
60819 return content;
60820 }
60821 }
60822 if (nullOnMissing) {
60823 return null;
60824 } else {
60825 throw new Error('"' + aSource + '" is not in the SourceMap.');
60826 }
60827 };
60828
60829 /**
60830 * Returns the generated line and column information for the original source,
60831 * line, and column positions provided. The only argument is an object with
60832 * the following properties:
60833 *
60834 * - source: The filename of the original source.
60835 * - line: The line number in the original source.
60836 * - column: The column number in the original source.
60837 *
60838 * and an object is returned with the following properties:
60839 *
60840 * - line: The line number in the generated source, or null.
60841 * - column: The column number in the generated source, or null.
60842 */
60843 IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
60844 for (var i = 0; i < this._sections.length; i++) {
60845 var section = this._sections[i];
60846
60847 // Only consider this section if the requested source is in the list of
60848 // sources of the consumer.
60849 if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
60850 continue;
60851 }
60852 var generatedPosition = section.consumer.generatedPositionFor(aArgs);
60853 if (generatedPosition) {
60854 var ret = {
60855 line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
60856 column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
60857 };
60858 return ret;
60859 }
60860 }
60861
60862 return {
60863 line: null,
60864 column: null
60865 };
60866 };
60867
60868 /**
60869 * Parse the mappings in a string in to a data structure which we can easily
60870 * query (the ordered arrays in the `this.__generatedMappings` and
60871 * `this.__originalMappings` properties).
60872 */
60873 IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
60874 this.__generatedMappings = [];
60875 this.__originalMappings = [];
60876 for (var i = 0; i < this._sections.length; i++) {
60877 var section = this._sections[i];
60878 var sectionMappings = section.consumer._generatedMappings;
60879 for (var j = 0; j < sectionMappings.length; j++) {
60880 var mapping = sectionMappings[j];
60881
60882 var source = section.consumer._sources.at(mapping.source);
60883 if (section.consumer.sourceRoot !== null) {
60884 source = util.join(section.consumer.sourceRoot, source);
60885 }
60886 this._sources.add(source);
60887 source = this._sources.indexOf(source);
60888
60889 var name = section.consumer._names.at(mapping.name);
60890 this._names.add(name);
60891 name = this._names.indexOf(name);
60892
60893 // The mappings coming from the consumer for the section have
60894 // generated positions relative to the start of the section, so we
60895 // need to offset them to be relative to the start of the concatenated
60896 // generated file.
60897 var adjustedMapping = {
60898 source: source,
60899 generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
60900 generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
60901 originalLine: mapping.originalLine,
60902 originalColumn: mapping.originalColumn,
60903 name: name
60904 };
60905
60906 this.__generatedMappings.push(adjustedMapping);
60907 if (typeof adjustedMapping.originalLine === 'number') {
60908 this.__originalMappings.push(adjustedMapping);
60909 }
60910 }
60911 }
60912
60913 quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
60914 quickSort(this.__originalMappings, util.compareByOriginalPositions);
60915 };
60916
60917 exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
60918
60919/***/ }),
60920/* 621 */
60921/***/ (function(module, exports, __webpack_require__) {
60922
60923 'use strict';
60924
60925 /* -*- Mode: js; js-indent-level: 2; -*- */
60926 /*
60927 * Copyright 2011 Mozilla Foundation and contributors
60928 * Licensed under the New BSD license. See LICENSE or:
60929 * http://opensource.org/licenses/BSD-3-Clause
60930 */
60931
60932 var SourceMapGenerator = __webpack_require__(287).SourceMapGenerator;
60933 var util = __webpack_require__(63);
60934
60935 // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
60936 // operating systems these days (capturing the result).
60937 var REGEX_NEWLINE = /(\r?\n)/;
60938
60939 // Newline character code for charCodeAt() comparisons
60940 var NEWLINE_CODE = 10;
60941
60942 // Private symbol for identifying `SourceNode`s when multiple versions of
60943 // the source-map library are loaded. This MUST NOT CHANGE across
60944 // versions!
60945 var isSourceNode = "$$$isSourceNode$$$";
60946
60947 /**
60948 * SourceNodes provide a way to abstract over interpolating/concatenating
60949 * snippets of generated JavaScript source code while maintaining the line and
60950 * column information associated with the original source code.
60951 *
60952 * @param aLine The original line number.
60953 * @param aColumn The original column number.
60954 * @param aSource The original source's filename.
60955 * @param aChunks Optional. An array of strings which are snippets of
60956 * generated JS, or other SourceNodes.
60957 * @param aName The original identifier.
60958 */
60959 function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
60960 this.children = [];
60961 this.sourceContents = {};
60962 this.line = aLine == null ? null : aLine;
60963 this.column = aColumn == null ? null : aColumn;
60964 this.source = aSource == null ? null : aSource;
60965 this.name = aName == null ? null : aName;
60966 this[isSourceNode] = true;
60967 if (aChunks != null) this.add(aChunks);
60968 }
60969
60970 /**
60971 * Creates a SourceNode from generated code and a SourceMapConsumer.
60972 *
60973 * @param aGeneratedCode The generated code
60974 * @param aSourceMapConsumer The SourceMap for the generated code
60975 * @param aRelativePath Optional. The path that relative sources in the
60976 * SourceMapConsumer should be relative to.
60977 */
60978 SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
60979 // The SourceNode we want to fill with the generated code
60980 // and the SourceMap
60981 var node = new SourceNode();
60982
60983 // All even indices of this array are one line of the generated code,
60984 // while all odd indices are the newlines between two adjacent lines
60985 // (since `REGEX_NEWLINE` captures its match).
60986 // Processed fragments are removed from this array, by calling `shiftNextLine`.
60987 var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
60988 var shiftNextLine = function shiftNextLine() {
60989 var lineContents = remainingLines.shift();
60990 // The last line of a file might not have a newline.
60991 var newLine = remainingLines.shift() || "";
60992 return lineContents + newLine;
60993 };
60994
60995 // We need to remember the position of "remainingLines"
60996 var lastGeneratedLine = 1,
60997 lastGeneratedColumn = 0;
60998
60999 // The generate SourceNodes we need a code range.
61000 // To extract it current and last mapping is used.
61001 // Here we store the last mapping.
61002 var lastMapping = null;
61003
61004 aSourceMapConsumer.eachMapping(function (mapping) {
61005 if (lastMapping !== null) {
61006 // We add the code from "lastMapping" to "mapping":
61007 // First check if there is a new line in between.
61008 if (lastGeneratedLine < mapping.generatedLine) {
61009 // Associate first line with "lastMapping"
61010 addMappingWithCode(lastMapping, shiftNextLine());
61011 lastGeneratedLine++;
61012 lastGeneratedColumn = 0;
61013 // The remaining code is added without mapping
61014 } else {
61015 // There is no new line in between.
61016 // Associate the code between "lastGeneratedColumn" and
61017 // "mapping.generatedColumn" with "lastMapping"
61018 var nextLine = remainingLines[0];
61019 var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
61020 remainingLines[0] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
61021 lastGeneratedColumn = mapping.generatedColumn;
61022 addMappingWithCode(lastMapping, code);
61023 // No more remaining code, continue
61024 lastMapping = mapping;
61025 return;
61026 }
61027 }
61028 // We add the generated code until the first mapping
61029 // to the SourceNode without any mapping.
61030 // Each line is added as separate string.
61031 while (lastGeneratedLine < mapping.generatedLine) {
61032 node.add(shiftNextLine());
61033 lastGeneratedLine++;
61034 }
61035 if (lastGeneratedColumn < mapping.generatedColumn) {
61036 var nextLine = remainingLines[0];
61037 node.add(nextLine.substr(0, mapping.generatedColumn));
61038 remainingLines[0] = nextLine.substr(mapping.generatedColumn);
61039 lastGeneratedColumn = mapping.generatedColumn;
61040 }
61041 lastMapping = mapping;
61042 }, this);
61043 // We have processed all mappings.
61044 if (remainingLines.length > 0) {
61045 if (lastMapping) {
61046 // Associate the remaining code in the current line with "lastMapping"
61047 addMappingWithCode(lastMapping, shiftNextLine());
61048 }
61049 // and add the remaining lines without any mapping
61050 node.add(remainingLines.join(""));
61051 }
61052
61053 // Copy sourcesContent into SourceNode
61054 aSourceMapConsumer.sources.forEach(function (sourceFile) {
61055 var content = aSourceMapConsumer.sourceContentFor(sourceFile);
61056 if (content != null) {
61057 if (aRelativePath != null) {
61058 sourceFile = util.join(aRelativePath, sourceFile);
61059 }
61060 node.setSourceContent(sourceFile, content);
61061 }
61062 });
61063
61064 return node;
61065
61066 function addMappingWithCode(mapping, code) {
61067 if (mapping === null || mapping.source === undefined) {
61068 node.add(code);
61069 } else {
61070 var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
61071 node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
61072 }
61073 }
61074 };
61075
61076 /**
61077 * Add a chunk of generated JS to this source node.
61078 *
61079 * @param aChunk A string snippet of generated JS code, another instance of
61080 * SourceNode, or an array where each member is one of those things.
61081 */
61082 SourceNode.prototype.add = function SourceNode_add(aChunk) {
61083 if (Array.isArray(aChunk)) {
61084 aChunk.forEach(function (chunk) {
61085 this.add(chunk);
61086 }, this);
61087 } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
61088 if (aChunk) {
61089 this.children.push(aChunk);
61090 }
61091 } else {
61092 throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
61093 }
61094 return this;
61095 };
61096
61097 /**
61098 * Add a chunk of generated JS to the beginning of this source node.
61099 *
61100 * @param aChunk A string snippet of generated JS code, another instance of
61101 * SourceNode, or an array where each member is one of those things.
61102 */
61103 SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
61104 if (Array.isArray(aChunk)) {
61105 for (var i = aChunk.length - 1; i >= 0; i--) {
61106 this.prepend(aChunk[i]);
61107 }
61108 } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
61109 this.children.unshift(aChunk);
61110 } else {
61111 throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
61112 }
61113 return this;
61114 };
61115
61116 /**
61117 * Walk over the tree of JS snippets in this node and its children. The
61118 * walking function is called once for each snippet of JS and is passed that
61119 * snippet and the its original associated source's line/column location.
61120 *
61121 * @param aFn The traversal function.
61122 */
61123 SourceNode.prototype.walk = function SourceNode_walk(aFn) {
61124 var chunk;
61125 for (var i = 0, len = this.children.length; i < len; i++) {
61126 chunk = this.children[i];
61127 if (chunk[isSourceNode]) {
61128 chunk.walk(aFn);
61129 } else {
61130 if (chunk !== '') {
61131 aFn(chunk, { source: this.source,
61132 line: this.line,
61133 column: this.column,
61134 name: this.name });
61135 }
61136 }
61137 }
61138 };
61139
61140 /**
61141 * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
61142 * each of `this.children`.
61143 *
61144 * @param aSep The separator.
61145 */
61146 SourceNode.prototype.join = function SourceNode_join(aSep) {
61147 var newChildren;
61148 var i;
61149 var len = this.children.length;
61150 if (len > 0) {
61151 newChildren = [];
61152 for (i = 0; i < len - 1; i++) {
61153 newChildren.push(this.children[i]);
61154 newChildren.push(aSep);
61155 }
61156 newChildren.push(this.children[i]);
61157 this.children = newChildren;
61158 }
61159 return this;
61160 };
61161
61162 /**
61163 * Call String.prototype.replace on the very right-most source snippet. Useful
61164 * for trimming whitespace from the end of a source node, etc.
61165 *
61166 * @param aPattern The pattern to replace.
61167 * @param aReplacement The thing to replace the pattern with.
61168 */
61169 SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
61170 var lastChild = this.children[this.children.length - 1];
61171 if (lastChild[isSourceNode]) {
61172 lastChild.replaceRight(aPattern, aReplacement);
61173 } else if (typeof lastChild === 'string') {
61174 this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
61175 } else {
61176 this.children.push(''.replace(aPattern, aReplacement));
61177 }
61178 return this;
61179 };
61180
61181 /**
61182 * Set the source content for a source file. This will be added to the SourceMapGenerator
61183 * in the sourcesContent field.
61184 *
61185 * @param aSourceFile The filename of the source file
61186 * @param aSourceContent The content of the source file
61187 */
61188 SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
61189 this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
61190 };
61191
61192 /**
61193 * Walk over the tree of SourceNodes. The walking function is called for each
61194 * source file content and is passed the filename and source content.
61195 *
61196 * @param aFn The traversal function.
61197 */
61198 SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
61199 for (var i = 0, len = this.children.length; i < len; i++) {
61200 if (this.children[i][isSourceNode]) {
61201 this.children[i].walkSourceContents(aFn);
61202 }
61203 }
61204
61205 var sources = Object.keys(this.sourceContents);
61206 for (var i = 0, len = sources.length; i < len; i++) {
61207 aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
61208 }
61209 };
61210
61211 /**
61212 * Return the string representation of this source node. Walks over the tree
61213 * and concatenates all the various snippets together to one string.
61214 */
61215 SourceNode.prototype.toString = function SourceNode_toString() {
61216 var str = "";
61217 this.walk(function (chunk) {
61218 str += chunk;
61219 });
61220 return str;
61221 };
61222
61223 /**
61224 * Returns the string representation of this source node along with a source
61225 * map.
61226 */
61227 SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
61228 var generated = {
61229 code: "",
61230 line: 1,
61231 column: 0
61232 };
61233 var map = new SourceMapGenerator(aArgs);
61234 var sourceMappingActive = false;
61235 var lastOriginalSource = null;
61236 var lastOriginalLine = null;
61237 var lastOriginalColumn = null;
61238 var lastOriginalName = null;
61239 this.walk(function (chunk, original) {
61240 generated.code += chunk;
61241 if (original.source !== null && original.line !== null && original.column !== null) {
61242 if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
61243 map.addMapping({
61244 source: original.source,
61245 original: {
61246 line: original.line,
61247 column: original.column
61248 },
61249 generated: {
61250 line: generated.line,
61251 column: generated.column
61252 },
61253 name: original.name
61254 });
61255 }
61256 lastOriginalSource = original.source;
61257 lastOriginalLine = original.line;
61258 lastOriginalColumn = original.column;
61259 lastOriginalName = original.name;
61260 sourceMappingActive = true;
61261 } else if (sourceMappingActive) {
61262 map.addMapping({
61263 generated: {
61264 line: generated.line,
61265 column: generated.column
61266 }
61267 });
61268 lastOriginalSource = null;
61269 sourceMappingActive = false;
61270 }
61271 for (var idx = 0, length = chunk.length; idx < length; idx++) {
61272 if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
61273 generated.line++;
61274 generated.column = 0;
61275 // Mappings end at eol
61276 if (idx + 1 === length) {
61277 lastOriginalSource = null;
61278 sourceMappingActive = false;
61279 } else if (sourceMappingActive) {
61280 map.addMapping({
61281 source: original.source,
61282 original: {
61283 line: original.line,
61284 column: original.column
61285 },
61286 generated: {
61287 line: generated.line,
61288 column: generated.column
61289 },
61290 name: original.name
61291 });
61292 }
61293 } else {
61294 generated.column++;
61295 }
61296 }
61297 });
61298 this.walkSourceContents(function (sourceFile, sourceContent) {
61299 map.setSourceContent(sourceFile, sourceContent);
61300 });
61301
61302 return { code: generated.code, map: map };
61303 };
61304
61305 exports.SourceNode = SourceNode;
61306
61307/***/ }),
61308/* 622 */
61309/***/ (function(module, exports, __webpack_require__) {
61310
61311 'use strict';
61312
61313 var ansiRegex = __webpack_require__(180)();
61314
61315 module.exports = function (str) {
61316 return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
61317 };
61318
61319/***/ }),
61320/* 623 */
61321/***/ (function(module, exports, __webpack_require__) {
61322
61323 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
61324
61325 var argv = process.argv;
61326
61327 var terminator = argv.indexOf('--');
61328 var hasFlag = function hasFlag(flag) {
61329 flag = '--' + flag;
61330 var pos = argv.indexOf(flag);
61331 return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
61332 };
61333
61334 module.exports = function () {
61335 if ('FORCE_COLOR' in process.env) {
61336 return true;
61337 }
61338
61339 if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
61340 return false;
61341 }
61342
61343 if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
61344 return true;
61345 }
61346
61347 if (process.stdout && !process.stdout.isTTY) {
61348 return false;
61349 }
61350
61351 if (process.platform === 'win32') {
61352 return true;
61353 }
61354
61355 if ('COLORTERM' in process.env) {
61356 return true;
61357 }
61358
61359 if (process.env.TERM === 'dumb') {
61360 return false;
61361 }
61362
61363 if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
61364 return true;
61365 }
61366
61367 return false;
61368 }();
61369 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
61370
61371/***/ }),
61372/* 624 */
61373/***/ (function(module, exports) {
61374
61375 'use strict';
61376
61377 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
61378
61379 module.exports = function toFastproperties(o) {
61380 function Sub() {}
61381 Sub.prototype = o;
61382 var receiver = new Sub(); // create an instance
61383 function ic() {
61384 return _typeof(receiver.foo);
61385 } // perform access
61386 ic();
61387 ic();
61388 return o;
61389 eval("o" + o); // ensure no dead code elimination
61390 };
61391
61392/***/ }),
61393/* 625 */
61394/***/ (function(module, exports) {
61395
61396 'use strict';
61397
61398 module.exports = function (str) {
61399 var tail = str.length;
61400
61401 while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) {
61402 tail--;
61403 }
61404
61405 return str.slice(0, tail);
61406 };
61407
61408/***/ }),
61409/* 626 */
61410/***/ (function(module, exports) {
61411
61412 'use strict';
61413
61414 if (typeof Object.create === 'function') {
61415 // implementation from standard node.js 'util' module
61416 module.exports = function inherits(ctor, superCtor) {
61417 ctor.super_ = superCtor;
61418 ctor.prototype = Object.create(superCtor.prototype, {
61419 constructor: {
61420 value: ctor,
61421 enumerable: false,
61422 writable: true,
61423 configurable: true
61424 }
61425 });
61426 };
61427 } else {
61428 // old school shim for old browsers
61429 module.exports = function inherits(ctor, superCtor) {
61430 ctor.super_ = superCtor;
61431 var TempCtor = function TempCtor() {};
61432 TempCtor.prototype = superCtor.prototype;
61433 ctor.prototype = new TempCtor();
61434 ctor.prototype.constructor = ctor;
61435 };
61436 }
61437
61438/***/ }),
61439/* 627 */
61440/***/ (function(module, exports) {
61441
61442 'use strict';
61443
61444 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
61445
61446 module.exports = function isBuffer(arg) {
61447 return arg && (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function';
61448 };
61449
61450/***/ }),
61451/* 628 */
61452/***/ (function(module, exports, __webpack_require__) {
61453
61454 "use strict";
61455
61456 Object.defineProperty(exports, "__esModule", {
61457 value: true
61458 });
61459 /**
61460 * A shim that replaces Babel's require('package.json') statement.
61461 * Babel requires the entire package.json file just to get the version number.
61462 */
61463 var version = exports.version = ("6.26.0");
61464
61465/***/ }),
61466/* 629 */
61467/***/ (function(module, exports) {
61468
61469 'use strict';
61470
61471 Object.defineProperty(exports, "__esModule", {
61472 value: true
61473 });
61474
61475 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
61476
61477 exports.runScripts = runScripts;
61478 /**
61479 * Copyright 2013-2015, Facebook, Inc.
61480 * All rights reserved.
61481 *
61482 * This source code is licensed under the BSD-style license found in the
61483 * LICENSE file in the root directory of the React source tree. An additional
61484 * grant of patent rights can be found in the PATENTS file in the same directory.
61485 */
61486
61487 var scriptTypes = ['text/jsx', 'text/babel'];
61488
61489 var headEl = void 0;
61490 var inlineScriptCount = 0;
61491
61492 /**
61493 * Actually transform the code.
61494 */
61495 function transformCode(transformFn, script) {
61496 var source = void 0;
61497 if (script.url != null) {
61498 source = script.url;
61499 } else {
61500 source = 'Inline Babel script';
61501 inlineScriptCount++;
61502 if (inlineScriptCount > 1) {
61503 source += ' (' + inlineScriptCount + ')';
61504 }
61505 }
61506
61507 return transformFn(script.content, _extends({
61508 filename: source
61509 }, buildBabelOptions(script))).code;
61510 }
61511
61512 /**
61513 * Builds the Babel options for transforming the specified script, using some
61514 * sensible default presets and plugins if none were explicitly provided.
61515 */
61516 function buildBabelOptions(script) {
61517 return {
61518 presets: script.presets || ['react', 'es2015'],
61519 plugins: script.plugins || ['transform-class-properties', 'transform-object-rest-spread', 'transform-flow-strip-types'],
61520 sourceMaps: 'inline'
61521 };
61522 }
61523
61524 /**
61525 * Appends a script element at the end of the <head> with the content of code,
61526 * after transforming it.
61527 */
61528 function run(transformFn, script) {
61529 var scriptEl = document.createElement('script');
61530 scriptEl.text = transformCode(transformFn, script);
61531 headEl.appendChild(scriptEl);
61532 }
61533
61534 /**
61535 * Load script from the provided url and pass the content to the callback.
61536 */
61537 function load(url, successCallback, errorCallback) {
61538 var xhr = new XMLHttpRequest();
61539
61540 // async, however scripts will be executed in the order they are in the
61541 // DOM to mirror normal script loading.
61542 xhr.open('GET', url, true);
61543 if ('overrideMimeType' in xhr) {
61544 xhr.overrideMimeType('text/plain');
61545 }
61546 xhr.onreadystatechange = function () {
61547 if (xhr.readyState === 4) {
61548 if (xhr.status === 0 || xhr.status === 200) {
61549 successCallback(xhr.responseText);
61550 } else {
61551 errorCallback();
61552 throw new Error('Could not load ' + url);
61553 }
61554 }
61555 };
61556 return xhr.send(null);
61557 }
61558
61559 /**
61560 * Converts a comma-separated data attribute string into an array of values. If
61561 * the string is empty, returns an empty array. If the string is not defined,
61562 * returns null.
61563 */
61564 function getPluginsOrPresetsFromScript(script, attributeName) {
61565 var rawValue = script.getAttribute(attributeName);
61566 if (rawValue === '') {
61567 // Empty string means to not load ANY presets or plugins
61568 return [];
61569 }
61570 if (!rawValue) {
61571 // Any other falsy value (null, undefined) means we're not overriding this
61572 // setting, and should use the default.
61573 return null;
61574 }
61575 return rawValue.split(',').map(function (item) {
61576 return item.trim();
61577 });
61578 }
61579
61580 /**
61581 * Loop over provided script tags and get the content, via innerHTML if an
61582 * inline script, or by using XHR. Transforms are applied if needed. The scripts
61583 * are executed in the order they are found on the page.
61584 */
61585 function loadScripts(transformFn, scripts) {
61586 var result = [];
61587 var count = scripts.length;
61588
61589 function check() {
61590 var script, i;
61591
61592 for (i = 0; i < count; i++) {
61593 script = result[i];
61594
61595 if (script.loaded && !script.executed) {
61596 script.executed = true;
61597 run(transformFn, script);
61598 } else if (!script.loaded && !script.error && !script.async) {
61599 break;
61600 }
61601 }
61602 }
61603
61604 scripts.forEach(function (script, i) {
61605 var scriptData = {
61606 // script.async is always true for non-JavaScript script tags
61607 async: script.hasAttribute('async'),
61608 error: false,
61609 executed: false,
61610 plugins: getPluginsOrPresetsFromScript(script, 'data-plugins'),
61611 presets: getPluginsOrPresetsFromScript(script, 'data-presets')
61612 };
61613
61614 if (script.src) {
61615 result[i] = _extends({}, scriptData, {
61616 content: null,
61617 loaded: false,
61618 url: script.src
61619 });
61620
61621 load(script.src, function (content) {
61622 result[i].loaded = true;
61623 result[i].content = content;
61624 check();
61625 }, function () {
61626 result[i].error = true;
61627 check();
61628 });
61629 } else {
61630 result[i] = _extends({}, scriptData, {
61631 content: script.innerHTML,
61632 loaded: true,
61633 url: null
61634 });
61635 }
61636 });
61637
61638 check();
61639 }
61640
61641 /**
61642 * Run script tags with type="text/jsx".
61643 * @param {Array} scriptTags specify script tags to run, run all in the <head> if not given
61644 */
61645 function runScripts(transformFn, scripts) {
61646 headEl = document.getElementsByTagName('head')[0];
61647 if (!scripts) {
61648 scripts = document.getElementsByTagName('script');
61649 }
61650
61651 // Array.prototype.slice cannot be used on NodeList on IE8
61652 var jsxScripts = [];
61653 for (var i = 0; i < scripts.length; i++) {
61654 var script = scripts.item(i);
61655 // Support the old type="text/jsx;harmony=true"
61656 var type = script.type.split(';')[0];
61657 if (scriptTypes.indexOf(type) !== -1) {
61658 jsxScripts.push(script);
61659 }
61660 }
61661
61662 if (jsxScripts.length === 0) {
61663 return;
61664 }
61665
61666 console.warn('You are using the in-browser Babel transformer. Be sure to precompile ' + 'your scripts for production - https://babeljs.io/docs/setup/');
61667
61668 loadScripts(transformFn, jsxScripts);
61669 }
61670
61671/***/ }),
61672/* 630 */
61673/***/ (function(module, exports) {
61674
61675 module.exports = {"builtin":{"Array":false,"ArrayBuffer":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"String":false,"Symbol":false,"SyntaxError":false,"System":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es5":{"Array":false,"Boolean":false,"constructor":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"propertyIsEnumerable":false,"RangeError":false,"ReferenceError":false,"RegExp":false,"String":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false},"es6":{"Array":false,"ArrayBuffer":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"String":false,"Symbol":false,"SyntaxError":false,"System":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"browser":{"addEventListener":false,"alert":false,"AnalyserNode":false,"Animation":false,"AnimationEffectReadOnly":false,"AnimationEffectTiming":false,"AnimationEffectTimingReadOnly":false,"AnimationEvent":false,"AnimationPlaybackEvent":false,"AnimationTimeline":false,"applicationCache":false,"ApplicationCache":false,"ApplicationCacheErrorEvent":false,"atob":false,"Attr":false,"Audio":false,"AudioBuffer":false,"AudioBufferSourceNode":false,"AudioContext":false,"AudioDestinationNode":false,"AudioListener":false,"AudioNode":false,"AudioParam":false,"AudioProcessingEvent":false,"AutocompleteErrorEvent":false,"BarProp":false,"BatteryManager":false,"BeforeUnloadEvent":false,"BiquadFilterNode":false,"Blob":false,"blur":false,"btoa":false,"Cache":false,"caches":false,"CacheStorage":false,"cancelAnimationFrame":false,"cancelIdleCallback":false,"CanvasGradient":false,"CanvasPattern":false,"CanvasRenderingContext2D":false,"CDATASection":false,"ChannelMergerNode":false,"ChannelSplitterNode":false,"CharacterData":false,"clearInterval":false,"clearTimeout":false,"clientInformation":false,"ClientRect":false,"ClientRectList":false,"ClipboardEvent":false,"close":false,"closed":false,"CloseEvent":false,"Comment":false,"CompositionEvent":false,"confirm":false,"console":false,"ConvolverNode":false,"createImageBitmap":false,"Credential":false,"CredentialsContainer":false,"crypto":false,"Crypto":false,"CryptoKey":false,"CSS":false,"CSSAnimation":false,"CSSFontFaceRule":false,"CSSImportRule":false,"CSSKeyframeRule":false,"CSSKeyframesRule":false,"CSSMediaRule":false,"CSSPageRule":false,"CSSRule":false,"CSSRuleList":false,"CSSStyleDeclaration":false,"CSSStyleRule":false,"CSSStyleSheet":false,"CSSSupportsRule":false,"CSSTransition":false,"CSSUnknownRule":false,"CSSViewportRule":false,"customElements":false,"CustomEvent":false,"DataTransfer":false,"DataTransferItem":false,"DataTransferItemList":false,"Debug":false,"defaultStatus":false,"defaultstatus":false,"DelayNode":false,"DeviceMotionEvent":false,"DeviceOrientationEvent":false,"devicePixelRatio":false,"dispatchEvent":false,"document":false,"Document":false,"DocumentFragment":false,"DocumentTimeline":false,"DocumentType":false,"DOMError":false,"DOMException":false,"DOMImplementation":false,"DOMParser":false,"DOMSettableTokenList":false,"DOMStringList":false,"DOMStringMap":false,"DOMTokenList":false,"DragEvent":false,"DynamicsCompressorNode":false,"Element":false,"ElementTimeControl":false,"ErrorEvent":false,"event":false,"Event":false,"EventSource":false,"EventTarget":false,"external":false,"FederatedCredential":false,"fetch":false,"File":false,"FileError":false,"FileList":false,"FileReader":false,"find":false,"focus":false,"FocusEvent":false,"FontFace":false,"FormData":false,"frameElement":false,"frames":false,"GainNode":false,"Gamepad":false,"GamepadButton":false,"GamepadEvent":false,"getComputedStyle":false,"getSelection":false,"HashChangeEvent":false,"Headers":false,"history":false,"History":false,"HTMLAllCollection":false,"HTMLAnchorElement":false,"HTMLAppletElement":false,"HTMLAreaElement":false,"HTMLAudioElement":false,"HTMLBaseElement":false,"HTMLBlockquoteElement":false,"HTMLBodyElement":false,"HTMLBRElement":false,"HTMLButtonElement":false,"HTMLCanvasElement":false,"HTMLCollection":false,"HTMLContentElement":false,"HTMLDataListElement":false,"HTMLDetailsElement":false,"HTMLDialogElement":false,"HTMLDirectoryElement":false,"HTMLDivElement":false,"HTMLDListElement":false,"HTMLDocument":false,"HTMLElement":false,"HTMLEmbedElement":false,"HTMLFieldSetElement":false,"HTMLFontElement":false,"HTMLFormControlsCollection":false,"HTMLFormElement":false,"HTMLFrameElement":false,"HTMLFrameSetElement":false,"HTMLHeadElement":false,"HTMLHeadingElement":false,"HTMLHRElement":false,"HTMLHtmlElement":false,"HTMLIFrameElement":false,"HTMLImageElement":false,"HTMLInputElement":false,"HTMLIsIndexElement":false,"HTMLKeygenElement":false,"HTMLLabelElement":false,"HTMLLayerElement":false,"HTMLLegendElement":false,"HTMLLIElement":false,"HTMLLinkElement":false,"HTMLMapElement":false,"HTMLMarqueeElement":false,"HTMLMediaElement":false,"HTMLMenuElement":false,"HTMLMetaElement":false,"HTMLMeterElement":false,"HTMLModElement":false,"HTMLObjectElement":false,"HTMLOListElement":false,"HTMLOptGroupElement":false,"HTMLOptionElement":false,"HTMLOptionsCollection":false,"HTMLOutputElement":false,"HTMLParagraphElement":false,"HTMLParamElement":false,"HTMLPictureElement":false,"HTMLPreElement":false,"HTMLProgressElement":false,"HTMLQuoteElement":false,"HTMLScriptElement":false,"HTMLSelectElement":false,"HTMLShadowElement":false,"HTMLSourceElement":false,"HTMLSpanElement":false,"HTMLStyleElement":false,"HTMLTableCaptionElement":false,"HTMLTableCellElement":false,"HTMLTableColElement":false,"HTMLTableElement":false,"HTMLTableRowElement":false,"HTMLTableSectionElement":false,"HTMLTemplateElement":false,"HTMLTextAreaElement":false,"HTMLTitleElement":false,"HTMLTrackElement":false,"HTMLUListElement":false,"HTMLUnknownElement":false,"HTMLVideoElement":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBEnvironment":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"Image":false,"ImageBitmap":false,"ImageData":false,"indexedDB":false,"innerHeight":false,"innerWidth":false,"InputEvent":false,"InputMethodContext":false,"IntersectionObserver":false,"IntersectionObserverEntry":false,"Intl":false,"KeyboardEvent":false,"KeyframeEffect":false,"KeyframeEffectReadOnly":false,"length":false,"localStorage":false,"location":false,"Location":false,"locationbar":false,"matchMedia":false,"MediaElementAudioSourceNode":false,"MediaEncryptedEvent":false,"MediaError":false,"MediaKeyError":false,"MediaKeyEvent":false,"MediaKeyMessageEvent":false,"MediaKeys":false,"MediaKeySession":false,"MediaKeyStatusMap":false,"MediaKeySystemAccess":false,"MediaList":false,"MediaQueryList":false,"MediaQueryListEvent":false,"MediaSource":false,"MediaRecorder":false,"MediaStream":false,"MediaStreamAudioDestinationNode":false,"MediaStreamAudioSourceNode":false,"MediaStreamEvent":false,"MediaStreamTrack":false,"menubar":false,"MessageChannel":false,"MessageEvent":false,"MessagePort":false,"MIDIAccess":false,"MIDIConnectionEvent":false,"MIDIInput":false,"MIDIInputMap":false,"MIDIMessageEvent":false,"MIDIOutput":false,"MIDIOutputMap":false,"MIDIPort":false,"MimeType":false,"MimeTypeArray":false,"MouseEvent":false,"moveBy":false,"moveTo":false,"MutationEvent":false,"MutationObserver":false,"MutationRecord":false,"name":false,"NamedNodeMap":false,"navigator":false,"Navigator":false,"Node":false,"NodeFilter":false,"NodeIterator":false,"NodeList":false,"Notification":false,"OfflineAudioCompletionEvent":false,"OfflineAudioContext":false,"offscreenBuffering":false,"onbeforeunload":true,"onblur":true,"onerror":true,"onfocus":true,"onload":true,"onresize":true,"onunload":true,"open":false,"openDatabase":false,"opener":false,"opera":false,"Option":false,"OscillatorNode":false,"outerHeight":false,"outerWidth":false,"PageTransitionEvent":false,"pageXOffset":false,"pageYOffset":false,"parent":false,"PasswordCredential":false,"Path2D":false,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"PeriodicWave":false,"Permissions":false,"PermissionStatus":false,"personalbar":false,"Plugin":false,"PluginArray":false,"PopStateEvent":false,"postMessage":false,"print":false,"ProcessingInstruction":false,"ProgressEvent":false,"PromiseRejectionEvent":false,"prompt":false,"PushManager":false,"PushSubscription":false,"RadioNodeList":false,"Range":false,"ReadableByteStream":false,"ReadableStream":false,"removeEventListener":false,"Request":false,"requestAnimationFrame":false,"requestIdleCallback":false,"resizeBy":false,"resizeTo":false,"Response":false,"RTCIceCandidate":false,"RTCSessionDescription":false,"RTCPeerConnection":false,"screen":false,"Screen":false,"screenLeft":false,"ScreenOrientation":false,"screenTop":false,"screenX":false,"screenY":false,"ScriptProcessorNode":false,"scroll":false,"scrollbars":false,"scrollBy":false,"scrollTo":false,"scrollX":false,"scrollY":false,"SecurityPolicyViolationEvent":false,"Selection":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerRegistration":false,"sessionStorage":false,"setInterval":false,"setTimeout":false,"ShadowRoot":false,"SharedKeyframeList":false,"SharedWorker":false,"showModalDialog":false,"SiteBoundCredential":false,"speechSynthesis":false,"SpeechSynthesisEvent":false,"SpeechSynthesisUtterance":false,"status":false,"statusbar":false,"stop":false,"Storage":false,"StorageEvent":false,"styleMedia":false,"StyleSheet":false,"StyleSheetList":false,"SubtleCrypto":false,"SVGAElement":false,"SVGAltGlyphDefElement":false,"SVGAltGlyphElement":false,"SVGAltGlyphItemElement":false,"SVGAngle":false,"SVGAnimateColorElement":false,"SVGAnimatedAngle":false,"SVGAnimatedBoolean":false,"SVGAnimatedEnumeration":false,"SVGAnimatedInteger":false,"SVGAnimatedLength":false,"SVGAnimatedLengthList":false,"SVGAnimatedNumber":false,"SVGAnimatedNumberList":false,"SVGAnimatedPathData":false,"SVGAnimatedPoints":false,"SVGAnimatedPreserveAspectRatio":false,"SVGAnimatedRect":false,"SVGAnimatedString":false,"SVGAnimatedTransformList":false,"SVGAnimateElement":false,"SVGAnimateMotionElement":false,"SVGAnimateTransformElement":false,"SVGAnimationElement":false,"SVGCircleElement":false,"SVGClipPathElement":false,"SVGColor":false,"SVGColorProfileElement":false,"SVGColorProfileRule":false,"SVGComponentTransferFunctionElement":false,"SVGCSSRule":false,"SVGCursorElement":false,"SVGDefsElement":false,"SVGDescElement":false,"SVGDiscardElement":false,"SVGDocument":false,"SVGElement":false,"SVGElementInstance":false,"SVGElementInstanceList":false,"SVGEllipseElement":false,"SVGEvent":false,"SVGExternalResourcesRequired":false,"SVGFEBlendElement":false,"SVGFEColorMatrixElement":false,"SVGFEComponentTransferElement":false,"SVGFECompositeElement":false,"SVGFEConvolveMatrixElement":false,"SVGFEDiffuseLightingElement":false,"SVGFEDisplacementMapElement":false,"SVGFEDistantLightElement":false,"SVGFEDropShadowElement":false,"SVGFEFloodElement":false,"SVGFEFuncAElement":false,"SVGFEFuncBElement":false,"SVGFEFuncGElement":false,"SVGFEFuncRElement":false,"SVGFEGaussianBlurElement":false,"SVGFEImageElement":false,"SVGFEMergeElement":false,"SVGFEMergeNodeElement":false,"SVGFEMorphologyElement":false,"SVGFEOffsetElement":false,"SVGFEPointLightElement":false,"SVGFESpecularLightingElement":false,"SVGFESpotLightElement":false,"SVGFETileElement":false,"SVGFETurbulenceElement":false,"SVGFilterElement":false,"SVGFilterPrimitiveStandardAttributes":false,"SVGFitToViewBox":false,"SVGFontElement":false,"SVGFontFaceElement":false,"SVGFontFaceFormatElement":false,"SVGFontFaceNameElement":false,"SVGFontFaceSrcElement":false,"SVGFontFaceUriElement":false,"SVGForeignObjectElement":false,"SVGGElement":false,"SVGGeometryElement":false,"SVGGlyphElement":false,"SVGGlyphRefElement":false,"SVGGradientElement":false,"SVGGraphicsElement":false,"SVGHKernElement":false,"SVGICCColor":false,"SVGImageElement":false,"SVGLangSpace":false,"SVGLength":false,"SVGLengthList":false,"SVGLinearGradientElement":false,"SVGLineElement":false,"SVGLocatable":false,"SVGMarkerElement":false,"SVGMaskElement":false,"SVGMatrix":false,"SVGMetadataElement":false,"SVGMissingGlyphElement":false,"SVGMPathElement":false,"SVGNumber":false,"SVGNumberList":false,"SVGPaint":false,"SVGPathElement":false,"SVGPathSeg":false,"SVGPathSegArcAbs":false,"SVGPathSegArcRel":false,"SVGPathSegClosePath":false,"SVGPathSegCurvetoCubicAbs":false,"SVGPathSegCurvetoCubicRel":false,"SVGPathSegCurvetoCubicSmoothAbs":false,"SVGPathSegCurvetoCubicSmoothRel":false,"SVGPathSegCurvetoQuadraticAbs":false,"SVGPathSegCurvetoQuadraticRel":false,"SVGPathSegCurvetoQuadraticSmoothAbs":false,"SVGPathSegCurvetoQuadraticSmoothRel":false,"SVGPathSegLinetoAbs":false,"SVGPathSegLinetoHorizontalAbs":false,"SVGPathSegLinetoHorizontalRel":false,"SVGPathSegLinetoRel":false,"SVGPathSegLinetoVerticalAbs":false,"SVGPathSegLinetoVerticalRel":false,"SVGPathSegList":false,"SVGPathSegMovetoAbs":false,"SVGPathSegMovetoRel":false,"SVGPatternElement":false,"SVGPoint":false,"SVGPointList":false,"SVGPolygonElement":false,"SVGPolylineElement":false,"SVGPreserveAspectRatio":false,"SVGRadialGradientElement":false,"SVGRect":false,"SVGRectElement":false,"SVGRenderingIntent":false,"SVGScriptElement":false,"SVGSetElement":false,"SVGStopElement":false,"SVGStringList":false,"SVGStylable":false,"SVGStyleElement":false,"SVGSVGElement":false,"SVGSwitchElement":false,"SVGSymbolElement":false,"SVGTests":false,"SVGTextContentElement":false,"SVGTextElement":false,"SVGTextPathElement":false,"SVGTextPositioningElement":false,"SVGTitleElement":false,"SVGTransform":false,"SVGTransformable":false,"SVGTransformList":false,"SVGTRefElement":false,"SVGTSpanElement":false,"SVGUnitTypes":false,"SVGURIReference":false,"SVGUseElement":false,"SVGViewElement":false,"SVGViewSpec":false,"SVGVKernElement":false,"SVGZoomAndPan":false,"SVGZoomEvent":false,"Text":false,"TextDecoder":false,"TextEncoder":false,"TextEvent":false,"TextMetrics":false,"TextTrack":false,"TextTrackCue":false,"TextTrackCueList":false,"TextTrackList":false,"TimeEvent":false,"TimeRanges":false,"toolbar":false,"top":false,"Touch":false,"TouchEvent":false,"TouchList":false,"TrackEvent":false,"TransitionEvent":false,"TreeWalker":false,"UIEvent":false,"URL":false,"URLSearchParams":false,"ValidityState":false,"VTTCue":false,"WaveShaperNode":false,"WebGLActiveInfo":false,"WebGLBuffer":false,"WebGLContextEvent":false,"WebGLFramebuffer":false,"WebGLProgram":false,"WebGLRenderbuffer":false,"WebGLRenderingContext":false,"WebGLShader":false,"WebGLShaderPrecisionFormat":false,"WebGLTexture":false,"WebGLUniformLocation":false,"WebSocket":false,"WheelEvent":false,"window":false,"Window":false,"Worker":false,"XDomainRequest":false,"XMLDocument":false,"XMLHttpRequest":false,"XMLHttpRequestEventTarget":false,"XMLHttpRequestProgressEvent":false,"XMLHttpRequestUpload":false,"XMLSerializer":false,"XPathEvaluator":false,"XPathException":false,"XPathExpression":false,"XPathNamespace":false,"XPathNSResolver":false,"XPathResult":false,"XSLTProcessor":false},"worker":{"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"clearInterval":false,"clearTimeout":false,"close":true,"console":false,"fetch":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":true,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onlanguagechange":true,"onmessage":true,"onoffline":true,"ononline":true,"onrejectionhandled":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"Request":false,"Response":false,"self":true,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"Worker":false,"XMLHttpRequest":false},"node":{"__dirname":false,"__filename":false,"arguments":false,"Buffer":false,"clearImmediate":false,"clearInterval":false,"clearTimeout":false,"console":false,"exports":true,"GLOBAL":false,"global":false,"Intl":false,"module":false,"process":false,"require":false,"root":false,"setImmediate":false,"setInterval":false,"setTimeout":false},"commonjs":{"exports":true,"module":false,"require":false,"global":false},"amd":{"define":false,"require":false},"mocha":{"after":false,"afterEach":false,"before":false,"beforeEach":false,"context":false,"describe":false,"it":false,"mocha":false,"run":false,"setup":false,"specify":false,"suite":false,"suiteSetup":false,"suiteTeardown":false,"teardown":false,"test":false,"xcontext":false,"xdescribe":false,"xit":false,"xspecify":false},"jasmine":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fail":false,"fdescribe":false,"fit":false,"it":false,"jasmine":false,"pending":false,"runs":false,"spyOn":false,"spyOnProperty":false,"waits":false,"waitsFor":false,"xdescribe":false,"xit":false},"jest":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"check":false,"describe":false,"expect":false,"gen":false,"it":false,"fdescribe":false,"fit":false,"jest":false,"pit":false,"require":false,"test":false,"xdescribe":false,"xit":false,"xtest":false},"qunit":{"asyncTest":false,"deepEqual":false,"equal":false,"expect":false,"module":false,"notDeepEqual":false,"notEqual":false,"notOk":false,"notPropEqual":false,"notStrictEqual":false,"ok":false,"propEqual":false,"QUnit":false,"raises":false,"start":false,"stop":false,"strictEqual":false,"test":false,"throws":false},"phantomjs":{"console":true,"exports":true,"phantom":true,"require":true,"WebPage":true},"couch":{"emit":false,"exports":false,"getRow":false,"log":false,"module":false,"provides":false,"require":false,"respond":false,"send":false,"start":false,"sum":false},"rhino":{"defineClass":false,"deserialize":false,"gc":false,"help":false,"importClass":false,"importPackage":false,"java":false,"load":false,"loadClass":false,"Packages":false,"print":false,"quit":false,"readFile":false,"readUrl":false,"runCommand":false,"seal":false,"serialize":false,"spawn":false,"sync":false,"toint32":false,"version":false},"nashorn":{"__DIR__":false,"__FILE__":false,"__LINE__":false,"com":false,"edu":false,"exit":false,"Java":false,"java":false,"javafx":false,"JavaImporter":false,"javax":false,"JSAdapter":false,"load":false,"loadWithNewGlobal":false,"org":false,"Packages":false,"print":false,"quit":false},"wsh":{"ActiveXObject":true,"Enumerator":true,"GetObject":true,"ScriptEngine":true,"ScriptEngineBuildVersion":true,"ScriptEngineMajorVersion":true,"ScriptEngineMinorVersion":true,"VBArray":true,"WScript":true,"WSH":true,"XDomainRequest":true},"jquery":{"$":false,"jQuery":false},"yui":{"Y":false,"YUI":false,"YUI_config":false},"shelljs":{"cat":false,"cd":false,"chmod":false,"config":false,"cp":false,"dirs":false,"echo":false,"env":false,"error":false,"exec":false,"exit":false,"find":false,"grep":false,"ls":false,"ln":false,"mkdir":false,"mv":false,"popd":false,"pushd":false,"pwd":false,"rm":false,"sed":false,"set":false,"target":false,"tempdir":false,"test":false,"touch":false,"which":false},"prototypejs":{"$":false,"$$":false,"$A":false,"$break":false,"$continue":false,"$F":false,"$H":false,"$R":false,"$w":false,"Abstract":false,"Ajax":false,"Autocompleter":false,"Builder":false,"Class":false,"Control":false,"Draggable":false,"Draggables":false,"Droppables":false,"Effect":false,"Element":false,"Enumerable":false,"Event":false,"Field":false,"Form":false,"Hash":false,"Insertion":false,"ObjectRange":false,"PeriodicalExecuter":false,"Position":false,"Prototype":false,"Scriptaculous":false,"Selector":false,"Sortable":false,"SortableObserver":false,"Sound":false,"Template":false,"Toggle":false,"Try":false},"meteor":{"$":false,"_":false,"Accounts":false,"AccountsClient":false,"AccountsServer":false,"AccountsCommon":false,"App":false,"Assets":false,"Blaze":false,"check":false,"Cordova":false,"DDP":false,"DDPServer":false,"DDPRateLimiter":false,"Deps":false,"EJSON":false,"Email":false,"HTTP":false,"Log":false,"Match":false,"Meteor":false,"Mongo":false,"MongoInternals":false,"Npm":false,"Package":false,"Plugin":false,"process":false,"Random":false,"ReactiveDict":false,"ReactiveVar":false,"Router":false,"ServiceConfiguration":false,"Session":false,"share":false,"Spacebars":false,"Template":false,"Tinytest":false,"Tracker":false,"UI":false,"Utils":false,"WebApp":false,"WebAppInternals":false},"mongo":{"_isWindows":false,"_rand":false,"BulkWriteResult":false,"cat":false,"cd":false,"connect":false,"db":false,"getHostName":false,"getMemInfo":false,"hostname":false,"ISODate":false,"listFiles":false,"load":false,"ls":false,"md5sumFile":false,"mkdir":false,"Mongo":false,"NumberInt":false,"NumberLong":false,"ObjectId":false,"PlanCache":false,"print":false,"printjson":false,"pwd":false,"quit":false,"removeFile":false,"rs":false,"sh":false,"UUID":false,"version":false,"WriteResult":false},"applescript":{"$":false,"Application":false,"Automation":false,"console":false,"delay":false,"Library":false,"ObjC":false,"ObjectSpecifier":false,"Path":false,"Progress":false,"Ref":false},"serviceworker":{"caches":false,"Cache":false,"CacheStorage":false,"Client":false,"clients":false,"Clients":false,"ExtendableEvent":false,"ExtendableMessageEvent":false,"FetchEvent":false,"importScripts":false,"registration":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerGlobalScope":false,"ServiceWorkerMessageEvent":false,"ServiceWorkerRegistration":false,"skipWaiting":false,"WindowClient":false},"atomtest":{"advanceClock":false,"fakeClearInterval":false,"fakeClearTimeout":false,"fakeSetInterval":false,"fakeSetTimeout":false,"resetTimeouts":false,"waitsForPromise":false},"embertest":{"andThen":false,"click":false,"currentPath":false,"currentRouteName":false,"currentURL":false,"fillIn":false,"find":false,"findWithAssert":false,"keyEvent":false,"pauseTest":false,"resumeTest":false,"triggerEvent":false,"visit":false},"protractor":{"$":false,"$$":false,"browser":false,"By":false,"by":false,"DartObject":false,"element":false,"protractor":false},"shared-node-browser":{"clearInterval":false,"clearTimeout":false,"console":false,"setInterval":false,"setTimeout":false},"webextensions":{"browser":false,"chrome":false,"opr":false},"greasemonkey":{"GM_addStyle":false,"GM_deleteValue":false,"GM_getResourceText":false,"GM_getResourceURL":false,"GM_getValue":false,"GM_info":false,"GM_listValues":false,"GM_log":false,"GM_openInTab":false,"GM_registerMenuCommand":false,"GM_setClipboard":false,"GM_setValue":false,"GM_xmlhttpRequest":false,"unsafeWindow":false}}
61676
61677/***/ }),
61678/* 631 */
61679/***/ (function(module, exports) {
61680
61681 module.exports = {"75":8490,"83":383,"107":8490,"115":383,"181":924,"197":8491,"383":83,"452":453,"453":452,"455":456,"456":455,"458":459,"459":458,"497":498,"498":497,"837":8126,"914":976,"917":1013,"920":1012,"921":8126,"922":1008,"924":181,"928":982,"929":1009,"931":962,"934":981,"937":8486,"962":931,"976":914,"977":1012,"981":934,"982":928,"1008":922,"1009":929,"1012":[920,977],"1013":917,"7776":7835,"7835":7776,"8126":[837,921],"8486":937,"8490":75,"8491":197,"66560":66600,"66561":66601,"66562":66602,"66563":66603,"66564":66604,"66565":66605,"66566":66606,"66567":66607,"66568":66608,"66569":66609,"66570":66610,"66571":66611,"66572":66612,"66573":66613,"66574":66614,"66575":66615,"66576":66616,"66577":66617,"66578":66618,"66579":66619,"66580":66620,"66581":66621,"66582":66622,"66583":66623,"66584":66624,"66585":66625,"66586":66626,"66587":66627,"66588":66628,"66589":66629,"66590":66630,"66591":66631,"66592":66632,"66593":66633,"66594":66634,"66595":66635,"66596":66636,"66597":66637,"66598":66638,"66599":66639,"66600":66560,"66601":66561,"66602":66562,"66603":66563,"66604":66564,"66605":66565,"66606":66566,"66607":66567,"66608":66568,"66609":66569,"66610":66570,"66611":66571,"66612":66572,"66613":66573,"66614":66574,"66615":66575,"66616":66576,"66617":66577,"66618":66578,"66619":66579,"66620":66580,"66621":66581,"66622":66582,"66623":66583,"66624":66584,"66625":66585,"66626":66586,"66627":66587,"66628":66588,"66629":66589,"66630":66590,"66631":66591,"66632":66592,"66633":66593,"66634":66594,"66635":66595,"66636":66596,"66637":66597,"66638":66598,"66639":66599,"68736":68800,"68737":68801,"68738":68802,"68739":68803,"68740":68804,"68741":68805,"68742":68806,"68743":68807,"68744":68808,"68745":68809,"68746":68810,"68747":68811,"68748":68812,"68749":68813,"68750":68814,"68751":68815,"68752":68816,"68753":68817,"68754":68818,"68755":68819,"68756":68820,"68757":68821,"68758":68822,"68759":68823,"68760":68824,"68761":68825,"68762":68826,"68763":68827,"68764":68828,"68765":68829,"68766":68830,"68767":68831,"68768":68832,"68769":68833,"68770":68834,"68771":68835,"68772":68836,"68773":68837,"68774":68838,"68775":68839,"68776":68840,"68777":68841,"68778":68842,"68779":68843,"68780":68844,"68781":68845,"68782":68846,"68783":68847,"68784":68848,"68785":68849,"68786":68850,"68800":68736,"68801":68737,"68802":68738,"68803":68739,"68804":68740,"68805":68741,"68806":68742,"68807":68743,"68808":68744,"68809":68745,"68810":68746,"68811":68747,"68812":68748,"68813":68749,"68814":68750,"68815":68751,"68816":68752,"68817":68753,"68818":68754,"68819":68755,"68820":68756,"68821":68757,"68822":68758,"68823":68759,"68824":68760,"68825":68761,"68826":68762,"68827":68763,"68828":68764,"68829":68765,"68830":68766,"68831":68767,"68832":68768,"68833":68769,"68834":68770,"68835":68771,"68836":68772,"68837":68773,"68838":68774,"68839":68775,"68840":68776,"68841":68777,"68842":68778,"68843":68779,"68844":68780,"68845":68781,"68846":68782,"68847":68783,"68848":68784,"68849":68785,"68850":68786,"71840":71872,"71841":71873,"71842":71874,"71843":71875,"71844":71876,"71845":71877,"71846":71878,"71847":71879,"71848":71880,"71849":71881,"71850":71882,"71851":71883,"71852":71884,"71853":71885,"71854":71886,"71855":71887,"71856":71888,"71857":71889,"71858":71890,"71859":71891,"71860":71892,"71861":71893,"71862":71894,"71863":71895,"71864":71896,"71865":71897,"71866":71898,"71867":71899,"71868":71900,"71869":71901,"71870":71902,"71871":71903,"71872":71840,"71873":71841,"71874":71842,"71875":71843,"71876":71844,"71877":71845,"71878":71846,"71879":71847,"71880":71848,"71881":71849,"71882":71850,"71883":71851,"71884":71852,"71885":71853,"71886":71854,"71887":71855,"71888":71856,"71889":71857,"71890":71858,"71891":71859,"71892":71860,"71893":71861,"71894":71862,"71895":71863,"71896":71864,"71897":71865,"71898":71866,"71899":71867,"71900":71868,"71901":71869,"71902":71870,"71903":71871}
61682
61683/***/ })
61684/******/ ])))
61685});
61686;
\No newline at end of file