diff --git a/.gitignore b/.gitignore index 0a601d7..d5f19d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ node_modules -jspm_packages +package-lock.json diff --git a/LICENSE b/LICENSE index 8f54af3..0ac347c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ MIT License ----------- -Copyright (C) 2016 Guy Bedford +Copyright (C) 2016-2018 Guy Bedford Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/babel-helpers.js b/babel-helpers.js deleted file mode 100644 index 8cddd50..0000000 --- a/babel-helpers.js +++ /dev/null @@ -1,558 +0,0 @@ -(function (global) { - var babelHelpers = global.babelHelpers = {}; - babelHelpers.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; - }; - - babelHelpers.jsx = function () { - var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; - return function createRawReactElement(type, props, key, children) { - var defaultProps = type && type.defaultProps; - var childrenLength = arguments.length - 3; - - if (!props && childrenLength !== 0) { - props = {}; - } - - if (props && defaultProps) { - for (var propName in defaultProps) { - if (props[propName] === void 0) { - props[propName] = defaultProps[propName]; - } - } - } else if (!props) { - props = defaultProps || {}; - } - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 3]; - } - - props.children = childArray; - } - - return { - $$typeof: REACT_ELEMENT_TYPE, - type: type, - key: key === undefined ? null : '' + key, - ref: null, - props: props, - _owner: null - }; - }; - }(); - - babelHelpers.asyncIterator = function (iterable) { - if (typeof Symbol === "function") { - if (Symbol.asyncIterator) { - var method = iterable[Symbol.asyncIterator]; - if (method != null) return method.call(iterable); - } - - if (Symbol.iterator) { - return iterable[Symbol.iterator](); - } - } - - throw new TypeError("Object is not async iterable"); - }; - - babelHelpers.asyncGenerator = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - Promise.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function (fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function (value) { - return new AwaitValue(value); - } - }; - }(); - - babelHelpers.asyncGeneratorDelegate = function (inner, awaitWrap) { - var iter = {}, - waiting = false; - - function pump(key, value) { - waiting = true; - value = new Promise(function (resolve) { - resolve(inner[key](value)); - }); - return { - done: false, - value: awaitWrap(value) - }; - } - - ; - - if (typeof Symbol === "function" && Symbol.iterator) { - iter[Symbol.iterator] = function () { - return this; - }; - } - - iter.next = function (value) { - if (waiting) { - waiting = false; - return value; - } - - return pump("next", value); - }; - - if (typeof inner.throw === "function") { - iter.throw = function (value) { - if (waiting) { - waiting = false; - throw value; - } - - return pump("throw", value); - }; - } - - if (typeof inner.return === "function") { - iter.return = function (value) { - return pump("return", value); - }; - } - - return iter; - }; - - babelHelpers.asyncToGenerator = function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new Promise(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return Promise.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; - }; - - babelHelpers.classCallCheck = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - }; - - babelHelpers.createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - babelHelpers.defineEnumerableProperties = function (obj, descs) { - for (var key in descs) { - var desc = descs[key]; - desc.configurable = desc.enumerable = true; - if ("value" in desc) desc.writable = true; - Object.defineProperty(obj, key, desc); - } - - return obj; - }; - - babelHelpers.defaults = function (obj, defaults) { - var keys = Object.getOwnPropertyNames(defaults); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = Object.getOwnPropertyDescriptor(defaults, key); - - if (value && value.configurable && obj[key] === undefined) { - Object.defineProperty(obj, key, value); - } - } - - return obj; - }; - - babelHelpers.defineProperty = function (obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; - }; - - babelHelpers.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; - }; - - babelHelpers.get = function get(object, property, receiver) { - if (object === null) object = Function.prototype; - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent === null) { - return undefined; - } else { - return get(parent, property, receiver); - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - - return getter.call(receiver); - } - }; - - babelHelpers.inherits = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - }; - - babelHelpers.instanceof = function (left, right) { - if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { - return right[Symbol.hasInstance](left); - } else { - return left instanceof right; - } - }; - - babelHelpers.interopRequireDefault = function (obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - }; - - babelHelpers.interopRequireWildcard = function (obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - } - - newObj.default = obj; - return newObj; - } - }; - - babelHelpers.newArrowCheck = function (innerThis, boundThis) { - if (innerThis !== boundThis) { - throw new TypeError("Cannot instantiate an arrow function"); - } - }; - - babelHelpers.objectDestructuringEmpty = function (obj) { - if (obj == null) throw new TypeError("Cannot destructure undefined"); - }; - - babelHelpers.objectWithoutProperties = function (obj, keys) { - var target = {}; - - for (var i in obj) { - if (keys.indexOf(i) >= 0) continue; - if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; - target[i] = obj[i]; - } - - return target; - }; - - babelHelpers.possibleConstructorReturn = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; - }; - - babelHelpers.selfGlobal = typeof global === "undefined" ? self : global; - - babelHelpers.set = function set(object, property, value, receiver) { - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent !== null) { - set(parent, property, value, receiver); - } - } else if ("value" in desc && desc.writable) { - desc.value = value; - } else { - var setter = desc.set; - - if (setter !== undefined) { - setter.call(receiver, value); - } - } - - return value; - }; - - babelHelpers.slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; - }(); - - babelHelpers.slicedToArrayLoose = function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - var _arr = []; - - for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { - _arr.push(_step.value); - - if (i && _arr.length === i) break; - } - - return _arr; - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; - - babelHelpers.taggedTemplateLiteral = function (strings, raw) { - return Object.freeze(Object.defineProperties(strings, { - raw: { - value: Object.freeze(raw) - } - })); - }; - - babelHelpers.taggedTemplateLiteralLoose = function (strings, raw) { - strings.raw = raw; - return strings; - }; - - babelHelpers.temporalRef = function (val, name, undef) { - if (val === undef) { - throw new ReferenceError(name + " is not defined - temporal dead zone"); - } else { - return val; - } - }; - - babelHelpers.temporalUndefined = {}; - - babelHelpers.toArray = function (arr) { - return Array.isArray(arr) ? arr : Array.from(arr); - }; - - babelHelpers.toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } - }; -})(typeof global === "undefined" ? self : global); diff --git a/babel-helpers/asyncGenerator.js b/babel-helpers/asyncGenerator.js deleted file mode 100644 index f1a21a6..0000000 --- a/babel-helpers/asyncGenerator.js +++ /dev/null @@ -1,112 +0,0 @@ -export default (function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - Promise.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function (fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function (value) { - return new AwaitValue(value); - } - }; -})(); \ No newline at end of file diff --git a/babel-helpers/asyncGeneratorDelegate.js b/babel-helpers/asyncGeneratorDelegate.js deleted file mode 100644 index 286d2d3..0000000 --- a/babel-helpers/asyncGeneratorDelegate.js +++ /dev/null @@ -1,51 +0,0 @@ -export default (function (inner, awaitWrap) { - var iter = {}, - waiting = false; - - function pump(key, value) { - waiting = true; - value = new Promise(function (resolve) { - resolve(inner[key](value)); - }); - return { - done: false, - value: awaitWrap(value) - }; - } - - ; - - if (typeof Symbol === "function" && Symbol.iterator) { - iter[Symbol.iterator] = function () { - return this; - }; - } - - iter.next = function (value) { - if (waiting) { - waiting = false; - return value; - } - - return pump("next", value); - }; - - if (typeof inner.throw === "function") { - iter.throw = function (value) { - if (waiting) { - waiting = false; - throw value; - } - - return pump("throw", value); - }; - } - - if (typeof inner.return === "function") { - iter.return = function (value) { - return pump("return", value); - }; - } - - return iter; -}); \ No newline at end of file diff --git a/babel-helpers/asyncIterator.js b/babel-helpers/asyncIterator.js deleted file mode 100644 index 81e46fe..0000000 --- a/babel-helpers/asyncIterator.js +++ /dev/null @@ -1,14 +0,0 @@ -export default (function (iterable) { - if (typeof Symbol === "function") { - if (Symbol.asyncIterator) { - var method = iterable[Symbol.asyncIterator]; - if (method != null) return method.call(iterable); - } - - if (Symbol.iterator) { - return iterable[Symbol.iterator](); - } - } - - throw new TypeError("Object is not async iterable"); -}); \ No newline at end of file diff --git a/babel-helpers/asyncToGenerator.js b/babel-helpers/asyncToGenerator.js deleted file mode 100644 index 6e1edcd..0000000 --- a/babel-helpers/asyncToGenerator.js +++ /dev/null @@ -1,28 +0,0 @@ -export default (function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new Promise(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return Promise.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}); \ No newline at end of file diff --git a/babel-helpers/classCallCheck.js b/babel-helpers/classCallCheck.js deleted file mode 100644 index ff4b39a..0000000 --- a/babel-helpers/classCallCheck.js +++ /dev/null @@ -1,5 +0,0 @@ -export default (function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}); \ No newline at end of file diff --git a/babel-helpers/createClass.js b/babel-helpers/createClass.js deleted file mode 100644 index 07ad75d..0000000 --- a/babel-helpers/createClass.js +++ /dev/null @@ -1,17 +0,0 @@ -export default (function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; -})(); \ No newline at end of file diff --git a/babel-helpers/defaults.js b/babel-helpers/defaults.js deleted file mode 100644 index 69d93d9..0000000 --- a/babel-helpers/defaults.js +++ /dev/null @@ -1,14 +0,0 @@ -export default (function (obj, defaults) { - var keys = Object.getOwnPropertyNames(defaults); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = Object.getOwnPropertyDescriptor(defaults, key); - - if (value && value.configurable && obj[key] === undefined) { - Object.defineProperty(obj, key, value); - } - } - - return obj; -}); \ No newline at end of file diff --git a/babel-helpers/defineEnumerableProperties.js b/babel-helpers/defineEnumerableProperties.js deleted file mode 100644 index cd58559..0000000 --- a/babel-helpers/defineEnumerableProperties.js +++ /dev/null @@ -1,10 +0,0 @@ -export default (function (obj, descs) { - for (var key in descs) { - var desc = descs[key]; - desc.configurable = desc.enumerable = true; - if ("value" in desc) desc.writable = true; - Object.defineProperty(obj, key, desc); - } - - return obj; -}); \ No newline at end of file diff --git a/babel-helpers/defineProperty.js b/babel-helpers/defineProperty.js deleted file mode 100644 index ac12800..0000000 --- a/babel-helpers/defineProperty.js +++ /dev/null @@ -1,14 +0,0 @@ -export default (function (obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -}); \ No newline at end of file diff --git a/babel-helpers/extends.js b/babel-helpers/extends.js deleted file mode 100644 index 4cbfc7b..0000000 --- a/babel-helpers/extends.js +++ /dev/null @@ -1,13 +0,0 @@ -export default 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; -}; \ No newline at end of file diff --git a/babel-helpers/get.js b/babel-helpers/get.js deleted file mode 100644 index 4099620..0000000 --- a/babel-helpers/get.js +++ /dev/null @@ -1,24 +0,0 @@ -export default (function get(object, property, receiver) { - if (object === null) object = Function.prototype; - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent === null) { - return undefined; - } else { - return get(parent, property, receiver); - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - - return getter.call(receiver); - } -}); \ No newline at end of file diff --git a/babel-helpers/inherits.js b/babel-helpers/inherits.js deleted file mode 100644 index 1c8b850..0000000 --- a/babel-helpers/inherits.js +++ /dev/null @@ -1,15 +0,0 @@ -export default (function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; -}); \ No newline at end of file diff --git a/babel-helpers/instanceof.js b/babel-helpers/instanceof.js deleted file mode 100644 index 90c00e3..0000000 --- a/babel-helpers/instanceof.js +++ /dev/null @@ -1,7 +0,0 @@ -export default (function (left, right) { - if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { - return right[Symbol.hasInstance](left); - } else { - return left instanceof right; - } -}); \ No newline at end of file diff --git a/babel-helpers/interopRequireDefault.js b/babel-helpers/interopRequireDefault.js deleted file mode 100644 index 51f6326..0000000 --- a/babel-helpers/interopRequireDefault.js +++ /dev/null @@ -1,5 +0,0 @@ -export default (function (obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; -}); \ No newline at end of file diff --git a/babel-helpers/interopRequireWildcard.js b/babel-helpers/interopRequireWildcard.js deleted file mode 100644 index 6e035a6..0000000 --- a/babel-helpers/interopRequireWildcard.js +++ /dev/null @@ -1,16 +0,0 @@ -export default (function (obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - } - - newObj.default = obj; - return newObj; - } -}); \ No newline at end of file diff --git a/babel-helpers/jsx.js b/babel-helpers/jsx.js deleted file mode 100644 index b99cdc6..0000000 --- a/babel-helpers/jsx.js +++ /dev/null @@ -1,42 +0,0 @@ -export default (function () { - var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; - return function createRawReactElement(type, props, key, children) { - var defaultProps = type && type.defaultProps; - var childrenLength = arguments.length - 3; - - if (!props && childrenLength !== 0) { - props = {}; - } - - if (props && defaultProps) { - for (var propName in defaultProps) { - if (props[propName] === void 0) { - props[propName] = defaultProps[propName]; - } - } - } else if (!props) { - props = defaultProps || {}; - } - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 3]; - } - - props.children = childArray; - } - - return { - $$typeof: REACT_ELEMENT_TYPE, - type: type, - key: key === undefined ? null : '' + key, - ref: null, - props: props, - _owner: null - }; - }; -})(); \ No newline at end of file diff --git a/babel-helpers/newArrowCheck.js b/babel-helpers/newArrowCheck.js deleted file mode 100644 index 34a52bc..0000000 --- a/babel-helpers/newArrowCheck.js +++ /dev/null @@ -1,5 +0,0 @@ -export default (function (innerThis, boundThis) { - if (innerThis !== boundThis) { - throw new TypeError("Cannot instantiate an arrow function"); - } -}); \ No newline at end of file diff --git a/babel-helpers/objectDestructuringEmpty.js b/babel-helpers/objectDestructuringEmpty.js deleted file mode 100644 index 6b94eea..0000000 --- a/babel-helpers/objectDestructuringEmpty.js +++ /dev/null @@ -1,3 +0,0 @@ -export default (function (obj) { - if (obj == null) throw new TypeError("Cannot destructure undefined"); -}); \ No newline at end of file diff --git a/babel-helpers/objectWithoutProperties.js b/babel-helpers/objectWithoutProperties.js deleted file mode 100644 index 0b47d3d..0000000 --- a/babel-helpers/objectWithoutProperties.js +++ /dev/null @@ -1,11 +0,0 @@ -export default (function (obj, keys) { - var target = {}; - - for (var i in obj) { - if (keys.indexOf(i) >= 0) continue; - if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; - target[i] = obj[i]; - } - - return target; -}); \ No newline at end of file diff --git a/babel-helpers/possibleConstructorReturn.js b/babel-helpers/possibleConstructorReturn.js deleted file mode 100644 index eba26bf..0000000 --- a/babel-helpers/possibleConstructorReturn.js +++ /dev/null @@ -1,7 +0,0 @@ -export default (function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; -}); \ No newline at end of file diff --git a/babel-helpers/selfGlobal.js b/babel-helpers/selfGlobal.js deleted file mode 100644 index 6807a4f..0000000 --- a/babel-helpers/selfGlobal.js +++ /dev/null @@ -1 +0,0 @@ -export default typeof global === "undefined" ? self : global; \ No newline at end of file diff --git a/babel-helpers/set.js b/babel-helpers/set.js deleted file mode 100644 index f451b05..0000000 --- a/babel-helpers/set.js +++ /dev/null @@ -1,21 +0,0 @@ -export default (function set(object, property, value, receiver) { - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent !== null) { - set(parent, property, value, receiver); - } - } else if ("value" in desc && desc.writable) { - desc.value = value; - } else { - var setter = desc.set; - - if (setter !== undefined) { - setter.call(receiver, value); - } - } - - return value; -}); \ No newline at end of file diff --git a/babel-helpers/slicedToArray.js b/babel-helpers/slicedToArray.js deleted file mode 100644 index 0da38ab..0000000 --- a/babel-helpers/slicedToArray.js +++ /dev/null @@ -1,37 +0,0 @@ -export default (function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -})(); \ No newline at end of file diff --git a/babel-helpers/slicedToArrayLoose.js b/babel-helpers/slicedToArrayLoose.js deleted file mode 100644 index 0be9a5b..0000000 --- a/babel-helpers/slicedToArrayLoose.js +++ /dev/null @@ -1,17 +0,0 @@ -export default (function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - var _arr = []; - - for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { - _arr.push(_step.value); - - if (i && _arr.length === i) break; - } - - return _arr; - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } -}); \ No newline at end of file diff --git a/babel-helpers/taggedTemplateLiteral.js b/babel-helpers/taggedTemplateLiteral.js deleted file mode 100644 index 51e894a..0000000 --- a/babel-helpers/taggedTemplateLiteral.js +++ /dev/null @@ -1,7 +0,0 @@ -export default (function (strings, raw) { - return Object.freeze(Object.defineProperties(strings, { - raw: { - value: Object.freeze(raw) - } - })); -}); \ No newline at end of file diff --git a/babel-helpers/taggedTemplateLiteralLoose.js b/babel-helpers/taggedTemplateLiteralLoose.js deleted file mode 100644 index 6207cf2..0000000 --- a/babel-helpers/taggedTemplateLiteralLoose.js +++ /dev/null @@ -1,4 +0,0 @@ -export default (function (strings, raw) { - strings.raw = raw; - return strings; -}); \ No newline at end of file diff --git a/babel-helpers/temporalRef.js b/babel-helpers/temporalRef.js deleted file mode 100644 index 1006dd2..0000000 --- a/babel-helpers/temporalRef.js +++ /dev/null @@ -1,7 +0,0 @@ -export default (function (val, name, undef) { - if (val === undef) { - throw new ReferenceError(name + " is not defined - temporal dead zone"); - } else { - return val; - } -}); \ No newline at end of file diff --git a/babel-helpers/temporalUndefined.js b/babel-helpers/temporalUndefined.js deleted file mode 100644 index 7c645e4..0000000 --- a/babel-helpers/temporalUndefined.js +++ /dev/null @@ -1 +0,0 @@ -export default {}; \ No newline at end of file diff --git a/babel-helpers/toArray.js b/babel-helpers/toArray.js deleted file mode 100644 index 72a2498..0000000 --- a/babel-helpers/toArray.js +++ /dev/null @@ -1,3 +0,0 @@ -export default (function (arr) { - return Array.isArray(arr) ? arr : Array.from(arr); -}); \ No newline at end of file diff --git a/babel-helpers/toConsumableArray.js b/babel-helpers/toConsumableArray.js deleted file mode 100644 index a993452..0000000 --- a/babel-helpers/toConsumableArray.js +++ /dev/null @@ -1,9 +0,0 @@ -export default (function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } -}); \ No newline at end of file diff --git a/babel-helpers/typeof.js b/babel-helpers/typeof.js deleted file mode 100644 index 40bdd27..0000000 --- a/babel-helpers/typeof.js +++ /dev/null @@ -1,5 +0,0 @@ -export default 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; -}; \ No newline at end of file diff --git a/build-babel/ansi-styles.js b/build-babel/ansi-styles.js deleted file mode 100644 index 7d5700b..0000000 --- a/build-babel/ansi-styles.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -function assembleStyles () { - var styles = { - modifiers: { - reset: [0, 0], - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - colors: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39] - }, - bgColors: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] - } - }; - - // fix humans - styles.colors.grey = styles.colors.gray; - - Object.keys(styles).forEach(function (groupName) { - var group = styles[groupName]; - - Object.keys(group).forEach(function (styleName) { - var style = group[styleName]; - - styles[styleName] = group[styleName] = { - open: '\u001b[' + style[0] + 'm', - close: '\u001b[' + style[1] + 'm' - }; - }); - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - }); - - return styles; -} - -module.exports = assembleStyles(); -/* Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); */ diff --git a/build-babel/build.json b/build-babel/build.json deleted file mode 100644 index babe29d..0000000 --- a/build-babel/build.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "map": { - "npm:chalk@1.1.3": { - "ansi-styles": "ansi-styles.js", - "escape-string-regexp": "npm:escape-string-regexp@1.0.5", - "has-ansi": "npm:has-ansi@2.0.0", - "strip-ansi": "npm:strip-ansi@3.0.1", - "supports-color": "npm:supports-color@2.0.0" - } - } -} diff --git a/build-babel/jspm.browser.js b/build-babel/jspm.browser.js deleted file mode 100644 index fe37f49..0000000 --- a/build-babel/jspm.browser.js +++ /dev/null @@ -1,7 +0,0 @@ -SystemJS.config({ - baseURL: ".", - paths: { - "github:": "jspm_packages/github/", - "npm:": "jspm_packages/npm/" - } -}); \ No newline at end of file diff --git a/build-babel/jspm.config.js b/build-babel/jspm.config.js deleted file mode 100644 index b644be8..0000000 --- a/build-babel/jspm.config.js +++ /dev/null @@ -1,877 +0,0 @@ -SystemJS.config({ - devConfig: { - "map": { - "plugin-babel": "npm:systemjs-plugin-babel@0.0.16" - } - }, - transpiler: "plugin-babel" -}); - -SystemJS.config({ - packageConfigPaths: [ - "npm:@*/*.json", - "npm:*.json", - "github:*/*.json" - ], - map: { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-preset-react": "npm:babel-preset-react@6.24.1", - "babel-plugin-syntax-dynamic-import": "npm:babel-plugin-syntax-dynamic-import@6.18.0", - "color-convert": "npm:color-convert@1.9.0", - "debug": "npm:debug@2.6.8", - "babel-core": "npm:babel-core@6.25.0", - "constants": "npm:jspm-nodelibs-constants@0.2.1", - "crypto": "npm:jspm-nodelibs-crypto@0.2.1", - "babel": "npm:babel-core@6.25.0", - "babel-helpers": "npm:babel-helpers@6.24.1", - "babel-plugin-check-es2015-constants": "npm:babel-plugin-check-es2015-constants@6.22.0", - "babel-plugin-external-helpers": "npm:babel-plugin-external-helpers@6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "npm:babel-plugin-transform-es2015-arrow-functions@6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "npm:babel-plugin-transform-es2015-block-scoped-functions@6.22.0", - "babel-plugin-transform-es2015-block-scoping": "npm:babel-plugin-transform-es2015-block-scoping@6.24.1", - "babel-plugin-transform-es2015-classes": "npm:babel-plugin-transform-es2015-classes@6.24.1", - "babel-plugin-transform-es2015-computed-properties": "npm:babel-plugin-transform-es2015-computed-properties@6.24.1", - "babel-plugin-transform-es2015-destructuring": "npm:babel-plugin-transform-es2015-destructuring@6.23.0", - "babel-plugin-transform-es2015-for-of": "npm:babel-plugin-transform-es2015-for-of@6.23.0", - "babel-plugin-transform-es2015-function-name": "npm:babel-plugin-transform-es2015-function-name@6.24.1", - "babel-plugin-transform-es2015-literals": "npm:babel-plugin-transform-es2015-literals@6.22.0", - "babel-plugin-transform-es2015-modules-systemjs": "npm:babel-plugin-transform-es2015-modules-systemjs@6.24.1", - "babel-plugin-transform-es2015-object-super": "npm:babel-plugin-transform-es2015-object-super@6.24.1", - "babel-plugin-transform-es2015-parameters": "npm:babel-plugin-transform-es2015-parameters@6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "npm:babel-plugin-transform-es2015-shorthand-properties@6.24.1", - "babel-plugin-transform-es2015-spread": "npm:babel-plugin-transform-es2015-spread@6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "npm:babel-plugin-transform-es2015-sticky-regex@6.24.1", - "babel-plugin-transform-es2015-template-literals": "npm:babel-plugin-transform-es2015-template-literals@6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "npm:babel-plugin-transform-es2015-typeof-symbol@6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "npm:babel-plugin-transform-es2015-unicode-regex@6.24.1", - "babel-plugin-transform-regenerator": "npm:babel-plugin-transform-regenerator@6.24.1", - "babel-plugin-transform-runtime": "npm:babel-plugin-transform-runtime@6.23.0", - "babel-preset-stage-1": "npm:babel-preset-stage-1@6.24.1", - "babel-preset-stage-2": "npm:babel-preset-stage-2@6.24.1", - "babel-preset-stage-3": "npm:babel-preset-stage-3@6.24.1", - "core-js": "npm:core-js@2.4.1", - "assert": "npm:jspm-nodelibs-assert@0.2.1", - "buffer": "npm:jspm-nodelibs-buffer@0.2.3", - "child_process": "npm:jspm-nodelibs-child_process@0.2.1", - "events": "npm:jspm-nodelibs-events@0.2.2", - "fs": "npm:jspm-nodelibs-fs@0.2.1", - "module": "npm:jspm-nodelibs-module@0.2.1", - "os": "npm:jspm-nodelibs-os@0.2.2", - "path": "npm:jspm-nodelibs-path@0.2.3", - "process": "npm:jspm-nodelibs-process@0.2.1", - "regenerator-runtime": "npm:regenerator-runtime@0.10.5", - "stream": "npm:jspm-nodelibs-stream@0.2.1", - "string_decoder": "npm:jspm-nodelibs-string_decoder@0.2.1", - "util": "npm:jspm-nodelibs-util@0.2.2", - "vm": "npm:jspm-nodelibs-vm@0.2.1" - }, - packages: { - "npm:chalk@1.1.3": { - "map": { - "ansi-styles": "npm:ansi-styles@2.2.1", - "escape-string-regexp": "npm:escape-string-regexp@1.0.5", - "has-ansi": "npm:has-ansi@2.0.0", - "strip-ansi": "npm:strip-ansi@3.0.1", - "supports-color": "npm:supports-color@2.0.0" - } - }, - "npm:has-ansi@2.0.0": { - "map": { - "ansi-regex": "npm:ansi-regex@2.1.1" - } - }, - "npm:strip-ansi@3.0.1": { - "map": { - "ansi-regex": "npm:ansi-regex@2.1.1" - } - }, - "npm:mkdirp@0.5.1": { - "map": { - "minimist": "npm:minimist@0.0.8" - } - }, - "npm:regjsparser@0.1.5": { - "map": { - "jsesc": "npm:jsesc@0.5.0" - } - }, - "npm:stream-browserify@2.0.1": { - "map": { - "inherits": "npm:inherits@2.0.3", - "readable-stream": "npm:readable-stream@2.2.11" - } - }, - "npm:regexpu-core@2.0.0": { - "map": { - "regenerate": "npm:regenerate@1.3.2", - "regjsgen": "npm:regjsgen@0.2.0", - "regjsparser": "npm:regjsparser@0.1.5" - } - }, - "npm:crypto-browserify@3.11.0": { - "map": { - "inherits": "npm:inherits@2.0.3", - "create-hash": "npm:create-hash@1.1.3", - "create-ecdh": "npm:create-ecdh@4.0.0", - "create-hmac": "npm:create-hmac@1.1.6", - "pbkdf2": "npm:pbkdf2@3.0.12", - "browserify-cipher": "npm:browserify-cipher@1.0.0", - "browserify-sign": "npm:browserify-sign@4.0.4", - "public-encrypt": "npm:public-encrypt@4.0.0", - "diffie-hellman": "npm:diffie-hellman@5.0.2", - "randombytes": "npm:randombytes@2.0.5" - } - }, - "npm:public-encrypt@4.0.0": { - "map": { - "create-hash": "npm:create-hash@1.1.3", - "randombytes": "npm:randombytes@2.0.5", - "browserify-rsa": "npm:browserify-rsa@4.0.1", - "parse-asn1": "npm:parse-asn1@5.1.0", - "bn.js": "npm:bn.js@4.11.6" - } - }, - "npm:diffie-hellman@5.0.2": { - "map": { - "randombytes": "npm:randombytes@2.0.5", - "miller-rabin": "npm:miller-rabin@4.0.0", - "bn.js": "npm:bn.js@4.11.6" - } - }, - "npm:create-ecdh@4.0.0": { - "map": { - "elliptic": "npm:elliptic@6.4.0", - "bn.js": "npm:bn.js@4.11.6" - } - }, - "npm:browserify-cipher@1.0.0": { - "map": { - "browserify-aes": "npm:browserify-aes@1.0.6", - "browserify-des": "npm:browserify-des@1.0.0", - "evp_bytestokey": "npm:evp_bytestokey@1.0.0" - } - }, - "npm:browserify-rsa@4.0.1": { - "map": { - "randombytes": "npm:randombytes@2.0.5", - "bn.js": "npm:bn.js@4.11.6" - } - }, - "npm:browserify-aes@1.0.6": { - "map": { - "create-hash": "npm:create-hash@1.1.3", - "inherits": "npm:inherits@2.0.3", - "cipher-base": "npm:cipher-base@1.0.3", - "evp_bytestokey": "npm:evp_bytestokey@1.0.0", - "buffer-xor": "npm:buffer-xor@1.0.3" - } - }, - "npm:evp_bytestokey@1.0.0": { - "map": { - "create-hash": "npm:create-hash@1.1.3" - } - }, - "npm:browserify-des@1.0.0": { - "map": { - "cipher-base": "npm:cipher-base@1.0.3", - "inherits": "npm:inherits@2.0.3", - "des.js": "npm:des.js@1.0.0" - } - }, - "npm:miller-rabin@4.0.0": { - "map": { - "bn.js": "npm:bn.js@4.11.6", - "brorand": "npm:brorand@1.1.0" - } - }, - "npm:des.js@1.0.0": { - "map": { - "inherits": "npm:inherits@2.0.3", - "minimalistic-assert": "npm:minimalistic-assert@1.0.0" - } - }, - "npm:hash.js@1.0.3": { - "map": { - "inherits": "npm:inherits@2.0.3" - } - }, - "npm:cipher-base@1.0.3": { - "map": { - "inherits": "npm:inherits@2.0.3" - } - }, - "npm:is-finite@1.0.2": { - "map": { - "number-is-nan": "npm:number-is-nan@1.0.1" - } - }, - "npm:home-or-tmp@2.0.0": { - "map": { - "os-tmpdir": "npm:os-tmpdir@1.0.2", - "os-homedir": "npm:os-homedir@1.0.2" - } - }, - "npm:detect-indent@4.0.0": { - "map": { - "repeating": "npm:repeating@2.0.1" - } - }, - "npm:repeating@2.0.1": { - "map": { - "is-finite": "npm:is-finite@1.0.2" - } - }, - "npm:invariant@2.2.2": { - "map": { - "loose-envify": "npm:loose-envify@1.3.1" - } - }, - "npm:sha.js@2.4.8": { - "map": { - "inherits": "npm:inherits@2.0.3" - } - }, - "npm:asn1.js@4.9.1": { - "map": { - "bn.js": "npm:bn.js@4.11.6", - "inherits": "npm:inherits@2.0.3", - "minimalistic-assert": "npm:minimalistic-assert@1.0.0" - } - }, - "npm:babel-plugin-transform-flow-strip-types@6.22.0": { - "map": { - "babel-plugin-syntax-flow": "npm:babel-plugin-syntax-flow@6.18.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-react-jsx-self@6.22.0": { - "map": { - "babel-plugin-syntax-jsx": "npm:babel-plugin-syntax-jsx@6.18.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-react-jsx-source@6.22.0": { - "map": { - "babel-plugin-syntax-jsx": "npm:babel-plugin-syntax-jsx@6.18.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:debug@2.6.8": { - "map": { - "ms": "npm:ms@2.0.0" - } - }, - "npm:babel-core@6.25.0": { - "map": { - "debug": "npm:debug@2.6.8", - "babel-helpers": "npm:babel-helpers@6.24.1", - "path-is-absolute": "npm:path-is-absolute@1.0.1", - "babel-template": "npm:babel-template@6.25.0", - "babel-messages": "npm:babel-messages@6.23.0", - "json5": "npm:json5@0.5.1", - "convert-source-map": "npm:convert-source-map@1.5.0", - "babel-code-frame": "npm:babel-code-frame@6.22.0", - "babel-register": "npm:babel-register@6.24.1", - "babel-traverse": "npm:babel-traverse@6.25.0", - "minimatch": "npm:minimatch@3.0.4", - "babel-types": "npm:babel-types@6.25.0", - "slash": "npm:slash@1.0.0", - "babel-generator": "npm:babel-generator@6.25.0", - "private": "npm:private@0.1.7", - "babel-runtime": "npm:babel-runtime@6.23.0", - "lodash": "npm:lodash@4.17.4", - "babylon": "npm:babylon@6.17.3", - "source-map": "npm:source-map@0.5.6" - } - }, - "npm:babel-preset-stage-2@6.24.1": { - "map": { - "babel-plugin-syntax-dynamic-import": "npm:babel-plugin-syntax-dynamic-import@6.18.0", - "babel-preset-stage-3": "npm:babel-preset-stage-3@6.24.1", - "babel-plugin-transform-decorators": "npm:babel-plugin-transform-decorators@6.24.1", - "babel-plugin-transform-class-properties": "npm:babel-plugin-transform-class-properties@6.24.1" - } - }, - "npm:babel-preset-stage-1@6.24.1": { - "map": { - "babel-preset-stage-2": "npm:babel-preset-stage-2@6.24.1", - "babel-plugin-transform-class-constructor-call": "npm:babel-plugin-transform-class-constructor-call@6.24.1", - "babel-plugin-transform-export-extensions": "npm:babel-plugin-transform-export-extensions@6.22.0" - } - }, - "npm:jspm-nodelibs-os@0.2.2": { - "map": { - "os-browserify": "npm:os-browserify@0.3.0" - } - }, - "npm:jspm-nodelibs-stream@0.2.1": { - "map": { - "stream-browserify": "npm:stream-browserify@2.0.1" - } - }, - "npm:jspm-nodelibs-crypto@0.2.1": { - "map": { - "crypto-browserify": "npm:crypto-browserify@3.11.0" - } - }, - "npm:babel-helpers@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-block-scoping@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "lodash": "npm:lodash@4.17.4" - } - }, - "npm:babel-plugin-transform-es2015-classes@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-messages": "npm:babel-messages@6.23.0", - "babel-helper-define-map": "npm:babel-helper-define-map@6.24.1", - "babel-helper-function-name": "npm:babel-helper-function-name@6.24.1", - "babel-helper-optimise-call-expression": "npm:babel-helper-optimise-call-expression@6.24.1", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-helper-replace-supers": "npm:babel-helper-replace-supers@6.24.1", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-computed-properties@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-modules-systemjs@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-helper-hoist-variables": "npm:babel-helper-hoist-variables@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-parameters@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-helper-call-delegate": "npm:babel-helper-call-delegate@6.24.1", - "babel-helper-get-function-arity": "npm:babel-helper-get-function-arity@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:jspm-nodelibs-string_decoder@0.2.1": { - "map": { - "string_decoder": "npm:string_decoder@0.10.31" - } - }, - "npm:babel-preset-react@6.24.1": { - "map": { - "babel-preset-flow": "npm:babel-preset-flow@6.23.0", - "babel-plugin-transform-react-display-name": "npm:babel-plugin-transform-react-display-name@6.25.0", - "babel-plugin-syntax-jsx": "npm:babel-plugin-syntax-jsx@6.18.0", - "babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@6.24.1", - "babel-plugin-transform-react-jsx-self": "npm:babel-plugin-transform-react-jsx-self@6.22.0", - "babel-plugin-transform-react-jsx-source": "npm:babel-plugin-transform-react-jsx-source@6.22.0" - } - }, - "npm:babel-plugin-transform-es2015-function-name@6.24.1": { - "map": { - "babel-helper-function-name": "npm:babel-helper-function-name@6.24.1", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-unicode-regex@6.24.1": { - "map": { - "regexpu-core": "npm:regexpu-core@2.0.0", - "babel-helper-regex": "npm:babel-helper-regex@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-object-super@6.24.1": { - "map": { - "babel-helper-replace-supers": "npm:babel-helper-replace-supers@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-template@6.25.0": { - "map": { - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "lodash": "npm:lodash@4.17.4", - "babylon": "npm:babylon@6.17.3" - } - }, - "npm:babel-plugin-transform-es2015-shorthand-properties@6.24.1": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-sticky-regex@6.24.1": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "babel-helper-regex": "npm:babel-helper-regex@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-preset-stage-3@6.24.1": { - "map": { - "babel-plugin-transform-exponentiation-operator": "npm:babel-plugin-transform-exponentiation-operator@6.24.1", - "babel-plugin-transform-async-generator-functions": "npm:babel-plugin-transform-async-generator-functions@6.24.1", - "babel-plugin-transform-async-to-generator": "npm:babel-plugin-transform-async-to-generator@6.24.1", - "babel-plugin-syntax-trailing-function-commas": "npm:babel-plugin-syntax-trailing-function-commas@6.22.0", - "babel-plugin-transform-object-rest-spread": "npm:babel-plugin-transform-object-rest-spread@6.23.0" - } - }, - "npm:babel-plugin-transform-regenerator@6.24.1": { - "map": { - "regenerator-transform": "npm:regenerator-transform@0.9.11" - } - }, - "npm:babel-plugin-transform-decorators@6.24.1": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "babel-template": "npm:babel-template@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-plugin-syntax-decorators": "npm:babel-plugin-syntax-decorators@6.13.0", - "babel-helper-explode-class": "npm:babel-helper-explode-class@6.24.1" - } - }, - "npm:babel-helper-function-name@6.24.1": { - "map": { - "babel-helper-get-function-arity": "npm:babel-helper-get-function-arity@6.24.1", - "babel-types": "npm:babel-types@6.25.0", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-template": "npm:babel-template@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-react-jsx@6.24.1": { - "map": { - "babel-plugin-syntax-jsx": "npm:babel-plugin-syntax-jsx@6.18.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-helper-builder-react-jsx": "npm:babel-helper-builder-react-jsx@6.24.1" - } - }, - "npm:babel-register@6.24.1": { - "map": { - "core-js": "npm:core-js@2.4.1", - "babel-core": "npm:babel-core@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "lodash": "npm:lodash@4.17.4", - "home-or-tmp": "npm:home-or-tmp@2.0.0", - "mkdirp": "npm:mkdirp@0.5.1", - "source-map-support": "npm:source-map-support@0.4.15" - } - }, - "npm:babel-helper-define-map@6.24.1": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "babel-helper-function-name": "npm:babel-helper-function-name@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0", - "lodash": "npm:lodash@4.17.4" - } - }, - "npm:babel-helper-optimise-call-expression@6.24.1": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-traverse@6.25.0": { - "map": { - "debug": "npm:debug@2.6.8", - "babel-code-frame": "npm:babel-code-frame@6.22.0", - "babel-messages": "npm:babel-messages@6.23.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "lodash": "npm:lodash@4.17.4", - "babylon": "npm:babylon@6.17.3", - "invariant": "npm:invariant@2.2.2", - "globals": "npm:globals@9.18.0" - } - }, - "npm:babel-helper-replace-supers@6.24.1": { - "map": { - "babel-helper-optimise-call-expression": "npm:babel-helper-optimise-call-expression@6.24.1", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-messages": "npm:babel-messages@6.23.0", - "babel-template": "npm:babel-template@6.25.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-for-of@6.23.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-external-helpers@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-block-scoped-functions@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-arrow-functions@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-check-es2015-constants@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-literals@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-destructuring@6.23.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-typeof-symbol@6.23.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-runtime@6.23.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-spread@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-es2015-template-literals@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-react-display-name@6.25.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-messages@6.23.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-types@6.25.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "lodash": "npm:lodash@4.17.4", - "esutils": "npm:esutils@2.0.2", - "to-fast-properties": "npm:to-fast-properties@1.0.3" - } - }, - "npm:jspm-nodelibs-buffer@0.2.3": { - "map": { - "buffer": "npm:buffer@5.0.6" - } - }, - "npm:babel-plugin-transform-class-constructor-call@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-plugin-syntax-class-constructor-call": "npm:babel-plugin-syntax-class-constructor-call@6.18.0" - } - }, - "npm:regenerator-transform@0.9.11": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "private": "npm:private@0.1.7", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-exponentiation-operator@6.24.1": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-helper-builder-binary-assignment-operator-visitor": "npm:babel-helper-builder-binary-assignment-operator-visitor@6.24.1", - "babel-plugin-syntax-exponentiation-operator": "npm:babel-plugin-syntax-exponentiation-operator@6.13.0" - } - }, - "npm:babel-plugin-transform-async-generator-functions@6.24.1": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-helper-remap-async-to-generator": "npm:babel-helper-remap-async-to-generator@6.24.1", - "babel-plugin-syntax-async-generators": "npm:babel-plugin-syntax-async-generators@6.13.0" - } - }, - "npm:babel-helper-regex@6.24.1": { - "map": { - "lodash": "npm:lodash@4.17.4", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-generator@6.25.0": { - "map": { - "lodash": "npm:lodash@4.17.4", - "babel-messages": "npm:babel-messages@6.23.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "source-map": "npm:source-map@0.5.6", - "trim-right": "npm:trim-right@1.0.1", - "detect-indent": "npm:detect-indent@4.0.0", - "jsesc": "npm:jsesc@1.3.0" - } - }, - "npm:babel-helper-call-delegate@6.24.1": { - "map": { - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-helper-hoist-variables": "npm:babel-helper-hoist-variables@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-helper-hoist-variables@6.24.1": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-helper-get-function-arity@6.24.1": { - "map": { - "babel-types": "npm:babel-types@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:babel-plugin-transform-async-to-generator@6.24.1": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-helper-remap-async-to-generator": "npm:babel-helper-remap-async-to-generator@6.24.1", - "babel-plugin-syntax-async-functions": "npm:babel-plugin-syntax-async-functions@6.13.0" - } - }, - "npm:babel-plugin-transform-class-properties@6.24.1": { - "map": { - "babel-helper-function-name": "npm:babel-helper-function-name@6.24.1", - "babel-template": "npm:babel-template@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-plugin-syntax-class-properties": "npm:babel-plugin-syntax-class-properties@6.13.0" - } - }, - "npm:babel-runtime@6.23.0": { - "map": { - "core-js": "npm:core-js@2.4.1", - "regenerator-runtime": "npm:regenerator-runtime@0.10.5" - } - }, - "npm:babel-code-frame@6.22.0": { - "map": { - "esutils": "npm:esutils@2.0.2", - "js-tokens": "npm:js-tokens@3.0.1", - "chalk": "npm:chalk@1.1.3" - } - }, - "npm:babel-plugin-transform-export-extensions@6.22.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-plugin-syntax-export-extensions": "npm:babel-plugin-syntax-export-extensions@6.13.0" - } - }, - "npm:babel-plugin-transform-object-rest-spread@6.23.0": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-plugin-syntax-object-rest-spread": "npm:babel-plugin-syntax-object-rest-spread@6.13.0" - } - }, - "npm:minimatch@3.0.4": { - "map": { - "brace-expansion": "npm:brace-expansion@1.1.8" - } - }, - "npm:babel-preset-flow@6.23.0": { - "map": { - "babel-plugin-transform-flow-strip-types": "npm:babel-plugin-transform-flow-strip-types@6.22.0" - } - }, - "npm:source-map-support@0.4.15": { - "map": { - "source-map": "npm:source-map@0.5.6" - } - }, - "npm:buffer@5.0.6": { - "map": { - "ieee754": "npm:ieee754@1.1.8", - "base64-js": "npm:base64-js@1.2.0" - } - }, - "npm:babel-helper-explode-class@6.24.1": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-helper-bindify-decorators": "npm:babel-helper-bindify-decorators@6.24.1" - } - }, - "npm:create-hmac@1.1.6": { - "map": { - "inherits": "npm:inherits@2.0.3", - "create-hash": "npm:create-hash@1.1.3", - "ripemd160": "npm:ripemd160@2.0.1", - "sha.js": "npm:sha.js@2.4.8", - "cipher-base": "npm:cipher-base@1.0.3", - "safe-buffer": "npm:safe-buffer@5.1.0" - } - }, - "npm:browserify-sign@4.0.4": { - "map": { - "create-hmac": "npm:create-hmac@1.1.6", - "inherits": "npm:inherits@2.0.3", - "create-hash": "npm:create-hash@1.1.3", - "browserify-rsa": "npm:browserify-rsa@4.0.1", - "parse-asn1": "npm:parse-asn1@5.1.0", - "elliptic": "npm:elliptic@6.4.0", - "bn.js": "npm:bn.js@4.11.6" - } - }, - "npm:babel-helper-builder-react-jsx@6.24.1": { - "map": { - "esutils": "npm:esutils@2.0.2", - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-types": "npm:babel-types@6.25.0" - } - }, - "npm:babel-helper-builder-binary-assignment-operator-visitor@6.24.1": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-helper-explode-assignable-expression": "npm:babel-helper-explode-assignable-expression@6.24.1" - } - }, - "npm:babel-helper-remap-async-to-generator@6.24.1": { - "map": { - "babel-template": "npm:babel-template@6.25.0", - "babel-types": "npm:babel-types@6.25.0", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-helper-function-name": "npm:babel-helper-function-name@6.24.1", - "babel-runtime": "npm:babel-runtime@6.23.0" - } - }, - "npm:brace-expansion@1.1.8": { - "map": { - "concat-map": "npm:concat-map@0.0.1", - "balanced-match": "npm:balanced-match@1.0.0" - } - }, - "npm:readable-stream@2.2.11": { - "map": { - "string_decoder": "npm:string_decoder@1.0.2", - "inherits": "npm:inherits@2.0.3", - "safe-buffer": "npm:safe-buffer@5.0.1", - "core-util-is": "npm:core-util-is@1.0.2", - "isarray": "npm:isarray@1.0.0", - "util-deprecate": "npm:util-deprecate@1.0.2", - "process-nextick-args": "npm:process-nextick-args@1.0.7" - } - }, - "npm:create-hash@1.1.3": { - "map": { - "inherits": "npm:inherits@2.0.3", - "ripemd160": "npm:ripemd160@2.0.1", - "sha.js": "npm:sha.js@2.4.8", - "cipher-base": "npm:cipher-base@1.0.3" - } - }, - "npm:pbkdf2@3.0.12": { - "map": { - "create-hmac": "npm:create-hmac@1.1.6", - "create-hash": "npm:create-hash@1.1.3", - "ripemd160": "npm:ripemd160@2.0.1", - "sha.js": "npm:sha.js@2.4.8", - "safe-buffer": "npm:safe-buffer@5.1.0" - } - }, - "npm:randombytes@2.0.5": { - "map": { - "safe-buffer": "npm:safe-buffer@5.1.0" - } - }, - "npm:string_decoder@1.0.2": { - "map": { - "safe-buffer": "npm:safe-buffer@5.0.1" - } - }, - "npm:ripemd160@2.0.1": { - "map": { - "inherits": "npm:inherits@2.0.3", - "hash-base": "npm:hash-base@2.0.2" - } - }, - "npm:babel-helper-bindify-decorators@6.24.1": { - "map": { - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-types": "npm:babel-types@6.25.0" - } - }, - "npm:parse-asn1@5.1.0": { - "map": { - "browserify-aes": "npm:browserify-aes@1.0.6", - "create-hash": "npm:create-hash@1.1.3", - "evp_bytestokey": "npm:evp_bytestokey@1.0.0", - "pbkdf2": "npm:pbkdf2@3.0.12", - "asn1.js": "npm:asn1.js@4.9.1" - } - }, - "npm:babel-helper-explode-assignable-expression@6.24.1": { - "map": { - "babel-traverse": "npm:babel-traverse@6.25.0", - "babel-runtime": "npm:babel-runtime@6.23.0", - "babel-types": "npm:babel-types@6.25.0" - } - }, - "npm:loose-envify@1.3.1": { - "map": { - "js-tokens": "npm:js-tokens@3.0.1" - } - }, - "npm:elliptic@6.4.0": { - "map": { - "bn.js": "npm:bn.js@4.11.6", - "inherits": "npm:inherits@2.0.3", - "hmac-drbg": "npm:hmac-drbg@1.0.1", - "minimalistic-crypto-utils": "npm:minimalistic-crypto-utils@1.0.1", - "minimalistic-assert": "npm:minimalistic-assert@1.0.0", - "brorand": "npm:brorand@1.1.0", - "hash.js": "npm:hash.js@1.0.3" - } - }, - "npm:hash-base@2.0.2": { - "map": { - "inherits": "npm:inherits@2.0.3" - } - }, - "npm:hmac-drbg@1.0.1": { - "map": { - "hash.js": "npm:hash.js@1.0.3", - "minimalistic-assert": "npm:minimalistic-assert@1.0.0", - "minimalistic-crypto-utils": "npm:minimalistic-crypto-utils@1.0.1" - } - }, - "npm:color-convert@1.9.0": { - "map": { - "color-name": "npm:color-name@1.1.2" - } - } - } -}); \ No newline at end of file diff --git a/build-babel/package.json b/build-babel/package.json deleted file mode 100644 index 2fdf5a2..0000000 --- a/build-babel/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "jspm": { - "dependencies": { - "babel": "npm:babel-core@^6.3.17", - "babel-core": "npm:babel-core@^6.18.2", - "babel-helpers": "npm:babel-helpers@^6.3.13", - "babel-plugin-check-es2015-constants": "npm:babel-plugin-check-es2015-constants@^6.3.13", - "babel-plugin-external-helpers": "npm:babel-plugin-external-helpers@^6.3.13", - "babel-plugin-syntax-dynamic-import": "npm:babel-plugin-syntax-dynamic-import@^6.18.0", - "babel-plugin-transform-es2015-arrow-functions": "npm:babel-plugin-transform-es2015-arrow-functions@^6.3.13", - "babel-plugin-transform-es2015-block-scoped-functions": "npm:babel-plugin-transform-es2015-block-scoped-functions@^6.3.13", - "babel-plugin-transform-es2015-block-scoping": "npm:babel-plugin-transform-es2015-block-scoping@^6.3.13", - "babel-plugin-transform-es2015-classes": "npm:babel-plugin-transform-es2015-classes@^6.3.15", - "babel-plugin-transform-es2015-computed-properties": "npm:babel-plugin-transform-es2015-computed-properties@^6.3.13", - "babel-plugin-transform-es2015-destructuring": "npm:babel-plugin-transform-es2015-destructuring@^6.3.15", - "babel-plugin-transform-es2015-for-of": "npm:babel-plugin-transform-es2015-for-of@^6.3.13", - "babel-plugin-transform-es2015-function-name": "npm:babel-plugin-transform-es2015-function-name@^6.3.19", - "babel-plugin-transform-es2015-literals": "npm:babel-plugin-transform-es2015-literals@^6.3.13", - "babel-plugin-transform-es2015-modules-systemjs": "npm:babel-plugin-transform-es2015-modules-systemjs@^6.19.0", - "babel-plugin-transform-es2015-object-super": "npm:babel-plugin-transform-es2015-object-super@^6.3.13", - "babel-plugin-transform-es2015-parameters": "npm:babel-plugin-transform-es2015-parameters@^6.3.18", - "babel-plugin-transform-es2015-shorthand-properties": "npm:babel-plugin-transform-es2015-shorthand-properties@^6.3.13", - "babel-plugin-transform-es2015-spread": "npm:babel-plugin-transform-es2015-spread@^6.3.14", - "babel-plugin-transform-es2015-sticky-regex": "npm:babel-plugin-transform-es2015-sticky-regex@^6.3.13", - "babel-plugin-transform-es2015-template-literals": "npm:babel-plugin-transform-es2015-template-literals@^6.3.13", - "babel-plugin-transform-es2015-typeof-symbol": "npm:babel-plugin-transform-es2015-typeof-symbol@^6.3.13", - "babel-plugin-transform-es2015-unicode-regex": "npm:babel-plugin-transform-es2015-unicode-regex@^6.3.13", - "babel-plugin-transform-regenerator": "npm:babel-plugin-transform-regenerator@^6.3.18", - "babel-plugin-transform-runtime": "npm:babel-plugin-transform-runtime@^6.3.13", - "babel-preset-react": "npm:babel-preset-react@^6.22.0", - "babel-preset-stage-1": "npm:babel-preset-stage-1@^6.5.0", - "babel-preset-stage-2": "npm:babel-preset-stage-2@^6.5.0", - "babel-preset-stage-3": "npm:babel-preset-stage-3@^6.3.13", - "babel-runtime": "npm:babel-runtime@^6.23.0", - "color-convert": "npm:color-convert@^1.9.0", - "core-js": "npm:core-js@^2.4.0", - "debug": "npm:debug@^2.6.0", - "regenerator-runtime": "npm:regenerator-runtime@^0.10.1" - }, - "devDependencies": { - "plugin-babel": "npm:systemjs-plugin-babel@^0.0.16" - }, - "peerDependencies": { - "assert": "npm:jspm-nodelibs-assert@^0.2.0", - "buffer": "npm:jspm-nodelibs-buffer@^0.2.0", - "child_process": "npm:jspm-nodelibs-child_process@^0.2.0", - "constants": "npm:jspm-nodelibs-constants@^0.2.0", - "crypto": "npm:jspm-nodelibs-crypto@^0.2.0", - "events": "npm:jspm-nodelibs-events@^0.2.0", - "fs": "npm:jspm-nodelibs-fs@^0.2.0", - "module": "npm:jspm-nodelibs-module@^0.2.0", - "os": "npm:jspm-nodelibs-os@^0.2.0", - "path": "npm:jspm-nodelibs-path@^0.2.0", - "process": "npm:jspm-nodelibs-process@^0.2.0", - "stream": "npm:jspm-nodelibs-stream@^0.2.0", - "string_decoder": "npm:jspm-nodelibs-string_decoder@^0.2.0", - "util": "npm:jspm-nodelibs-util@^0.2.0", - "vm": "npm:jspm-nodelibs-vm@^0.2.0" - }, - "overrides": { - "npm:debug@2.6.8": { - "main": "src/browser.js", - "jspmNodeConversion": false, - "format": "cjs", - "map": { - "./src/browser.js": { - "node": "./src/node.js" - }, - "./node.js": { - "browser": "./src/browser.js" - }, - "fs": "@node/fs", - "net": "@node/net", - "tty": "@node/tty", - "util": "@node/util" - } - }, - "npm:inherits@2.0.3": { - "ignore": [ - "test.js" - ] - }, - "npm:lodash@4.17.4": { - "map": { - "buffer": "@empty", - "process": "@empty" - } - }, - "npm:pbkdf2@3.0.12": { - "main": "browser.js" - }, - "npm:safe-buffer@5.0.1": { - "browser": "index.js" - }, - "npm:safe-buffer@5.1.0": { - "browser": "index.js" - }, - "npm:string_decoder@0.10.31": { - "map": { - "./index.js": { - "node": "@node/string_decoder" - } - } - } - } - } -} diff --git a/build-babel/systemjs-babel.js b/build-babel/systemjs-babel.js deleted file mode 100644 index 571d7c2..0000000 --- a/build-babel/systemjs-babel.js +++ /dev/null @@ -1,83 +0,0 @@ -import babel from 'babel'; -export { babel }; - -import dynamicImportSyntax from 'babel-plugin-syntax-dynamic-import'; -import modulesRegisterPlugin from 'babel-plugin-transform-es2015-modules-systemjs'; -export let modulesRegister = { - plugins: [dynamicImportSyntax, modulesRegisterPlugin] -}; - -import externalHelpersPlugin from 'babel-plugin-external-helpers'; -export let externalHelpers = { - plugins: [externalHelpersPlugin] -}; - -import runtimeTransformPlugin from 'babel-plugin-transform-runtime'; -export let runtimeTransform = { - plugins: [[runtimeTransformPlugin, { polyfill: false }]] -}; - -import p1 from 'babel-preset-stage-1'; -import p2 from 'babel-preset-stage-2'; -import p3 from 'babel-preset-stage-3'; -import pReact from 'babel-preset-react'; - -let pluginsStage1 = p1.plugins; -let pluginsStage2 = p2.plugins; -let pluginsStage3 = p3.plugins; -let pluginsReact = pReact.plugins; - -export { pluginsStage1, pluginsStage2, pluginsStage3, pluginsReact } - -// ES2015 plugins to keep in sync with https://github.com/babel/babel/blob/master/packages/babel-preset-es2015/index.js -import templateLiterals from 'babel-plugin-transform-es2015-template-literals'; -import literals from 'babel-plugin-transform-es2015-literals'; -import functionName from 'babel-plugin-transform-es2015-function-name'; -import arrowFunctions from 'babel-plugin-transform-es2015-arrow-functions'; -import blockScopedFunctions from 'babel-plugin-transform-es2015-block-scoped-functions'; -import classes from 'babel-plugin-transform-es2015-classes'; -import objectSuper from 'babel-plugin-transform-es2015-object-super'; -import shorthandProperties from 'babel-plugin-transform-es2015-shorthand-properties'; -import computedProperties from 'babel-plugin-transform-es2015-computed-properties'; -import forOf from 'babel-plugin-transform-es2015-for-of'; -import stickyRegex from 'babel-plugin-transform-es2015-sticky-regex'; -import unicodeRegex from 'babel-plugin-transform-es2015-unicode-regex'; -import constants from 'babel-plugin-check-es2015-constants'; -import spread from 'babel-plugin-transform-es2015-spread'; -import parameters from 'babel-plugin-transform-es2015-parameters'; -import destructuring from 'babel-plugin-transform-es2015-destructuring'; -import blockScoping from 'babel-plugin-transform-es2015-block-scoping'; -// removed as this pulls in too much of core-js -// import typeofSymbol from 'babel-plugin-transform-es2015-typeof-symbol'; -import regenerator from 'babel-plugin-transform-regenerator'; - -let es2015Plugins = [ - templateLiterals, - literals, - functionName, - arrowFunctions, - blockScopedFunctions, - classes, - objectSuper, - shorthandProperties, - computedProperties, - forOf, - stickyRegex, - unicodeRegex, - constants, - spread, - parameters, - destructuring, - blockScoping, - // typeofSymbol -]; - -let regeneratorPlugin = [regenerator, { async: false, asyncGenerators: false }]; - -export let presetES2015 = { - plugins: [dynamicImportSyntax, ...es2015Plugins, regeneratorPlugin] -}; - -export let presetES2015Register = { - plugins: [dynamicImportSyntax, ...es2015Plugins, modulesRegisterPlugin, regeneratorPlugin] -}; diff --git a/build-babel/systemjs-build-babel-helpers.js b/build-babel/systemjs-build-babel-helpers.js deleted file mode 100644 index 0fd1f81..0000000 --- a/build-babel/systemjs-build-babel-helpers.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('babel').buildExternalHelpers()); \ No newline at end of file diff --git a/build-babel/systemjs-build-modular-babel-helpers.js b/build-babel/systemjs-build-modular-babel-helpers.js deleted file mode 100644 index a4f4446..0000000 --- a/build-babel/systemjs-build-modular-babel-helpers.js +++ /dev/null @@ -1,13 +0,0 @@ -var fs = require('fs'); -var babel = require('babel'); -var helpers = require('babel-helpers'); -var t = babel.types; - -// ES Module helpers based on https://github.com/babel/babel/blob/master/packages/babel-runtime/scripts/build-dist.js -helpers.list.forEach(function(helperName) { - var tree = t.program([ - t.exportDefaultDeclaration(helpers.get(helperName)) - ]); - - fs.writeFileSync('../babel-helpers/' + helperName + '.js', babel.transformFromAst(tree).code); -}); diff --git a/build-babel/test-build.js b/build-babel/test-build.js deleted file mode 100644 index b88991a..0000000 --- a/build-babel/test-build.js +++ /dev/null @@ -1,17 +0,0 @@ -var Builder = require('systemjs-builder'); - -var builder = new Builder('../'); -builder.config({ - map: { - 'plugin-babel': '../plugin-babel.js', - 'systemjs-babel-build': './systemjs-babel-node.js' - }, - transpiler: 'plugin-babel' -}) - -builder.buildStatic('build-babel/test.js', 'test-bundle.js', { - format: 'cjs' -}) -.then(function() { - console.log('build completed'); -}); \ No newline at end of file diff --git a/build-babel/test-bundle.js b/build-babel/test-bundle.js deleted file mode 100644 index ed0262f..0000000 --- a/build-babel/test-bundle.js +++ /dev/null @@ -1,703 +0,0 @@ -'use strict'; - -var _regeneratorRuntime = function (module) { - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - !function (global) { - "use strict"; - - var hasOwn = Object.prototype.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } - - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided, then outerFn.prototype instanceof Generator. - var generator = Object.create((outerFn || Generator).prototype); - var context = new Context(tryLocsList || []); - - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - - return generator; - } - runtime.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function (method) { - prototype[method] = function (arg) { - return this._invoke(method, arg); - }; - }); - } - - runtime.isGeneratorFunction = function (genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" : false; - }; - - runtime.mark = function (genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `value instanceof AwaitArgument` to determine if the yielded value is - // meant to be awaited. Some may consider the name of this method too - // cutesy, but they are curmudgeons. - runtime.awrap = function (arg) { - return new AwaitArgument(arg); - }; - - function AwaitArgument(arg) { - this.arg = arg; - } - - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value instanceof AwaitArgument) { - return Promise.resolve(value.arg).then(function (value) { - invoke("next", value, resolve, reject); - }, function (err) { - invoke("throw", err, resolve, reject); - }); - } - - return Promise.resolve(value).then(function (unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. If the Promise is rejected, however, the - // result for this iteration will be rejected with the same - // reason. Note that rejections of yielded Promises are not - // thrown back into the generator function, as is the case - // when an awaited Promise is rejected. This difference in - // behavior between yield and await is important, because it - // allows the consumer to decide what to do with the yielded - // rejection (swallow it and continue, manually .throw it back - // into the generator, abandon iteration, whatever). With - // await, by contrast, there is no opportunity to examine the - // rejection reason outside the generator function, so the - // only option is to throw it from the await expression, and - // let the generator function handle the exception. - result.value = unwrapped; - resolve(result); - }, reject); - } - } - - if (typeof process === "object" && process.domain) { - invoke = process.domain.bind(invoke); - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function (resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function (innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - - return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function (result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - while (true) { - var delegate = context.delegate; - if (delegate) { - if (method === "return" || method === "throw" && delegate.iterator[method] === undefined) { - // A return or throw (when the delegate iterator has no throw - // method) always terminates the yield* loop. - context.delegate = null; - - // If the delegate iterator has a return method, give it a - // chance to clean up. - var returnMethod = delegate.iterator["return"]; - if (returnMethod) { - var record = tryCatch(returnMethod, delegate.iterator, arg); - if (record.type === "throw") { - // If the return method threw an exception, let that - // exception prevail over the original return or throw. - method = "throw"; - arg = record.arg; - continue; - } - } - - if (method === "return") { - // Continue with the outer return, now that the delegate - // iterator has been terminated. - continue; - } - } - - var record = tryCatch(delegate.iterator[method], delegate.iterator, arg); - - if (record.type === "throw") { - context.delegate = null; - - // Like returning generator.throw(uncaught), but without the - // overhead of an extra function call. - method = "throw"; - arg = record.arg; - continue; - } - - // Delegate generator ran and handled its own exceptions so - // regardless of what the method was, we continue as if it is - // "next" with an undefined arg. - method = "next"; - arg = undefined; - - var info = record.arg; - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - } else { - state = GenStateSuspendedYield; - return info; - } - - context.delegate = null; - } - - if (method === "next") { - if (state === GenStateSuspendedYield) { - context.sent = arg; - } else { - context.sent = undefined; - } - } else if (method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw arg; - } - - if (context.dispatchException(arg)) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - method = "next"; - arg = undefined; - } - } else if (method === "return") { - context.abrupt("return", arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done ? GenStateCompleted : GenStateSuspendedYield; - - var info = { - value: record.arg, - done: context.done - }; - - if (record.arg === ContinueSentinel) { - if (context.delegate && method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - arg = undefined; - } - } else { - return info; - } - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(arg) call above. - method = "throw"; - arg = record.arg; - } - } - }; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - Gp[iteratorSymbol] = function () { - return this; - }; - - Gp[toStringTagSymbol] = "Generator"; - - Gp.toString = function () { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - runtime.keys = function (object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, - next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; - - function doneResult() { - return { value: undefined, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function reset(skipTempReset) { - this.prev = 0; - this.next = 0; - this.sent = undefined; - this.done = false; - this.delegate = null; - - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - - stop: function stop() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function dispatchException(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - return !!caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function abrupt(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.next = finallyEntry.finallyLoc; - } else { - this.complete(record); - } - - return ContinueSentinel; - }, - - complete: function complete(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = record.arg; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - }, - - finish: function finish(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function _catch(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function delegateYield(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - return ContinueSentinel; - } - }; - }( - // Among the various tricks for obtaining a reference to the global - // object, this seems to be the most reliable technique that does not - // use indirect eval (which violates Content Security Policy). - typeof global === "object" ? global : typeof window === "object" ? window : typeof self === "object" ? self : this); - return module.exports; -}({ exports: {} }); - -var _asyncToGenerator = (function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new Promise(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return Promise.resolve(value).then(function (value) { - return step("next", value); - }, function (err) { - return step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}) - -var p = function () { - var ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee() { - return _regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return new Promise(function (resolve, reject) { - console.log('waiting...'); - setTimeout(function () { - resolve(); - }, 1000); - }); - - case 2: - return _context.abrupt('return', 'hello world'); - - case 3: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); - - return function p() { - return ref.apply(this, arguments); - }; -}(); - -exports.p = p; \ No newline at end of file diff --git a/build-babel/test.html b/build-babel/test.html deleted file mode 100644 index 06dae85..0000000 --- a/build-babel/test.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - \ No newline at end of file diff --git a/build.sh b/build.sh deleted file mode 100755 index dea08b9..0000000 --- a/build.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -xv - -NODE_CWD=./node_modules/.bin - -BUILD_DIR=build-babel -JSPM_VERSION=beta - -REGENERATOR_VERSION=0.10.1 - -cd $BUILD_DIR -cp -r jspm_packages_override/* jspm_packages - -jspm build systemjs-babel.js ../systemjs-babel-browser.js --format amd --skip-source-maps --skip-rollup --minify --log ok --config build.json -jspm build systemjs-babel.js ../systemjs-babel-node.js --format amd --node --skip-source-maps --skip-rollup --log ok --config build.json -jspm run systemjs-build-babel-helpers.js > ../babel-helpers.js -jspm run systemjs-build-modular-babel-helpers.js -# ( -# echo "export default (function(module) {" ; -# cat jspm_packages/npm/regenerator-runtime@$REGENERATOR_VERSION/runtime.js -# echo "return module.exports; })({exports:{}});" -# ) > ../regenerator-runtime.js -cd .. diff --git a/dist/babel-transform.js b/dist/babel-transform.js new file mode 100644 index 0000000..1aa188a --- /dev/null +++ b/dist/babel-transform.js @@ -0,0 +1,930 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=155)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toSequenceExpression:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0};Object.defineProperty(t,"assertNode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"cloneNode",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"clone",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"cloneDeep",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"cloneWithoutLoc",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"addComment",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"addComments",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"inheritInnerComments",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"inheritLeadingComments",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"inheritsComments",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"inheritTrailingComments",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"removeComments",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"ensureBlock",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"toBindingIdentifierName",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"toBlock",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"toExpression",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"toStatement",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"valueToNode",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"appendToMemberExpression",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"prependToMemberExpression",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"removeProperties",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"removePropertiesDeep",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(t,"removeTypeDuplicates",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,"traverse",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(t,"traverseFast",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(t,"shallowEqual",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(t,"is",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(t,"isNodesEquivalent",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(t,"isType",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(t,"isValidES3Identifier",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(t,"matchesPattern",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(t,"buildMatchMemberExpression",{enumerable:!0,get:function(){return le.default}}),t.react=void 0;var i=pe(r(157)),s=pe(r(158)),o=pe(r(159)),a=pe(r(230)),u=r(231);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))});var l=pe(r(232)),c=pe(r(233)),p=r(2);Object.keys(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))});var f=pe(r(22)),h=pe(r(106)),d=pe(r(234)),y=pe(r(235)),m=pe(r(236)),g=pe(r(107)),v=pe(r(108)),b=pe(r(112)),E=pe(r(113)),T=pe(r(114)),A=pe(r(248)),x=r(249);Object.keys(x).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}}))});var S=r(13);Object.keys(S).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return S[e]}}))});var P=pe(r(250)),D=pe(r(251)),w=pe(r(115)),C=pe(r(252)),O=pe(r(253)),_=pe(r(116)),F=pe(r(254)),k=pe(r(255)),I=pe(r(257)),N=pe(r(258)),B=r(6);Object.keys(B).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return B[e]}}))});var j=pe(r(262)),M=pe(r(263)),L=pe(r(264)),R=pe(r(119)),U=pe(r(117)),V=pe(r(105)),W=pe(r(36)),K=pe(r(265)),q=pe(r(266)),Y=pe(r(118)),$=pe(r(44)),J=pe(r(59)),G=pe(r(267)),X=pe(r(268)),H=pe(r(269)),z=pe(r(120)),Q=pe(r(104)),Z=pe(r(270)),ee=pe(r(271)),te=pe(r(272)),re=pe(r(273)),ne=pe(r(60)),ie=pe(r(274)),se=pe(r(21)),oe=pe(r(275)),ae=pe(r(83)),ue=pe(r(103)),le=pe(r(82)),ce=r(1);function pe(e){return e&&e.__esModule?e:{default:e}}Object.keys(ce).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return ce[e]}}))});const fe={isReactComponent:i.default,isCompatTag:s.default,buildChildren:o.default};t.react=fe},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayExpression=function(e,t){if(!e)return!1;if("ArrayExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isAssignmentExpression=function(e,t){if(!e)return!1;if("AssignmentExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBinaryExpression=function(e,t){if(!e)return!1;if("BinaryExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isInterpreterDirective=function(e,t){if(!e)return!1;if("InterpreterDirective"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDirective=function(e,t){if(!e)return!1;if("Directive"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDirectiveLiteral=function(e,t){if(!e)return!1;if("DirectiveLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBlockStatement=function(e,t){if(!e)return!1;if("BlockStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBreakStatement=function(e,t){if(!e)return!1;if("BreakStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isCallExpression=function(e,t){if(!e)return!1;if("CallExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isCatchClause=function(e,t){if(!e)return!1;if("CatchClause"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isConditionalExpression=function(e,t){if(!e)return!1;if("ConditionalExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isContinueStatement=function(e,t){if(!e)return!1;if("ContinueStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDebuggerStatement=function(e,t){if(!e)return!1;if("DebuggerStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDoWhileStatement=function(e,t){if(!e)return!1;if("DoWhileStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isEmptyStatement=function(e,t){if(!e)return!1;if("EmptyStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExpressionStatement=function(e,t){if(!e)return!1;if("ExpressionStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isFile=function(e,t){if(!e)return!1;if("File"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isForInStatement=function(e,t){if(!e)return!1;if("ForInStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isForStatement=function(e,t){if(!e)return!1;if("ForStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isFunctionDeclaration=function(e,t){if(!e)return!1;if("FunctionDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isFunctionExpression=function(e,t){if(!e)return!1;if("FunctionExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isIdentifier=function(e,t){if(!e)return!1;if("Identifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isIfStatement=function(e,t){if(!e)return!1;if("IfStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isLabeledStatement=function(e,t){if(!e)return!1;if("LabeledStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isStringLiteral=function(e,t){if(!e)return!1;if("StringLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNumericLiteral=function(e,t){if(!e)return!1;if("NumericLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNullLiteral=function(e,t){if(!e)return!1;if("NullLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBooleanLiteral=function(e,t){if(!e)return!1;if("BooleanLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isRegExpLiteral=function(e,t){if(!e)return!1;if("RegExpLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isLogicalExpression=function(e,t){if(!e)return!1;if("LogicalExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isMemberExpression=function(e,t){if(!e)return!1;if("MemberExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNewExpression=function(e,t){if(!e)return!1;if("NewExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isProgram=function(e,t){if(!e)return!1;if("Program"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectExpression=function(e,t){if(!e)return!1;if("ObjectExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectMethod=function(e,t){if(!e)return!1;if("ObjectMethod"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectProperty=function(e,t){if(!e)return!1;if("ObjectProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isRestElement=function(e,t){if(!e)return!1;if("RestElement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isReturnStatement=function(e,t){if(!e)return!1;if("ReturnStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isSequenceExpression=function(e,t){if(!e)return!1;if("SequenceExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isSwitchCase=function(e,t){if(!e)return!1;if("SwitchCase"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isSwitchStatement=function(e,t){if(!e)return!1;if("SwitchStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isThisExpression=function(e,t){if(!e)return!1;if("ThisExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isThrowStatement=function(e,t){if(!e)return!1;if("ThrowStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTryStatement=function(e,t){if(!e)return!1;if("TryStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isUnaryExpression=function(e,t){if(!e)return!1;if("UnaryExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isUpdateExpression=function(e,t){if(!e)return!1;if("UpdateExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isVariableDeclaration=function(e,t){if(!e)return!1;if("VariableDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isVariableDeclarator=function(e,t){if(!e)return!1;if("VariableDeclarator"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isWhileStatement=function(e,t){if(!e)return!1;if("WhileStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isWithStatement=function(e,t){if(!e)return!1;if("WithStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isAssignmentPattern=function(e,t){if(!e)return!1;if("AssignmentPattern"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isArrayPattern=function(e,t){if(!e)return!1;if("ArrayPattern"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isArrowFunctionExpression=function(e,t){if(!e)return!1;if("ArrowFunctionExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isClassBody=function(e,t){if(!e)return!1;if("ClassBody"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isClassDeclaration=function(e,t){if(!e)return!1;if("ClassDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isClassExpression=function(e,t){if(!e)return!1;if("ClassExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExportAllDeclaration=function(e,t){if(!e)return!1;if("ExportAllDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExportDefaultDeclaration=function(e,t){if(!e)return!1;if("ExportDefaultDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExportNamedDeclaration=function(e,t){if(!e)return!1;if("ExportNamedDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExportSpecifier=function(e,t){if(!e)return!1;if("ExportSpecifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isForOfStatement=function(e,t){if(!e)return!1;if("ForOfStatement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isImportDeclaration=function(e,t){if(!e)return!1;if("ImportDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isImportDefaultSpecifier=function(e,t){if(!e)return!1;if("ImportDefaultSpecifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isImportNamespaceSpecifier=function(e,t){if(!e)return!1;if("ImportNamespaceSpecifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isImportSpecifier=function(e,t){if(!e)return!1;if("ImportSpecifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isMetaProperty=function(e,t){if(!e)return!1;if("MetaProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isClassMethod=function(e,t){if(!e)return!1;if("ClassMethod"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectPattern=function(e,t){if(!e)return!1;if("ObjectPattern"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isSpreadElement=function(e,t){if(!e)return!1;if("SpreadElement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isSuper=function(e,t){if(!e)return!1;if("Super"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTaggedTemplateExpression=function(e,t){if(!e)return!1;if("TaggedTemplateExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTemplateElement=function(e,t){if(!e)return!1;if("TemplateElement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTemplateLiteral=function(e,t){if(!e)return!1;if("TemplateLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isYieldExpression=function(e,t){if(!e)return!1;if("YieldExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isAnyTypeAnnotation=function(e,t){if(!e)return!1;if("AnyTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isArrayTypeAnnotation=function(e,t){if(!e)return!1;if("ArrayTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBooleanTypeAnnotation=function(e,t){if(!e)return!1;if("BooleanTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBooleanLiteralTypeAnnotation=function(e,t){if(!e)return!1;if("BooleanLiteralTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNullLiteralTypeAnnotation=function(e,t){if(!e)return!1;if("NullLiteralTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isClassImplements=function(e,t){if(!e)return!1;if("ClassImplements"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareClass=function(e,t){if(!e)return!1;if("DeclareClass"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareFunction=function(e,t){if(!e)return!1;if("DeclareFunction"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareInterface=function(e,t){if(!e)return!1;if("DeclareInterface"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareModule=function(e,t){if(!e)return!1;if("DeclareModule"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareModuleExports=function(e,t){if(!e)return!1;if("DeclareModuleExports"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareTypeAlias=function(e,t){if(!e)return!1;if("DeclareTypeAlias"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareOpaqueType=function(e,t){if(!e)return!1;if("DeclareOpaqueType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareVariable=function(e,t){if(!e)return!1;if("DeclareVariable"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareExportDeclaration=function(e,t){if(!e)return!1;if("DeclareExportDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclareExportAllDeclaration=function(e,t){if(!e)return!1;if("DeclareExportAllDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclaredPredicate=function(e,t){if(!e)return!1;if("DeclaredPredicate"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExistsTypeAnnotation=function(e,t){if(!e)return!1;if("ExistsTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isFunctionTypeAnnotation=function(e,t){if(!e)return!1;if("FunctionTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isFunctionTypeParam=function(e,t){if(!e)return!1;if("FunctionTypeParam"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isGenericTypeAnnotation=function(e,t){if(!e)return!1;if("GenericTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isInferredPredicate=function(e,t){if(!e)return!1;if("InferredPredicate"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isInterfaceExtends=function(e,t){if(!e)return!1;if("InterfaceExtends"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isInterfaceDeclaration=function(e,t){if(!e)return!1;if("InterfaceDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isInterfaceTypeAnnotation=function(e,t){if(!e)return!1;if("InterfaceTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isIntersectionTypeAnnotation=function(e,t){if(!e)return!1;if("IntersectionTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isMixedTypeAnnotation=function(e,t){if(!e)return!1;if("MixedTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isEmptyTypeAnnotation=function(e,t){if(!e)return!1;if("EmptyTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNullableTypeAnnotation=function(e,t){if(!e)return!1;if("NullableTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNumberLiteralTypeAnnotation=function(e,t){if(!e)return!1;if("NumberLiteralTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNumberTypeAnnotation=function(e,t){if(!e)return!1;if("NumberTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectTypeAnnotation=function(e,t){if(!e)return!1;if("ObjectTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectTypeInternalSlot=function(e,t){if(!e)return!1;if("ObjectTypeInternalSlot"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectTypeCallProperty=function(e,t){if(!e)return!1;if("ObjectTypeCallProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectTypeIndexer=function(e,t){if(!e)return!1;if("ObjectTypeIndexer"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectTypeProperty=function(e,t){if(!e)return!1;if("ObjectTypeProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectTypeSpreadProperty=function(e,t){if(!e)return!1;if("ObjectTypeSpreadProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isOpaqueType=function(e,t){if(!e)return!1;if("OpaqueType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isQualifiedTypeIdentifier=function(e,t){if(!e)return!1;if("QualifiedTypeIdentifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isStringLiteralTypeAnnotation=function(e,t){if(!e)return!1;if("StringLiteralTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isStringTypeAnnotation=function(e,t){if(!e)return!1;if("StringTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isThisTypeAnnotation=function(e,t){if(!e)return!1;if("ThisTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTupleTypeAnnotation=function(e,t){if(!e)return!1;if("TupleTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTypeofTypeAnnotation=function(e,t){if(!e)return!1;if("TypeofTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTypeAlias=function(e,t){if(!e)return!1;if("TypeAlias"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTypeAnnotation=function(e,t){if(!e)return!1;if("TypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTypeCastExpression=function(e,t){if(!e)return!1;if("TypeCastExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTypeParameter=function(e,t){if(!e)return!1;if("TypeParameter"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTypeParameterDeclaration=function(e,t){if(!e)return!1;if("TypeParameterDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTypeParameterInstantiation=function(e,t){if(!e)return!1;if("TypeParameterInstantiation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isUnionTypeAnnotation=function(e,t){if(!e)return!1;if("UnionTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isVariance=function(e,t){if(!e)return!1;if("Variance"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isVoidTypeAnnotation=function(e,t){if(!e)return!1;if("VoidTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXAttribute=function(e,t){if(!e)return!1;if("JSXAttribute"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXClosingElement=function(e,t){if(!e)return!1;if("JSXClosingElement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXElement=function(e,t){if(!e)return!1;if("JSXElement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXEmptyExpression=function(e,t){if(!e)return!1;if("JSXEmptyExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXExpressionContainer=function(e,t){if(!e)return!1;if("JSXExpressionContainer"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXSpreadChild=function(e,t){if(!e)return!1;if("JSXSpreadChild"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXIdentifier=function(e,t){if(!e)return!1;if("JSXIdentifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXMemberExpression=function(e,t){if(!e)return!1;if("JSXMemberExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXNamespacedName=function(e,t){if(!e)return!1;if("JSXNamespacedName"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXOpeningElement=function(e,t){if(!e)return!1;if("JSXOpeningElement"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXSpreadAttribute=function(e,t){if(!e)return!1;if("JSXSpreadAttribute"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXText=function(e,t){if(!e)return!1;if("JSXText"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXFragment=function(e,t){if(!e)return!1;if("JSXFragment"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXOpeningFragment=function(e,t){if(!e)return!1;if("JSXOpeningFragment"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isJSXClosingFragment=function(e,t){if(!e)return!1;if("JSXClosingFragment"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isNoop=function(e,t){if(!e)return!1;if("Noop"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isParenthesizedExpression=function(e,t){if(!e)return!1;if("ParenthesizedExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isAwaitExpression=function(e,t){if(!e)return!1;if("AwaitExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBindExpression=function(e,t){if(!e)return!1;if("BindExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isClassProperty=function(e,t){if(!e)return!1;if("ClassProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isOptionalMemberExpression=function(e,t){if(!e)return!1;if("OptionalMemberExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isOptionalCallExpression=function(e,t){if(!e)return!1;if("OptionalCallExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isClassPrivateProperty=function(e,t){if(!e)return!1;if("ClassPrivateProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isImport=function(e,t){if(!e)return!1;if("Import"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDecorator=function(e,t){if(!e)return!1;if("Decorator"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isDoExpression=function(e,t){if(!e)return!1;if("DoExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExportDefaultSpecifier=function(e,t){if(!e)return!1;if("ExportDefaultSpecifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExportNamespaceSpecifier=function(e,t){if(!e)return!1;if("ExportNamespaceSpecifier"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isPrivateName=function(e,t){if(!e)return!1;if("PrivateName"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isBigIntLiteral=function(e,t){if(!e)return!1;if("BigIntLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSParameterProperty=function(e,t){if(!e)return!1;if("TSParameterProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSDeclareFunction=function(e,t){if(!e)return!1;if("TSDeclareFunction"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSDeclareMethod=function(e,t){if(!e)return!1;if("TSDeclareMethod"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSQualifiedName=function(e,t){if(!e)return!1;if("TSQualifiedName"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSCallSignatureDeclaration=function(e,t){if(!e)return!1;if("TSCallSignatureDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSConstructSignatureDeclaration=function(e,t){if(!e)return!1;if("TSConstructSignatureDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSPropertySignature=function(e,t){if(!e)return!1;if("TSPropertySignature"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSMethodSignature=function(e,t){if(!e)return!1;if("TSMethodSignature"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSIndexSignature=function(e,t){if(!e)return!1;if("TSIndexSignature"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSAnyKeyword=function(e,t){if(!e)return!1;if("TSAnyKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSNumberKeyword=function(e,t){if(!e)return!1;if("TSNumberKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSObjectKeyword=function(e,t){if(!e)return!1;if("TSObjectKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSBooleanKeyword=function(e,t){if(!e)return!1;if("TSBooleanKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSStringKeyword=function(e,t){if(!e)return!1;if("TSStringKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSSymbolKeyword=function(e,t){if(!e)return!1;if("TSSymbolKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSVoidKeyword=function(e,t){if(!e)return!1;if("TSVoidKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSUndefinedKeyword=function(e,t){if(!e)return!1;if("TSUndefinedKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSNullKeyword=function(e,t){if(!e)return!1;if("TSNullKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSNeverKeyword=function(e,t){if(!e)return!1;if("TSNeverKeyword"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSThisType=function(e,t){if(!e)return!1;if("TSThisType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSFunctionType=function(e,t){if(!e)return!1;if("TSFunctionType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSConstructorType=function(e,t){if(!e)return!1;if("TSConstructorType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeReference=function(e,t){if(!e)return!1;if("TSTypeReference"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypePredicate=function(e,t){if(!e)return!1;if("TSTypePredicate"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeQuery=function(e,t){if(!e)return!1;if("TSTypeQuery"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeLiteral=function(e,t){if(!e)return!1;if("TSTypeLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSArrayType=function(e,t){if(!e)return!1;if("TSArrayType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTupleType=function(e,t){if(!e)return!1;if("TSTupleType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSUnionType=function(e,t){if(!e)return!1;if("TSUnionType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSIntersectionType=function(e,t){if(!e)return!1;if("TSIntersectionType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSConditionalType=function(e,t){if(!e)return!1;if("TSConditionalType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSInferType=function(e,t){if(!e)return!1;if("TSInferType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSParenthesizedType=function(e,t){if(!e)return!1;if("TSParenthesizedType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeOperator=function(e,t){if(!e)return!1;if("TSTypeOperator"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSIndexedAccessType=function(e,t){if(!e)return!1;if("TSIndexedAccessType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSMappedType=function(e,t){if(!e)return!1;if("TSMappedType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSLiteralType=function(e,t){if(!e)return!1;if("TSLiteralType"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSExpressionWithTypeArguments=function(e,t){if(!e)return!1;if("TSExpressionWithTypeArguments"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSInterfaceDeclaration=function(e,t){if(!e)return!1;if("TSInterfaceDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSInterfaceBody=function(e,t){if(!e)return!1;if("TSInterfaceBody"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeAliasDeclaration=function(e,t){if(!e)return!1;if("TSTypeAliasDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSAsExpression=function(e,t){if(!e)return!1;if("TSAsExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeAssertion=function(e,t){if(!e)return!1;if("TSTypeAssertion"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSEnumDeclaration=function(e,t){if(!e)return!1;if("TSEnumDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSEnumMember=function(e,t){if(!e)return!1;if("TSEnumMember"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSModuleDeclaration=function(e,t){if(!e)return!1;if("TSModuleDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSModuleBlock=function(e,t){if(!e)return!1;if("TSModuleBlock"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSImportEqualsDeclaration=function(e,t){if(!e)return!1;if("TSImportEqualsDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSExternalModuleReference=function(e,t){if(!e)return!1;if("TSExternalModuleReference"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSNonNullExpression=function(e,t){if(!e)return!1;if("TSNonNullExpression"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSExportAssignment=function(e,t){if(!e)return!1;if("TSExportAssignment"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSNamespaceExportDeclaration=function(e,t){if(!e)return!1;if("TSNamespaceExportDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeAnnotation=function(e,t){if(!e)return!1;if("TSTypeAnnotation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeParameterInstantiation=function(e,t){if(!e)return!1;if("TSTypeParameterInstantiation"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeParameterDeclaration=function(e,t){if(!e)return!1;if("TSTypeParameterDeclaration"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeParameter=function(e,t){if(!e)return!1;if("TSTypeParameter"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isExpression=function(e,t){if(!e)return!1;const r=e.type;if("Expression"===r||"ArrayExpression"===r||"AssignmentExpression"===r||"BinaryExpression"===r||"CallExpression"===r||"ConditionalExpression"===r||"FunctionExpression"===r||"Identifier"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"LogicalExpression"===r||"MemberExpression"===r||"NewExpression"===r||"ObjectExpression"===r||"SequenceExpression"===r||"ThisExpression"===r||"UnaryExpression"===r||"UpdateExpression"===r||"ArrowFunctionExpression"===r||"ClassExpression"===r||"MetaProperty"===r||"Super"===r||"TaggedTemplateExpression"===r||"TemplateLiteral"===r||"YieldExpression"===r||"TypeCastExpression"===r||"JSXElement"===r||"JSXFragment"===r||"ParenthesizedExpression"===r||"AwaitExpression"===r||"BindExpression"===r||"OptionalMemberExpression"===r||"OptionalCallExpression"===r||"Import"===r||"DoExpression"===r||"BigIntLiteral"===r||"TSAsExpression"===r||"TSTypeAssertion"===r||"TSNonNullExpression"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isBinary=function(e,t){if(!e)return!1;const r=e.type;if("Binary"===r||"BinaryExpression"===r||"LogicalExpression"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isScopable=function(e,t){if(!e)return!1;const r=e.type;if("Scopable"===r||"BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ClassDeclaration"===r||"ClassExpression"===r||"ForOfStatement"===r||"ClassMethod"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isBlockParent=function(e,t){if(!e)return!1;const r=e.type;if("BlockParent"===r||"BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ForOfStatement"===r||"ClassMethod"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isBlock=function(e,t){if(!e)return!1;const r=e.type;if("Block"===r||"BlockStatement"===r||"Program"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isStatement=function(e,t){if(!e)return!1;const r=e.type;if("Statement"===r||"BlockStatement"===r||"BreakStatement"===r||"ContinueStatement"===r||"DebuggerStatement"===r||"DoWhileStatement"===r||"EmptyStatement"===r||"ExpressionStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"IfStatement"===r||"LabeledStatement"===r||"ReturnStatement"===r||"SwitchStatement"===r||"ThrowStatement"===r||"TryStatement"===r||"VariableDeclaration"===r||"WhileStatement"===r||"WithStatement"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ForOfStatement"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r||"TSImportEqualsDeclaration"===r||"TSExportAssignment"===r||"TSNamespaceExportDeclaration"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isTerminatorless=function(e,t){if(!e)return!1;const r=e.type;if("Terminatorless"===r||"BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r||"YieldExpression"===r||"AwaitExpression"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isCompletionStatement=function(e,t){if(!e)return!1;const r=e.type;if("CompletionStatement"===r||"BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isConditional=function(e,t){if(!e)return!1;const r=e.type;if("Conditional"===r||"ConditionalExpression"===r||"IfStatement"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isLoop=function(e,t){if(!e)return!1;const r=e.type;if("Loop"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"WhileStatement"===r||"ForOfStatement"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isWhile=function(e,t){if(!e)return!1;const r=e.type;if("While"===r||"DoWhileStatement"===r||"WhileStatement"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isExpressionWrapper=function(e,t){if(!e)return!1;const r=e.type;if("ExpressionWrapper"===r||"ExpressionStatement"===r||"TypeCastExpression"===r||"ParenthesizedExpression"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFor=function(e,t){if(!e)return!1;const r=e.type;if("For"===r||"ForInStatement"===r||"ForStatement"===r||"ForOfStatement"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isForXStatement=function(e,t){if(!e)return!1;const r=e.type;if("ForXStatement"===r||"ForInStatement"===r||"ForOfStatement"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFunction=function(e,t){if(!e)return!1;const r=e.type;if("Function"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFunctionParent=function(e,t){if(!e)return!1;const r=e.type;if("FunctionParent"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isPureish=function(e,t){if(!e)return!1;const r=e.type;if("Pureish"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"ArrowFunctionExpression"===r||"ClassDeclaration"===r||"ClassExpression"===r||"BigIntLiteral"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isDeclaration=function(e,t){if(!e)return!1;const r=e.type;if("Declaration"===r||"FunctionDeclaration"===r||"VariableDeclaration"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isPatternLike=function(e,t){if(!e)return!1;const r=e.type;if("PatternLike"===r||"Identifier"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isLVal=function(e,t){if(!e)return!1;const r=e.type;if("LVal"===r||"Identifier"===r||"MemberExpression"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||"TSParameterProperty"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isTSEntityName=function(e,t){if(!e)return!1;const r=e.type;if("TSEntityName"===r||"Identifier"===r||"TSQualifiedName"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isLiteral=function(e,t){if(!e)return!1;const r=e.type;if("Literal"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"TemplateLiteral"===r||"BigIntLiteral"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isImmutable=function(e,t){if(!e)return!1;const r=e.type;if("Immutable"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXOpeningElement"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r||"BigIntLiteral"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isUserWhitespacable=function(e,t){if(!e)return!1;const r=e.type;if("UserWhitespacable"===r||"ObjectMethod"===r||"ObjectProperty"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isMethod=function(e,t){if(!e)return!1;const r=e.type;if("Method"===r||"ObjectMethod"===r||"ClassMethod"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isObjectMember=function(e,t){if(!e)return!1;const r=e.type;if("ObjectMember"===r||"ObjectMethod"===r||"ObjectProperty"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isProperty=function(e,t){if(!e)return!1;const r=e.type;if("Property"===r||"ObjectProperty"===r||"ClassProperty"===r||"ClassPrivateProperty"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isUnaryLike=function(e,t){if(!e)return!1;const r=e.type;if("UnaryLike"===r||"UnaryExpression"===r||"SpreadElement"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isPattern=function(e,t){if(!e)return!1;const r=e.type;if("Pattern"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isClass=function(e,t){if(!e)return!1;const r=e.type;if("Class"===r||"ClassDeclaration"===r||"ClassExpression"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isModuleDeclaration=function(e,t){if(!e)return!1;const r=e.type;if("ModuleDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isExportDeclaration=function(e,t){if(!e)return!1;const r=e.type;if("ExportDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isModuleSpecifier=function(e,t){if(!e)return!1;const r=e.type;if("ModuleSpecifier"===r||"ExportSpecifier"===r||"ImportDefaultSpecifier"===r||"ImportNamespaceSpecifier"===r||"ImportSpecifier"===r||"ExportDefaultSpecifier"===r||"ExportNamespaceSpecifier"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFlow=function(e,t){if(!e)return!1;const r=e.type;if("Flow"===r||"AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ClassImplements"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"DeclaredPredicate"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"FunctionTypeParam"===r||"GenericTypeAnnotation"===r||"InferredPredicate"===r||"InterfaceExtends"===r||"InterfaceDeclaration"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r||"OpaqueType"===r||"QualifiedTypeIdentifier"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"TypeAlias"===r||"TypeAnnotation"===r||"TypeCastExpression"===r||"TypeParameter"===r||"TypeParameterDeclaration"===r||"TypeParameterInstantiation"===r||"UnionTypeAnnotation"===r||"Variance"===r||"VoidTypeAnnotation"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFlowType=function(e,t){if(!e)return!1;const r=e.type;if("FlowType"===r||"AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"GenericTypeAnnotation"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"UnionTypeAnnotation"===r||"VoidTypeAnnotation"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFlowBaseAnnotation=function(e,t){if(!e)return!1;const r=e.type;if("FlowBaseAnnotation"===r||"AnyTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NumberTypeAnnotation"===r||"StringTypeAnnotation"===r||"ThisTypeAnnotation"===r||"VoidTypeAnnotation"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFlowDeclaration=function(e,t){if(!e)return!1;const r=e.type;if("FlowDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isFlowPredicate=function(e,t){if(!e)return!1;const r=e.type;if("FlowPredicate"===r||"DeclaredPredicate"===r||"InferredPredicate"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isJSX=function(e,t){if(!e)return!1;const r=e.type;if("JSX"===r||"JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXEmptyExpression"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXIdentifier"===r||"JSXMemberExpression"===r||"JSXNamespacedName"===r||"JSXOpeningElement"===r||"JSXSpreadAttribute"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isPrivate=function(e,t){if(!e)return!1;const r=e.type;if("Private"===r||"ClassPrivateProperty"===r||"PrivateName"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isTSTypeElement=function(e,t){if(!e)return!1;const r=e.type;if("TSTypeElement"===r||"TSCallSignatureDeclaration"===r||"TSConstructSignatureDeclaration"===r||"TSPropertySignature"===r||"TSMethodSignature"===r||"TSIndexSignature"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isTSType=function(e,t){if(!e)return!1;const r=e.type;if("TSType"===r||"TSAnyKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSBooleanKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSVoidKeyword"===r||"TSUndefinedKeyword"===r||"TSNullKeyword"===r||"TSNeverKeyword"===r||"TSThisType"===r||"TSFunctionType"===r||"TSConstructorType"===r||"TSTypeReference"===r||"TSTypePredicate"===r||"TSTypeQuery"===r||"TSTypeLiteral"===r||"TSArrayType"===r||"TSTupleType"===r||"TSUnionType"===r||"TSIntersectionType"===r||"TSConditionalType"===r||"TSInferType"===r||"TSParenthesizedType"===r||"TSTypeOperator"===r||"TSIndexedAccessType"===r||"TSMappedType"===r||"TSLiteralType"===r||"TSExpressionWithTypeArguments"===r)return void 0===t||(0,n.default)(e,t);return!1},t.isNumberLiteral=function(e,t){if(console.trace("The node type NumberLiteral has been renamed to NumericLiteral"),!e)return!1;if("NumberLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isRegexLiteral=function(e,t){if(console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"),!e)return!1;if("RegexLiteral"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isRestProperty=function(e,t){if(console.trace("The node type RestProperty has been renamed to RestElement"),!e)return!1;if("RestProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1},t.isSpreadProperty=function(e,t){if(console.trace("The node type SpreadProperty has been renamed to SpreadElement"),!e)return!1;if("SpreadProperty"===e.type)return void 0===t||(0,n.default)(e,t);return!1};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(44))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayExpression=t.ArrayExpression=function(...e){return(0,n.default)("ArrayExpression",...e)},t.assignmentExpression=t.AssignmentExpression=function(...e){return(0,n.default)("AssignmentExpression",...e)},t.binaryExpression=t.BinaryExpression=function(...e){return(0,n.default)("BinaryExpression",...e)},t.interpreterDirective=t.InterpreterDirective=function(...e){return(0,n.default)("InterpreterDirective",...e)},t.directive=t.Directive=function(...e){return(0,n.default)("Directive",...e)},t.directiveLiteral=t.DirectiveLiteral=function(...e){return(0,n.default)("DirectiveLiteral",...e)},t.blockStatement=t.BlockStatement=function(...e){return(0,n.default)("BlockStatement",...e)},t.breakStatement=t.BreakStatement=function(...e){return(0,n.default)("BreakStatement",...e)},t.callExpression=t.CallExpression=function(...e){return(0,n.default)("CallExpression",...e)},t.catchClause=t.CatchClause=function(...e){return(0,n.default)("CatchClause",...e)},t.conditionalExpression=t.ConditionalExpression=function(...e){return(0,n.default)("ConditionalExpression",...e)},t.continueStatement=t.ContinueStatement=function(...e){return(0,n.default)("ContinueStatement",...e)},t.debuggerStatement=t.DebuggerStatement=function(...e){return(0,n.default)("DebuggerStatement",...e)},t.doWhileStatement=t.DoWhileStatement=function(...e){return(0,n.default)("DoWhileStatement",...e)},t.emptyStatement=t.EmptyStatement=function(...e){return(0,n.default)("EmptyStatement",...e)},t.expressionStatement=t.ExpressionStatement=function(...e){return(0,n.default)("ExpressionStatement",...e)},t.file=t.File=function(...e){return(0,n.default)("File",...e)},t.forInStatement=t.ForInStatement=function(...e){return(0,n.default)("ForInStatement",...e)},t.forStatement=t.ForStatement=function(...e){return(0,n.default)("ForStatement",...e)},t.functionDeclaration=t.FunctionDeclaration=function(...e){return(0,n.default)("FunctionDeclaration",...e)},t.functionExpression=t.FunctionExpression=function(...e){return(0,n.default)("FunctionExpression",...e)},t.identifier=t.Identifier=function(...e){return(0,n.default)("Identifier",...e)},t.ifStatement=t.IfStatement=function(...e){return(0,n.default)("IfStatement",...e)},t.labeledStatement=t.LabeledStatement=function(...e){return(0,n.default)("LabeledStatement",...e)},t.stringLiteral=t.StringLiteral=function(...e){return(0,n.default)("StringLiteral",...e)},t.numericLiteral=t.NumericLiteral=function(...e){return(0,n.default)("NumericLiteral",...e)},t.nullLiteral=t.NullLiteral=function(...e){return(0,n.default)("NullLiteral",...e)},t.booleanLiteral=t.BooleanLiteral=function(...e){return(0,n.default)("BooleanLiteral",...e)},t.regExpLiteral=t.RegExpLiteral=function(...e){return(0,n.default)("RegExpLiteral",...e)},t.logicalExpression=t.LogicalExpression=function(...e){return(0,n.default)("LogicalExpression",...e)},t.memberExpression=t.MemberExpression=function(...e){return(0,n.default)("MemberExpression",...e)},t.newExpression=t.NewExpression=function(...e){return(0,n.default)("NewExpression",...e)},t.program=t.Program=function(...e){return(0,n.default)("Program",...e)},t.objectExpression=t.ObjectExpression=function(...e){return(0,n.default)("ObjectExpression",...e)},t.objectMethod=t.ObjectMethod=function(...e){return(0,n.default)("ObjectMethod",...e)},t.objectProperty=t.ObjectProperty=function(...e){return(0,n.default)("ObjectProperty",...e)},t.restElement=t.RestElement=function(...e){return(0,n.default)("RestElement",...e)},t.returnStatement=t.ReturnStatement=function(...e){return(0,n.default)("ReturnStatement",...e)},t.sequenceExpression=t.SequenceExpression=function(...e){return(0,n.default)("SequenceExpression",...e)},t.switchCase=t.SwitchCase=function(...e){return(0,n.default)("SwitchCase",...e)},t.switchStatement=t.SwitchStatement=function(...e){return(0,n.default)("SwitchStatement",...e)},t.thisExpression=t.ThisExpression=function(...e){return(0,n.default)("ThisExpression",...e)},t.throwStatement=t.ThrowStatement=function(...e){return(0,n.default)("ThrowStatement",...e)},t.tryStatement=t.TryStatement=function(...e){return(0,n.default)("TryStatement",...e)},t.unaryExpression=t.UnaryExpression=function(...e){return(0,n.default)("UnaryExpression",...e)},t.updateExpression=t.UpdateExpression=function(...e){return(0,n.default)("UpdateExpression",...e)},t.variableDeclaration=t.VariableDeclaration=function(...e){return(0,n.default)("VariableDeclaration",...e)},t.variableDeclarator=t.VariableDeclarator=function(...e){return(0,n.default)("VariableDeclarator",...e)},t.whileStatement=t.WhileStatement=function(...e){return(0,n.default)("WhileStatement",...e)},t.withStatement=t.WithStatement=function(...e){return(0,n.default)("WithStatement",...e)},t.assignmentPattern=t.AssignmentPattern=function(...e){return(0,n.default)("AssignmentPattern",...e)},t.arrayPattern=t.ArrayPattern=function(...e){return(0,n.default)("ArrayPattern",...e)},t.arrowFunctionExpression=t.ArrowFunctionExpression=function(...e){return(0,n.default)("ArrowFunctionExpression",...e)},t.classBody=t.ClassBody=function(...e){return(0,n.default)("ClassBody",...e)},t.classDeclaration=t.ClassDeclaration=function(...e){return(0,n.default)("ClassDeclaration",...e)},t.classExpression=t.ClassExpression=function(...e){return(0,n.default)("ClassExpression",...e)},t.exportAllDeclaration=t.ExportAllDeclaration=function(...e){return(0,n.default)("ExportAllDeclaration",...e)},t.exportDefaultDeclaration=t.ExportDefaultDeclaration=function(...e){return(0,n.default)("ExportDefaultDeclaration",...e)},t.exportNamedDeclaration=t.ExportNamedDeclaration=function(...e){return(0,n.default)("ExportNamedDeclaration",...e)},t.exportSpecifier=t.ExportSpecifier=function(...e){return(0,n.default)("ExportSpecifier",...e)},t.forOfStatement=t.ForOfStatement=function(...e){return(0,n.default)("ForOfStatement",...e)},t.importDeclaration=t.ImportDeclaration=function(...e){return(0,n.default)("ImportDeclaration",...e)},t.importDefaultSpecifier=t.ImportDefaultSpecifier=function(...e){return(0,n.default)("ImportDefaultSpecifier",...e)},t.importNamespaceSpecifier=t.ImportNamespaceSpecifier=function(...e){return(0,n.default)("ImportNamespaceSpecifier",...e)},t.importSpecifier=t.ImportSpecifier=function(...e){return(0,n.default)("ImportSpecifier",...e)},t.metaProperty=t.MetaProperty=function(...e){return(0,n.default)("MetaProperty",...e)},t.classMethod=t.ClassMethod=function(...e){return(0,n.default)("ClassMethod",...e)},t.objectPattern=t.ObjectPattern=function(...e){return(0,n.default)("ObjectPattern",...e)},t.spreadElement=t.SpreadElement=function(...e){return(0,n.default)("SpreadElement",...e)},t.super=t.Super=function(...e){return(0,n.default)("Super",...e)},t.taggedTemplateExpression=t.TaggedTemplateExpression=function(...e){return(0,n.default)("TaggedTemplateExpression",...e)},t.templateElement=t.TemplateElement=function(...e){return(0,n.default)("TemplateElement",...e)},t.templateLiteral=t.TemplateLiteral=function(...e){return(0,n.default)("TemplateLiteral",...e)},t.yieldExpression=t.YieldExpression=function(...e){return(0,n.default)("YieldExpression",...e)},t.anyTypeAnnotation=t.AnyTypeAnnotation=function(...e){return(0,n.default)("AnyTypeAnnotation",...e)},t.arrayTypeAnnotation=t.ArrayTypeAnnotation=function(...e){return(0,n.default)("ArrayTypeAnnotation",...e)},t.booleanTypeAnnotation=t.BooleanTypeAnnotation=function(...e){return(0,n.default)("BooleanTypeAnnotation",...e)},t.booleanLiteralTypeAnnotation=t.BooleanLiteralTypeAnnotation=function(...e){return(0,n.default)("BooleanLiteralTypeAnnotation",...e)},t.nullLiteralTypeAnnotation=t.NullLiteralTypeAnnotation=function(...e){return(0,n.default)("NullLiteralTypeAnnotation",...e)},t.classImplements=t.ClassImplements=function(...e){return(0,n.default)("ClassImplements",...e)},t.declareClass=t.DeclareClass=function(...e){return(0,n.default)("DeclareClass",...e)},t.declareFunction=t.DeclareFunction=function(...e){return(0,n.default)("DeclareFunction",...e)},t.declareInterface=t.DeclareInterface=function(...e){return(0,n.default)("DeclareInterface",...e)},t.declareModule=t.DeclareModule=function(...e){return(0,n.default)("DeclareModule",...e)},t.declareModuleExports=t.DeclareModuleExports=function(...e){return(0,n.default)("DeclareModuleExports",...e)},t.declareTypeAlias=t.DeclareTypeAlias=function(...e){return(0,n.default)("DeclareTypeAlias",...e)},t.declareOpaqueType=t.DeclareOpaqueType=function(...e){return(0,n.default)("DeclareOpaqueType",...e)},t.declareVariable=t.DeclareVariable=function(...e){return(0,n.default)("DeclareVariable",...e)},t.declareExportDeclaration=t.DeclareExportDeclaration=function(...e){return(0,n.default)("DeclareExportDeclaration",...e)},t.declareExportAllDeclaration=t.DeclareExportAllDeclaration=function(...e){return(0,n.default)("DeclareExportAllDeclaration",...e)},t.declaredPredicate=t.DeclaredPredicate=function(...e){return(0,n.default)("DeclaredPredicate",...e)},t.existsTypeAnnotation=t.ExistsTypeAnnotation=function(...e){return(0,n.default)("ExistsTypeAnnotation",...e)},t.functionTypeAnnotation=t.FunctionTypeAnnotation=function(...e){return(0,n.default)("FunctionTypeAnnotation",...e)},t.functionTypeParam=t.FunctionTypeParam=function(...e){return(0,n.default)("FunctionTypeParam",...e)},t.genericTypeAnnotation=t.GenericTypeAnnotation=function(...e){return(0,n.default)("GenericTypeAnnotation",...e)},t.inferredPredicate=t.InferredPredicate=function(...e){return(0,n.default)("InferredPredicate",...e)},t.interfaceExtends=t.InterfaceExtends=function(...e){return(0,n.default)("InterfaceExtends",...e)},t.interfaceDeclaration=t.InterfaceDeclaration=function(...e){return(0,n.default)("InterfaceDeclaration",...e)},t.interfaceTypeAnnotation=t.InterfaceTypeAnnotation=function(...e){return(0,n.default)("InterfaceTypeAnnotation",...e)},t.intersectionTypeAnnotation=t.IntersectionTypeAnnotation=function(...e){return(0,n.default)("IntersectionTypeAnnotation",...e)},t.mixedTypeAnnotation=t.MixedTypeAnnotation=function(...e){return(0,n.default)("MixedTypeAnnotation",...e)},t.emptyTypeAnnotation=t.EmptyTypeAnnotation=function(...e){return(0,n.default)("EmptyTypeAnnotation",...e)},t.nullableTypeAnnotation=t.NullableTypeAnnotation=function(...e){return(0,n.default)("NullableTypeAnnotation",...e)},t.numberLiteralTypeAnnotation=t.NumberLiteralTypeAnnotation=function(...e){return(0,n.default)("NumberLiteralTypeAnnotation",...e)},t.numberTypeAnnotation=t.NumberTypeAnnotation=function(...e){return(0,n.default)("NumberTypeAnnotation",...e)},t.objectTypeAnnotation=t.ObjectTypeAnnotation=function(...e){return(0,n.default)("ObjectTypeAnnotation",...e)},t.objectTypeInternalSlot=t.ObjectTypeInternalSlot=function(...e){return(0,n.default)("ObjectTypeInternalSlot",...e)},t.objectTypeCallProperty=t.ObjectTypeCallProperty=function(...e){return(0,n.default)("ObjectTypeCallProperty",...e)},t.objectTypeIndexer=t.ObjectTypeIndexer=function(...e){return(0,n.default)("ObjectTypeIndexer",...e)},t.objectTypeProperty=t.ObjectTypeProperty=function(...e){return(0,n.default)("ObjectTypeProperty",...e)},t.objectTypeSpreadProperty=t.ObjectTypeSpreadProperty=function(...e){return(0,n.default)("ObjectTypeSpreadProperty",...e)},t.opaqueType=t.OpaqueType=function(...e){return(0,n.default)("OpaqueType",...e)},t.qualifiedTypeIdentifier=t.QualifiedTypeIdentifier=function(...e){return(0,n.default)("QualifiedTypeIdentifier",...e)},t.stringLiteralTypeAnnotation=t.StringLiteralTypeAnnotation=function(...e){return(0,n.default)("StringLiteralTypeAnnotation",...e)},t.stringTypeAnnotation=t.StringTypeAnnotation=function(...e){return(0,n.default)("StringTypeAnnotation",...e)},t.thisTypeAnnotation=t.ThisTypeAnnotation=function(...e){return(0,n.default)("ThisTypeAnnotation",...e)},t.tupleTypeAnnotation=t.TupleTypeAnnotation=function(...e){return(0,n.default)("TupleTypeAnnotation",...e)},t.typeofTypeAnnotation=t.TypeofTypeAnnotation=function(...e){return(0,n.default)("TypeofTypeAnnotation",...e)},t.typeAlias=t.TypeAlias=function(...e){return(0,n.default)("TypeAlias",...e)},t.typeAnnotation=t.TypeAnnotation=function(...e){return(0,n.default)("TypeAnnotation",...e)},t.typeCastExpression=t.TypeCastExpression=function(...e){return(0,n.default)("TypeCastExpression",...e)},t.typeParameter=t.TypeParameter=function(...e){return(0,n.default)("TypeParameter",...e)},t.typeParameterDeclaration=t.TypeParameterDeclaration=function(...e){return(0,n.default)("TypeParameterDeclaration",...e)},t.typeParameterInstantiation=t.TypeParameterInstantiation=function(...e){return(0,n.default)("TypeParameterInstantiation",...e)},t.unionTypeAnnotation=t.UnionTypeAnnotation=function(...e){return(0,n.default)("UnionTypeAnnotation",...e)},t.variance=t.Variance=function(...e){return(0,n.default)("Variance",...e)},t.voidTypeAnnotation=t.VoidTypeAnnotation=function(...e){return(0,n.default)("VoidTypeAnnotation",...e)},t.jSXAttribute=t.jsxAttribute=t.JSXAttribute=function(...e){return(0,n.default)("JSXAttribute",...e)},t.jSXClosingElement=t.jsxClosingElement=t.JSXClosingElement=function(...e){return(0,n.default)("JSXClosingElement",...e)},t.jSXElement=t.jsxElement=t.JSXElement=function(...e){return(0,n.default)("JSXElement",...e)},t.jSXEmptyExpression=t.jsxEmptyExpression=t.JSXEmptyExpression=function(...e){return(0,n.default)("JSXEmptyExpression",...e)},t.jSXExpressionContainer=t.jsxExpressionContainer=t.JSXExpressionContainer=function(...e){return(0,n.default)("JSXExpressionContainer",...e)},t.jSXSpreadChild=t.jsxSpreadChild=t.JSXSpreadChild=function(...e){return(0,n.default)("JSXSpreadChild",...e)},t.jSXIdentifier=t.jsxIdentifier=t.JSXIdentifier=function(...e){return(0,n.default)("JSXIdentifier",...e)},t.jSXMemberExpression=t.jsxMemberExpression=t.JSXMemberExpression=function(...e){return(0,n.default)("JSXMemberExpression",...e)},t.jSXNamespacedName=t.jsxNamespacedName=t.JSXNamespacedName=function(...e){return(0,n.default)("JSXNamespacedName",...e)},t.jSXOpeningElement=t.jsxOpeningElement=t.JSXOpeningElement=function(...e){return(0,n.default)("JSXOpeningElement",...e)},t.jSXSpreadAttribute=t.jsxSpreadAttribute=t.JSXSpreadAttribute=function(...e){return(0,n.default)("JSXSpreadAttribute",...e)},t.jSXText=t.jsxText=t.JSXText=function(...e){return(0,n.default)("JSXText",...e)},t.jSXFragment=t.jsxFragment=t.JSXFragment=function(...e){return(0,n.default)("JSXFragment",...e)},t.jSXOpeningFragment=t.jsxOpeningFragment=t.JSXOpeningFragment=function(...e){return(0,n.default)("JSXOpeningFragment",...e)},t.jSXClosingFragment=t.jsxClosingFragment=t.JSXClosingFragment=function(...e){return(0,n.default)("JSXClosingFragment",...e)},t.noop=t.Noop=function(...e){return(0,n.default)("Noop",...e)},t.parenthesizedExpression=t.ParenthesizedExpression=function(...e){return(0,n.default)("ParenthesizedExpression",...e)},t.awaitExpression=t.AwaitExpression=function(...e){return(0,n.default)("AwaitExpression",...e)},t.bindExpression=t.BindExpression=function(...e){return(0,n.default)("BindExpression",...e)},t.classProperty=t.ClassProperty=function(...e){return(0,n.default)("ClassProperty",...e)},t.optionalMemberExpression=t.OptionalMemberExpression=function(...e){return(0,n.default)("OptionalMemberExpression",...e)},t.optionalCallExpression=t.OptionalCallExpression=function(...e){return(0,n.default)("OptionalCallExpression",...e)},t.classPrivateProperty=t.ClassPrivateProperty=function(...e){return(0,n.default)("ClassPrivateProperty",...e)},t.import=t.Import=function(...e){return(0,n.default)("Import",...e)},t.decorator=t.Decorator=function(...e){return(0,n.default)("Decorator",...e)},t.doExpression=t.DoExpression=function(...e){return(0,n.default)("DoExpression",...e)},t.exportDefaultSpecifier=t.ExportDefaultSpecifier=function(...e){return(0,n.default)("ExportDefaultSpecifier",...e)},t.exportNamespaceSpecifier=t.ExportNamespaceSpecifier=function(...e){return(0,n.default)("ExportNamespaceSpecifier",...e)},t.privateName=t.PrivateName=function(...e){return(0,n.default)("PrivateName",...e)},t.bigIntLiteral=t.BigIntLiteral=function(...e){return(0,n.default)("BigIntLiteral",...e)},t.tSParameterProperty=t.tsParameterProperty=t.TSParameterProperty=function(...e){return(0,n.default)("TSParameterProperty",...e)},t.tSDeclareFunction=t.tsDeclareFunction=t.TSDeclareFunction=function(...e){return(0,n.default)("TSDeclareFunction",...e)},t.tSDeclareMethod=t.tsDeclareMethod=t.TSDeclareMethod=function(...e){return(0,n.default)("TSDeclareMethod",...e)},t.tSQualifiedName=t.tsQualifiedName=t.TSQualifiedName=function(...e){return(0,n.default)("TSQualifiedName",...e)},t.tSCallSignatureDeclaration=t.tsCallSignatureDeclaration=t.TSCallSignatureDeclaration=function(...e){return(0,n.default)("TSCallSignatureDeclaration",...e)},t.tSConstructSignatureDeclaration=t.tsConstructSignatureDeclaration=t.TSConstructSignatureDeclaration=function(...e){return(0,n.default)("TSConstructSignatureDeclaration",...e)},t.tSPropertySignature=t.tsPropertySignature=t.TSPropertySignature=function(...e){return(0,n.default)("TSPropertySignature",...e)},t.tSMethodSignature=t.tsMethodSignature=t.TSMethodSignature=function(...e){return(0,n.default)("TSMethodSignature",...e)},t.tSIndexSignature=t.tsIndexSignature=t.TSIndexSignature=function(...e){return(0,n.default)("TSIndexSignature",...e)},t.tSAnyKeyword=t.tsAnyKeyword=t.TSAnyKeyword=function(...e){return(0,n.default)("TSAnyKeyword",...e)},t.tSNumberKeyword=t.tsNumberKeyword=t.TSNumberKeyword=function(...e){return(0,n.default)("TSNumberKeyword",...e)},t.tSObjectKeyword=t.tsObjectKeyword=t.TSObjectKeyword=function(...e){return(0,n.default)("TSObjectKeyword",...e)},t.tSBooleanKeyword=t.tsBooleanKeyword=t.TSBooleanKeyword=function(...e){return(0,n.default)("TSBooleanKeyword",...e)},t.tSStringKeyword=t.tsStringKeyword=t.TSStringKeyword=function(...e){return(0,n.default)("TSStringKeyword",...e)},t.tSSymbolKeyword=t.tsSymbolKeyword=t.TSSymbolKeyword=function(...e){return(0,n.default)("TSSymbolKeyword",...e)},t.tSVoidKeyword=t.tsVoidKeyword=t.TSVoidKeyword=function(...e){return(0,n.default)("TSVoidKeyword",...e)},t.tSUndefinedKeyword=t.tsUndefinedKeyword=t.TSUndefinedKeyword=function(...e){return(0,n.default)("TSUndefinedKeyword",...e)},t.tSNullKeyword=t.tsNullKeyword=t.TSNullKeyword=function(...e){return(0,n.default)("TSNullKeyword",...e)},t.tSNeverKeyword=t.tsNeverKeyword=t.TSNeverKeyword=function(...e){return(0,n.default)("TSNeverKeyword",...e)},t.tSThisType=t.tsThisType=t.TSThisType=function(...e){return(0,n.default)("TSThisType",...e)},t.tSFunctionType=t.tsFunctionType=t.TSFunctionType=function(...e){return(0,n.default)("TSFunctionType",...e)},t.tSConstructorType=t.tsConstructorType=t.TSConstructorType=function(...e){return(0,n.default)("TSConstructorType",...e)},t.tSTypeReference=t.tsTypeReference=t.TSTypeReference=function(...e){return(0,n.default)("TSTypeReference",...e)},t.tSTypePredicate=t.tsTypePredicate=t.TSTypePredicate=function(...e){return(0,n.default)("TSTypePredicate",...e)},t.tSTypeQuery=t.tsTypeQuery=t.TSTypeQuery=function(...e){return(0,n.default)("TSTypeQuery",...e)},t.tSTypeLiteral=t.tsTypeLiteral=t.TSTypeLiteral=function(...e){return(0,n.default)("TSTypeLiteral",...e)},t.tSArrayType=t.tsArrayType=t.TSArrayType=function(...e){return(0,n.default)("TSArrayType",...e)},t.tSTupleType=t.tsTupleType=t.TSTupleType=function(...e){return(0,n.default)("TSTupleType",...e)},t.tSUnionType=t.tsUnionType=t.TSUnionType=function(...e){return(0,n.default)("TSUnionType",...e)},t.tSIntersectionType=t.tsIntersectionType=t.TSIntersectionType=function(...e){return(0,n.default)("TSIntersectionType",...e)},t.tSConditionalType=t.tsConditionalType=t.TSConditionalType=function(...e){return(0,n.default)("TSConditionalType",...e)},t.tSInferType=t.tsInferType=t.TSInferType=function(...e){return(0,n.default)("TSInferType",...e)},t.tSParenthesizedType=t.tsParenthesizedType=t.TSParenthesizedType=function(...e){return(0,n.default)("TSParenthesizedType",...e)},t.tSTypeOperator=t.tsTypeOperator=t.TSTypeOperator=function(...e){return(0,n.default)("TSTypeOperator",...e)},t.tSIndexedAccessType=t.tsIndexedAccessType=t.TSIndexedAccessType=function(...e){return(0,n.default)("TSIndexedAccessType",...e)},t.tSMappedType=t.tsMappedType=t.TSMappedType=function(...e){return(0,n.default)("TSMappedType",...e)},t.tSLiteralType=t.tsLiteralType=t.TSLiteralType=function(...e){return(0,n.default)("TSLiteralType",...e)},t.tSExpressionWithTypeArguments=t.tsExpressionWithTypeArguments=t.TSExpressionWithTypeArguments=function(...e){return(0,n.default)("TSExpressionWithTypeArguments",...e)},t.tSInterfaceDeclaration=t.tsInterfaceDeclaration=t.TSInterfaceDeclaration=function(...e){return(0,n.default)("TSInterfaceDeclaration",...e)},t.tSInterfaceBody=t.tsInterfaceBody=t.TSInterfaceBody=function(...e){return(0,n.default)("TSInterfaceBody",...e)},t.tSTypeAliasDeclaration=t.tsTypeAliasDeclaration=t.TSTypeAliasDeclaration=function(...e){return(0,n.default)("TSTypeAliasDeclaration",...e)},t.tSAsExpression=t.tsAsExpression=t.TSAsExpression=function(...e){return(0,n.default)("TSAsExpression",...e)},t.tSTypeAssertion=t.tsTypeAssertion=t.TSTypeAssertion=function(...e){return(0,n.default)("TSTypeAssertion",...e)},t.tSEnumDeclaration=t.tsEnumDeclaration=t.TSEnumDeclaration=function(...e){return(0,n.default)("TSEnumDeclaration",...e)},t.tSEnumMember=t.tsEnumMember=t.TSEnumMember=function(...e){return(0,n.default)("TSEnumMember",...e)},t.tSModuleDeclaration=t.tsModuleDeclaration=t.TSModuleDeclaration=function(...e){return(0,n.default)("TSModuleDeclaration",...e)},t.tSModuleBlock=t.tsModuleBlock=t.TSModuleBlock=function(...e){return(0,n.default)("TSModuleBlock",...e)},t.tSImportEqualsDeclaration=t.tsImportEqualsDeclaration=t.TSImportEqualsDeclaration=function(...e){return(0,n.default)("TSImportEqualsDeclaration",...e)},t.tSExternalModuleReference=t.tsExternalModuleReference=t.TSExternalModuleReference=function(...e){return(0,n.default)("TSExternalModuleReference",...e)},t.tSNonNullExpression=t.tsNonNullExpression=t.TSNonNullExpression=function(...e){return(0,n.default)("TSNonNullExpression",...e)},t.tSExportAssignment=t.tsExportAssignment=t.TSExportAssignment=function(...e){return(0,n.default)("TSExportAssignment",...e)},t.tSNamespaceExportDeclaration=t.tsNamespaceExportDeclaration=t.TSNamespaceExportDeclaration=function(...e){return(0,n.default)("TSNamespaceExportDeclaration",...e)},t.tSTypeAnnotation=t.tsTypeAnnotation=t.TSTypeAnnotation=function(...e){return(0,n.default)("TSTypeAnnotation",...e)},t.tSTypeParameterInstantiation=t.tsTypeParameterInstantiation=t.TSTypeParameterInstantiation=function(...e){return(0,n.default)("TSTypeParameterInstantiation",...e)},t.tSTypeParameterDeclaration=t.tsTypeParameterDeclaration=t.TSTypeParameterDeclaration=function(...e){return(0,n.default)("TSTypeParameterDeclaration",...e)},t.tSTypeParameter=t.tsTypeParameter=t.TSTypeParameter=function(...e){return(0,n.default)("TSTypeParameter",...e)},t.numberLiteral=t.NumberLiteral=function e(...t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");return e("NumberLiteral",...t)},t.regexLiteral=t.RegexLiteral=function e(...t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");return e("RegexLiteral",...t)},t.restProperty=t.RestProperty=function e(...t){console.trace("The node type RestProperty has been renamed to RestElement");return e("RestProperty",...t)},t.spreadProperty=t.SpreadProperty=function e(...t){console.trace("The node type SpreadProperty has been renamed to SpreadElement");return e("SpreadProperty",...t)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(161))},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){var n=r(87),i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();e.exports=s},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";function n(){const e=function(e){return e&&e.__esModule?e:{default:e}}(r(222));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"VISITOR_KEYS",{enumerable:!0,get:function(){return i.VISITOR_KEYS}}),Object.defineProperty(t,"ALIAS_KEYS",{enumerable:!0,get:function(){return i.ALIAS_KEYS}}),Object.defineProperty(t,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return i.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(t,"NODE_FIELDS",{enumerable:!0,get:function(){return i.NODE_FIELDS}}),Object.defineProperty(t,"BUILDER_KEYS",{enumerable:!0,get:function(){return i.BUILDER_KEYS}}),Object.defineProperty(t,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return i.DEPRECATED_KEYS}}),t.TYPES=void 0,r(58),r(61),r(225),r(226),r(227),r(228),r(229);var i=r(10);(0,n().default)(i.VISITOR_KEYS),(0,n().default)(i.ALIAS_KEYS),(0,n().default)(i.FLIPPED_ALIAS_KEYS),(0,n().default)(i.NODE_FIELDS),(0,n().default)(i.BUILDER_KEYS),(0,n().default)(i.DEPRECATED_KEYS);const s=Object.keys(i.VISITOR_KEYS).concat(Object.keys(i.FLIPPED_ALIAS_KEYS)).concat(Object.keys(i.DEPRECATED_KEYS));t.TYPES=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h,Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Hub",{enumerable:!0,get:function(){return c.default}}),t.visitors=void 0;var n=f(r(156)),i=p(r(354));function s(){const e=f(r(65));return s=function(){return e},e}function o(){const e=p(r(0));return o=function(){return e},e}t.visitors=i;var a=p(r(38)),u=f(r(15)),l=f(r(121)),c=f(r(355));function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t,r,n,s){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error("You must pass a scope and parentPath unless traversing a Program/File. "+`Instead of that you tried to traverse a ${e.type} node without `+"passing scope and parentPath.");i.explode(t),h.node(e,t,r,n,s)}}function d(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}h.visitors=i,h.verify=i.verify,h.explode=i.explode,h.cheap=function(e,t){return o().traverseFast(e,t)},h.node=function(e,t,r,i,s,a){const u=o().VISITOR_KEYS[e.type];if(!u)return;const l=new n.default(r,t,i,s);for(const t of u)if((!a||!a[t])&&l.visit(e,t))return},h.clearNode=function(e,t){o().removeProperties(e,t),a.path.delete(e)},h.removeProperties=function(e,t){return o().traverseFast(e,h.clearNode,t),e},h.hasType=function(e,t,r){if((0,s().default)(r,e.type))return!1;if(e.type===t)return!0;const n={has:!1,type:t};return h(e,{noScope:!0,blacklist:r,enter:d},null,n),n.has},h.cache=a},function(e,t,r){var n=r(16),i=r(173),s=r(174),o="[object Null]",a="[object Undefined]",u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:o:u&&u in Object(e)?i(e):s(e)}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=p,t.typeIs=f,t.validateType=function(e){return p(f(e))},t.validateOptional=function(e){return{validate:e,optional:!0}},t.validateOptionalType=function(e){return{validate:f(e),optional:!0}},t.arrayOf=h,t.arrayOfType=d,t.validateArrayOfType=function(e){return p(d(e))},t.assertEach=y,t.assertOneOf=function(...e){function t(t,r,n){if(e.indexOf(n)<0)throw new TypeError(`Property ${r} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(n)}`)}return t.oneOf=e,t},t.assertNodeType=m,t.assertNodeOrValueType=function(...e){function t(t,r,i){let s=!1;for(const t of e)if(c(i)===t||(0,n.default)(t,i)){s=!0;break}if(!s)throw new TypeError(`Property ${r} of ${t.type} expected node to be of a type ${JSON.stringify(e)} `+`but instead got ${JSON.stringify(i&&i.type)}`)}return t.oneOfNodeOrValueTypes=e,t},t.assertValueType=g,t.chain=v,t.default=function(e,t={}){const r=t.inherits&&b[t.inherits]||{},n=t.fields||r.fields||{},p=t.visitor||r.visitor||[],f=t.aliases||r.aliases||[],h=t.builder||r.builder||t.visitor||[];t.deprecatedAlias&&(l[t.deprecatedAlias]=e);for(const e of p.concat(h))n[e]=n[e]||{};for(const e in n){const t=n[e];-1===h.indexOf(e)&&(t.optional=!0),void 0===t.default?t.default=null:t.validate||(t.validate=g(c(t.default)))}i[e]=t.visitor=p,u[e]=t.builder=h,a[e]=t.fields=n,s[e]=t.aliases=f,f.forEach(t=>{o[t]=o[t]||[],o[t].push(e)}),b[e]=t},t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(59));const i={};t.VISITOR_KEYS=i;const s={};t.ALIAS_KEYS=s;const o={};t.FLIPPED_ALIAS_KEYS=o;const a={};t.NODE_FIELDS=a;const u={};t.BUILDER_KEYS=u;const l={};function c(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":typeof e}function p(e){return{validate:e}}function f(e){return"string"==typeof e?m(e):m(...e)}function h(e){return v(g("array"),y(e))}function d(e){return h(f(e))}function y(e){function t(t,r,n){if(Array.isArray(n))for(let i=0;i1)for(var r=1;r","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=n;const i=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=i;const s=[...i,"in","instanceof"];t.COMPARISON_BINARY_OPERATORS=s;const o=[...s,...n];t.BOOLEAN_BINARY_OPERATORS=o;const a=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=a;const u=["+",...a,...o];t.BINARY_OPERATORS=u;const l=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=l;const c=["+","-","~"];t.NUMBER_UNARY_OPERATORS=c;const p=["typeof"];t.STRING_UNARY_OPERATORS=p;const f=["void","throw",...l,...c,...p];t.UNARY_OPERATORS=f;t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};const h=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=h;const d=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=d},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function s(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var o=i>=0?arguments[i]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return t=r(s(t.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===o(e,-1);return(e=r(s(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(s(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),s=n(r.split("/")),o=Math.min(i.length,s.length),a=o,u=0;us(e,t)):s(e,t)}function a(e,t=!0){if(!e)return e;const{type:r}=e,s={type:r};if("Identifier"===r)s.name=e.name;else{if(!i(n.NODE_FIELDS,r))throw new Error(`Unknown node type: "${r}"`);for(const a of Object.keys(n.NODE_FIELDS[r]))i(e,a)&&(s[a]=t?o(e[a],!0):e[a])}return i(e,"loc")&&(s.loc=e.loc),i(e,"leadingComments")&&(s.leadingComments=e.leadingComments),i(e,"innerComments")&&(s.innerComments=e.innerCmments),i(e,"trailingComments")&&(s.trailingComments=e.trailingComments),i(e,"extra")&&(s.extra=Object.assign({},e.extra)),s}},function(e,t,r){var n=r(8),i=r(5),s="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&n(e)==s}},function(e,t){t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,n=/^data:.+\,.+$/;function i(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function s(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var r=e,n=i(e);if(n){if(!n.path)return e;r=n.path}for(var o,a=t.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)"."===(o=u[c])?u.splice(c,1):".."===o?l++:l>0&&(""===o?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(r=u.join("/"))&&(r=a?"/":"."),n?(n.path=r,s(n)):r}t.urlParse=i,t.urlGenerate=s,t.normalize=o,t.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),a=i(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),s(r);if(r||t.match(n))return t;if(a&&!a.host&&!a.path)return a.host=t,s(a);var u="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=u,s(a)):u},t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(r)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var a=!("__proto__"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function c(e,t){return e===t?0:e>t?1:-1}t.toSetString=a?u:function(e){return l(e)?"$"+e:e},t.fromSetString=a?u:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=e.source-t.source;return 0!==n?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)||r?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!=(n=e.generatedLine-t.generatedLine)?n:e.name-t.name},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)||r?n:0!=(n=e.source-t.source)?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:e.name-t.name},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=c(e.source,t.source))?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:c(e.name,t.name)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadOptions=function(e){const t=(0,n.default)(e);return t?t.options:null},Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"loadPartialConfig",{enumerable:!0,get:function(){return i.loadPartialConfig}});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(360)),i=r(141)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Plugin=function(e){throw new Error(`The (${e}) Babel 5 plugin is being run with an unsupported Babel version.`)},Object.defineProperty(t,"File",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"buildExternalHelpers",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"resolvePlugin",{enumerable:!0,get:function(){return s.resolvePlugin}}),Object.defineProperty(t,"resolvePreset",{enumerable:!0,get:function(){return s.resolvePreset}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return o.version}}),Object.defineProperty(t,"getEnv",{enumerable:!0,get:function(){return a.getEnv}}),Object.defineProperty(t,"traverse",{enumerable:!0,get:function(){return function(){const e=y(r(7));(function(){return e});return e}().default}}),Object.defineProperty(t,"template",{enumerable:!0,get:function(){return function(){const e=y(r(40));(function(){return e});return e}().default}}),Object.defineProperty(t,"createConfigItem",{enumerable:!0,get:function(){return l.createConfigItem}}),Object.defineProperty(t,"loadPartialConfig",{enumerable:!0,get:function(){return c.loadPartialConfig}}),Object.defineProperty(t,"loadOptions",{enumerable:!0,get:function(){return c.loadOptions}}),Object.defineProperty(t,"transform",{enumerable:!0,get:function(){return p.transform}}),Object.defineProperty(t,"transformSync",{enumerable:!0,get:function(){return p.transformSync}}),Object.defineProperty(t,"transformAsync",{enumerable:!0,get:function(){return p.transformAsync}}),Object.defineProperty(t,"transformFile",{enumerable:!0,get:function(){return f.transformFile}}),Object.defineProperty(t,"transformFileSync",{enumerable:!0,get:function(){return f.transformFileSync}}),Object.defineProperty(t,"transformFileAsync",{enumerable:!0,get:function(){return f.transformFileAsync}}),Object.defineProperty(t,"transformFromAst",{enumerable:!0,get:function(){return h.transformFromAst}}),Object.defineProperty(t,"transformFromAstSync",{enumerable:!0,get:function(){return h.transformFromAstSync}}),Object.defineProperty(t,"transformFromAstAsync",{enumerable:!0,get:function(){return h.transformFromAstAsync}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.parse}}),Object.defineProperty(t,"parseSync",{enumerable:!0,get:function(){return d.parseSync}}),Object.defineProperty(t,"parseAsync",{enumerable:!0,get:function(){return d.parseAsync}}),t.types=t.OptionManager=t.DEFAULT_EXTENSIONS=void 0;var n=y(r(79)),i=y(r(357)),s=r(74),o=r(358),a=r(136);function u(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return u=function(){return e},e}Object.defineProperty(t,"types",{enumerable:!0,get:function(){return u()}});var l=r(41),c=r(25),p=r(366),f=r(407),h=r(408),d=r(409);function y(e){return e&&e.__esModule?e:{default:e}}const m=Object.freeze([".js",".jsx",".es6",".es",".mjs"]);t.DEFAULT_EXTENSIONS=m;t.OptionManager=class{init(e){return(0,c.loadOptions)(e)}}},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(162),i=r(163),s=r(164),o=r(165),a=r(166);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++ti?e(t):t;i&&(e=(0,n().default)(e,r));const l=e.split(s),{start:c,end:p,markerLines:f}=function(e,t,r){const n=Object.assign({column:0,line:-1},e.start),i=Object.assign({},n,e.end),{linesAbove:s=2,linesBelow:o=3}=r||{},a=n.line,u=n.column,l=i.line,c=i.column;let p=Math.max(a-(s+1),0),f=Math.min(t.length,l+o);-1===a&&(p=0),-1===l&&(f=t.length);const h=l-a,d={};if(h)for(let e=0;e<=h;e++){const r=e+a;if(u)if(0===e){const e=t[r-1].length;d[r]=[u,e-u]}else if(e===h)d[r]=[0,c];else{const n=t[r-e].length;d[r]=[0,n]}else d[r]=!0}else d[a]=u===c?!u||[u,0]:[u,c-u];return{start:p,end:f,markerLines:d}}(t,l,r),h=t.start&&"number"==typeof t.start.column,d=String(p).length;let y=l.slice(c,p).map((e,t)=>{const n=c+1+t,i=` ${` ${n}`.slice(-d)} | `,s=f[n],o=!f[n+1];if(s){let t="";if(Array.isArray(s)){const n=e.slice(0,Math.max(s[0]-1,0)).replace(/[^\t]/g," "),l=s[1]||1;t=["\n ",u(a.gutter,i.replace(/\d/g," ")),n,u(a.marker,"^").repeat(l)].join(""),o&&r.message&&(t+=" "+u(a.message,r.message))}return[u(a.marker,">"),u(a.gutter,i),e,t].join("")}return` ${u(a.gutter,i)}${e}`}).join("\n");return r.message&&!h&&(y=`${" ".repeat(d+1)}${r.message}\n${y}`),i?o.reset(y):y}}).call(this,r(11))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.program=t.expression=t.statements=t.statement=t.smart=void 0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(342)),i=function(e){return e&&e.__esModule?e:{default:e}}(r(343));const s=(0,i.default)(n.smart);t.smart=s;const o=(0,i.default)(n.statement);t.statement=o;const a=(0,i.default)(n.statements);t.statements=a;const u=(0,i.default)(n.expression);t.expression=u;const l=(0,i.default)(n.program);t.program=l;var c=Object.assign(s.bind(void 0),{smart:s,statement:o,statements:a,expression:u,program:l,ast:s.ast});t.default=c},function(e,t,r){"use strict";function n(){const e=function(e){return e&&e.__esModule?e:{default:e}}(r(14));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.createItemFromDescriptor=s,t.createConfigItem=function(e,{dirname:t=".",type:r}={}){return s((0,i.createDescriptor)(e,n().default.resolve(t),{type:r,alias:"programmatic item"}))},t.getItemDescriptor=function(e){if(e instanceof o)return e._descriptor;return};var i=r(137);function s(e){return new o(e)}class o{constructor(e){this._descriptor=e,Object.defineProperty(this,"_descriptor",{enumerable:!1}),this.value=this._descriptor.value,this.options=this._descriptor.options,this.dirname=this._descriptor.dirname,this.name=this._descriptor.name,this.file=this._descriptor.file?{request:this._descriptor.file.request,resolved:this._descriptor.file.resolved}:void 0,Object.freeze(this)}}Object.freeze(o.prototype)},function(e,t,r){"use strict";function n(e,t){return function(r,n){let s=e.get(r);if(s)for(const e of s){const{value:t,valid:r}=e;if(r(n))return t}const o=new i(n),a=t(r,o);switch(o.configured()||o.forever(),o.deactivate(),o.mode()){case"forever":s=[{value:a,valid:()=>!0}],e.set(r,s);break;case"invalidate":s=[{value:a,valid:o.validator()}],e.set(r,s);break;case"valid":s?s.push({value:a,valid:o.validator()}):(s=[{value:a,valid:o.validator()}],e.set(r,s))}return a}}Object.defineProperty(t,"__esModule",{value:!0}),t.makeStrongCache=function(e){return n(new Map,e)},t.makeWeakCache=function(e){return n(new WeakMap,e)},t.assertSimpleType=s;class i{constructor(e){this._active=!0,this._never=!1,this._forever=!1,this._invalidate=!1,this._configured=!1,this._pairs=[],this._data=e}simple(){return function(e){function t(t){if("boolean"!=typeof t)return e.using(()=>s(t()));t?e.forever():e.never()}return t.forever=(()=>e.forever()),t.never=(()=>e.never()),t.using=(t=>e.using(()=>s(t()))),t.invalidate=(t=>e.invalidate(()=>s(t()))),t}(this)}mode(){return this._never?"never":this._forever?"forever":this._invalidate?"invalidate":"valid"}forever(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never)throw new Error("Caching has already been configured with .never()");this._forever=!0,this._configured=!0}never(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._forever)throw new Error("Caching has already been configured with .forever()");this._never=!0,this._configured=!0}using(e){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._configured=!0;const t=e(this._data);return this._pairs.push([t,e]),t}invalidate(e){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._invalidate=!0,this._configured=!0;const t=e(this._data);return this._pairs.push([t,e]),t}validator(){const e=this._pairs;return t=>e.every(([e,r])=>e===r(t))}deactivate(){this._active=!1}configured(){return this._configured}}function s(e){if(null!=e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e)throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");return e}},function(e,t,r){var n=r(23),i=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=Object.keys(t);for(const n of r)if(e[n]!==t[n])return!1;return!0}},function(e,t,r){var n=r(28),i=r(167),s=r(168),o=r(169),a=r(170),u=r(171);function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=s,l.prototype.get=o,l.prototype.has=a,l.prototype.set=u,e.exports=l},function(e,t,r){var n=r(12)(r(4),"Map");e.exports=n},function(e,t,r){var n=r(178),i=r(185),s=r(187),o=r(188),a=r(189);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=r}},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(92),i=r(199),s=r(18);e.exports=function(e){return s(e)?n(e,!0):i(e)}},function(e,t,r){var n=r(204),i=r(95),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(e){return null==e?[]:(e=Object(e),n(o(e),function(t){return s.call(e,t)}))}:i;e.exports=a},function(e,t){e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(11))},function(e,t,r){var n=r(110),i=r(18),s=r(278),o=r(66),a=r(281),u=Math.max;e.exports=function(e,t,r,l){e=i(e)?e:a(e),r=r&&!l?o(r):0;var c=e.length;return r<0&&(r=u(c+r,0)),s(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&n(e,t,r)>-1}},function(e,t,r){var n=r(279);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++rr.comments)):r.shouldPrintComment=r.shouldPrintComment||(e=>r.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0);"auto"===r.compact&&(r.compact=e.length>5e5,r.compact&&console.error("[BABEL] Note: The code generator has deoptimised the styling of "+`${t.filename} as it exceeds the max of 500KB.`));r.compact&&(r.indent.adjustMultilineComment=!1);return r}(r,t),t.sourceMaps?new n.default(t,r):null),this.ast=e}generate(){return super.generate(this.ast)}}t.CodeGenerator=class{constructor(e,t,r){this._generator=new o(e,t,r)}generate(){return this._generator.generate()}}},function(e,t,r){"use strict";function n(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return n=function(){return e},e}function i(){const e=function(e){return e&&e.__esModule?e:{default:e}}(r(315));return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.Identifier=function(e){this.exactSource(e.loc,()=>{this.word(e.name)})},t.SpreadElement=t.RestElement=function(e){this.token("..."),this.print(e.argument,e)},t.ObjectPattern=t.ObjectExpression=function(e){const t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space());this.token("}")},t.ObjectMethod=function(e){this.printJoin(e.decorators,e),this._methodHead(e),this.space(),this.print(e.body,e)},t.ObjectProperty=function(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(n().isAssignmentPattern(e.value)&&n().isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&n().isIdentifier(e.key)&&n().isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)},t.ArrayPattern=t.ArrayExpression=function(e){const t=e.elements,r=t.length;this.token("["),this.printInnerComments(e);for(let n=0;n0&&this.space(),this.print(i,e),n",{beforeExpr:s}),template:new o("template"),ellipsis:new o("...",{beforeExpr:s}),backQuote:new o("`",{startsExpr:!0}),dollarBraceL:new o("${",{beforeExpr:s,startsExpr:!0}),at:new o("@"),hash:new o("#"),interpreterDirective:new o("#!..."),eq:new o("=",{beforeExpr:s,isAssign:!0}),assign:new o("_=",{beforeExpr:s,isAssign:!0}),incDec:new o("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new o("!",{beforeExpr:s,prefix:!0,startsExpr:!0}),tilde:new o("~",{beforeExpr:s,prefix:!0,startsExpr:!0}),pipeline:new u("|>",0),nullishCoalescing:new u("??",1),logicalOR:new u("||",1),logicalAND:new u("&&",2),bitwiseOR:new u("|",3),bitwiseXOR:new u("^",4),bitwiseAND:new u("&",5),equality:new u("==/!=",6),relational:new u("",7),bitShift:new u("<>",8),plusMin:new o("+/-",{beforeExpr:s,binop:9,prefix:!0,startsExpr:!0}),modulo:new u("%",10),star:new u("*",10),slash:new u("/",10),exponent:new o("**",{beforeExpr:s,binop:11,rightAssociative:!0})},c={break:new a("break"),case:new a("case",{beforeExpr:s}),catch:new a("catch"),continue:new a("continue"),debugger:new a("debugger"),default:new a("default",{beforeExpr:s}),do:new a("do",{isLoop:!0,beforeExpr:s}),else:new a("else",{beforeExpr:s}),finally:new a("finally"),for:new a("for",{isLoop:!0}),function:new a("function",{startsExpr:!0}),if:new a("if"),return:new a("return",{beforeExpr:s}),switch:new a("switch"),throw:new a("throw",{beforeExpr:s,prefix:!0,startsExpr:!0}),try:new a("try"),var:new a("var"),let:new a("let"),const:new a("const"),while:new a("while",{isLoop:!0}),with:new a("with"),new:new a("new",{beforeExpr:s,startsExpr:!0}),this:new a("this",{startsExpr:!0}),super:new a("super",{startsExpr:!0}),class:new a("class"),extends:new a("extends",{beforeExpr:s}),export:new a("export"),import:new a("import",{startsExpr:!0}),yield:new a("yield",{beforeExpr:s,startsExpr:!0}),null:new a("null",{startsExpr:!0}),true:new a("true",{startsExpr:!0}),false:new a("false",{startsExpr:!0}),in:new a("in",{beforeExpr:s,binop:7}),instanceof:new a("instanceof",{beforeExpr:s,binop:7}),typeof:new a("typeof",{beforeExpr:s,prefix:!0,startsExpr:!0}),void:new a("void",{beforeExpr:s,prefix:!0,startsExpr:!0}),delete:new a("delete",{beforeExpr:s,prefix:!0,startsExpr:!0})};function p(e){return null!=e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}Object.keys(c).forEach(function(e){l["_"+e]=c[e]});function f(e){var t=e.split(" ");return function(e){return t.indexOf(e)>=0}}var h={6:f("enum await"),strict:f("implements interface let package private protected public static yield"),strictBind:f("eval arguments")},d=f("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"),y="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",m="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",g=new RegExp("["+y+"]"),v=new RegExp("["+y+m+"]");y=m=null;var b=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,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,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,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,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,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,15,7472,3104,541],E=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,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];function T(e,t){for(var r=65536,n=0;ne)return!1;if((r+=t[n+1])>=e)return!0}return!1}function A(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&g.test(String.fromCharCode(e)):T(e,b)))}function x(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&v.test(String.fromCharCode(e)):T(e,b)||T(e,E))))}var S=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void"];function P(e){return"type"===e.importKind||"typeof"===e.importKind}function D(e){return(e.type===l.name||!!e.type.keyword)&&"from"!==e.value}var w={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var C=/\*?\s*@((?:no)?flow)\b/,O={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},_=/\r\n?|\n|\u2028|\u2029/,F=new RegExp(_.source,"g");function k(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function I(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var N=function(e,t,r,n){this.token=e,this.isExpr=!!t,this.preserveSpace=!!r,this.override=n},B={braceStatement:new N("{",!1),braceExpression:new N("{",!0),templateQuasi:new N("${",!0),parenStatement:new N("(",!1),parenExpression:new N("(",!0),template:new N("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new N("function",!0)};l.parenR.updateContext=l.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===B.braceStatement&&this.curContext()===B.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===B.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},l.name.updateContext=function(e){"of"!==this.state.value||this.curContext()!==B.parenStatement?(this.state.exprAllowed=!1,e!==l._let&&e!==l._const&&e!==l._var||_.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0),this.state.isIterator&&(this.state.isIterator=!1)):this.state.exprAllowed=!e.beforeExpr},l.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?B.braceStatement:B.braceExpression),this.state.exprAllowed=!0},l.dollarBraceL.updateContext=function(){this.state.context.push(B.templateQuasi),this.state.exprAllowed=!0},l.parenL.updateContext=function(e){var t=e===l._if||e===l._for||e===l._with||e===l._while;this.state.context.push(t?B.parenStatement:B.parenExpression),this.state.exprAllowed=!0},l.incDec.updateContext=function(){},l._function.updateContext=function(e){this.state.exprAllowed&&!this.braceIsBlock(e)&&this.state.context.push(B.functionExpression),this.state.exprAllowed=!1},l.backQuote.updateContext=function(){this.curContext()===B.template?this.state.context.pop():this.state.context.push(B.template),this.state.exprAllowed=!1};var j=/^[\da-fA-F]+$/,M=/^\d+$/;function L(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function R(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return R(e.object)+"."+R(e.property);throw new Error("Node had unexpected type: "+e.type)}B.j_oTag=new N("...",!0,!0),l.jsxName=new o("jsxName"),l.jsxText=new o("jsxText",{beforeExpr:!0}),l.jsxTagStart=new o("jsxTagStart",{startsExpr:!0}),l.jsxTagEnd=new o("jsxTagEnd"),l.jsxTagStart.updateContext=function(){this.state.context.push(B.j_expr),this.state.context.push(B.j_oTag),this.state.exprAllowed=!1},l.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===B.j_oTag&&e===l.slash||t===B.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===B.j_expr):this.state.exprAllowed=!0};var U={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1};var V=function(e,t){this.line=e,this.column=t},W=function(e,t){this.start=e,this.end=t};function K(e){return e[e.length-1]}var q=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.raise=function(e,t,r){var n=void 0===r?{}:r,i=n.missingPluginNames,s=n.code,o=function(e,t){var r,n=1,i=0;for(F.lastIndex=0;(r=F.exec(e))&&r.index0)){var t,r,n,i,s,o=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(n=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(o.length>0){var a=K(o);a.trailingComments&&a.trailingComments[0].start>=e.end&&(n=a.trailingComments,delete a.trailingComments)}for(o.length>0&&K(o).start>=e.start&&(t=o.pop());o.length>0&&K(o).start>=e.start;)r=o.pop();if(!r&&t&&(r=t),t&&this.state.leadingComments.length>0){var u=K(this.state.leadingComments);if("ObjectProperty"===t.type){if(u.start>=e.start&&this.state.commentPreviousNode){for(s=0;s0&&(t.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var l=K(e.arguments);if(l&&u.start>=l.start&&u.end<=e.end&&this.state.commentPreviousNode){for(s=0;s0&&(l.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}}if(r){if(r.leadingComments)if(r!==e&&r.leadingComments.length>0&&K(r.leadingComments).end<=e.start)e.leadingComments=r.leadingComments,delete r.leadingComments;else for(i=r.leadingComments.length-2;i>=0;--i)if(r.leadingComments[i].end<=e.start){e.leadingComments=r.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(K(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(s=0;s0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;ie.start);i++);var c=this.state.leadingComments.slice(0,i);c.length&&(e.leadingComments=c),0===(n=this.state.leadingComments.slice(i)).length&&(n=null)}this.state.commentPreviousNode=e,n&&(n.length&&n[0].start>=e.start&&K(n).end<=e.end?e.innerComments=n:e.trailingComments=n),o.push(e)}},t}(function(){function e(){this.sawUnambiguousESM=!1}var t=e.prototype;return t.isReservedWord=function(e){return"await"===e?this.inModule:h[6](e)},t.hasPlugin=function(e){return Object.hasOwnProperty.call(this.plugins,e)},t.getPluginOption=function(e,t){if(this.hasPlugin(e))return this.plugins[e][t]},e}())),Y=function(){function e(){}var t=e.prototype;return t.init=function(e,t){this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inMethod=!1,this.inFunction=!1,this.inParameters=!1,this.maybeInArrowParameters=!1,this.inGenerator=!1,this.inAsync=!1,this.inPropertyName=!1,this.inType=!1,this.inClassProperty=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isIterator=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldInPossibleArrowParameters=null,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=l.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[B.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[]},t.curPosition=function(){return new V(this.curLine,this.pos-this.lineStart)},t.clone=function(t){var r=this,n=new e;return Object.keys(this).forEach(function(e){var i=r[e];t&&"context"!==e||!Array.isArray(i)||(i=i.slice()),n[e]=i}),n},e}(),$=function(e){return e>=48&&e<=57},J={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},G={bin:[48,49]};G.oct=G.bin.concat([50,51,52,53,54,55]),G.dec=G.oct.concat([56,57]),G.hex=G.dec.concat([65,66,67,68,69,70,97,98,99,100,101,102]);var X=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var r=t.prototype;return r.addExtra=function(e,t,r){e&&((e.extra=e.extra||{})[t]=r)},r.isRelational=function(e){return this.match(l.relational)&&this.state.value===e},r.isLookaheadRelational=function(e){var t=this.lookahead();return t.type==l.relational&&t.value==e},r.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,l.relational)},r.eatRelational=function(e){return!!this.isRelational(e)&&(this.next(),!0)},r.isContextual=function(e){return this.match(l.name)&&this.state.value===e&&!this.state.containsEsc},r.isLookaheadContextual=function(e){var t=this.lookahead();return t.type===l.name&&t.value===e},r.eatContextual=function(e){return this.isContextual(e)&&this.eat(l.name)},r.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},r.canInsertSemicolon=function(){return this.match(l.eof)||this.match(l.braceR)||this.hasPrecedingLineBreak()},r.hasPrecedingLineBreak=function(){return _.test(this.input.slice(this.state.lastTokEnd,this.state.start))},r.isLineTerminator=function(){return this.eat(l.semi)||this.canInsertSemicolon()},r.semicolon=function(){this.isLineTerminator()||this.unexpected(null,l.semi)},r.expect=function(e,t){this.eat(e)||this.unexpected(t,e)},r.unexpected=function(e,t){throw void 0===t&&(t="Unexpected token"),"string"!=typeof t&&(t='Unexpected token, expected "'+t.label+'"'),this.raise(null!=e?e:this.state.start,t)},r.expectPlugin=function(e,t){if(!this.hasPlugin(e))throw this.raise(null!=t?t:this.state.start,"This experimental syntax requires enabling the parser plugin: '"+e+"'",{missingPluginNames:[e]});return!0},r.expectOnePlugin=function(e,t){var r=this;if(!e.some(function(e){return r.hasPlugin(e)}))throw this.raise(null!=t?t:this.state.start,"This experimental syntax requires enabling one of the following parser plugin(s): '"+e.join(", ")+"'",{missingPluginNames:e})},t}(function(e){function t(t,r){var n;return(n=e.call(this)||this).state=new Y,n.state.init(t,r),n.isLookahead=!1,n}i(t,e);var r=t.prototype;return r.next=function(){this.options.tokens&&!this.isLookahead&&this.state.tokens.push(new function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new W(e.startLoc,e.endLoc)}(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},r.eat=function(e){return!!this.match(e)&&(this.next(),!0)},r.match=function(e){return this.state.type===e},r.isKeyword=function(e){return d(e)},r.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state;return this.state=e,t},r.setStrict=function(e){if(this.state.strict=e,this.match(l.num)||this.match(l.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(l.eof):e.override?e.override(this):this.readToken(this.input.codePointAt(this.state.pos))},r.readToken=function(e){A(e)||92===e?this.readWord():this.getTokenFromCode(e)},r.pushComment=function(e,t,r,n,i,s){var o={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new W(i,s)};this.isLookahead||(this.options.tokens&&this.state.tokens.push(o),this.state.comments.push(o),this.addComment(o))},r.skipBlockComment=function(){var e,t=this.state.curPosition(),r=this.state.pos,n=this.input.indexOf("*/",this.state.pos+=2);for(-1===n&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=n+2,F.lastIndex=r;(e=F.exec(this.input))&&e.index=48&&e<=57)this.readNumber(!0);else{var t=this.input.charCodeAt(this.state.pos+2);46===e&&46===t?(this.state.pos+=3,this.finishToken(l.ellipsis)):(++this.state.pos,this.finishToken(l.dot))}},r.readToken_slash=function(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(l.assign,2):this.finishOp(l.slash,1)},r.readToken_interpreter=function(){if(0!==this.state.pos||this.state.input.length<2)return!1;var e=this.state.pos;this.state.pos+=1;var t=this.input.charCodeAt(this.state.pos);if(33!==t)return!1;for(;10!==t&&13!==t&&8232!==t&&8233!==t&&++this.state.pos=48&&t<=57?(++this.state.pos,this.finishToken(l.question)):(this.state.pos+=2,this.finishToken(l.questionDot)):61===t?this.finishOp(l.assign,3):this.finishOp(l.nullishCoalescing,2)},r.getTokenFromCode=function(e){switch(e){case 35:if(0===this.state.pos&&this.readToken_interpreter())return;if((this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(l.hash);this.raise(this.state.pos,"Unexpected character '"+String.fromCodePoint(e)+"'");case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(l.parenL);case 41:return++this.state.pos,void this.finishToken(l.parenR);case 59:return++this.state.pos,void this.finishToken(l.semi);case 44:return++this.state.pos,void this.finishToken(l.comma);case 91:return++this.state.pos,void this.finishToken(l.bracketL);case 93:return++this.state.pos,void this.finishToken(l.bracketR);case 123:return void(this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(l.braceBarL,2):(++this.state.pos,this.finishToken(l.braceL)));case 125:return++this.state.pos,void this.finishToken(l.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(l.doubleColon,2):(++this.state.pos,this.finishToken(l.colon)));case 63:return void this.readToken_question();case 64:return++this.state.pos,void this.finishToken(l.at);case 96:return++this.state.pos,void this.finishToken(l.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:case 62:return void this.readToken_lt_gt(e);case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(l.tilde,1)}this.raise(this.state.pos,"Unexpected character '"+String.fromCodePoint(e)+"'")},r.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)},r.readRegexp=function(){for(var e,t,r=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(_.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===n)t=!0;else if("]"===n&&t)t=!1;else if("/"===n&&!t)break;e="\\"===n}++this.state.pos}var i=this.input.slice(r,this.state.pos);++this.state.pos;for(var s="";this.state.pos-1)s.indexOf(o)>-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag"),++this.state.pos,s+=o;else{if(!x(a)&&92!==a)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}}this.finishToken(l.regexp,{pattern:i,flags:s})},r.readInt=function(e,t){for(var r=this.state.pos,n=16===e?J.hex:J.decBinOct,i=16===e?G.hex:10===e?G.dec:8===e?G.oct:G.bin,s=0,o=0,a=null==t?1/0:t;o-1||n.indexOf(p)>-1||Number.isNaN(p))&&this.raise(this.state.pos,"Invalid or unexpected token"),++this.state.pos;continue}}if((l=u>=97?u-97+10:u>=65?u-65+10:$(u)?u-48:1/0)>=e)break;++this.state.pos,s=s*e+l}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:s},r.readRadixNumber=function(e){var t=this.state.pos,r=!1;this.state.pos+=2;var n=this.readInt(e);if(null==n&&this.raise(this.state.start+2,"Expected number in radix "+e),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,r=!0),A(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number"),r){var i=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(l.bigint,i)}else this.finishToken(l.num,n)},r.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1,i=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var s=this.input.charCodeAt(this.state.pos);46!==s||r||(++this.state.pos,this.readInt(10),n=!0,s=this.input.charCodeAt(this.state.pos)),69!==s&&101!==s||r||(43!==(s=this.input.charCodeAt(++this.state.pos))&&45!==s||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0,s=this.input.charCodeAt(this.state.pos)),this.hasPlugin("bigInt")&&110===s&&((n||r)&&this.raise(t,"Invalid BigIntLiteral"),++this.state.pos,i=!0),A(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");i?this.finishToken(l.bigint,a):(n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(l.num,o))},r.readCodePoint=function(e){var t;if(123===this.input.charCodeAt(this.state.pos)){var r=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=r-2,null;this.raise(r,"Code point out of bounds")}}else t=this.readHexChar(4,e);return t},r.readString=function(e){for(var t="",r=++this.state.pos,n=this.hasPlugin("jsonStrings");;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===e)break;92===i?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(!n||8232!==i&&8233!==i)&&k(i)?this.raise(this.state.start,"Unterminated string constant"):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(l.string,t)},r.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(l.template)?36===n?(this.state.pos+=2,void this.finishToken(l.dollarBraceL)):(++this.state.pos,void this.finishToken(l.backQuote)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(l.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(k(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},r.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:String.fromCodePoint(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,o=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(o,8);if(a>255&&(o=o.slice(0,-1),a=parseInt(o,8)),a>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=o.length-1,String.fromCharCode(a)}return String.fromCharCode(r)}},r.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},r.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos=0;o--){var a=this.state.labels[o];if(a.statementStart!==e.start)break;a.statementStart=this.state.start,a.kind=s}return this.state.labels.push({name:t,kind:s,statementStart:this.state.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!==e.body.kind||"FunctionDeclaration"==e.body.type&&(this.state.strict||e.body.generator||e.body.async))&&this.raise(e.body.start,"Invalid labeled declaration"),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},r.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},r.parseBlock=function(e){var t=this.startNode();return this.expect(l.braceL),this.parseBlockBody(t,e,!1,l.braceR),this.finishNode(t,"BlockStatement")},r.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},r.parseBlockBody=function(e,t,r,n){var i=e.body=[],s=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?s:void 0,r,n)},r.parseBlockOrModuleBlockBody=function(e,t,r,n){for(var i,s,o=!1;!this.eat(n);){o||!this.state.containsOctal||s||(s=this.state.octalPosition);var a=this.parseStatement(!0,r);if(t&&!o&&this.isValidDirective(a)){var u=this.stmtToDirective(a);t.push(u),void 0===i&&"use strict"===u.value.value&&(i=this.state.strict,this.setStrict(!0),s&&this.raise(s,"Octal literal in strict mode"))}else o=!0,e.push(a)}!1===i&&this.setStrict(!1)},r.parseFor=function(e,t){return e.init=t,this.expect(l.semi),e.test=this.match(l.semi)?null:this.parseExpression(),this.expect(l.semi),e.update=this.match(l.parenR)?null:this.parseExpression(),this.expect(l.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},r.parseForIn=function(e,t,r){var n=this.match(l._in)?"ForInStatement":"ForOfStatement";return r?this.eatContextual("of"):this.next(),"ForOfStatement"===n&&(e.await=!!r),e.left=t,e.right=this.parseExpression(),this.expect(l.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},r.parseVar=function(e,t,r){var n=e.declarations=[];for(e.kind=r.keyword;;){var i=this.startNode();if(this.parseVarHead(i),this.eat(l.eq)?i.init=this.parseMaybeAssign(t):(r!==l._const||this.match(l._in)||this.isContextual("of")?"Identifier"===i.id.type||t&&(this.match(l._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.hasPlugin("typescript")||this.unexpected(),i.init=null),n.push(this.finishNode(i,"VariableDeclarator")),!this.eat(l.comma))break}return e},r.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},r.parseFunction=function(e,t,r,n,i){var s=this.state.inFunction,o=this.state.inMethod,a=this.state.inGenerator,u=this.state.inClassProperty;return this.state.inFunction=!0,this.state.inMethod=!1,this.state.inClassProperty=!1,this.initFunction(e,n),this.match(l.star)&&(e.async&&this.expectPlugin("asyncGenerators"),e.generator=!0,this.next()),!t||i||this.match(l.name)||this.match(l._yield)||this.unexpected(),t||(this.state.inGenerator=e.generator),(this.match(l.name)||this.match(l._yield))&&(e.id=this.parseBindingIdentifier()),t&&(this.state.inGenerator=e.generator),this.parseFunctionParams(e),this.parseFunctionBodyAndFinish(e,t?"FunctionDeclaration":"FunctionExpression",r),this.state.inFunction=s,this.state.inMethod=o,this.state.inGenerator=a,this.state.inClassProperty=u,e},r.parseFunctionParams=function(e,t){var r=this.state.inParameters;this.state.inParameters=!0,this.expect(l.parenL),e.params=this.parseBindingList(l.parenR,!1,t),this.state.inParameters=r},r.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},r.isClassProperty=function(){return this.match(l.eq)||this.match(l.semi)||this.match(l.braceR)},r.isClassMethod=function(){return this.match(l.parenL)},r.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},r.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0,this.state.classLevel++;var r={hadConstructor:!1},n=[],i=this.startNode();for(i.body=[],this.expect(l.braceL);!this.eat(l.braceR);)if(this.eat(l.semi))n.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(l.at))n.push(this.parseDecorator());else{var s=this.startNode();n.length&&(s.decorators=n,this.resetStartLocationFromNode(s,n[0]),n=[]),this.parseClassMember(i,s,r),"constructor"===s.kind&&s.decorators&&s.decorators.length>0&&this.raise(s.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}n.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(i,"ClassBody"),this.state.classLevel--,this.state.strict=t},r.parseClassMember=function(e,t,r){var n=!1,i=this.state.containsEsc;if(this.match(l.name)&&"static"===this.state.value){var s=this.parseIdentifier(!0);if(this.isClassMethod()){var o=t;return o.kind="method",o.computed=!1,o.key=s,o.static=!1,void this.pushClassMethod(e,o,!1,!1,!1)}if(this.isClassProperty()){var a=t;return a.computed=!1,a.key=s,a.static=!1,void e.body.push(this.parseClassProperty(a))}if(i)throw this.unexpected();n=!0}this.parseClassMemberWithIsStatic(e,t,r,n)},r.parseClassMemberWithIsStatic=function(e,t,r,n){var i=t,s=t,o=t,a=t,u=i,c=i;if(t.static=n,this.eat(l.star))return u.kind="method",this.parseClassPropertyName(u),"PrivateName"===u.key.type?void this.pushClassPrivateMethod(e,s,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't be a generator"),void this.pushClassMethod(e,i,!0,!1,!1));var p=this.parseClassPropertyName(t),f="PrivateName"===p.type,h="Identifier"===p.type;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(u.kind="method",f)return void this.pushClassPrivateMethod(e,s,!1,!1);var d=this.isNonstaticConstructor(i);d&&(i.kind="constructor",i.decorators&&this.raise(i.start,"You can't attach decorators to a class constructor"),r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.start,"Duplicate constructor in the same class"),r.hadConstructor=!0),this.pushClassMethod(e,i,!1,!1,d)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,a):this.pushClassProperty(e,o);else if(h&&"async"===p.name&&!this.isLineTerminator()){var y=this.match(l.star);y&&(this.expectPlugin("asyncGenerators"),this.next()),u.kind="method",this.parseClassPropertyName(u),"PrivateName"===u.key.type?this.pushClassPrivateMethod(e,s,y,!0):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't be an async function"),this.pushClassMethod(e,i,y,!0,!1))}else!h||"get"!==p.name&&"set"!==p.name||this.isLineTerminator()&&this.match(l.star)?this.isLineTerminator()?f?this.pushClassPrivateProperty(e,a):this.pushClassProperty(e,o):this.unexpected():(u.kind=p.name,this.parseClassPropertyName(i),"PrivateName"===u.key.type?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(e,i,!1,!1,!1)),this.checkGetterSetterParams(i))},r.parseClassPropertyName=function(e){var t=this.parsePropertyName(e);return e.computed||!e.static||"prototype"!==t.name&&"prototype"!==t.value||this.raise(t.start,"Classes may not have static property named prototype"),"PrivateName"===t.type&&"constructor"===t.id.name&&this.raise(t.start,"Classes may not have a private field named '#constructor'"),t},r.pushClassProperty=function(e,t){this.isNonstaticConstructor(t)&&this.raise(t.key.start,"Classes may not have a non-static field named 'constructor'"),e.body.push(this.parseClassProperty(t))},r.pushClassPrivateProperty=function(e,t){this.expectPlugin("classPrivateProperties",t.key.start),e.body.push(this.parseClassPrivateProperty(t))},r.pushClassMethod=function(e,t,r,n,i){e.body.push(this.parseMethod(t,r,n,i,"ClassMethod"))},r.pushClassPrivateMethod=function(e,t,r,n){this.expectPlugin("classPrivateMethods",t.key.start),e.body.push(this.parseMethod(t,r,n,!1,"ClassPrivateMethod"))},r.parsePostMemberNameModifiers=function(e){},r.parseAccessModifier=function(){},r.parseClassPrivateProperty=function(e){var t=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,e.value=this.eat(l.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=t,this.finishNode(e,"ClassPrivateProperty")},r.parseClassProperty=function(e){e.typeAnnotation||this.expectPlugin("classProperties");var t=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,this.match(l.eq)?(this.expectPlugin("classProperties"),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=t,this.finishNode(e,"ClassProperty")},r.parseClassId=function(e,t,r){this.match(l.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected(null,"A class name is required")},r.parseClassSuper=function(e){e.superClass=this.eat(l._extends)?this.parseExprSubscripts():null},r.parseExport=function(e){if(this.shouldParseExportStar()){if(this.parseExportStar(e),"ExportAllDeclaration"===e.type)return e}else if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");var t=this.startNode();t.exported=this.parseIdentifier(!0);var r=[this.finishNode(t,"ExportDefaultSpecifier")];if(e.specifiers=r,this.match(l.comma)&&this.lookahead().type===l.star){this.expect(l.comma);var n=this.startNode();this.expect(l.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),r.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(l._default))return e.declaration=this.parseExportDefaultExpression(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var i=this.lookahead();i.type!==l._function&&this.unexpected(i.start,'Unexpected token, expected "function"')}e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)}else e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e)}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},r.parseExportDefaultExpression=function(){var e=this.startNode();if(this.eat(l._function))return this.parseFunction(e,!0,!1,!1,!0);if(this.isContextual("async")&&this.lookahead().type===l._function)return this.eatContextual("async"),this.eat(l._function),this.parseFunction(e,!0,!1,!0,!0);if(this.match(l._class))return this.parseClass(e,!0,!0);if(this.match(l.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax"),this.parseDecorators(!1),this.parseClass(e,!0,!0);if(this.match(l._let)||this.match(l._const)||this.match(l._var))return this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");var t=this.parseMaybeAssign();return this.semicolon(),t},r.parseExportDeclaration=function(e){return this.parseStatement(!0)},r.isExportDefaultSpecifier=function(){if(this.match(l.name))return"async"!==this.state.value;if(!this.match(l._default))return!1;var e=this.lookahead();return e.type===l.comma||e.type===l.name&&"from"===e.value},r.parseExportSpecifiersMaybe=function(e){this.eat(l.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},r.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(l.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},r.shouldParseExportStar=function(){return this.match(l.star)},r.parseExportStar=function(e){this.expect(l.star),this.isContextual("as")?this.parseExportNamespace(e):(this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration"))},r.parseExportNamespace=function(e){this.expectPlugin("exportNamespaceFrom");var t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);this.next(),t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)},r.shouldParseExportDeclaration=function(){if(this.match(l.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax")}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},r.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=0,i=e.specifiers;n-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},r.raiseDuplicateExportError=function(e,t){throw this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},r.parseExportSpecifiers=function(){var e,t=[],r=!0;for(this.expect(l.braceL);!this.eat(l.braceR);){if(r)r=!1;else if(this.expect(l.comma),this.eat(l.braceR))break;var n=this.match(l._default);n&&!e&&(e=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),t.push(this.finishNode(i,"ExportSpecifier"))}return e&&!this.isContextual("from")&&this.unexpected(),t},r.parseImport=function(e){return this.match(l.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(l.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},r.shouldParseDefaultImport=function(e){return this.match(l.name)},r.parseImportSpecifierLocal=function(e,t,r,n){t.local=this.parseIdentifier(),this.checkLVal(t.local,!0,void 0,n),e.specifiers.push(this.finishNode(t,r))},r.parseImportSpecifiers=function(e){var t=!0;if(!this.shouldParseDefaultImport(e)||(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier","default import specifier"),this.eat(l.comma))){if(this.match(l.star)){var r=this.startNode();return this.next(),this.expectContextual("as"),void this.parseImportSpecifierLocal(e,r,"ImportNamespaceSpecifier","import namespace specifier")}for(this.expect(l.braceL);!this.eat(l.braceR);){if(t)t=!1;else if(this.eat(l.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(l.comma),this.eat(l.braceR))break;this.parseImportSpecifier(e)}}},r.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},t}(function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var r=t.prototype;return r.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},r.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(l.eof)||this.unexpected(),e.comments=this.state.comments,e},r.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(l.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(l.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},r.parseMaybeAssign=function(e,t,r,n){var i,s=this.state.start,o=this.state.startLoc;if(this.match(l._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,s,o)),a}t?i=!1:(t={start:0},i=!0),(this.match(l.parenL)||this.match(l.name)||this.match(l._yield))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,s,o)),this.state.type.isAssign){var c,p=this.startNodeAt(s,o),f=this.state.value;if(p.operator=f,"??="===f&&(this.expectPlugin("nullishCoalescingOperator"),this.expectPlugin("logicalAssignment")),"||="!==f&&"&&="!==f||this.expectPlugin("logicalAssignment"),p.left=this.match(l.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized)"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c);return this.next(),p.right=this.parseMaybeAssign(e),this.finishNode(p,"AssignmentExpression")}return i&&t.start&&this.unexpected(t.start),u},r.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.state.potentialArrowAt,o=this.parseExprOps(e,t);return"ArrowFunctionExpression"===o.type&&o.start===s?o:t&&t.start?o:this.parseConditional(o,e,n,i,r)},r.parseConditional=function(e,t,r,n,i){if(this.eat(l.question)){var s=this.startNodeAt(r,n);return s.test=e,s.consequent=this.parseMaybeAssign(),this.expect(l.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return e},r.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.state.potentialArrowAt,s=this.parseMaybeUnary(t);return"ArrowFunctionExpression"===s.type&&s.start===i?s:t&&t.start?s:this.parseExprOp(s,r,n,-1,e)},r.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(l._in))&&s>n){var o=this.startNodeAt(t,r),a=this.state.value;o.left=e,o.operator=a,"**"!==a||"UnaryExpression"!==e.type||e.extra&&e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var u=this.state.type;u===l.nullishCoalescing?this.expectPlugin("nullishCoalescingOperator"):u===l.pipeline&&this.expectPlugin("pipelineOperator"),this.next();var c=this.state.start,p=this.state.startLoc;if(u===l.pipeline&&this.match(l.name)&&"await"===this.state.value&&this.state.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');return o.right=this.parseExprOp(this.parseMaybeUnary(),c,p,u.rightAssociative?s-1:s,i),this.finishNode(o,u===l.logicalOR||u===l.logicalAND||u===l.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(o,t,r,n,i)}return e},r.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(l.incDec);if(t.operator=this.state.value,t.prefix=!0,"throw"===t.operator&&this.expectPlugin("throwExpressions"),this.next(),t.argument=this.parseMaybeUnary(),e&&e.start&&this.unexpected(e.start),r)this.checkLVal(t.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===t.operator){var n=t.argument;"Identifier"===n.type?this.raise(t.start,"Deleting local variable in strict mode"):"MemberExpression"===n.type&&"PrivateName"===n.property.type&&this.raise(t.start,"Deleting a private field is not allowed")}return this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,o=this.parseExprSubscripts(e);if(e&&e.start)return o;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(i,s);a.operator=this.state.value,a.prefix=!1,a.argument=o,this.checkLVal(o,void 0,void 0,"postfix operation"),this.next(),o=this.finishNode(a,"UpdateExpression")}return o},r.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},r.parseSubscripts=function(e,t,r,n){var i={optionalChainMember:!1,stop:!1};do{e=this.parseSubscript(e,t,r,n,i)}while(!i.stop);return e},r.parseSubscript=function(e,t,r,n,i){if(!n&&this.eat(l.doubleColon)){var s=this.startNodeAt(t,r);return s.object=e,s.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),t,r,n)}if(this.match(l.questionDot)){if(this.expectPlugin("optionalChaining"),i.optionalChainMember=!0,n&&this.lookahead().type==l.parenL)return i.stop=!0,e;this.next();var o=this.startNodeAt(t,r);if(this.eat(l.bracketL))return o.object=e,o.property=this.parseExpression(),o.computed=!0,o.optional=!0,this.expect(l.bracketR),this.finishNode(o,"OptionalMemberExpression");if(this.eat(l.parenL)){var a=this.atPossibleAsync(e);return o.callee=e,o.arguments=this.parseCallExpressionArguments(l.parenR,a),o.optional=!0,this.finishNode(o,"OptionalCallExpression")}return o.object=e,o.property=this.parseIdentifier(!0),o.computed=!1,o.optional=!0,this.finishNode(o,"OptionalMemberExpression")}if(this.eat(l.dot)){var u=this.startNodeAt(t,r);return u.object=e,u.property=this.parseMaybePrivateName(),u.computed=!1,i.optionalChainMember?(u.optional=!1,this.finishNode(u,"OptionalMemberExpression")):this.finishNode(u,"MemberExpression")}if(this.eat(l.bracketL)){var c=this.startNodeAt(t,r);return c.object=e,c.property=this.parseExpression(),c.computed=!0,this.expect(l.bracketR),i.optionalChainMember?(c.optional=!1,this.finishNode(c,"OptionalMemberExpression")):this.finishNode(c,"MemberExpression")}if(!n&&this.match(l.parenL)){var p=this.atPossibleAsync(e);this.next();var f=this.startNodeAt(t,r);f.callee=e;var h={start:-1};return f.arguments=this.parseCallExpressionArguments(l.parenR,p,h),i.optionalChainMember?this.finishOptionalCallExpression(f):this.finishCallExpression(f),p&&this.shouldParseAsyncArrow()?(i.stop=!0,h.start>-1&&this.raise(h.start,"A trailing comma is not permitted after the rest element"),this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),f)):(this.toReferencedList(f.arguments),f)}return this.match(l.backQuote)?this.parseTaggedTemplateExpression(t,r,e,i):(i.stop=!0,e)},r.parseTaggedTemplateExpression=function(e,t,r,n,i){var s=this.startNodeAt(e,t);return s.tag=r,s.quasi=this.parseTemplate(!0),i&&(s.typeParameters=i),n.optionalChainMember&&this.raise(e,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(s,"TaggedTemplateExpression")},r.atPossibleAsync=function(e){return!this.state.containsEsc&&this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon()},r.finishCallExpression=function(e){if("Import"===e.callee.type){1!==e.arguments.length&&this.raise(e.start,"import() requires exactly one argument");var t=e.arguments[0];t&&"SpreadElement"===t.type&&this.raise(t.start,"... is not allowed in import()")}return this.finishNode(e,"CallExpression")},r.finishOptionalCallExpression=function(e){if("Import"===e.callee.type){1!==e.arguments.length&&this.raise(e.start,"import() requires exactly one argument");var t=e.arguments[0];t&&"SpreadElement"===t.type&&this.raise(t.start,"... is not allowed in import()")}return this.finishNode(e,"OptionalCallExpression")},r.parseCallExpressionArguments=function(e,t,r){for(var n,i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(l.comma),this.eat(e))break;this.match(l.parenL)&&!n&&(n=this.state.start),i.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0,t?r:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),i},r.shouldParseAsyncArrow=function(){return this.match(l.arrow)},r.parseAsyncArrowFromCallExpression=function(e,t){var r=this.state.yieldInPossibleArrowParameters;return this.state.yieldInPossibleArrowParameters=null,this.expect(l.arrow),this.parseArrowExpression(e,t.arguments,!0),this.state.yieldInPossibleArrowParameters=r,e},r.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},r.parseExprAtom=function(e){var t,r=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case l._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"super is only allowed in object methods and classes"),t=this.startNode(),this.next(),this.match(l.parenL)||this.match(l.bracketL)||this.match(l.dot)||this.unexpected(),this.match(l.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(t.start,"super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'."),this.finishNode(t,"Super");case l._import:return this.lookahead().type===l.dot?this.parseImportMetaProperty():(this.expectPlugin("dynamicImport"),t=this.startNode(),this.next(),this.match(l.parenL)||this.unexpected(null,l.parenL),this.finishNode(t,"Import"));case l._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case l._yield:this.state.inGenerator&&this.unexpected();case l.name:t=this.startNode();var n="await"===this.state.value&&(this.state.inAsync||!this.state.inFunction&&this.options.allowAwaitOutsideFunction),i=this.state.containsEsc,s=this.shouldAllowYieldIdentifier(),o=this.parseIdentifier(n||s);if("await"===o.name){if(this.state.inAsync||this.inModule||!this.state.inFunction&&this.options.allowAwaitOutsideFunction)return this.parseAwait(t)}else{if(!i&&"async"===o.name&&this.match(l._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(t,!1,!1,!0);if(r&&"async"===o.name&&this.match(l.name)){var a=this.state.yieldInPossibleArrowParameters;this.state.yieldInPossibleArrowParameters=null;var u=[this.parseIdentifier()];return this.expect(l.arrow),this.parseArrowExpression(t,u,!0),this.state.yieldInPossibleArrowParameters=a,t}}if(r&&!this.canInsertSemicolon()&&this.eat(l.arrow)){var c=this.state.yieldInPossibleArrowParameters;return this.state.yieldInPossibleArrowParameters=null,this.parseArrowExpression(t,[o]),this.state.yieldInPossibleArrowParameters=c,t}return o;case l._do:this.expectPlugin("doExpressions");var p=this.startNode();this.next();var f=this.state.inFunction,h=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,p.body=this.parseBlock(!1),this.state.inFunction=f,this.state.labels=h,this.finishNode(p,"DoExpression");case l.regexp:var d=this.state.value;return(t=this.parseLiteral(d.value,"RegExpLiteral")).pattern=d.pattern,t.flags=d.flags,t;case l.num:return this.parseLiteral(this.state.value,"NumericLiteral");case l.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case l.string:return this.parseLiteral(this.state.value,"StringLiteral");case l._null:return t=this.startNode(),this.next(),this.finishNode(t,"NullLiteral");case l._true:case l._false:return this.parseBooleanLiteral();case l.parenL:return this.parseParenAndDistinguishExpression(r);case l.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(l.bracketR,!0,e),this.toReferencedList(t.elements),this.finishNode(t,"ArrayExpression");case l.braceL:return this.parseObj(!1,e);case l._function:return this.parseFunctionExpression();case l.at:this.parseDecorators();case l._class:return t=this.startNode(),this.takeDecorators(t),this.parseClass(t,!1);case l._new:return this.parseNew();case l.backQuote:return this.parseTemplate(!1);case l.doubleColon:t=this.startNode(),this.next(),t.object=null;var y=t.callee=this.parseNoCallExpr();if("MemberExpression"===y.type)return this.finishNode(t,"BindExpression");throw this.raise(y.start,"Binding should be performed on object property.");default:throw this.unexpected()}},r.parseBooleanLiteral=function(){var e=this.startNode();return e.value=this.match(l._true),this.next(),this.finishNode(e,"BooleanLiteral")},r.parseMaybePrivateName=function(){if(this.match(l.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);var e=this.startNode();return this.next(),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)},r.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(l.dot)?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},r.parseMetaProperty=function(e,t,r){e.meta=t,"function"===t.name&&"sent"===r&&(this.isContextual(r)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());var n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(e.property.start,"The only valid meta property for "+t.name+" is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},r.parseImportMetaProperty=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.expect(l.dot),"import"===t.name&&(this.isContextual("meta")?this.expectPlugin("importMeta"):this.hasPlugin("importMeta")||this.raise(t.start,"Dynamic imports require a parameter: import('a.js')")),this.inModule||this.raise(t.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0,this.parseMetaProperty(e,t,"meta")},r.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},r.parseParenExpression=function(){this.expect(l.parenL);var e=this.parseExpression();return this.expect(l.parenR),e},r.parseParenAndDistinguishExpression=function(e){var t,r=this.state.start,n=this.state.startLoc;this.expect(l.parenL);var i=this.state.maybeInArrowParameters,s=this.state.yieldInPossibleArrowParameters;this.state.maybeInArrowParameters=!0,this.state.yieldInPossibleArrowParameters=null;for(var o,a,u=this.state.start,c=this.state.startLoc,p=[],f={start:0},h={start:0},d=!0;!this.match(l.parenR);){if(d)d=!1;else if(this.expect(l.comma,h.start||null),this.match(l.parenR)){a=this.state.start;break}if(this.match(l.ellipsis)){var y=this.state.start,m=this.state.startLoc;o=this.state.start,p.push(this.parseParenItem(this.parseRest(),y,m)),this.match(l.comma)&&this.lookahead().type===l.parenR&&this.raise(this.state.start,"A trailing comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,f,this.parseParenItem,h))}var g=this.state.start,v=this.state.startLoc;this.expect(l.parenR),this.state.maybeInArrowParameters=i;var b=this.startNodeAt(r,n);if(e&&this.shouldParseArrow()&&(b=this.parseArrow(b))){for(var E=0;E1?((t=this.startNodeAt(u,c)).expressions=p,this.toReferencedList(t.expressions),this.finishNodeAt(t,"SequenceExpression",g,v)):t=p[0],this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",r),t},r.shouldParseArrow=function(){return!this.canInsertSemicolon()},r.parseArrow=function(e){if(this.eat(l.arrow))return e},r.parseParenItem=function(e,t,r){return e},r.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(l.dot)){var r=this.parseMetaProperty(e,t,"target");if(!this.state.inFunction&&!this.state.inClassProperty){var n="new.target can only be used in functions";this.hasPlugin("classProperties")&&(n+=" or class properties"),this.raise(r.start,n)}return r}return e.callee=this.parseNoCallExpr(),"OptionalMemberExpression"!==e.callee.type&&"OptionalCallExpression"!==e.callee.type||this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"),this.eat(l.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(e),this.finishNode(e,"NewExpression")},r.parseNewArguments=function(e){if(this.eat(l.parenL)){var t=this.parseExprList(l.parenR);this.toReferencedList(t),e.arguments=t}else e.arguments=[]},r.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(l.backQuote),this.finishNode(t,"TemplateElement")},r.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(l.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(l.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},r.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var o=null;!this.eat(l.braceR);){if(i)i=!1;else if(this.expect(l.comma),this.eat(l.braceR))break;if(this.match(l.at))if(this.hasPlugin("decorators"))this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");else for(;this.match(l.at);)r.push(this.parseDecorator());var a=this.startNode(),u=!1,c=!1,p=void 0,f=void 0;if(r.length&&(a.decorators=r,r=[]),this.match(l.ellipsis)){if(this.expectPlugin("objectRestSpread"),a=this.parseSpread(e?{start:0}:void 0),e&&this.toAssignable(a,!0,"object pattern"),s.properties.push(a),!e)continue;var h=this.state.start;if(null!==o)this.unexpected(o,"Cannot have multiple rest elements when destructuring");else{if(this.eat(l.braceR))break;if(!this.match(l.comma)||this.lookahead().type!==l.braceR){o=h;continue}this.unexpected(h,"A trailing comma is not permitted after the rest element")}}a.method=!1,(e||t)&&(p=this.state.start,f=this.state.startLoc),e||(u=this.eat(l.star));var d=this.state.containsEsc;if(!e&&this.isContextual("async")){u&&this.unexpected();var y=this.parseIdentifier();this.match(l.colon)||this.match(l.parenL)||this.match(l.braceR)||this.match(l.eq)||this.match(l.comma)?(a.key=y,a.computed=!1):(c=!0,this.match(l.star)&&(this.expectPlugin("asyncGenerators"),this.next(),u=!0),this.parsePropertyName(a))}else this.parsePropertyName(a);this.parseObjPropValue(a,p,f,u,c,e,t,d),this.checkPropClash(a,n),a.shorthand&&this.addExtra(a,"shorthand",!0),s.properties.push(a)}return null!==o&&this.unexpected(o,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},r.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(l.string)||this.match(l.num)||this.match(l.bracketL)||this.match(l.name)||!!this.state.type.keyword)},r.checkGetterSetterParams=function(e){var t="get"===e.kind?0:1,r=e.start;e.params.length!==t&&("get"===e.kind?this.raise(r,"getter must not have any formal parameters"):this.raise(r,"setter must have exactly one formal parameter")),"set"===e.kind&&"RestElement"===e.params[0].type&&this.raise(r,"setter function argument must not be a rest parameter")},r.parseObjectMethod=function(e,t,r,n,i){return r||t||this.match(l.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,"ObjectMethod")):!i&&this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(e),e):void 0},r.parseObjectProperty=function(e,t,r,n,i){return e.shorthand=!1,this.eat(l.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(l.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},r.parseObjPropValue=function(e,t,r,n,i,s,o,a){var u=this.parseObjectMethod(e,n,i,s,a)||this.parseObjectProperty(e,t,r,s,o);return u||this.unexpected(),u},r.parsePropertyName=function(e){if(this.eat(l.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(l.bracketR);else{var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(l.num)||this.match(l.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==e.key.type&&(e.computed=!1),this.state.inPropertyName=t}return e.key},r.initFunction=function(e,t){e.id=null,e.generator=!1,e.async=!!t},r.parseMethod=function(e,t,r,n,i){var s=this.state.inFunction,o=this.state.inMethod,a=this.state.inGenerator;this.state.inFunction=!0,this.state.inMethod=e.kind||!0,this.state.inGenerator=t,this.initFunction(e,r),e.generator=!!t;var u=n;return this.parseFunctionParams(e,u),this.parseFunctionBodyAndFinish(e,i),this.state.inFunction=s,this.state.inMethod=o,this.state.inGenerator=a,e},r.parseArrowExpression=function(e,t,r){this.state.yieldInPossibleArrowParameters&&this.raise(this.state.yieldInPossibleArrowParameters.start,"yield is not allowed in the parameters of an arrow function inside a generator");var n=this.state.inFunction;this.state.inFunction=!0,this.initFunction(e,r),t&&this.setArrowFunctionParameters(e,t);var i=this.state.inGenerator,s=this.state.maybeInArrowParameters;return this.state.inGenerator=!1,this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.state.inGenerator=i,this.state.inFunction=n,this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")},r.setArrowFunctionParameters=function(e,t){e.params=this.toAssignableList(t,!0,"arrow function parameters")},r.isStrictBody=function(e){if("BlockStatement"===e.body.type&&e.body.directives.length)for(var t=0,r=e.body.directives;t0)for(var t=0,r=e.body.body;t=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(l.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(l.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:k(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},r.jsxReadNewLine=function(e){var t,r=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===r&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,t},r.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):k(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(l.string,t)},r.jsxReadEntity=function(){for(var e,t="",r=0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos"):!L(i)&&L(s)?this.raise(s.start,"Expected corresponding JSX closing tag for <"+R(i.name)+">"):L(i)||L(s)||R(s.name)!==R(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+R(i.name)+">")}return L(i)?(r.openingFragment=i,r.closingFragment=s):(r.openingElement=i,r.closingElement=s),r.children=n,this.match(l.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"),L(i)?this.finishNode(r,"JSXFragment"):this.finishNode(r,"JSXElement")},r.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)},r.parseExprAtom=function(t){return this.match(l.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(l.jsxTagStart)?this.jsxParseElement():e.prototype.parseExprAtom.call(this,t)},r.readToken=function(t){if(this.state.inPropertyName)return e.prototype.readToken.call(this,t);var r=this.curContext();if(r===B.j_expr)return this.jsxReadToken();if(r===B.j_oTag||r===B.j_cTag){if(A(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(l.jsxTagEnd);if((34===t||39===t)&&r===B.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(l.jsxTagStart)):e.prototype.readToken.call(this,t)},r.updateContext=function(t){if(this.match(l.braceL)){var r=this.curContext();r===B.j_oTag?this.state.context.push(B.braceExpression):r===B.j_expr?this.state.context.push(B.templateQuasi):e.prototype.updateContext.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(l.slash)||t!==l.jsxTagStart)return e.prototype.updateContext.call(this,t);this.state.context.length-=2,this.state.context.push(B.j_cTag),this.state.exprAllowed=!1}},t}(e)},flow:function(e){return function(e){function t(t,r){var n;return(n=e.call(this,t,r)||this).flowPragma=void 0,n}i(t,e);var r=t.prototype;return r.shouldParseTypes=function(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma},r.addComment=function(t){if(void 0===this.flowPragma){var r=C.exec(t.value);if(r)if("flow"===r[1])this.flowPragma="flow";else{if("noflow"!==r[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else this.flowPragma=null}return e.prototype.addComment.call(this,t)},r.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||l.colon);var r=this.flowParseType();return this.state.inType=t,r},r.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(l.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(l.parenL)?(e.value=this.parseExpression(),this.expect(l.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},r.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(l.colon);var t=null,r=null;return this.match(l.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(l.modulo)&&(r=this.flowParsePredicate())),[t,r]},r.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},r.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(l.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(l.parenR);var s=this.flowParseTypeAndPredicateInitialiser();return r.returnType=s[0],e.predicate=s[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},r.flowParseDeclare=function(e,t){if(this.match(l._class))return this.flowParseDeclareClass(e);if(this.match(l._function))return this.flowParseDeclareFunction(e);if(this.match(l._var))return this.flowParseDeclareVariable(e);if(this.isContextual("module"))return this.lookahead().type===l.dot?this.flowParseDeclareModuleExports(e):(t&&this.unexpected(null,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(e));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(e);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(e);if(this.isContextual("interface"))return this.flowParseDeclareInterface(e);if(this.match(l._export))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()},r.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.semicolon(),this.finishNode(e,"DeclareVariable")},r.flowParseDeclareModule=function(e){var t=this;this.next(),this.match(l.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var r=e.body=this.startNode(),n=r.body=[];for(this.expect(l.braceL);!this.match(l.braceR);){var i=this.startNode();if(this.match(l._import)){var s=this.lookahead();"type"!==s.value&&"typeof"!==s.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.next(),this.parseImport(i)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),i=this.flowParseDeclare(i,!0);n.push(i)}this.expect(l.braceR),this.finishNode(r,"BlockStatement");var o=null,a=!1,u="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return n.forEach(function(e){!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(a&&t.unexpected(e.start,"Duplicate `declare module.exports` statement"),"ES"===o&&t.unexpected(e.start,u),o="CommonJS",a=!0):("CommonJS"===o&&t.unexpected(e.start,u),o="ES")}),e.kind=o||"CommonJS",this.finishNode(e,"DeclareModule")},r.flowParseDeclareExportDeclaration=function(e,t){if(this.expect(l._export),this.eat(l._default))return this.match(l._function)||this.match(l._class)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(l._const)||this.match(l._let)||(this.isContextual("type")||this.isContextual("interface"))&&!t){var r=this.state.value,n=w[r];this.unexpected(this.state.start,"`declare export "+r+"` is not supported. Use `"+n+"` instead")}if(this.match(l._var)||this.match(l._function)||this.match(l._class)||this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(l.star)||this.match(l.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(e=this.parseExport(e)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;throw this.unexpected()},r.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(l.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},r.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},r.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},r.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},r.flowParseInterfaceish=function(e,t){if(void 0===t&&(t=!1),e.id=this.flowParseRestrictedIdentifier(!t),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(l._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(l.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(l.comma))}if(this.isContextual("implements")){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(l.comma))}e.body=this.flowParseObjectType(t,!1,!1,t)},r.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},r.flowParseInterface=function(e){return this.flowParseInterfaceish(e),this.finishNode(e,"InterfaceDeclaration")},r.checkReservedType=function(e,t){S.indexOf(e)>-1&&this.raise(t,"Cannot overwrite primitive type "+e)},r.flowParseRestrictedIdentifier=function(e){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(e)},r.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(l.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},r.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(l.colon)&&(e.supertype=this.flowParseTypeInitialiser(l.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(l.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},r.flowParseTypeParameter=function(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!1),!e&&t)throw new Error("Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`).");var r=this.state.start,n=this.startNode(),i=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return n.name=s.name,n.variance=i,n.bound=s.typeAnnotation,this.match(l.eq)?e?(this.eat(l.eq),n.default=this.flowParseType()):this.unexpected():t&&this.unexpected(r,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(n,"TypeParameter")},r.flowParseTypeParameterDeclaration=function(e){void 0===e&&(e=!0);var t=this.state.inType,r=this.startNode();r.params=[],this.state.inType=!0,this.isRelational("<")||this.match(l.jsxTagStart)?this.next():this.unexpected();var n=!1;do{var i=this.flowParseTypeParameter(e,n);r.params.push(i),i.default&&(n=!0),this.isRelational(">")||this.expect(l.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(r,"TypeParameterDeclaration")},r.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(l.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},r.flowParseInterfaceType=function(){var e=this.startNode();if(this.expectContextual("interface"),e.extends=[],this.eat(l._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(l.comma));return e.body=this.flowParseObjectType(!1,!1,!1,!1),this.finishNode(e,"InterfaceTypeAnnotation")},r.flowParseObjectPropertyKey=function(){return this.match(l.num)||this.match(l.string)?this.parseExprAtom():this.parseIdentifier(!0)},r.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.lookahead().type===l.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(l.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")},r.flowParseObjectTypeInternalSlot=function(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(l.bracketR),this.expect(l.bracketR),this.isRelational("<")||this.match(l.parenL)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))):(e.method=!1,this.eat(l.question)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")},r.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration(!1)),this.expect(l.parenL);!this.match(l.parenR)&&!this.match(l.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(l.parenR)||this.expect(l.comma);return this.eat(l.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(l.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},r.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")},r.flowParseObjectType=function(e,t,r,n){var i=this.state.inType;this.state.inType=!0;var s,o,a=this.startNode();for(a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[],t&&this.match(l.braceBarL)?(this.expect(l.braceBarL),s=l.braceBarR,o=!0):(this.expect(l.braceL),s=l.braceR,o=!1),a.exact=o;!this.match(s);){var u=!1,c=null,p=this.startNode();if(n&&this.isContextual("proto")){var f=this.lookahead();f.type!==l.colon&&f.type!==l.question&&(this.next(),c=this.state.start,e=!1)}if(e&&this.isContextual("static")){var h=this.lookahead();h.type!==l.colon&&h.type!==l.question&&(this.next(),u=!0)}var d=this.flowParseVariance();if(this.eat(l.bracketL))null!=c&&this.unexpected(c),this.eat(l.bracketL)?(d&&this.unexpected(d.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(p,u))):a.indexers.push(this.flowParseObjectTypeIndexer(p,u,d));else if(this.match(l.parenL)||this.isRelational("<"))null!=c&&this.unexpected(c),d&&this.unexpected(d.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(p,u));else{var y="init";if(this.isContextual("get")||this.isContextual("set")){var m=this.lookahead();m.type!==l.name&&m.type!==l.string&&m.type!==l.num||(y=this.state.value,this.next())}a.properties.push(this.flowParseObjectTypeProperty(p,u,c,d,y,r))}this.flowObjectTypeSemicolon()}this.expect(s);var g=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=i,g},r.flowParseObjectTypeProperty=function(e,t,r,n,i,s){if(this.match(l.ellipsis))return s||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),null!=r&&this.unexpected(r),n&&this.unexpected(n.start,"Spread properties cannot have variance"),this.expect(l.ellipsis),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty");e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=i;var o=!1;return this.isRelational("<")||this.match(l.parenL)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(e)):("init"!==i&&this.unexpected(),e.method=!1,this.eat(l.question)&&(o=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=o,this.finishNode(e,"ObjectTypeProperty")},r.flowCheckGetterSetterParams=function(e){var t="get"===e.kind?0:1,r=e.start;e.value.params.length+(e.value.rest?1:0)!==t&&("get"===e.kind?this.raise(r,"getter must not have any formal parameters"):this.raise(r,"setter must have exactly one formal parameter")),"set"===e.kind&&e.value.rest&&this.raise(r,"setter function argument must not be a rest parameter")},r.flowObjectTypeSemicolon=function(){this.eat(l.semi)||this.eat(l.comma)||this.match(l.braceR)||this.match(l.braceBarR)||this.unexpected()},r.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(l.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},r.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},r.flowParseTypeofType=function(){var e=this.startNode();return this.expect(l._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},r.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(l.bracketL);this.state.pos0){var v=c.concat();if(g.length>0){this.state=u,this.state.noArrowAt=v;for(var b=0;b1&&this.raise(u.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),d&&1===m.length){this.state=u,this.state.noArrowAt=v.concat(m[0].start);var A=this.tryParseConditionalConsequent();h=A.consequent,d=A.failed}this.getArrowLikeExpressions(h,!0)}return this.state.noArrowAt=c,this.expect(l.colon),p.test=t,p.consequent=h,p.alternate=this.forwardNoArrowParamsConversionAt(p,function(){return o.parseMaybeAssign(r,void 0,void 0,void 0)}),this.finishNode(p,"ConditionalExpression")},r.tryParseConditionalConsequent=function(){this.state.noArrowParamsConversionAt.push(this.state.start);var e=this.parseMaybeAssign(),t=!this.match(l.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}},r.getArrowLikeExpressions=function(t,r){for(var n=this,i=[t],s=[];0!==i.length;){var o=i.pop();"ArrowFunctionExpression"===o.type?(o.typeParameters||!o.returnType?(this.toAssignableList(o.params,!0,"arrow function parameters"),e.prototype.checkFunctionNameAndParams.call(this,o,!0)):s.push(o),i.push(o.body)):"ConditionalExpression"===o.type&&(i.push(o.consequent),i.push(o.alternate))}if(r){for(var a=0;a")}throw new Error("Unreachable")},r.tsParseList=function(e,t){for(var r=[];!this.tsIsListTerminator(e);)r.push(t());return r},r.tsParseDelimitedList=function(e,t){return re(this.tsParseDelimitedListWorker(e,t,!0))},r.tsTryParseDelimitedList=function(e,t){return this.tsParseDelimitedListWorker(e,t,!1)},r.tsParseDelimitedListWorker=function(e,t,r){for(var n=[];!this.tsIsListTerminator(e);){var i=t();if(null==i)return;if(n.push(i),!this.eat(l.comma)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(l.comma))}}return n},r.tsParseBracketedList=function(e,t,r,n){n||(r?this.expect(l.bracketL):this.expectRelational("<"));var i=this.tsParseDelimitedList(e,t);return r?this.expect(l.bracketR):this.expectRelational(">"),i},r.tsParseEntityName=function(e){for(var t=this.parseIdentifier();this.eat(l.dot);){var r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(e),t=this.finishNode(r,"TSQualifiedName")}return t},r.tsParseTypeReference=function(){var e=this.startNode();return e.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")},r.tsParseThisTypePredicate=function(e){this.next();var t=this.startNode();return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(t,"TSTypePredicate")},r.tsParseThisTypeNode=function(){var e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")},r.tsParseTypeQuery=function(){var e=this.startNode();return this.expect(l._typeof),e.exprName=this.tsParseEntityName(!0),this.finishNode(e,"TSTypeQuery")},r.tsParseTypeParameter=function(){var e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsEatThenParseType(l._extends),e.default=this.tsEatThenParseType(l.eq),this.finishNode(e,"TSTypeParameter")},r.tsTryParseTypeParameters=function(){if(this.isRelational("<"))return this.tsParseTypeParameters()},r.tsParseTypeParameters=function(){var e=this.startNode();return this.isRelational("<")||this.match(l.jsxTagStart)?this.next():this.unexpected(),e.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(e,"TSTypeParameterDeclaration")},r.tsFillSignature=function(e,t){var r=e===l.arrow;t.typeParameters=this.tsTryParseTypeParameters(),this.expect(l.parenL),t.parameters=this.tsParseBindingListForSignature(),r?t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))},r.tsParseBindingListForSignature=function(){var e=this;return this.parseBindingList(l.parenR).map(function(t){if("Identifier"!==t.type&&"RestElement"!==t.type)throw e.unexpected(t.start,"Name in a signature must be an Identifier.");return t})},r.tsParseTypeMemberSemicolon=function(){this.eat(l.comma)||this.semicolon()},r.tsParseSignatureMember=function(e){var t=this.startNode();return"TSConstructSignatureDeclaration"===e&&this.expect(l._new),this.tsFillSignature(l.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)},r.tsIsUnambiguouslyIndexSignature=function(){return this.next(),this.eat(l.name)&&this.match(l.colon)},r.tsTryParseIndexSignature=function(e){if(this.match(l.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(l.bracketL);var t=this.parseIdentifier();this.expect(l.colon),t.typeAnnotation=this.tsParseTypeAnnotation(!1),this.expect(l.bracketR),e.parameters=[t];var r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}},r.tsParsePropertyOrMethodSignature=function(e,t){this.parsePropertyName(e),this.eat(l.question)&&(e.optional=!0);var r=e;if(t||!this.match(l.parenL)&&!this.isRelational("<")){var n=r;t&&(n.readonly=!0);var i=this.tsTryParseTypeAnnotation();return i&&(n.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}var s=r;return this.tsFillSignature(l.colon,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSMethodSignature")},r.tsParseTypeMember=function(){if(this.match(l.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration");if(this.match(l._new)&&this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this)))return this.tsParseSignatureMember("TSConstructSignatureDeclaration");var e=this.startNode(),t=!!this.tsParseModifier(["readonly"]),r=this.tsTryParseIndexSignature(e);return r?(t&&(e.readonly=!0),r):this.tsParsePropertyOrMethodSignature(e,t)},r.tsIsStartOfConstructSignature=function(){return this.next(),this.match(l.parenL)||this.isRelational("<")},r.tsParseTypeLiteral=function(){var e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")},r.tsParseObjectTypeMembers=function(){this.expect(l.braceL);var e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(l.braceR),e},r.tsIsStartOfMappedType=function(){return this.next(),this.eat(l.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(l.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(l._in))))},r.tsParseMappedTypeParameter=function(){var e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsExpectThenParseType(l._in),this.finishNode(e,"TSTypeParameter")},r.tsParseMappedType=function(){var e=this.startNode();return this.expect(l.braceL),this.match(l.plusMin)?(e.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(e.readonly=!0),this.expect(l.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),this.expect(l.bracketR),this.match(l.plusMin)?(e.optional=this.state.value,this.next(),this.expect(l.question)):this.eat(l.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(l.braceR),this.finishNode(e,"TSMappedType")},r.tsParseTupleType=function(){var e=this.startNode();return e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseType.bind(this),!0,!1),this.finishNode(e,"TSTupleType")},r.tsParseParenthesizedType=function(){var e=this.startNode();return this.expect(l.parenL),e.typeAnnotation=this.tsParseType(),this.expect(l.parenR),this.finishNode(e,"TSParenthesizedType")},r.tsParseFunctionOrConstructorType=function(e){var t=this.startNode();return"TSConstructorType"===e&&this.expect(l._new),this.tsFillSignature(l.arrow,t),this.finishNode(t,e)},r.tsParseLiteralTypeNode=function(){var e=this,t=this.startNode();return t.literal=function(){switch(e.state.type){case l.num:return e.parseLiteral(e.state.value,"NumericLiteral");case l.string:return e.parseLiteral(e.state.value,"StringLiteral");case l._true:case l._false:return e.parseBooleanLiteral();default:throw e.unexpected()}}(),this.finishNode(t,"TSLiteralType")},r.tsParseNonArrayType=function(){switch(this.state.type){case l.name:case l._void:case l._null:var e=this.match(l._void)?"TSVoidKeyword":this.match(l._null)?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";default:return}}(this.state.value);if(void 0!==e&&this.lookahead().type!==l.dot){var t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference();case l.string:case l.num:case l._true:case l._false:return this.tsParseLiteralTypeNode();case l.plusMin:if("-"===this.state.value){var r=this.startNode();if(this.next(),!this.match(l.num))throw this.unexpected();return r.literal=this.parseLiteral(-this.state.value,"NumericLiteral",r.start,r.loc.start),this.finishNode(r,"TSLiteralType")}break;case l._this:var n=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(n):n;case l._typeof:return this.tsParseTypeQuery();case l.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case l.bracketL:return this.tsParseTupleType();case l.parenL:return this.tsParseParenthesizedType()}throw this.unexpected()},r.tsParseArrayTypeOrHigher=function(){for(var e=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(l.bracketL);)if(this.match(l.bracketR)){var t=this.startNodeAtNode(e);t.elementType=e,this.expect(l.bracketR),e=this.finishNode(t,"TSArrayType")}else{var r=this.startNodeAtNode(e);r.objectType=e,r.indexType=this.tsParseType(),this.expect(l.bracketR),e=this.finishNode(r,"TSIndexedAccessType")}return e},r.tsParseTypeOperator=function(e){var t=this.startNode();return this.expectContextual(e),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),this.finishNode(t,"TSTypeOperator")},r.tsParseInferType=function(){var e=this.startNode();this.expectContextual("infer");var t=this.startNode();return t.name=this.parseIdentifierName(t.start),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")},r.tsParseTypeOperatorOrHigher=function(){var e=this,t=["keyof","unique"].find(function(t){return e.isContextual(t)});return t?this.tsParseTypeOperator(t):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()},r.tsParseUnionOrIntersectionType=function(e,t,r){this.eat(r);var n=t();if(this.match(r)){for(var i=[n];this.eat(r);)i.push(t());var s=this.startNodeAtNode(n);s.types=i,n=this.finishNode(s,e)}return n},r.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),l.bitwiseAND)},r.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),l.bitwiseOR)},r.tsIsStartOfFunctionType=function(){return!!this.isRelational("<")||this.match(l.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},r.tsSkipParameterStart=function(){return!(!this.match(l.name)&&!this.match(l._this)||(this.next(),0))},r.tsIsUnambiguouslyStartOfFunctionType=function(){if(this.next(),this.match(l.parenR)||this.match(l.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(l.colon)||this.match(l.comma)||this.match(l.question)||this.match(l.eq))return!0;if(this.match(l.parenR)&&(this.next(),this.match(l.arrow)))return!0}return!1},r.tsParseTypeOrTypePredicateAnnotation=function(e){var t=this;return this.tsInType(function(){var r=t.startNode();t.expect(e);var n=t.tsIsIdentifier()&&t.tsTryParse(t.tsParseTypePredicatePrefix.bind(t));if(!n)return t.tsParseTypeAnnotation(!1,r);var i=t.tsParseTypeAnnotation(!1),s=t.startNodeAtNode(n);return s.parameterName=n,s.typeAnnotation=i,r.typeAnnotation=t.finishNode(s,"TSTypePredicate"),t.finishNode(r,"TSTypeAnnotation")})},r.tsTryParseTypeOrTypePredicateAnnotation=function(){return this.match(l.colon)?this.tsParseTypeOrTypePredicateAnnotation(l.colon):void 0},r.tsTryParseTypeAnnotation=function(){return this.match(l.colon)?this.tsParseTypeAnnotation():void 0},r.tsTryParseType=function(){return this.tsEatThenParseType(l.colon)},r.tsParseTypePredicatePrefix=function(){var e=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e},r.tsParseTypeAnnotation=function(e,t){var r=this;return void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),this.tsInType(function(){e&&r.expect(l.colon),t.typeAnnotation=r.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")},r.tsParseType=function(){ne(this.state.inType);var e=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(l._extends))return e;var t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsParseNonConditionalType(),this.expect(l.question),t.trueType=this.tsParseType(),this.expect(l.colon),t.falseType=this.tsParseType(),this.finishNode(t,"TSConditionalType")},r.tsParseNonConditionalType=function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(l._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()},r.tsParseTypeAssertion=function(){var e=this,t=this.startNode();return t.typeAnnotation=this.tsInType(function(){return e.tsParseType()}),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")},r.tsParseHeritageClause=function(){return this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this))},r.tsParseExpressionWithTypeArguments=function(){var e=this.startNode();return e.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")},r.tsParseInterfaceDeclaration=function(e){e.id=this.parseIdentifier(),e.typeParameters=this.tsTryParseTypeParameters(),this.eat(l._extends)&&(e.extends=this.tsParseHeritageClause());var t=this.startNode();return t.body=this.tsParseObjectTypeMembers(),e.body=this.finishNode(t,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")},r.tsParseTypeAliasDeclaration=function(e){return e.id=this.parseIdentifier(),e.typeParameters=this.tsTryParseTypeParameters(),e.typeAnnotation=this.tsExpectThenParseType(l.eq),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")},r.tsInNoContext=function(e){var t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}},r.tsInType=function(e){var t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}},r.tsEatThenParseType=function(e){return this.match(e)?this.tsNextThenParseType():void 0},r.tsExpectThenParseType=function(e){var t=this;return this.tsDoThenParseType(function(){return t.expect(e)})},r.tsNextThenParseType=function(){var e=this;return this.tsDoThenParseType(function(){return e.next()})},r.tsDoThenParseType=function(e){var t=this;return this.tsInType(function(){return e(),t.tsParseType()})},r.tsParseEnumMember=function(){var e=this.startNode();return e.id=this.match(l.string)?this.parseLiteral(this.state.value,"StringLiteral"):this.parseIdentifier(!0),this.eat(l.eq)&&(e.initializer=this.parseMaybeAssign()),this.finishNode(e,"TSEnumMember")},r.tsParseEnumDeclaration=function(e,t){return t&&(e.const=!0),e.id=this.parseIdentifier(),this.expect(l.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(l.braceR),this.finishNode(e,"TSEnumDeclaration")},r.tsParseModuleBlock=function(){var e=this.startNode();return this.expect(l.braceL),this.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,l.braceR),this.finishNode(e,"TSModuleBlock")},r.tsParseModuleOrNamespaceDeclaration=function(e){if(e.id=this.parseIdentifier(),this.eat(l.dot)){var t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t),e.body=t}else e.body=this.tsParseModuleBlock();return this.finishNode(e,"TSModuleDeclaration")},r.tsParseAmbientExternalModuleDeclaration=function(e){return this.isContextual("global")?(e.global=!0,e.id=this.parseIdentifier()):this.match(l.string)?e.id=this.parseExprAtom():this.unexpected(),this.match(l.braceL)?e.body=this.tsParseModuleBlock():this.semicolon(),this.finishNode(e,"TSModuleDeclaration")},r.tsParseImportEqualsDeclaration=function(e,t){return e.isExport=t||!1,e.id=this.parseIdentifier(),this.expect(l.eq),e.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")},r.tsIsExternalModuleReference=function(){return this.isContextual("require")&&this.lookahead().type===l.parenL},r.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},r.tsParseExternalModuleReference=function(){var e=this.startNode();if(this.expectContextual("require"),this.expect(l.parenL),!this.match(l.string))throw this.unexpected();return e.expression=this.parseLiteral(this.state.value,"StringLiteral"),this.expect(l.parenR),this.finishNode(e,"TSExternalModuleReference")},r.tsLookAhead=function(e){var t=this.state.clone(),r=e();return this.state=t,r},r.tsTryParseAndCatch=function(e){var t=this.state.clone();try{return e()}catch(e){if(e instanceof SyntaxError)return void(this.state=t);throw e}},r.tsTryParse=function(e){var t=this.state.clone(),r=e();return void 0!==r&&!1!==r?r:void(this.state=t)},r.nodeWithSamePosition=function(e,t){var r=this.startNodeAtNode(e);return r.type=t,r.end=e.end,r.loc.end=e.loc.end,e.leadingComments&&(r.leadingComments=e.leadingComments),e.trailingComments&&(r.trailingComments=e.trailingComments),e.innerComments&&(r.innerComments=e.innerComments),r},r.tsTryParseDeclare=function(e){switch(this.state.type){case l._function:return this.next(),this.parseFunction(e,!0);case l._class:return this.parseClass(e,!0,!1);case l._const:if(this.match(l._const)&&this.isLookaheadContextual("enum"))return this.expect(l._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0);case l._var:case l._let:return this.parseVarStatement(e,this.state.type);case l.name:var t=this.state.value;return"global"===t?this.tsParseAmbientExternalModuleDeclaration(e):this.tsParseDeclaration(e,t,!0)}},r.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)},r.tsParseExpressionStatement=function(e,t){switch(t.name){case"declare":var r=this.tsTryParseDeclare(e);if(r)return r.declare=!0,r;break;case"global":if(this.match(l.braceL)){var n=e;return n.global=!0,n.id=t,n.body=this.tsParseModuleBlock(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1)}},r.tsParseDeclaration=function(e,t,r){switch(t){case"abstract":if(r||this.match(l._class)){var n=e;return n.abstract=!0,r&&this.next(),this.parseClass(n,!0,!1)}break;case"enum":if(r||this.match(l.name))return r&&this.next(),this.tsParseEnumDeclaration(e,!1);break;case"interface":if(r||this.match(l.name))return r&&this.next(),this.tsParseInterfaceDeclaration(e);break;case"module":if(r&&this.next(),this.match(l.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(r||this.match(l.name))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"namespace":if(r||this.match(l.name))return r&&this.next(),this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(r||this.match(l.name))return r&&this.next(),this.tsParseTypeAliasDeclaration(e)}},r.tsTryParseGenericAsyncArrowFunction=function(t,r){var n=this,i=this.tsTryParseAndCatch(function(){var i=n.startNodeAt(t,r);return i.typeParameters=n.tsParseTypeParameters(),e.prototype.parseFunctionParams.call(n,i),i.returnType=n.tsTryParseTypeOrTypePredicateAnnotation(),n.expect(l.arrow),i});if(i)return i.id=null,i.generator=!1,i.expression=!0,i.async=!0,this.parseFunctionBody(i,!0),this.finishNode(i,"ArrowFunctionExpression")},r.tsParseTypeArguments=function(){var e=this,t=this.startNode();return t.params=this.tsInType(function(){return e.tsInNoContext(function(){return e.expectRelational("<"),e.tsParseDelimitedList("TypeParametersOrArguments",e.tsParseType.bind(e))})}),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")},r.tsIsDeclarationStart=function(){if(this.match(l.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1},r.isExportDefaultSpecifier=function(){return!this.tsIsDeclarationStart()&&e.prototype.isExportDefaultSpecifier.call(this)},r.parseAssignableListItem=function(e,t){var r,n=!1;e&&(r=this.parseAccessModifier(),n=!!this.tsParseModifier(["readonly"]));var i=this.parseMaybeDefault();this.parseAssignableListItemTypes(i);var s=this.parseMaybeDefault(i.start,i.loc.start,i);if(r||n){var o=this.startNodeAtNode(s);if(t.length&&(o.decorators=t),r&&(o.accessibility=r),n&&(o.readonly=n),"Identifier"!==s.type&&"AssignmentPattern"!==s.type)throw this.raise(o.start,"A parameter property may not be declared using a binding pattern.");return o.parameter=s,this.finishNode(o,"TSParameterProperty")}return t.length&&(i.decorators=t),s},r.parseFunctionBodyAndFinish=function(t,r,n){!n&&this.match(l.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(l.colon));var i="FunctionDeclaration"===r?"TSDeclareFunction":"ClassMethod"===r?"TSDeclareMethod":void 0;i&&!this.match(l.braceL)&&this.isLineTerminator()?this.finishNode(t,i):e.prototype.parseFunctionBodyAndFinish.call(this,t,r,n)},r.parseSubscript=function(t,r,n,i,s){var o=this;if(!this.hasPrecedingLineBreak()&&this.match(l.bang)){this.state.exprAllowed=!1,this.next();var a=this.startNodeAt(r,n);return a.expression=t,this.finishNode(a,"TSNonNullExpression")}var u=this.tsTryParseAndCatch(function(){if(o.isRelational("<")){if(!i&&o.atPossibleAsync(t)){var e=o.tsTryParseGenericAsyncArrowFunction(r,n);if(e)return e}var a=o.startNodeAt(r,n);a.callee=t;var u=o.tsParseTypeArguments();if(u){if(!i&&o.eat(l.parenL))return a.arguments=o.parseCallExpressionArguments(l.parenR,!1),a.typeParameters=u,o.finishCallExpression(a);if(o.match(l.backQuote))return o.parseTaggedTemplateExpression(r,n,t,s,u)}}o.unexpected()});return u||e.prototype.parseSubscript.call(this,t,r,n,i,s)},r.parseNewArguments=function(t){var r=this;if(this.isRelational("<")){var n=this.tsTryParseAndCatch(function(){var e=r.tsParseTypeArguments();return r.match(l.parenL)||r.unexpected(),e});n&&(t.typeParameters=n)}e.prototype.parseNewArguments.call(this,t)},r.parseExprOp=function(t,r,n,i,s){if(re(l._in.binop)>i&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){var o=this.startNodeAt(r,n);return o.expression=t,o.typeAnnotation=this.tsNextThenParseType(),this.finishNode(o,"TSAsExpression"),this.parseExprOp(o,r,n,i,s)}return e.prototype.parseExprOp.call(this,t,r,n,i,s)},r.checkReservedWord=function(e,t,r,n){},r.checkDuplicateExports=function(){},r.parseImport=function(t){return this.match(l.name)&&this.lookahead().type===l.eq?this.tsParseImportEqualsDeclaration(t):e.prototype.parseImport.call(this,t)},r.parseExport=function(t){if(this.match(l._import))return this.expect(l._import),this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(l.eq)){var r=t;return r.expression=this.parseExpression(),this.semicolon(),this.finishNode(r,"TSExportAssignment")}if(this.eatContextual("as")){var n=t;return this.expectContextual("namespace"),n.id=this.parseIdentifier(),this.semicolon(),this.finishNode(n,"TSNamespaceExportDeclaration")}return e.prototype.parseExport.call(this,t)},r.isAbstractClass=function(){return this.isContextual("abstract")&&this.lookahead().type===l._class},r.parseExportDefaultExpression=function(){if(this.isAbstractClass()){var t=this.startNode();return this.next(),this.parseClass(t,!0,!0),t.abstract=!0,t}if("interface"===this.state.value){var r=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(r)return r}return e.prototype.parseExportDefaultExpression.call(this)},r.parseStatementContent=function(t,r){if(this.state.type===l._const){var n=this.lookahead();if(n.type===l.name&&"enum"===n.value){var i=this.startNode();return this.expect(l._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(i,!0)}}return e.prototype.parseStatementContent.call(this,t,r)},r.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},r.parseClassMember=function(t,r,n){var i=this.parseAccessModifier();i&&(r.accessibility=i),e.prototype.parseClassMember.call(this,t,r,n)},r.parseClassMemberWithIsStatic=function(t,r,n,i){var s=r,o=r,a=r,u=!1,l=!1;switch(this.tsParseModifier(["abstract","readonly"])){case"readonly":l=!0,u=!!this.tsParseModifier(["abstract"]);break;case"abstract":u=!0,l=!!this.tsParseModifier(["readonly"])}if(u&&(s.abstract=!0),l&&(a.readonly=!0),!u&&!i&&!s.accessibility){var c=this.tsTryParseIndexSignature(r);if(c)return void t.body.push(c)}if(l)return s.static=i,this.parseClassPropertyName(o),this.parsePostMemberNameModifiers(s),void this.pushClassProperty(t,o);e.prototype.parseClassMemberWithIsStatic.call(this,t,r,n,i)},r.parsePostMemberNameModifiers=function(e){this.eat(l.question)&&(e.optional=!0)},r.parseExpressionStatement=function(t,r){return("Identifier"===r.type?this.tsParseExpressionStatement(t,r):void 0)||e.prototype.parseExpressionStatement.call(this,t,r)},r.shouldParseExportDeclaration=function(){return!!this.tsIsDeclarationStart()||e.prototype.shouldParseExportDeclaration.call(this)},r.parseConditional=function(t,r,n,i,s){if(!s||!this.match(l.question))return e.prototype.parseConditional.call(this,t,r,n,i,s);var o=this.state.clone();try{return e.prototype.parseConditional.call(this,t,r,n,i)}catch(e){if(!(e instanceof SyntaxError))throw e;return this.state=o,s.start=e.pos||this.state.start,t}},r.parseParenItem=function(t,r,n){if(t=e.prototype.parseParenItem.call(this,t,r,n),this.eat(l.question)&&(t.optional=!0),this.match(l.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return t},r.parseExportDeclaration=function(t){var r,n=this.eatContextual("declare");return this.match(l.name)&&(r=this.tsTryParseExportDeclaration()),r||(r=e.prototype.parseExportDeclaration.call(this,t)),r&&n&&(r.declare=!0),r},r.parseClassId=function(t,r,n){if(r&&!n||!this.isContextual("implements")){e.prototype.parseClassId.apply(this,arguments);var i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i)}},r.parseClassProperty=function(t){!t.optional&&this.eat(l.bang)&&(t.definite=!0);var r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r),e.prototype.parseClassProperty.call(this,t)},r.pushClassMethod=function(t,r,n,i,s){var o=this.tsTryParseTypeParameters();o&&(r.typeParameters=o),e.prototype.pushClassMethod.call(this,t,r,n,i,s)},r.pushClassPrivateMethod=function(t,r,n,i){var s=this.tsTryParseTypeParameters();s&&(r.typeParameters=s),e.prototype.pushClassPrivateMethod.call(this,t,r,n,i)},r.parseClassSuper=function(t){e.prototype.parseClassSuper.call(this,t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause())},r.parseObjPropValue=function(t){var r;if(this.isRelational("<"))throw new Error("TODO");for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s=0||(i[r]=e[r]);return i}(t,["placeholderWhitelist","placeholderPattern","preserveComments"]);if(null!=r&&!(r instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(null!=n&&!(n instanceof RegExp)&&!1!==n)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(null!=i&&"boolean"!=typeof i)throw new Error("'.preserveComments' must be a boolean, null, or undefined");return{parser:s,placeholderWhitelist:r||void 0,placeholderPattern:null==n?void 0:n,preserveComments:null!=i&&i}},t.normalizeReplacements=function(e){if(Array.isArray(e))return e.reduce((e,t,r)=>(e["$"+r]=t,e),{});if("object"==typeof e||null==e)return e||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findPackageData=function(e){return{filepath:e,directories:[],pkg:null,isPackage:!1}},t.findRelativeConfig=function(e,t,r){return{pkg:null,config:null,ignore:null}},t.findRootConfig=function(e,t,r){return null},t.loadConfig=function(e,t,r,n){throw new Error(`Cannot load ${e} relative to ${t} in a browser`)},t.resolvePlugin=function(e,t){return null},t.resolvePreset=function(e,t){return null},t.loadPlugin=function(e,t){throw new Error(`Cannot load plugin ${e} relative to ${t} in a browser`)},t.loadPreset=function(e,t){throw new Error(`Cannot load preset ${e} relative to ${t} in a browser`)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(e,t,r){this.key=e.name||r,this.manipulateOptions=e.manipulateOptions,this.post=e.post,this.pre=e.pre,this.visitor=e.visitor||{},this.parserOverride=e.parserOverride,this.generatorOverride=e.generatorOverride,this.options=t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,t){return c({type:"root",source:e},t)};s(r(75));var n=s(r(361)),i=r(140);function s(e){return e&&e.__esModule?e:{default:e}}const o={cwd:i.assertString,root:i.assertString,configFile:i.assertConfigFileSearch,caller:i.assertCallerMetadata,filename:i.assertString,filenameRelative:i.assertString,code:i.assertBoolean,ast:i.assertBoolean,envName:i.assertString},a={babelrc:i.assertBoolean,babelrcRoots:i.assertBabelrcSearch},u={extends:i.assertString,ignore:i.assertIgnoreList,only:i.assertIgnoreList},l={inputSourceMap:i.assertInputSourceMap,presets:i.assertPluginList,plugins:i.assertPluginList,passPerPreset:i.assertBoolean,env:function(e,t){if("env"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside of another .env block`);const r=e.parent,n=(0,i.assertObject)(e,t);if(n)for(const t of Object.keys(n)){const s=(0,i.assertObject)((0,i.access)(e,t),n[t]);if(!s)continue;const o={type:"env",name:t,parent:r};c(o,s)}return n},overrides:function(e,t){if("env"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside an .env block`);if("overrides"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside an .overrides block`);const r=e.parent,n=(0,i.assertArray)(e,t);if(n)for(const[t,s]of n.entries()){const n=(0,i.access)(e,t),o=(0,i.assertObject)(n,s);if(!o)throw new Error(`${(0,i.msg)(n)} must be an object`);const a={type:"overrides",index:t,parent:r};c(a,o)}return n},test:i.assertConfigApplicableTest,include:i.assertConfigApplicableTest,exclude:i.assertConfigApplicableTest,retainLines:i.assertBoolean,comments:i.assertBoolean,shouldPrintComment:i.assertFunction,compact:i.assertCompact,minified:i.assertBoolean,auxiliaryCommentBefore:i.assertString,auxiliaryCommentAfter:i.assertString,sourceType:i.assertSourceType,wrapPluginVisitorMethod:i.assertFunction,highlightCode:i.assertBoolean,sourceMaps:i.assertSourceMaps,sourceMap:i.assertSourceMaps,sourceFileName:i.assertString,sourceRoot:i.assertString,getModuleId:i.assertFunction,moduleRoot:i.assertString,moduleIds:i.assertBoolean,moduleId:i.assertString,parserOpts:i.assertObject,generatorOpts:i.assertObject};function c(e,t){const r=function e(t){return"root"===t.type?t.source:e(t.parent)}(e);return function(e){if(f(e,"sourceMap")&&f(e,"sourceMaps"))throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both")}(t),Object.keys(t).forEach(n=>{const s={type:"option",name:n,parent:e};if("preset"===r&&u[n])throw new Error(`${(0,i.msg)(s)} is not allowed in preset options`);if("arguments"!==r&&o[n])throw new Error(`${(0,i.msg)(s)} is only allowed in root programmatic options`);if("arguments"!==r&&"configfile"!==r&&a[n]){if("babelrcfile"===r||"extendsfile"===r)throw new Error(`${(0,i.msg)(s)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, `+"or babel.config.js/config file options");throw new Error(`${(0,i.msg)(s)} is only allowed in root programmatic options, or babel.config.js/config file options`)}(l[n]||u[n]||a[n]||o[n]||p)(s,t[n])}),t}function p(e){const t=e.name;if(n.default[t]){const{message:r,version:s=5}=n.default[t];throw new ReferenceError(`Using removed Babel ${s} option: ${(0,i.msg)(e)} - ${r}`)}{const t=`Unknown option: ${(0,i.msg)(e)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`;throw new ReferenceError(t)}}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,r){var n=r(3),i=r(23),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.declare=function(e){return(t,r,i)=>(t.assertVersion||(t=Object.assign(function(e){let t=null;"string"==typeof e.version&&/^7\./.test(e.version)&&(!(t=Object.getPrototypeOf(e))||n(t,"version")&&n(t,"transform")&&n(t,"template")&&n(t,"types")||(t=null));return Object.assign({},t,e)}(t),{assertVersion(e){!function(e,t){if("number"==typeof e){if(!Number.isInteger(e))throw new Error("Expected string or integer value.");e=`^${e}.0.0-0`}if("string"!=typeof e)throw new Error("Expected string or integer value.");const r=Error.stackTraceLimit;"number"==typeof r&&r<25&&(Error.stackTraceLimit=25);let n;n="7."===t.slice(0,2)?new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+"You'll need to update your @babel/core version."):new Error(`Requires Babel "${e}", but was loaded with "${t}". `+'If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn\'t mention "@babel/core" or "babel-core" to see what is calling Babel.');"number"==typeof r&&(Error.stackTraceLimit=r);throw Object.assign(n,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}(e,t.version)}})),e(t,r||{},i))}},function(e,t,r){"use strict";function n(){const e=u(r(80));return n=function(){return e},e}function i(){const e=u(r(7));return i=function(){return e},e}function s(){const e=r(39);return s=function(){return e},e}function o(){const e=u(r(0));return o=function(){return e},e}function a(){const e=function(e){return e&&e.__esModule?e:{default:e}}(r(135));return a=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const l={enter(e,t){const r=e.node.loc;r&&(t.loc=r,e.stop())}};t.default=class{constructor(e,{code:t,ast:r,inputMap:n}){this._map=new Map,this.declarations={},this.path=null,this.ast={},this.metadata={},this.code="",this.inputMap=null,this.hub={file:this,getCode:()=>this.code,getScope:()=>this.scope,addHelper:this.addHelper.bind(this),buildError:this.buildCodeFrameError.bind(this)},this.opts=e,this.code=t,this.ast=r,this.inputMap=n,this.path=i().NodePath.get({hub:this.hub,parentPath:null,parent:this.ast,container:this.ast,key:"program"}).setContext(),this.scope=this.path.scope}get shebang(){const{interpreter:e}=this.path.node;return e?e.value:""}set shebang(e){e?this.path.get("interpreter").replaceWith(o().interpreterDirective(e)):this.path.get("interpreter").remove()}set(e,t){if("helpersNamespace"===e)throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.");this._map.set(e,t)}get(e){return this._map.get(e)}has(e){return this._map.has(e)}getModuleName(){const{filename:e,filenameRelative:t=e,moduleId:r,moduleIds:n=!!r,getModuleId:i,sourceRoot:s,moduleRoot:o=s,sourceRoot:a=o}=this.opts;if(!n)return null;if(null!=r&&!i)return r;let u=null!=o?o+"/":"";if(t){const e=null!=a?new RegExp("^"+a+"/?"):"";u+=t.replace(e,"").replace(/\.(\w*?)$/,"")}return u=u.replace(/\\/g,"/"),i&&i(u)||u}addImport(){throw new Error("This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.")}availableHelper(e,t){let r;try{r=n().minVersion(e)}catch(e){if("BABEL_HELPER_UNKNOWN"!==e.code)throw e;return!1}return"string"!=typeof t||!a().default.intersects(`<${r}`,t)&&!a().default.intersects(">=8.0.0",t)}addHelper(e){const t=this.declarations[e];if(t)return o().cloneNode(t);const r=this.get("helperGenerator");if(r){const t=r(e);if(t)return t}const i=this.declarations[e]=this.scope.generateUidIdentifier(e),s={};for(const t of n().getDependencies(e))s[t]=this.addHelper(t);const{nodes:a,globals:u}=n().get(e,e=>s[e],i,Object.keys(this.scope.getAllBindings()));return u.forEach(e=>{this.path.scope.hasBinding(e,!0)&&this.path.scope.rename(e)}),a.forEach(e=>{e._compact=!0}),this.path.unshiftContainer("body",a),this.path.get("body").forEach(e=>{-1!==a.indexOf(e.node)&&e.isVariableDeclaration()&&this.scope.registerDeclaration(e)}),i}addTemplateObject(){throw new Error("This function has been moved into the template literal transform itself.")}buildCodeFrameError(e,t,r=SyntaxError){let n=e&&(e.loc||e._loc);if(t=`${this.opts.filename}: ${t}`,!n&&e){const r={loc:null};(0,i().default)(e,l,this.scope,r);let s="This is an error on an internal node. Probably an internal error.";(n=r.loc)&&(s+=" Location has been estimated."),t+=` (${s})`}if(n){const{highlightCode:e=!0}=this.opts;t+="\n"+(0,s().codeFrameColumns)(this.code,{start:{line:n.start.line,column:n.start.column+1}},{highlightCode:e})}return new r(t)}}},function(e,t,r){"use strict";function n(){const e=o(r(7));return n=function(){return e},e}function i(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.get=c,t.minVersion=function(e){return l(e).minVersion()},t.getDependencies=function(e){return Array.from(l(e).dependencies.values())},t.default=t.list=void 0;var s=o(r(356));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){const t=[];for(;e.parentPath;e=e.parentPath)t.push(e.key),e.inList&&t.push(e.listKey);return t.reverse().join(".")}const u=Object.create(null);function l(e){if(!u[e]){const t=s.default[e];if(!t)throw Object.assign(new ReferenceError(`Unknown helper ${e}`),{code:"BABEL_HELPER_UNKNOWN",helper:e});const r=()=>i().file(t.ast()),o=function(e){const t=new Set,r=new Set,i=new Map;let o,u;const l=[],c=[],p=[];if((0,n().default)(e,{ImportDeclaration(e){const t=e.node.source.value;if(!s.default[t])throw e.buildCodeFrameError(`Unknown helper ${t}`);if(1!==e.get("specifiers").length||!e.get("specifiers.0").isImportDefaultSpecifier())throw e.buildCodeFrameError("Helpers can only import a default value");const r=e.node.specifiers[0].local;i.set(r,t),c.push(a(e))},ExportDefaultDeclaration(e){const t=e.get("declaration");if(t.isFunctionDeclaration()){if(!t.node.id)throw t.buildCodeFrameError("Helpers should give names to their exported func declaration");o=t.node.id.name}u=a(e)},ExportAllDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},ExportNamedDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},Statement(e){e.isModuleDeclaration()||e.skip()}}),(0,n().default)(e,{Program(e){const t=e.scope.getAllBindings();Object.keys(t).forEach(e=>{e!==o&&(i.has(t[e].identifier)||r.add(e))})},ReferencedIdentifier(e){const r=e.node.name,n=e.scope.getBinding(r,!0);n?i.has(n.identifier)&&p.push(a(e)):t.add(r)},AssignmentExpression(e){const t=e.get("left");if(!(o in t.getBindingIdentifiers()))return;if(!t.isIdentifier())throw t.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");const r=e.scope.getBinding(o);r&&r.scope.path.isProgram()&&l.push(a(e))}}),!u)throw new Error("Helpers must default-export something.");return l.reverse(),{globals:Array.from(t),localBindingNames:Array.from(r),dependencies:i,exportBindingAssignments:l,exportPath:u,exportName:o,importBindingsReferences:p,importPaths:c}}(r());u[e]={build(e,t,s){const a=r();return function(e,t,r,s,o){if(s&&!r)throw new Error("Unexpected local bindings for module-based helpers.");if(!r)return;const{localBindingNames:a,dependencies:u,exportBindingAssignments:l,exportPath:c,exportName:p,importBindingsReferences:f,importPaths:h}=t,d={};u.forEach((e,t)=>{d[t.name]="function"==typeof o&&o(e)||t});const y={},m=new Set(s||[]);a.forEach(e=>{let t=e;for(;m.has(t);)t="_"+t;t!==e&&(y[e]=t)}),"Identifier"===r.type&&p!==r.name&&(y[p]=r.name),(0,n().default)(e,{Program(e){const t=e.get(c),n=h.map(t=>e.get(t)),s=f.map(t=>e.get(t)),o=t.get("declaration");if("Identifier"===r.type)o.isFunctionDeclaration()?t.replaceWith(o):t.replaceWith(i().variableDeclaration("var",[i().variableDeclarator(r,o.node)]));else{if("MemberExpression"!==r.type)throw new Error("Unexpected helper format.");o.isFunctionDeclaration()?(l.forEach(t=>{const n=e.get(t);n.replaceWith(i().assignmentExpression("=",r,n.node))}),t.replaceWith(o),e.pushContainer("body",i().expressionStatement(i().assignmentExpression("=",r,i().identifier(p))))):t.replaceWith(i().expressionStatement(i().assignmentExpression("=",r,o.node)))}Object.keys(y).forEach(t=>{e.scope.rename(t,y[t])});for(const e of n)e.remove();for(const e of s){const t=i().cloneNode(d[e.node.name]);e.replaceWith(t)}e.stop()}})}(a,o,t,s,e),{nodes:a.program.body,globals:o.globals}},minVersion:()=>t.minVersion,dependencies:o.dependencies}}return u[e]}function c(e,t,r,n){return l(e).build(t,r,n)}const p=Object.keys(s.default).map(e=>e.replace(/^_/,"")).filter(e=>"__esModule"!==e);t.list=p;var f=c;t.default=f},function(e,t,r){"use strict";function n(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.ForAwaitStatement=t.NumericLiteralTypeAnnotation=t.ExistentialTypeParam=t.SpreadProperty=t.RestProperty=t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;const i={types:["Identifier","JSXIdentifier"],checkPath({node:e,parent:t},r){if(!n().isIdentifier(e,r)&&!n().isJSXMemberExpression(t,r)){if(!n().isJSXIdentifier(e,r))return!1;if(n().react.isCompatTag(e.name))return!1}return n().isReferenced(e,t)}};t.ReferencedIdentifier=i;const s={types:["MemberExpression"],checkPath:({node:e,parent:t})=>n().isMemberExpression(e)&&n().isReferenced(e,t)};t.ReferencedMemberExpression=s;const o={types:["Identifier"],checkPath:({node:e,parent:t})=>n().isIdentifier(e)&&n().isBinding(e,t)};t.BindingIdentifier=o;const a={types:["Statement"],checkPath({node:e,parent:t}){if(n().isStatement(e)){if(n().isVariableDeclaration(e)){if(n().isForXStatement(t,{left:e}))return!1;if(n().isForStatement(t,{init:e}))return!1}return!0}return!1}};t.Statement=a;const u={types:["Expression"],checkPath:e=>e.isIdentifier()?e.isReferencedIdentifier():n().isExpression(e.node)};t.Expression=u;const l={types:["Scopable"],checkPath:e=>n().isScope(e.node,e.parent)};t.Scope=l;const c={checkPath:e=>n().isReferenced(e.node,e.parent)};t.Referenced=c;const p={checkPath:e=>n().isBlockScoped(e.node)};t.BlockScoped=p;const f={types:["VariableDeclaration"],checkPath:e=>n().isVar(e.node)};t.Var=f;const h={checkPath:e=>e.node&&!!e.node.loc};t.User=h;const d={checkPath:e=>!e.isUser()};t.Generated=d;const y={checkPath:(e,t)=>e.scope.isPure(e.node,t)};t.Pure=y;const m={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:({node:e})=>!!n().isFlow(e)||(n().isImportDeclaration(e)?"type"===e.importKind||"typeof"===e.importKind:n().isExportDeclaration(e)?"type"===e.exportKind:!!n().isImportSpecifier(e)&&("type"===e.importKind||"typeof"===e.importKind))};t.Flow=m;const g={types:["RestElement"],checkPath:e=>e.parentPath&&e.parentPath.isObjectPattern()};t.RestProperty=g;const v={types:["RestElement"],checkPath:e=>e.parentPath&&e.parentPath.isObjectExpression()};t.SpreadProperty=v;t.ExistentialTypeParam={types:["ExistsTypeAnnotation"]};t.NumericLiteralTypeAnnotation={types:["NumberLiteralTypeAnnotation"]};const b={types:["ForOfStatement"],checkPath:({node:e})=>!0===e.await};t.ForAwaitStatement=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=e.split(".");return e=>(0,n.default)(e,r,t)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(83))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(!(0,n.isMemberExpression)(e))return!1;const i=Array.isArray(t)?t:t.split("."),s=[];let o;for(o=e;(0,n.isMemberExpression)(o);o=o.object)s.push(o.property);if(s.push(o),s.lengthi.length)return!1;for(let e=0,t=s.length-1;e=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(s=new Array(128),o=0;o<128;++o)s[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&n.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:r.NonAsciiIdentifierStart.test(a(e))},isIdentifierPartES5:function(e){return e<128?s[e]:r.NonAsciiIdentifierPart.test(a(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(a(e))},isIdentifierPartES6:function(e){return e<128?s[e]:t.NonAsciiIdentifierPart.test(a(e))}}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(!e)return;const i=n.NODE_FIELDS[e.type];if(!i)return;const s=i[t];if(!s||!s.validate)return;if(s.optional&&null==r)return;s.validate(e,t,r)};var n=r(6)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!(!e||!n.VISITOR_KEYS[e.type])};var n=r(6)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){const r={};const i={};const s=[];const o=[];for(let a=0;a=0)){if((0,n.isAnyTypeAnnotation)(u))return[u];if((0,n.isFlowBaseAnnotation)(u))i[u.type]=u;else if((0,n.isUnionTypeAnnotation)(u))s.indexOf(u.types)<0&&(t=t.concat(u.types),s.push(u.types));else if((0,n.isGenericTypeAnnotation)(u)){const t=u.id.name;if(r[t]){let n=r[t];n.typeParameters?u.typeParameters&&(n.typeParameters.params=e(n.typeParameters.params.concat(u.typeParameters.params))):n=u.typeParameters}else r[t]=u}else o.push(u)}}for(const e in i)o.push(i[e]);for(const e in r)o.push(r[e]);return o};var n=r(1)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e,!1)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(22))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(!r||!e)return e;const n=`${t}Comments`;e[n]?e[n]="leading"===t?r.concat(e[n]):e[n].concat(r):e[n]=r;return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)("innerComments",e,t)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(62))},function(e,t,r){var n=r(47),i=r(239),s=r(240);function o(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++te.isScope());return e&&e.scope}get parentBlock(){return this.path.parent}get hub(){return this.path.hub}traverse(e,t,r){(0,o.default)(e,t,this,r,this.path)}generateDeclaredUidIdentifier(e){const t=this.generateUidIdentifier(e);return this.push({id:t}),c().cloneNode(t)}generateUidIdentifier(e){return c().identifier(this.generateUid(e))}generateUid(e="temp"){let t;e=c().toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");let r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));const n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t}_generateUid(e,t){let r=e;return t>1&&(r+=t),`_${r}`}generateUidBasedOnNode(e,t){let r=e;c().isAssignmentExpression(e)?r=e.left:c().isVariableDeclarator(e)?r=e.id:(c().isObjectProperty(r)||c().isObjectMethod(r))&&(r=r.key);const n=[];!function e(t,r){if(c().isModuleDeclaration(t))if(t.source)e(t.source,r);else if(t.specifiers&&t.specifiers.length)for(const n of t.specifiers)e(n,r);else t.declaration&&e(t.declaration,r);else if(c().isModuleSpecifier(t))e(t.local,r);else if(c().isMemberExpression(t))e(t.object,r),e(t.property,r);else if(c().isIdentifier(t))r.push(t.name);else if(c().isLiteral(t))r.push(t.value);else if(c().isCallExpression(t))e(t.callee,r);else if(c().isObjectExpression(t)||c().isObjectPattern(t))for(const n of t.properties)e(n.key||n.argument,r);else c().isPrivateName(t)?e(t.id,r):c().isThisExpression(t)?r.push("this"):c().isSuper(t)&&r.push("super")}(r,n);let i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUid(i.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return c().identifier(this.generateUidBasedOnNode(e,t))}isStatic(e){if(c().isThisExpression(e)||c().isSuper(e))return!0;if(c().isIdentifier(e)){const t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1}maybeGenerateMemoised(e,t){if(this.isStatic(e))return null;{const r=this.generateUidIdentifierBasedOnNode(e);return t?r:(this.push({id:r}),c().cloneNode(r))}}checkBlockScopedCollisions(e,t,r,n){if("param"===t)return;if("local"===e.kind)return;if("hoisted"===t&&"let"===e.kind)return;if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.buildError(n,`Duplicate declaration "${r}"`,TypeError)}rename(e,t,r){const n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new s.default(n,e,t).rename(r)}_renameFromMap(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)}dump(){const e=(0,i().default)("-",60);console.log(e);let t=this;do{console.log("#",t.block.type);for(const e in t.bindings){const r=t.bindings[e];console.log(" -",e,{constant:r.constant,references:r.references,violations:r.constantViolations.length,kind:r.kind})}}while(t=t.parent);console.log(e)}toArray(e,t){if(c().isIdentifier(e)){const t=this.getBinding(e.name);if(t&&t.constant&&t.path.isGenericType("Array"))return e}if(c().isArrayExpression(e))return e;if(c().isIdentifier(e,{name:"arguments"}))return c().callExpression(c().memberExpression(c().memberExpression(c().memberExpression(c().identifier("Array"),c().identifier("prototype")),c().identifier("slice")),c().identifier("call")),[e]);let r;const n=[e];return!0===t?r="toConsumableArray":t?(n.push(c().numericLiteral(t)),r="slicedToArray"):r="toArray",c().callExpression(this.hub.addHelper(r),n)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration()){const t=e.get("declarations");for(const r of t)this.registerBinding(e.node.kind,r)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration()){const t=e.get("specifiers");for(const e of t)this.registerBinding("module",e)}else if(e.isExportDeclaration()){const t=e.get("declaration");(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration())&&this.registerDeclaration(t)}else this.registerBinding("unknown",e)}buildUndefinedNode(){return this.hasBinding("undefined")?c().unaryExpression("void",c().numericLiteral(0),!0):c().identifier("undefined")}registerConstantViolation(e){const t=e.getBindingIdentifiers();for(const r in t){const t=this.getBinding(r);t&&t.reassign(e)}}registerBinding(e,t,r=t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){const r=t.get("declarations");for(const t of r)this.registerBinding(e,t);return}const n=this.getProgramParent(),i=t.getBindingIdentifiers(!0);for(const t in i)for(const s of i[t]){const i=this.getOwnBinding(t);if(i){if(i.identifier===s)continue;this.checkBlockScopedCollisions(i,e,t,s)}n.references[t]=!0,i?this.registerConstantViolation(r):this.bindings[t]=new u.default({identifier:s,scope:this,path:r,kind:e})}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1}hasGlobal(e){let t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1}hasReference(e){let t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1}isPure(e,t){if(c().isIdentifier(e)){const r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(c().isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(c().isClassBody(e)){for(const r of e.body)if(!this.isPure(r,t))return!1;return!0}if(c().isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(c().isArrayExpression(e)){for(const r of e.elements)if(!this.isPure(r,t))return!1;return!0}if(c().isObjectExpression(e)){for(const r of e.properties)if(!this.isPure(r,t))return!1;return!0}if(c().isClassMethod(e))return!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind);if(c().isProperty(e))return!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t);if(c().isUnaryExpression(e))return this.isPure(e.argument,t);if(c().isTaggedTemplateExpression(e))return c().matchesPattern(e.tag,"String.raw")&&!this.hasBinding("String",!0)&&this.isPure(e.quasi,t);if(c().isTemplateLiteral(e)){for(const r of e.expressions)if(!this.isPure(r,t))return!1;return!0}return c().isPureish(e)}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{const r=t.data[e];if(null!=r)return r}while(t=t.parent)}removeData(e){let t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)}init(){this.references||this.crawl()}crawl(){const e=this.path;if(this.references=Object.create(null),this.bindings=Object.create(null),this.globals=Object.create(null),this.uids=Object.create(null),this.data=Object.create(null),e.isLoop())for(const t of c().FOR_INIT_KEYS){const r=e.get(t);r.isBlockScoped()&&this.registerBinding(r.node.kind,r)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[c().NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[c().NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction()){const t=e.get("params");for(const e of t)this.registerBinding("param",e)}if(e.isCatchClause()&&this.registerBinding("let",e),this.getProgramParent().crawling)return;const t={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(h,t),this.crawling=!1;for(const e of t.assignments){const t=e.getBindingIdentifiers();let r;for(const n in t)e.scope.getBinding(n)||(r=r||e.scope.getProgramParent()).addGlobal(t[n]);e.scope.registerConstantViolation(e)}for(const e of t.references){const t=e.scope.getBinding(e.node.name);t?t.reference(e):e.scope.getProgramParent().addGlobal(e.node)}for(const e of t.constantViolations)e.scope.registerConstantViolation(e)}push(e){let t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=(this.getFunctionParent()||this.getProgramParent()).path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(t.ensureBlock(),t=t.get("body"));const r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s=`declaration:${n}:${i}`;let o=!r&&t.getData(s);if(!o){const e=c().variableDeclaration(n,[]);e._blockHoist=i,[o]=t.unshiftContainer("body",[e]),r||t.setData(s,o)}const a=c().variableDeclarator(e.id,e.init);o.node.declarations.push(a),this.registerBinding(n,o.get("declarations").pop())}getProgramParent(){let e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);return null}getBlockParent(){let e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){const e=Object.create(null);let t=this;do{(0,a().default)(e,t.bindings),t=t.parent}while(t);return e}getAllBindingsOfKind(){const e=Object.create(null);for(const t of arguments){let r=this;do{for(const n in r.bindings){const i=r.bindings[n];i.kind===t&&(e[n]=i)}r=r.parent}while(r)}return e}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this;do{const r=t.getOwnBinding(e);if(r)return r}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){const t=this.getBinding(e);return t&&t.identifier}getOwnBindingIdentifier(e){const t=this.bindings[e];return t&&t.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){return!!e&&(!!this.hasOwnBinding(e)||(!!this.parentHasBinding(e,t)||(!!this.hasUid(e)||(!(t||!(0,n().default)(y.globals,e))||!(t||!(0,n().default)(y.contextVariables,e))))))}parentHasBinding(e,t){return this.parent&&this.parent.hasBinding(e,t)}moveBindingTo(e,t){const r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){const t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);let r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)}}t.default=y,y.globals=Object.keys(l().default.builtin),y.contextVariables=["arguments","undefined","Infinity","NaN"]},function(e,t,r){var n=r(283),i=r(68),s=r(66),o=r(69);e.exports=function(e,t,r){return t=(r?i(e,t,r):void 0===t)?1:s(t),n(o(e),t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor({identifier:e,scope:t,path:r,kind:n}){this.identifier=e,this.scope=t,this.path=r,this.kind=n,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)}reference(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))}dereference(){this.references--,this.referenced=!!this.references}}},function(e,t,r){var n=r(37),i=r(288),s=r(290);e.exports=function(e,t){return s(i(e,t,n),e+"")}},function(e,t,r){t.SourceMapGenerator=r(126).SourceMapGenerator,t.SourceMapConsumer=r(299).SourceMapConsumer,t.SourceNode=r(302).SourceNode},function(e,t,r){var n=r(127),i=r(24),s=r(128).ArraySet,o=r(298).MappingList;function a(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new o,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,r=new a({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=i.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},a.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),r=i.getArg(e,"original",null),n=i.getArg(e,"source",null),s=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,s),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=s&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:s})},a.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var o=this._sourceRoot;null!=o&&(n=i.relative(o,n));var a=new s,u=new s;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=r&&(t.source=i.join(r,t.source)),null!=o&&(t.source=i.relative(o,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var l=t.source;null==l||a.has(l)||a.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=i.join(r,t)),null!=o&&(t=i.relative(o,t)),this.setSourceContent(t,n))},this)},a.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},a.prototype._serializeMappings=function(){for(var e,t,r,s,o=0,a=1,u=0,l=0,c=0,p=0,f="",h=this._mappings.toArray(),d=0,y=h.length;d0){if(!i.compareByGeneratedPositionsInflated(t,h[d-1]))continue;e+=","}e+=n.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(s=this._sources.indexOf(t.source),e+=n.encode(s-p),p=s,e+=n.encode(t.originalLine-1-l),l=t.originalLine-1,e+=n.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=n.encode(r-c),c=r)),f+=e}return f},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=a},function(e,t,r){var n=r(297);t.encode=function(e){var t,r="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),r+=n.encode(t)}while(i>0);return r},t.decode=function(e,t,r){var i,s,o=e.length,a=0,u=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),a+=(s&=31)<>1;return 1==(1&e)?-t:t}(a),r.rest=t}},function(e,t,r){var n=r(24),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;function o(){this._array=[],this._set=s?new Map:Object.create(null)}o.fromArray=function(e,t){for(var r=new o,n=0,i=e.length;n=0)return t}else{var r=n.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e + * @license MIT + */ +var n=r(316),i=r(317),s=r(318);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(n)return U(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var s,o=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=r;sa&&(r=a-u),s=r;s>=0;s--){for(var p=!0,f=0;fi&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:l>223?3:l>191?2:1;if(i+p<=r)switch(p){case 1:l<128&&(c=l);break;case 2:128==(192&(s=e[i+1]))&&(u=(31&l)<<6|63&s)>127&&(c=u);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(u=(15&l)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,p=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=p}return function(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return w(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,o=r-t,a=Math.min(s,o),l=this.slice(n,i),c=e.slice(t,r),p=0;pi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function w(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function B(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,s){return s||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,s){return s||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||F(e,t,this.length);for(var n=this[e],i=1,s=0;++s=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||F(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||k(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);k(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);k(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function V(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(27))},function(e,t,r){var n=r(334),i={};for(var s in n)n.hasOwnProperty(s)&&(i[n[s]]=s);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in o)if(o.hasOwnProperty(a)){if(!("channels"in o[a]))throw new Error("missing channels property: "+a);if(!("labels"in o[a]))throw new Error("missing channel labels property: "+a);if(o[a].labels.length!==o[a].channels)throw new Error("channel and label counts mismatch: "+a);var u=o[a].channels,l=o[a].labels;delete o[a].channels,delete o[a].labels,Object.defineProperty(o[a],"channels",{value:u}),Object.defineProperty(o[a],"labels",{value:l})}function c(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}o.rgb.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,s=e[2]/255,o=Math.min(n,i,s),a=Math.max(n,i,s),u=a-o;return a===o?t=0:n===a?t=(i-s)/u:i===a?t=2+(s-n)/u:s===a&&(t=4+(n-i)/u),(t=Math.min(60*t,360))<0&&(t+=360),r=(o+a)/2,[t,100*(a===o?0:r<=.5?u/(a+o):u/(2-a-o)),100*r]},o.rgb.hsv=function(e){var t,r,n,i,s,o=e[0]/255,a=e[1]/255,u=e[2]/255,l=Math.max(o,a,u),c=l-Math.min(o,a,u),p=function(e){return(l-e)/6/c+.5};return 0===c?i=s=0:(s=c/l,t=p(o),r=p(a),n=p(u),o===l?i=n-r:a===l?i=1/3+t-n:u===l&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*s,100*l]},o.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[o.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(r,n))),100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},o.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-i)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var t=i[e];if(t)return t;var r,s=1/0;for(var o in n)if(n.hasOwnProperty(o)){var a=c(e,n[o]);a.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),r=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},o.hsl.rgb=function(e){var t,r,n,i,s,o=e[0]/360,a=e[1]/100,u=e[2]/100;if(0===a)return[s=255*u,s,s];t=2*u-(r=u<.5?u*(1+a):u+a-u*a),i=[0,0,0];for(var l=0;l<3;l++)(n=o+1/3*-(l-1))<0&&n++,n>1&&n--,s=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[l]=255*s;return i},o.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,i=r,s=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,i*=s<=1?s:2-s,[t,100*(0===n?2*i/(s+i):2*r/(n+r)),100*((n+r)/2)]},o.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,s=t-Math.floor(t),o=255*n*(1-r),a=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,o];case 1:return[a,n,o];case 2:return[o,n,u];case 3:return[o,a,n];case 4:return[u,o,n];case 5:return[n,o,a]}},o.hsv.hsl=function(e){var t,r,n,i=e[0],s=e[1]/100,o=e[2]/100,a=Math.max(o,.01);return n=(2-s)*o,r=s*a,[i,100*(r=(r/=(t=(2-s)*a)<=1?t:2-t)||0),100*(n/=2)]},o.hwb.rgb=function(e){var t,r,n,i,s,o,a,u=e[0]/360,l=e[1]/100,c=e[2]/100,p=l+c;switch(p>1&&(l/=p,c/=p),r=1-c,n=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(n=1-n),i=l+n*(r-l),t){default:case 6:case 0:s=r,o=i,a=l;break;case 1:s=i,o=r,a=l;break;case 2:s=l,o=r,a=i;break;case 3:s=l,o=i,a=r;break;case 4:s=i,o=l,a=r;break;case 5:s=r,o=l,a=i}return[255*s,255*o,255*a]},o.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},o.xyz.rgb=function(e){var t,r,n,i=e[0]/100,s=e[1]/100,o=e[2]/100;return r=-.9689*i+1.8758*s+.0415*o,n=.0557*i+-.204*s+1.057*o,t=(t=3.2406*i+-1.5372*s+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},o.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},o.lab.xyz=function(e){var t,r,n,i=e[0],s=e[1],o=e[2];t=s/500+(r=(i+16)/116),n=r-o/200;var a=Math.pow(r,3),u=Math.pow(t,3),l=Math.pow(n,3);return r=a>.008856?a:(r-16/116)/7.787,t=u>.008856?u:(t-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},o.lab.lch=function(e){var t,r=e[0],n=e[1],i=e[2];return(t=360*Math.atan2(i,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+i*i),t]},o.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],i=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===i&&(s+=60),s},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map(function(e){return e+e}).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},o.rgb.hcg=function(e){var t,r,n=e[0]/255,i=e[1]/255,s=e[2]/255,o=Math.max(Math.max(n,i),s),a=Math.min(Math.min(n,i),s),u=o-a;return t=u<1?a/(1-u):0,r=u<=0?0:o===n?(i-s)/u%6:o===i?2+(s-n)/u:4+(n-i)/u+4,r/=6,[360*(r%=1),100*u,100*t]},o.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,i=0;return(n=r<.5?2*t*r:2*t*(1-r))<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},o.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},o.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var i,s=[0,0,0],o=t%1*6,a=o%1,u=1-a;switch(Math.floor(o)){case 0:s[0]=1,s[1]=a,s[2]=0;break;case 1:s[0]=u,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=a;break;case 3:s[0]=0,s[1]=u,s[2]=1;break;case 4:s[0]=a,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=u}return i=(1-r)*n,[255*(r*s[0]+i),255*(r*s[1]+i),255*(r*s[2]+i)]},o.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},o.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},o.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},o.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,r){"use strict";function n(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return n=function(){return e},e}function i(){const e=r(72);return i=function(){return e},e}function s(){const e=r(39);return s=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const u=function(e,t){t=Object.assign({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,sourceType:"module"},t);try{return(0,i().parse)(e,t)}catch(t){const r=t.loc;throw r&&(t.message+="\n"+(0,s().codeFrameColumns)(e,{start:r}),t.code="BABEL_TEMPLATE_PARSE_ERROR"),t}}(t,r.parser),{placeholderWhitelist:l,placeholderPattern:c=o,preserveComments:p}=r;n().removePropertiesDeep(u,{preserveComments:p}),e.validate(u);const f=[],h=new Set;return n().traverse(u,a,{placeholders:f,placeholderNames:h,placeholderWhitelist:l,placeholderPattern:c}),{ast:u,placeholders:f,placeholderNames:h}};const o=/^[_$A-Z0-9]+$/;function a(e,t,r){let i;if(n().isIdentifier(e)||n().isJSXIdentifier(e))i=e.name;else{if(!n().isStringLiteral(e))return;i=e.value}if(!(r.placeholderPattern&&r.placeholderPattern.test(i)||r.placeholderWhitelist&&r.placeholderWhitelist.has(i)))return;t=t.slice();const{node:s,key:o}=t[t.length-1];let a;n().isStringLiteral(e)?a="string":n().isNewExpression(s)&&"arguments"===o||n().isCallExpression(s)&&"arguments"===o||n().isFunction(s)&&"params"===o?a="param":n().isExpressionStatement(s)?(a="statement",t=t.slice(0,-1)):a="other",r.placeholders.push({name:i,type:a,resolve:e=>(function(e,t){let r=e;for(let e=0;e{if(!Object.prototype.hasOwnProperty.call(t,e.name)){const t=e.name;throw new Error(`Error: No substitution given for "${t}". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}\n - { placeholderPattern: /^${t}$/ }`)}}),Object.keys(t).forEach(t=>{if(!e.placeholderNames.has(t))throw new Error(`Unknown substitution "${t}" given`)}));return e.placeholders.slice().reverse().forEach(e=>{try{!function(e,t,r){e.isDuplicate&&(Array.isArray(r)?r=r.map(e=>n().cloneNode(e)):"object"==typeof r&&(r=n().cloneNode(r)));const{parent:i,key:s,index:o}=e.resolve(t);if("string"===e.type){if("string"==typeof r&&(r=n().stringLiteral(r)),!r||!n().isStringLiteral(r))throw new Error("Expected string substitution")}else if("statement"===e.type)void 0===o?r?Array.isArray(r)?r=n().blockStatement(r):"string"==typeof r?r=n().expressionStatement(n().identifier(r)):n().isStatement(r)||(r=n().expressionStatement(r)):r=n().emptyStatement():r&&!Array.isArray(r)&&("string"==typeof r&&(r=n().identifier(r)),n().isStatement(r)||(r=n().expressionStatement(r)));else if("param"===e.type){if("string"==typeof r&&(r=n().identifier(r)),void 0===o)throw new Error("Assertion failure.")}else if("string"==typeof r&&(r=n().identifier(r)),Array.isArray(r))throw new Error("Cannot replace single expression with an array.");if(void 0===o)n().validate(i,s,r),i[s]=r;else{const t=i[s].slice();"statement"===e.type||"param"===e.type?null==r?t.splice(o,1):Array.isArray(r)?t.splice(o,1,...r):t[o]=r:t[o]=r,n().validate(i,s,t),i[s]=t}}(e,r,t&&t[e.name]||null)}catch(t){throw t.message=`@babel/template placeholder "${e.name}": ${t.message}`,t}}),r}},function(e,t,r){(function(r){var n;t=e.exports=G,n="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=256,s=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],a=t.src=[],u=0,l=u++;a[l]="0|[1-9]\\d*";var c=u++;a[c]="[0-9]+";var p=u++;a[p]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var f=u++;a[f]="("+a[l]+")\\.("+a[l]+")\\.("+a[l]+")";var h=u++;a[h]="("+a[c]+")\\.("+a[c]+")\\.("+a[c]+")";var d=u++;a[d]="(?:"+a[l]+"|"+a[p]+")";var y=u++;a[y]="(?:"+a[c]+"|"+a[p]+")";var m=u++;a[m]="(?:-("+a[d]+"(?:\\."+a[d]+")*))";var g=u++;a[g]="(?:-?("+a[y]+"(?:\\."+a[y]+")*))";var v=u++;a[v]="[0-9A-Za-z-]+";var b=u++;a[b]="(?:\\+("+a[v]+"(?:\\."+a[v]+")*))";var E=u++,T="v?"+a[f]+a[m]+"?"+a[b]+"?";a[E]="^"+T+"$";var A="[v=\\s]*"+a[h]+a[g]+"?"+a[b]+"?",x=u++;a[x]="^"+A+"$";var S=u++;a[S]="((?:<|>)?=?)";var P=u++;a[P]=a[c]+"|x|X|\\*";var D=u++;a[D]=a[l]+"|x|X|\\*";var w=u++;a[w]="[v=\\s]*("+a[D]+")(?:\\.("+a[D]+")(?:\\.("+a[D]+")(?:"+a[m]+")?"+a[b]+"?)?)?";var C=u++;a[C]="[v=\\s]*("+a[P]+")(?:\\.("+a[P]+")(?:\\.("+a[P]+")(?:"+a[g]+")?"+a[b]+"?)?)?";var O=u++;a[O]="^"+a[S]+"\\s*"+a[w]+"$";var _=u++;a[_]="^"+a[S]+"\\s*"+a[C]+"$";var F=u++;a[F]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var k=u++;a[k]="(?:~>?)";var I=u++;a[I]="(\\s*)"+a[k]+"\\s+",o[I]=new RegExp(a[I],"g");var N=u++;a[N]="^"+a[k]+a[w]+"$";var B=u++;a[B]="^"+a[k]+a[C]+"$";var j=u++;a[j]="(?:\\^)";var M=u++;a[M]="(\\s*)"+a[j]+"\\s+",o[M]=new RegExp(a[M],"g");var L=u++;a[L]="^"+a[j]+a[w]+"$";var R=u++;a[R]="^"+a[j]+a[C]+"$";var U=u++;a[U]="^"+a[S]+"\\s*("+A+")$|^$";var V=u++;a[V]="^"+a[S]+"\\s*("+T+")$|^$";var W=u++;a[W]="(\\s*)"+a[S]+"\\s*("+A+"|"+a[w]+")",o[W]=new RegExp(a[W],"g");var K=u++;a[K]="^\\s*("+a[w]+")\\s+-\\s+("+a[w]+")\\s*$";var q=u++;a[q]="^\\s*("+a[C]+")\\s+-\\s+("+a[C]+")\\s*$";var Y=u++;a[Y]="(<|>)?=?\\s*\\*";for(var $=0;$i)return null;if(!(t?o[x]:o[E]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if(e instanceof G){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof G))return new G(e,t);n("SemVer",e,t),this.loose=t;var r=e.trim().match(t?o[x]:o[E]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new G(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(ee(e,t))return null;var r=J(e),n=J(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=H;var X=/^[0-9]+$/;function H(e,t){var r=X.test(e),n=X.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function z(e,t,r){return new G(e,r).compare(new G(t,r))}function Q(e,t,r){return z(e,t,r)>0}function Z(e,t,r){return z(e,t,r)<0}function ee(e,t,r){return 0===z(e,t,r)}function te(e,t,r){return 0!==z(e,t,r)}function re(e,t,r){return z(e,t,r)>=0}function ne(e,t,r){return z(e,t,r)<=0}function ie(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=ee(e,r,n);break;case"!=":i=te(e,r,n);break;case">":i=Q(e,r,n);break;case">=":i=re(e,r,n);break;case"<":i=Z(e,r,n);break;case"<=":i=ne(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function se(e,t){if(e instanceof se){if(e.loose===t)return e;e=e.value}if(!(this instanceof se))return new se(e,t);n("comparator",e,t),this.loose=t,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return H(t,e)},t.major=function(e,t){return new G(e,t).major},t.minor=function(e,t){return new G(e,t).minor},t.patch=function(e,t){return new G(e,t).patch},t.compare=z,t.compareLoose=function(e,t){return z(e,t,!0)},t.rcompare=function(e,t,r){return z(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=Q,t.lt=Z,t.eq=ee,t.neq=te,t.gte=re,t.lte=ne,t.cmp=ie,t.Comparator=se;var oe={};function ae(e,t){if(e instanceof ae)return e.loose===t?e:new ae(e.raw,t);if(e instanceof se)return new ae(e.value,t);if(!(this instanceof ae))return new ae(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ue(e){return!e||"x"===e.toLowerCase()||"*"===e}function le(e,t,r,n,i,s,o,a,u,l,c,p,f){return((t=ue(r)?"":ue(n)?">="+r+".0.0":ue(i)?">="+r+"."+n+".0":">="+t)+" "+(a=ue(u)?"":ue(l)?"<"+(+u+1)+".0.0":ue(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+a)).trim()}function ce(e,t){for(var r=0;r0){var i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function pe(e,t,r){try{t=new ae(t,r)}catch(e){return!1}return t.test(e)}function fe(e,t,r,n){var i,s,o,a,u;switch(e=new G(e,n),t=new ae(t,n),r){case">":i=Q,s=ne,o=Z,a=">",u=">=";break;case"<":i=Z,s=re,o=Q,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(pe(e,t,n))return!1;for(var l=0;l=0.0.0")),c=c||e,p=p||e,i(e.semver,c.semver,n)?c=e:o(e.semver,p.semver,n)&&(p=e)}),c.operator===a||c.operator===u)return!1;if((!p.operator||p.operator===a)&&s(e,p.semver))return!1;if(p.operator===u&&o(e,p.semver))return!1}return!0}se.prototype.parse=function(e){var t=this.loose?o[U]:o[V],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new G(r[2],this.loose):this.semver=oe},se.prototype.toString=function(){return this.value},se.prototype.test=function(e){return n("Comparator.test",e,this.loose),this.semver===oe||("string"==typeof e&&(e=new G(e,this.loose)),ie(e,this.operator,this.semver,this.loose))},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new ae(e.value,t),pe(this.value,r,t);if(""===e.operator)return r=new ae(this.value,t),pe(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||s&&o||a||u},t.Range=ae,ae.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},ae.prototype.toString=function(){return this.range},ae.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),n("range",e,t);var r=t?o[q]:o[K];e=e.replace(r,le),n("hyphen replace",e),e=e.replace(o[W],"$1$2$3"),n("comparator trim",e,o[W]),e=(e=(e=e.replace(o[I],"$1~")).replace(o[M],"$1^")).split(/\s+/).join(" ");var i=t?o[U]:o[V],s=e.split(" ").map(function(e){return function(e,t){return n("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t?o[R]:o[L];return e.replace(r,function(t,r,i,s,o){var a;return n("caret",e,t,r,i,s,o),ue(r)?a="":ue(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ue(s)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),a="0"===r?"0"===i?">="+r+"."+i+"."+s+o+" <"+r+"."+i+"."+(+s+1):">="+r+"."+i+"."+s+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+s+o+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+s+" <"+r+"."+i+"."+(+s+1):">="+r+"."+i+"."+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+s+" <"+(+r+1)+".0.0"),n("caret return",a),a})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t?o[B]:o[N];return e.replace(r,function(t,r,i,s,o){var a;return n("tilde",e,t,r,i,s,o),ue(r)?a="":ue(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ue(s)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),a=">="+r+"."+i+"."+s+o+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+s+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t?o[_]:o[O];return e.replace(r,function(t,r,i,s,o,a){n("xRange",e,t,r,i,s,o,a);var u=ue(i),l=u||ue(s),c=l||ue(o),p=c;return"="===r&&p&&(r=""),u?t=">"===r||"<"===r?"<0.0.0":"*":r&&p?(l&&(s=0),c&&(o=0),">"===r?(r=">=",l?(i=+i+1,s=0,o=0):c&&(s=+s+1,o=0)):"<="===r&&(r="<",l?i=+i+1:s=+s+1),t=r+i+"."+s+"."+o):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+s+".0 <"+i+"."+(+s+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[Y],"")}(e,t),n("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(s=s.filter(function(e){return!!e.match(i)})),s=s.map(function(e){return new se(e,t)})},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new ae(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},ae.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.loose));for(var t=0;t",r)},t.outside=fe,t.prerelease=function(e,t){var r=J(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new ae(e,r),t=new ae(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(o[F]);return null==t?null:J((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,r(11))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnv=function(t="development"){return e.env.BABEL_ENV||"production"}}).call(this,r(11))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCachedDescriptors=function(e,t,r){const{plugins:n,presets:i,passPerPreset:s}=t;return{options:t,plugins:n?()=>l(n,e)(r):()=>[],presets:i?()=>a(i,e)(r)(!!s):()=>[]}},t.createUncachedDescriptors=function(e,t,r){let n,i;return{options:t,plugins:()=>(n||(n=h(t.plugins||[],e,r)),n),presets:()=>(i||(i=f(t.presets||[],e,r,!!t.passPerPreset)),i)}},t.createDescriptor=y;var n=r(74),i=r(41),s=r(42);const o=new WeakMap,a=(0,s.makeWeakCache)((e,t)=>{const r=t.using(e=>e);return(0,s.makeStrongCache)(t=>(0,s.makeStrongCache)(n=>f(e,r,t,n).map(e=>p(o,e))))}),u=new WeakMap,l=(0,s.makeWeakCache)((e,t)=>{const r=t.using(e=>e);return(0,s.makeStrongCache)(t=>h(e,r,t).map(e=>p(u,e)))}),c={};function p(e,t){const{value:r,options:n=c}=t;if(!1===n)return t;let i=e.get(r);i||(i=new WeakMap,e.set(r,i));let s=i.get(n);if(s||(s=[],i.set(n,s)),-1===s.indexOf(t)){const e=s.filter(e=>(function(e,t){return e.name===t.name&&e.value===t.value&&e.options===t.options&&e.dirname===t.dirname&&e.alias===t.alias&&e.ownPass===t.ownPass&&(e.file&&e.file.request)===(t.file&&t.file.request)&&(e.file&&e.file.resolved)===(t.file&&t.file.resolved)})(e,t));if(e.length>0)return e[0];s.push(t)}return t}function f(e,t,r,n){return d("preset",e,t,r,n)}function h(e,t,r){return d("plugin",e,t,r)}function d(e,t,r,n,i){const s=t.map((t,s)=>y(t,r,{type:e,alias:`${n}$${s}`,ownPass:!!i}));return function(e){const t=new Map;for(const r of e){if("function"!=typeof r.value)continue;let e=t.get(r.value);if(e||(e=new Set,t.set(r.value,e)),e.has(r.name))throw new Error(["Duplicate plugin/preset detected.","If you'd like to use two separate instances of a plugin,","they need separate names, e.g.",""," plugins: ["," ['some-plugin', {}],"," ['some-plugin', {}, 'some unique name'],"," ]"].join("\n"));e.add(r.name)}}(s),s}function y(e,t,{type:r,alias:s,ownPass:o}){const a=(0,i.getItemDescriptor)(e);if(a)return a;let u,l,c=e;Array.isArray(c)&&(3===c.length?[c,l,u]=c:[c,l]=c);let p=void 0,f=null;if("string"==typeof c){if("string"!=typeof r)throw new Error("To resolve a string-based item, the type of item must be given");const e="plugin"===r?n.loadPlugin:n.loadPreset,i=c;({filepath:f,value:c}=e(c,t)),p={request:i,resolved:f}}if(!c)throw new Error(`Unexpected falsy value: ${String(c)}`);if("object"==typeof c&&c.__esModule){if(!c.default)throw new Error("Must export a default export when using ES6 modules.");c=c.default}if("object"!=typeof c&&"function"!=typeof c)throw new Error(`Unsupported format: ${typeof c}. Expected an object or a function.`);if(null!==f&&"object"==typeof c&&c)throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${f}`);return{name:u,alias:f||s,value:c,options:l,dirname:t,ownPass:o,file:p}}},function(e,t,r){"use strict";function n(e,t){for(const r of Object.keys(t)){const n=t[r];void 0!==n&&(e[r]=n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeOptions=function(e,t){for(const r of Object.keys(t))if("parserOpts"===r&&t.parserOpts){const r=t.parserOpts,i=e.parserOpts=e.parserOpts||{};n(i,r)}else if("generatorOpts"===r&&t.generatorOpts){const r=t.generatorOpts,i=e.generatorOpts=e.generatorOpts||{};n(i,r)}else{const n=t[r];void 0!==n&&(e[r]=n)}}},function(e,t,r){"use strict";function n(){const e=c(r(14));return n=function(){return e},e}function i(){const e=c(r(64));return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.buildPresetChain=function(e,t){const r=f(e,t);return r?{plugins:N(r.plugins),presets:N(r.presets),options:r.options}:null},t.buildRootChain=function(e,t){const r=E({options:e,dirname:t.cwd},t);if(!r)return null;let i;"string"==typeof e.configFile?i=(0,a.loadConfig)(e.configFile,t.cwd,t.envName,t.caller):!1!==e.configFile&&(i=(0,a.findRootConfig)(t.root,t.envName,t.caller));let{babelrc:s,babelrcRoots:u}=e;const l={options:[],presets:[],plugins:[]};if(i){const e=g(i),r=T(e,t);if(!r)return null;void 0===s&&(s=e.options.babelrc),void 0===u&&(u=e.options.babelrcRoots),k(l,r)}const c="string"==typeof t.filename?(0,a.findPackageData)(t.filename):null;let p,f;const h={options:[],presets:[],plugins:[]};if((!0===s||void 0===s)&&c&&function(e,t,r){if("boolean"==typeof r)return r;const i=e.root;if(void 0===r)return-1!==t.directories.indexOf(i);let s=r;Array.isArray(s)||(s=[s]);if(1===(s=s.map(t=>"string"==typeof t?n().default.resolve(e.cwd,t):t)).length&&s[0]===i)return-1!==t.directories.indexOf(i);return s.some(r=>("string"==typeof r&&(r=(0,o.default)(r,e.cwd)),t.directories.some(t=>R(r,e.cwd,t,e))))}(t,c,u)){if(({ignore:p,config:f}=(0,a.findRelativeConfig)(c,t.envName)),p&&M(t,p.ignore,null,p.dirname))return null;if(f){const e=T(v(f),t);if(!e)return null;k(h,e)}}const d=k(k(k({options:[],presets:[],plugins:[]},l),h),r);return{plugins:N(d.plugins),presets:N(d.presets),options:d.options.map(e=>(function(e){const t=Object.assign({},e);delete t.extends,delete t.env,delete t.overrides,delete t.plugins,delete t.presets,delete t.passPerPreset,delete t.ignore,delete t.only,delete t.test,delete t.include,delete t.exclude,t.sourceMap&&(t.sourceMaps=t.sourceMap,delete t.sourceMap);return t})(e)),ignore:p||void 0,babelrc:f||void 0,config:i||void 0}},t.buildPresetChainWalker=void 0;var s=r(76),o=c(r(362)),a=r(74),u=r(42),l=r(137);function c(e){return e&&e.__esModule?e:{default:e}}const p=(0,i().default)("babel:config:config-chain");const f=_({init:e=>e,root:e=>h(e),env:(e,t)=>d(e)(t),overrides:(e,t)=>y(e)(t),overridesEnv:(e,t,r)=>m(e)(t)(r)});t.buildPresetChainWalker=f;const h=(0,u.makeWeakCache)(e=>D(e,e.alias,l.createUncachedDescriptors)),d=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>w(e,e.alias,l.createUncachedDescriptors,t))),y=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>C(e,e.alias,l.createUncachedDescriptors,t))),m=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>(0,u.makeStrongCache)(r=>O(e,e.alias,l.createUncachedDescriptors,t,r))));const g=(0,u.makeWeakCache)(e=>({filepath:e.filepath,dirname:e.dirname,options:(0,s.validate)("configfile",e.options)})),v=(0,u.makeWeakCache)(e=>({filepath:e.filepath,dirname:e.dirname,options:(0,s.validate)("babelrcfile",e.options)})),b=(0,u.makeWeakCache)(e=>({filepath:e.filepath,dirname:e.dirname,options:(0,s.validate)("extendsfile",e.options)})),E=_({root:e=>D(e,"base",l.createCachedDescriptors),env:(e,t)=>w(e,"base",l.createCachedDescriptors,t),overrides:(e,t)=>C(e,"base",l.createCachedDescriptors,t),overridesEnv:(e,t,r)=>O(e,"base",l.createCachedDescriptors,t,r)}),T=_({root:e=>A(e),env:(e,t)=>x(e)(t),overrides:(e,t)=>S(e)(t),overridesEnv:(e,t,r)=>P(e)(t)(r)}),A=(0,u.makeWeakCache)(e=>D(e,e.filepath,l.createUncachedDescriptors)),x=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>w(e,e.filepath,l.createUncachedDescriptors,t))),S=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>C(e,e.filepath,l.createUncachedDescriptors,t))),P=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>(0,u.makeStrongCache)(r=>O(e,e.filepath,l.createUncachedDescriptors,t,r))));function D({dirname:e,options:t},r,n){return n(e,t,r)}function w({dirname:e,options:t},r,n,i){const s=t.env&&t.env[i];return s?n(e,s,`${r}.env["${i}"]`):null}function C({dirname:e,options:t},r,n,i){const s=t.overrides&&t.overrides[i];if(!s)throw new Error("Assertion failure - missing override");return n(e,s,`${r}.overrides[${i}]`)}function O({dirname:e,options:t},r,n,i,s){const o=t.overrides&&t.overrides[i];if(!o)throw new Error("Assertion failure - missing override");const a=o.env&&o.env[s];return a?n(e,a,`${r}.overrides[${i}].env["${s}"]`):null}function _({root:e,env:t,overrides:r,overridesEnv:n}){return(i,s,o=new Set)=>{const{dirname:a}=i,u=[],l=e(i);if(B(l,a,s)){u.push(l);const e=t(i,s.envName);e&&B(e,a,s)&&u.push(e),(l.options.overrides||[]).forEach((e,t)=>{const o=r(i,t);if(B(o,a,s)){u.push(o);const e=n(i,t,s.envName);e&&B(e,a,s)&&u.push(e)}})}if(u.some(({options:{ignore:e,only:t}})=>M(s,e,t,a)))return null;const c={options:[],presets:[],plugins:[]};for(const e of u){if(!F(c,e.options,a,s,o))return null;I(c,e)}return c}}function F(e,t,r,n,i){if(void 0===t.extends)return!0;const s=(0,a.loadConfig)(t.extends,r,n.envName,n.caller);if(i.has(s))throw new Error(`Configuration cycle detected loading ${s.filepath}.\n`+"File already loaded following the config chain:\n"+Array.from(i,e=>` - ${e.filepath}`).join("\n"));i.add(s);const o=T(b(s),n,i);return i.delete(s),!!o&&(k(e,o),!0)}function k(e,t){return e.options.push(...t.options),e.plugins.push(...t.plugins),e.presets.push(...t.presets),e}function I(e,{options:t,plugins:r,presets:n}){return e.options.push(t),e.plugins.push(...r()),e.presets.push(...n()),e}function N(e){const t=new Map,r=[];for(const n of e)if("function"==typeof n.value){const e=n.value;let i=t.get(e);i||(i=new Map,t.set(e,i));let s=i.get(n.name);s?s.value=n:(s={value:n},r.push(s),n.ownPass||i.set(n.name,s))}else r.push({value:n});return r.reduce((e,t)=>(e.push(t.value),e),[])}function B({options:e},t,r){return(void 0===e.test||j(r,e.test,t))&&(void 0===e.include||j(r,e.include,t))&&(void 0===e.exclude||!j(r,e.exclude,t))}function j(e,t,r){return L(e,Array.isArray(t)?t:[t],r)}function M(e,t,r,n){return t&&L(e,t,n)?(p("Ignored %o because it matched one of %O from %o",e.filename,t,n),!0):!(!r||L(e,r,n))&&(p("Ignored %o because it failed to match one of %O from %o",e.filename,r,n),!0)}function L(e,t,r){return t.some(t=>R(t,r,e.filename,e))}function R(e,t,r,n){if("function"==typeof e)return!!e(r,{dirname:t,envName:n.envName,caller:n.caller});if("string"!=typeof r)throw new Error("Configuration contains string/RegExp pattern, but no filename was passed to Babel");return"string"==typeof e&&(e=(0,o.default)(e,t)),e.test(r)}},function(e,t,r){"use strict";function n(e){switch(e.type){case"root":return"";case"env":return`${n(e.parent)}.env["${e.name}"]`;case"overrides":return`${n(e.parent)}.overrides[${e.index}]`;case"option":return`${n(e.parent)}.${e.name}`;case"access":return`${n(e.parent)}[${JSON.stringify(e.name)}]`;default:throw new Error(`Assertion failure: Unknown type ${e.type}`)}}function i(e,t){return{type:"access",name:t,parent:e}}function s(e,t){if(void 0!==t&&("object"!=typeof t||Array.isArray(t)||!t))throw new Error(`${n(e)} must be an object, or undefined`);return t}function o(e,t){if(null!=t&&!Array.isArray(t))throw new Error(`${n(e)} must be an array, or undefined`);return t}function a(e){return"string"==typeof e||"function"==typeof e||e instanceof RegExp}function u(e,t){if(("object"!=typeof t||!t)&&"string"!=typeof t&&"function"!=typeof t)throw new Error(`${n(e)} must be a string, object, function`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.msg=n,t.access=i,t.assertSourceMaps=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&"inline"!==t&&"both"!==t)throw new Error(`${n(e)} must be a boolean, "inline", "both", or undefined`);return t},t.assertCompact=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&"auto"!==t)throw new Error(`${n(e)} must be a boolean, "auto", or undefined`);return t},t.assertSourceType=function(e,t){if(void 0!==t&&"module"!==t&&"script"!==t&&"unambiguous"!==t)throw new Error(`${n(e)} must be "module", "script", "unambiguous", or undefined`);return t},t.assertCallerMetadata=function(e,t){const r=s(e,t);if(r){if("string"!=typeof r.name)throw new Error(`${n(e)} set but does not contain "name" property string`);for(const t of Object.keys(r)){const s=i(e,t),o=r[t];if(null!=o&&"boolean"!=typeof o&&"string"!=typeof o&&"number"!=typeof o)throw new Error(`${n(s)} must be null, undefined, a boolean, a string, or a number.`)}}return t},t.assertInputSourceMap=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&("object"!=typeof t||!t))throw new Error(`${n(e)} must be a boolean, object, or undefined`);return t},t.assertString=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new Error(`${n(e)} must be a string, or undefined`);return t},t.assertFunction=function(e,t){if(void 0!==t&&"function"!=typeof t)throw new Error(`${n(e)} must be a function, or undefined`);return t},t.assertBoolean=function(e,t){if(void 0!==t&&"boolean"!=typeof t)throw new Error(`${n(e)} must be a boolean, or undefined`);return t},t.assertObject=s,t.assertArray=o,t.assertIgnoreList=function(e,t){const r=o(e,t);r&&r.forEach((t,r)=>(function(e,t){if("string"!=typeof t&&"function"!=typeof t&&!(t instanceof RegExp))throw new Error(`${n(e)} must be an array of string/Funtion/RegExp values, or undefined`);return t})(i(e,r),t));return r},t.assertConfigApplicableTest=function(e,t){if(void 0===t)return t;if(Array.isArray(t))t.forEach((t,r)=>{if(!a(t))throw new Error(`${n(i(e,r))} must be a string/Function/RegExp.`)});else if(!a(t))throw new Error(`${n(e)} must be a string/Function/RegExp, or an array of those`);return t},t.assertConfigFileSearch=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&"string"!=typeof t)throw new Error(`${n(e)} must be a undefined, a boolean, a string, `+`got ${JSON.stringify(t)}`);return t},t.assertBabelrcSearch=function(e,t){if(void 0===t||"boolean"==typeof t)return t;if(Array.isArray(t))t.forEach((t,r)=>{if(!a(t))throw new Error(`${n(i(e,r))} must be a string/Function/RegExp.`)});else if(!a(t))throw new Error(`${n(e)} must be a undefined, a boolean, a string/Function/RegExp `+`or an array of those, got ${JSON.stringify(t)}`);return t},t.assertPluginList=function(e,t){const r=o(e,t);r&&r.forEach((t,r)=>(function(e,t){if(Array.isArray(t)){if(0===t.length)throw new Error(`${n(e)} must include an object`);if(t.length>3)throw new Error(`${n(e)} may only be a two-tuple or three-tuple`);if(u(i(e,0),t[0]),t.length>1){const r=t[1];if(void 0!==r&&!1!==r&&("object"!=typeof r||Array.isArray(r)))throw new Error(`${n(i(e,1))} must be an object, false, or undefined`)}if(3===t.length){const r=t[2];if(void 0!==r&&"string"!=typeof r)throw new Error(`${n(i(e,2))} must be a string, or undefined`)}}else u(e,t);return t})(i(e,r),t));return r}},function(e,t,r){"use strict";function n(){const e=c(r(14));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,t.loadPartialConfig=function(e){const t=p(e);if(!t)return null;const{options:r,babelrc:n,ignore:s,config:o}=t;return(r.plugins||[]).forEach(e=>{if(e.value instanceof i.default)throw new Error("Passing cached plugin instances is not supported in babel.loadPartialConfig()")}),new f(r,n?n.filepath:void 0,s?s.filepath:void 0,o?o.filepath:void 0)};var i=c(r(75)),s=r(138),o=r(41),a=r(139),u=r(136),l=r(76);function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if(null!=e&&("object"!=typeof e||Array.isArray(e)))throw new Error("Babel options must be an object, null, or undefined");const t=e?(0,l.validate)("arguments",e):{},{envName:r=(0,u.getEnv)(),cwd:i=".",root:c=".",caller:p}=t,f=n().default.resolve(i),h=n().default.resolve(f,c),d={filename:"string"==typeof t.filename?n().default.resolve(i,t.filename):void 0,cwd:f,root:h,envName:r,caller:p},y=(0,a.buildRootChain)(t,d);if(!y)return null;const m={};return y.options.forEach(e=>{(0,s.mergeOptions)(m,e)}),m.babelrc=!1,m.configFile=!1,m.passPerPreset=!1,m.envName=d.envName,m.cwd=d.cwd,m.root=d.root,m.filename="string"==typeof d.filename?d.filename:void 0,m.plugins=y.plugins.map(e=>(0,o.createItemFromDescriptor)(e)),m.presets=y.presets.map(e=>(0,o.createItemFromDescriptor)(e)),{options:m,context:d,ignore:y.ignore,babelrc:y.babelrc,config:y.config}}class f{constructor(e,t,r,n){this.options=e,this.babelignore=r,this.babelrc=t,this.config=n,Object.freeze(this)}hasFilesystemConfig(){return void 0!==this.babelrc||void 0!==this.config}}Object.freeze(f.prototype)},function(e,t,r){"use strict";function n(){const e=l(r(7));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.runAsync=function(e,t,r,n){let i;try{i=c(e,t,r)}catch(e){return n(e)}return n(null,i)},t.runSync=c;var i=l(r(367)),s=l(r(368)),o=l(r(149)),a=l(r(150)),u=l(r(405));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,r){const l=(0,a.default)(e.passes,(0,o.default)(e),t,r);!function(e,t){for(const r of t){const t=[],o=[],a=[];for(const n of r.concat([(0,s.default)()])){const r=new i.default(e,n.key,n.options);t.push([n,r]),o.push(r),a.push(n.visitor)}for(const[r,n]of t){const t=r.pre;if(t){const r=t.call(n,e);if(p(r))throw new Error("You appear to be using an plugin with an async .pre, which your current version of Babel does not support.If you're using a published plugin, you may need to upgrade your @babel/core version.")}}const u=n().default.visitors.merge(a,o,e.opts.wrapPluginVisitorMethod);(0,n().default)(e.ast,u,e.scope);for(const[r,n]of t){const t=r.post;if(t){const r=t.call(n,e);if(p(r))throw new Error("You appear to be using an plugin with an async .post, which your current version of Babel does not support.If you're using a published plugin, you may need to upgrade your @babel/core version.")}}}}(l,e.passes);const c=l.opts,{outputCode:f,outputMap:h}=!1!==c.code?(0,u.default)(e.passes,l):{};return{metadata:l.metadata,options:c,ast:!0===c.ast?l.ast:null,code:void 0===f?null:f,map:void 0===h?null:h,sourceType:l.ast.program.sourceType}}function p(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}},function(e,t,r){var n=r(376),i=r(5);e.exports=function e(t,r,s,o,a){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,s,o,e,a))}},function(e,t,r){var n=r(109),i=r(377),s=r(111),o=1,a=2;e.exports=function(e,t,r,u,l,c){var p=r&o,f=e.length,h=t.length;if(f!=h&&!(p&&h>f))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var y=-1,m=!0,g=r&a?new n:void 0;for(c.set(e,t),c.set(t,e);++y(e.assertVersion(7),{manipulateOptions(e,t){t.plugins.push("dynamicImport")}}));t.default=i},function(e,t,r){"use strict";function n(){const e=r(78);return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(0,n().declare)(e=>(e.assertVersion(7),{manipulateOptions(e,t){t.plugins.push("importMeta")}}));t.default=i},function(e,t,r){"use strict";function n(){const e=r(78);return n=function(){return e},e}function i(){const e=function(e){return e&&e.__esModule?e:{default:e}}(r(410));return i=function(){return e},e}function s(){const e=r(26);return s=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const o=(0,s().template)('\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'),a=(0,s().template)('\n for (var KEY in TARGET) {\n if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n');function u(e,t,r,n,i){const o=[];if(1===r.length)o.push(s().types.expressionStatement(s().types.callExpression(t,[s().types.stringLiteral(r[0]),n[0]])));else if(i){const u=e.scope.generateUid("exportObj");o.push(s().types.variableDeclaration("var",[s().types.variableDeclarator(s().types.identifier(u),s().types.objectExpression([]))])),o.push(a({KEY:e.scope.generateUidIdentifier("key"),EXPORT_OBJ:s().types.identifier(u),TARGET:i}));for(let e=0;e{e.assertVersion(7);const{systemGlobal:r="System"}=t,n=Symbol(),a={"AssignmentExpression|UpdateExpression"(e){if(e.node[n])return;e.node[n]=!0;const t=e.get(e.isAssignmentExpression()?"left":"argument");if(t.isObjectPattern()||t.isArrayPattern()){const r=[e.node];for(const n in t.getBindingIdentifiers()){if(this.scope.getBinding(n)!==e.scope.getBinding(n))return;const t=this.exports[n];if(!t)return;for(const e of t)r.push(this.buildCall(e,s().types.identifier(n)).expression)}return void e.replaceWith(s().types.sequenceExpression(r))}if(!t.isIdentifier())return;const r=t.node.name;if(this.scope.getBinding(r)!==e.scope.getBinding(r))return;const i=this.exports[r];if(!i)return;let o=e.node;const a=e.isUpdateExpression({prefix:!1});a&&(o=s().types.binaryExpression(o.operator[0],s().types.unaryExpression("+",s().types.cloneNode(o.argument)),s().types.numericLiteral(1)));for(const e of i)o=this.buildCall(e,o).expression;a&&(o=s().types.sequenceExpression([o,e.node])),e.replaceWith(o)}};return{visitor:{CallExpression(e,t){"Import"===e.node.callee.type&&e.replaceWith(s().types.callExpression(s().types.memberExpression(s().types.identifier(t.contextIdent),s().types.identifier("import")),e.node.arguments))},MetaProperty(e,t){"import"===e.node.meta.name&&"meta"===e.node.property.name&&e.replaceWith(s().types.memberExpression(s().types.identifier(t.contextIdent),s().types.identifier("meta")))},ReferencedIdentifier(e,t){"__moduleName"!=e.node.name||e.scope.hasBinding("__moduleName")||e.replaceWith(s().types.memberExpression(s().types.identifier(t.contextIdent),s().types.identifier("id")))},Program:{enter(e,t){t.contextIdent=e.scope.generateUid("context")},exit(e,t){const n=e.scope.generateUid("export"),l=t.contextIdent,c=Object.create(null),p=[];let f=[];const h=[],d=[],y=[],m=[];function g(e,t){c[e]=c[e]||[],c[e].push(t)}function v(e,t,r){let n;p.forEach(function(t){t.key===e&&(n=t)}),n||p.push(n={key:e,imports:[],exports:[]}),n[t]=n[t].concat(r)}function b(e,t){return s().types.expressionStatement(s().types.callExpression(s().types.identifier(n),[s().types.stringLiteral(e),t]))}const E=e.get("body");for(const e of E)if(e.isFunctionDeclaration())f.push(e.node),m.push(e);else if(e.isImportDeclaration()){v(e.node.source.value,"imports",e.node.specifiers);for(const t in e.getBindingIdentifiers())e.scope.removeBinding(t),y.push(s().types.identifier(t));e.remove()}else if(e.isExportAllDeclaration())v(e.node.source.value,"exports",e.node),e.remove();else if(e.isExportDefaultDeclaration()){const t=e.get("declaration");if(t.isClassDeclaration()||t.isFunctionDeclaration()){const r=t.node.id,n=[];r?(n.push(t.node),n.push(b("default",s().types.cloneNode(r))),g(r.name,"default")):n.push(b("default",s().types.toExpression(t.node))),t.isClassDeclaration()?e.replaceWithMultiple(n):(f=f.concat(n),m.push(e))}else e.replaceWith(b("default",t.node))}else if(e.isExportNamedDeclaration()){const t=e.get("declaration");if(t.node)if(e.replaceWith(t),e.isFunction()){const r=t.node,n=r.id.name;g(n,n),f.push(r),f.push(b(n,s().types.cloneNode(r.id))),m.push(e)}else if(e.isClass()){const r=t.node.id.name;g(r,r),e.insertAfter([b(r,s().types.identifier(r))])}else for(const e in t.getBindingIdentifiers())g(e,e);else{const t=e.node.specifiers;if(t&&t.length)if(e.node.source)v(e.node.source.value,"exports",t),e.remove();else{const r=[];for(const n of t)e.scope.getBinding(n.local.name)||r.push(b(n.exported.name,n.local)),g(n.local.name,n.exported.name);e.replaceWithMultiple(r)}}}p.forEach(function(t){let r=[];const i=e.scope.generateUid(t.key);for(let e of t.imports)s().types.isImportNamespaceSpecifier(e)?r.push(s().types.expressionStatement(s().types.assignmentExpression("=",e.local,s().types.identifier(i)))):s().types.isImportDefaultSpecifier(e)&&(e=s().types.importSpecifier(e.local,s().types.identifier("default"))),s().types.isImportSpecifier(e)&&r.push(s().types.expressionStatement(s().types.assignmentExpression("=",e.local,s().types.memberExpression(s().types.identifier(i),e.imported))));if(t.exports.length){const o=[],a=[];let l=!1;for(const e of t.exports)s().types.isExportAllDeclaration(e)?l=!0:s().types.isExportSpecifier(e)&&(o.push(e.exported.name),a.push(s().types.memberExpression(s().types.identifier(i),e.local)));r=r.concat(u(e,s().types.identifier(n),o,a,l?s().types.identifier(i):null))}d.push(s().types.stringLiteral(t.key)),h.push(s().types.functionExpression(null,[s().types.identifier(i)],s().types.blockStatement(r)))});let T=this.getModuleName();T&&(T=s().types.stringLiteral(T));const A=[];if((0,i().default)(e,(e,t,r)=>{y.push(e),r||A.push(t)},null),y.length&&f.unshift(s().types.variableDeclaration("var",y.map(e=>s().types.variableDeclarator(e)))),A.length){const t=[],r=e.scope.buildUndefinedNode();for(let e=0;e{t.transform(r,{plugins:l,sourceMaps:"inline",sourceFileName:e.split("/").pop()},function(e,t){e?i(e):n(t)})}).then(function(e){return e.code})})}}("undefined"!=typeof self?self:e)}.call(this,r(27))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(15));function i(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return i=function(){return e},e}const s=!1;t.default=class{constructor(e,t,r,n){this.queue=null,this.parentPath=n,this.scope=e,this.state=r,this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;const r=i().VISITOR_KEYS[e.type];if(!r||!r.length)return!1;for(const t of r)if(e[t])return!0;return!1}create(e,t,r,i){return n.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:i})}maybeQueue(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,r){if(0===e.length)return!1;const n=[];for(let i=0;i=1e4&&(this.trap=!0),!(t.indexOf(n.node)>=0))){if(t.push(n.node),n.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}for(const t of e)t.popContext();return this.queue=null,r}visit(e,t){const r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,function(e){return e&&e.__esModule?e:{default:e}}(r(82)).default)("React.Component");t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&/^[a-z]/.test(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];for(let r=0;rr.length)throw new Error(`${e}: Too many arguments passed. Received ${o} but can receive no more than ${r.length}`);const a={type:e};let u=0;r.forEach(r=>{const s=i.NODE_FIELDS[e][r];let l;u-1}},function(e,t,r){var n=r(29);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},function(e,t,r){var n=r(28);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(28),i=r(46),s=r(47),o=200;e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length=n)return!1;if(!(56320<=(s=e.charCodeAt(r))&&s<=57343))return!1;i=u(i,s)}if(!o(i))return!1;o=t.isIdentifierPartES6}return!0}e.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:o,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:a,isIdentifierNameES6:l,isIdentifierES5:function(e,t){return a(e)&&!s(e,t)},isIdentifierES6:function(e,t){return l(e)&&!o(e,t)}}}()},function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(10));const i=(e,t="TypeParameterDeclaration")=>{(0,n.default)(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)(t),extends:(0,n.validateOptional)((0,n.arrayOfType)("InterfaceExtends")),mixins:(0,n.validateOptional)((0,n.arrayOfType)("InterfaceExtends")),implements:(0,n.validateOptional)((0,n.arrayOfType)("ClassImplements")),body:(0,n.validateType)("ObjectTypeAnnotation")}})};(0,n.default)("AnyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow","FlowType"],fields:{elementType:(0,n.validateType)("FlowType")}}),(0,n.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,n.validate)((0,n.assertValueType)("boolean"))}}),(0,n.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterInstantiation")}}),i("DeclareClass","TypeParameterInstantiation"),(0,n.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),predicate:(0,n.validateOptionalType)("DeclaredPredicate")}}),i("DeclareInterface"),(0,n.default)("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)(["Identifier","StringLiteral"]),body:(0,n.validateType)("BlockStatement"),kind:(0,n.validateOptional)((0,n.assertOneOf)("CommonJS","ES"))}}),(0,n.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,n.validateType)("TypeAnnotation")}}),(0,n.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),right:(0,n.validateType)("FlowType")}}),(0,n.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,n.validateOptionalType)("FlowType")}}),(0,n.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier")}}),(0,n.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,n.validateOptionalType)("Flow"),specifiers:(0,n.validateOptional)((0,n.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,n.validateOptionalType)("StringLiteral"),default:(0,n.validateOptional)((0,n.assertValueType)("boolean"))}}),(0,n.default)("DeclareExportAllDeclaration",{visitor:["source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{source:(0,n.validateType)("StringLiteral"),exportKind:(0,n.validateOptional)((0,n.assertOneOf)(["type","value"]))}}),(0,n.default)("DeclaredPredicate",{visitor:["value"],aliases:["Flow","FlowPredicate"],fields:{value:(0,n.validateType)("Flow")}}),(0,n.default)("ExistsTypeAnnotation",{aliases:["Flow","FlowType"]}),(0,n.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow","FlowType"],fields:{typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),params:(0,n.validate)((0,n.arrayOfType)("FunctionTypeParam")),rest:(0,n.validateOptionalType)("FunctionTypeParam"),returnType:(0,n.validateType)("FlowType")}}),(0,n.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{name:(0,n.validateOptionalType)("Identifier"),typeAnnotation:(0,n.validateType)("FlowType"),optional:(0,n.validateOptional)((0,n.assertValueType)("boolean"))}}),(0,n.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow","FlowType"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterInstantiation")}}),(0,n.default)("InferredPredicate",{aliases:["Flow","FlowPredicate"]}),(0,n.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterInstantiation")}}),i("InterfaceDeclaration"),(0,n.default)("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["Flow","FlowType"],fields:{extends:(0,n.validateOptional)((0,n.arrayOfType)("InterfaceExtends")),body:(0,n.validateType)("ObjectTypeAnnotation")}}),(0,n.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,n.validate)((0,n.arrayOfType)("FlowType"))}}),(0,n.default)("MixedTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow","FlowType"],fields:{typeAnnotation:(0,n.validateType)("FlowType")}}),(0,n.default)("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,n.validate)((0,n.assertValueType)("number"))}}),(0,n.default)("NumberTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["Flow","FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,n.validate)((0,n.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:(0,n.validateOptional)((0,n.arrayOfType)("ObjectTypeIndexer")),callProperties:(0,n.validateOptional)((0,n.arrayOfType)("ObjectTypeCallProperty")),internalSlots:(0,n.validateOptional)((0,n.arrayOfType)("ObjectTypeInternalSlot")),exact:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,n.default)("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,n.validateType)("Identifier"),value:(0,n.validateType)("FlowType"),optional:(0,n.validate)((0,n.assertValueType)("boolean")),static:(0,n.validate)((0,n.assertValueType)("boolean")),method:(0,n.validate)((0,n.assertValueType)("boolean"))}}),(0,n.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{value:(0,n.validateType)("FlowType"),static:(0,n.validate)((0,n.assertValueType)("boolean"))}}),(0,n.default)("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,n.validateOptionalType)("Identifier"),key:(0,n.validateType)("FlowType"),value:(0,n.validateType)("FlowType"),static:(0,n.validate)((0,n.assertValueType)("boolean")),variance:(0,n.validateOptionalType)("Variance")}}),(0,n.default)("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{key:(0,n.validateType)(["Identifier","StringLiteral"]),value:(0,n.validateType)("FlowType"),kind:(0,n.validate)((0,n.assertOneOf)("init","get","set")),static:(0,n.validate)((0,n.assertValueType)("boolean")),proto:(0,n.validate)((0,n.assertValueType)("boolean")),optional:(0,n.validate)((0,n.assertValueType)("boolean")),variance:(0,n.validateOptionalType)("Variance")}}),(0,n.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{argument:(0,n.validateType)("FlowType")}}),(0,n.default)("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,n.validateOptionalType)("FlowType"),impltype:(0,n.validateType)("FlowType")}}),(0,n.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{id:(0,n.validateType)("Identifier"),qualification:(0,n.validateType)(["Identifier","QualifiedTypeIdentifier"])}}),(0,n.default)("StringLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,n.validate)((0,n.assertValueType)("string"))}}),(0,n.default)("StringTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("ThisTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,n.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,n.validate)((0,n.arrayOfType)("FlowType"))}}),(0,n.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow","FlowType"],fields:{argument:(0,n.validateType)("FlowType")}}),(0,n.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),right:(0,n.validateType)("FlowType")}}),(0,n.default)("TypeAnnotation",{aliases:["Flow"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("FlowType")}}),(0,n.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{expression:(0,n.validateType)("Expression"),typeAnnotation:(0,n.validateType)("TypeAnnotation")}}),(0,n.default)("TypeParameter",{aliases:["Flow"],visitor:["bound","default","variance"],fields:{name:(0,n.validate)((0,n.assertValueType)("string")),bound:(0,n.validateOptionalType)("TypeAnnotation"),default:(0,n.validateOptionalType)("FlowType"),variance:(0,n.validateOptionalType)("Variance")}}),(0,n.default)("TypeParameterDeclaration",{aliases:["Flow"],visitor:["params"],fields:{params:(0,n.validate)((0,n.arrayOfType)("TypeParameter"))}}),(0,n.default)("TypeParameterInstantiation",{aliases:["Flow"],visitor:["params"],fields:{params:(0,n.validate)((0,n.arrayOfType)("FlowType"))}}),(0,n.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,n.validate)((0,n.arrayOfType)("FlowType"))}}),(0,n.default)("Variance",{aliases:["Flow"],builder:["kind"],fields:{kind:(0,n.validate)((0,n.assertOneOf)("minus","plus"))}}),(0,n.default)("VoidTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]})},function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(10));(0,n.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),(0,n.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,n.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),(0,n.default)("JSXEmptyExpression",{aliases:["JSX"]}),(0,n.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,n.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,n.default)("JSXIdentifier",{builder:["name"],aliases:["JSX"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,n.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,n.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,n.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,n.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),(0,n.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,n.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}}),(0,n.default)("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["JSX","Immutable","Expression"],fields:{openingFragment:{validate:(0,n.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,n.assertNodeType)("JSXClosingFragment")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),(0,n.default)("JSXOpeningFragment",{aliases:["JSX","Immutable"]}),(0,n.default)("JSXClosingFragment",{aliases:["JSX","Immutable"]})},function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(10));(0,n.default)("Noop",{visitor:[]}),(0,n.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(10)),i=r(61);(0,n.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,n.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,n.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:Object.assign({},i.classMethodOrPropertyCommon,{value:{validate:(0,n.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,n.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,n.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator"))),optional:!0},readonly:{validate:(0,n.assertValueType)("boolean"),optional:!0}})}),(0,n.default)("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,n.assertNodeType)("Expression")},property:{validate:function(){const e=(0,n.assertNodeType)("Identifier"),t=(0,n.assertNodeType)("Expression");return function(r,n,i){(r.computed?t:e)(r,n,i)}}()},computed:{default:!1},optional:{validate:(0,n.assertValueType)("boolean")}}}),(0,n.default)("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:(0,n.assertNodeType)("Expression")},arguments:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression","SpreadElement","JSXNamespacedName")))},optional:{validate:(0,n.assertValueType)("boolean")},typeArguments:{validate:(0,n.assertNodeType)("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:(0,n.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}}}),(0,n.default)("ClassPrivateProperty",{visitor:["key","value"],builder:["key","value"],aliases:["Property","Private"],fields:{key:{validate:(0,n.assertNodeType)("PrivateName")},value:{validate:(0,n.assertNodeType)("Expression"),optional:!0}}}),(0,n.default)("Import",{aliases:["Expression"]}),(0,n.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,n.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,n.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,n.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,n.default)("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,n.default)("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]})},function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(10)),i=r(58),s=r(61);const o=(0,n.assertValueType)("boolean"),a={returnType:{validate:(0,n.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,n.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}};(0,n.default)("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,n.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,n.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,n.assertNodeType)("Identifier","AssignmentPattern")}}}),(0,n.default)("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},i.functionDeclarationCommon,a)}),(0,n.default)("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},s.classMethodOrDeclareMethodCommon,a)}),(0,n.default)("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,n.validateType)("TSEntityName"),right:(0,n.validateType)("Identifier")}});const u={typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,n.validateArrayOfType)(["Identifier","RestElement"]),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation")},l={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:u};(0,n.default)("TSCallSignatureDeclaration",l),(0,n.default)("TSConstructSignatureDeclaration",l);const c={key:(0,n.validateType)("Expression"),computed:(0,n.validate)(o),optional:(0,n.validateOptional)(o)};(0,n.default)("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},c,{readonly:(0,n.validateOptional)(o),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation"),initializer:(0,n.validateOptionalType)("Expression")})}),(0,n.default)("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},u,c)}),(0,n.default)("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,n.validateOptional)(o),parameters:(0,n.validateArrayOfType)("Identifier"),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation")}});const p=["TSAnyKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword"];for(const e of p)(0,n.default)(e,{aliases:["TSType"],visitor:[],fields:{}});(0,n.default)("TSThisType",{aliases:["TSType"],visitor:[],fields:{}});const f={aliases:["TSType"],visitor:["typeParameters","typeAnnotation"],fields:u};(0,n.default)("TSFunctionType",f),(0,n.default)("TSConstructorType",f),(0,n.default)("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,n.validateType)("TSEntityName"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}}),(0,n.default)("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],fields:{parameterName:(0,n.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,n.validateType)("TSTypeAnnotation")}}),(0,n.default)("TSTypeQuery",{aliases:["TSType"],visitor:["exprName"],fields:{exprName:(0,n.validateType)("TSEntityName")}}),(0,n.default)("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,n.validateArrayOfType)("TSTypeElement")}}),(0,n.default)("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,n.validateType)("TSType")}}),(0,n.default)("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,n.validateArrayOfType)("TSType")}});const h={aliases:["TSType"],visitor:["types"],fields:{types:(0,n.validateArrayOfType)("TSType")}};(0,n.default)("TSUnionType",h),(0,n.default)("TSIntersectionType",h),(0,n.default)("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,n.validateType)("TSType"),extendsType:(0,n.validateType)("TSType"),trueType:(0,n.validateType)("TSType"),falseType:(0,n.validateType)("TSType")}}),(0,n.default)("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,n.validateType)("TSTypeParameter")}}),(0,n.default)("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("TSType")}}),(0,n.default)("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,n.validate)((0,n.assertValueType)("string")),typeAnnotation:(0,n.validateType)("TSType")}}),(0,n.default)("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,n.validateType)("TSType"),indexType:(0,n.validateType)("TSType")}}),(0,n.default)("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation"],fields:{readonly:(0,n.validateOptional)(o),typeParameter:(0,n.validateType)("TSTypeParameter"),optional:(0,n.validateOptional)(o),typeAnnotation:(0,n.validateOptionalType)("TSType")}}),(0,n.default)("TSLiteralType",{aliases:["TSType"],visitor:["literal"],fields:{literal:(0,n.validateType)(["NumericLiteral","StringLiteral","BooleanLiteral"])}}),(0,n.default)("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,n.validateType)("TSEntityName"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}}),(0,n.default)("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,n.validateOptional)(o),id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,n.validateOptional)((0,n.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,n.validateType)("TSInterfaceBody")}}),(0,n.default)("TSInterfaceBody",{visitor:["body"],fields:{body:(0,n.validateArrayOfType)("TSTypeElement")}}),(0,n.default)("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,n.validateOptional)(o),id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,n.validateType)("TSType")}}),(0,n.default)("TSAsExpression",{aliases:["Expression"],visitor:["expression","typeAnnotation"],fields:{expression:(0,n.validateType)("Expression"),typeAnnotation:(0,n.validateType)("TSType")}}),(0,n.default)("TSTypeAssertion",{aliases:["Expression"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,n.validateType)("TSType"),expression:(0,n.validateType)("Expression")}}),(0,n.default)("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,n.validateOptional)(o),const:(0,n.validateOptional)(o),id:(0,n.validateType)("Identifier"),members:(0,n.validateArrayOfType)("TSEnumMember"),initializer:(0,n.validateOptionalType)("Expression")}}),(0,n.default)("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,n.validateType)(["Identifier","StringLiteral"]),initializer:(0,n.validateOptionalType)("Expression")}}),(0,n.default)("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,n.validateOptional)(o),global:(0,n.validateOptional)(o),id:(0,n.validateType)(["Identifier","StringLiteral"]),body:(0,n.validateType)(["TSModuleBlock","TSModuleDeclaration"])}}),(0,n.default)("TSModuleBlock",{visitor:["body"],fields:{body:(0,n.validateArrayOfType)("Statement")}}),(0,n.default)("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,n.validate)(o),id:(0,n.validateType)("Identifier"),moduleReference:(0,n.validateType)(["TSEntityName","TSExternalModuleReference"])}}),(0,n.default)("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,n.validateType)("StringLiteral")}}),(0,n.default)("TSNonNullExpression",{aliases:["Expression"],visitor:["expression"],fields:{expression:(0,n.validateType)("Expression")}}),(0,n.default)("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,n.validateType)("Expression")}}),(0,n.default)("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,n.validateType)("Identifier")}}),(0,n.default)("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,n.assertNodeType)("TSType")}}}),(0,n.default)("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TSType")))}}}),(0,n.default)("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TSTypeParameter")))}}}),(0,n.default)("TSTypeParameter",{visitor:["constraint","default"],fields:{name:{validate:(0,n.assertValueType)("string")},constraint:{validate:(0,n.assertNodeType)("TSType"),optional:!0},default:{validate:(0,n.assertNodeType)("TSType"),optional:!0}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(0,n.default)(e)){const t=e&&e.type||JSON.stringify(e);throw new TypeError(`Not a valid node of type "${t}"`)}};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(104))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayExpression=function(e,t={}){i("ArrayExpression",e,t)},t.assertAssignmentExpression=function(e,t={}){i("AssignmentExpression",e,t)},t.assertBinaryExpression=function(e,t={}){i("BinaryExpression",e,t)},t.assertInterpreterDirective=function(e,t={}){i("InterpreterDirective",e,t)},t.assertDirective=function(e,t={}){i("Directive",e,t)},t.assertDirectiveLiteral=function(e,t={}){i("DirectiveLiteral",e,t)},t.assertBlockStatement=function(e,t={}){i("BlockStatement",e,t)},t.assertBreakStatement=function(e,t={}){i("BreakStatement",e,t)},t.assertCallExpression=function(e,t={}){i("CallExpression",e,t)},t.assertCatchClause=function(e,t={}){i("CatchClause",e,t)},t.assertConditionalExpression=function(e,t={}){i("ConditionalExpression",e,t)},t.assertContinueStatement=function(e,t={}){i("ContinueStatement",e,t)},t.assertDebuggerStatement=function(e,t={}){i("DebuggerStatement",e,t)},t.assertDoWhileStatement=function(e,t={}){i("DoWhileStatement",e,t)},t.assertEmptyStatement=function(e,t={}){i("EmptyStatement",e,t)},t.assertExpressionStatement=function(e,t={}){i("ExpressionStatement",e,t)},t.assertFile=function(e,t={}){i("File",e,t)},t.assertForInStatement=function(e,t={}){i("ForInStatement",e,t)},t.assertForStatement=function(e,t={}){i("ForStatement",e,t)},t.assertFunctionDeclaration=function(e,t={}){i("FunctionDeclaration",e,t)},t.assertFunctionExpression=function(e,t={}){i("FunctionExpression",e,t)},t.assertIdentifier=function(e,t={}){i("Identifier",e,t)},t.assertIfStatement=function(e,t={}){i("IfStatement",e,t)},t.assertLabeledStatement=function(e,t={}){i("LabeledStatement",e,t)},t.assertStringLiteral=function(e,t={}){i("StringLiteral",e,t)},t.assertNumericLiteral=function(e,t={}){i("NumericLiteral",e,t)},t.assertNullLiteral=function(e,t={}){i("NullLiteral",e,t)},t.assertBooleanLiteral=function(e,t={}){i("BooleanLiteral",e,t)},t.assertRegExpLiteral=function(e,t={}){i("RegExpLiteral",e,t)},t.assertLogicalExpression=function(e,t={}){i("LogicalExpression",e,t)},t.assertMemberExpression=function(e,t={}){i("MemberExpression",e,t)},t.assertNewExpression=function(e,t={}){i("NewExpression",e,t)},t.assertProgram=function(e,t={}){i("Program",e,t)},t.assertObjectExpression=function(e,t={}){i("ObjectExpression",e,t)},t.assertObjectMethod=function(e,t={}){i("ObjectMethod",e,t)},t.assertObjectProperty=function(e,t={}){i("ObjectProperty",e,t)},t.assertRestElement=function(e,t={}){i("RestElement",e,t)},t.assertReturnStatement=function(e,t={}){i("ReturnStatement",e,t)},t.assertSequenceExpression=function(e,t={}){i("SequenceExpression",e,t)},t.assertSwitchCase=function(e,t={}){i("SwitchCase",e,t)},t.assertSwitchStatement=function(e,t={}){i("SwitchStatement",e,t)},t.assertThisExpression=function(e,t={}){i("ThisExpression",e,t)},t.assertThrowStatement=function(e,t={}){i("ThrowStatement",e,t)},t.assertTryStatement=function(e,t={}){i("TryStatement",e,t)},t.assertUnaryExpression=function(e,t={}){i("UnaryExpression",e,t)},t.assertUpdateExpression=function(e,t={}){i("UpdateExpression",e,t)},t.assertVariableDeclaration=function(e,t={}){i("VariableDeclaration",e,t)},t.assertVariableDeclarator=function(e,t={}){i("VariableDeclarator",e,t)},t.assertWhileStatement=function(e,t={}){i("WhileStatement",e,t)},t.assertWithStatement=function(e,t={}){i("WithStatement",e,t)},t.assertAssignmentPattern=function(e,t={}){i("AssignmentPattern",e,t)},t.assertArrayPattern=function(e,t={}){i("ArrayPattern",e,t)},t.assertArrowFunctionExpression=function(e,t={}){i("ArrowFunctionExpression",e,t)},t.assertClassBody=function(e,t={}){i("ClassBody",e,t)},t.assertClassDeclaration=function(e,t={}){i("ClassDeclaration",e,t)},t.assertClassExpression=function(e,t={}){i("ClassExpression",e,t)},t.assertExportAllDeclaration=function(e,t={}){i("ExportAllDeclaration",e,t)},t.assertExportDefaultDeclaration=function(e,t={}){i("ExportDefaultDeclaration",e,t)},t.assertExportNamedDeclaration=function(e,t={}){i("ExportNamedDeclaration",e,t)},t.assertExportSpecifier=function(e,t={}){i("ExportSpecifier",e,t)},t.assertForOfStatement=function(e,t={}){i("ForOfStatement",e,t)},t.assertImportDeclaration=function(e,t={}){i("ImportDeclaration",e,t)},t.assertImportDefaultSpecifier=function(e,t={}){i("ImportDefaultSpecifier",e,t)},t.assertImportNamespaceSpecifier=function(e,t={}){i("ImportNamespaceSpecifier",e,t)},t.assertImportSpecifier=function(e,t={}){i("ImportSpecifier",e,t)},t.assertMetaProperty=function(e,t={}){i("MetaProperty",e,t)},t.assertClassMethod=function(e,t={}){i("ClassMethod",e,t)},t.assertObjectPattern=function(e,t={}){i("ObjectPattern",e,t)},t.assertSpreadElement=function(e,t={}){i("SpreadElement",e,t)},t.assertSuper=function(e,t={}){i("Super",e,t)},t.assertTaggedTemplateExpression=function(e,t={}){i("TaggedTemplateExpression",e,t)},t.assertTemplateElement=function(e,t={}){i("TemplateElement",e,t)},t.assertTemplateLiteral=function(e,t={}){i("TemplateLiteral",e,t)},t.assertYieldExpression=function(e,t={}){i("YieldExpression",e,t)},t.assertAnyTypeAnnotation=function(e,t={}){i("AnyTypeAnnotation",e,t)},t.assertArrayTypeAnnotation=function(e,t={}){i("ArrayTypeAnnotation",e,t)},t.assertBooleanTypeAnnotation=function(e,t={}){i("BooleanTypeAnnotation",e,t)},t.assertBooleanLiteralTypeAnnotation=function(e,t={}){i("BooleanLiteralTypeAnnotation",e,t)},t.assertNullLiteralTypeAnnotation=function(e,t={}){i("NullLiteralTypeAnnotation",e,t)},t.assertClassImplements=function(e,t={}){i("ClassImplements",e,t)},t.assertDeclareClass=function(e,t={}){i("DeclareClass",e,t)},t.assertDeclareFunction=function(e,t={}){i("DeclareFunction",e,t)},t.assertDeclareInterface=function(e,t={}){i("DeclareInterface",e,t)},t.assertDeclareModule=function(e,t={}){i("DeclareModule",e,t)},t.assertDeclareModuleExports=function(e,t={}){i("DeclareModuleExports",e,t)},t.assertDeclareTypeAlias=function(e,t={}){i("DeclareTypeAlias",e,t)},t.assertDeclareOpaqueType=function(e,t={}){i("DeclareOpaqueType",e,t)},t.assertDeclareVariable=function(e,t={}){i("DeclareVariable",e,t)},t.assertDeclareExportDeclaration=function(e,t={}){i("DeclareExportDeclaration",e,t)},t.assertDeclareExportAllDeclaration=function(e,t={}){i("DeclareExportAllDeclaration",e,t)},t.assertDeclaredPredicate=function(e,t={}){i("DeclaredPredicate",e,t)},t.assertExistsTypeAnnotation=function(e,t={}){i("ExistsTypeAnnotation",e,t)},t.assertFunctionTypeAnnotation=function(e,t={}){i("FunctionTypeAnnotation",e,t)},t.assertFunctionTypeParam=function(e,t={}){i("FunctionTypeParam",e,t)},t.assertGenericTypeAnnotation=function(e,t={}){i("GenericTypeAnnotation",e,t)},t.assertInferredPredicate=function(e,t={}){i("InferredPredicate",e,t)},t.assertInterfaceExtends=function(e,t={}){i("InterfaceExtends",e,t)},t.assertInterfaceDeclaration=function(e,t={}){i("InterfaceDeclaration",e,t)},t.assertInterfaceTypeAnnotation=function(e,t={}){i("InterfaceTypeAnnotation",e,t)},t.assertIntersectionTypeAnnotation=function(e,t={}){i("IntersectionTypeAnnotation",e,t)},t.assertMixedTypeAnnotation=function(e,t={}){i("MixedTypeAnnotation",e,t)},t.assertEmptyTypeAnnotation=function(e,t={}){i("EmptyTypeAnnotation",e,t)},t.assertNullableTypeAnnotation=function(e,t={}){i("NullableTypeAnnotation",e,t)},t.assertNumberLiteralTypeAnnotation=function(e,t={}){i("NumberLiteralTypeAnnotation",e,t)},t.assertNumberTypeAnnotation=function(e,t={}){i("NumberTypeAnnotation",e,t)},t.assertObjectTypeAnnotation=function(e,t={}){i("ObjectTypeAnnotation",e,t)},t.assertObjectTypeInternalSlot=function(e,t={}){i("ObjectTypeInternalSlot",e,t)},t.assertObjectTypeCallProperty=function(e,t={}){i("ObjectTypeCallProperty",e,t)},t.assertObjectTypeIndexer=function(e,t={}){i("ObjectTypeIndexer",e,t)},t.assertObjectTypeProperty=function(e,t={}){i("ObjectTypeProperty",e,t)},t.assertObjectTypeSpreadProperty=function(e,t={}){i("ObjectTypeSpreadProperty",e,t)},t.assertOpaqueType=function(e,t={}){i("OpaqueType",e,t)},t.assertQualifiedTypeIdentifier=function(e,t={}){i("QualifiedTypeIdentifier",e,t)},t.assertStringLiteralTypeAnnotation=function(e,t={}){i("StringLiteralTypeAnnotation",e,t)},t.assertStringTypeAnnotation=function(e,t={}){i("StringTypeAnnotation",e,t)},t.assertThisTypeAnnotation=function(e,t={}){i("ThisTypeAnnotation",e,t)},t.assertTupleTypeAnnotation=function(e,t={}){i("TupleTypeAnnotation",e,t)},t.assertTypeofTypeAnnotation=function(e,t={}){i("TypeofTypeAnnotation",e,t)},t.assertTypeAlias=function(e,t={}){i("TypeAlias",e,t)},t.assertTypeAnnotation=function(e,t={}){i("TypeAnnotation",e,t)},t.assertTypeCastExpression=function(e,t={}){i("TypeCastExpression",e,t)},t.assertTypeParameter=function(e,t={}){i("TypeParameter",e,t)},t.assertTypeParameterDeclaration=function(e,t={}){i("TypeParameterDeclaration",e,t)},t.assertTypeParameterInstantiation=function(e,t={}){i("TypeParameterInstantiation",e,t)},t.assertUnionTypeAnnotation=function(e,t={}){i("UnionTypeAnnotation",e,t)},t.assertVariance=function(e,t={}){i("Variance",e,t)},t.assertVoidTypeAnnotation=function(e,t={}){i("VoidTypeAnnotation",e,t)},t.assertJSXAttribute=function(e,t={}){i("JSXAttribute",e,t)},t.assertJSXClosingElement=function(e,t={}){i("JSXClosingElement",e,t)},t.assertJSXElement=function(e,t={}){i("JSXElement",e,t)},t.assertJSXEmptyExpression=function(e,t={}){i("JSXEmptyExpression",e,t)},t.assertJSXExpressionContainer=function(e,t={}){i("JSXExpressionContainer",e,t)},t.assertJSXSpreadChild=function(e,t={}){i("JSXSpreadChild",e,t)},t.assertJSXIdentifier=function(e,t={}){i("JSXIdentifier",e,t)},t.assertJSXMemberExpression=function(e,t={}){i("JSXMemberExpression",e,t)},t.assertJSXNamespacedName=function(e,t={}){i("JSXNamespacedName",e,t)},t.assertJSXOpeningElement=function(e,t={}){i("JSXOpeningElement",e,t)},t.assertJSXSpreadAttribute=function(e,t={}){i("JSXSpreadAttribute",e,t)},t.assertJSXText=function(e,t={}){i("JSXText",e,t)},t.assertJSXFragment=function(e,t={}){i("JSXFragment",e,t)},t.assertJSXOpeningFragment=function(e,t={}){i("JSXOpeningFragment",e,t)},t.assertJSXClosingFragment=function(e,t={}){i("JSXClosingFragment",e,t)},t.assertNoop=function(e,t={}){i("Noop",e,t)},t.assertParenthesizedExpression=function(e,t={}){i("ParenthesizedExpression",e,t)},t.assertAwaitExpression=function(e,t={}){i("AwaitExpression",e,t)},t.assertBindExpression=function(e,t={}){i("BindExpression",e,t)},t.assertClassProperty=function(e,t={}){i("ClassProperty",e,t)},t.assertOptionalMemberExpression=function(e,t={}){i("OptionalMemberExpression",e,t)},t.assertOptionalCallExpression=function(e,t={}){i("OptionalCallExpression",e,t)},t.assertClassPrivateProperty=function(e,t={}){i("ClassPrivateProperty",e,t)},t.assertImport=function(e,t={}){i("Import",e,t)},t.assertDecorator=function(e,t={}){i("Decorator",e,t)},t.assertDoExpression=function(e,t={}){i("DoExpression",e,t)},t.assertExportDefaultSpecifier=function(e,t={}){i("ExportDefaultSpecifier",e,t)},t.assertExportNamespaceSpecifier=function(e,t={}){i("ExportNamespaceSpecifier",e,t)},t.assertPrivateName=function(e,t={}){i("PrivateName",e,t)},t.assertBigIntLiteral=function(e,t={}){i("BigIntLiteral",e,t)},t.assertTSParameterProperty=function(e,t={}){i("TSParameterProperty",e,t)},t.assertTSDeclareFunction=function(e,t={}){i("TSDeclareFunction",e,t)},t.assertTSDeclareMethod=function(e,t={}){i("TSDeclareMethod",e,t)},t.assertTSQualifiedName=function(e,t={}){i("TSQualifiedName",e,t)},t.assertTSCallSignatureDeclaration=function(e,t={}){i("TSCallSignatureDeclaration",e,t)},t.assertTSConstructSignatureDeclaration=function(e,t={}){i("TSConstructSignatureDeclaration",e,t)},t.assertTSPropertySignature=function(e,t={}){i("TSPropertySignature",e,t)},t.assertTSMethodSignature=function(e,t={}){i("TSMethodSignature",e,t)},t.assertTSIndexSignature=function(e,t={}){i("TSIndexSignature",e,t)},t.assertTSAnyKeyword=function(e,t={}){i("TSAnyKeyword",e,t)},t.assertTSNumberKeyword=function(e,t={}){i("TSNumberKeyword",e,t)},t.assertTSObjectKeyword=function(e,t={}){i("TSObjectKeyword",e,t)},t.assertTSBooleanKeyword=function(e,t={}){i("TSBooleanKeyword",e,t)},t.assertTSStringKeyword=function(e,t={}){i("TSStringKeyword",e,t)},t.assertTSSymbolKeyword=function(e,t={}){i("TSSymbolKeyword",e,t)},t.assertTSVoidKeyword=function(e,t={}){i("TSVoidKeyword",e,t)},t.assertTSUndefinedKeyword=function(e,t={}){i("TSUndefinedKeyword",e,t)},t.assertTSNullKeyword=function(e,t={}){i("TSNullKeyword",e,t)},t.assertTSNeverKeyword=function(e,t={}){i("TSNeverKeyword",e,t)},t.assertTSThisType=function(e,t={}){i("TSThisType",e,t)},t.assertTSFunctionType=function(e,t={}){i("TSFunctionType",e,t)},t.assertTSConstructorType=function(e,t={}){i("TSConstructorType",e,t)},t.assertTSTypeReference=function(e,t={}){i("TSTypeReference",e,t)},t.assertTSTypePredicate=function(e,t={}){i("TSTypePredicate",e,t)},t.assertTSTypeQuery=function(e,t={}){i("TSTypeQuery",e,t)},t.assertTSTypeLiteral=function(e,t={}){i("TSTypeLiteral",e,t)},t.assertTSArrayType=function(e,t={}){i("TSArrayType",e,t)},t.assertTSTupleType=function(e,t={}){i("TSTupleType",e,t)},t.assertTSUnionType=function(e,t={}){i("TSUnionType",e,t)},t.assertTSIntersectionType=function(e,t={}){i("TSIntersectionType",e,t)},t.assertTSConditionalType=function(e,t={}){i("TSConditionalType",e,t)},t.assertTSInferType=function(e,t={}){i("TSInferType",e,t)},t.assertTSParenthesizedType=function(e,t={}){i("TSParenthesizedType",e,t)},t.assertTSTypeOperator=function(e,t={}){i("TSTypeOperator",e,t)},t.assertTSIndexedAccessType=function(e,t={}){i("TSIndexedAccessType",e,t)},t.assertTSMappedType=function(e,t={}){i("TSMappedType",e,t)},t.assertTSLiteralType=function(e,t={}){i("TSLiteralType",e,t)},t.assertTSExpressionWithTypeArguments=function(e,t={}){i("TSExpressionWithTypeArguments",e,t)},t.assertTSInterfaceDeclaration=function(e,t={}){i("TSInterfaceDeclaration",e,t)},t.assertTSInterfaceBody=function(e,t={}){i("TSInterfaceBody",e,t)},t.assertTSTypeAliasDeclaration=function(e,t={}){i("TSTypeAliasDeclaration",e,t)},t.assertTSAsExpression=function(e,t={}){i("TSAsExpression",e,t)},t.assertTSTypeAssertion=function(e,t={}){i("TSTypeAssertion",e,t)},t.assertTSEnumDeclaration=function(e,t={}){i("TSEnumDeclaration",e,t)},t.assertTSEnumMember=function(e,t={}){i("TSEnumMember",e,t)},t.assertTSModuleDeclaration=function(e,t={}){i("TSModuleDeclaration",e,t)},t.assertTSModuleBlock=function(e,t={}){i("TSModuleBlock",e,t)},t.assertTSImportEqualsDeclaration=function(e,t={}){i("TSImportEqualsDeclaration",e,t)},t.assertTSExternalModuleReference=function(e,t={}){i("TSExternalModuleReference",e,t)},t.assertTSNonNullExpression=function(e,t={}){i("TSNonNullExpression",e,t)},t.assertTSExportAssignment=function(e,t={}){i("TSExportAssignment",e,t)},t.assertTSNamespaceExportDeclaration=function(e,t={}){i("TSNamespaceExportDeclaration",e,t)},t.assertTSTypeAnnotation=function(e,t={}){i("TSTypeAnnotation",e,t)},t.assertTSTypeParameterInstantiation=function(e,t={}){i("TSTypeParameterInstantiation",e,t)},t.assertTSTypeParameterDeclaration=function(e,t={}){i("TSTypeParameterDeclaration",e,t)},t.assertTSTypeParameter=function(e,t={}){i("TSTypeParameter",e,t)},t.assertExpression=function(e,t={}){i("Expression",e,t)},t.assertBinary=function(e,t={}){i("Binary",e,t)},t.assertScopable=function(e,t={}){i("Scopable",e,t)},t.assertBlockParent=function(e,t={}){i("BlockParent",e,t)},t.assertBlock=function(e,t={}){i("Block",e,t)},t.assertStatement=function(e,t={}){i("Statement",e,t)},t.assertTerminatorless=function(e,t={}){i("Terminatorless",e,t)},t.assertCompletionStatement=function(e,t={}){i("CompletionStatement",e,t)},t.assertConditional=function(e,t={}){i("Conditional",e,t)},t.assertLoop=function(e,t={}){i("Loop",e,t)},t.assertWhile=function(e,t={}){i("While",e,t)},t.assertExpressionWrapper=function(e,t={}){i("ExpressionWrapper",e,t)},t.assertFor=function(e,t={}){i("For",e,t)},t.assertForXStatement=function(e,t={}){i("ForXStatement",e,t)},t.assertFunction=function(e,t={}){i("Function",e,t)},t.assertFunctionParent=function(e,t={}){i("FunctionParent",e,t)},t.assertPureish=function(e,t={}){i("Pureish",e,t)},t.assertDeclaration=function(e,t={}){i("Declaration",e,t)},t.assertPatternLike=function(e,t={}){i("PatternLike",e,t)},t.assertLVal=function(e,t={}){i("LVal",e,t)},t.assertTSEntityName=function(e,t={}){i("TSEntityName",e,t)},t.assertLiteral=function(e,t={}){i("Literal",e,t)},t.assertImmutable=function(e,t={}){i("Immutable",e,t)},t.assertUserWhitespacable=function(e,t={}){i("UserWhitespacable",e,t)},t.assertMethod=function(e,t={}){i("Method",e,t)},t.assertObjectMember=function(e,t={}){i("ObjectMember",e,t)},t.assertProperty=function(e,t={}){i("Property",e,t)},t.assertUnaryLike=function(e,t={}){i("UnaryLike",e,t)},t.assertPattern=function(e,t={}){i("Pattern",e,t)},t.assertClass=function(e,t={}){i("Class",e,t)},t.assertModuleDeclaration=function(e,t={}){i("ModuleDeclaration",e,t)},t.assertExportDeclaration=function(e,t={}){i("ExportDeclaration",e,t)},t.assertModuleSpecifier=function(e,t={}){i("ModuleSpecifier",e,t)},t.assertFlow=function(e,t={}){i("Flow",e,t)},t.assertFlowType=function(e,t={}){i("FlowType",e,t)},t.assertFlowBaseAnnotation=function(e,t={}){i("FlowBaseAnnotation",e,t)},t.assertFlowDeclaration=function(e,t={}){i("FlowDeclaration",e,t)},t.assertFlowPredicate=function(e,t={}){i("FlowPredicate",e,t)},t.assertJSX=function(e,t={}){i("JSX",e,t)},t.assertPrivate=function(e,t={}){i("Private",e,t)},t.assertTSTypeElement=function(e,t={}){i("TSTypeElement",e,t)},t.assertTSType=function(e,t={}){i("TSType",e,t)},t.assertNumberLiteral=function(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral"),i("NumberLiteral",e,t)},t.assertRegexLiteral=function(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"),i("RegexLiteral",e,t)},t.assertRestProperty=function(e,t){console.trace("The node type RestProperty has been renamed to RestElement"),i("RestProperty",e,t)},t.assertSpreadProperty=function(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement"),i("SpreadProperty",e,t)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(59));function i(e,t,r){if(!(0,n.default)(e,t,r))throw new Error(`Expected type "${e}" with option ${JSON.stringify(r)}, but instead got "${t.type}".`)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"===e)return(0,n.stringTypeAnnotation)();if("number"===e)return(0,n.numberTypeAnnotation)();if("undefined"===e)return(0,n.voidTypeAnnotation)();if("boolean"===e)return(0,n.booleanTypeAnnotation)();if("function"===e)return(0,n.genericTypeAnnotation)((0,n.identifier)("Function"));if("object"===e)return(0,n.genericTypeAnnotation)((0,n.identifier)("Object"));if("symbol"===e)return(0,n.genericTypeAnnotation)((0,n.identifier)("Symbol"));throw new Error("Invalid typeof value")};var n=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,i.default)(e);return 1===t.length?t[0]:(0,n.unionTypeAnnotation)(t)};var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(r(105))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(22))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.default)(e);return t.loc=null,t};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(106))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,i){return(0,n.default)(e,t,[{type:i?"CommentLine":"CommentBlock",value:r}])};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(107))},function(e,t,r){var n=r(238);e.exports=function(e){return e&&e.length?n(e):[]}},function(e,t,r){var n=r(109),i=r(241),s=r(245),o=r(111),a=r(246),u=r(63),l=200;e.exports=function(e,t,r){var c=-1,p=i,f=e.length,h=!0,d=[],y=d;if(r)h=!1,p=s;else if(f>=l){var m=t?null:a(e);if(m)return u(m);h=!1,p=o,y=new n}else y=t?[]:d;e:for(;++c-1}},function(e,t){e.exports=function(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s{e[t]=null}),e};var n=r(13)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.PRIVATE_TYPES=t.JSX_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.FLOWTYPE_TYPES=t.FLOW_TYPES=t.MODULESPECIFIER_TYPES=t.EXPORTDECLARATION_TYPES=t.MODULEDECLARATION_TYPES=t.CLASS_TYPES=t.PATTERN_TYPES=t.UNARYLIKE_TYPES=t.PROPERTY_TYPES=t.OBJECTMEMBER_TYPES=t.METHOD_TYPES=t.USERWHITESPACABLE_TYPES=t.IMMUTABLE_TYPES=t.LITERAL_TYPES=t.TSENTITYNAME_TYPES=t.LVAL_TYPES=t.PATTERNLIKE_TYPES=t.DECLARATION_TYPES=t.PUREISH_TYPES=t.FUNCTIONPARENT_TYPES=t.FUNCTION_TYPES=t.FORXSTATEMENT_TYPES=t.FOR_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.WHILE_TYPES=t.LOOP_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.SCOPABLE_TYPES=t.BINARY_TYPES=t.EXPRESSION_TYPES=void 0;var n=r(6);const i=n.FLIPPED_ALIAS_KEYS.Expression;t.EXPRESSION_TYPES=i;const s=n.FLIPPED_ALIAS_KEYS.Binary;t.BINARY_TYPES=s;const o=n.FLIPPED_ALIAS_KEYS.Scopable;t.SCOPABLE_TYPES=o;const a=n.FLIPPED_ALIAS_KEYS.BlockParent;t.BLOCKPARENT_TYPES=a;const u=n.FLIPPED_ALIAS_KEYS.Block;t.BLOCK_TYPES=u;const l=n.FLIPPED_ALIAS_KEYS.Statement;t.STATEMENT_TYPES=l;const c=n.FLIPPED_ALIAS_KEYS.Terminatorless;t.TERMINATORLESS_TYPES=c;const p=n.FLIPPED_ALIAS_KEYS.CompletionStatement;t.COMPLETIONSTATEMENT_TYPES=p;const f=n.FLIPPED_ALIAS_KEYS.Conditional;t.CONDITIONAL_TYPES=f;const h=n.FLIPPED_ALIAS_KEYS.Loop;t.LOOP_TYPES=h;const d=n.FLIPPED_ALIAS_KEYS.While;t.WHILE_TYPES=d;const y=n.FLIPPED_ALIAS_KEYS.ExpressionWrapper;t.EXPRESSIONWRAPPER_TYPES=y;const m=n.FLIPPED_ALIAS_KEYS.For;t.FOR_TYPES=m;const g=n.FLIPPED_ALIAS_KEYS.ForXStatement;t.FORXSTATEMENT_TYPES=g;const v=n.FLIPPED_ALIAS_KEYS.Function;t.FUNCTION_TYPES=v;const b=n.FLIPPED_ALIAS_KEYS.FunctionParent;t.FUNCTIONPARENT_TYPES=b;const E=n.FLIPPED_ALIAS_KEYS.Pureish;t.PUREISH_TYPES=E;const T=n.FLIPPED_ALIAS_KEYS.Declaration;t.DECLARATION_TYPES=T;const A=n.FLIPPED_ALIAS_KEYS.PatternLike;t.PATTERNLIKE_TYPES=A;const x=n.FLIPPED_ALIAS_KEYS.LVal;t.LVAL_TYPES=x;const S=n.FLIPPED_ALIAS_KEYS.TSEntityName;t.TSENTITYNAME_TYPES=S;const P=n.FLIPPED_ALIAS_KEYS.Literal;t.LITERAL_TYPES=P;const D=n.FLIPPED_ALIAS_KEYS.Immutable;t.IMMUTABLE_TYPES=D;const w=n.FLIPPED_ALIAS_KEYS.UserWhitespacable;t.USERWHITESPACABLE_TYPES=w;const C=n.FLIPPED_ALIAS_KEYS.Method;t.METHOD_TYPES=C;const O=n.FLIPPED_ALIAS_KEYS.ObjectMember;t.OBJECTMEMBER_TYPES=O;const _=n.FLIPPED_ALIAS_KEYS.Property;t.PROPERTY_TYPES=_;const F=n.FLIPPED_ALIAS_KEYS.UnaryLike;t.UNARYLIKE_TYPES=F;const k=n.FLIPPED_ALIAS_KEYS.Pattern;t.PATTERN_TYPES=k;const I=n.FLIPPED_ALIAS_KEYS.Class;t.CLASS_TYPES=I;const N=n.FLIPPED_ALIAS_KEYS.ModuleDeclaration;t.MODULEDECLARATION_TYPES=N;const B=n.FLIPPED_ALIAS_KEYS.ExportDeclaration;t.EXPORTDECLARATION_TYPES=B;const j=n.FLIPPED_ALIAS_KEYS.ModuleSpecifier;t.MODULESPECIFIER_TYPES=j;const M=n.FLIPPED_ALIAS_KEYS.Flow;t.FLOW_TYPES=M;const L=n.FLIPPED_ALIAS_KEYS.FlowType;t.FLOWTYPE_TYPES=L;const R=n.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation;t.FLOWBASEANNOTATION_TYPES=R;const U=n.FLIPPED_ALIAS_KEYS.FlowDeclaration;t.FLOWDECLARATION_TYPES=U;const V=n.FLIPPED_ALIAS_KEYS.FlowPredicate;t.FLOWPREDICATE_TYPES=V;const W=n.FLIPPED_ALIAS_KEYS.JSX;t.JSX_TYPES=W;const K=n.FLIPPED_ALIAS_KEYS.Private;t.PRIVATE_TYPES=K;const q=n.FLIPPED_ALIAS_KEYS.TSTypeElement;t.TSTYPEELEMENT_TYPES=q;const Y=n.FLIPPED_ALIAS_KEYS.TSType;t.TSTYPE_TYPES=Y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="body"){return e[t]=(0,n.default)(e[t],e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(115))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"eval"!==(e=(0,n.default)(e))&&"arguments"!==e||(e="_"+e);return e};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(116))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.key||e.property){!e.computed&&(0,n.isIdentifier)(t)&&(t=(0,i.stringLiteral)(t.name));return t};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.isExpressionStatement)(e)&&(e=e.expression);if((0,n.isExpression)(e))return e;(0,n.isClass)(e)?e.type="ClassExpression":(0,n.isFunction)(e)&&(e.type="FunctionExpression");if(!(0,n.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e};var n=r(1)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(1),i=o(r(22)),s=o(r(117));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t=e.key){let r;return"method"===e.kind?a.increment()+"":(r=(0,n.isIdentifier)(t)?t.name:(0,n.isStringLiteral)(t)?JSON.stringify(t.value):JSON.stringify((0,s.default)((0,i.default)(t))),e.computed&&(r=`[${r}]`),e.static&&(r=`static:${r}`),r)}a.uid=0,a.increment=function(){return a.uid>=Number.MAX_SAFE_INTEGER?a.uid=0:a.uid++}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!e.length)return;const r=[],i=(0,n.default)(e,t,r);if(!i)return;for(const e of r)t.push(e);return i};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(256))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r,a){const u=[];let l=!0;for(const c of t)if(l=!1,(0,i.isExpression)(c))u.push(c);else if((0,i.isExpressionStatement)(c))u.push(c.expression);else if((0,i.isVariableDeclaration)(c)){if("var"!==c.kind)return;for(const e of c.declarations){const t=(0,n.default)(e);for(const e in t)a.push({kind:c.kind,id:(0,o.default)(t[e])});e.init&&u.push((0,s.assignmentExpression)("=",e.id,e.init))}l=!0}else if((0,i.isIfStatement)(c)){const t=c.consequent?e([c.consequent],r,a):r.buildUndefinedNode(),n=c.alternate?e([c.alternate],r,a):r.buildUndefinedNode();if(!t||!n)return;u.push((0,s.conditionalExpression)(c.test,t,n))}else if((0,i.isBlockStatement)(c)){const t=e(c.body,r,a);if(!t)return;u.push(t)}else{if(!(0,i.isEmptyStatement)(c))return;l=!0}l&&u.push(r.buildUndefinedNode());return 1===u.length?u[0]:(0,s.sequenceExpression)(u)};var n=a(r(36)),i=r(1),s=r(2),o=a(r(22));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.isStatement)(e))return e;let r,s=!1;if((0,n.isClass)(e))s=!0,r="ClassDeclaration";else if((0,n.isFunction)(e))s=!0,r="FunctionDeclaration";else if((0,n.isAssignmentExpression)(e))return(0,i.expressionStatement)(e);s&&!e.id&&(r=!1);if(!r){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=r,e};var n=r(1),i=r(2)},function(e,t,r){"use strict";function n(){const e=a(r(259));return n=function(){return e},e}function i(){const e=a(r(260));return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){if(void 0===t)return(0,o.identifier)("undefined");if(!0===t||!1===t)return(0,o.booleanLiteral)(t);if(null===t)return(0,o.nullLiteral)();if("string"==typeof t)return(0,o.stringLiteral)(t);if("number"==typeof t){let e;if(Number.isFinite(t))e=(0,o.numericLiteral)(Math.abs(t));else{let r;r=Number.isNaN(t)?(0,o.numericLiteral)(0):(0,o.numericLiteral)(1),e=(0,o.binaryExpression)("/",r,(0,o.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,o.unaryExpression)("-",e)),e}if((0,i().default)(t)){const e=t.source,r=t.toString().match(/\/([a-z]+|)$/)[1];return(0,o.regExpLiteral)(e,r)}if(Array.isArray(t))return(0,o.arrayExpression)(t.map(e));if((0,n().default)(t)){const r=[];for(const n in t){let i;i=(0,s.default)(n)?(0,o.identifier)(n):(0,o.stringLiteral)(n),r.push((0,o.objectProperty)(i,e(t[n])))}return(0,o.objectExpression)(r)}throw new Error("don't know how to turn this value into a node")};var s=a(r(21)),o=r(2);function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){var n=r(8),i=r(56),s=r(5),o="[object Object]",a=Function.prototype,u=Object.prototype,l=a.toString,c=u.hasOwnProperty,p=l.call(Object);e.exports=function(e){if(!s(e)||n(e)!=o)return!1;var t=i(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==p}},function(e,t,r){var n=r(261),i=r(20),s=r(34),o=s&&s.isRegExp,a=o?i(o):n;e.exports=a},function(e,t,r){var n=r(8),i=r(5),s="[object RegExp]";e.exports=function(e){return i(e)&&n(e)==s}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=!1){return e.object=(0,n.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e};var n=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return e;for(const r of n.INHERIT_KEYS.optional)null==e[r]&&(e[r]=t[r]);for(const r in t)"_"===r[0]&&"__clone"!==r&&(e[r]=t[r]);for(const r of n.INHERIT_KEYS.force)e[r]=t[r];return(0,i.default)(e,t),e};var n=r(13),i=function(e){return e&&e.__esModule?e:{default:e}}(r(113))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.object=(0,n.memberExpression)(t,e.object),e};var n=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e,t,!0)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(36))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){"function"==typeof t&&(t={enter:t});const{enter:i,exit:s}=t;!function e(t,r,i,s,o){const a=n.VISITOR_KEYS[t.type];if(!a)return;r&&r(t,o,s);for(const n of a){const a=t[n];if(Array.isArray(a))for(let u=0;u=0)return!0}else if(s===e)return!0}return!1};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(36))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.isFunctionDeclaration)(e)||(0,n.isClassDeclaration)(e)||(0,i.default)(e)};var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(120))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e.type,"Immutable"))return!0;if((0,i.isIdentifier)(e))return"undefined"===e.name;return!1};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(60)),i=r(1)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){if("object"!=typeof t||"object"!=typeof r||null==t||null==r)return t===r;if(t.type!==r.type)return!1;const i=Object.keys(n.NODE_FIELDS[t.type]||t.type);const s=n.VISITOR_KEYS[t.type];for(const n of i){if(typeof t[n]!=typeof r[n])return!1;if(Array.isArray(t[n])){if(!Array.isArray(r[n]))return!1;if(t[n].length!==r[n].length)return!1;for(let i=0;i0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"days":case"day":case"d":return a*s;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?function(e){return a(e,s,"day")||a(e,i,"hour")||a(e,n,"minute")||a(e,r,"second")||e+" ms"}(e):function(e){if(e>=s)return Math.round(e/s)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){var n=r(8),i=r(3),s=r(5),o="[object String]";e.exports=function(e){return"string"==typeof e||!i(e)&&s(e)&&n(e)==o}},function(e,t,r){var n=r(280),i=1/0,s=1.7976931348623157e308;e.exports=function(e){return e?(e=n(e))===i||e===-i?(e<0?-1:1)*s:e==e?e:0:0===e?e:0}},function(e,t,r){var n=r(9),i=r(23),s=NaN,o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return s;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=u.test(e);return r||l.test(e)?c(e.slice(2),r?2:8):a.test(e)?s:+e}},function(e,t,r){var n=r(282),i=r(17);e.exports=function(e){return null==e?[]:n(e,i(e))}},function(e,t,r){var n=r(67);e.exports=function(e,t){return n(t,function(t){return e[t]})}},function(e,t){var r=9007199254740991,n=Math.floor;e.exports=function(e,t){var i="";if(!e||t<1||t>r)return i;do{t%2&&(i+=e),(t=n(t/2))&&(e+=e)}while(t);return i}},function(e,t,r){var n=r(16),i=r(67),s=r(3),o=r(23),a=1/0,u=n?n.prototype:void 0,l=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(o(t))return l?l.call(t):"";var r=t+"";return"0"==r&&1/t==-a?"-0":r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;i(r(123));function n(){const e=i(r(286));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}const s={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration"(e,t){const r=e.getOuterBindingIdentifiers();for(const e in r)e===t.oldName&&(r[e].name=t.newName)}};t.default=class{constructor(e,t,r){this.newName=r,this.oldName=t,this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;t.isExportDeclaration()&&(t.isExportDefaultDeclaration()&&!t.get("declaration").node.id||(0,n().default)(t))}maybeConvertFromClassFunctionDeclaration(e){}maybeConvertFromClassFunctionExpression(e){}rename(e){const{binding:t,oldName:r,newName:n}=this,{scope:i,path:o}=t,a=o.find(e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression());a&&a.getOuterBindingIdentifiers()[r]===t.identifier&&this.maybeConvertFromExportDeclaration(a),i.traverse(e||i.block,s,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type,a&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))}}},function(e,t,r){"use strict";function n(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e.isExportDeclaration())throw new Error("Only export declarations can be splitted.");const t=e.isExportDefaultDeclaration(),r=e.get("declaration"),i=r.isClassDeclaration();if(t){const t=r.isFunctionDeclaration()||i,s=r.isScope()?r.scope.parent:r.scope;let o=r.node.id,a=!1;o||(a=!0,o=s.generateUidIdentifier("default"),(t||r.isFunctionExpression()||r.isClassExpression())&&(r.node.id=n().cloneNode(o)));const u=t?r:n().variableDeclaration("var",[n().variableDeclarator(n().cloneNode(o),r.node)]),l=n().exportNamedDeclaration(null,[n().exportSpecifier(n().cloneNode(o),n().identifier("default"))]);return e.insertAfter(l),e.replaceWith(u),a&&s.registerBinding(i?"let":"var",e),e}if(e.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");const s=r.getOuterBindingIdentifiers(),o=Object.keys(s).map(e=>n().exportSpecifier(n().identifier(e),n().identifier(e))),a=n().exportNamedDeclaration(null,o);return e.insertAfter(a),e.replaceWith(r.node),e}},function(e,t,r){var n=r(124),i=r(19),s=r(68),o=r(53),a=Object.prototype,u=a.hasOwnProperty,l=n(function(e,t){e=Object(e);var r=-1,n=t.length,l=n>2?t[2]:void 0;for(l&&s(t[0],t[1],l)&&(n=1);++r0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,r){"use strict";e.exports=r(295)},function(e){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es2015:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es2017:{Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{AbortController:!1,AbortSignal:!1,addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,"AudioWorkletGlobalScope ":!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,blur:!1,BroadcastChannel:!1,btoa:!1,BudgetService:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ConvolverNode:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSConditionRule:!1,CSSFontFaceRule:!1,CSSGroupingRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,defaultstatus:!1,defaultStatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FontFaceSetLoadEvent:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDeadline:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,isSecureContext:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyMessageEvent:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaSettingsRange:!1,MediaSource:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackEvent:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigationPreloadManager:!1,navigator:!1,Navigator:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!0,onabort:!0,onafterprint:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinstallprompt:!0,onbeforeprint:!0,onbeforeunload:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontextmenu:!0,oncuechange:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpageshow:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onsearch:!0,onseeked:!0,onseeking:!0,onselect:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitionend:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,origin:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,Path2D:!1,PaymentAddress:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,PhotoCapabilities:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,RadioNodeList:!1,Range:!1,ReadableStream:!1,registerProcessor:!1,RemotePlayback:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCIceCandidate:!1,RTCIceGatherer:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceEvent:!1,RTCRtpContributingSource:!1,RTCRtpReceiver:!1,RTCRtpSender:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedWorker:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageEvent:!1,StorageManager:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,TaskAttributionTiming:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,WritableStream:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,global:!1,Intl:!1,module:!1,process:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,URL:!1,URLSearchParams:!1},commonjs:{exports:!0,global:!1,module:!1,require:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fdescribe:!1,fit:!1,it:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{_:!1,$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{Cache:!1,caches:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},protractor:{$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1,URL:!1,URLSearchParams:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM:!1,GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},devtools:{$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1}}},function(e,t,r){"use strict";function n(){const e=function(e){return e&&e.__esModule?e:{default:e}}(r(125));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(e,t){this._cachedMap=null,this._code=t,this._opts=e,this._rawMappings=[]}get(){if(!this._cachedMap){const e=this._cachedMap=new(n().default.SourceMapGenerator)({sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName,t):"object"==typeof t&&Object.keys(t).forEach(r=>{e.setSourceContent(r,t[r])}),this._rawMappings.forEach(e.addMapping,e)}return this._cachedMap.toJSON()}getRawMappings(){return this._rawMappings.slice()}mark(e,t,r,n,i,s,o){this._lastGenLine!==e&&null===r||(o||this._lastGenLine!==e||this._lastSourceLine!==r||this._lastSourceColumn!==n)&&(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==r?void 0:s||this._opts.sourceFileName,original:null==r?void 0:{line:r,column:n}}))}}},function(e,t){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&er||i==r&&o>=s||n.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t,r){var n=r(24),i=r(300),s=r(128).ArraySet,o=r(127),a=r(301).quickSort;function u(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new p(t):new l(t)}function l(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=n.getArg(t,"version"),i=n.getArg(t,"sources"),o=n.getArg(t,"names",[]),a=n.getArg(t,"sourceRoot",null),u=n.getArg(t,"sourcesContent",null),l=n.getArg(t,"mappings"),c=n.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);i=i.map(String).map(n.normalize).map(function(e){return a&&n.isAbsolute(a)&&n.isAbsolute(e)?n.relative(a,e):e}),this._names=s.fromArray(o.map(String),!0),this._sources=s.fromArray(i,!0),this.sourceRoot=a,this.sourcesContent=u,this._mappings=l,this.file=c}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function p(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=n.getArg(t,"version"),i=n.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new s,this._names=new s;var o={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=n.getArg(e,"offset"),r=n.getArg(t,"line"),i=n.getArg(t,"column");if(r=0){var a=this._originalMappings[o];if(void 0===e.column)for(var u=a.originalLine;a&&a.originalLine===u;)s.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var l=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==l;)s.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return s},t.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var t=Object.create(l.prototype),r=t._names=s.fromArray(e._names.toArray(),!0),i=t._sources=s.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],p=t.__originalMappings=[],f=0,h=o.length;f1&&(r.source=y+s[1],y+=s[1],r.originalLine=h+s[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=d+s[3],d=r.originalColumn,s.length>4&&(r.name=m+s[4],m+=s[4])),A.push(r),"number"==typeof r.originalLine&&T.push(r)}a(A,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,a(T,n.compareByOriginalPositions),this.__originalMappings=T},l.prototype._findMapping=function(e,t,r,n,s,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return i.search(e,t,s,o)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=n.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=n.join(this.sourceRoot,s)));var o=n.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:n.getArg(i,"originalLine",null),column:n.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=n.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=n.urlParse(this.sourceRoot))){var i=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var t=n.getArg(e,"source");if(null!=this.sourceRoot&&(t=n.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var r={source:t=this._sources.indexOf(t),originalLine:n.getArg(e,"line"),originalColumn:n.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:n.getArg(s,"generatedLine",null),column:n.getArg(s,"generatedColumn",null),lastColumn:n.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=l,p.prototype=Object.create(u.prototype),p.prototype.constructor=u,p.prototype._version=3,Object.defineProperty(p.prototype,"sources",{get:function(){for(var e=[],t=0;t0?n-u>1?e(u,n,i,s,o,a):a==t.LEAST_UPPER_BOUND?n1?e(r,u,i,s,o,a):a==t.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,n,i||t.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===n(r[s],r[s-1],!0);)--s;return s}},function(e,t){function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t,i,s){if(i=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},a.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r{this[e.type](e,t)}),this._printTrailingComments(e,t),i&&this.token(")"),this._printStack.pop(),this.format.concise=r,this._insideAux=n}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}getPossibleRaw(e){const t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,r={}){if(!e||!e.length)return;r.indent&&this.indent();const n={addNewlines:r.addNewlines};for(let i=0;i0;r&&this.indent(),this.print(e,t),r&&this.dedent()}printBlock(e){const t=e.body;a().isEmptyStatement(t)||this.space(),this.print(t,e)}_printTrailingComments(e,t){this._printComments(this._getComments(!1,e,t))}_printLeadingComments(e,t){this._printComments(this._getComments(!0,e,t))}printInnerComments(e,t=!0){e.innerComments&&e.innerComments.length&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())}printSequence(e,t,r={}){return r.statement=!0,this.printJoin(e,t,r)}printList(e,t,r={}){return null==r.separator&&(r.separator=y),this.printJoin(e,t,r)}_printNewline(e,t,r,n){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();let i=0;if(this._buf.hasContent()){e||i++,n.addNewlines&&(i+=n.addNewlines(e,t)||0),(e?o.needsWhitespaceBefore:o.needsWhitespaceAfter)(t,r)&&i++}this.newline(i)}_getComments(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]}_printComment(e){if(!this.format.shouldPrintComment(e.value))return;if(e.ignore)return;if(this._printedComments.has(e))return;if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}const t="CommentBlock"===e.type;this.newline(this._buf.hasContent()&&!this._noLineTerminator&&t?1:0),this.endsWith("[")||this.endsWith("{")||this.space();let r=t||this._noLineTerminator?`/*${e.value}*/`:`//${e.value}\n`;if(t&&this.format.indent.adjustMultilineComment){const t=e.loc&&e.loc.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");r=r.replace(e,"\n")}const n=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,`\n${(0,i().default)(" ",n)}`)}this.endsWith("/")&&this._space(),this.withSource("start",e.loc,()=>{this._append(r)}),this.newline(t&&!this._noLineTerminator?1:0)}_printComments(e){if(e&&e.length)for(const t of e)this._printComment(t)}}function y(){this.token(","),this.space()}t.default=d,Object.assign(d.prototype,u)},function(e,t,r){var n=r(66);e.exports=function(e){return"number"==typeof e&&e==n(e)}},function(e,t,r){"use strict";function n(){const e=function(e){return e&&e.__esModule?e:{default:e}}(r(306));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=/^[ \t]+$/;t.default=class{constructor(e){this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._disallowedPop=null,this._map=e}get(){this._flush();const e=this._map,t={code:(0,n().default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get(){return this.map=e.get()},set(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t}append(e){this._flush();const{line:t,column:r,filename:n,identifierName:i,force:s}=this._sourcePosition;this._append(e,t,r,i,n,s)}queue(e){if("\n"===e)for(;this._queue.length>0&&i.test(this._queue[0][0]);)this._queue.shift();const{line:t,column:r,filename:n,identifierName:s,force:o}=this._sourcePosition;this._queue.unshift([e,t,r,s,n,o])}_flush(){let e;for(;e=this._queue.pop();)this._append(...e)}_append(e,t,r,n,i,s){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i,s),this._buf.push(e),this._last=e[e.length-1];for(let t=0;t0&&"\n"===this._queue[0][0]&&this._queue.shift()}removeLastSemicolon(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()}endsWith(e){if(1===e.length){let t;if(this._queue.length>0){const e=this._queue[0][0];t=e[e.length-1]}else t=this._last;return t===e}const t=this._last+this._queue.reduce((e,t)=>t[0]+e,"");return e.length<=t.length&&t.slice(-e.length)===e}hasContent(){return this._queue.length>0||!!this._last}exactSource(e,t){this.source("start",e,!0),t(),this.source("end",e),this._disallowPop("start",e)}source(e,t,r){e&&!t||this._normalizePosition(e,t,this._sourcePosition,r)}withSource(e,t,r){if(!this._map)return r();const n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,o=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.force&&this._sourcePosition.line===n&&this._sourcePosition.column===i&&this._sourcePosition.filename===s||this._disallowedPop&&this._disallowedPop.line===n&&this._disallowedPop.column===i&&this._disallowedPop.filename===s||(this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=o,this._sourcePosition.force=!1,this._disallowedPop=null)}_disallowPop(e,t){e&&!t||(this._disallowedPop=this._normalizePosition(e,t))}_normalizePosition(e,t,r,n){const i=t?t[e]:null;void 0===r&&(r={identifierName:null,line:null,column:null,filename:null,force:!1});const s=r.line,o=r.column,a=r.filename;return r.identifierName="start"===e&&t&&t.identifierName||null,r.line=i?i.line:null,r.column=i?i.column:null,r.filename=t&&t.filename||null,(n||r.line!==s||r.column!==o||r.filename!==a)&&(r.force=n),r}getCurrentColumn(){const e=this._queue.reduce((e,t)=>t[0]+e,""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t}getCurrentLine(){const e=this._queue.reduce((e,t)=>t[0]+e,"");let t=0;for(let r=0;r({before:e.consequent.length||t.cases[0]===e,after:!e.consequent.length&&t.cases[t.cases.length-1]===e}),LogicalExpression(e){if(n().isFunction(e.left)||n().isFunction(e.right))return{after:!0}},Literal(e){if("use strict"===e.value)return{after:!0}},CallExpression(e){if(n().isFunction(e.callee)||s(e))return{before:!0,after:!0}},VariableDeclaration(e){for(let t=0;te.declarations.map(e=>e.init),ArrayExpression:e=>e.elements,ObjectExpression:e=>e.properties};t.list=u,[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function([e,t]){"boolean"==typeof t&&(t={after:t,before:t}),[e].concat(n().FLIPPED_ALIAS_KEYS[e]||[]).forEach(function(e){a[e]=function(){return t}})})},function(e,t,r){"use strict";function n(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.FunctionTypeAnnotation=t.NullableTypeAnnotation=function(e,t){return n().isArrayTypeAnnotation(t)},t.UpdateExpression=function(e,t){return n().isMemberExpression(t,{object:e})||n().isCallExpression(t,{callee:e})||n().isNewExpression(t,{callee:e})||s(e,t)},t.ObjectExpression=function(e,t,r){return u(r,{considerArrow:!0})},t.DoExpression=function(e,t,r){return u(r)},t.Binary=function(e,t){if("**"===e.operator&&n().isBinaryExpression(t,{operator:"**"}))return t.left===e;if(s(e,t))return!0;if((n().isCallExpression(t)||n().isNewExpression(t))&&t.callee===e||n().isUnaryLike(t)||n().isMemberExpression(t)&&t.object===e||n().isAwaitExpression(t))return!0;if(n().isBinary(t)){const r=t.operator,s=i[r],o=e.operator,a=i[o];if(s===a&&t.right===e&&!n().isLogicalExpression(t)||s>a)return!0}return!1},t.IntersectionTypeAnnotation=t.UnionTypeAnnotation=function(e,t){return n().isArrayTypeAnnotation(t)||n().isNullableTypeAnnotation(t)||n().isIntersectionTypeAnnotation(t)||n().isUnionTypeAnnotation(t)},t.TSAsExpression=function(){return!0},t.TSTypeAssertion=function(){return!0},t.BinaryExpression=function(e,t){return"in"===e.operator&&(n().isVariableDeclarator(t)||n().isFor(t))},t.SequenceExpression=function(e,t){if(n().isForStatement(t)||n().isThrowStatement(t)||n().isReturnStatement(t)||n().isIfStatement(t)&&t.test===e||n().isWhileStatement(t)&&t.test===e||n().isForInStatement(t)&&t.right===e||n().isSwitchStatement(t)&&t.discriminant===e||n().isExpressionStatement(t)&&t.expression===e)return!1;return!0},t.AwaitExpression=t.YieldExpression=function(e,t){return n().isBinary(t)||n().isUnaryLike(t)||n().isCallExpression(t)||n().isMemberExpression(t)||n().isNewExpression(t)||n().isConditionalExpression(t)&&e===t.test||s(e,t)},t.ClassExpression=function(e,t,r){return u(r,{considerDefaultExports:!0})},t.UnaryLike=o,t.FunctionExpression=function(e,t,r){return u(r,{considerDefaultExports:!0})},t.ArrowFunctionExpression=function(e,t){return n().isExportDeclaration(t)||a(e,t)},t.ConditionalExpression=a,t.AssignmentExpression=function(e){return!!n().isObjectPattern(e.left)||a(...arguments)},t.NewExpression=function(e,t){return s(e,t)};const i={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10},s=(e,t)=>(n().isClassDeclaration(t)||n().isClassExpression(t))&&t.superClass===e;function o(e,t){return n().isMemberExpression(t,{object:e})||n().isCallExpression(t,{callee:e})||n().isNewExpression(t,{callee:e})||n().isBinaryExpression(t,{operator:"**",left:e})||s(e,t)}function a(e,t){return!!(n().isUnaryLike(t)||n().isBinary(t)||n().isConditionalExpression(t,{test:e})||n().isAwaitExpression(t)||n().isTaggedTemplateExpression(t)||n().isTSTypeAssertion(t)||n().isTSAsExpression(t))||o(e,t)}function u(e,{considerArrow:t=!1,considerDefaultExports:r=!1}={}){let i=e.length-1,s=e[i],o=e[--i];for(;i>0;){if(n().isExpressionStatement(o,{expression:s})||n().isTaggedTemplateExpression(o)||r&&n().isExportDefaultDeclaration(o,{declaration:s})||t&&n().isArrowFunctionExpression(o,{body:s}))return!0;if(!(n().isCallExpression(o,{callee:s})||n().isSequenceExpression(o)&&o.expressions[0]===s||n().isMemberExpression(o,{object:s})||n().isConditional(o,{test:s})||n().isBinary(o,{left:s})||n().isAssignmentExpression(o,{left:s})))return!1;s=o,o=e[--i]}return!1}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(310);Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})});var i=r(311);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var s=r(312);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})});var o=r(313);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var a=r(314);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var u=r(130);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})});var l=r(71);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})});var c=r(319);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})});var p=r(320);Object.keys(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})});var f=r(321);Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})});var h=r(322);Object.keys(h).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.typeParameters,e),this.print(e.quasi,e)},t.TemplateElement=function(e,t){const r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)},t.TemplateLiteral=function(e){const t=e.quasis;for(let r=0;r"),this.space(),this.print(e.body,e)}},function(e,t,r){"use strict";(function(t){const r={},n=r.hasOwnProperty,i=(e,t)=>{for(const r in e)n.call(e,r)&&t(r,e[r])},s=r.toString,o=Array.isArray,a=t.isBuffer,u={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},l=/["'\\\b\f\n\r\t]/,c=/[0-9]/,p=/[ !#-&\(-\[\]-~]/,f=(e,t)=>{const r=()=>{v=g,++t.indentLevel,g=t.indent.repeat(t.indentLevel)},n={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},h=t&&t.json;h&&(n.quotes="double",n.wrap=!0),"single"!=(t=((e,t)=>t?(i(t,(t,r)=>{e[t]=r}),e):e)(n,t)).quotes&&"double"!=t.quotes&&"backtick"!=t.quotes&&(t.quotes="single");const d="double"==t.quotes?'"':"backtick"==t.quotes?"`":"'",y=t.compact,m=t.lowercaseHex;let g=t.indent.repeat(t.indentLevel),v="";const b=t.__inline1__,E=t.__inline2__,T=y?"":"\n";let A,x=!0;const S="binary"==t.numbers,P="octal"==t.numbers,D="decimal"==t.numbers,w="hexadecimal"==t.numbers;if(h&&e&&(e=>"function"==typeof e)(e.toJSON)&&(e=e.toJSON()),!(e=>"string"==typeof e||"[object String]"==s.call(e))(e)){if((e=>"[object Map]"==s.call(e))(e))return 0==e.size?"new Map()":(y||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+f(Array.from(e),t)+")");if((e=>"[object Set]"==s.call(e))(e))return 0==e.size?"new Set()":"new Set("+f(Array.from(e),t)+")";if(a(e))return 0==e.length?"Buffer.from([])":"Buffer.from("+f(Array.from(e),t)+")";if(o(e))return A=[],t.wrap=!0,b&&(t.__inline1__=!1,t.__inline2__=!0),E||r(),((e,t)=>{const r=e.length;let n=-1;for(;++n{x=!1,E&&(t.__inline2__=!1),A.push((y||E?"":g)+f(e,t))}),x?"[]":E?"["+A.join(", ")+"]":"["+T+A.join(","+T)+T+(y?"":v)+"]";if(!(e=>"number"==typeof e||"[object Number]"==s.call(e))(e))return(e=>"[object Object]"==s.call(e))(e)?(A=[],t.wrap=!0,r(),i(e,(e,r)=>{x=!1,A.push((y?"":g)+f(e,t)+":"+(y?"":" ")+f(r,t))}),x?"{}":"{"+T+A.join(","+T)+T+(y?"":v)+"}"):h?JSON.stringify(e)||"null":String(e);if(h)return JSON.stringify(e);if(D)return String(e);if(w){let t=e.toString(16);return m||(t=t.toUpperCase()),"0x"+t}if(S)return"0b"+e.toString(2);if(P)return"0o"+e.toString(8)}const C=e;let O=-1;const _=C.length;for(A="";++O<_;){const e=C.charAt(O);if(t.es6){const e=C.charCodeAt(O);if(e>=55296&&e<=56319&&_>O+1){const t=C.charCodeAt(O+1);if(t>=56320&&t<=57343){let r=(1024*(e-55296)+t-56320+65536).toString(16);m||(r=r.toUpperCase()),A+="\\u{"+r+"}",++O;continue}}}if(!t.escapeEverything){if(p.test(e)){A+=e;continue}if('"'==e){A+=d==e?'\\"':e;continue}if("`"==e){A+=d==e?"\\`":e;continue}if("'"==e){A+=d==e?"\\'":e;continue}}if("\0"==e&&!h&&!c.test(C.charAt(O+1))){A+="\\0";continue}if(l.test(e)){A+=u[e];continue}const r=e.charCodeAt(0);if(t.minimal&&8232!=r&&8233!=r){A+=e;continue}let n=r.toString(16);m||(n=n.toUpperCase());const i=n.length>2||h,s="\\"+(i?"u":"x")+("0000"+n).slice(i?-4:-2);A+=s}return t.wrap&&(A=d+A+d),"`"==d&&(A=A.replace(/\$\{/g,"\\${")),t.isScriptContext?A.replace(/<\/(script|style)/gi,"<\\/$1").replace(/ regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this); - }, this); - - this.debug(this.pattern, set); - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1; - }); - - this.debug(this.pattern, set); - - this.set = set; - } - - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - - if (options.nonegate) return; - - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++) { - negate = !negate; - negateOffset++; - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - - // Brace expansion: - // a{b,c}d -> abd acd - // a{b,}c -> abc ac - // a{0..3}d -> a0d a1d a2d a3d - // a{b,c{d,e}f}g -> abg acdfg acefg - // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg - // - // Invalid sets are not expanded. - // a{2..}b -> a{2..}b - // a{b}c -> a{b}c - minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options); - }; - - Minimatch.prototype.braceExpand = braceExpand; - - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - - pattern = typeof pattern === 'undefined' ? this.pattern : pattern; - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern'); - } - - if (options.nobrace || !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern]; - } - - return expand(pattern); - } - - // parse a component of the expanded set. - // At this point, no pattern may contain "/" in it - // so we're going to return a 2d array, where each entry is the full - // pattern, split on '/', and then turned into a regular expression. - // A regexp is made at the end which joins each array with an - // escaped /, and another full one which joins each regexp with |. - // - // Following the lead of Bash 4.1, note that "**" only has special meaning - // when it is the *only* thing in a path portion. Otherwise, any series - // of * is equivalent to a single *. Globstar behavior is enabled by - // default, and can be disabled by setting options.noglobstar. - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long'); - } - - var options = this.options; - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR; - if (pattern === '') return ''; - - var re = ''; - var hasMagic = !!options.nocase; - var escaping = false; - // ? => one single character - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)'; - var self = this; - - function clearStateChar() { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star; - hasMagic = true; - break; - case '?': - re += qmark; - hasMagic = true; - break; - default: - re += '\\' + stateChar; - break; - } - self.debug('clearStateChar %j %j', stateChar, re); - stateChar = false; - } - } - - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c); - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c; - escaping = false; - continue; - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false; - - case '\\': - clearStateChar(); - escaping = true; - continue; - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class'); - if (c === '!' && i === classStart + 1) c = '^'; - re += c; - continue; - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar); - clearStateChar(); - stateChar = c; - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar(); - continue; - - case '(': - if (inClass) { - re += '('; - continue; - } - - if (!stateChar) { - re += '\\('; - continue; - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:'; - this.debug('plType %j %j', stateChar, re); - stateChar = false; - continue; - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)'; - continue; - } - - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close; - if (pl.type === '!') { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|'; - escaping = false; - continue; - } - - clearStateChar(); - re += '|'; - continue; - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar(); - - if (inClass) { - re += '\\' + c; - continue; - } - - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c; - escaping = false; - continue; - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i); - try { - RegExp('[' + cs + ']'); - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - } - - // finish up the class. - hasMagic = true; - inClass = false; - re += c; - continue; - - default: - // swallow any state char that wasn't consumed - clearStateChar(); - - if (escaping) { - // no need - escaping = false; - } else if (reSpecials[c] && !(c === '^' && inClass)) { - re += '\\'; - } - - re += c; - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + '\\[' + sp[0]; - hasMagic = hasMagic || sp[1]; - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug('setting tail', re, pl); - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\'; - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|'; - }); - - this.debug('tail=%j\n %s', tail, tail, pl, re); - var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; - - hasMagic = true; - re = re.slice(0, pl.reStart) + t + '\\(' + tail; - } - - // handle trailing things that only matter at the very end. - clearStateChar(); - if (escaping) { - // trailing \\ - re += '\\\\'; - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false; - switch (re.charAt(0)) { - case '.': - case '[': - case '(': - addPatternStart = true; - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - - nlLast += nlAfter; - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); - } - nlAfter = cleanAfter; - - var dollar = ''; - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$'; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re; - } - - if (addPatternStart) { - re = patternStart + re; - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern); - } - - var flags = options.nocase ? 'i' : ''; - try { - var regExp = new RegExp('^' + re + '$', flags); - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.'); - } - - regExp._glob = pattern; - regExp._src = re; - - return regExp; - } - - minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set; - - if (!set.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? 'i' : ''; - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return p === GLOBSTAR ? twoStar : typeof p === 'string' ? regExpEscape(p) : p._src; - }).join('\\\/'); - }).join('|'); - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$'; - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$'; - - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - - minimatch.match = function (list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function (f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - - Minimatch.prototype.match = match; - function match(f, partial) { - this.debug('match', f, this.pattern); - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false; - if (this.empty) return f === ''; - - if (f === '/' && partial) return true; - - var options = this.options; - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/'); - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit); - this.debug(this.pattern, 'split', f); - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set; - this.debug(this.pattern, 'set', set); - - // Find the basename of the path by looking for the last non-empty segment - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false; - return this.negate; - } - - // set partial to true to test if, for example, - // "/a/b" matches the start of "/*/b/*/d" - // Partial means, if you run out of file before you run - // out of pattern, then that's fine, as long as all - // the parts match. - Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options; - - this.debug('matchOne', { 'this': this, file: file, pattern: pattern }); - - this.debug('matchOne', file.length, pattern.length); - - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug('matchOne loop'); - var p = pattern[pi]; - var f = file[fi]; - - this.debug(pattern, p, f); - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false; - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]); - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug('** at the end'); - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false; - } - return true; - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr]; - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee); - // found a match. - return true; - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') { - this.debug('dot detected!', file, fr, pattern, pr); - break; - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue'); - fr++; - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit; - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase(); - } else { - hit = f === p; - } - this.debug('string match', p, f, hit); - } else { - hit = f.match(p); - this.debug('pattern match', p, f, hit); - } - - if (!hit) return false; - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true; - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial; - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = fi === fl - 1 && file[fi] === ''; - return emptyFileEnd; - } - - // should be unreachable. - throw new Error('wtf?'); - }; - - // replace stuff like \* with * - function globUnescape(s) { - return s.replace(/\\(.)/g, '$1'); - } - - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); - } -}); -$__System.registerDynamic('a3', [], true, function ($__require, exports, module) { - 'use strict'; - - var global = this || self, - GLOBAL = global; - module.exports = function (str) { - var isExtendedLengthPath = /^\\\\\?\\/.test(str); - var hasNonAscii = /[^\x00-\x80]+/.test(str); - - if (isExtendedLengthPath || hasNonAscii) { - return str; - } - - return str.replace(/\\/g, '/'); - }; -}); -$__System.registerDynamic("a4", ["17", "@node/util", "9a", "9d", "a2", "a5", "a6", "@node/path", "a3", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.inspect = exports.inherits = undefined; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _util = $__require("@node/util"); - - Object.defineProperty(exports, "inherits", { - enumerable: true, - get: function get() { - return _util.inherits; - } - }); - Object.defineProperty(exports, "inspect", { - enumerable: true, - get: function get() { - return _util.inspect; - } - }); - exports.canCompile = canCompile; - exports.list = list; - exports.regexify = regexify; - exports.arrayify = arrayify; - exports.booleanify = booleanify; - exports.shouldIgnore = shouldIgnore; - - var _escapeRegExp = $__require("9a"); - - var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp); - - var _startsWith = $__require("9d"); - - var _startsWith2 = _interopRequireDefault(_startsWith); - - var _minimatch = $__require("a2"); - - var _minimatch2 = _interopRequireDefault(_minimatch); - - var _includes = $__require("a5"); - - var _includes2 = _interopRequireDefault(_includes); - - var _isRegExp = $__require("a6"); - - var _isRegExp2 = _interopRequireDefault(_isRegExp); - - var _path = $__require("@node/path"); - - var _path2 = _interopRequireDefault(_path); - - var _slash = $__require("a3"); - - var _slash2 = _interopRequireDefault(_slash); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function canCompile(filename, altExts) { - var exts = altExts || canCompile.EXTENSIONS; - var ext = _path2.default.extname(filename); - return (0, _includes2.default)(exts, ext); - } - - canCompile.EXTENSIONS = [".js", ".jsx", ".es6", ".es"]; - - function list(val) { - if (!val) { - return []; - } else if (Array.isArray(val)) { - return val; - } else if (typeof val === "string") { - return val.split(","); - } else { - return [val]; - } - } - - function regexify(val) { - if (!val) { - return new RegExp(/.^/); - } - - if (Array.isArray(val)) { - val = new RegExp(val.map(_escapeRegExp2.default).join("|"), "i"); - } - - if (typeof val === "string") { - val = (0, _slash2.default)(val); - - if ((0, _startsWith2.default)(val, "./") || (0, _startsWith2.default)(val, "*/")) val = val.slice(2); - if ((0, _startsWith2.default)(val, "**/")) val = val.slice(3); - - var regex = _minimatch2.default.makeRe(val, { nocase: true }); - return new RegExp(regex.source.slice(1, -1), "i"); - } - - if ((0, _isRegExp2.default)(val)) { - return val; - } - - throw new TypeError("illegal type for regexify"); - } - - function arrayify(val, mapFn) { - if (!val) return []; - if (typeof val === "boolean") return arrayify([val], mapFn); - if (typeof val === "string") return arrayify(list(val), mapFn); - - if (Array.isArray(val)) { - if (mapFn) val = val.map(mapFn); - return val; - } - - return [val]; - } - - function booleanify(val) { - if (val === "true" || val == 1) { - return true; - } - - if (val === "false" || val == 0 || !val) { - return false; - } - - return val; - } - - function shouldIgnore(filename) { - var ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - var only = arguments[2]; - - filename = filename.replace(/\\/g, "/"); - - if (only) { - for (var _iterator = only, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var pattern = _ref; - - if (_shouldIgnore(pattern, filename)) return false; - } - return true; - } else if (ignore.length) { - for (var _iterator2 = ignore, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _pattern = _ref2; - - if (_shouldIgnore(_pattern, filename)) return true; - } - } - - return false; - } - - function _shouldIgnore(pattern, filename) { - if (typeof pattern === "function") { - return pattern(filename); - } else { - return pattern.test(filename); - } - } -}); -$__System.registerDynamic("a7", ["a3", "a4", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.filename = undefined; - exports.boolean = boolean; - exports.booleanString = booleanString; - exports.list = list; - - var _slash = $__require("a3"); - - var _slash2 = _interopRequireDefault(_slash); - - var _util = $__require("a4"); - - var util = _interopRequireWildcard(_util); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var filename = exports.filename = _slash2.default; - - function boolean(val) { - return !!val; - } - - function booleanString(val) { - return util.booleanify(val); - } - - function list(val) { - return util.list(val); - } -}); -$__System.registerDynamic("a8", ["a7", "a9", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.config = undefined; - exports.normaliseOptions = normaliseOptions; - - var _parsers = $__require("a7"); - - var parsers = _interopRequireWildcard(_parsers); - - var _config = $__require("a9"); - - var _config2 = _interopRequireDefault(_config); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - 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; - } - } - - exports.config = _config2.default; - function normaliseOptions() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - for (var key in options) { - var val = options[key]; - if (val == null) continue; - - var opt = _config2.default[key]; - if (opt && opt.alias) opt = _config2.default[opt.alias]; - if (!opt) continue; - - var parser = parsers[opt.type]; - if (parser) val = parser(val); - - options[key] = val; - } - - return options; - } -}); -$__System.registerDynamic("aa", ["c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.default = getPossiblePluginNames; - function getPossiblePluginNames(pluginName) { - return ["babel-plugin-" + pluginName, pluginName]; - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("ab", ["ac", "aa", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.default = resolvePlugin; - - var _resolveFromPossibleNames = $__require("ac"); - - var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames); - - var _getPossiblePluginNames = $__require("aa"); - - var _getPossiblePluginNames2 = _interopRequireDefault(_getPossiblePluginNames); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function resolvePlugin(pluginName) { - var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd(); - - return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePluginNames2.default)(pluginName), dirname); - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("ac", ["ad", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.default = resolveFromPossibleNames; - - var _resolve = $__require("ad"); - - var _resolve2 = _interopRequireDefault(_resolve); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function resolveFromPossibleNames(possibleNames, dirname) { - return possibleNames.reduce(function (accum, curr) { - return accum || (0, _resolve2.default)(curr, dirname); - }, null); - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("ae", ["c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.default = getPossiblePresetNames; - function getPossiblePresetNames(presetName) { - var possibleNames = ["babel-preset-" + presetName, presetName]; - - var matches = presetName.match(/^(@[^/]+)\/(.+)$/); - if (matches) { - var orgName = matches[1], - presetPath = matches[2]; - - possibleNames.push(orgName + "/babel-preset-" + presetPath); - } - - return possibleNames; - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("af", ["ac", "ae", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.default = resolvePreset; - - var _resolveFromPossibleNames = $__require("ac"); - - var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames); - - var _getPossiblePresetNames = $__require("ae"); - - var _getPossiblePresetNames2 = _interopRequireDefault(_getPossiblePresetNames); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function resolvePreset(presetName) { - var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd(); - - return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePresetNames2.default)(presetName), dirname); - } - module.exports = exports["default"]; -}); -$__System.registerDynamic('b0', ['b1'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseClone = $__require('b1'); - - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - - /** - * This method is like `_.cloneWith` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * } - * - * var el = _.cloneDeepWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 - */ - function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); - } - - module.exports = cloneDeepWith; -}); -$__System.registerDynamic("b2", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function (object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - module.exports = createBaseFor; -}); -$__System.registerDynamic('8b', ['b2'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var createBaseFor = $__require('b2'); - - /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - module.exports = baseFor; -}); -$__System.registerDynamic('b3', ['b4', '72'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseAssignValue = $__require('b4'), - eq = $__require('72'); - - /** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignMergeValue(object, key, value) { - if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) { - baseAssignValue(object, key, value); - } - } - - module.exports = assignMergeValue; -}); -$__System.registerDynamic('b5', ['3f', '7b'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var isArrayLike = $__require('3f'), - isObjectLike = $__require('7b'); - - /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); - } - - module.exports = isArrayLikeObject; -}); -$__System.registerDynamic('b6', ['b7', 'b8'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var copyObject = $__require('b7'), - keysIn = $__require('b8'); - - /** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ - function toPlainObject(value) { - return copyObject(value, keysIn(value)); - } - - module.exports = toPlainObject; -}); -$__System.registerDynamic('b9', ['b3', 'ba', 'bb', 'bc', 'bd', '62', '4b', 'b5', '79', 'be', '81', 'bf', '7a', 'b6'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var assignMergeValue = $__require('b3'), - cloneBuffer = $__require('ba'), - cloneTypedArray = $__require('bb'), - copyArray = $__require('bc'), - initCloneObject = $__require('bd'), - isArguments = $__require('62'), - isArray = $__require('4b'), - isArrayLikeObject = $__require('b5'), - isBuffer = $__require('79'), - isFunction = $__require('be'), - isObject = $__require('81'), - isPlainObject = $__require('bf'), - isTypedArray = $__require('7a'), - toPlainObject = $__require('b6'); - - /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } else { - newValue = []; - } - } else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } else if (!isObject(objValue) || srcIndex && isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); - } - - module.exports = baseMergeDeep; -}); -$__System.registerDynamic('c0', ['66', 'b3', '8b', 'b9', '81', 'b8'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var Stack = $__require('66'), - assignMergeValue = $__require('b3'), - baseFor = $__require('8b'), - baseMergeDeep = $__require('b9'), - isObject = $__require('81'), - keysIn = $__require('b8'); - - /** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function (srcValue, key) { - if (isObject(srcValue)) { - stack || (stack = new Stack()); - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } else { - var newValue = customizer ? customizer(object[key], srcValue, key + '', object, source, stack) : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); - } - - module.exports = baseMerge; -}); -$__System.registerDynamic('c1', ['c0', 'c2'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseMerge = $__require('c0'), - createAssigner = $__require('c2'); - - /** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; - * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } - */ - var mergeWith = createAssigner(function (object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); - }); - - module.exports = mergeWith; -}); -$__System.registerDynamic("c3", ["17", "c1", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (dest, src) { - if (!dest || !src) return; - - return (0, _mergeWith2.default)(dest, src, function (a, b) { - if (b && Array.isArray(a)) { - var newArray = b.slice(0); - - for (var _iterator = a, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var item = _ref; - - if (newArray.indexOf(item) < 0) { - newArray.push(item); - } - } - - return newArray; - } - }); - }; - - var _mergeWith = $__require("c1"); - - var _mergeWith2 = _interopRequireDefault(_mergeWith); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("a9", ["c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - module.exports = { - filename: { - type: "filename", - description: "filename to use when reading from stdin - this will be used in source-maps, errors etc", - default: "unknown", - shorthand: "f" - }, - - filenameRelative: { - hidden: true, - type: "string" - }, - - inputSourceMap: { - hidden: true - }, - - env: { - hidden: true, - default: {} - }, - - mode: { - description: "", - hidden: true - }, - - retainLines: { - type: "boolean", - default: false, - description: "retain line numbers - will result in really ugly code" - }, - - highlightCode: { - description: "enable/disable ANSI syntax highlighting of code frames (on by default)", - type: "boolean", - default: true - }, - - suppressDeprecationMessages: { - type: "boolean", - default: false, - hidden: true - }, - - presets: { - type: "list", - description: "", - default: [] - }, - - plugins: { - type: "list", - default: [], - description: "" - }, - - ignore: { - type: "list", - description: "list of glob paths to **not** compile", - default: [] - }, - - only: { - type: "list", - description: "list of glob paths to **only** compile" - }, - - code: { - hidden: true, - default: true, - type: "boolean" - }, - - metadata: { - hidden: true, - default: true, - type: "boolean" - }, - - ast: { - hidden: true, - default: true, - type: "boolean" - }, - - extends: { - type: "string", - hidden: true - }, - - comments: { - type: "boolean", - default: true, - description: "write comments to generated output (true by default)" - }, - - shouldPrintComment: { - hidden: true, - description: "optional callback to control whether a comment should be inserted, when this is used the comments option is ignored" - }, - - wrapPluginVisitorMethod: { - hidden: true, - description: "optional callback to wrap all visitor methods" - }, - - compact: { - type: "booleanString", - default: "auto", - description: "do not include superfluous whitespace characters and line terminators [true|false|auto]" - }, - - minified: { - type: "boolean", - default: false, - description: "save as much bytes when printing [true|false]" - }, - - sourceMap: { - alias: "sourceMaps", - hidden: true - }, - - sourceMaps: { - type: "booleanString", - description: "[true|false|inline]", - default: false, - shorthand: "s" - }, - - sourceMapTarget: { - type: "string", - description: "set `file` on returned source map" - }, - - sourceFileName: { - type: "string", - description: "set `sources[0]` on returned source map" - }, - - sourceRoot: { - type: "filename", - description: "the root from which all sources are relative" - }, - - babelrc: { - description: "Whether or not to look up .babelrc and .babelignore files", - type: "boolean", - default: true - }, - - sourceType: { - description: "", - default: "module" - }, - - auxiliaryCommentBefore: { - type: "string", - description: "print a comment before any injected non-user code" - }, - - auxiliaryCommentAfter: { - type: "string", - description: "print a comment after any injected non-user code" - }, - - resolveModuleSource: { - hidden: true - }, - - getModuleId: { - hidden: true - }, - - moduleRoot: { - type: "filename", - description: "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions" - }, - - moduleIds: { - type: "boolean", - default: false, - shorthand: "M", - description: "insert an explicit id for modules" - }, - - moduleId: { - description: "specify a custom name for module ids", - type: "string" - }, - - passPerPreset: { - description: "Whether to spawn a traversal pass per a preset. By default all presets are merged.", - type: "boolean", - default: false, - hidden: true - }, - - parserOpts: { - description: "Options to pass into the parser, or to change parsers (parserOpts.parser)", - default: false - }, - - generatorOpts: { - description: "Options to pass into the generator, or to change generators (generatorOpts.generator)", - default: false - } - }; -}); -$__System.registerDynamic("c4", ["c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - module.exports = { - "auxiliaryComment": { - "message": "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`" - }, - "blacklist": { - "message": "Put the specific transforms you want in the `plugins` option" - }, - "breakConfig": { - "message": "This is not a necessary option in Babel 6" - }, - "experimental": { - "message": "Put the specific transforms you want in the `plugins` option" - }, - "externalHelpers": { - "message": "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/" - }, - "extra": { - "message": "" - }, - "jsxPragma": { - "message": "use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/" - }, - - "loose": { - "message": "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option." - }, - "metadataUsedHelpers": { - "message": "Not required anymore as this is enabled by default" - }, - "modules": { - "message": "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules" - }, - "nonStandard": { - "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/" - }, - "optional": { - "message": "Put the specific transforms you want in the `plugins` option" - }, - "sourceMapName": { - "message": "Use the `sourceMapTarget` option" - }, - "stage": { - "message": "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets" - }, - "whitelist": { - "message": "Put the specific transforms you want in the `plugins` option" - } - }; -}); -$__System.registerDynamic('c5', ['c6', 'c7', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // 19.1.3.1 Object.assign(target, source) - var $export = $__require('c6'); - - $export($export.S + $export.F, 'Object', { assign: $__require('c7') }); -}); -$__System.registerDynamic('c8', ['c5', '37', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - $__require('c5'); - module.exports = $__require('37').Object.assign; -}); -$__System.registerDynamic("5a", ["c8"], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - module.exports = { "default": $__require("c8"), __esModule: true }; -}); -$__System.registerDynamic("ad", ["30", "@node/module", "@node/path", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _typeof2 = $__require("30"); - - var _typeof3 = _interopRequireDefault(_typeof2); - - exports.default = function (loc) { - var relative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd(); - - if ((typeof _module2.default === "undefined" ? "undefined" : (0, _typeof3.default)(_module2.default)) === "object") return null; - - var relativeMod = relativeModules[relative]; - - if (!relativeMod) { - relativeMod = new _module2.default(); - - var filename = _path2.default.join(relative, ".babelrc"); - relativeMod.id = filename; - relativeMod.filename = filename; - - relativeMod.paths = _module2.default._nodeModulePaths(relative); - relativeModules[relative] = relativeMod; - } - - try { - return _module2.default._resolveFilename(loc, relativeMod); - } catch (err) { - return null; - } - }; - - var _module = $__require("@node/module"); - - var _module2 = _interopRequireDefault(_module); - - var _path = $__require("@node/path"); - - var _path2 = _interopRequireDefault(_path); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var relativeModules = {}; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("c9", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - // json5.js - // Modern JSON. See README.md for details. - // - // This file is based directly off of Douglas Crockford's json_parse.js: - // https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js - - var JSON5 = typeof exports === 'object' ? exports : {}; - - JSON5.parse = function () { - "use strict"; - - // This is a function that can parse a JSON5 text, producing a JavaScript - // data structure. It is a simple, recursive descent parser. It does not use - // eval or regular expressions, so it can be used as a model for implementing - // a JSON5 parser in other languages. - - // We are defining the function inside of another function to avoid creating - // global variables. - - var at, - // The index of the current character - lineNumber, - // The current line number - columnNumber, - // The current column number - ch, - // The current character - escapee = { - "'": "'", - '"': '"', - '\\': '\\', - '/': '/', - '\n': '', // Replace escaped newlines in strings w/ empty string - b: '\b', - f: '\f', - n: '\n', - r: '\r', - t: '\t' - }, - ws = [' ', '\t', '\r', '\n', '\v', '\f', '\xA0', '\uFEFF'], - text, - renderChar = function (chr) { - return chr === '' ? 'EOF' : "'" + chr + "'"; - }, - error = function (m) { - - // Call error when something is wrong. - - var error = new SyntaxError(); - // 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 - error.message = m + " at line " + lineNumber + " column " + columnNumber + " of the JSON5 data. Still to read: " + JSON.stringify(text.substring(at - 1, at + 19)); - error.at = at; - // These two property names have been chosen to agree with the ones in Gecko, the only popular - // environment which seems to supply this info on JSON.parse - error.lineNumber = lineNumber; - error.columnNumber = columnNumber; - throw error; - }, - next = function (c) { - - // If a c parameter is provided, verify that it matches the current character. - - if (c && c !== ch) { - error("Expected " + renderChar(c) + " instead of " + renderChar(ch)); - } - - // Get the next character. When there are no more characters, - // return the empty string. - - ch = text.charAt(at); - at++; - columnNumber++; - if (ch === '\n' || ch === '\r' && peek() !== '\n') { - lineNumber++; - columnNumber = 0; - } - return ch; - }, - peek = function () { - - // Get the next character without consuming it or - // assigning it to the ch varaible. - - return text.charAt(at); - }, - identifier = function () { - - // Parse an identifier. Normally, reserved words are disallowed here, but we - // only use this for unquoted object keys, where reserved words are allowed, - // so we don't check for those here. References: - // - http://es5.github.com/#x7.6 - // - https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#Variables - // - http://docstore.mik.ua/orelly/webprog/jscript/ch02_07.htm - // TODO Identifiers can have Unicode "letters" in them; add support for those. - - var key = ch; - - // Identifiers must start with a letter, _ or $. - if (ch !== '_' && ch !== '$' && (ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z')) { - error("Bad identifier as unquoted key"); - } - - // Subsequent characters can contain digits. - while (next() && (ch === '_' || ch === '$' || ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || ch >= '0' && ch <= '9')) { - key += ch; - } - - return key; - }, - number = function () { - - // Parse a number value. - - var number, - sign = '', - string = '', - base = 10; - - if (ch === '-' || ch === '+') { - sign = ch; - next(ch); - } - - // support for Infinity (could tweak to allow other words): - if (ch === 'I') { - number = word(); - if (typeof number !== 'number' || isNaN(number)) { - error('Unexpected word for number'); - } - return sign === '-' ? -number : number; - } - - // support for NaN - if (ch === 'N') { - number = word(); - if (!isNaN(number)) { - error('expected word to be NaN'); - } - // ignore sign as -NaN also is NaN - return number; - } - - if (ch === '0') { - string += ch; - next(); - if (ch === 'x' || ch === 'X') { - string += ch; - next(); - base = 16; - } else if (ch >= '0' && ch <= '9') { - error('Octal literal'); - } - } - - switch (base) { - case 10: - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; - } - } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - } - break; - case 16: - while (ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'F' || ch >= 'a' && ch <= 'f') { - string += ch; - next(); - } - break; - } - - if (sign === '-') { - number = -string; - } else { - number = +string; - } - - if (!isFinite(number)) { - error("Bad number"); - } else { - return number; - } - }, - string = function () { - - // Parse a string value. - - var hex, - i, - string = '', - delim, - // double quote or single quote - uffff; - - // When parsing for string values, we must look for ' or " and \ characters. - - if (ch === '"' || ch === "'") { - delim = ch; - while (next()) { - if (ch === delim) { - next(); - return string; - } else if (ch === '\\') { - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (ch === '\r') { - if (peek() === '\n') { - next(); - } - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - } else if (ch === '\n') { - // unescaped newlines are invalid; see: - // https://github.com/aseemk/json5/issues/24 - // TODO this feels special-cased; are there other - // invalid unescaped chars? - break; - } else { - string += ch; - } - } - } - error("Bad string"); - }, - inlineComment = function () { - - // Skip an inline comment, assuming this is one. The current character should - // be the second / character in the // pair that begins this inline comment. - // To finish the inline comment, we look for a newline or the end of the text. - - if (ch !== '/') { - error("Not an inline comment"); - } - - do { - next(); - if (ch === '\n' || ch === '\r') { - next(); - return; - } - } while (ch); - }, - blockComment = function () { - - // Skip a block comment, assuming this is one. The current character should be - // the * character in the /* pair that begins this block comment. - // To finish the block comment, we look for an ending */ pair of characters, - // but we also watch for the end of text before the comment is terminated. - - if (ch !== '*') { - error("Not a block comment"); - } - - do { - next(); - while (ch === '*') { - next('*'); - if (ch === '/') { - next('/'); - return; - } - } - } while (ch); - - error("Unterminated block comment"); - }, - comment = function () { - - // Skip a comment, whether inline or block-level, assuming this is one. - // Comments always begin with a / character. - - if (ch !== '/') { - error("Not a comment"); - } - - next('/'); - - if (ch === '/') { - inlineComment(); - } else if (ch === '*') { - blockComment(); - } else { - error("Unrecognized comment"); - } - }, - white = function () { - - // Skip whitespace and comments. - // Note that we're detecting comments by only a single / character. - // This works since regular expressions are not valid JSON(5), but this will - // break if there are other valid values that begin with a / character! - - while (ch) { - if (ch === '/') { - comment(); - } else if (ws.indexOf(ch) >= 0) { - next(); - } else { - return; - } - } - }, - word = function () { - - // true, false, or null. - - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - case 'I': - next('I'); - next('n'); - next('f'); - next('i'); - next('n'); - next('i'); - next('t'); - next('y'); - return Infinity; - case 'N': - next('N'); - next('a'); - next('N'); - return NaN; - } - error("Unexpected " + renderChar(ch)); - }, - value, - // Place holder for the value function. - - array = function () { - - // Parse an array value. - - var array = []; - - if (ch === '[') { - next('['); - white(); - while (ch) { - if (ch === ']') { - next(']'); - return array; // Potentially empty array - } - // ES5 allows omitting elements in arrays, e.g. [,] and - // [,null]. We don't allow this in JSON5. - if (ch === ',') { - error("Missing array element"); - } else { - array.push(value()); - } - white(); - // If there's no comma after this value, this needs to - // be the end of the array. - if (ch !== ',') { - next(']'); - return array; - } - next(','); - white(); - } - } - error("Bad array"); - }, - object = function () { - - // Parse an object value. - - var key, - object = {}; - - if (ch === '{') { - next('{'); - white(); - while (ch) { - if (ch === '}') { - next('}'); - return object; // Potentially empty object - } - - // Keys can be unquoted. If they are, they need to be - // valid JS identifiers. - if (ch === '"' || ch === "'") { - key = string(); - } else { - key = identifier(); - } - - white(); - next(':'); - object[key] = value(); - white(); - // If there's no comma after this pair, this needs to be - // the end of the object. - if (ch !== ',') { - next('}'); - return object; - } - next(','); - white(); - } - } - error("Bad object"); - }; - - value = function () { - - // Parse a JSON value. It could be an object, an array, a string, a number, - // or a word. - - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - case "'": - return string(); - case '-': - case '+': - case '.': - return number(); - default: - return ch >= '0' && ch <= '9' ? number() : word(); - } - }; - - // Return the json_parse function. It will have access to all of the above - // functions and variables. - - return function (source, reviver) { - var result; - - text = String(source); - at = 0; - lineNumber = 1; - columnNumber = 1; - ch = ' '; - result = value(); - white(); - if (ch) { - error("Syntax error"); - } - - // If there is a reviver function, we recursively walk the new structure, - // passing each name/value pair to the reviver function for possible - // transformation, starting with a temporary root object that holds the result - // in an empty key. If there is not a reviver function, we simply return the - // result. - - return typeof reviver === 'function' ? function walk(holder, key) { - var k, - v, - value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - }({ '': result }, '') : result; - }; - }(); - - // JSON5 stringify will not quote keys where appropriate - JSON5.stringify = function (obj, replacer, space) { - if (replacer && typeof replacer !== "function" && !isArray(replacer)) { - throw new Error('Replacer must be a function or an array'); - } - var getReplacedValueOrUndefined = function (holder, key, isTopLevel) { - var value = holder[key]; - - // Replace the value with its toJSON value first, if possible - if (value && value.toJSON && typeof value.toJSON === "function") { - value = value.toJSON(); - } - - // If the user-supplied replacer if a function, call it. If it's an array, check objects' string keys for - // presence in the array (removing the key/value pair from the resulting JSON if the key is missing). - if (typeof replacer === "function") { - return replacer.call(holder, key, value); - } else if (replacer) { - if (isTopLevel || isArray(holder) || replacer.indexOf(key) >= 0) { - return value; - } else { - return undefined; - } - } else { - return value; - } - }; - - function isWordChar(c) { - return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '_' || c === '$'; - } - - function isWordStart(c) { - return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '_' || c === '$'; - } - - function isWord(key) { - if (typeof key !== 'string') { - return false; - } - if (!isWordStart(key[0])) { - return false; - } - var i = 1, - length = key.length; - while (i < length) { - if (!isWordChar(key[i])) { - return false; - } - i++; - } - return true; - } - - // export for use in tests - JSON5.isWord = isWord; - - // polyfills - function isArray(obj) { - if (Array.isArray) { - return Array.isArray(obj); - } else { - return Object.prototype.toString.call(obj) === '[object Array]'; - } - } - - function isDate(obj) { - return Object.prototype.toString.call(obj) === '[object Date]'; - } - - var objStack = []; - function checkForCircular(obj) { - for (var i = 0; i < objStack.length; i++) { - if (objStack[i] === obj) { - throw new TypeError("Converting circular structure to JSON"); - } - } - } - - function makeIndent(str, num, noNewLine) { - if (!str) { - return ""; - } - // indentation no more than 10 chars - if (str.length > 10) { - str = str.substring(0, 10); - } - - var indent = noNewLine ? "" : "\n"; - for (var i = 0; i < num; i++) { - indent += str; - } - - return indent; - } - - var indentStr; - if (space) { - if (typeof space === "string") { - indentStr = space; - } else if (typeof space === "number" && space >= 0) { - indentStr = makeIndent(" ", space, true); - } else { - // ignore space parameter - } - } - - // Copied from Crokford's implementation of JSON - // See https://github.com/douglascrockford/JSON-js/blob/e39db4b7e6249f04a195e7dd0840e610cc9e941e/json2.js#L195 - // Begin - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"': '\\"', - '\\': '\\\\' - }; - function escapeString(string) { - - // If the string contains no control characters, no quote characters, and no - // backslash characters, then we can safely slap some quotes around it. - // Otherwise we must also replace the offending characters with safe escape - // sequences. - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } - // End - - function internalStringify(holder, key, isTopLevel) { - var buffer, res; - - // Replace the value, if necessary - var obj_part = getReplacedValueOrUndefined(holder, key, isTopLevel); - - if (obj_part && !isDate(obj_part)) { - // unbox objects - // don't unbox dates, since will turn it into number - obj_part = obj_part.valueOf(); - } - switch (typeof obj_part) { - case "boolean": - return obj_part.toString(); - - case "number": - if (isNaN(obj_part) || !isFinite(obj_part)) { - return "null"; - } - return obj_part.toString(); - - case "string": - return escapeString(obj_part.toString()); - - case "object": - if (obj_part === null) { - return "null"; - } else if (isArray(obj_part)) { - checkForCircular(obj_part); - buffer = "["; - objStack.push(obj_part); - - for (var i = 0; i < obj_part.length; i++) { - res = internalStringify(obj_part, i, false); - buffer += makeIndent(indentStr, objStack.length); - if (res === null || typeof res === "undefined") { - buffer += "null"; - } else { - buffer += res; - } - if (i < obj_part.length - 1) { - buffer += ","; - } else if (indentStr) { - buffer += "\n"; - } - } - objStack.pop(); - if (obj_part.length) { - buffer += makeIndent(indentStr, objStack.length, true); - } - buffer += "]"; - } else { - checkForCircular(obj_part); - buffer = "{"; - var nonEmpty = false; - objStack.push(obj_part); - for (var prop in obj_part) { - if (obj_part.hasOwnProperty(prop)) { - var value = internalStringify(obj_part, prop, false); - isTopLevel = false; - if (typeof value !== "undefined" && value !== null) { - buffer += makeIndent(indentStr, objStack.length); - nonEmpty = true; - key = isWord(prop) ? prop : escapeString(prop); - buffer += key + ":" + (indentStr ? ' ' : '') + value + ","; - } - } - } - objStack.pop(); - if (nonEmpty) { - buffer = buffer.substring(0, buffer.length - 1) + makeIndent(indentStr, objStack.length) + "}"; - } else { - buffer = '{}'; - } - } - return buffer; - default: - // functions and undefined should be ignored - return undefined; - } - } - - // special case...when undefined is used inside of - // a compound object/array, return null. - // but when top-level, return undefined - var topLevelHolder = { "": obj }; - if (obj === undefined) { - return getReplacedValueOrUndefined(topLevelHolder, '', true); - } - return internalStringify(topLevelHolder, '', true); - }; -}); -$__System.registerDynamic('ca', ['c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - function posix(path) { - return path.charAt(0) === '/'; - } - - function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); - } - - module.exports = process.platform === 'win32' ? win32 : posix; - module.exports.posix = posix; - module.exports.win32 = win32; -}); -$__System.registerDynamic("cb", ["5a", "1d", "ad", "c9", "ca", "@node/path", "@node/fs", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _assign = $__require("5a"); - - var _assign2 = _interopRequireDefault(_assign); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - exports.default = buildConfigChain; - - var _resolve = $__require("ad"); - - var _resolve2 = _interopRequireDefault(_resolve); - - var _json = $__require("c9"); - - var _json2 = _interopRequireDefault(_json); - - var _pathIsAbsolute = $__require("ca"); - - var _pathIsAbsolute2 = _interopRequireDefault(_pathIsAbsolute); - - var _path = $__require("@node/path"); - - var _path2 = _interopRequireDefault(_path); - - var _fs = $__require("@node/fs"); - - var _fs2 = _interopRequireDefault(_fs); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var existsCache = {}; - var jsonCache = {}; - - var BABELIGNORE_FILENAME = ".babelignore"; - var BABELRC_FILENAME = ".babelrc"; - var PACKAGE_FILENAME = "package.json"; - - function exists(filename) { - var cached = existsCache[filename]; - if (cached == null) { - return existsCache[filename] = _fs2.default.existsSync(filename); - } else { - return cached; - } - } - - function buildConfigChain() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var log = arguments[1]; - - var filename = opts.filename; - var builder = new ConfigChainBuilder(log); - - if (opts.babelrc !== false) { - builder.findConfigs(filename); - } - - builder.mergeConfig({ - options: opts, - alias: "base", - dirname: filename && _path2.default.dirname(filename) - }); - - return builder.configs; - } - - var ConfigChainBuilder = function () { - function ConfigChainBuilder(log) { - (0, _classCallCheck3.default)(this, ConfigChainBuilder); - - this.resolvedConfigs = []; - this.configs = []; - this.log = log; - } - - ConfigChainBuilder.prototype.findConfigs = function findConfigs(loc) { - if (!loc) return; - - if (!(0, _pathIsAbsolute2.default)(loc)) { - loc = _path2.default.join(process.cwd(), loc); - } - - var foundConfig = false; - var foundIgnore = false; - - while (loc !== (loc = _path2.default.dirname(loc))) { - if (!foundConfig) { - var configLoc = _path2.default.join(loc, BABELRC_FILENAME); - if (exists(configLoc)) { - this.addConfig(configLoc); - foundConfig = true; - } - - var pkgLoc = _path2.default.join(loc, PACKAGE_FILENAME); - if (!foundConfig && exists(pkgLoc)) { - foundConfig = this.addConfig(pkgLoc, "babel", JSON); - } - } - - if (!foundIgnore) { - var ignoreLoc = _path2.default.join(loc, BABELIGNORE_FILENAME); - if (exists(ignoreLoc)) { - this.addIgnoreConfig(ignoreLoc); - foundIgnore = true; - } - } - - if (foundIgnore && foundConfig) return; - } - }; - - ConfigChainBuilder.prototype.addIgnoreConfig = function addIgnoreConfig(loc) { - var file = _fs2.default.readFileSync(loc, "utf8"); - var lines = file.split("\n"); - - lines = lines.map(function (line) { - return line.replace(/#(.*?)$/, "").trim(); - }).filter(function (line) { - return !!line; - }); - - if (lines.length) { - this.mergeConfig({ - options: { ignore: lines }, - alias: loc, - dirname: _path2.default.dirname(loc) - }); - } - }; - - ConfigChainBuilder.prototype.addConfig = function addConfig(loc, key) { - var json = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _json2.default; - - if (this.resolvedConfigs.indexOf(loc) >= 0) { - return false; - } - - this.resolvedConfigs.push(loc); - - var content = _fs2.default.readFileSync(loc, "utf8"); - var options = void 0; - - try { - options = jsonCache[content] = jsonCache[content] || json.parse(content); - if (key) options = options[key]; - } catch (err) { - err.message = loc + ": Error while parsing JSON - " + err.message; - throw err; - } - - this.mergeConfig({ - options: options, - alias: loc, - dirname: _path2.default.dirname(loc) - }); - - return !!options; - }; - - ConfigChainBuilder.prototype.mergeConfig = function mergeConfig(_ref) { - var options = _ref.options, - alias = _ref.alias, - loc = _ref.loc, - dirname = _ref.dirname; - - if (!options) { - return false; - } - - options = (0, _assign2.default)({}, options); - - dirname = dirname || process.cwd(); - loc = loc || alias; - - if (options.extends) { - var extendsLoc = (0, _resolve2.default)(options.extends, dirname); - if (extendsLoc) { - this.addConfig(extendsLoc); - } else { - if (this.log) this.log.error("Couldn't resolve extends clause of " + options.extends + " in " + alias); - } - delete options.extends; - } - - this.configs.push({ - options: options, - alias: alias, - loc: loc, - dirname: dirname - }); - - var envOpts = void 0; - var envKey = process.env.BABEL_ENV || "production" || "development"; - if (options.env) { - envOpts = options.env[envKey]; - delete options.env; - } - - this.mergeConfig({ - options: envOpts, - alias: alias + ".env." + envKey, - dirname: dirname - }); - }; - - return ConfigChainBuilder; - }(); - - module.exports = exports["default"]; -}); -$__System.registerDynamic("cc", ["99", "5b", "5a", "17", "30", "1d", "cd", "98", "f", "a8", "ab", "af", "b0", "ce", "c3", "a9", "c4", "cb", "@node/path", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _objectWithoutProperties2 = $__require("99"); - - var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - - var _stringify = $__require("5b"); - - var _stringify2 = _interopRequireDefault(_stringify); - - var _assign = $__require("5a"); - - var _assign2 = _interopRequireDefault(_assign); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _typeof2 = $__require("30"); - - var _typeof3 = _interopRequireDefault(_typeof2); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _node = $__require("cd"); - - var context = _interopRequireWildcard(_node); - - var _plugin2 = $__require("98"); - - var _plugin3 = _interopRequireDefault(_plugin2); - - var _babelMessages = $__require("f"); - - var messages = _interopRequireWildcard(_babelMessages); - - var _index = $__require("a8"); - - var _resolvePlugin = $__require("ab"); - - var _resolvePlugin2 = _interopRequireDefault(_resolvePlugin); - - var _resolvePreset = $__require("af"); - - var _resolvePreset2 = _interopRequireDefault(_resolvePreset); - - var _cloneDeepWith = $__require("b0"); - - var _cloneDeepWith2 = _interopRequireDefault(_cloneDeepWith); - - var _clone = $__require("ce"); - - var _clone2 = _interopRequireDefault(_clone); - - var _merge = $__require("c3"); - - var _merge2 = _interopRequireDefault(_merge); - - var _config2 = $__require("a9"); - - var _config3 = _interopRequireDefault(_config2); - - var _removed = $__require("c4"); - - var _removed2 = _interopRequireDefault(_removed); - - var _buildConfigChain = $__require("cb"); - - var _buildConfigChain2 = _interopRequireDefault(_buildConfigChain); - - var _path = $__require("@node/path"); - - var _path2 = _interopRequireDefault(_path); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var OptionManager = function () { - function OptionManager(log) { - (0, _classCallCheck3.default)(this, OptionManager); - - this.resolvedConfigs = []; - this.options = OptionManager.createBareOptions(); - this.log = log; - } - - OptionManager.memoisePluginContainer = function memoisePluginContainer(fn, loc, i, alias) { - for (var _iterator = OptionManager.memoisedPlugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var cache = _ref; - - if (cache.container === fn) return cache.plugin; - } - - var obj = void 0; - - if (typeof fn === "function") { - obj = fn(context); - } else { - obj = fn; - } - - if ((typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) === "object") { - var _plugin = new _plugin3.default(obj, alias); - OptionManager.memoisedPlugins.push({ - container: fn, - plugin: _plugin - }); - return _plugin; - } else { - throw new TypeError(messages.get("pluginNotObject", loc, i, typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) + loc + i); - } - }; - - OptionManager.createBareOptions = function createBareOptions() { - var opts = {}; - - for (var _key in _config3.default) { - var opt = _config3.default[_key]; - opts[_key] = (0, _clone2.default)(opt.default); - } - - return opts; - }; - - OptionManager.normalisePlugin = function normalisePlugin(plugin, loc, i, alias) { - plugin = plugin.__esModule ? plugin.default : plugin; - - if (!(plugin instanceof _plugin3.default)) { - if (typeof plugin === "function" || (typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)) === "object") { - plugin = OptionManager.memoisePluginContainer(plugin, loc, i, alias); - } else { - throw new TypeError(messages.get("pluginNotFunction", loc, i, typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin))); - } - } - - plugin.init(loc, i); - - return plugin; - }; - - OptionManager.normalisePlugins = function normalisePlugins(loc, dirname, plugins) { - return plugins.map(function (val, i) { - var plugin = void 0, - options = void 0; - - if (!val) { - throw new TypeError("Falsy value found in plugins"); - } - - if (Array.isArray(val)) { - plugin = val[0]; - options = val[1]; - } else { - plugin = val; - } - - var alias = typeof plugin === "string" ? plugin : loc + "$" + i; - - if (typeof plugin === "string") { - var pluginLoc = (0, _resolvePlugin2.default)(plugin, dirname); - if (pluginLoc) { - plugin = $__require(pluginLoc); - } else { - throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname)); - } - } - - plugin = OptionManager.normalisePlugin(plugin, loc, i, alias); - - return [plugin, options]; - }); - }; - - OptionManager.prototype.mergeOptions = function mergeOptions(_ref2) { - var _this = this; - - var rawOpts = _ref2.options, - extendingOpts = _ref2.extending, - alias = _ref2.alias, - loc = _ref2.loc, - dirname = _ref2.dirname; - - alias = alias || "foreign"; - if (!rawOpts) return; - - if ((typeof rawOpts === "undefined" ? "undefined" : (0, _typeof3.default)(rawOpts)) !== "object" || Array.isArray(rawOpts)) { - this.log.error("Invalid options type for " + alias, TypeError); - } - - var opts = (0, _cloneDeepWith2.default)(rawOpts, function (val) { - if (val instanceof _plugin3.default) { - return val; - } - }); - - dirname = dirname || process.cwd(); - loc = loc || alias; - - for (var _key2 in opts) { - var option = _config3.default[_key2]; - - if (!option && this.log) { - if (_removed2.default[_key2]) { - this.log.error("Using removed Babel 5 option: " + alias + "." + _key2 + " - " + _removed2.default[_key2].message, ReferenceError); - } else { - var unknownOptErr = "Unknown option: " + alias + "." + _key2 + ". Check out http://babeljs.io/docs/usage/options/ for more information about options."; - 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."; - - this.log.error(unknownOptErr + "\n\n" + presetConfigErr, ReferenceError); - } - } - } - - (0, _index.normaliseOptions)(opts); - - if (opts.plugins) { - opts.plugins = OptionManager.normalisePlugins(loc, dirname, opts.plugins); - } - - if (opts.presets) { - if (opts.passPerPreset) { - opts.presets = this.resolvePresets(opts.presets, dirname, function (preset, presetLoc) { - _this.mergeOptions({ - options: preset, - extending: preset, - alias: presetLoc, - loc: presetLoc, - dirname: dirname - }); - }); - } else { - this.mergePresets(opts.presets, dirname); - delete opts.presets; - } - } - - if (rawOpts === extendingOpts) { - (0, _assign2.default)(extendingOpts, opts); - } else { - (0, _merge2.default)(extendingOpts || this.options, opts); - } - }; - - OptionManager.prototype.mergePresets = function mergePresets(presets, dirname) { - var _this2 = this; - - this.resolvePresets(presets, dirname, function (presetOpts, presetLoc) { - _this2.mergeOptions({ - options: presetOpts, - alias: presetLoc, - loc: presetLoc, - dirname: _path2.default.dirname(presetLoc || "") - }); - }); - }; - - OptionManager.prototype.resolvePresets = function resolvePresets(presets, dirname, onResolve) { - return presets.map(function (val) { - var options = void 0; - if (Array.isArray(val)) { - if (val.length > 2) { - throw new Error("Unexpected extra options " + (0, _stringify2.default)(val.slice(2)) + " passed to preset."); - } - - var _val = val; - val = _val[0]; - options = _val[1]; - } - - var presetLoc = void 0; - try { - if (typeof val === "string") { - presetLoc = (0, _resolvePreset2.default)(val, dirname); - - if (!presetLoc) { - throw new Error("Couldn't find preset " + (0, _stringify2.default)(val) + " relative to directory " + (0, _stringify2.default)(dirname)); - } - - val = $__require(presetLoc); - } - - if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.__esModule) { - if (val.default) { - val = val.default; - } else { - var _val2 = val, - __esModule = _val2.__esModule, - rest = (0, _objectWithoutProperties3.default)(_val2, ["__esModule"]); - - val = rest; - } - } - - if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.buildPreset) val = val.buildPreset; - - if (typeof val !== "function" && options !== undefined) { - throw new Error("Options " + (0, _stringify2.default)(options) + " passed to " + (presetLoc || "a preset") + " which does not accept options."); - } - - if (typeof val === "function") val = val(context, options, { dirname: dirname }); - - if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) !== "object") { - throw new Error("Unsupported preset format: " + val + "."); - } - - onResolve && onResolve(val, presetLoc); - } catch (e) { - if (presetLoc) { - e.message += " (While processing preset: " + (0, _stringify2.default)(presetLoc) + ")"; - } - throw e; - } - return val; - }); - }; - - OptionManager.prototype.normaliseOptions = function normaliseOptions() { - var opts = this.options; - - for (var _key3 in _config3.default) { - var option = _config3.default[_key3]; - var val = opts[_key3]; - - if (!val && option.optional) continue; - - if (option.alias) { - opts[option.alias] = opts[option.alias] || val; - } else { - opts[_key3] = val; - } - } - }; - - OptionManager.prototype.init = function init() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - for (var _iterator2 = (0, _buildConfigChain2.default)(opts, this.log), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var _config = _ref3; - - this.mergeOptions(_config); - } - - this.normaliseOptions(opts); - - return this.options; - }; - - return OptionManager; - }(); - - exports.default = OptionManager; - - OptionManager.memoisedPlugins = []; - module.exports = exports["default"]; -}); -$__System.registerDynamic("1b", ["cf", "1d", "1e", "1f", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _map = $__require("cf"); - - var _map2 = _interopRequireDefault(_map); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _possibleConstructorReturn2 = $__require("1e"); - - var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - - var _inherits2 = $__require("1f"); - - var _inherits3 = _interopRequireDefault(_inherits2); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var Store = function (_Map) { - (0, _inherits3.default)(Store, _Map); - - function Store() { - (0, _classCallCheck3.default)(this, Store); - - var _this = (0, _possibleConstructorReturn3.default)(this, _Map.call(this)); - - _this.dynamicData = {}; - return _this; - } - - Store.prototype.setDynamic = function setDynamic(key, fn) { - this.dynamicData[key] = fn; - }; - - Store.prototype.get = function get(key) { - if (this.has(key)) { - return _Map.prototype.get.call(this, key); - } else { - if (Object.prototype.hasOwnProperty.call(this.dynamicData, key)) { - var val = this.dynamicData[key](); - this.set(key, val); - return val; - } - } - }; - - return Store; - }(_map2.default); - - exports.default = Store; - module.exports = exports["default"]; -}); -$__System.registerDynamic("98", ["17", "1d", "1e", "1f", "cc", "f", "1b", "d0", "d1", "ce", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _possibleConstructorReturn2 = $__require("1e"); - - var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - - var _inherits2 = $__require("1f"); - - var _inherits3 = _interopRequireDefault(_inherits2); - - var _optionManager = $__require("cc"); - - var _optionManager2 = _interopRequireDefault(_optionManager); - - var _babelMessages = $__require("f"); - - var messages = _interopRequireWildcard(_babelMessages); - - var _store = $__require("1b"); - - var _store2 = _interopRequireDefault(_store); - - var _babelTraverse = $__require("d0"); - - var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - - var _assign = $__require("d1"); - - var _assign2 = _interopRequireDefault(_assign); - - var _clone = $__require("ce"); - - var _clone2 = _interopRequireDefault(_clone); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var GLOBAL_VISITOR_PROPS = ["enter", "exit"]; - - var Plugin = function (_Store) { - (0, _inherits3.default)(Plugin, _Store); - - function Plugin(plugin, key) { - (0, _classCallCheck3.default)(this, Plugin); - - var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this)); - - _this.initialized = false; - _this.raw = (0, _assign2.default)({}, plugin); - _this.key = _this.take("name") || key; - - _this.manipulateOptions = _this.take("manipulateOptions"); - _this.post = _this.take("post"); - _this.pre = _this.take("pre"); - _this.visitor = _this.normaliseVisitor((0, _clone2.default)(_this.take("visitor")) || {}); - return _this; - } - - Plugin.prototype.take = function take(key) { - var val = this.raw[key]; - delete this.raw[key]; - return val; - }; - - Plugin.prototype.chain = function chain(target, key) { - if (!target[key]) return this[key]; - if (!this[key]) return target[key]; - - var fns = [target[key], this[key]]; - - return function () { - var val = void 0; - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var fn = _ref; - - if (fn) { - var ret = fn.apply(this, args); - if (ret != null) val = ret; - } - } - return val; - }; - }; - - Plugin.prototype.maybeInherit = function maybeInherit(loc) { - var inherits = this.take("inherits"); - if (!inherits) return; - - inherits = _optionManager2.default.normalisePlugin(inherits, loc, "inherits"); - - this.manipulateOptions = this.chain(inherits, "manipulateOptions"); - this.post = this.chain(inherits, "post"); - this.pre = this.chain(inherits, "pre"); - this.visitor = _babelTraverse2.default.visitors.merge([inherits.visitor, this.visitor]); - }; - - Plugin.prototype.init = function init(loc, i) { - if (this.initialized) return; - this.initialized = true; - - this.maybeInherit(loc); - - for (var key in this.raw) { - throw new Error(messages.get("pluginInvalidProperty", loc, i, key)); - } - }; - - Plugin.prototype.normaliseVisitor = function normaliseVisitor(visitor) { - for (var _iterator2 = GLOBAL_VISITOR_PROPS, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var key = _ref2; - - if (visitor[key]) { - throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. " + "Please target individual nodes."); - } - } - - _babelTraverse2.default.explode(visitor); - return visitor; - }; - - return Plugin; - }(_store2.default); - - exports.default = Plugin; - module.exports = exports["default"]; -}); -$__System.registerDynamic("d2", ["d3", "98", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _symbol = $__require("d3"); - - var _symbol2 = _interopRequireDefault(_symbol); - - var _plugin = $__require("98"); - - var _plugin2 = _interopRequireDefault(_plugin); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var SUPER_THIS_BOUND = (0, _symbol2.default)("super this bound"); - - var superVisitor = { - CallExpression: function CallExpression(path) { - if (!path.get("callee").isSuper()) return; - - var node = path.node; - - if (node[SUPER_THIS_BOUND]) return; - node[SUPER_THIS_BOUND] = true; - - path.replaceWith(t.assignmentExpression("=", this.id, node)); - } - }; - - exports.default = new _plugin2.default({ - name: "internal.shadowFunctions", - - visitor: { - ThisExpression: function ThisExpression(path) { - remap(path, "this"); - }, - ReferencedIdentifier: function ReferencedIdentifier(path) { - if (path.node.name === "arguments") { - remap(path, "arguments"); - } - } - } - }); - - function shouldShadow(path, shadowPath) { - if (path.is("_forceShadow")) { - return true; - } else { - return shadowPath; - } - } - - function remap(path, key) { - var shadowPath = path.inShadow(key); - if (!shouldShadow(path, shadowPath)) return; - - var shadowFunction = path.node._shadowedFunctionLiteral; - - var currentFunction = void 0; - var passedShadowFunction = false; - - var fnPath = path.find(function (innerPath) { - if (innerPath.parentPath && innerPath.parentPath.isClassProperty() && innerPath.key === "value") { - return true; - } - if (path === innerPath) return false; - if (innerPath.isProgram() || innerPath.isFunction()) { - currentFunction = currentFunction || innerPath; - } - - if (innerPath.isProgram()) { - passedShadowFunction = true; - - return true; - } else if (innerPath.isFunction() && !innerPath.isArrowFunctionExpression()) { - if (shadowFunction) { - if (innerPath === shadowFunction || innerPath.node === shadowFunction.node) return true; - } else { - if (!innerPath.is("shadow")) return true; - } - - passedShadowFunction = true; - return false; - } - - return false; - }); - - if (shadowFunction && fnPath.isProgram() && !shadowFunction.isProgram()) { - fnPath = path.findParent(function (p) { - return p.isProgram() || p.isFunction(); - }); - } - - if (fnPath === currentFunction) return; - - if (!passedShadowFunction) return; - - var cached = fnPath.getData(key); - if (cached) return path.replaceWith(cached); - - var id = path.scope.generateUidIdentifier(key); - - fnPath.setData(key, id); - - var classPath = fnPath.findParent(function (p) { - return p.isClass(); - }); - var hasSuperClass = !!(classPath && classPath.node && classPath.node.superClass); - - if (key === "this" && fnPath.isMethod({ kind: "constructor" }) && hasSuperClass) { - fnPath.scope.push({ id: id }); - - fnPath.traverse(superVisitor, { id: id }); - } else { - var init = key === "this" ? t.thisExpression() : t.identifier(key); - - if (shadowFunction) init._shadowedFunctionLiteral = shadowFunction; - - fnPath.scope.push({ id: id, init: init }); - } - - return path.replaceWith(id); - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("1c", ["17", "d4", "5a", "1d", "1e", "1f", "d", "16", "18", "cc", "1a", "d0", "2e", "e", "d5", "d6", "5f", "1b", "d7", "a4", "@node/path", "11", "ad", "97", "d2", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.File = undefined; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _create = $__require("d4"); - - var _create2 = _interopRequireDefault(_create); - - var _assign = $__require("5a"); - - var _assign2 = _interopRequireDefault(_assign); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _possibleConstructorReturn2 = $__require("1e"); - - var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - - var _inherits2 = $__require("1f"); - - var _inherits3 = _interopRequireDefault(_inherits2); - - var _babelHelpers = $__require("d"); - - var _babelHelpers2 = _interopRequireDefault(_babelHelpers); - - var _metadata = $__require("16"); - - var metadataVisitor = _interopRequireWildcard(_metadata); - - var _convertSourceMap = $__require("18"); - - var _convertSourceMap2 = _interopRequireDefault(_convertSourceMap); - - var _optionManager = $__require("cc"); - - var _optionManager2 = _interopRequireDefault(_optionManager); - - var _pluginPass = $__require("1a"); - - var _pluginPass2 = _interopRequireDefault(_pluginPass); - - var _babelTraverse = $__require("d0"); - - var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - - var _sourceMap = $__require("2e"); - - var _sourceMap2 = _interopRequireDefault(_sourceMap); - - var _babelGenerator = $__require("e"); - - var _babelGenerator2 = _interopRequireDefault(_babelGenerator); - - var _babelCodeFrame = $__require("d5"); - - var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame); - - var _defaults = $__require("d6"); - - var _defaults2 = _interopRequireDefault(_defaults); - - var _logger = $__require("5f"); - - var _logger2 = _interopRequireDefault(_logger); - - var _store = $__require("1b"); - - var _store2 = _interopRequireDefault(_store); - - var _babylon = $__require("d7"); - - var _util = $__require("a4"); - - var util = _interopRequireWildcard(_util); - - var _path = $__require("@node/path"); - - var _path2 = _interopRequireDefault(_path); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _resolve = $__require("ad"); - - var _resolve2 = _interopRequireDefault(_resolve); - - var _blockHoist = $__require("97"); - - var _blockHoist2 = _interopRequireDefault(_blockHoist); - - var _shadowFunctions = $__require("d2"); - - var _shadowFunctions2 = _interopRequireDefault(_shadowFunctions); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var shebangRegex = /^#!.*/; - - var INTERNAL_PLUGINS = [[_blockHoist2.default], [_shadowFunctions2.default]]; - - var errorVisitor = { - enter: function enter(path, state) { - var loc = path.node.loc; - if (loc) { - state.loc = loc; - path.stop(); - } - } - }; - - var File = function (_Store) { - (0, _inherits3.default)(File, _Store); - - function File() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var pipeline = arguments[1]; - (0, _classCallCheck3.default)(this, File); - - var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this)); - - _this.pipeline = pipeline; - - _this.log = new _logger2.default(_this, opts.filename || "unknown"); - _this.opts = _this.initOptions(opts); - - _this.parserOpts = { - sourceType: _this.opts.sourceType, - sourceFileName: _this.opts.filename, - plugins: [] - }; - - _this.pluginVisitors = []; - _this.pluginPasses = []; - - _this.buildPluginsForOptions(_this.opts); - - if (_this.opts.passPerPreset) { - _this.perPresetOpts = []; - _this.opts.presets.forEach(function (presetOpts) { - var perPresetOpts = (0, _assign2.default)((0, _create2.default)(_this.opts), presetOpts); - _this.perPresetOpts.push(perPresetOpts); - _this.buildPluginsForOptions(perPresetOpts); - }); - } - - _this.metadata = { - usedHelpers: [], - marked: [], - modules: { - imports: [], - exports: { - exported: [], - specifiers: [] - } - } - }; - - _this.dynamicImportTypes = {}; - _this.dynamicImportIds = {}; - _this.dynamicImports = []; - _this.declarations = {}; - _this.usedHelpers = {}; - - _this.path = null; - _this.ast = {}; - - _this.code = ""; - _this.shebang = ""; - - _this.hub = new _babelTraverse.Hub(_this); - return _this; - } - - File.prototype.getMetadata = function getMetadata() { - var has = false; - for (var _iterator = this.ast.program.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var node = _ref; - - if (t.isModuleDeclaration(node)) { - has = true; - break; - } - } - if (has) { - this.path.traverse(metadataVisitor, this); - } - }; - - File.prototype.initOptions = function initOptions(opts) { - opts = new _optionManager2.default(this.log, this.pipeline).init(opts); - - if (opts.inputSourceMap) { - opts.sourceMaps = true; - } - - if (opts.moduleId) { - opts.moduleIds = true; - } - - opts.basename = _path2.default.basename(opts.filename, _path2.default.extname(opts.filename)); - - opts.ignore = util.arrayify(opts.ignore, util.regexify); - - if (opts.only) opts.only = util.arrayify(opts.only, util.regexify); - - (0, _defaults2.default)(opts, { - moduleRoot: opts.sourceRoot - }); - - (0, _defaults2.default)(opts, { - sourceRoot: opts.moduleRoot - }); - - (0, _defaults2.default)(opts, { - filenameRelative: opts.filename - }); - - var basenameRelative = _path2.default.basename(opts.filenameRelative); - - (0, _defaults2.default)(opts, { - sourceFileName: basenameRelative, - sourceMapTarget: basenameRelative - }); - - return opts; - }; - - File.prototype.buildPluginsForOptions = function buildPluginsForOptions(opts) { - if (!Array.isArray(opts.plugins)) { - return; - } - - var plugins = opts.plugins.concat(INTERNAL_PLUGINS); - var currentPluginVisitors = []; - var currentPluginPasses = []; - - for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var ref = _ref2; - var plugin = ref[0], - pluginOpts = ref[1]; - - currentPluginVisitors.push(plugin.visitor); - currentPluginPasses.push(new _pluginPass2.default(this, plugin, pluginOpts)); - - if (plugin.manipulateOptions) { - plugin.manipulateOptions(opts, this.parserOpts, this); - } - } - - this.pluginVisitors.push(currentPluginVisitors); - this.pluginPasses.push(currentPluginPasses); - }; - - File.prototype.getModuleName = function getModuleName() { - var opts = this.opts; - if (!opts.moduleIds) { - return null; - } - - if (opts.moduleId != null && !opts.getModuleId) { - return opts.moduleId; - } - - var filenameRelative = opts.filenameRelative; - var moduleName = ""; - - if (opts.moduleRoot != null) { - moduleName = opts.moduleRoot + "/"; - } - - if (!opts.filenameRelative) { - return moduleName + opts.filename.replace(/^\//, ""); - } - - if (opts.sourceRoot != null) { - var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "\/?"); - filenameRelative = filenameRelative.replace(sourceRootRegEx, ""); - } - - filenameRelative = filenameRelative.replace(/\.(\w*?)$/, ""); - - moduleName += filenameRelative; - - moduleName = moduleName.replace(/\\/g, "/"); - - if (opts.getModuleId) { - return opts.getModuleId(moduleName) || moduleName; - } else { - return moduleName; - } - }; - - File.prototype.resolveModuleSource = function resolveModuleSource(source) { - var resolveModuleSource = this.opts.resolveModuleSource; - if (resolveModuleSource) source = resolveModuleSource(source, this.opts.filename); - return source; - }; - - File.prototype.addImport = function addImport(source, imported) { - var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : imported; - - var alias = source + ":" + imported; - var id = this.dynamicImportIds[alias]; - - if (!id) { - source = this.resolveModuleSource(source); - id = this.dynamicImportIds[alias] = this.scope.generateUidIdentifier(name); - - var specifiers = []; - - if (imported === "*") { - specifiers.push(t.importNamespaceSpecifier(id)); - } else if (imported === "default") { - specifiers.push(t.importDefaultSpecifier(id)); - } else { - specifiers.push(t.importSpecifier(id, t.identifier(imported))); - } - - var declar = t.importDeclaration(specifiers, t.stringLiteral(source)); - declar._blockHoist = 3; - - this.path.unshiftContainer("body", declar); - } - - return id; - }; - - File.prototype.addHelper = function addHelper(name) { - var declar = this.declarations[name]; - if (declar) return declar; - - if (!this.usedHelpers[name]) { - this.metadata.usedHelpers.push(name); - this.usedHelpers[name] = true; - } - - var generator = this.get("helperGenerator"); - var runtime = this.get("helpersNamespace"); - if (generator) { - var res = generator(name); - if (res) return res; - } else if (runtime) { - return t.memberExpression(runtime, t.identifier(name)); - } - - var ref = (0, _babelHelpers2.default)(name); - var uid = this.declarations[name] = this.scope.generateUidIdentifier(name); - - if (t.isFunctionExpression(ref) && !ref.id) { - ref.body._compact = true; - ref._generated = true; - ref.id = uid; - ref.type = "FunctionDeclaration"; - this.path.unshiftContainer("body", ref); - } else { - ref._compact = true; - this.scope.push({ - id: uid, - init: ref, - unique: true - }); - } - - return uid; - }; - - File.prototype.addTemplateObject = function addTemplateObject(helperName, strings, raw) { - var stringIds = raw.elements.map(function (string) { - return string.value; - }); - var name = helperName + "_" + raw.elements.length + "_" + stringIds.join(","); - - var declar = this.declarations[name]; - if (declar) return declar; - - var uid = this.declarations[name] = this.scope.generateUidIdentifier("templateObject"); - - var helperId = this.addHelper(helperName); - var init = t.callExpression(helperId, [strings, raw]); - init._compact = true; - this.scope.push({ - id: uid, - init: init, - _blockHoist: 1.9 }); - return uid; - }; - - File.prototype.buildCodeFrameError = function buildCodeFrameError(node, msg) { - var Error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : SyntaxError; - - var loc = node && (node.loc || node._loc); - - var err = new Error(msg); - - if (loc) { - err.loc = loc.start; - } else { - (0, _babelTraverse2.default)(node, errorVisitor, this.scope, err); - - err.message += " (This is an error on an internal node. Probably an internal error"; - - if (err.loc) { - err.message += ". Location has been estimated."; - } - - err.message += ")"; - } - - return err; - }; - - File.prototype.mergeSourceMap = function mergeSourceMap(map) { - var inputMap = this.opts.inputSourceMap; - - if (inputMap) { - var inputMapConsumer = new _sourceMap2.default.SourceMapConsumer(inputMap); - var outputMapConsumer = new _sourceMap2.default.SourceMapConsumer(map); - - var mergedGenerator = new _sourceMap2.default.SourceMapGenerator({ - file: inputMapConsumer.file, - sourceRoot: inputMapConsumer.sourceRoot - }); - - var source = outputMapConsumer.sources[0]; - - inputMapConsumer.eachMapping(function (mapping) { - var generatedPosition = outputMapConsumer.generatedPositionFor({ - line: mapping.generatedLine, - column: mapping.generatedColumn, - source: source - }); - if (generatedPosition.column != null) { - mergedGenerator.addMapping({ - source: mapping.source, - - original: mapping.source == null ? null : { - line: mapping.originalLine, - column: mapping.originalColumn - }, - - generated: generatedPosition - }); - } - }); - - var mergedMap = mergedGenerator.toJSON(); - inputMap.mappings = mergedMap.mappings; - return inputMap; - } else { - return map; - } - }; - - File.prototype.parse = function parse(code) { - var parseCode = _babylon.parse; - var parserOpts = this.opts.parserOpts; - - if (parserOpts) { - parserOpts = (0, _assign2.default)({}, this.parserOpts, parserOpts); - - if (parserOpts.parser) { - if (typeof parserOpts.parser === "string") { - var dirname = _path2.default.dirname(this.opts.filename) || process.cwd(); - var parser = (0, _resolve2.default)(parserOpts.parser, dirname); - if (parser) { - parseCode = $__require(parser).parse; - } else { - throw new Error("Couldn't find parser " + parserOpts.parser + " with \"parse\" method " + ("relative to directory " + dirname)); - } - } else { - parseCode = parserOpts.parser; - } - - parserOpts.parser = { - parse: function parse(source) { - return (0, _babylon.parse)(source, parserOpts); - } - }; - } - } - - this.log.debug("Parse start"); - var ast = parseCode(code, parserOpts || this.parserOpts); - this.log.debug("Parse stop"); - return ast; - }; - - File.prototype._addAst = function _addAst(ast) { - this.path = _babelTraverse.NodePath.get({ - hub: this.hub, - parentPath: null, - parent: ast, - container: ast, - key: "program" - }).setContext(); - this.scope = this.path.scope; - this.ast = ast; - this.getMetadata(); - }; - - File.prototype.addAst = function addAst(ast) { - this.log.debug("Start set AST"); - this._addAst(ast); - this.log.debug("End set AST"); - }; - - File.prototype.transform = function transform() { - for (var i = 0; i < this.pluginPasses.length; i++) { - var pluginPasses = this.pluginPasses[i]; - this.call("pre", pluginPasses); - this.log.debug("Start transform traverse"); - - var visitor = _babelTraverse2.default.visitors.merge(this.pluginVisitors[i], pluginPasses, this.opts.wrapPluginVisitorMethod); - (0, _babelTraverse2.default)(this.ast, visitor, this.scope); - - this.log.debug("End transform traverse"); - this.call("post", pluginPasses); - } - - return this.generate(); - }; - - File.prototype.wrap = function wrap(code, callback) { - code = code + ""; - - try { - if (this.shouldIgnore()) { - return this.makeResult({ code: code, ignored: true }); - } else { - return callback(); - } - } catch (err) { - if (err._babel) { - throw err; - } else { - err._babel = true; - } - - var message = err.message = this.opts.filename + ": " + err.message; - - var loc = err.loc; - if (loc) { - err.codeFrame = (0, _babelCodeFrame2.default)(code, loc.line, loc.column + 1, this.opts); - message += "\n" + err.codeFrame; - } - - if (process.browser) { - err.message = message; - } - - if (err.stack) { - var newStack = err.stack.replace(err.message, message); - err.stack = newStack; - } - - throw err; - } - }; - - File.prototype.addCode = function addCode(code) { - code = (code || "") + ""; - code = this.parseInputSourceMap(code); - this.code = code; - }; - - File.prototype.parseCode = function parseCode() { - this.parseShebang(); - var ast = this.parse(this.code); - this.addAst(ast); - }; - - File.prototype.shouldIgnore = function shouldIgnore() { - var opts = this.opts; - return util.shouldIgnore(opts.filename, opts.ignore, opts.only); - }; - - File.prototype.call = function call(key, pluginPasses) { - for (var _iterator3 = pluginPasses, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var pass = _ref3; - - var plugin = pass.plugin; - var fn = plugin[key]; - if (fn) fn.call(pass, this); - } - }; - - File.prototype.parseInputSourceMap = function parseInputSourceMap(code) { - var opts = this.opts; - - if (opts.inputSourceMap !== false) { - var inputMap = _convertSourceMap2.default.fromSource(code); - if (inputMap) { - opts.inputSourceMap = inputMap.toObject(); - code = _convertSourceMap2.default.removeComments(code); - } - } - - return code; - }; - - File.prototype.parseShebang = function parseShebang() { - var shebangMatch = shebangRegex.exec(this.code); - if (shebangMatch) { - this.shebang = shebangMatch[0]; - this.code = this.code.replace(shebangRegex, ""); - } - }; - - File.prototype.makeResult = function makeResult(_ref4) { - var code = _ref4.code, - map = _ref4.map, - ast = _ref4.ast, - ignored = _ref4.ignored; - - var result = { - metadata: null, - options: this.opts, - ignored: !!ignored, - code: null, - ast: null, - map: map || null - }; - - if (this.opts.code) { - result.code = code; - } - - if (this.opts.ast) { - result.ast = ast; - } - - if (this.opts.metadata) { - result.metadata = this.metadata; - } - - return result; - }; - - File.prototype.generate = function generate() { - var opts = this.opts; - var ast = this.ast; - - var result = { ast: ast }; - if (!opts.code) return this.makeResult(result); - - var gen = _babelGenerator2.default; - if (opts.generatorOpts.generator) { - gen = opts.generatorOpts.generator; - - if (typeof gen === "string") { - var dirname = _path2.default.dirname(this.opts.filename) || process.cwd(); - var generator = (0, _resolve2.default)(gen, dirname); - if (generator) { - gen = $__require(generator).print; - } else { - throw new Error("Couldn't find generator " + gen + " with \"print\" method relative " + ("to directory " + dirname)); - } - } - } - - this.log.debug("Generation start"); - - var _result = gen(ast, opts.generatorOpts ? (0, _assign2.default)(opts, opts.generatorOpts) : opts, this.code); - result.code = _result.code; - result.map = _result.map; - - this.log.debug("Generation end"); - - if (this.shebang) { - result.code = this.shebang + "\n" + result.code; - } - - if (result.map) { - result.map = this.mergeSourceMap(result.map); - } - - if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") { - result.code += "\n" + _convertSourceMap2.default.fromObject(result.map).toComment(); - } - - if (opts.sourceMaps === "inline") { - result.map = null; - } - - return this.makeResult(result); - }; - - return File; - }(_store2.default); - - exports.default = File; - exports.File = File; -}); -$__System.registerDynamic("d8", ["1d", "13", "98", "1c", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _normalizeAst = $__require("13"); - - var _normalizeAst2 = _interopRequireDefault(_normalizeAst); - - var _plugin = $__require("98"); - - var _plugin2 = _interopRequireDefault(_plugin); - - var _file = $__require("1c"); - - var _file2 = _interopRequireDefault(_file); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var Pipeline = function () { - function Pipeline() { - (0, _classCallCheck3.default)(this, Pipeline); - } - - Pipeline.prototype.lint = function lint(code) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - opts.code = false; - opts.mode = "lint"; - return this.transform(code, opts); - }; - - Pipeline.prototype.pretransform = function pretransform(code, opts) { - var file = new _file2.default(opts, this); - return file.wrap(code, function () { - file.addCode(code); - file.parseCode(code); - return file; - }); - }; - - Pipeline.prototype.transform = function transform(code, opts) { - var file = new _file2.default(opts, this); - return file.wrap(code, function () { - file.addCode(code); - file.parseCode(code); - return file.transform(); - }); - }; - - Pipeline.prototype.analyse = function analyse(code) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var visitor = arguments[2]; - - opts.code = false; - if (visitor) { - opts.plugins = opts.plugins || []; - opts.plugins.push(new _plugin2.default({ visitor: visitor })); - } - return this.transform(code, opts).metadata; - }; - - Pipeline.prototype.transformFromAst = function transformFromAst(ast, code, opts) { - ast = (0, _normalizeAst2.default)(ast); - - var file = new _file2.default(opts, this); - return file.wrap(code, function () { - file.addCode(code); - file.addAst(ast); - return file.transform(); - }); - }; - - return Pipeline; - }(); - - exports.default = Pipeline; - module.exports = exports["default"]; -}); -$__System.registerDynamic("cd", ["1c", "a9", "b", "10", "ab", "af", "12", "@node/fs", "a4", "f", "11", "d0", "cc", "d8", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - 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; - - var _file = $__require("1c"); - - Object.defineProperty(exports, "File", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_file).default; - } - }); - - var _config = $__require("a9"); - - Object.defineProperty(exports, "options", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_config).default; - } - }); - - var _buildExternalHelpers = $__require("b"); - - Object.defineProperty(exports, "buildExternalHelpers", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_buildExternalHelpers).default; - } - }); - - var _babelTemplate = $__require("10"); - - Object.defineProperty(exports, "template", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_babelTemplate).default; - } - }); - - var _resolvePlugin = $__require("ab"); - - Object.defineProperty(exports, "resolvePlugin", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_resolvePlugin).default; - } - }); - - var _resolvePreset = $__require("af"); - - Object.defineProperty(exports, "resolvePreset", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_resolvePreset).default; - } - }); - - var _package = $__require("12"); - - Object.defineProperty(exports, "version", { - enumerable: true, - get: function get() { - return _package.version; - } - }); - exports.Plugin = Plugin; - exports.transformFile = transformFile; - exports.transformFileSync = transformFileSync; - - var _fs = $__require("@node/fs"); - - var _fs2 = _interopRequireDefault(_fs); - - var _util = $__require("a4"); - - var util = _interopRequireWildcard(_util); - - var _babelMessages = $__require("f"); - - var messages = _interopRequireWildcard(_babelMessages); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _babelTraverse = $__require("d0"); - - var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - - var _optionManager = $__require("cc"); - - var _optionManager2 = _interopRequireDefault(_optionManager); - - var _pipeline = $__require("d8"); - - var _pipeline2 = _interopRequireDefault(_pipeline); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.util = util; - exports.messages = messages; - exports.types = t; - exports.traverse = _babelTraverse2.default; - exports.OptionManager = _optionManager2.default; - function Plugin(alias) { - throw new Error("The (" + alias + ") Babel 5 plugin is being run with Babel 6."); - } - - exports.Pipeline = _pipeline2.default; - - var pipeline = new _pipeline2.default(); - var analyse = exports.analyse = pipeline.analyse.bind(pipeline); - var transform = exports.transform = pipeline.transform.bind(pipeline); - var transformFromAst = exports.transformFromAst = pipeline.transformFromAst.bind(pipeline); - - function transformFile(filename, opts, callback) { - if (typeof opts === "function") { - callback = opts; - opts = {}; - } - - opts.filename = filename; - - _fs2.default.readFile(filename, function (err, code) { - var result = void 0; - - if (!err) { - try { - result = transform(code, opts); - } catch (_err) { - err = _err; - } - } - - if (err) { - callback(err); - } else { - callback(null, result); - } - }); - } - - function transformFileSync(filename) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - opts.filename = filename; - return transform(_fs2.default.readFileSync(filename, "utf8"), opts); - } -}); -$__System.registerDynamic("d9", ["cd", "c"], true, function ($__require, exports, module) { - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - module.exports = $__require("cd"); -}); -$__System.registerDynamic("da", ["d4", "17", "d3", "db", "10"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _create = $__require("d4"); - - var _create2 = _interopRequireDefault(_create); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _symbol = $__require("d3"); - - var _symbol2 = _interopRequireDefault(_symbol); - - exports.default = function (_ref) { - var t = _ref.types; - - var IGNORE_REASSIGNMENT_SYMBOL = (0, _symbol2.default)(); - - var reassignmentVisitor = { - "AssignmentExpression|UpdateExpression": function AssignmentExpressionUpdateExpression(path) { - if (path.node[IGNORE_REASSIGNMENT_SYMBOL]) return; - path.node[IGNORE_REASSIGNMENT_SYMBOL] = true; - - var arg = path.get(path.isAssignmentExpression() ? "left" : "argument"); - if (!arg.isIdentifier()) return; - - var name = arg.node.name; - - if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return; - - var exportedNames = this.exports[name]; - if (!exportedNames) return; - - var node = path.node; - - var isPostUpdateExpression = path.isUpdateExpression() && !node.prefix; - if (isPostUpdateExpression) { - 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; - } - - for (var _iterator = exportedNames, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var exportedName = _ref2; - - node = this.buildCall(exportedName, node).expression; - } - - if (isPostUpdateExpression) node = t.sequenceExpression([node, path.node]); - - path.replaceWith(node); - } - }; - - return { - visitor: { - CallExpression: function CallExpression(path, state) { - if (path.node.callee.type === TYPE_IMPORT) { - var contextIdent = state.contextIdent; - path.replaceWith(t.callExpression(t.memberExpression(contextIdent, t.identifier("import")), path.node.arguments)); - } - }, - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (path.node.name == "__moduleName" && !path.scope.hasBinding("__moduleName")) { - path.replaceWith(t.memberExpression(state.contextIdent, t.identifier("id"))); - } - }, - - Program: { - enter: function enter(path, state) { - state.contextIdent = path.scope.generateUidIdentifier("context"); - }, - exit: function exit(path, state) { - var exportIdent = path.scope.generateUidIdentifier("export"); - var contextIdent = state.contextIdent; - - var exportNames = (0, _create2.default)(null); - var modules = []; - - var beforeBody = []; - var setters = []; - var sources = []; - var variableIds = []; - var removedPaths = []; - - function addExportName(key, val) { - exportNames[key] = exportNames[key] || []; - exportNames[key].push(val); - } - - function pushModule(source, key, specifiers) { - var module = void 0; - modules.forEach(function (m) { - if (m.key === source) { - module = m; - } - }); - if (!module) { - modules.push(module = { key: source, imports: [], exports: [] }); - } - module[key] = module[key].concat(specifiers); - } - - function buildExportCall(name, val) { - return t.expressionStatement(t.callExpression(exportIdent, [t.stringLiteral(name), val])); - } - - var body = path.get("body"); - - var canHoist = true; - for (var _iterator2 = body, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var _path = _ref3; - - if (_path.isExportDeclaration()) _path = _path.get("declaration"); - if (_path.isVariableDeclaration() && _path.node.kind !== "var") { - canHoist = false; - break; - } - } - - for (var _iterator3 = body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var _path2 = _ref4; - - if (canHoist && _path2.isFunctionDeclaration()) { - beforeBody.push(_path2.node); - removedPaths.push(_path2); - } else if (_path2.isImportDeclaration()) { - var source = _path2.node.source.value; - pushModule(source, "imports", _path2.node.specifiers); - for (var name in _path2.getBindingIdentifiers()) { - _path2.scope.removeBinding(name); - variableIds.push(t.identifier(name)); - } - _path2.remove(); - } else if (_path2.isExportAllDeclaration()) { - pushModule(_path2.node.source.value, "exports", _path2.node); - _path2.remove(); - } else if (_path2.isExportDefaultDeclaration()) { - var declar = _path2.get("declaration"); - if (declar.isClassDeclaration() || declar.isFunctionDeclaration()) { - var id = declar.node.id; - var nodes = []; - - if (id) { - nodes.push(declar.node); - nodes.push(buildExportCall("default", id)); - addExportName(id.name, "default"); - } else { - nodes.push(buildExportCall("default", t.toExpression(declar.node))); - } - - if (!canHoist || declar.isClassDeclaration()) { - _path2.replaceWithMultiple(nodes); - } else { - beforeBody = beforeBody.concat(nodes); - removedPaths.push(_path2); - } - } else { - _path2.replaceWith(buildExportCall("default", declar.node)); - } - } else if (_path2.isExportNamedDeclaration()) { - var _declar = _path2.get("declaration"); - - if (_declar.node) { - _path2.replaceWith(_declar); - - var _nodes = []; - var bindingIdentifiers = void 0; - if (_path2.isFunction()) { - var node = _declar.node; - var _name = node.id.name; - if (canHoist) { - addExportName(_name, _name); - beforeBody.push(node); - beforeBody.push(buildExportCall(_name, node.id)); - removedPaths.push(_path2); - } else { - var _bindingIdentifiers; - - bindingIdentifiers = (_bindingIdentifiers = {}, _bindingIdentifiers[_name] = node.id, _bindingIdentifiers); - } - } else { - bindingIdentifiers = _declar.getBindingIdentifiers(); - } - for (var _name2 in bindingIdentifiers) { - addExportName(_name2, _name2); - _nodes.push(buildExportCall(_name2, t.identifier(_name2))); - } - _path2.insertAfter(_nodes); - } else { - var specifiers = _path2.node.specifiers; - if (specifiers && specifiers.length) { - if (_path2.node.source) { - pushModule(_path2.node.source.value, "exports", specifiers); - _path2.remove(); - } else { - var _nodes2 = []; - - for (var _iterator7 = specifiers, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref8; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref8 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref8 = _i7.value; - } - - var specifier = _ref8; - - _nodes2.push(buildExportCall(specifier.exported.name, specifier.local)); - addExportName(specifier.local.name, specifier.exported.name); - } - - _path2.replaceWithMultiple(_nodes2); - } - } - } - } - } - - modules.forEach(function (specifiers) { - var setterBody = []; - var target = path.scope.generateUidIdentifier(specifiers.key); - - for (var _iterator4 = specifiers.imports, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref5; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; - } - - var specifier = _ref5; - - if (t.isImportNamespaceSpecifier(specifier)) { - setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, target))); - } else if (t.isImportDefaultSpecifier(specifier)) { - specifier = t.importSpecifier(specifier.local, t.identifier("default")); - } - - if (t.isImportSpecifier(specifier)) { - setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, t.memberExpression(target, specifier.imported)))); - } - } - - if (specifiers.exports.length) { - var exportObjRef = path.scope.generateUidIdentifier("exportObj"); - - setterBody.push(t.variableDeclaration("var", [t.variableDeclarator(exportObjRef, t.objectExpression([]))])); - - for (var _iterator5 = specifiers.exports, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref6; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref6 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref6 = _i5.value; - } - - var node = _ref6; - - if (t.isExportAllDeclaration(node)) { - setterBody.push(buildExportAll({ - KEY: path.scope.generateUidIdentifier("key"), - EXPORT_OBJ: exportObjRef, - TARGET: target - })); - } else if (t.isExportSpecifier(node)) { - setterBody.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(exportObjRef, node.exported), t.memberExpression(target, node.local)))); - } else {} - } - - setterBody.push(t.expressionStatement(t.callExpression(exportIdent, [exportObjRef]))); - } - - sources.push(t.stringLiteral(specifiers.key)); - setters.push(t.functionExpression(null, [target], t.blockStatement(setterBody))); - }); - - var moduleName = this.getModuleName(); - if (moduleName) moduleName = t.stringLiteral(moduleName); - - if (canHoist) { - (0, _babelHelperHoistVariables2.default)(path, function (id) { - return variableIds.push(id); - }); - } - - if (variableIds.length) { - beforeBody.unshift(t.variableDeclaration("var", variableIds.map(function (id) { - return t.variableDeclarator(id); - }))); - } - - path.traverse(reassignmentVisitor, { - exports: exportNames, - buildCall: buildExportCall, - scope: path.scope - }); - - for (var _iterator6 = removedPaths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref7; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref7 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref7 = _i6.value; - } - - var _path3 = _ref7; - - _path3.remove(); - } - - path.node.body = [buildTemplate({ - SYSTEM_REGISTER: t.memberExpression(t.identifier(state.opts.systemGlobal || "System"), t.identifier("register")), - BEFORE_BODY: beforeBody, - MODULE_NAME: moduleName, - SETTERS: setters, - SOURCES: sources, - BODY: path.node.body, - EXPORT_IDENTIFIER: exportIdent, - CONTEXT_IDENTIFIER: contextIdent - })]; - } - } - } - }; - }; - - var _babelHelperHoistVariables = $__require("db"); - - var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - 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"); - - var buildExportAll = (0, _babelTemplate2.default)("\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n"); - - var TYPE_IMPORT = "Import"; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("dc", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var t = _ref.types; - - return { - pre: function pre(file) { - file.set("helpersNamespace", t.identifier("babelHelpers")); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("dd", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - module.exports = { - builtins: { - Symbol: "symbol", - Promise: "promise", - Map: "map", - WeakMap: "weak-map", - Set: "set", - WeakSet: "weak-set", - Observable: "observable", - setImmediate: "set-immediate", - clearImmediate: "clear-immediate", - asap: "asap" - }, - - methods: { - Array: { - concat: "array/concat", - copyWithin: "array/copy-within", - entries: "array/entries", - every: "array/every", - fill: "array/fill", - filter: "array/filter", - findIndex: "array/find-index", - find: "array/find", - forEach: "array/for-each", - from: "array/from", - includes: "array/includes", - indexOf: "array/index-of", - - join: "array/join", - keys: "array/keys", - lastIndexOf: "array/last-index-of", - map: "array/map", - of: "array/of", - pop: "array/pop", - push: "array/push", - reduceRight: "array/reduce-right", - reduce: "array/reduce", - reverse: "array/reverse", - shift: "array/shift", - slice: "array/slice", - some: "array/some", - sort: "array/sort", - splice: "array/splice", - unshift: "array/unshift", - values: "array/values" - }, - - JSON: { - stringify: "json/stringify" - }, - - Object: { - assign: "object/assign", - create: "object/create", - defineProperties: "object/define-properties", - defineProperty: "object/define-property", - entries: "object/entries", - freeze: "object/freeze", - getOwnPropertyDescriptor: "object/get-own-property-descriptor", - getOwnPropertyDescriptors: "object/get-own-property-descriptors", - getOwnPropertyNames: "object/get-own-property-names", - getOwnPropertySymbols: "object/get-own-property-symbols", - getPrototypeOf: "object/get-prototype-of", - isExtensible: "object/is-extensible", - isFrozen: "object/is-frozen", - isSealed: "object/is-sealed", - is: "object/is", - keys: "object/keys", - preventExtensions: "object/prevent-extensions", - seal: "object/seal", - setPrototypeOf: "object/set-prototype-of", - values: "object/values" - }, - - RegExp: { - escape: "regexp/escape" }, - - Math: { - acosh: "math/acosh", - asinh: "math/asinh", - atanh: "math/atanh", - cbrt: "math/cbrt", - clz32: "math/clz32", - cosh: "math/cosh", - expm1: "math/expm1", - fround: "math/fround", - hypot: "math/hypot", - imul: "math/imul", - log10: "math/log10", - log1p: "math/log1p", - log2: "math/log2", - sign: "math/sign", - sinh: "math/sinh", - tanh: "math/tanh", - trunc: "math/trunc", - iaddh: "math/iaddh", - isubh: "math/isubh", - imulh: "math/imulh", - umulh: "math/umulh" - }, - - Symbol: { - for: "symbol/for", - hasInstance: "symbol/has-instance", - isConcatSpreadable: "symbol/is-concat-spreadable", - iterator: "symbol/iterator", - keyFor: "symbol/key-for", - match: "symbol/match", - replace: "symbol/replace", - search: "symbol/search", - species: "symbol/species", - split: "symbol/split", - toPrimitive: "symbol/to-primitive", - toStringTag: "symbol/to-string-tag", - unscopables: "symbol/unscopables" - }, - - String: { - at: "string/at", - codePointAt: "string/code-point-at", - endsWith: "string/ends-with", - fromCodePoint: "string/from-code-point", - includes: "string/includes", - matchAll: "string/match-all", - padLeft: "string/pad-left", - padRight: "string/pad-right", - padStart: "string/pad-start", - padEnd: "string/pad-end", - raw: "string/raw", - repeat: "string/repeat", - startsWith: "string/starts-with", - trim: "string/trim", - trimLeft: "string/trim-left", - trimRight: "string/trim-right", - trimStart: "string/trim-start", - trimEnd: "string/trim-end" - }, - - Number: { - EPSILON: "number/epsilon", - isFinite: "number/is-finite", - isInteger: "number/is-integer", - isNaN: "number/is-nan", - isSafeInteger: "number/is-safe-integer", - MAX_SAFE_INTEGER: "number/max-safe-integer", - MIN_SAFE_INTEGER: "number/min-safe-integer", - parseFloat: "number/parse-float", - parseInt: "number/parse-int" - }, - - Reflect: { - apply: "reflect/apply", - construct: "reflect/construct", - defineProperty: "reflect/define-property", - deleteProperty: "reflect/delete-property", - enumerate: "reflect/enumerate", - getOwnPropertyDescriptor: "reflect/get-own-property-descriptor", - getPrototypeOf: "reflect/get-prototype-of", - get: "reflect/get", - has: "reflect/has", - isExtensible: "reflect/is-extensible", - ownKeys: "reflect/own-keys", - preventExtensions: "reflect/prevent-extensions", - setPrototypeOf: "reflect/set-prototype-of", - set: "reflect/set", - defineMetadata: "reflect/define-metadata", - deleteMetadata: "reflect/delete-metadata", - getMetadata: "reflect/get-metadata", - getMetadataKeys: "reflect/get-metadata-keys", - getOwnMetadata: "reflect/get-own-metadata", - getOwnMetadataKeys: "reflect/get-own-metadata-keys", - hasMetadata: "reflect/has-metadata", - hasOwnMetadata: "reflect/has-own-metadata", - metadata: "reflect/metadata" - }, - - System: { - global: "system/global" - }, - - Error: { - isError: "error/is-error" }, - - Date: {}, - - Function: {} - } - }; -}); -$__System.registerDynamic("de", ["dd"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.definitions = undefined; - - exports.default = function (_ref) { - var t = _ref.types; - - function getRuntimeModuleName(opts) { - return opts.moduleName || "babel-runtime"; - } - - function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); - } - - var HELPER_BLACKLIST = ["interopRequireWildcard", "interopRequireDefault"]; - - return { - pre: function pre(file) { - var moduleName = getRuntimeModuleName(this.opts); - - if (this.opts.helpers !== false) { - file.set("helperGenerator", function (name) { - if (HELPER_BLACKLIST.indexOf(name) < 0) { - return file.addImport(moduleName + "/helpers/" + name, "default", name); - } - }); - } - - this.setDynamic("regeneratorIdentifier", function () { - return file.addImport(moduleName + "/regenerator", "default", "regeneratorRuntime"); - }); - }, - - visitor: { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - var node = path.node, - parent = path.parent, - scope = path.scope; - - if (node.name === "regeneratorRuntime" && state.opts.regenerator !== false) { - path.replaceWith(state.get("regeneratorIdentifier")); - return; - } - - if (state.opts.polyfill === false) return; - - if (t.isMemberExpression(parent)) return; - if (!has(_definitions2.default.builtins, node.name)) return; - if (scope.getBindingIdentifier(node.name)) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[node.name], "default", node.name)); - }, - CallExpression: function CallExpression(path, state) { - if (state.opts.polyfill === false) return; - - if (path.node.arguments.length) return; - - var callee = path.node.callee; - if (!t.isMemberExpression(callee)) return; - if (!callee.computed) return; - if (!path.get("callee.property").matchesPattern("Symbol.iterator")) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/get-iterator", "default", "getIterator"), [callee.object])); - }, - BinaryExpression: function BinaryExpression(path, state) { - if (state.opts.polyfill === false) return; - - if (path.node.operator !== "in") return; - if (!path.get("left").matchesPattern("Symbol.iterator")) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/is-iterable", "default", "isIterable"), [path.node.right])); - }, - - MemberExpression: { - enter: function enter(path, state) { - if (state.opts.polyfill === false) return; - if (!path.isReferenced()) return; - - var node = path.node; - - var obj = node.object; - var prop = node.property; - - if (!t.isReferenced(obj, node)) return; - if (node.computed) return; - if (!has(_definitions2.default.methods, obj.name)) return; - - var methods = _definitions2.default.methods[obj.name]; - if (!has(methods, prop.name)) return; - - if (path.scope.getBindingIdentifier(obj.name)) return; - - if (obj.name === "Object" && prop.name === "defineProperty" && path.parentPath.isCallExpression()) { - var call = path.parentPath.node; - if (call.arguments.length === 3 && t.isLiteral(call.arguments[1])) return; - } - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(state.addImport(moduleName + "/core-js/" + methods[prop.name], "default", obj.name + "$" + prop.name)); - }, - exit: function exit(path, state) { - if (state.opts.polyfill === false) return; - if (!path.isReferenced()) return; - - var node = path.node; - - var obj = node.object; - - if (!has(_definitions2.default.builtins, obj.name)) return; - if (path.scope.getBindingIdentifier(obj.name)) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(t.memberExpression(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[obj.name], "default", obj.name), node.property, node.computed)); - } - } - } - }; - }; - - var _definitions = $__require("dd"); - - var _definitions2 = _interopRequireDefault(_definitions); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.definitions = _definitions2.default; -}); -$__System.registerDynamic("df", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("classConstructorCall"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e0", ["17", "d3", "df", "10"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _symbol = $__require("d3"); - - var _symbol2 = _interopRequireDefault(_symbol); - - exports.default = function (_ref) { - var t = _ref.types; - - var ALREADY_VISITED = (0, _symbol2.default)(); - - function findConstructorCall(path) { - var methods = path.get("body.body"); - - for (var _iterator = methods, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var method = _ref2; - - if (method.node.kind === "constructorCall") { - return method; - } - } - - return null; - } - - function handleClassWithCall(constructorCall, classPath) { - var _classPath = classPath, - node = _classPath.node; - - var ref = node.id || classPath.scope.generateUidIdentifier("class"); - - if (classPath.parentPath.isExportDefaultDeclaration()) { - classPath = classPath.parentPath; - classPath.insertAfter(t.exportDefaultDeclaration(ref)); - } - - classPath.replaceWithMultiple(buildWrapper({ - CLASS_REF: classPath.scope.generateUidIdentifier(ref.name), - CALL_REF: classPath.scope.generateUidIdentifier(ref.name + "Call"), - CALL: t.functionExpression(null, constructorCall.node.params, constructorCall.node.body), - CLASS: t.toExpression(node), - WRAPPER_REF: ref - })); - - constructorCall.remove(); - } - - return { - inherits: $__require("df"), - - visitor: { - Class: function Class(path) { - if (path.node[ALREADY_VISITED]) return; - path.node[ALREADY_VISITED] = true; - - var constructorCall = findConstructorCall(path); - - if (constructorCall) { - handleClassWithCall(constructorCall, path); - } else { - return; - } - } - } - }; - }; - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - 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"); - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e1", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("exportExtensions"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e2", ["e1"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var t = _ref.types; - - function build(node, nodes, scope) { - var first = node.specifiers[0]; - if (!t.isExportNamespaceSpecifier(first) && !t.isExportDefaultSpecifier(first)) return; - - var specifier = node.specifiers.shift(); - var uid = scope.generateUidIdentifier(specifier.exported.name); - - var newSpecifier = void 0; - if (t.isExportNamespaceSpecifier(specifier)) { - newSpecifier = t.importNamespaceSpecifier(uid); - } else { - newSpecifier = t.importDefaultSpecifier(uid); - } - - nodes.push(t.importDeclaration([newSpecifier], node.source)); - nodes.push(t.exportNamedDeclaration(null, [t.exportSpecifier(uid, specifier.exported)])); - - build(node, nodes, scope); - } - - return { - inherits: $__require("e1"), - - visitor: { - ExportNamedDeclaration: function ExportNamedDeclaration(path) { - var node = path.node, - scope = path.scope; - - var nodes = []; - build(node, nodes, scope); - if (!nodes.length) return; - - if (node.specifiers.length >= 1) { - nodes.push(node); - } - path.replaceWithMultiple(nodes); - } - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e3", ["e4", "e0", "e2"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _babelPresetStage = $__require("e4"); - - var _babelPresetStage2 = _interopRequireDefault(_babelPresetStage); - - var _babelPluginTransformClassConstructorCall = $__require("e0"); - - var _babelPluginTransformClassConstructorCall2 = _interopRequireDefault(_babelPluginTransformClassConstructorCall); - - var _babelPluginTransformExportExtensions = $__require("e2"); - - var _babelPluginTransformExportExtensions2 = _interopRequireDefault(_babelPluginTransformExportExtensions); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.default = { - presets: [_babelPresetStage2.default], - plugins: [_babelPluginTransformClassConstructorCall2.default, _babelPluginTransformExportExtensions2.default] - }; - module.exports = exports["default"]; -}); -$__System.registerDynamic("e5", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("classProperties"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e6", ["17", "e5", "e7", "10"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - var findBareSupers = { - Super: function Super(path) { - if (path.parentPath.isCallExpression({ callee: path.node })) { - this.push(path.parentPath); - } - } - }; - - var referenceVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path) { - if (this.scope.hasOwnBinding(path.node.name)) { - this.collision = true; - path.skip(); - } - } - }; - - 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 "); - - var buildClassPropertySpec = function buildClassPropertySpec(ref, _ref2) { - var key = _ref2.key, - value = _ref2.value, - computed = _ref2.computed; - return buildObjectDefineProperty({ - REF: ref, - KEY: t.isIdentifier(key) && !computed ? t.stringLiteral(key.name) : key, - VALUE: value ? value : t.identifier("undefined") - }); - }; - - var buildClassPropertyNonSpec = function buildClassPropertyNonSpec(ref, _ref3) { - var key = _ref3.key, - value = _ref3.value, - computed = _ref3.computed; - return t.expressionStatement(t.assignmentExpression("=", t.memberExpression(ref, key, computed || t.isLiteral(key)), value)); - }; - - return { - inherits: $__require("e5"), - - visitor: { - Class: function Class(path, state) { - var buildClassProperty = state.opts.spec ? buildClassPropertySpec : buildClassPropertyNonSpec; - var isDerived = !!path.node.superClass; - var constructor = void 0; - var props = []; - var body = path.get("body"); - - for (var _iterator = body.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref4; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref4 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref4 = _i.value; - } - - var _path = _ref4; - - if (_path.isClassProperty()) { - props.push(_path); - } else if (_path.isClassMethod({ kind: "constructor" })) { - constructor = _path; - } - } - - if (!props.length) return; - - var nodes = []; - var ref = void 0; - - if (path.isClassExpression() || !path.node.id) { - (0, _babelHelperFunctionName2.default)(path); - ref = path.scope.generateUidIdentifier("class"); - } else { - ref = path.node.id; - } - - var instanceBody = []; - - for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref5; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref5 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref5 = _i2.value; - } - - var _prop = _ref5; - - var propNode = _prop.node; - if (propNode.decorators && propNode.decorators.length > 0) continue; - - if (!state.opts.spec && !propNode.value) continue; - - var isStatic = propNode.static; - - if (isStatic) { - nodes.push(buildClassProperty(ref, propNode)); - } else { - if (!propNode.value) continue; - instanceBody.push(buildClassProperty(t.thisExpression(), propNode)); - } - } - - if (instanceBody.length) { - if (!constructor) { - var newConstructor = t.classMethod("constructor", t.identifier("constructor"), [], t.blockStatement([])); - if (isDerived) { - newConstructor.params = [t.restElement(t.identifier("args"))]; - newConstructor.body.body.push(t.returnStatement(t.callExpression(t.super(), [t.spreadElement(t.identifier("args"))]))); - } - - var _body$unshiftContaine = body.unshiftContainer("body", newConstructor); - - constructor = _body$unshiftContaine[0]; - } - - var collisionState = { - collision: false, - scope: constructor.scope - }; - - for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref6; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref6 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref6 = _i3.value; - } - - var prop = _ref6; - - prop.traverse(referenceVisitor, collisionState); - if (collisionState.collision) break; - } - - if (collisionState.collision) { - var initialisePropsRef = path.scope.generateUidIdentifier("initialiseProps"); - - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(initialisePropsRef, t.functionExpression(null, [], t.blockStatement(instanceBody)))])); - - instanceBody = [t.expressionStatement(t.callExpression(t.memberExpression(initialisePropsRef, t.identifier("call")), [t.thisExpression()]))]; - } - - if (isDerived) { - var bareSupers = []; - constructor.traverse(findBareSupers, bareSupers); - for (var _iterator4 = bareSupers, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref7; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref7 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref7 = _i4.value; - } - - var bareSuper = _ref7; - - bareSuper.insertAfter(instanceBody); - } - } else { - constructor.get("body").unshiftContainer("body", instanceBody); - } - } - - for (var _iterator5 = props, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref8; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref8 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref8 = _i5.value; - } - - var _prop2 = _ref8; - - _prop2.remove(); - } - - if (!nodes.length) return; - - if (path.isClassExpression()) { - path.scope.push({ id: ref }); - path.replaceWith(t.assignmentExpression("=", ref, path.node)); - } else { - if (!path.node.id) { - path.node.id = ref; - } - - if (path.parentPath.isExportDeclaration()) { - path = path.parentPath; - } - } - - path.insertAfter(nodes); - }, - ArrowFunctionExpression: function ArrowFunctionExpression(path) { - var classExp = path.get("body"); - if (!classExp.isClassExpression()) return; - - var body = classExp.get("body"); - var members = body.get("body"); - if (members.some(function (member) { - return member.isClassProperty(); - })) { - path.ensureBlock(); - } - } - } - }; - }; - - var _babelHelperFunctionName = $__require("e7"); - - var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e8", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("decorators"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e9", ["17", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = bindifyDecorators; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function bindifyDecorators(decorators) { - for (var _iterator = decorators, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var decoratorPath = _ref; - - var decorator = decoratorPath.node; - var expression = decorator.expression; - if (!t.isMemberExpression(expression)) continue; - - var temp = decoratorPath.scope.maybeGenerateMemoised(expression.object); - var ref = void 0; - - var nodes = []; - - if (temp) { - ref = temp; - nodes.push(t.assignmentExpression("=", temp, expression.object)); - } else { - ref = expression.object; - } - - nodes.push(t.callExpression(t.memberExpression(t.memberExpression(ref, expression.property, expression.computed), t.identifier("bind")), [ref])); - - if (nodes.length === 1) { - decorator.expression = nodes[0]; - } else { - decorator.expression = t.sequenceExpression(nodes); - } - } - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("ea", ["17", "e9", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (classPath) { - classPath.assertClass(); - - var memoisedExpressions = []; - - function maybeMemoise(path) { - if (!path.node || path.isPure()) return; - - var uid = classPath.scope.generateDeclaredUidIdentifier(); - memoisedExpressions.push(t.assignmentExpression("=", uid, path.node)); - path.replaceWith(uid); - } - - function memoiseDecorators(paths) { - if (!Array.isArray(paths) || !paths.length) return; - - paths = paths.reverse(); - - (0, _babelHelperBindifyDecorators2.default)(paths); - - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var path = _ref; - - maybeMemoise(path); - } - } - - maybeMemoise(classPath.get("superClass")); - memoiseDecorators(classPath.get("decorators"), true); - - var methods = classPath.get("body.body"); - for (var _iterator2 = methods, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var methodPath = _ref2; - - if (methodPath.is("computed")) { - maybeMemoise(methodPath.get("key")); - } - - if (methodPath.has("decorators")) { - memoiseDecorators(classPath.get("decorators")); - } - } - - if (memoisedExpressions) { - classPath.insertBefore(memoisedExpressions.map(function (expr) { - return t.expressionStatement(expr); - })); - } - }; - - var _babelHelperBindifyDecorators = $__require("e9"); - - var _babelHelperBindifyDecorators2 = _interopRequireDefault(_babelHelperBindifyDecorators); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("eb", ["d4", "17", "e8", "10", "ea"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _create = $__require("d4"); - - var _create2 = _interopRequireDefault(_create); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - function cleanDecorators(decorators) { - return decorators.reverse().map(function (dec) { - return dec.expression; - }); - } - - function transformClass(path, ref, state) { - var nodes = []; - - state; - - var classDecorators = path.node.decorators; - if (classDecorators) { - path.node.decorators = null; - classDecorators = cleanDecorators(classDecorators); - - for (var _iterator = classDecorators, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var decorator = _ref2; - - nodes.push(buildClassDecorator({ - CLASS_REF: ref, - DECORATOR: decorator - })); - } - } - - var map = (0, _create2.default)(null); - - for (var _iterator2 = path.get("body.body"), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var method = _ref3; - - var decorators = method.node.decorators; - if (!decorators) continue; - - var _alias = t.toKeyAlias(method.node); - map[_alias] = map[_alias] || []; - map[_alias].push(method.node); - - method.remove(); - } - - for (var alias in map) { - var items = map[alias]; - - items; - } - - return nodes; - } - - function hasDecorators(path) { - if (path.isClass()) { - if (path.node.decorators) return true; - - for (var _iterator3 = path.node.body.body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var method = _ref4; - - if (method.decorators) { - return true; - } - } - } else if (path.isObjectExpression()) { - for (var _iterator4 = path.node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref5; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; - } - - var prop = _ref5; - - if (prop.decorators) { - return true; - } - } - } - - return false; - } - - function doError(path) { - 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 "); - } - - return { - inherits: $__require("e8"), - - visitor: { - ClassExpression: function ClassExpression(path) { - if (!hasDecorators(path)) return; - doError(path); - - (0, _babelHelperExplodeClass2.default)(path); - - var ref = path.scope.generateDeclaredUidIdentifier("ref"); - var nodes = []; - - nodes.push(t.assignmentExpression("=", ref, path.node)); - - nodes = nodes.concat(transformClass(path, ref, this)); - - nodes.push(ref); - - path.replaceWith(t.sequenceExpression(nodes)); - }, - ClassDeclaration: function ClassDeclaration(path) { - if (!hasDecorators(path)) return; - doError(path); - (0, _babelHelperExplodeClass2.default)(path); - - var ref = path.node.id; - var nodes = []; - - nodes = nodes.concat(transformClass(path, ref, this).map(function (expr) { - return t.expressionStatement(expr); - })); - nodes.push(t.expressionStatement(ref)); - - path.insertAfter(nodes); - }, - ObjectExpression: function ObjectExpression(path) { - if (!hasDecorators(path)) return; - doError(path); - } - } - }; - }; - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - var _babelHelperExplodeClass = $__require("ea"); - - var _babelHelperExplodeClass2 = _interopRequireDefault(_babelHelperExplodeClass); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var buildClassDecorator = (0, _babelTemplate2.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n"); - - module.exports = exports["default"]; -}); -$__System.registerDynamic("ec", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("dynamicImport"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("e4", ["ed", "e6", "eb", "ec"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _babelPresetStage = $__require("ed"); - - var _babelPresetStage2 = _interopRequireDefault(_babelPresetStage); - - var _babelPluginTransformClassProperties = $__require("e6"); - - var _babelPluginTransformClassProperties2 = _interopRequireDefault(_babelPluginTransformClassProperties); - - var _babelPluginTransformDecorators = $__require("eb"); - - var _babelPluginTransformDecorators2 = _interopRequireDefault(_babelPluginTransformDecorators); - - var _babelPluginSyntaxDynamicImport = $__require("ec"); - - var _babelPluginSyntaxDynamicImport2 = _interopRequireDefault(_babelPluginSyntaxDynamicImport); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.default = { - presets: [_babelPresetStage2.default], - plugins: [_babelPluginSyntaxDynamicImport2.default, _babelPluginTransformClassProperties2.default, _babelPluginTransformDecorators2.default] - }; - module.exports = exports["default"]; -}); -$__System.registerDynamic("ee", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("trailingFunctionCommas"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("ef", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("asyncFunctions"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f0", ["ef", "f1"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - inherits: $__require("ef"), - - visitor: { - Function: function Function(path, state) { - if (!path.node.async || path.node.generator) return; - - (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, { - wrapAsync: state.addHelper("asyncToGenerator") - }); - } - } - }; - }; - - var _babelHelperRemapAsyncToGenerator = $__require("f1"); - - var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f2", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("exponentiationOperator"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f3", ["11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (node, nodes, file, scope, allowedSingleIdent) { - var obj = void 0; - if (t.isIdentifier(node) && allowedSingleIdent) { - obj = node; - } else { - obj = getObjRef(node, nodes, file, scope); - } - - var ref = void 0, - uid = void 0; - - if (t.isIdentifier(node)) { - ref = node; - uid = obj; - } else { - var prop = getPropRef(node, nodes, file, scope); - var computed = node.computed || t.isLiteral(prop); - uid = ref = t.memberExpression(obj, prop, computed); - } - - return { - uid: uid, - ref: ref - }; - }; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function getObjRef(node, nodes, file, scope) { - var ref = void 0; - if (t.isSuper(node)) { - return node; - } else if (t.isIdentifier(node)) { - if (scope.hasBinding(node.name)) { - return node; - } else { - ref = node; - } - } else if (t.isMemberExpression(node)) { - ref = node.object; - - if (t.isSuper(ref) || t.isIdentifier(ref) && scope.hasBinding(ref.name)) { - return ref; - } - } else { - throw new Error("We can't explode this node type " + node.type); - } - - var temp = scope.generateUidIdentifierBasedOnNode(ref); - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(temp, ref)])); - return temp; - } - - function getPropRef(node, nodes, file, scope) { - var prop = node.property; - var key = t.toComputedKey(node, prop); - if (t.isLiteral(key) && t.isPureish(key)) return key; - - var temp = scope.generateUidIdentifierBasedOnNode(prop); - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(temp, prop)])); - return temp; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f4", ["f3", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (opts) { - var visitor = {}; - - function isAssignment(node) { - return node && node.operator === opts.operator + "="; - } - - function buildAssignment(left, right) { - return t.assignmentExpression("=", left, right); - } - - visitor.ExpressionStatement = function (path, file) { - if (path.isCompletionRecord()) return; - - var expr = path.node.expression; - if (!isAssignment(expr)) return; - - var nodes = []; - var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(expr.left, nodes, file, path.scope, true); - - nodes.push(t.expressionStatement(buildAssignment(exploded.ref, opts.build(exploded.uid, expr.right)))); - - path.replaceWithMultiple(nodes); - }; - - visitor.AssignmentExpression = function (path, file) { - var node = path.node, - scope = path.scope; - - if (!isAssignment(node)) return; - - var nodes = []; - var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(node.left, nodes, file, scope); - nodes.push(buildAssignment(exploded.ref, opts.build(exploded.uid, node.right))); - path.replaceWithMultiple(nodes); - }; - - visitor.BinaryExpression = function (path) { - var node = path.node; - - if (node.operator === opts.operator) { - path.replaceWith(opts.build(node.left, node.right)); - } - }; - - return visitor; - }; - - var _babelHelperExplodeAssignableExpression = $__require("f3"); - - var _babelHelperExplodeAssignableExpression2 = _interopRequireDefault(_babelHelperExplodeAssignableExpression); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f5", ["f2", "f4"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var t = _ref.types; - - return { - inherits: $__require("f2"), - - visitor: (0, _babelHelperBuilderBinaryAssignmentOperatorVisitor2.default)({ - operator: "**", - - build: function build(left, right) { - return t.callExpression(t.memberExpression(t.identifier("Math"), t.identifier("pow")), [left, right]); - } - }) - }; - }; - - var _babelHelperBuilderBinaryAssignmentOperatorVisitor = $__require("f4"); - - var _babelHelperBuilderBinaryAssignmentOperatorVisitor2 = _interopRequireDefault(_babelHelperBuilderBinaryAssignmentOperatorVisitor); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f6", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("objectRestSpread"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f7", ["17", "f6"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - function hasRestProperty(path) { - var foundRestProperty = false; - path.traverse({ - RestProperty: function RestProperty() { - foundRestProperty = true; - path.stop(); - } - }); - return foundRestProperty; - } - - function hasSpread(node) { - for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var prop = _ref2; - - if (t.isSpreadProperty(prop)) { - return true; - } - } - return false; - } - - function createObjectSpread(file, props, objRef) { - var restProperty = props.pop(); - - var keys = []; - for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var prop = _ref3; - - var key = prop.key; - if (t.isIdentifier(key) && !prop.computed) { - key = t.stringLiteral(prop.key.name); - } - keys.push(key); - } - - return [restProperty.argument, t.callExpression(file.addHelper("objectWithoutProperties"), [objRef, t.arrayExpression(keys)])]; - } - - function replaceRestProperty(parentPath, paramPath, i, numParams) { - if (paramPath.isAssignmentPattern()) { - replaceRestProperty(parentPath, paramPath.get("left"), i, numParams); - return; - } - - if (paramPath.isObjectPattern() && hasRestProperty(paramPath)) { - var uid = parentPath.scope.generateUidIdentifier("ref"); - - var declar = t.variableDeclaration("let", [t.variableDeclarator(paramPath.node, uid)]); - declar._blockHoist = i ? numParams - i : 1; - - parentPath.ensureBlock(); - parentPath.get("body").unshiftContainer("body", declar); - paramPath.replaceWith(uid); - } - } - - return { - inherits: $__require("f6"), - - visitor: { - Function: function Function(path) { - var params = path.get("params"); - for (var i = 0; i < params.length; i++) { - replaceRestProperty(params[i].parentPath, params[i], i, params.length); - } - }, - VariableDeclarator: function VariableDeclarator(path, file) { - if (!path.get("id").isObjectPattern()) { - return; - } - - var insertionPath = path; - - path.get("id").traverse({ - RestProperty: function RestProperty(path) { - if (this.originalPath.node.id.properties.length > 1 && !t.isIdentifier(this.originalPath.node.init)) { - var initRef = path.scope.generateUidIdentifierBasedOnNode(this.originalPath.node.init, "ref"); - - this.originalPath.insertBefore(t.variableDeclarator(initRef, this.originalPath.node.init)); - - this.originalPath.replaceWith(t.variableDeclarator(this.originalPath.node.id, initRef)); - - return; - } - - var ref = this.originalPath.node.init; - - path.findParent(function (path) { - if (path.isObjectProperty()) { - ref = t.memberExpression(ref, t.identifier(path.node.key.name)); - } else if (path.isVariableDeclarator()) { - return true; - } - }); - - var _createObjectSpread = createObjectSpread(file, path.parentPath.node.properties, ref), - argument = _createObjectSpread[0], - callExpression = _createObjectSpread[1]; - - insertionPath.insertAfter(t.variableDeclarator(argument, callExpression)); - - insertionPath = insertionPath.getSibling(insertionPath.key + 1); - - if (path.parentPath.node.properties.length === 0) { - path.findParent(function (path) { - return path.isObjectProperty() || path.isVariableDeclarator(); - }).remove(); - } - } - }, { - originalPath: path - }); - }, - ExportNamedDeclaration: function ExportNamedDeclaration(path) { - var declaration = path.get("declaration"); - if (!declaration.isVariableDeclaration()) return; - if (!hasRestProperty(declaration)) return; - - var specifiers = []; - - for (var name in path.getOuterBindingIdentifiers(path)) { - var id = t.identifier(name); - specifiers.push(t.exportSpecifier(id, id)); - } - - path.replaceWith(declaration.node); - path.insertAfter(t.exportNamedDeclaration(null, specifiers)); - }, - CatchClause: function CatchClause(path) { - var paramPath = path.get("param"); - replaceRestProperty(paramPath.parentPath, paramPath); - }, - AssignmentExpression: function AssignmentExpression(path, file) { - var leftPath = path.get("left"); - if (leftPath.isObjectPattern() && hasRestProperty(leftPath)) { - var nodes = []; - - var ref = void 0; - if (path.isCompletionRecord() || path.parentPath.isExpressionStatement()) { - ref = path.scope.generateUidIdentifierBasedOnNode(path.node.right, "ref"); - - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, path.node.right)])); - } - - var _createObjectSpread2 = createObjectSpread(file, path.node.left.properties, ref), - argument = _createObjectSpread2[0], - callExpression = _createObjectSpread2[1]; - - var nodeWithoutSpread = t.clone(path.node); - nodeWithoutSpread.right = ref; - nodes.push(t.expressionStatement(nodeWithoutSpread)); - nodes.push(t.toStatement(t.assignmentExpression("=", argument, callExpression))); - - if (ref) { - nodes.push(t.expressionStatement(ref)); - } - - path.replaceWithMultiple(nodes); - } - }, - ForXStatement: function ForXStatement(path) { - var node = path.node, - scope = path.scope; - - var leftPath = path.get("left"); - var left = node.left; - - if (t.isObjectPattern(left) && hasRestProperty(leftPath)) { - var temp = scope.generateUidIdentifier("ref"); - - node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]); - - path.ensureBlock(); - - node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)])); - - return; - } - - if (!t.isVariableDeclaration(left)) return; - - var pattern = left.declarations[0].id; - if (!t.isObjectPattern(pattern)) return; - - var key = scope.generateUidIdentifier("ref"); - node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]); - - path.ensureBlock(); - - node.body.body.unshift(t.variableDeclaration(node.left.kind, [t.variableDeclarator(pattern, key)])); - }, - ObjectExpression: function ObjectExpression(path, file) { - if (!hasSpread(path.node)) return; - - var useBuiltIns = file.opts.useBuiltIns || false; - if (typeof useBuiltIns !== "boolean") { - throw new Error("transform-object-rest-spread currently only accepts a boolean " + "option for useBuiltIns (defaults to false)"); - } - - var args = []; - var props = []; - - function push() { - if (!props.length) return; - args.push(t.objectExpression(props)); - props = []; - } - - for (var _iterator3 = path.node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var prop = _ref4; - - if (t.isSpreadProperty(prop)) { - push(); - args.push(prop.argument); - } else { - props.push(prop); - } - } - - push(); - - if (!t.isObjectExpression(args[0])) { - args.unshift(t.objectExpression([])); - } - - var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends"); - - path.replaceWith(t.callExpression(helper, args)); - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f8", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("asyncGenerators"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f9", ["11", "10", "d0"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (path, helpers) { - var node = path.node, - scope = path.scope, - parent = path.parent; - - var stepKey = scope.generateUidIdentifier("step"); - var stepValue = scope.generateUidIdentifier("value"); - var left = node.left; - var declar = void 0; - - if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) { - declar = t.expressionStatement(t.assignmentExpression("=", left, stepValue)); - } else if (t.isVariableDeclaration(left)) { - declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, stepValue)]); - } - - var template = buildForAwait(); - - (0, _babelTraverse2.default)(template, forAwaitVisitor, null, { - ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"), - ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"), - ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"), - ITERATOR_KEY: scope.generateUidIdentifier("iterator"), - GET_ITERATOR: helpers.getAsyncIterator, - OBJECT: node.right, - STEP_VALUE: stepValue, - STEP_KEY: stepKey, - AWAIT: helpers.wrapAwait - }); - - template = template.body.body; - - var isLabeledParent = t.isLabeledStatement(parent); - var tryBody = template[3].block.body; - var loop = tryBody[0]; - - if (isLabeledParent) { - tryBody[0] = t.labeledStatement(parent.label, loop); - } - - return { - replaceParent: isLabeledParent, - node: template, - declar: declar, - loop: loop - }; - }; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - var _babelTraverse = $__require("d0"); - - var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - var 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"); - - var forAwaitVisitor = { - noScope: true, - - Identifier: function Identifier(path, replacements) { - if (path.node.name in replacements) { - path.replaceInline(replacements[path.node.name]); - } - }, - CallExpression: function CallExpression(path, replacements) { - var callee = path.node.callee; - - if (t.isIdentifier(callee) && callee.name === "AWAIT" && !replacements.AWAIT) { - path.replaceWith(path.node.arguments[0]); - } - } - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("f1", ["e7", "10", "11", "f9"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (path, file, helpers) { - if (!helpers) { - helpers = { wrapAsync: file }; - file = null; - } - path.traverse(awaitVisitor, { - file: file, - wrapAwait: helpers.wrapAwait - }); - - if (path.isClassMethod() || path.isObjectMethod()) { - classOrObjectMethod(path, helpers.wrapAsync); - } else { - plainFunction(path, helpers.wrapAsync); - } - }; - - var _babelHelperFunctionName = $__require("e7"); - - var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _forAwait = $__require("f9"); - - var _forAwait2 = _interopRequireDefault(_forAwait); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var buildWrapper = (0, _babelTemplate2.default)("\n (() => {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })\n"); - - 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"); - - var awaitVisitor = { - Function: function Function(path) { - if (path.isArrowFunctionExpression() && !path.node.async) { - path.arrowFunctionToShadowed(); - return; - } - path.skip(); - }, - AwaitExpression: function AwaitExpression(_ref, _ref2) { - var node = _ref.node; - var wrapAwait = _ref2.wrapAwait; - - node.type = "YieldExpression"; - if (wrapAwait) { - node.argument = t.callExpression(wrapAwait, [node.argument]); - } - }, - ForAwaitStatement: function ForAwaitStatement(path, _ref3) { - var file = _ref3.file, - wrapAwait = _ref3.wrapAwait; - var node = path.node; - - var build = (0, _forAwait2.default)(path, { - getAsyncIterator: file.addHelper("asyncIterator"), - wrapAwait: wrapAwait - }); - - var declar = build.declar, - loop = build.loop; - - var block = loop.body; - - path.ensureBlock(); - - if (declar) { - block.body.push(declar); - } - - block.body = block.body.concat(node.body.body); - - t.inherits(loop, node); - t.inherits(loop.body, node.body); - - if (build.replaceParent) { - path.parentPath.replaceWithMultiple(build.node); - path.remove(); - } else { - path.replaceWithMultiple(build.node); - } - } - }; - - function classOrObjectMethod(path, callId) { - var node = path.node; - var body = node.body; - - node.async = false; - - var container = t.functionExpression(null, [], t.blockStatement(body.body), true); - container.shadow = true; - body.body = [t.returnStatement(t.callExpression(t.callExpression(callId, [container]), []))]; - - node.generator = false; - } - - function plainFunction(path, callId) { - var node = path.node; - var isDeclaration = path.isFunctionDeclaration(); - var asyncFnId = node.id; - var wrapper = buildWrapper; - - if (path.isArrowFunctionExpression()) { - path.arrowFunctionToShadowed(); - } else if (!isDeclaration && asyncFnId) { - wrapper = namedBuildWrapper; - } - - node.async = false; - node.generator = true; - - node.id = null; - - if (isDeclaration) { - node.type = "FunctionExpression"; - } - - var built = t.callExpression(callId, [node]); - var container = wrapper({ - NAME: asyncFnId, - REF: path.scope.generateUidIdentifier("ref"), - FUNCTION: built, - PARAMS: node.params.reduce(function (acc, param) { - acc.done = acc.done || t.isAssignmentPattern(param) || t.isRestElement(param); - - if (!acc.done) { - acc.params.push(path.scope.generateUidIdentifier("x")); - } - - return acc; - }, { - params: [], - done: false - }).params - }).expression; - - if (isDeclaration) { - var declar = t.variableDeclaration("let", [t.variableDeclarator(t.identifier(asyncFnId.name), t.callExpression(container, []))]); - declar._blockHoist = true; - - path.replaceWith(declar); - } else { - var retFunction = container.body.body[1].argument; - if (!asyncFnId) { - (0, _babelHelperFunctionName2.default)({ - node: retFunction, - parent: path.parent, - scope: path.scope - }); - } - - if (!retFunction || retFunction.id || node.params.length) { - path.replaceWith(t.callExpression(container, [])); - } else { - path.replaceWith(built); - } - } - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("fa", ["f8", "f1"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var t = _ref.types; - - var yieldStarVisitor = { - Function: function Function(path) { - path.skip(); - }, - YieldExpression: function YieldExpression(_ref2, state) { - var node = _ref2.node; - - if (!node.delegate) return; - var callee = state.addHelper("asyncGeneratorDelegate"); - node.argument = t.callExpression(callee, [t.callExpression(state.addHelper("asyncIterator"), [node.argument]), t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await"))]); - } - }; - - return { - inherits: $__require("f8"), - visitor: { - Function: function Function(path, state) { - if (!path.node.async || !path.node.generator) return; - - path.traverse(yieldStarVisitor, state); - - (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, { - wrapAsync: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("wrap")), - wrapAwait: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await")) - }); - } - } - }; - }; - - var _babelHelperRemapAsyncToGenerator = $__require("f1"); - - var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("ed", ["ee", "f0", "f5", "f7", "fa"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _babelPluginSyntaxTrailingFunctionCommas = $__require("ee"); - - var _babelPluginSyntaxTrailingFunctionCommas2 = _interopRequireDefault(_babelPluginSyntaxTrailingFunctionCommas); - - var _babelPluginTransformAsyncToGenerator = $__require("f0"); - - var _babelPluginTransformAsyncToGenerator2 = _interopRequireDefault(_babelPluginTransformAsyncToGenerator); - - var _babelPluginTransformExponentiationOperator = $__require("f5"); - - var _babelPluginTransformExponentiationOperator2 = _interopRequireDefault(_babelPluginTransformExponentiationOperator); - - var _babelPluginTransformObjectRestSpread = $__require("f7"); - - var _babelPluginTransformObjectRestSpread2 = _interopRequireDefault(_babelPluginTransformObjectRestSpread); - - var _babelPluginTransformAsyncGeneratorFunctions = $__require("fa"); - - var _babelPluginTransformAsyncGeneratorFunctions2 = _interopRequireDefault(_babelPluginTransformAsyncGeneratorFunctions); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.default = { - plugins: [_babelPluginSyntaxTrailingFunctionCommas2.default, _babelPluginTransformAsyncToGenerator2.default, _babelPluginTransformExponentiationOperator2.default, _babelPluginTransformAsyncGeneratorFunctions2.default, _babelPluginTransformObjectRestSpread2.default] - }; - module.exports = exports["default"]; -}); -$__System.registerDynamic("fb", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("flow"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("fc", ["17", "fb"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - var FLOW_DIRECTIVE = "@flow"; - - return { - inherits: $__require("fb"), - - visitor: { - Program: function Program(path, _ref2) { - var comments = _ref2.file.ast.comments; - - for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var comment = _ref3; - - if (comment.value.indexOf(FLOW_DIRECTIVE) >= 0) { - comment.value = comment.value.replace(FLOW_DIRECTIVE, ""); - - if (!comment.value.replace(/\*/g, "").trim()) comment.ignore = true; - } - } - }, - Flow: function Flow(path) { - path.remove(); - }, - ClassProperty: function ClassProperty(path) { - path.node.variance = null; - path.node.typeAnnotation = null; - if (!path.node.value) path.remove(); - }, - Class: function Class(path) { - path.node.implements = null; - - path.get("body.body").forEach(function (child) { - if (child.isClassProperty()) { - child.node.typeAnnotation = null; - if (!child.node.value) child.remove(); - } - }); - }, - AssignmentPattern: function AssignmentPattern(_ref4) { - var node = _ref4.node; - - node.left.optional = false; - }, - Function: function Function(_ref5) { - var node = _ref5.node; - - for (var i = 0; i < node.params.length; i++) { - var param = node.params[i]; - param.optional = false; - } - }, - TypeCastExpression: function TypeCastExpression(path) { - var node = path.node; - - do { - node = node.expression; - } while (t.isTypeCastExpression(node)); - path.replaceWith(node); - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("fd", ["fc"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _babelPluginTransformFlowStripTypes = $__require("fc"); - - var _babelPluginTransformFlowStripTypes2 = _interopRequireDefault(_babelPluginTransformFlowStripTypes); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.default = { - plugins: [_babelPluginTransformFlowStripTypes2.default] - }; - module.exports = exports["default"]; -}); -$__System.registerDynamic("fe", ["ff", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (opts) { - var visitor = {}; - - visitor.JSXNamespacedName = function (path) { - throw path.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML."); - }; - - visitor.JSXElement = { - exit: function exit(path, file) { - var callExpr = buildElementCall(path.get("openingElement"), file); - - callExpr.arguments = callExpr.arguments.concat(path.node.children); - - if (callExpr.arguments.length >= 3) { - callExpr._prettyCall = true; - } - - path.replaceWith(t.inherits(callExpr, path.node)); - } - }; - - return visitor; - - function convertJSXIdentifier(node, parent) { - if (t.isJSXIdentifier(node)) { - if (node.name === "this" && t.isReferenced(node, parent)) { - return t.thisExpression(); - } else if (_esutils2.default.keyword.isIdentifierNameES6(node.name)) { - node.type = "Identifier"; - } else { - return t.stringLiteral(node.name); - } - } else if (t.isJSXMemberExpression(node)) { - return t.memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node)); - } - - return node; - } - - function convertAttributeValue(node) { - if (t.isJSXExpressionContainer(node)) { - return node.expression; - } else { - return node; - } - } - - function convertAttribute(node) { - var value = convertAttributeValue(node.value || t.booleanLiteral(true)); - - if (t.isStringLiteral(value) && !t.isJSXExpressionContainer(node.value)) { - value.value = value.value.replace(/\n\s+/g, " "); - } - - if (t.isValidIdentifier(node.name.name)) { - node.name.type = "Identifier"; - } else { - node.name = t.stringLiteral(node.name.name); - } - - return t.inherits(t.objectProperty(node.name, value), node); - } - - function buildElementCall(path, file) { - path.parent.children = t.react.buildChildren(path.parent); - - var tagExpr = convertJSXIdentifier(path.node.name, path.node); - var args = []; - - var tagName = void 0; - if (t.isIdentifier(tagExpr)) { - tagName = tagExpr.name; - } else if (t.isLiteral(tagExpr)) { - tagName = tagExpr.value; - } - - var state = { - tagExpr: tagExpr, - tagName: tagName, - args: args - }; - - if (opts.pre) { - opts.pre(state, file); - } - - var attribs = path.node.attributes; - if (attribs.length) { - attribs = buildOpeningElementAttributes(attribs, file); - } else { - attribs = t.nullLiteral(); - } - - args.push(attribs); - - if (opts.post) { - opts.post(state, file); - } - - return state.call || t.callExpression(state.callee, args); - } - - function buildOpeningElementAttributes(attribs, file) { - var _props = []; - var objs = []; - - var useBuiltIns = file.opts.useBuiltIns || false; - if (typeof useBuiltIns !== "boolean") { - throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)"); - } - - function pushProps() { - if (!_props.length) return; - - objs.push(t.objectExpression(_props)); - _props = []; - } - - while (attribs.length) { - var prop = attribs.shift(); - if (t.isJSXSpreadAttribute(prop)) { - pushProps(); - objs.push(prop.argument); - } else { - _props.push(convertAttribute(prop)); - } - } - - pushProps(); - - if (objs.length === 1) { - attribs = objs[0]; - } else { - if (!t.isObjectExpression(objs[0])) { - objs.unshift(t.objectExpression([])); - } - - var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends"); - - attribs = t.callExpression(helper, objs); - } - - return attribs; - } - }; - - var _esutils = $__require("ff"); - - var _esutils2 = _interopRequireDefault(_esutils); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("100", ["17", "101", "fe"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/; - - var visitor = (0, _babelHelperBuilderReactJsx2.default)({ - pre: function pre(state) { - var tagName = state.tagName; - var args = state.args; - if (t.react.isCompatTag(tagName)) { - args.push(t.stringLiteral(tagName)); - } else { - args.push(state.tagExpr); - } - }, - post: function post(state, pass) { - state.callee = pass.get("jsxIdentifier")(); - } - }); - - visitor.Program = function (path, state) { - var file = state.file; - - var id = state.opts.pragma || "React.createElement"; - - for (var _iterator = file.ast.comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var comment = _ref2; - - var matches = JSX_ANNOTATION_REGEX.exec(comment.value); - if (matches) { - id = matches[1]; - if (id === "React.DOM") { - throw file.buildCodeFrameError(comment, "The @jsx React.DOM pragma has been deprecated as of React 0.12"); - } else { - break; - } - } - } - - state.set("jsxIdentifier", function () { - return id.split(".").map(function (name) { - return t.identifier(name); - }).reduce(function (object, property) { - return t.memberExpression(object, property); - }); - }); - }; - - return { - inherits: _babelPluginSyntaxJsx2.default, - visitor: visitor - }; - }; - - var _babelPluginSyntaxJsx = $__require("101"); - - var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx); - - var _babelHelperBuilderReactJsx = $__require("fe"); - - var _babelHelperBuilderReactJsx2 = _interopRequireDefault(_babelHelperBuilderReactJsx); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("101", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("jsx"); - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("102", ["@node/path"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var t = _ref.types; - - function addDisplayName(id, call) { - var props = call.arguments[0].properties; - var safe = true; - - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - var key = t.toComputedKey(prop); - if (t.isLiteral(key, { value: "displayName" })) { - safe = false; - break; - } - } - - if (safe) { - props.unshift(t.objectProperty(t.identifier("displayName"), t.stringLiteral(id))); - } - } - - var isCreateClassCallExpression = t.buildMatchMemberExpression("React.createClass"); - var isCreateClassAddon = function isCreateClassAddon(callee) { - return callee.name === "createReactClass"; - }; - - function isCreateClass(node) { - if (!node || !t.isCallExpression(node)) return false; - - if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) return false; - - var args = node.arguments; - if (args.length !== 1) return false; - - var first = args[0]; - if (!t.isObjectExpression(first)) return false; - - return true; - } - - return { - visitor: { - ExportDefaultDeclaration: function ExportDefaultDeclaration(_ref2, state) { - var node = _ref2.node; - - if (isCreateClass(node.declaration)) { - var displayName = state.file.opts.basename; - - if (displayName === "index") { - displayName = _path2.default.basename(_path2.default.dirname(state.file.opts.filename)); - } - - addDisplayName(displayName, node.declaration); - } - }, - CallExpression: function CallExpression(path) { - var node = path.node; - - if (!isCreateClass(node)) return; - - var id = void 0; - - path.find(function (path) { - if (path.isAssignmentExpression()) { - id = path.node.left; - } else if (path.isObjectProperty()) { - id = path.node.key; - } else if (path.isVariableDeclarator()) { - id = path.node.id; - } else if (path.isStatement()) { - return true; - } - - if (id) return true; - }); - - if (!id) return; - - if (t.isMemberExpression(id)) { - id = id.property; - } - - if (t.isIdentifier(id)) { - addDisplayName(id.name, node); - } - } - } - }; - }; - - var _path = $__require("@node/path"); - - var _path2 = _interopRequireDefault(_path); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("103", ["fd", "100", "101", "102"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _babelPresetFlow = $__require("fd"); - - var _babelPresetFlow2 = _interopRequireDefault(_babelPresetFlow); - - var _babelPluginTransformReactJsx = $__require("100"); - - var _babelPluginTransformReactJsx2 = _interopRequireDefault(_babelPluginTransformReactJsx); - - var _babelPluginSyntaxJsx = $__require("101"); - - var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx); - - var _babelPluginTransformReactDisplayName = $__require("102"); - - var _babelPluginTransformReactDisplayName2 = _interopRequireDefault(_babelPluginTransformReactDisplayName); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.default = { - presets: [_babelPresetFlow2.default], - plugins: [_babelPluginTransformReactJsx2.default, _babelPluginSyntaxJsx2.default, _babelPluginTransformReactDisplayName2.default], - env: { - development: { - plugins: [] - } - } - }; - module.exports = exports["default"]; -}); -$__System.registerDynamic("104", ["17"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - function isString(node) { - return t.isLiteral(node) && typeof node.value === "string"; - } - - function buildBinaryExpression(left, right) { - return t.binaryExpression("+", left, right); - } - - return { - visitor: { - TaggedTemplateExpression: function TaggedTemplateExpression(path, state) { - var node = path.node; - - var quasi = node.quasi; - var args = []; - - var strings = []; - var raw = []; - - for (var _iterator = quasi.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var elem = _ref2; - - strings.push(t.stringLiteral(elem.value.cooked)); - raw.push(t.stringLiteral(elem.value.raw)); - } - - strings = t.arrayExpression(strings); - raw = t.arrayExpression(raw); - - var templateName = "taggedTemplateLiteral"; - if (state.opts.loose) templateName += "Loose"; - - var templateObject = state.file.addTemplateObject(templateName, strings, raw); - args.push(templateObject); - - args = args.concat(quasi.expressions); - - path.replaceWith(t.callExpression(node.tag, args)); - }, - TemplateLiteral: function TemplateLiteral(path, state) { - var nodes = []; - - var expressions = path.get("expressions"); - - for (var _iterator2 = path.node.quasis, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var elem = _ref3; - - nodes.push(t.stringLiteral(elem.value.cooked)); - - var expr = expressions.shift(); - if (expr) { - if (state.opts.spec && !expr.isBaseType("string") && !expr.isBaseType("number")) { - nodes.push(t.callExpression(t.identifier("String"), [expr.node])); - } else { - nodes.push(expr.node); - } - } - } - - nodes = nodes.filter(function (n) { - return !t.isLiteral(n, { value: "" }); - }); - - if (!isString(nodes[0]) && !isString(nodes[1])) { - nodes.unshift(t.stringLiteral("")); - } - - if (nodes.length > 1) { - var root = buildBinaryExpression(nodes.shift(), nodes.shift()); - - for (var _iterator3 = nodes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var node = _ref4; - - root = buildBinaryExpression(root, node); - } - - path.replaceWith(root); - } else { - path.replaceWith(nodes[0]); - } - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("105", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - visitor: { - NumericLiteral: function NumericLiteral(_ref) { - var node = _ref.node; - - if (node.extra && /^0[ob]/i.test(node.extra.raw)) { - node.extra = undefined; - } - }, - StringLiteral: function StringLiteral(_ref2) { - var node = _ref2.node; - - if (node.extra && /\\[u]/gi.test(node.extra.raw)) { - node.extra = undefined; - } - } - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("106", ["e7"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - visitor: { - FunctionExpression: { - exit: function exit(path) { - if (path.key !== "value" && !path.parentPath.isObjectProperty()) { - var replacement = (0, _babelHelperFunctionName2.default)(path); - if (replacement) path.replaceWith(replacement); - } - } - }, - - ObjectProperty: function ObjectProperty(path) { - var value = path.get("value"); - if (value.isFunction()) { - var newNode = (0, _babelHelperFunctionName2.default)(value); - if (newNode) value.replaceWith(newNode); - } - } - } - }; - }; - - var _babelHelperFunctionName = $__require("e7"); - - var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("107", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var t = _ref.types; - - return { - visitor: { - ArrowFunctionExpression: function ArrowFunctionExpression(path, state) { - if (state.opts.spec) { - var node = path.node; - - if (node.shadow) return; - - node.shadow = { this: false }; - node.type = "FunctionExpression"; - - var boundThis = t.thisExpression(); - boundThis._forceShadow = path; - - path.ensureBlock(); - path.get("body").unshiftContainer("body", t.expressionStatement(t.callExpression(state.addHelper("newArrowCheck"), [t.thisExpression(), boundThis]))); - - path.replaceWith(t.callExpression(t.memberExpression(node, t.identifier("bind")), [t.thisExpression()])); - } else { - path.arrowFunctionToShadowed(); - } - } - } - }; - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("108", ["17"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - function statementList(key, path) { - var paths = path.get(key); - - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var _path = _ref2; - - var func = _path.node; - if (!_path.isFunctionDeclaration()) continue; - - var declar = t.variableDeclaration("let", [t.variableDeclarator(func.id, t.toExpression(func))]); - - declar._blockHoist = 2; - - func.id = null; - - _path.replaceWith(declar); - } - } - - return { - visitor: { - BlockStatement: function BlockStatement(path) { - var node = path.node, - parent = path.parent; - - if (t.isFunction(parent, { body: node }) || t.isExportDeclaration(parent)) { - return; - } - - statementList("body", path); - }, - SwitchCase: function SwitchCase(path) { - statementList("consequent", path); - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("1e", ["30"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _typeof2 = $__require("30"); - - var _typeof3 = _interopRequireDefault(_typeof2); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.default = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; - }; -}); -$__System.registerDynamic('109', ['10a', '10b', '10c', '10d', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // Works with __proto__ only. Old v8 can't work with null proto objects. - /* eslint-disable no-proto */ - var isObject = $__require('10a'), - anObject = $__require('10b'); - var check = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); - }; - module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { - try { - set = $__require('10c')(Function.call, $__require('10d').f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { - buggy = true; - } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto;else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check - }; -}); -$__System.registerDynamic('10e', ['c6', '109', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // 19.1.3.19 Object.setPrototypeOf(O, proto) - var $export = $__require('c6'); - $export($export.S, 'Object', { setPrototypeOf: $__require('109').set }); -}); -$__System.registerDynamic('10f', ['10e', '37', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - $__require('10e'); - module.exports = $__require('37').Object.setPrototypeOf; -}); -$__System.registerDynamic("110", ["10f"], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - module.exports = { "default": $__require("10f"), __esModule: true }; -}); -$__System.registerDynamic("1f", ["110", "d4", "30"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _setPrototypeOf = $__require("110"); - - var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); - - var _create = $__require("d4"); - - var _create2 = _interopRequireDefault(_create); - - var _typeof2 = $__require("30"); - - var _typeof3 = _interopRequireDefault(_typeof2); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.default = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); - } - - subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; - }; -}); -$__System.registerDynamic("111", ["1d", "1e", "1f", "e7", "112", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _possibleConstructorReturn2 = $__require("1e"); - - var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - - var _inherits2 = $__require("1f"); - - var _inherits3 = _interopRequireDefault(_inherits2); - - var _babelHelperFunctionName = $__require("e7"); - - var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - - var _vanilla = $__require("112"); - - var _vanilla2 = _interopRequireDefault(_vanilla); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var LooseClassTransformer = function (_VanillaTransformer) { - (0, _inherits3.default)(LooseClassTransformer, _VanillaTransformer); - - function LooseClassTransformer() { - (0, _classCallCheck3.default)(this, LooseClassTransformer); - - var _this = (0, _possibleConstructorReturn3.default)(this, _VanillaTransformer.apply(this, arguments)); - - _this.isLoose = true; - return _this; - } - - LooseClassTransformer.prototype._processMethod = function _processMethod(node, scope) { - if (!node.decorators) { - - var classRef = this.classRef; - if (!node.static) classRef = t.memberExpression(classRef, t.identifier("prototype")); - var methodName = t.memberExpression(classRef, node.key, node.computed || t.isLiteral(node.key)); - - var func = t.functionExpression(null, node.params, node.body, node.generator, node.async); - func.returnType = node.returnType; - var key = t.toComputedKey(node, node.key); - if (t.isStringLiteral(key)) { - func = (0, _babelHelperFunctionName2.default)({ - node: func, - id: key, - scope: scope - }); - } - - var expr = t.expressionStatement(t.assignmentExpression("=", methodName, func)); - t.inheritsComments(expr, node); - this.body.push(expr); - return true; - } - }; - - return LooseClassTransformer; - }(_vanilla2.default); - - exports.default = LooseClassTransformer; - module.exports = exports["default"]; -}); -$__System.registerDynamic("113", ["15", "e7", "114", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _keys = $__require("15"); - - var _keys2 = _interopRequireDefault(_keys); - - exports.push = push; - exports.hasComputed = hasComputed; - exports.toComputedObjectFromClass = toComputedObjectFromClass; - exports.toClassObject = toClassObject; - exports.toDefineObject = toDefineObject; - - var _babelHelperFunctionName = $__require("e7"); - - var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - - var _has = $__require("114"); - - var _has2 = _interopRequireDefault(_has); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function toKind(node) { - if (t.isClassMethod(node) || t.isObjectMethod(node)) { - if (node.kind === "get" || node.kind === "set") { - return node.kind; - } - } - - return "value"; - } - - function push(mutatorMap, node, kind, file, scope) { - var alias = t.toKeyAlias(node); - - var map = {}; - if ((0, _has2.default)(mutatorMap, alias)) map = mutatorMap[alias]; - mutatorMap[alias] = map; - - map._inherits = map._inherits || []; - map._inherits.push(node); - - map._key = node.key; - - if (node.computed) { - map._computed = true; - } - - if (node.decorators) { - var decorators = map.decorators = map.decorators || t.arrayExpression([]); - decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) { - return dec.expression; - }).reverse()); - } - - if (map.value || map.initializer) { - throw file.buildCodeFrameError(node, "Key conflict with sibling node"); - } - - var key = void 0, - value = void 0; - - if (t.isObjectProperty(node) || t.isObjectMethod(node) || t.isClassMethod(node)) { - key = t.toComputedKey(node, node.key); - } - - if (t.isObjectProperty(node) || t.isClassProperty(node)) { - value = node.value; - } else if (t.isObjectMethod(node) || t.isClassMethod(node)) { - value = t.functionExpression(null, node.params, node.body, node.generator, node.async); - value.returnType = node.returnType; - } - - var inheritedKind = toKind(node); - if (!kind || inheritedKind !== "value") { - kind = inheritedKind; - } - - if (scope && t.isStringLiteral(key) && (kind === "value" || kind === "initializer") && t.isFunctionExpression(value)) { - value = (0, _babelHelperFunctionName2.default)({ id: key, node: value, scope: scope }); - } - - if (value) { - t.inheritsComments(value, node); - map[kind] = value; - } - - return map; - } - - function hasComputed(mutatorMap) { - for (var key in mutatorMap) { - if (mutatorMap[key]._computed) { - return true; - } - } - return false; - } - - function toComputedObjectFromClass(obj) { - var objExpr = t.arrayExpression([]); - - for (var i = 0; i < obj.properties.length; i++) { - var prop = obj.properties[i]; - var val = prop.value; - val.properties.unshift(t.objectProperty(t.identifier("key"), t.toComputedKey(prop))); - objExpr.elements.push(val); - } - - return objExpr; - } - - function toClassObject(mutatorMap) { - var objExpr = t.objectExpression([]); - - (0, _keys2.default)(mutatorMap).forEach(function (mutatorMapKey) { - var map = mutatorMap[mutatorMapKey]; - var mapNode = t.objectExpression([]); - - var propNode = t.objectProperty(map._key, mapNode, map._computed); - - (0, _keys2.default)(map).forEach(function (key) { - var node = map[key]; - if (key[0] === "_") return; - - var inheritNode = node; - if (t.isClassMethod(node) || t.isClassProperty(node)) node = node.value; - - var prop = t.objectProperty(t.identifier(key), node); - t.inheritsComments(prop, inheritNode); - t.removeComments(inheritNode); - - mapNode.properties.push(prop); - }); - - objExpr.properties.push(propNode); - }); - - return objExpr; - } - - function toDefineObject(mutatorMap) { - (0, _keys2.default)(mutatorMap).forEach(function (key) { - var map = mutatorMap[key]; - if (map.value) map.writable = t.booleanLiteral(true); - map.configurable = t.booleanLiteral(true); - map.enumerable = t.booleanLiteral(true); - }); - - return toClassObject(mutatorMap); - } -}); -$__System.registerDynamic("112", ["17", "1d", "d0", "115", "116", "113", "10", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _babelTraverse = $__require("d0"); - - var _babelHelperReplaceSupers = $__require("115"); - - var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers); - - var _babelHelperOptimiseCallExpression = $__require("116"); - - var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression); - - var _babelHelperDefineMap = $__require("113"); - - var defineMap = _interopRequireWildcard(_babelHelperDefineMap); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var buildDerivedConstructor = (0, _babelTemplate2.default)("\n (function () {\n super(...arguments);\n })\n"); - - var noMethodVisitor = { - "FunctionExpression|FunctionDeclaration": function FunctionExpressionFunctionDeclaration(path) { - if (!path.is("shadow")) { - path.skip(); - } - }, - Method: function Method(path) { - path.skip(); - } - }; - - var verifyConstructorVisitor = _babelTraverse.visitors.merge([noMethodVisitor, { - Super: function Super(path) { - if (this.isDerived && !this.hasBareSuper && !path.parentPath.isCallExpression({ callee: path.node })) { - throw path.buildCodeFrameError("'super.*' is not allowed before super()"); - } - }, - - CallExpression: { - exit: function exit(path) { - if (path.get("callee").isSuper()) { - this.hasBareSuper = true; - - if (!this.isDerived) { - throw path.buildCodeFrameError("super() is only allowed in a derived constructor"); - } - } - } - }, - - ThisExpression: function ThisExpression(path) { - if (this.isDerived && !this.hasBareSuper) { - if (!path.inShadow("this")) { - throw path.buildCodeFrameError("'this' is not allowed before super()"); - } - } - } - }]); - - var findThisesVisitor = _babelTraverse.visitors.merge([noMethodVisitor, { - ThisExpression: function ThisExpression(path) { - this.superThises.push(path); - } - }]); - - var ClassTransformer = function () { - function ClassTransformer(path, file) { - (0, _classCallCheck3.default)(this, ClassTransformer); - - this.parent = path.parent; - this.scope = path.scope; - this.node = path.node; - this.path = path; - this.file = file; - - this.clearDescriptors(); - - this.instancePropBody = []; - this.instancePropRefs = {}; - this.staticPropBody = []; - this.body = []; - - this.bareSuperAfter = []; - this.bareSupers = []; - - this.pushedConstructor = false; - this.pushedInherits = false; - this.isLoose = false; - - this.superThises = []; - - this.classId = this.node.id; - - this.classRef = this.node.id ? t.identifier(this.node.id.name) : this.scope.generateUidIdentifier("class"); - - this.superName = this.node.superClass || t.identifier("Function"); - this.isDerived = !!this.node.superClass; - } - - ClassTransformer.prototype.run = function run() { - var _this = this; - - var superName = this.superName; - var file = this.file; - var body = this.body; - - var constructorBody = this.constructorBody = t.blockStatement([]); - this.constructor = this.buildConstructor(); - - var closureParams = []; - var closureArgs = []; - - if (this.isDerived) { - closureArgs.push(superName); - - superName = this.scope.generateUidIdentifierBasedOnNode(superName); - closureParams.push(superName); - - this.superName = superName; - } - - this.buildBody(); - - constructorBody.body.unshift(t.expressionStatement(t.callExpression(file.addHelper("classCallCheck"), [t.thisExpression(), this.classRef]))); - - body = body.concat(this.staticPropBody.map(function (fn) { - return fn(_this.classRef); - })); - - if (this.classId) { - if (body.length === 1) return t.toExpression(body[0]); - } - - body.push(t.returnStatement(this.classRef)); - - var container = t.functionExpression(null, closureParams, t.blockStatement(body)); - container.shadow = true; - return t.callExpression(container, closureArgs); - }; - - ClassTransformer.prototype.buildConstructor = function buildConstructor() { - var func = t.functionDeclaration(this.classRef, [], this.constructorBody); - t.inherits(func, this.node); - return func; - }; - - ClassTransformer.prototype.pushToMap = function pushToMap(node, enumerable) { - var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "value"; - var scope = arguments[3]; - - var mutatorMap = void 0; - if (node.static) { - this.hasStaticDescriptors = true; - mutatorMap = this.staticMutatorMap; - } else { - this.hasInstanceDescriptors = true; - mutatorMap = this.instanceMutatorMap; - } - - var map = defineMap.push(mutatorMap, node, kind, this.file, scope); - - if (enumerable) { - map.enumerable = t.booleanLiteral(true); - } - - return map; - }; - - ClassTransformer.prototype.constructorMeMaybe = function constructorMeMaybe() { - var hasConstructor = false; - var paths = this.path.get("body.body"); - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var path = _ref; - - hasConstructor = path.equals("kind", "constructor"); - if (hasConstructor) break; - } - if (hasConstructor) return; - - var params = void 0, - body = void 0; - - if (this.isDerived) { - var _constructor = buildDerivedConstructor().expression; - params = _constructor.params; - body = _constructor.body; - } else { - params = []; - body = t.blockStatement([]); - } - - this.path.get("body").unshiftContainer("body", t.classMethod("constructor", t.identifier("constructor"), params, body)); - }; - - ClassTransformer.prototype.buildBody = function buildBody() { - this.constructorMeMaybe(); - this.pushBody(); - this.verifyConstructor(); - - if (this.userConstructor) { - var constructorBody = this.constructorBody; - constructorBody.body = constructorBody.body.concat(this.userConstructor.body.body); - t.inherits(this.constructor, this.userConstructor); - t.inherits(constructorBody, this.userConstructor.body); - } - - this.pushDescriptors(); - }; - - ClassTransformer.prototype.pushBody = function pushBody() { - var classBodyPaths = this.path.get("body.body"); - - for (var _iterator2 = classBodyPaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var path = _ref2; - - var node = path.node; - - if (path.isClassProperty()) { - throw path.buildCodeFrameError("Missing class properties transform."); - } - - if (node.decorators) { - throw path.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one."); - } - - if (t.isClassMethod(node)) { - var isConstructor = node.kind === "constructor"; - - if (isConstructor) { - path.traverse(verifyConstructorVisitor, this); - - if (!this.hasBareSuper && this.isDerived) { - throw path.buildCodeFrameError("missing super() call in constructor"); - } - } - - var replaceSupers = new _babelHelperReplaceSupers2.default({ - forceSuperMemoisation: isConstructor, - methodPath: path, - methodNode: node, - objectRef: this.classRef, - superRef: this.superName, - isStatic: node.static, - isLoose: this.isLoose, - scope: this.scope, - file: this.file - }, true); - - replaceSupers.replace(); - - if (isConstructor) { - this.pushConstructor(replaceSupers, node, path); - } else { - this.pushMethod(node, path); - } - } - } - }; - - ClassTransformer.prototype.clearDescriptors = function clearDescriptors() { - this.hasInstanceDescriptors = false; - this.hasStaticDescriptors = false; - - this.instanceMutatorMap = {}; - this.staticMutatorMap = {}; - }; - - ClassTransformer.prototype.pushDescriptors = function pushDescriptors() { - this.pushInherits(); - - var body = this.body; - - var instanceProps = void 0; - var staticProps = void 0; - - if (this.hasInstanceDescriptors) { - instanceProps = defineMap.toClassObject(this.instanceMutatorMap); - } - - if (this.hasStaticDescriptors) { - staticProps = defineMap.toClassObject(this.staticMutatorMap); - } - - if (instanceProps || staticProps) { - if (instanceProps) instanceProps = defineMap.toComputedObjectFromClass(instanceProps); - if (staticProps) staticProps = defineMap.toComputedObjectFromClass(staticProps); - - var nullNode = t.nullLiteral(); - - var args = [this.classRef, nullNode, nullNode, nullNode, nullNode]; - - if (instanceProps) args[1] = instanceProps; - if (staticProps) args[2] = staticProps; - - if (this.instanceInitializersId) { - args[3] = this.instanceInitializersId; - body.unshift(this.buildObjectAssignment(this.instanceInitializersId)); - } - - if (this.staticInitializersId) { - args[4] = this.staticInitializersId; - body.unshift(this.buildObjectAssignment(this.staticInitializersId)); - } - - var lastNonNullIndex = 0; - for (var i = 0; i < args.length; i++) { - if (args[i] !== nullNode) lastNonNullIndex = i; - } - args = args.slice(0, lastNonNullIndex + 1); - - body.push(t.expressionStatement(t.callExpression(this.file.addHelper("createClass"), args))); - } - - this.clearDescriptors(); - }; - - ClassTransformer.prototype.buildObjectAssignment = function buildObjectAssignment(id) { - return t.variableDeclaration("var", [t.variableDeclarator(id, t.objectExpression([]))]); - }; - - ClassTransformer.prototype.wrapSuperCall = function wrapSuperCall(bareSuper, superRef, thisRef, body) { - var bareSuperNode = bareSuper.node; - - if (this.isLoose) { - bareSuperNode.arguments.unshift(t.thisExpression()); - if (bareSuperNode.arguments.length === 2 && t.isSpreadElement(bareSuperNode.arguments[1]) && t.isIdentifier(bareSuperNode.arguments[1].argument, { name: "arguments" })) { - bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument; - bareSuperNode.callee = t.memberExpression(superRef, t.identifier("apply")); - } else { - bareSuperNode.callee = t.memberExpression(superRef, t.identifier("call")); - } - } else { - 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); - } - - var call = t.callExpression(this.file.addHelper("possibleConstructorReturn"), [t.thisExpression(), bareSuperNode]); - - var bareSuperAfter = this.bareSuperAfter.map(function (fn) { - return fn(thisRef); - }); - - if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) { - - if (this.superThises.length || bareSuperAfter.length) { - bareSuper.scope.push({ id: thisRef }); - call = t.assignmentExpression("=", thisRef, call); - } - - if (bareSuperAfter.length) { - call = t.toSequenceExpression([call].concat(bareSuperAfter, [thisRef])); - } - - bareSuper.parentPath.replaceWith(t.returnStatement(call)); - } else { - bareSuper.replaceWithMultiple([t.variableDeclaration("var", [t.variableDeclarator(thisRef, call)])].concat(bareSuperAfter, [t.expressionStatement(thisRef)])); - } - }; - - ClassTransformer.prototype.verifyConstructor = function verifyConstructor() { - var _this2 = this; - - if (!this.isDerived) return; - - var path = this.userConstructorPath; - var body = path.get("body"); - - path.traverse(findThisesVisitor, this); - - var guaranteedSuperBeforeFinish = !!this.bareSupers.length; - - var superRef = this.superName || t.identifier("Function"); - var thisRef = path.scope.generateUidIdentifier("this"); - - for (var _iterator3 = this.bareSupers, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var bareSuper = _ref3; - - this.wrapSuperCall(bareSuper, superRef, thisRef, body); - - if (guaranteedSuperBeforeFinish) { - bareSuper.find(function (parentPath) { - if (parentPath === path) { - return true; - } - - if (parentPath.isLoop() || parentPath.isConditional()) { - guaranteedSuperBeforeFinish = false; - return true; - } - }); - } - } - - for (var _iterator4 = this.superThises, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var thisPath = _ref4; - - thisPath.replaceWith(thisRef); - } - - var wrapReturn = function wrapReturn(returnArg) { - return t.callExpression(_this2.file.addHelper("possibleConstructorReturn"), [thisRef].concat(returnArg || [])); - }; - - var bodyPaths = body.get("body"); - if (bodyPaths.length && !bodyPaths.pop().isReturnStatement()) { - body.pushContainer("body", t.returnStatement(guaranteedSuperBeforeFinish ? thisRef : wrapReturn())); - } - - for (var _iterator5 = this.superReturns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var returnPath = _ref5; - - if (returnPath.node.argument) { - var ref = returnPath.scope.generateDeclaredUidIdentifier("ret"); - returnPath.get("argument").replaceWithMultiple([t.assignmentExpression("=", ref, returnPath.node.argument), wrapReturn(ref)]); - } else { - returnPath.get("argument").replaceWith(wrapReturn()); - } - } - }; - - ClassTransformer.prototype.pushMethod = function pushMethod(node, path) { - var scope = path ? path.scope : this.scope; - - if (node.kind === "method") { - if (this._processMethod(node, scope)) return; - } - - this.pushToMap(node, false, null, scope); - }; - - ClassTransformer.prototype._processMethod = function _processMethod() { - return false; - }; - - ClassTransformer.prototype.pushConstructor = function pushConstructor(replaceSupers, method, path) { - this.bareSupers = replaceSupers.bareSupers; - this.superReturns = replaceSupers.returns; - - if (path.scope.hasOwnBinding(this.classRef.name)) { - path.scope.rename(this.classRef.name); - } - - var construct = this.constructor; - - this.userConstructorPath = path; - this.userConstructor = method; - this.hasConstructor = true; - - t.inheritsComments(construct, method); - - construct._ignoreUserWhitespace = true; - construct.params = method.params; - - t.inherits(construct.body, method.body); - construct.body.directives = method.body.directives; - - this._pushConstructor(); - }; - - ClassTransformer.prototype._pushConstructor = function _pushConstructor() { - if (this.pushedConstructor) return; - this.pushedConstructor = true; - - if (this.hasInstanceDescriptors || this.hasStaticDescriptors) { - this.pushDescriptors(); - } - - this.body.push(this.constructor); - - this.pushInherits(); - }; - - ClassTransformer.prototype.pushInherits = function pushInherits() { - if (!this.isDerived || this.pushedInherits) return; - - this.pushedInherits = true; - this.body.unshift(t.expressionStatement(t.callExpression(this.file.addHelper("inherits"), [this.classRef, this.superName]))); - }; - - return ClassTransformer; - }(); - - exports.default = ClassTransformer; - module.exports = exports["default"]; -}); -$__System.registerDynamic("e7", ["117", "10", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var node = _ref.node, - parent = _ref.parent, - scope = _ref.scope, - id = _ref.id; - - if (node.id) return; - - if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, { kind: "method" })) && (!parent.computed || t.isLiteral(parent.key))) { - id = parent.key; - } else if (t.isVariableDeclarator(parent)) { - id = parent.id; - - if (t.isIdentifier(id)) { - var binding = scope.parent.getBinding(id.name); - if (binding && binding.constant && scope.getBinding(id.name) === binding) { - node.id = id; - node.id[t.NOT_LOCAL_BINDING] = true; - return; - } - } - } else if (t.isAssignmentExpression(parent)) { - id = parent.left; - } else if (!id) { - return; - } - - var name = void 0; - if (id && t.isLiteral(id)) { - name = id.value; - } else if (id && t.isIdentifier(id)) { - name = id.name; - } else { - return; - } - - name = t.toBindingIdentifierName(name); - id = t.identifier(name); - - id[t.NOT_LOCAL_BINDING] = true; - - var state = visit(node, name, scope); - return wrap(state, node, id, scope) || node; - }; - - var _babelHelperGetFunctionArity = $__require("117"); - - var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var 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"); - - 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"); - - var visitor = { - "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) { - if (path.node.name !== state.name) return; - - var localDeclar = path.scope.getBindingIdentifier(state.name); - if (localDeclar !== state.outerDeclar) return; - - state.selfReference = true; - path.stop(); - } - }; - - function wrap(state, method, id, scope) { - if (state.selfReference) { - if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { - scope.rename(id.name); - } else { - if (!t.isFunction(method)) return; - - var build = buildPropertyMethodAssignmentWrapper; - if (method.generator) build = buildGeneratorPropertyMethodAssignmentWrapper; - var _template = build({ - FUNCTION: method, - FUNCTION_ID: id, - FUNCTION_KEY: scope.generateUidIdentifier(id.name) - }).expression; - _template.callee._skipModulesRemap = true; - - var params = _template.callee.body.body[0].params; - for (var i = 0, len = (0, _babelHelperGetFunctionArity2.default)(method); i < len; i++) { - params.push(scope.generateUidIdentifier("x")); - } - - return _template; - } - } - - method.id = id; - scope.getProgramParent().references[id.name] = true; - } - - function visit(node, name, scope) { - var state = { - selfAssignment: false, - selfReference: false, - outerDeclar: scope.getBindingIdentifier(name), - references: [], - name: name - }; - - var binding = scope.getOwnBinding(name); - - if (binding) { - if (binding.kind === "param") { - state.selfReference = true; - } else {} - } else if (state.outerDeclar || scope.hasGlobal(name)) { - scope.traverse(node, visitor, state); - } - - return state; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("118", ["d3", "111", "112", "e7"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _symbol = $__require("d3"); - - var _symbol2 = _interopRequireDefault(_symbol); - - exports.default = function (_ref) { - var t = _ref.types; - - var VISITED = (0, _symbol2.default)(); - - return { - visitor: { - ExportDefaultDeclaration: function ExportDefaultDeclaration(path) { - if (!path.get("declaration").isClassDeclaration()) return; - - var node = path.node; - - var ref = node.declaration.id || path.scope.generateUidIdentifier("class"); - node.declaration.id = ref; - - path.replaceWith(node.declaration); - path.insertAfter(t.exportDefaultDeclaration(ref)); - }, - ClassDeclaration: function ClassDeclaration(path) { - var node = path.node; - - var ref = node.id || path.scope.generateUidIdentifier("class"); - - path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(ref, t.toExpression(node))])); - }, - ClassExpression: function ClassExpression(path, state) { - var node = path.node; - - if (node[VISITED]) return; - - var inferred = (0, _babelHelperFunctionName2.default)(path); - if (inferred && inferred !== node) return path.replaceWith(inferred); - - node[VISITED] = true; - - var Constructor = _vanilla2.default; - if (state.opts.loose) Constructor = _loose2.default; - - path.replaceWith(new Constructor(path, state.file).run()); - } - } - }; - }; - - var _loose = $__require("111"); - - var _loose2 = _interopRequireDefault(_loose); - - var _vanilla = $__require("112"); - - var _vanilla2 = _interopRequireDefault(_vanilla); - - var _babelHelperFunctionName = $__require("e7"); - - var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("116", ["11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (callee, thisNode, args) { - if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, { name: "arguments" })) { - return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]); - } else { - return t.callExpression(t.memberExpression(callee, t.identifier("call")), [thisNode].concat(args)); - } - }; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("115", ["1d", "d3", "116", "f", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _symbol = $__require("d3"); - - var _symbol2 = _interopRequireDefault(_symbol); - - var _babelHelperOptimiseCallExpression = $__require("116"); - - var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression); - - var _babelMessages = $__require("f"); - - var messages = _interopRequireWildcard(_babelMessages); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var HARDCORE_THIS_REF = (0, _symbol2.default)(); - - function isIllegalBareSuper(node, parent) { - if (!t.isSuper(node)) return false; - if (t.isMemberExpression(parent, { computed: false })) return false; - if (t.isCallExpression(parent, { callee: node })) return false; - return true; - } - - function isMemberExpressionSuper(node) { - return t.isMemberExpression(node) && t.isSuper(node.object); - } - - function getPrototypeOfExpression(objectRef, isStatic) { - var targetRef = isStatic ? objectRef : t.memberExpression(objectRef, t.identifier("prototype")); - - return t.logicalExpression("||", t.memberExpression(targetRef, t.identifier("__proto__")), t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [targetRef])); - } - - var visitor = { - Function: function Function(path) { - if (!path.inShadow("this")) { - path.skip(); - } - }, - ReturnStatement: function ReturnStatement(path, state) { - if (!path.inShadow("this")) { - state.returns.push(path); - } - }, - ThisExpression: function ThisExpression(path, state) { - if (!path.node[HARDCORE_THIS_REF]) { - state.thises.push(path); - } - }, - enter: function enter(path, state) { - var callback = state.specHandle; - if (state.isLoose) callback = state.looseHandle; - - var isBareSuper = path.isCallExpression() && path.get("callee").isSuper(); - - var result = callback.call(state, path); - - if (result) { - state.hasSuper = true; - } - - if (isBareSuper) { - state.bareSupers.push(path); - } - - if (result === true) { - path.requeue(); - } - - if (result !== true && result) { - if (Array.isArray(result)) { - path.replaceWithMultiple(result); - } else { - path.replaceWith(result); - } - } - } - }; - - var ReplaceSupers = function () { - function ReplaceSupers(opts) { - var inClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - (0, _classCallCheck3.default)(this, ReplaceSupers); - - this.forceSuperMemoisation = opts.forceSuperMemoisation; - this.methodPath = opts.methodPath; - this.methodNode = opts.methodNode; - this.superRef = opts.superRef; - this.isStatic = opts.isStatic; - this.hasSuper = false; - this.inClass = inClass; - this.isLoose = opts.isLoose; - this.scope = this.methodPath.scope; - this.file = opts.file; - this.opts = opts; - - this.bareSupers = []; - this.returns = []; - this.thises = []; - } - - ReplaceSupers.prototype.getObjectRef = function getObjectRef() { - return this.opts.objectRef || this.opts.getObjectRef(); - }; - - ReplaceSupers.prototype.setSuperProperty = function setSuperProperty(property, value, isComputed) { - return t.callExpression(this.file.addHelper("set"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), value, t.thisExpression()]); - }; - - ReplaceSupers.prototype.getSuperProperty = function getSuperProperty(property, isComputed) { - return t.callExpression(this.file.addHelper("get"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), t.thisExpression()]); - }; - - ReplaceSupers.prototype.replace = function replace() { - this.methodPath.traverse(visitor, this); - }; - - ReplaceSupers.prototype.getLooseSuperProperty = function getLooseSuperProperty(id, parent) { - var methodNode = this.methodNode; - var superRef = this.superRef || t.identifier("Function"); - - if (parent.property === id) { - return; - } else if (t.isCallExpression(parent, { callee: id })) { - return; - } else if (t.isMemberExpression(parent) && !methodNode.static) { - return t.memberExpression(superRef, t.identifier("prototype")); - } else { - return superRef; - } - }; - - ReplaceSupers.prototype.looseHandle = function looseHandle(path) { - var node = path.node; - if (path.isSuper()) { - return this.getLooseSuperProperty(node, path.parent); - } else if (path.isCallExpression()) { - var callee = node.callee; - if (!t.isMemberExpression(callee)) return; - if (!t.isSuper(callee.object)) return; - - t.appendToMemberExpression(callee, t.identifier("call")); - node.arguments.unshift(t.thisExpression()); - return true; - } - }; - - ReplaceSupers.prototype.specHandleAssignmentExpression = function specHandleAssignmentExpression(ref, path, node) { - if (node.operator === "=") { - return this.setSuperProperty(node.left.property, node.right, node.left.computed); - } else { - ref = ref || path.scope.generateUidIdentifier("ref"); - return [t.variableDeclaration("var", [t.variableDeclarator(ref, node.left)]), t.expressionStatement(t.assignmentExpression("=", node.left, t.binaryExpression(node.operator[0], ref, node.right)))]; - } - }; - - ReplaceSupers.prototype.specHandle = function specHandle(path) { - var property = void 0; - var computed = void 0; - var args = void 0; - - var parent = path.parent; - var node = path.node; - - if (isIllegalBareSuper(node, parent)) { - throw path.buildCodeFrameError(messages.get("classesIllegalBareSuper")); - } - - if (t.isCallExpression(node)) { - var callee = node.callee; - if (t.isSuper(callee)) { - return; - } else if (isMemberExpressionSuper(callee)) { - property = callee.property; - computed = callee.computed; - args = node.arguments; - } - } else if (t.isMemberExpression(node) && t.isSuper(node.object)) { - property = node.property; - computed = node.computed; - } else if (t.isUpdateExpression(node) && isMemberExpressionSuper(node.argument)) { - var binary = t.binaryExpression(node.operator[0], node.argument, t.numericLiteral(1)); - if (node.prefix) { - return this.specHandleAssignmentExpression(null, path, binary); - } else { - var ref = path.scope.generateUidIdentifier("ref"); - return this.specHandleAssignmentExpression(ref, path, binary).concat(t.expressionStatement(ref)); - } - } else if (t.isAssignmentExpression(node) && isMemberExpressionSuper(node.left)) { - return this.specHandleAssignmentExpression(null, path, node); - } - - if (!property) return; - - var superProperty = this.getSuperProperty(property, computed); - - if (args) { - return this.optimiseCall(superProperty, args); - } else { - return superProperty; - } - }; - - ReplaceSupers.prototype.optimiseCall = function optimiseCall(callee, args) { - var thisNode = t.thisExpression(); - thisNode[HARDCORE_THIS_REF] = true; - return (0, _babelHelperOptimiseCallExpression2.default)(callee, thisNode, args); - }; - - return ReplaceSupers; - }(); - - exports.default = ReplaceSupers; - module.exports = exports["default"]; -}); -$__System.registerDynamic("119", ["17", "d3", "115"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _symbol = $__require("d3"); - - var _symbol2 = _interopRequireDefault(_symbol); - - exports.default = function (_ref) { - var t = _ref.types; - - function Property(path, node, scope, getObjectRef, file) { - var replaceSupers = new _babelHelperReplaceSupers2.default({ - getObjectRef: getObjectRef, - methodNode: node, - methodPath: path, - isStatic: true, - scope: scope, - file: file - }); - - replaceSupers.replace(); - } - - var CONTAINS_SUPER = (0, _symbol2.default)(); - - return { - visitor: { - Super: function Super(path) { - var parentObj = path.findParent(function (path) { - return path.isObjectExpression(); - }); - if (parentObj) parentObj.node[CONTAINS_SUPER] = true; - }, - - ObjectExpression: { - exit: function exit(path, file) { - if (!path.node[CONTAINS_SUPER]) return; - - var objectRef = void 0; - var getObjectRef = function getObjectRef() { - return objectRef = objectRef || path.scope.generateUidIdentifier("obj"); - }; - - var propPaths = path.get("properties"); - for (var _iterator = propPaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var propPath = _ref2; - - if (propPath.isObjectProperty()) propPath = propPath.get("value"); - Property(propPath, propPath.node, path.scope, getObjectRef, file); - } - - if (objectRef) { - path.scope.push({ id: objectRef }); - path.replaceWith(t.assignmentExpression("=", objectRef, path.node)); - } - } - } - } - }; - }; - - var _babelHelperReplaceSupers = $__require("115"); - - var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("11a", ["11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - visitor: { - ObjectMethod: function ObjectMethod(path) { - var node = path.node; - - if (node.kind === "method") { - var func = t.functionExpression(null, node.params, node.body, node.generator, node.async); - func.returnType = node.returnType; - - path.replaceWith(t.objectProperty(node.key, func, node.computed)); - } - }, - ObjectProperty: function ObjectProperty(_ref) { - var node = _ref.node; - - if (node.shorthand) { - node.shorthand = false; - } - } - } - }; - }; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("11b", ["17"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types, - template = _ref.template; - - var buildMutatorMapAssign = template("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n "); - - function getValue(prop) { - if (t.isObjectProperty(prop)) { - return prop.value; - } else if (t.isObjectMethod(prop)) { - return t.functionExpression(null, prop.params, prop.body, prop.generator, prop.async); - } - } - - function pushAssign(objId, prop, body) { - if (prop.kind === "get" && prop.kind === "set") { - pushMutatorDefine(objId, prop, body); - } else { - body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(objId, prop.key, prop.computed || t.isLiteral(prop.key)), getValue(prop)))); - } - } - - function pushMutatorDefine(_ref2, prop) { - var objId = _ref2.objId, - body = _ref2.body, - getMutatorId = _ref2.getMutatorId, - scope = _ref2.scope; - - var key = !prop.computed && t.isIdentifier(prop.key) ? t.stringLiteral(prop.key.name) : prop.key; - - var maybeMemoise = scope.maybeGenerateMemoised(key); - if (maybeMemoise) { - body.push(t.expressionStatement(t.assignmentExpression("=", maybeMemoise, key))); - key = maybeMemoise; - } - - body.push.apply(body, buildMutatorMapAssign({ - MUTATOR_MAP_REF: getMutatorId(), - KEY: key, - VALUE: getValue(prop), - KIND: t.identifier(prop.kind) - })); - } - - function loose(info) { - for (var _iterator = info.computedProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var prop = _ref3; - - if (prop.kind === "get" || prop.kind === "set") { - pushMutatorDefine(info, prop); - } else { - pushAssign(info.objId, prop, info.body); - } - } - } - - function spec(info) { - var objId = info.objId, - body = info.body, - computedProps = info.computedProps, - state = info.state; - - for (var _iterator2 = computedProps, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref4; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref4 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref4 = _i2.value; - } - - var prop = _ref4; - - var key = t.toComputedKey(prop); - - if (prop.kind === "get" || prop.kind === "set") { - pushMutatorDefine(info, prop); - } else if (t.isStringLiteral(key, { value: "__proto__" })) { - pushAssign(objId, prop, body); - } else { - if (computedProps.length === 1) { - return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]); - } else { - body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(prop)]))); - } - } - } - } - - return { - visitor: { - ObjectExpression: { - exit: function exit(path, state) { - var node = path.node, - parent = path.parent, - scope = path.scope; - - var hasComputed = false; - for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref5; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref5 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref5 = _i3.value; - } - - var prop = _ref5; - - hasComputed = prop.computed === true; - if (hasComputed) break; - } - if (!hasComputed) return; - - var initProps = []; - var computedProps = []; - var foundComputed = false; - - for (var _iterator4 = node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref6; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref6 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref6 = _i4.value; - } - - var _prop = _ref6; - - if (_prop.computed) { - foundComputed = true; - } - - if (foundComputed) { - computedProps.push(_prop); - } else { - initProps.push(_prop); - } - } - - var objId = scope.generateUidIdentifierBasedOnNode(parent); - var initPropExpression = t.objectExpression(initProps); - var body = []; - - body.push(t.variableDeclaration("var", [t.variableDeclarator(objId, initPropExpression)])); - - var callback = spec; - if (state.opts.loose) callback = loose; - - var mutatorRef = void 0; - - var getMutatorId = function getMutatorId() { - if (!mutatorRef) { - mutatorRef = scope.generateUidIdentifier("mutatorMap"); - - body.push(t.variableDeclaration("var", [t.variableDeclarator(mutatorRef, t.objectExpression([]))])); - } - - return mutatorRef; - }; - - var single = callback({ - scope: scope, - objId: objId, - body: body, - computedProps: computedProps, - initPropExpression: initPropExpression, - getMutatorId: getMutatorId, - state: state - }); - - if (mutatorRef) { - body.push(t.expressionStatement(t.callExpression(state.addHelper("defineEnumerableProperties"), [objId, mutatorRef]))); - } - - if (single) { - path.replaceWith(single); - } else { - body.push(t.expressionStatement(objId)); - path.replaceWithMultiple(body); - } - } - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("11c", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (_ref) { - var messages = _ref.messages, - template = _ref.template, - t = _ref.types; - - var buildForOfArray = template("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "); - - 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 "); - - 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 "); - - function _ForOfStatementArray(path) { - var node = path.node, - scope = path.scope; - - var nodes = []; - var right = node.right; - - if (!t.isIdentifier(right) || !scope.hasBinding(right.name)) { - var uid = scope.generateUidIdentifier("arr"); - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, right)])); - right = uid; - } - - var iterationKey = scope.generateUidIdentifier("i"); - - var loop = buildForOfArray({ - BODY: node.body, - KEY: iterationKey, - ARR: right - }); - - t.inherits(loop, node); - t.ensureBlock(loop); - - var iterationValue = t.memberExpression(right, iterationKey, true); - - var left = node.left; - if (t.isVariableDeclaration(left)) { - left.declarations[0].init = iterationValue; - loop.body.body.unshift(left); - } else { - loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=", left, iterationValue))); - } - - if (path.parentPath.isLabeledStatement()) { - loop = t.labeledStatement(path.parentPath.node.label, loop); - } - - nodes.push(loop); - - return nodes; - } - - return { - visitor: { - ForOfStatement: function ForOfStatement(path, state) { - if (path.get("right").isArrayExpression()) { - if (path.parentPath.isLabeledStatement()) { - return path.parentPath.replaceWithMultiple(_ForOfStatementArray(path)); - } else { - return path.replaceWithMultiple(_ForOfStatementArray(path)); - } - } - - var callback = spec; - if (state.opts.loose) callback = loose; - - var node = path.node; - - var build = callback(path, state); - var declar = build.declar; - var loop = build.loop; - var block = loop.body; - - path.ensureBlock(); - - if (declar) { - block.body.push(declar); - } - - block.body = block.body.concat(node.body.body); - - t.inherits(loop, node); - t.inherits(loop.body, node.body); - - if (build.replaceParent) { - path.parentPath.replaceWithMultiple(build.node); - path.remove(); - } else { - path.replaceWithMultiple(build.node); - } - } - } - }; - - function loose(path, file) { - var node = path.node, - scope = path.scope, - parent = path.parent; - var left = node.left; - - var declar = void 0, - id = void 0; - - if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) { - id = left; - } else if (t.isVariableDeclaration(left)) { - id = scope.generateUidIdentifier("ref"); - declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, id)]); - } else { - throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type)); - } - - var iteratorKey = scope.generateUidIdentifier("iterator"); - var isArrayKey = scope.generateUidIdentifier("isArray"); - - var loop = buildForOfLoose({ - LOOP_OBJECT: iteratorKey, - IS_ARRAY: isArrayKey, - OBJECT: node.right, - INDEX: scope.generateUidIdentifier("i"), - ID: id - }); - - if (!declar) { - loop.body.body.shift(); - } - - var isLabeledParent = t.isLabeledStatement(parent); - var labeled = void 0; - - if (isLabeledParent) { - labeled = t.labeledStatement(parent.label, loop); - } - - return { - replaceParent: isLabeledParent, - declar: declar, - node: labeled || loop, - loop: loop - }; - } - - function spec(path, file) { - var node = path.node, - scope = path.scope, - parent = path.parent; - - var left = node.left; - var declar = void 0; - - var stepKey = scope.generateUidIdentifier("step"); - var stepValue = t.memberExpression(stepKey, t.identifier("value")); - - if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) { - declar = t.expressionStatement(t.assignmentExpression("=", left, stepValue)); - } else if (t.isVariableDeclaration(left)) { - declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, stepValue)]); - } else { - throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type)); - } - - var iteratorKey = scope.generateUidIdentifier("iterator"); - - var template = buildForOf({ - ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"), - ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"), - ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"), - ITERATOR_KEY: iteratorKey, - STEP_KEY: stepKey, - OBJECT: node.right, - BODY: null - }); - - var isLabeledParent = t.isLabeledStatement(parent); - - var tryBody = template[3].block.body; - var loop = tryBody[0]; - - if (isLabeledParent) { - tryBody[0] = t.labeledStatement(parent.label, loop); - } - - return { - replaceParent: isLabeledParent, - declar: declar, - loop: loop, - node: template - }; - } - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("11d", ["11e", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - visitor: { - RegExpLiteral: function RegExpLiteral(path) { - var node = path.node; - - if (!regex.is(node, "y")) return; - - path.replaceWith(t.newExpression(t.identifier("RegExp"), [t.stringLiteral(node.pattern), t.stringLiteral(node.flags)])); - } - } - }; - }; - - var _babelHelperRegex = $__require("11e"); - - var regex = _interopRequireWildcard(_babelHelperRegex); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - module.exports = exports["default"]; -}); -/*! - * RegJSGen - * Copyright 2014 Benjamin Tan - * Available under MIT license - */ -;(function () { - 'use strict'; - - /** Used to determine if values are of the language type `Object` */ - - var objectTypes = { - 'function': true, - 'object': true - }; - - /** Used as a reference to the global object */ - var root = objectTypes[typeof window] && window || this; - - /** Backup possible global object */ - var oldRoot = root; - - /** Detect free variable `exports` */ - var freeExports = objectTypes[typeof exports] && exports; - - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ - var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; - if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */ - - var stringFromCharCode = String.fromCharCode; - var floor = Math.floor; - function fromCodePoint() { - var MAX_SIZE = 0x4000; - var codeUnits = []; - var highSurrogate; - var lowSurrogate; - var index = -1; - var length = arguments.length; - if (!length) { - return ''; - } - var result = ''; - while (++index < length) { - var codePoint = Number(arguments[index]); - if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` - codePoint < 0 || // not a valid Unicode code point - codePoint > 0x10FFFF || // not a valid Unicode code point - floor(codePoint) != codePoint // not an integer - ) { - throw RangeError('Invalid code point: ' + codePoint); - } - if (codePoint <= 0xFFFF) { - // BMP code point - codeUnits.push(codePoint); - } else { - // Astral code point; split in surrogate halves - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - codePoint -= 0x10000; - highSurrogate = (codePoint >> 10) + 0xD800; - lowSurrogate = codePoint % 0x400 + 0xDC00; - codeUnits.push(highSurrogate, lowSurrogate); - } - if (index + 1 == length || codeUnits.length > MAX_SIZE) { - result += stringFromCharCode.apply(null, codeUnits); - codeUnits.length = 0; - } - } - return result; - } - - function assertType(type, expected) { - if (expected.indexOf('|') == -1) { - if (type == expected) { - return; - } - - throw Error('Invalid node type: ' + type); - } - - expected = assertType.hasOwnProperty(expected) ? assertType[expected] : assertType[expected] = RegExp('^(?:' + expected + ')$'); - - if (expected.test(type)) { - return; - } - - throw Error('Invalid node type: ' + type); - } - - /*--------------------------------------------------------------------------*/ - - function generate(node) { - var type = node.type; - - if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') { - return generate[type](node); - } - - throw Error('Invalid node type: ' + type); - } - - /*--------------------------------------------------------------------------*/ - - function generateAlternative(node) { - assertType(node.type, 'alternative'); - - var terms = node.body, - length = terms ? terms.length : 0; - - if (length == 1) { - return generateTerm(terms[0]); - } else { - var i = -1, - result = ''; - - while (++i < length) { - result += generateTerm(terms[i]); - } - - return result; - } - } - - function generateAnchor(node) { - assertType(node.type, 'anchor'); - - switch (node.kind) { - case 'start': - return '^'; - case 'end': - return '$'; - case 'boundary': - return '\\b'; - case 'not-boundary': - return '\\B'; - default: - throw Error('Invalid assertion'); - } - } - - function generateAtom(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value'); - - return generate(node); - } - - function generateCharacterClass(node) { - assertType(node.type, 'characterClass'); - - var classRanges = node.body, - length = classRanges ? classRanges.length : 0; - - var i = -1, - result = '['; - - if (node.negative) { - result += '^'; - } - - while (++i < length) { - result += generateClassAtom(classRanges[i]); - } - - result += ']'; - - return result; - } - - function generateCharacterClassEscape(node) { - assertType(node.type, 'characterClassEscape'); - - return '\\' + node.value; - } - - function generateCharacterClassRange(node) { - assertType(node.type, 'characterClassRange'); - - var min = node.min, - max = node.max; - - if (min.type == 'characterClassRange' || max.type == 'characterClassRange') { - throw Error('Invalid character class range'); - } - - return generateClassAtom(min) + '-' + generateClassAtom(max); - } - - function generateClassAtom(node) { - assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value'); - - return generate(node); - } - - function generateDisjunction(node) { - assertType(node.type, 'disjunction'); - - var body = node.body, - length = body ? body.length : 0; - - if (length == 0) { - throw Error('No body'); - } else if (length == 1) { - return generate(body[0]); - } else { - var i = -1, - result = ''; - - while (++i < length) { - if (i != 0) { - result += '|'; - } - result += generate(body[i]); - } - - return result; - } - } - - function generateDot(node) { - assertType(node.type, 'dot'); - - return '.'; - } - - function generateGroup(node) { - assertType(node.type, 'group'); - - var result = '('; - - switch (node.behavior) { - case 'normal': - break; - case 'ignore': - result += '?:'; - break; - case 'lookahead': - result += '?='; - break; - case 'negativeLookahead': - result += '?!'; - break; - default: - throw Error('Invalid behaviour: ' + node.behaviour); - } - - var body = node.body, - length = body ? body.length : 0; - - if (length == 1) { - result += generate(body[0]); - } else { - var i = -1; - - while (++i < length) { - result += generate(body[i]); - } - } - - result += ')'; - - return result; - } - - function generateQuantifier(node) { - assertType(node.type, 'quantifier'); - - var quantifier = '', - min = node.min, - max = node.max; - - switch (max) { - case undefined: - case null: - switch (min) { - case 0: - quantifier = '*'; - break; - case 1: - quantifier = '+'; - break; - default: - quantifier = '{' + min + ',}'; - break; - } - break; - default: - if (min == max) { - quantifier = '{' + min + '}'; - } else if (min == 0 && max == 1) { - quantifier = '?'; - } else { - quantifier = '{' + min + ',' + max + '}'; - } - break; - } - - if (!node.greedy) { - quantifier += '?'; - } - - return generateAtom(node.body[0]) + quantifier; - } - - function generateReference(node) { - assertType(node.type, 'reference'); - - return '\\' + node.matchIndex; - } - - function generateTerm(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value'); - - return generate(node); - } - - function generateValue(node) { - assertType(node.type, 'value'); - - var kind = node.kind, - codePoint = node.codePoint; - - switch (kind) { - case 'controlLetter': - return '\\c' + fromCodePoint(codePoint + 64); - case 'hexadecimalEscape': - return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2); - case 'identifier': - return '\\' + fromCodePoint(codePoint); - case 'null': - return '\\' + codePoint; - case 'octal': - return '\\' + codePoint.toString(8); - case 'singleEscape': - switch (codePoint) { - case 0x0008: - return '\\b'; - case 0x009: - return '\\t'; - case 0x00A: - return '\\n'; - case 0x00B: - return '\\v'; - case 0x00C: - return '\\f'; - case 0x00D: - return '\\r'; - default: - throw Error('Invalid codepoint: ' + codePoint); - } - case 'symbol': - return fromCodePoint(codePoint); - case 'unicodeEscape': - return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4); - case 'unicodeCodePointEscape': - return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; - default: - throw Error('Unsupported node kind: ' + kind); - } - } - - /*--------------------------------------------------------------------------*/ - - generate.alternative = generateAlternative; - generate.anchor = generateAnchor; - generate.characterClass = generateCharacterClass; - generate.characterClassEscape = generateCharacterClassEscape; - generate.characterClassRange = generateCharacterClassRange; - generate.disjunction = generateDisjunction; - generate.dot = generateDot; - generate.group = generateGroup; - generate.quantifier = generateQuantifier; - generate.reference = generateReference; - generate.value = generateValue; - - /*--------------------------------------------------------------------------*/ - - // export regjsgen - // some AMD build optimizers, like r.js, check for condition patterns like the following: - if ('function' == 'function' && 'object' == 'object' && true) { - // define as an anonymous module so, through path mapping, it can be aliased - $__System.registerDynamic('11f', [], false, function ($__require, $__exports, $__module) { - return (function () { - return { - 'generate': generate - }; - }).call(this); - }); - } - // check for `exports` after `define` in case a build optimizer adds an `exports` object - else if (freeExports && freeModule) { - // in Narwhal, Node.js, Rhino -require, or RingoJS - freeExports.generate = generate; - } - // in a browser or Rhino - else { - root.regjsgen = { - 'generate': generate - }; - } -}).call(this); -$__System.registerDynamic('120', [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - // regjsparser - // - // ================================================================== - // - // See ECMA-262 Standard: 15.10.1 - // - // NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the - // term "Anchor" is used. - // - // Pattern :: - // Disjunction - // - // Disjunction :: - // Alternative - // Alternative | Disjunction - // - // Alternative :: - // [empty] - // Alternative Term - // - // Term :: - // Anchor - // Atom - // Atom Quantifier - // - // Anchor :: - // ^ - // $ - // \ b - // \ B - // ( ? = Disjunction ) - // ( ? ! Disjunction ) - // - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits } - // { DecimalDigits , } - // { DecimalDigits , DecimalDigits } - // - // Atom :: - // PatternCharacter - // . - // \ AtomEscape - // CharacterClass - // ( Disjunction ) - // ( ? : Disjunction ) - // - // PatternCharacter :: - // SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } | - // - // AtomEscape :: - // DecimalEscape - // CharacterEscape - // CharacterClassEscape - // - // CharacterEscape[U] :: - // ControlEscape - // c ControlLetter - // HexEscapeSequence - // RegExpUnicodeEscapeSequence[?U] (ES6) - // IdentityEscape[?U] - // - // ControlEscape :: - // one of f n r t v - // ControlLetter :: - // one of - // 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 - // 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 - // - // IdentityEscape :: - // SourceCharacter but not IdentifierPart - // - // - // - // DecimalEscape :: - // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] - // - // CharacterClassEscape :: - // one of d D s S w W - // - // CharacterClass :: - // [ [lookahead ∉ {^}] ClassRanges ] - // [ ^ ClassRanges ] - // - // ClassRanges :: - // [empty] - // NonemptyClassRanges - // - // NonemptyClassRanges :: - // ClassAtom - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - // - // NonemptyClassRangesNoDash :: - // ClassAtom - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - // - // ClassAtom :: - // - - // ClassAtomNoDash - // - // ClassAtomNoDash :: - // SourceCharacter but not one of \ or ] or - - // \ ClassEscape - // - // ClassEscape :: - // DecimalEscape - // b - // CharacterEscape - // CharacterClassEscape - - (function () { - - function parse(str, flags) { - function addRaw(node) { - node.raw = str.substring(node.range[0], node.range[1]); - return node; - } - - function updateRawStart(node, start) { - node.range[0] = start; - return addRaw(node); - } - - function createAnchor(kind, rawLength) { - return addRaw({ - type: 'anchor', - kind: kind, - range: [pos - rawLength, pos] - }); - } - - function createValue(kind, codePoint, from, to) { - return addRaw({ - type: 'value', - kind: kind, - codePoint: codePoint, - range: [from, to] - }); - } - - function createEscaped(kind, codePoint, value, fromOffset) { - fromOffset = fromOffset || 0; - return createValue(kind, codePoint, pos - (value.length + fromOffset), pos); - } - - function createCharacter(matches) { - var _char = matches[0]; - var first = _char.charCodeAt(0); - if (hasUnicodeFlag) { - var second; - if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) { - second = lookahead().charCodeAt(0); - if (second >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - pos++; - return createValue('symbol', (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, pos - 2, pos); - } - } - } - return createValue('symbol', first, pos - 1, pos); - } - - function createDisjunction(alternatives, from, to) { - return addRaw({ - type: 'disjunction', - body: alternatives, - range: [from, to] - }); - } - - function createDot() { - return addRaw({ - type: 'dot', - range: [pos - 1, pos] - }); - } - - function createCharacterClassEscape(value) { - return addRaw({ - type: 'characterClassEscape', - value: value, - range: [pos - 2, pos] - }); - } - - function createReference(matchIndex) { - return addRaw({ - type: 'reference', - matchIndex: parseInt(matchIndex, 10), - range: [pos - 1 - matchIndex.length, pos] - }); - } - - function createGroup(behavior, disjunction, from, to) { - return addRaw({ - type: 'group', - behavior: behavior, - body: disjunction, - range: [from, to] - }); - } - - function createQuantifier(min, max, from, to) { - if (to == null) { - from = pos - 1; - to = pos; - } - - return addRaw({ - type: 'quantifier', - min: min, - max: max, - greedy: true, - body: null, // set later on - range: [from, to] - }); - } - - function createAlternative(terms, from, to) { - return addRaw({ - type: 'alternative', - body: terms, - range: [from, to] - }); - } - - function createCharacterClass(classRanges, negative, from, to) { - return addRaw({ - type: 'characterClass', - body: classRanges, - negative: negative, - range: [from, to] - }); - } - - function createClassRange(min, max, from, to) { - // See 15.10.2.15: - if (min.codePoint > max.codePoint) { - bail('invalid range in character class', min.raw + '-' + max.raw, from, to); - } - - return addRaw({ - type: 'characterClassRange', - min: min, - max: max, - range: [from, to] - }); - } - - function flattenBody(body) { - if (body.type === 'alternative') { - return body.body; - } else { - return [body]; - } - } - - function isEmpty(obj) { - return obj.type === 'empty'; - } - - function incr(amount) { - amount = amount || 1; - var res = str.substring(pos, pos + amount); - pos += amount || 1; - return res; - } - - function skip(value) { - if (!match(value)) { - bail('character', value); - } - } - - function match(value) { - if (str.indexOf(value, pos) === pos) { - return incr(value.length); - } - } - - function lookahead() { - return str[pos]; - } - - function current(value) { - return str.indexOf(value, pos) === pos; - } - - function next(value) { - return str[pos + 1] === value; - } - - function matchReg(regExp) { - var subStr = str.substring(pos); - var res = subStr.match(regExp); - if (res) { - res.range = []; - res.range[0] = pos; - incr(res[0].length); - res.range[1] = pos; - } - return res; - } - - function parseDisjunction() { - // Disjunction :: - // Alternative - // Alternative | Disjunction - var res = [], - from = pos; - res.push(parseAlternative()); - - while (match('|')) { - res.push(parseAlternative()); - } - - if (res.length === 1) { - return res[0]; - } - - return createDisjunction(res, from, pos); - } - - function parseAlternative() { - var res = [], - from = pos; - var term; - - // Alternative :: - // [empty] - // Alternative Term - while (term = parseTerm()) { - res.push(term); - } - - if (res.length === 1) { - return res[0]; - } - - return createAlternative(res, from, pos); - } - - function parseTerm() { - // Term :: - // Anchor - // Atom - // Atom Quantifier - - if (pos >= str.length || current('|') || current(')')) { - return null; /* Means: The term is empty */ - } - - var anchor = parseAnchor(); - - if (anchor) { - return anchor; - } - - var atom = parseAtom(); - if (!atom) { - bail('Expected atom'); - } - var quantifier = parseQuantifier() || false; - if (quantifier) { - quantifier.body = flattenBody(atom); - // The quantifier contains the atom. Therefore, the beginning of the - // quantifier range is given by the beginning of the atom. - updateRawStart(quantifier, atom.range[0]); - return quantifier; - } - return atom; - } - - function parseGroup(matchA, typeA, matchB, typeB) { - var type = null, - from = pos; - - if (match(matchA)) { - type = typeA; - } else if (match(matchB)) { - type = typeB; - } else { - return false; - } - - var body = parseDisjunction(); - if (!body) { - bail('Expected disjunction'); - } - skip(')'); - var group = createGroup(type, flattenBody(body), from, pos); - - if (type == 'normal') { - // Keep track of the number of closed groups. This is required for - // parseDecimalEscape(). In case the string is parsed a second time the - // value already holds the total count and no incrementation is required. - if (firstIteration) { - closedCaptureCounter++; - } - } - return group; - } - - function parseAnchor() { - // Anchor :: - // ^ - // $ - // \ b - // \ B - // ( ? = Disjunction ) - // ( ? ! Disjunction ) - var res, - from = pos; - - if (match('^')) { - return createAnchor('start', 1 /* rawLength */); - } else if (match('$')) { - return createAnchor('end', 1 /* rawLength */); - } else if (match('\\b')) { - return createAnchor('boundary', 2 /* rawLength */); - } else if (match('\\B')) { - return createAnchor('not-boundary', 2 /* rawLength */); - } else { - return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead'); - } - } - - function parseQuantifier() { - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits } - // { DecimalDigits , } - // { DecimalDigits , DecimalDigits } - - var res, - from = pos; - var quantifier; - var min, max; - - if (match('*')) { - quantifier = createQuantifier(0); - } else if (match('+')) { - quantifier = createQuantifier(1); - } else if (match('?')) { - quantifier = createQuantifier(0, 1); - } else if (res = matchReg(/^\{([0-9]+)\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, min, res.range[0], res.range[1]); - } else if (res = matchReg(/^\{([0-9]+),\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]); - } else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) { - min = parseInt(res[1], 10); - max = parseInt(res[2], 10); - if (min > max) { - bail('numbers out of order in {} quantifier', '', from, pos); - } - quantifier = createQuantifier(min, max, res.range[0], res.range[1]); - } - - if (quantifier) { - if (match('?')) { - quantifier.greedy = false; - quantifier.range[1] += 1; - } - } - - return quantifier; - } - - function parseAtom() { - // Atom :: - // PatternCharacter - // . - // \ AtomEscape - // CharacterClass - // ( Disjunction ) - // ( ? : Disjunction ) - - var res; - - // jviereck: allow ']', '}' here as well to be compatible with browser's - // implementations: ']'.match(/]/); - // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { - if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { - // PatternCharacter - return createCharacter(res); - } else if (match('.')) { - // . - return createDot(); - } else if (match('\\')) { - // \ AtomEscape - res = parseAtomEscape(); - if (!res) { - bail('atomEscape'); - } - return res; - } else if (res = parseCharacterClass()) { - return res; - } else { - // ( Disjunction ) - // ( ? : Disjunction ) - return parseGroup('(?:', 'ignore', '(', 'normal'); - } - } - - function parseUnicodeSurrogatePairEscape(firstEscape) { - if (hasUnicodeFlag) { - var first, second; - if (firstEscape.kind == 'unicodeEscape' && (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && current('\\') && next('u')) { - var prevPos = pos; - pos++; - var secondEscape = parseClassEscape(); - if (secondEscape.kind == 'unicodeEscape' && (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - firstEscape.range[1] = secondEscape.range[1]; - firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - firstEscape.type = 'value'; - firstEscape.kind = 'unicodeCodePointEscape'; - addRaw(firstEscape); - } else { - pos = prevPos; - } - } - } - return firstEscape; - } - - function parseClassEscape() { - return parseAtomEscape(true); - } - - function parseAtomEscape(insideCharacterClass) { - // AtomEscape :: - // DecimalEscape - // CharacterEscape - // CharacterClassEscape - - var res, - from = pos; - - res = parseDecimalEscape(); - if (res) { - return res; - } - - // For ClassEscape - if (insideCharacterClass) { - if (match('b')) { - // 15.10.2.19 - // The production ClassEscape :: b evaluates by returning the - // CharSet containing the one character (Unicode value 0008). - return createEscaped('singleEscape', 0x0008, '\\b'); - } else if (match('B')) { - bail('\\B not possible inside of CharacterClass', '', from); - } - } - - res = parseCharacterEscape(); - - return res; - } - - function parseDecimalEscape() { - // DecimalEscape :: - // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] - // CharacterClassEscape :: one of d D s S w W - - var res, match; - - if (res = matchReg(/^(?!0)\d+/)) { - match = res[0]; - var refIdx = parseInt(res[0], 10); - if (refIdx <= closedCaptureCounter) { - // If the number is smaller than the normal-groups found so - // far, then it is a reference... - return createReference(res[0]); - } else { - // ... otherwise it needs to be interpreted as a octal (if the - // number is in an octal format). If it is NOT octal format, - // then the slash is ignored and the number is matched later - // as normal characters. - - // Recall the negative decision to decide if the input must be parsed - // a second time with the total normal-groups. - backrefDenied.push(refIdx); - - // Reset the position again, as maybe only parts of the previous - // matched numbers are actual octal numbers. E.g. in '019' only - // the '01' should be matched. - incr(-res[0].length); - if (res = matchReg(/^[0-7]{1,3}/)) { - return createEscaped('octal', parseInt(res[0], 8), res[0], 1); - } else { - // If we end up here, we have a case like /\91/. Then the - // first slash is to be ignored and the 9 & 1 to be treated - // like ordinary characters. Create a character for the - // first number only here - other number-characters - // (if available) will be matched later. - res = createCharacter(matchReg(/^[89]/)); - return updateRawStart(res, res.range[0] - 1); - } - } - } - // Only allow octal numbers in the following. All matched numbers start - // with a zero (if the do not, the previous if-branch is executed). - // If the number is not octal format and starts with zero (e.g. `091`) - // then only the zeros `0` is treated here and the `91` are ordinary - // characters. - // Example: - // /\091/.exec('\091')[0].length === 3 - else if (res = matchReg(/^[0-7]{1,3}/)) { - match = res[0]; - if (/^0{1,3}$/.test(match)) { - // If they are all zeros, then only take the first one. - return createEscaped('null', 0x0000, '0', match.length + 1); - } else { - return createEscaped('octal', parseInt(match, 8), match, 1); - } - } else if (res = matchReg(/^[dDsSwW]/)) { - return createCharacterClassEscape(res[0]); - } - return false; - } - - function parseCharacterEscape() { - // CharacterEscape :: - // ControlEscape - // c ControlLetter - // HexEscapeSequence - // UnicodeEscapeSequence - // IdentityEscape - - var res; - if (res = matchReg(/^[fnrtv]/)) { - // ControlEscape - var codePoint = 0; - switch (res[0]) { - case 't': - codePoint = 0x009;break; - case 'n': - codePoint = 0x00A;break; - case 'v': - codePoint = 0x00B;break; - case 'f': - codePoint = 0x00C;break; - case 'r': - codePoint = 0x00D;break; - } - return createEscaped('singleEscape', codePoint, '\\' + res[0]); - } else if (res = matchReg(/^c([a-zA-Z])/)) { - // c ControlLetter - return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2); - } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) { - // HexEscapeSequence - return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2); - } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) { - // UnicodeEscapeSequence - return parseUnicodeSurrogatePairEscape(createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2)); - } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) { - // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape) - return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4); - } else { - // IdentityEscape - return parseIdentityEscape(); - } - } - - // Taken from the Esprima parser. - function isIdentifierPart(ch) { - // Generated by `tools/generate-identifier-regex.js`. - 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]'); - - return ch === 36 || ch === 95 || // $ (dollar) and _ (underscore) - ch >= 65 && ch <= 90 || // A..Z - ch >= 97 && ch <= 122 || // a..z - ch >= 48 && ch <= 57 || // 0..9 - ch === 92 || // \ (backslash) - ch >= 0x80 && NonAsciiIdentifierPart.test(String.fromCharCode(ch)); - } - - function parseIdentityEscape() { - // IdentityEscape :: - // SourceCharacter but not IdentifierPart - // - // - - var ZWJ = '\u200C'; - var ZWNJ = '\u200D'; - - var tmp; - - if (!isIdentifierPart(lookahead())) { - tmp = incr(); - return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1); - } - - if (match(ZWJ)) { - // - return createEscaped('identifier', 0x200C, ZWJ); - } else if (match(ZWNJ)) { - // - return createEscaped('identifier', 0x200D, ZWNJ); - } - - return null; - } - - function parseCharacterClass() { - // CharacterClass :: - // [ [lookahead ∉ {^}] ClassRanges ] - // [ ^ ClassRanges ] - - var res, - from = pos; - if (res = matchReg(/^\[\^/)) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, true, from, pos); - } else if (match('[')) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, false, from, pos); - } - - return null; - } - - function parseClassRanges() { - // ClassRanges :: - // [empty] - // NonemptyClassRanges - - var res; - if (current(']')) { - // Empty array means nothing insinde of the ClassRange. - return []; - } else { - res = parseNonemptyClassRanges(); - if (!res) { - bail('nonEmptyClassRanges'); - } - return res; - } - } - - function parseHelperClassRanges(atom) { - var from, to, res; - if (current('-') && !next(']')) { - // ClassAtom - ClassAtom ClassRanges - skip('-'); - - res = parseClassAtom(); - if (!res) { - bail('classAtom'); - } - to = pos; - var classRanges = parseClassRanges(); - if (!classRanges) { - bail('classRanges'); - } - from = atom.range[0]; - if (classRanges.type === 'empty') { - return [createClassRange(atom, res, from, to)]; - } - return [createClassRange(atom, res, from, to)].concat(classRanges); - } - - res = parseNonemptyClassRangesNoDash(); - if (!res) { - bail('nonEmptyClassRangesNoDash'); - } - - return [atom].concat(res); - } - - function parseNonemptyClassRanges() { - // NonemptyClassRanges :: - // ClassAtom - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - - var atom = parseClassAtom(); - if (!atom) { - bail('classAtom'); - } - - if (current(']')) { - // ClassAtom - return [atom]; - } - - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - return parseHelperClassRanges(atom); - } - - function parseNonemptyClassRangesNoDash() { - // NonemptyClassRangesNoDash :: - // ClassAtom - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - - var res = parseClassAtom(); - if (!res) { - bail('classAtom'); - } - if (current(']')) { - // ClassAtom - return res; - } - - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - return parseHelperClassRanges(res); - } - - function parseClassAtom() { - // ClassAtom :: - // - - // ClassAtomNoDash - if (match('-')) { - return createCharacter('-'); - } else { - return parseClassAtomNoDash(); - } - } - - function parseClassAtomNoDash() { - // ClassAtomNoDash :: - // SourceCharacter but not one of \ or ] or - - // \ ClassEscape - - var res; - if (res = matchReg(/^[^\\\]-]/)) { - return createCharacter(res[0]); - } else if (match('\\')) { - res = parseClassEscape(); - if (!res) { - bail('classEscape'); - } - - return parseUnicodeSurrogatePairEscape(res); - } - } - - function bail(message, details, from, to) { - from = from == null ? pos : from; - to = to == null ? from : to; - - var contextStart = Math.max(0, from - 10); - var contextEnd = Math.min(to + 10, str.length); - - // Output a bit of context and a line pointing to where our error is. - // - // We are assuming that there are no actual newlines in the content as this is a regular expression. - var context = ' ' + str.substring(contextStart, contextEnd); - var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^'; - - throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\n' + context + '\n' + pointer); - } - - var backrefDenied = []; - var closedCaptureCounter = 0; - var firstIteration = true; - var hasUnicodeFlag = (flags || "").indexOf("u") !== -1; - var pos = 0; - - // Convert the input to a string and treat the empty string special. - str = String(str); - if (str === '') { - str = '(?:)'; - } - - var result = parseDisjunction(); - - if (result.range[1] !== str.length) { - bail('Could not parse entire input - got stuck', '', result.range[1]); - } - - // The spec requires to interpret the `\2` in `/\2()()/` as backreference. - // As the parser collects the number of capture groups as the string is - // parsed it is impossible to make these decisions at the point when the - // `\2` is handled. In case the local decision turns out to be wrong after - // the parsing has finished, the input string is parsed a second time with - // the total number of capture groups set. - // - // SEE: https://github.com/jviereck/regjsparser/issues/70 - for (var i = 0; i < backrefDenied.length; i++) { - if (backrefDenied[i] <= closedCaptureCounter) { - // Parse the input a second time. - pos = 0; - firstIteration = false; - return parseDisjunction(); - } - } - - return result; - } - - var regjsparser = { - parse: parse - }; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = regjsparser; - } else { - window.regjsparser = regjsparser; - } - })(); -}); -$__System.registerDynamic("121", [], true, function() { - return { - "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 - }; -}); - -$__System.registerDynamic('122', [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /*! https://mths.be/regenerate v1.3.2 by @mathias | MIT license */ - ;(function (root) { - - // Detect free variables `exports`. - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module`. - var freeModule = typeof module == 'object' && module && module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js/io.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - var ERRORS = { - 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + 'to the `start` value.', - 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.' - }; - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs - var HIGH_SURROGATE_MIN = 0xD800; - var HIGH_SURROGATE_MAX = 0xDBFF; - var LOW_SURROGATE_MIN = 0xDC00; - var LOW_SURROGATE_MAX = 0xDFFF; - - // In Regenerate output, `\0` is never preceded by `\` because we sort by - // code point value, so let’s keep this regular expression simple. - var regexNull = /\\x00([^0123456789]|$)/g; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var extend = function (destination, source) { - var key; - for (key in source) { - if (hasOwnProperty.call(source, key)) { - destination[key] = source[key]; - } - } - return destination; - }; - - var forEach = function (array, callback) { - var index = -1; - var length = array.length; - while (++index < length) { - callback(array[index], index); - } - }; - - var toString = object.toString; - var isArray = function (value) { - return toString.call(value) == '[object Array]'; - }; - var isNumber = function (value) { - return typeof value == 'number' || toString.call(value) == '[object Number]'; - }; - - // This assumes that `number` is a positive integer that `toString()`s nicely - // (which is the case for all code point values). - var zeroes = '0000'; - var pad = function (number, totalCharacters) { - var string = String(number); - return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string; - }; - - var hex = function (number) { - return Number(number).toString(16).toUpperCase(); - }; - - var slice = [].slice; - - /*--------------------------------------------------------------------------*/ - - var dataFromCodePoints = function (codePoints) { - var index = -1; - var length = codePoints.length; - var max = length - 1; - var result = []; - var isStart = true; - var tmp; - var previous = 0; - while (++index < length) { - tmp = codePoints[index]; - if (isStart) { - result.push(tmp); - previous = tmp; - isStart = false; - } else { - if (tmp == previous + 1) { - if (index != max) { - previous = tmp; - continue; - } else { - isStart = true; - result.push(tmp + 1); - } - } else { - // End the previous range and start a new one. - result.push(previous + 1, tmp); - previous = tmp; - } - } - } - if (!isStart) { - result.push(tmp + 1); - } - return result; - }; - - var dataRemove = function (data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - // Modify this pair. - if (codePoint == start) { - if (end == start + 1) { - // Just remove `start` and `end`. - data.splice(index, 2); - return data; - } else { - // Just replace `start` with a new value. - data[index] = codePoint + 1; - return data; - } - } else if (codePoint == end - 1) { - // Just replace `end` with a new value. - data[index + 1] = codePoint; - return data; - } else { - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, codePoint, codePoint + 1, end); - return data; - } - } - index += 2; - } - return data; - }; - - var dataRemoveRange = function (data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - while (index < data.length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - // Exit as soon as no more matching pairs can be found. - if (start > rangeEnd) { - return data; - } - - // Check if this range pair is equal to, or forms a subset of, the range - // to be removed. - // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`. - // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`. - if (rangeStart <= start && rangeEnd >= end) { - // Remove this pair. - data.splice(index, 2); - continue; - } - - // Check if both `rangeStart` and `rangeEnd` are within the bounds of - // this pair. - // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`. - if (rangeStart >= start && rangeEnd < end) { - if (rangeStart == start) { - // Replace `[start, end]` with `[startB, endB]`. - data[index] = rangeEnd + 1; - data[index + 1] = end + 1; - return data; - } - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); - return data; - } - - // Check if only `rangeStart` is within the bounds of this pair. - // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`. - if (rangeStart >= start && rangeStart <= end) { - // Replace `end` with `rangeStart`. - data[index + 1] = rangeStart; - // Note: we cannot `return` just yet, in case any following pairs still - // contain matching code points. - // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20 - // → `[0, 4, 21, 31]`. - } - - // Check if only `rangeEnd` is within the bounds of this pair. - // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`. - else if (rangeEnd >= start && rangeEnd <= end) { - // Just replace `start`. - data[index] = rangeEnd + 1; - return data; - } - - index += 2; - } - return data; - }; - - var dataAdd = function (data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var lastIndex = null; - var length = data.length; - if (codePoint < 0x0 || codePoint > 0x10FFFF) { - throw RangeError(ERRORS.codePointRange); - } - while (index < length) { - start = data[index]; - end = data[index + 1]; - - // Check if the code point is already in the set. - if (codePoint >= start && codePoint < end) { - return data; - } - - if (codePoint == start - 1) { - // Just replace `start` with a new value. - data[index] = codePoint; - return data; - } - - // At this point, if `start` is `greater` than `codePoint`, insert a new - // `[start, end]` pair before the current pair, or after the current pair - // if there is a known `lastIndex`. - if (start > codePoint) { - data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1); - return data; - } - - if (codePoint == end) { - // Check if adding this code point causes two separate ranges to become - // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`. - if (codePoint + 1 == data[index + 2]) { - data.splice(index, 4, start, data[index + 3]); - return data; - } - // Else, just replace `end` with a new value. - data[index + 1] = codePoint + 1; - return data; - } - lastIndex = index; - index += 2; - } - // The loop has finished; add the new pair to the end of the data set. - data.push(codePoint, codePoint + 1); - return data; - }; - - var dataAddData = function (dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataAdd(data, start); - } else { - data = dataAddRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataRemoveData = function (dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataRemove(data, start); - } else { - data = dataRemoveRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataAddRange = function (data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) { - throw RangeError(ERRORS.codePointRange); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var added = false; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - - if (added) { - // The range has already been added to the set; at this point, we just - // need to get rid of the following ranges in case they overlap. - - // Check if this range can be combined with the previous range. - if (start == rangeEnd + 1) { - data.splice(index - 1, 2); - return data; - } - - // Exit as soon as no more possibly overlapping pairs can be found. - if (start > rangeEnd) { - return data; - } - - // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have - // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the - // `0,16` range that was previously added. - if (start >= rangeStart && start <= rangeEnd) { - // `start` lies within the range that was previously added. - - if (end > rangeStart && end - 1 <= rangeEnd) { - // `end` lies within the range that was previously added as well, - // so remove this pair. - data.splice(index, 2); - index -= 2; - // Note: we cannot `return` just yet, as there may still be other - // overlapping pairs. - } else { - // `start` lies within the range that was previously added, but - // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so - // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`. - // Remove the previously added `end` and the current `start`. - data.splice(index - 1, 2); - index -= 2; - } - - // Note: we cannot return yet. - } - } else if (start == rangeEnd + 1) { - data[index] = rangeStart; - return data; - } - - // Check if a new pair must be inserted *before* the current one. - else if (start > rangeEnd) { - data.splice(index, 0, rangeStart, rangeEnd + 1); - return data; - } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { - // The new range lies entirely within an existing range pair. No action - // needed. - return data; - } else if ( - // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`. - rangeStart >= start && rangeStart < end || - // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`. - end == rangeStart) { - // Replace `end` with the new value. - data[index + 1] = rangeEnd + 1; - // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]` - // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part. - added = true; - // Note: we cannot `return` just yet. - } else if (rangeStart <= start && rangeEnd + 1 >= end) { - // The new range is a superset of the old range. - data[index] = rangeStart; - data[index + 1] = rangeEnd + 1; - added = true; - } - - index += 2; - } - // The loop has finished without doing anything; add the new pair to the end - // of the data set. - if (!added) { - data.push(rangeStart, rangeEnd + 1); - } - return data; - }; - - var dataContains = function (data, codePoint) { - var index = 0; - var length = data.length; - // Exit early if `codePoint` is not within `data`’s overall range. - var start = data[index]; - var end = data[length - 1]; - if (length >= 2) { - if (codePoint < start || codePoint > end) { - return false; - } - } - // Iterate over the data per `(start, end)` pair. - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - return true; - } - index += 2; - } - return false; - }; - - var dataIntersection = function (data, codePoints) { - var index = 0; - var length = codePoints.length; - var codePoint; - var result = []; - while (index < length) { - codePoint = codePoints[index]; - if (dataContains(data, codePoint)) { - result.push(codePoint); - } - ++index; - } - return dataFromCodePoints(result); - }; - - var dataIsEmpty = function (data) { - return !data.length; - }; - - var dataIsSingleton = function (data) { - // Check if the set only represents a single code point. - return data.length == 2 && data[0] + 1 == data[1]; - }; - - var dataToArray = function (data) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var result = []; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - while (start < end) { - result.push(start); - ++start; - } - index += 2; - } - return result; - }; - - /*--------------------------------------------------------------------------*/ - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var floor = Math.floor; - var highSurrogate = function (codePoint) { - return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10); - }; - - var lowSurrogate = function (codePoint) { - return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10); - }; - - var stringFromCharCode = String.fromCharCode; - var codePointToString = function (codePoint) { - var string; - // https://mathiasbynens.be/notes/javascript-escapes#single - // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a - // different meaning in regular expressions (word boundary), so it cannot - // be used here. - if (codePoint == 0x09) { - string = '\\t'; - } - // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it. - // else if (codePoint == 0x0B) { - // string = '\\v'; - // } - else if (codePoint == 0x0A) { - string = '\\n'; - } else if (codePoint == 0x0C) { - string = '\\f'; - } else if (codePoint == 0x0D) { - string = '\\r'; - } else if (codePoint == 0x5C) { - string = '\\\\'; - } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) { - // The code point maps to an unsafe printable ASCII character; - // backslash-escape it. Here’s the list of those symbols: - // - // $()*+-.?[\]^{|} - // - // See #7 for more info. - string = '\\' + stringFromCharCode(codePoint); - } else if (codePoint >= 0x20 && codePoint <= 0x7E) { - // The code point maps to one of these printable ASCII symbols - // (including the space character): - // - // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO - // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~ - // - // These can safely be used directly. - string = stringFromCharCode(codePoint); - } else if (codePoint <= 0xFF) { - // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal - string = '\\x' + pad(hex(codePoint), 2); - } else { - // `codePoint <= 0xFFFF` holds true. - // https://mathiasbynens.be/notes/javascript-escapes#unicode - string = '\\u' + pad(hex(codePoint), 4); - } - - // There’s no need to account for astral symbols / surrogate pairs here, - // since `codePointToString` is private and only used for BMP code points. - // But if that’s what you need, just add an `else` block with this code: - // - // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4) - // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4); - - return string; - }; - - var codePointToStringUnicode = function (codePoint) { - if (codePoint <= 0xFFFF) { - return codePointToString(codePoint); - } - return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; - }; - - var symbolToCodePoint = function (symbol) { - var length = symbol.length; - var first = symbol.charCodeAt(0); - var second; - if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1 // There is a next code unit. - ) { - // `first` is a high surrogate, and there is a next character. Assume - // it’s a low surrogate (else it’s invalid usage of Regenerate anyway). - second = symbol.charCodeAt(1); - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000; - } - return first; - }; - - var createBMPCharacterClasses = function (data) { - // Iterate over the data per `(start, end)` pair. - var result = ''; - var index = 0; - var start; - var end; - var length = data.length; - if (dataIsSingleton(data)) { - return codePointToString(data[0]); - } - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - if (start == end) { - result += codePointToString(start); - } else if (start + 1 == end) { - result += codePointToString(start) + codePointToString(end); - } else { - result += codePointToString(start) + '-' + codePointToString(end); - } - index += 2; - } - return '[' + result + ']'; - }; - - var createUnicodeCharacterClasses = function (data) { - // Iterate over the data per `(start, end)` pair. - var result = ''; - var index = 0; - var start; - var end; - var length = data.length; - if (dataIsSingleton(data)) { - return codePointToStringUnicode(data[0]); - } - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - if (start == end) { - result += codePointToStringUnicode(start); - } else if (start + 1 == end) { - result += codePointToStringUnicode(start) + codePointToStringUnicode(end); - } else { - result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end); - } - index += 2; - } - return '[' + result + ']'; - }; - - var splitAtBMP = function (data) { - // Iterate over the data per `(start, end)` pair. - var loneHighSurrogates = []; - var loneLowSurrogates = []; - var bmp = []; - var astral = []; - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - if (start < HIGH_SURROGATE_MIN) { - - // The range starts and ends before the high surrogate range. - // E.g. (0, 0x10). - if (end < HIGH_SURROGATE_MIN) { - bmp.push(start, end + 1); - } - - // The range starts before the high surrogate range and ends within it. - // E.g. (0, 0xD855). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends in the low - // surrogate range. E.g. (0, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends after the - // low surrogate range. E.g. (0, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { - - // The range starts and ends in the high surrogate range. - // E.g. (0xD855, 0xD866). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - loneHighSurrogates.push(start, end + 1); - } - - // The range starts in the high surrogate range and ends in the low - // surrogate range. E.g. (0xD855, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts in the high surrogate range and ends after the low - // surrogate range. E.g. (0xD855, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { - - // The range starts and ends in the low surrogate range. - // E.g. (0xDCFF, 0xDDFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, end + 1); - } - - // The range starts in the low surrogate range and ends after the low - // surrogate range. E.g. (0xDCFF, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { - - // The range starts and ends after the low surrogate range. - // E.g. (0xFFAA, 0x10FFFF). - if (end <= 0xFFFF) { - bmp.push(start, end + 1); - } else { - bmp.push(start, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } else { - - // The range starts and ends in the astral range. - astral.push(start, end + 1); - } - - index += 2; - } - return { - 'loneHighSurrogates': loneHighSurrogates, - 'loneLowSurrogates': loneLowSurrogates, - 'bmp': bmp, - 'astral': astral - }; - }; - - var optimizeSurrogateMappings = function (surrogateMappings) { - var result = []; - var tmpLow = []; - var addLow = false; - var mapping; - var nextMapping; - var highSurrogates; - var lowSurrogates; - var nextHighSurrogates; - var nextLowSurrogates; - var index = -1; - var length = surrogateMappings.length; - while (++index < length) { - mapping = surrogateMappings[index]; - nextMapping = surrogateMappings[index + 1]; - if (!nextMapping) { - result.push(mapping); - continue; - } - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextHighSurrogates = nextMapping[0]; - nextLowSurrogates = nextMapping[1]; - - // Check for identical high surrogate ranges. - tmpLow = lowSurrogates; - while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) { - // Merge with the next item. - if (dataIsSingleton(nextLowSurrogates)) { - tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); - } else { - tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1); - } - ++index; - mapping = surrogateMappings[index]; - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextMapping = surrogateMappings[index + 1]; - nextHighSurrogates = nextMapping && nextMapping[0]; - nextLowSurrogates = nextMapping && nextMapping[1]; - addLow = true; - } - result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]); - addLow = false; - } - return optimizeByLowSurrogates(result); - }; - - var optimizeByLowSurrogates = function (surrogateMappings) { - if (surrogateMappings.length == 1) { - return surrogateMappings; - } - var index = -1; - var innerIndex = -1; - while (++index < surrogateMappings.length) { - var mapping = surrogateMappings[index]; - var lowSurrogates = mapping[1]; - var lowSurrogateStart = lowSurrogates[0]; - var lowSurrogateEnd = lowSurrogates[1]; - innerIndex = index; // Note: the loop starts at the next index. - while (++innerIndex < surrogateMappings.length) { - var otherMapping = surrogateMappings[innerIndex]; - var otherLowSurrogates = otherMapping[1]; - var otherLowSurrogateStart = otherLowSurrogates[0]; - var otherLowSurrogateEnd = otherLowSurrogates[1]; - if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd) { - // Add the code points in the other item to this one. - if (dataIsSingleton(otherMapping[0])) { - mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); - } else { - mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1); - } - // Remove the other, now redundant, item. - surrogateMappings.splice(innerIndex, 1); - --innerIndex; - } - } - } - return surrogateMappings; - }; - - var surrogateSet = function (data) { - // Exit early if `data` is an empty set. - if (!data.length) { - return []; - } - - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var startHigh; - var startLow; - var endHigh; - var endLow; - var surrogateMappings = []; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; - - startHigh = highSurrogate(start); - startLow = lowSurrogate(start); - endHigh = highSurrogate(end); - endLow = lowSurrogate(end); - - var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; - var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; - var complete = false; - - // Append the previous high-surrogate-to-low-surrogate mappings. - // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`. - if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) { - surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]); - complete = true; - } else { - surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]); - } - - // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to - // `(endHigh - 1, LOW_SURROGATE_MAX)`. - if (!complete && startHigh + 1 < endHigh) { - if (endsWithHighestLowSurrogate) { - // Combine step 2 and step 3. - surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]); - complete = true; - } else { - surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]); - } - } - - // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`. - if (!complete) { - surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]); - } - - index += 2; - } - - // The format of `surrogateMappings` is as follows: - // - // [ surrogateMapping1, surrogateMapping2 ] - // - // i.e.: - // - // [ - // [ highSurrogates1, lowSurrogates1 ], - // [ highSurrogates2, lowSurrogates2 ] - // ] - return optimizeSurrogateMappings(surrogateMappings); - }; - - var createSurrogateCharacterClasses = function (surrogateMappings) { - var result = []; - forEach(surrogateMappings, function (surrogateMapping) { - var highSurrogates = surrogateMapping[0]; - var lowSurrogates = surrogateMapping[1]; - result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates)); - }); - return result.join('|'); - }; - - var createCharacterClassesFromData = function (data, bmpOnly, hasUnicodeFlag) { - if (hasUnicodeFlag) { - return createUnicodeCharacterClasses(data); - } - var result = []; - - var parts = splitAtBMP(data); - var loneHighSurrogates = parts.loneHighSurrogates; - var loneLowSurrogates = parts.loneLowSurrogates; - var bmp = parts.bmp; - var astral = parts.astral; - var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); - var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); - - var surrogateMappings = surrogateSet(astral); - - if (bmpOnly) { - bmp = dataAddData(bmp, loneHighSurrogates); - hasLoneHighSurrogates = false; - bmp = dataAddData(bmp, loneLowSurrogates); - hasLoneLowSurrogates = false; - } - - if (!dataIsEmpty(bmp)) { - // The data set contains BMP code points that are not high surrogates - // needed for astral code points in the set. - result.push(createBMPCharacterClasses(bmp)); - } - if (surrogateMappings.length) { - // The data set contains astral code points; append character classes - // based on their surrogate pairs. - result.push(createSurrogateCharacterClasses(surrogateMappings)); - } - // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860 - if (hasLoneHighSurrogates) { - result.push(createBMPCharacterClasses(loneHighSurrogates) + - // Make sure the high surrogates aren’t part of a surrogate pair. - '(?![\\uDC00-\\uDFFF])'); - } - if (hasLoneLowSurrogates) { - result.push( - // It is not possible to accurately assert the low surrogates aren’t - // part of a surrogate pair, since JavaScript regular expressions do - // not support lookbehind. - '(?:[^\\uD800-\\uDBFF]|^)' + createBMPCharacterClasses(loneLowSurrogates)); - } - return result.join('|'); - }; - - /*--------------------------------------------------------------------------*/ - - // `regenerate` can be used as a constructor (and new methods can be added to - // its prototype) but also as a regular function, the latter of which is the - // documented and most common usage. For that reason, it’s not capitalized. - var regenerate = function (value) { - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (this instanceof regenerate) { - this.data = []; - return value ? this.add(value) : this; - } - return new regenerate().add(value); - }; - - regenerate.version = '1.3.2'; - - var proto = regenerate.prototype; - extend(proto, { - 'add': function (value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataAddData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function (item) { - $this.add(item); - }); - return $this; - } - $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value)); - return $this; - }, - 'remove': function (value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataRemoveData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function (item) { - $this.remove(item); - }); - return $this; - } - $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value)); - return $this; - }, - 'addRange': function (start, end) { - var $this = this; - $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end)); - return $this; - }, - 'removeRange': function (start, end) { - var $this = this; - var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); - var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); - $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint); - return $this; - }, - 'intersection': function (argument) { - var $this = this; - // Allow passing other Regenerate instances. - // TODO: Optimize this by writing and using `dataIntersectionData()`. - var array = argument instanceof regenerate ? dataToArray(argument.data) : argument; - $this.data = dataIntersection($this.data, array); - return $this; - }, - 'contains': function (codePoint) { - return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint)); - }, - 'clone': function () { - var set = new regenerate(); - set.data = this.data.slice(0); - return set; - }, - 'toString': function (options) { - var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false); - if (!result) { - // For an empty set, return something that can be inserted `/here/` to - // form a valid regular expression. Avoid `(?:)` since that matches the - // empty string. - return '[]'; - } - // Use `\0` instead of `\x00` where possible. - return result.replace(regexNull, '\\0$1'); - }, - 'toRegExp': function (flags) { - var pattern = this.toString(flags && flags.indexOf('u') != -1 ? { 'hasUnicodeFlag': true } : null); - return RegExp(pattern, flags || ''); - }, - 'valueOf': function () { - // Note: `valueOf` is aliased as `toArray`. - return dataToArray(this.data); - } - }); - - proto.toArray = proto.valueOf; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if (typeof undefined == 'function' && typeof define.amd == 'object' && define.amd) { - define(function () { - return regenerate; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { - // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = regenerate; - } else { - // in Narwhal or RingoJS v0.7.0- - freeExports.regenerate = regenerate; - } - } else { - // in Rhino or a web browser - root.regenerate = regenerate; - } - })(exports); -}); -$__System.registerDynamic('123', ['122'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - // Generated by `/scripts/character-class-escape-sets.js`. Do not edit. - var regenerate = $__require('122'); - - exports.REGULAR = { - 'd': regenerate().addRange(0x30, 0x39), - 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0xFFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029), - '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), - 'w': regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A), - 'W': regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0xFFFF) - }; - - exports.UNICODE = { - 'd': regenerate().addRange(0x30, 0x39), - 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029), - '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), - 'w': regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A), - 'W': regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x10FFFF) - }; - - exports.UNICODE_IGNORE_CASE = { - 'd': regenerate().addRange(0x30, 0x39), - 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029), - '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), - 'w': regenerate(0x5F, 0x17F, 0x212A).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A), - 'W': regenerate(0x4B, 0x53, 0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x10FFFF) - }; -}); -$__System.registerDynamic('124', ['11f', '120', '122', '121', '123'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var generate = $__require('11f').generate; - var parse = $__require('120').parse; - var regenerate = $__require('122'); - var iuMappings = $__require('121'); - var ESCAPE_SETS = $__require('123'); - - function getCharacterClassEscapeSet(character) { - if (unicode) { - if (ignoreCase) { - return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]; - } - return ESCAPE_SETS.UNICODE[character]; - } - return ESCAPE_SETS.REGULAR[character]; - } - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - function has(object, property) { - return hasOwnProperty.call(object, property); - } - - // Prepare a Regenerate set containing all code points, used for negative - // character classes (if any). - var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); - // Without the `u` flag, the range stops at 0xFFFF. - // https://mths.be/es6#sec-pattern-semantics - var BMP_SET = regenerate().addRange(0x0, 0xFFFF); - - // Prepare a Regenerate set containing all code points that are supposed to be - // matched by `/./u`. https://mths.be/es6#sec-atom - var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points - .remove( - // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators): - 0x000A, // Line Feed - 0x000D, // Carriage Return - 0x2028, // Line Separator - 0x2029 // Paragraph Separator - ); - // Prepare a Regenerate set containing all code points that are supposed to be - // matched by `/./` (only BMP code points). - var DOT_SET = DOT_SET_UNICODE.clone().intersection(BMP_SET); - - // Add a range of code points + any case-folded code points in that range to a - // set. - regenerate.prototype.iuAddRange = function (min, max) { - var $this = this; - do { - var folded = caseFold(min); - if (folded) { - $this.add(folded); - } - } while (++min <= max); - return $this; - }; - - function assign(target, source) { - for (var key in source) { - // Note: `hasOwnProperty` is not needed here. - target[key] = source[key]; - } - } - - function update(item, pattern) { - // TODO: Test if memoizing `pattern` here is worth the effort. - if (!pattern) { - return; - } - var tree = parse(pattern, ''); - switch (tree.type) { - case 'characterClass': - case 'group': - case 'value': - // No wrapping needed. - break; - default: - // Wrap the pattern in a non-capturing group. - tree = wrap(tree, pattern); - } - assign(item, tree); - } - - function wrap(tree, pattern) { - // Wrap the pattern in a non-capturing group. - return { - 'type': 'group', - 'behavior': 'ignore', - 'body': [tree], - 'raw': '(?:' + pattern + ')' - }; - } - - function caseFold(codePoint) { - return has(iuMappings, codePoint) ? iuMappings[codePoint] : false; - } - - var ignoreCase = false; - var unicode = false; - function processCharacterClass(characterClassItem) { - var set = regenerate(); - var body = characterClassItem.body.forEach(function (item) { - switch (item.type) { - case 'value': - set.add(item.codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(item.codePoint); - if (folded) { - set.add(folded); - } - } - break; - case 'characterClassRange': - var min = item.min.codePoint; - var max = item.max.codePoint; - set.addRange(min, max); - if (ignoreCase && unicode) { - set.iuAddRange(min, max); - } - break; - case 'characterClassEscape': - set.add(getCharacterClassEscapeSet(item.value)); - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - }); - if (characterClassItem.negative) { - set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set); - } - update(characterClassItem, set.toString()); - return characterClassItem; - } - - function processTerm(item) { - switch (item.type) { - case 'dot': - update(item, (unicode ? DOT_SET_UNICODE : DOT_SET).toString()); - break; - case 'characterClass': - item = processCharacterClass(item); - break; - case 'characterClassEscape': - update(item, getCharacterClassEscapeSet(item.value).toString()); - break; - case 'alternative': - case 'disjunction': - case 'group': - case 'quantifier': - item.body = item.body.map(processTerm); - break; - case 'value': - var codePoint = item.codePoint; - var set = regenerate(codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(codePoint); - if (folded) { - set.add(folded); - } - } - update(item, set.toString()); - break; - case 'anchor': - case 'empty': - case 'group': - case 'reference': - // Nothing to do here. - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - return item; - }; - - module.exports = function (pattern, flags) { - var tree = parse(pattern, flags); - ignoreCase = flags ? flags.indexOf('i') > -1 : false; - unicode = flags ? flags.indexOf('u') > -1 : false; - assign(tree, processTerm(tree)); - return generate(tree); - }; -}); -$__System.registerDynamic("125", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; - } - - module.exports = baseIndexOfWith; -}); -$__System.registerDynamic('126', ['49', '127', '125', '93', 'bc'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var arrayMap = $__require('49'), - baseIndexOf = $__require('127'), - baseIndexOfWith = $__require('125'), - baseUnary = $__require('93'), - copyArray = $__require('bc'); - - /** Used for built-in method references. */ - var arrayProto = Array.prototype; - - /** Built-in value references. */ - var splice = arrayProto.splice; - - /** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ - function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; - - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; - - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; - } - - module.exports = basePullAll; -}); -$__System.registerDynamic('128', ['126'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var basePullAll = $__require('126'); - - /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pullAll(array, ['a', 'c']); - * console.log(array); - * // => ['b', 'b'] - */ - function pullAll(array, values) { - return array && array.length && values && values.length ? basePullAll(array, values) : array; - } - - module.exports = pullAll; -}); -$__System.registerDynamic('129', ['95', '128'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseRest = $__require('95'), - pullAll = $__require('128'); - - /** - * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` - * to remove elements from an array by predicate. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pull(array, 'a', 'c'); - * console.log(array); - * // => ['b', 'b'] - */ - var pull = baseRest(pullAll); - - module.exports = pull; -}); -$__System.registerDynamic("11e", ["129", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.is = is; - exports.pullFlag = pullFlag; - - var _pull = $__require("129"); - - var _pull2 = _interopRequireDefault(_pull); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function is(node, flag) { - return t.isRegExpLiteral(node) && node.flags.indexOf(flag) >= 0; - } - - function pullFlag(node, flag) { - var flags = node.flags.split(""); - if (node.flags.indexOf(flag) < 0) return; - (0, _pull2.default)(flags, flag); - node.flags = flags.join(""); - } -}); -$__System.registerDynamic("12a", ["124", "11e"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function () { - return { - visitor: { - RegExpLiteral: function RegExpLiteral(_ref) { - var node = _ref.node; - - if (!regex.is(node, "u")) return; - node.pattern = (0, _regexpuCore2.default)(node.pattern, node.flags); - regex.pullFlag(node, "u"); - } - } - }; - }; - - var _regexpuCore = $__require("124"); - - var _regexpuCore2 = _interopRequireDefault(_regexpuCore); - - var _babelHelperRegex = $__require("11e"); - - var regex = _interopRequireWildcard(_babelHelperRegex); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("12b", ["17"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var messages = _ref.messages; - - return { - visitor: { - Scope: function Scope(_ref2) { - var scope = _ref2.scope; - - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - if (binding.kind !== "const" && binding.kind !== "module") continue; - - for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var violation = _ref3; - - throw violation.buildCodeFrameError(messages.get("readOnly", name)); - } - } - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("12c", ["17"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - function getSpreadLiteral(spread, scope, state) { - if (state.opts.loose && !t.isIdentifier(spread.argument, { name: "arguments" })) { - return spread.argument; - } else { - return scope.toArray(spread.argument, true); - } - } - - function hasSpread(nodes) { - for (var i = 0; i < nodes.length; i++) { - if (t.isSpreadElement(nodes[i])) { - return true; - } - } - return false; - } - - function build(props, scope, state) { - var nodes = []; - - var _props = []; - - function push() { - if (!_props.length) return; - nodes.push(t.arrayExpression(_props)); - _props = []; - } - - for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var prop = _ref2; - - if (t.isSpreadElement(prop)) { - push(); - nodes.push(getSpreadLiteral(prop, scope, state)); - } else { - _props.push(prop); - } - } - - push(); - - return nodes; - } - - return { - visitor: { - ArrayExpression: function ArrayExpression(path, state) { - var node = path.node, - scope = path.scope; - - var elements = node.elements; - if (!hasSpread(elements)) return; - - var nodes = build(elements, scope, state); - var first = nodes.shift(); - - if (!t.isArrayExpression(first)) { - nodes.unshift(first); - first = t.arrayExpression([]); - } - - path.replaceWith(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes)); - }, - CallExpression: function CallExpression(path, state) { - var node = path.node, - scope = path.scope; - - var args = node.arguments; - if (!hasSpread(args)) return; - - var calleePath = path.get("callee"); - if (calleePath.isSuper()) return; - - var contextLiteral = t.identifier("undefined"); - - node.arguments = []; - - var nodes = void 0; - if (args.length === 1 && args[0].argument.name === "arguments") { - nodes = [args[0].argument]; - } else { - nodes = build(args, scope, state); - } - - var first = nodes.shift(); - if (nodes.length) { - node.arguments.push(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes)); - } else { - node.arguments.push(first); - } - - var callee = node.callee; - - if (calleePath.isMemberExpression()) { - var temp = scope.maybeGenerateMemoised(callee.object); - if (temp) { - callee.object = t.assignmentExpression("=", temp, callee.object); - contextLiteral = temp; - } else { - contextLiteral = callee.object; - } - t.appendToMemberExpression(callee, t.identifier("apply")); - } else { - node.callee = t.memberExpression(node.callee, t.identifier("apply")); - } - - if (t.isSuper(contextLiteral)) { - contextLiteral = t.thisExpression(); - } - - node.arguments.unshift(contextLiteral); - }, - NewExpression: function NewExpression(path, state) { - var node = path.node, - scope = path.scope; - - var args = node.arguments; - if (!hasSpread(args)) return; - - var nodes = build(args, scope, state); - - var context = t.arrayExpression([t.nullLiteral()]); - - args = t.callExpression(t.memberExpression(context, t.identifier("concat")), nodes); - - 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]), [])); - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("12d", ["11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.visitor = undefined; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - var visitor = exports.visitor = { - Function: function Function(path) { - var params = path.get("params"); - - var hoistTweak = t.isRestElement(params[params.length - 1]) ? 1 : 0; - var outputParamsLength = params.length - hoistTweak; - - for (var i = 0; i < outputParamsLength; i++) { - var param = params[i]; - if (param.isArrayPattern() || param.isObjectPattern()) { - var uid = path.scope.generateUidIdentifier("ref"); - - var declar = t.variableDeclaration("let", [t.variableDeclarator(param.node, uid)]); - declar._blockHoist = outputParamsLength - i; - - path.ensureBlock(); - path.get("body").unshiftContainer("body", declar); - - param.replaceWith(uid); - } - } - } - }; -}); -$__System.registerDynamic("117", ["11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (node) { - var params = node.params; - for (var i = 0; i < params.length; i++) { - var param = params[i]; - if (t.isAssignmentPattern(param) || t.isRestElement(param)) { - return i; - } - } - return params.length; - }; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("db", ["17", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (path, emit) { - var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "var"; - - path.traverse(visitor, { kind: kind, emit: emit }); - }; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var visitor = { - Scope: function Scope(path, state) { - if (state.kind === "let") path.skip(); - }, - Function: function Function(path) { - path.skip(); - }, - VariableDeclaration: function VariableDeclaration(path, state) { - if (state.kind && path.node.kind !== state.kind) return; - - var nodes = []; - - var declarations = path.get("declarations"); - var firstId = void 0; - - for (var _iterator = declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var declar = _ref; - - firstId = declar.node.id; - - if (declar.node.init) { - nodes.push(t.expressionStatement(t.assignmentExpression("=", declar.node.id, declar.node.init))); - } - - for (var name in declar.getBindingIdentifiers()) { - state.emit(t.identifier(name), name); - } - } - - if (path.parentPath.isFor({ left: path.node })) { - path.replaceWith(firstId); - } else { - path.replaceWithMultiple(nodes); - } - } - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("12e", ["db", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (path) { - var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : path.scope; - var node = path.node; - - var container = t.functionExpression(null, [], node.body, node.generator, node.async); - - var callee = container; - var args = []; - - (0, _babelHelperHoistVariables2.default)(path, function (id) { - return scope.push({ id: id }); - }); - - var state = { - foundThis: false, - foundArguments: false - }; - - path.traverse(visitor, state); - - if (state.foundArguments) { - callee = t.memberExpression(container, t.identifier("apply")); - args = []; - - if (state.foundThis) { - args.push(t.thisExpression()); - } - - if (state.foundArguments) { - if (!state.foundThis) args.push(t.nullLiteral()); - args.push(t.identifier("arguments")); - } - } - - var call = t.callExpression(callee, args); - if (node.generator) call = t.yieldExpression(call, true); - - return t.returnStatement(call); - }; - - var _babelHelperHoistVariables = $__require("db"); - - var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var visitor = { - enter: function enter(path, state) { - if (path.isThisExpression()) { - state.foundThis = true; - } - - if (path.isReferencedIdentifier({ name: "arguments" })) { - state.foundArguments = true; - } - }, - Function: function Function(path) { - path.skip(); - } - }; - - module.exports = exports["default"]; -}); -$__System.registerDynamic("12f", ["17", "117", "12e", "10", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.visitor = undefined; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _babelHelperGetFunctionArity = $__require("117"); - - var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity); - - var _babelHelperCallDelegate = $__require("12e"); - - var _babelHelperCallDelegate2 = _interopRequireDefault(_babelHelperCallDelegate); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var 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"); - - var buildCutOff = (0, _babelTemplate2.default)("\n let $0 = $1[$2];\n"); - - function hasDefaults(node) { - for (var _iterator = node.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var param = _ref; - - if (!t.isIdentifier(param)) return true; - } - return false; - } - - function isSafeBinding(scope, node) { - if (!scope.hasOwnBinding(node.name)) return true; - - var _scope$getOwnBinding = scope.getOwnBinding(node.name), - kind = _scope$getOwnBinding.kind; - - return kind === "param" || kind === "local"; - } - - var iifeVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - var scope = path.scope, - node = path.node; - - if (node.name === "eval" || !isSafeBinding(scope, node)) { - state.iife = true; - path.stop(); - } - }, - Scope: function Scope(path) { - path.skip(); - } - }; - - var visitor = exports.visitor = { - Function: function Function(path) { - var node = path.node, - scope = path.scope; - - if (!hasDefaults(node)) return; - - path.ensureBlock(); - - var state = { - iife: false, - scope: scope - }; - - var body = []; - - var argsIdentifier = t.identifier("arguments"); - argsIdentifier._shadowedFunctionLiteral = path; - - function pushDefNode(left, right, i) { - var defNode = buildDefaultParam({ - VARIABLE_NAME: left, - DEFAULT_VALUE: right, - ARGUMENT_KEY: t.numericLiteral(i), - ARGUMENTS: argsIdentifier - }); - defNode._blockHoist = node.params.length - i; - body.push(defNode); - } - - var lastNonDefaultParam = (0, _babelHelperGetFunctionArity2.default)(node); - - var params = path.get("params"); - for (var i = 0; i < params.length; i++) { - var param = params[i]; - - if (!param.isAssignmentPattern()) { - if (!state.iife && !param.isIdentifier()) { - param.traverse(iifeVisitor, state); - } - - continue; - } - - var left = param.get("left"); - var right = param.get("right"); - - if (i >= lastNonDefaultParam || left.isPattern()) { - var placeholder = scope.generateUidIdentifier("x"); - placeholder._isDefaultPlaceholder = true; - node.params[i] = placeholder; - } else { - node.params[i] = left.node; - } - - if (!state.iife) { - if (right.isIdentifier() && !isSafeBinding(scope, right.node)) { - state.iife = true; - } else { - right.traverse(iifeVisitor, state); - } - } - - pushDefNode(left.node, right.node, i); - } - - for (var _i2 = lastNonDefaultParam + 1; _i2 < node.params.length; _i2++) { - var _param = node.params[_i2]; - if (_param._isDefaultPlaceholder) continue; - - var declar = buildCutOff(_param, argsIdentifier, t.numericLiteral(_i2)); - declar._blockHoist = node.params.length - _i2; - body.push(declar); - } - - node.params = node.params.slice(0, lastNonDefaultParam); - - if (state.iife) { - body.push((0, _babelHelperCallDelegate2.default)(path, scope)); - path.set("body", t.blockStatement(body)); - } else { - path.get("body").unshiftContainer("body", body); - } - } - }; -}); -$__System.registerDynamic("130", ["17", "10", "11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.visitor = undefined; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _babelTemplate = $__require("10"); - - var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var 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"); - - var restIndex = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n"); - - var restIndexImpure = (0, _babelTemplate2.default)("\n REF = INDEX, ARGUMENTS.length <= REF ? undefined : ARGUMENTS[REF]\n"); - - var restLength = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n"); - - var memberExpressionOptimisationVisitor = { - Scope: function Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) { - path.skip(); - } - }, - Flow: function Flow(path) { - if (path.isTypeCastExpression()) return; - - path.skip(); - }, - - "Function|ClassProperty": function FunctionClassProperty(path, state) { - var oldNoOptimise = state.noOptimise; - state.noOptimise = true; - path.traverse(memberExpressionOptimisationVisitor, state); - state.noOptimise = oldNoOptimise; - - path.skip(); - }, - - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - var node = path.node; - - if (node.name === "arguments") { - state.deopted = true; - } - - if (node.name !== state.name) return; - - if (state.noOptimise) { - state.deopted = true; - } else { - var parentPath = path.parentPath; - - if (parentPath.listKey === "params" && parentPath.key < state.offset) { - return; - } - - if (parentPath.isMemberExpression({ object: node })) { - var grandparentPath = parentPath.parentPath; - - 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); - - if (argsOptEligible) { - if (parentPath.node.computed) { - if (parentPath.get("property").isBaseType("number")) { - state.candidates.push({ cause: "indexGetter", path: path }); - return; - } - } else if (parentPath.node.property.name === "length") { - state.candidates.push({ cause: "lengthGetter", path: path }); - return; - } - } - } - - if (state.offset === 0 && parentPath.isSpreadElement()) { - var call = parentPath.parentPath; - if (call.isCallExpression() && call.node.arguments.length === 1) { - state.candidates.push({ cause: "argSpread", path: path }); - return; - } - } - - state.references.push(path); - } - }, - BindingIdentifier: function BindingIdentifier(_ref, state) { - var node = _ref.node; - - if (node.name === state.name) { - state.deopted = true; - } - } - }; - function hasRest(node) { - return t.isRestElement(node.params[node.params.length - 1]); - } - - function optimiseIndexGetter(path, argsId, offset) { - var index = void 0; - - if (t.isNumericLiteral(path.parent.property)) { - index = t.numericLiteral(path.parent.property.value + offset); - } else if (offset === 0) { - index = path.parent.property; - } else { - index = t.binaryExpression("+", path.parent.property, t.numericLiteral(offset)); - } - - var scope = path.scope; - - if (!scope.isPure(index)) { - var temp = scope.generateUidIdentifierBasedOnNode(index); - scope.push({ id: temp, kind: "var" }); - path.parentPath.replaceWith(restIndexImpure({ - ARGUMENTS: argsId, - INDEX: index, - REF: temp - })); - } else { - path.parentPath.replaceWith(restIndex({ - ARGUMENTS: argsId, - INDEX: index - })); - } - } - - function optimiseLengthGetter(path, argsId, offset) { - if (offset) { - path.parentPath.replaceWith(restLength({ - ARGUMENTS: argsId, - OFFSET: t.numericLiteral(offset) - })); - } else { - path.replaceWith(argsId); - } - } - - var visitor = exports.visitor = { - Function: function Function(path) { - var node = path.node, - scope = path.scope; - - if (!hasRest(node)) return; - - var rest = node.params.pop().argument; - - var argsId = t.identifier("arguments"); - - argsId._shadowedFunctionLiteral = path; - - var state = { - references: [], - offset: node.params.length, - - argumentsNode: argsId, - outerBinding: scope.getBindingIdentifier(rest.name), - - candidates: [], - - name: rest.name, - - deopted: false - }; - - path.traverse(memberExpressionOptimisationVisitor, state); - - if (!state.deopted && !state.references.length) { - for (var _iterator = state.candidates, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var _ref4 = _ref3; - var _path = _ref4.path, - cause = _ref4.cause; - - switch (cause) { - case "indexGetter": - optimiseIndexGetter(_path, argsId, state.offset); - break; - case "lengthGetter": - optimiseLengthGetter(_path, argsId, state.offset); - break; - default: - _path.replaceWith(argsId); - } - } - return; - } - - state.references = state.references.concat(state.candidates.map(function (_ref5) { - var path = _ref5.path; - return path; - })); - - state.deopted = state.deopted || !!node.shadow; - - var start = t.numericLiteral(node.params.length); - var key = scope.generateUidIdentifier("key"); - var len = scope.generateUidIdentifier("len"); - - var arrKey = key; - var arrLen = len; - if (node.params.length) { - arrKey = t.binaryExpression("-", key, start); - - arrLen = t.conditionalExpression(t.binaryExpression(">", len, start), t.binaryExpression("-", len, start), t.numericLiteral(0)); - } - - var loop = buildRest({ - ARGUMENTS: argsId, - ARRAY_KEY: arrKey, - ARRAY_LEN: arrLen, - START: start, - ARRAY: rest, - KEY: key, - LEN: len - }); - - if (state.deopted) { - loop._blockHoist = node.params.length + 1; - node.body.body.unshift(loop); - } else { - loop._blockHoist = 1; - - var target = path.getEarliestCommonAncestorFrom(state.references).getStatementParent(); - - target.findParent(function (path) { - if (path.isLoop()) { - target = path; - } else { - return path.isFunction(); - } - }); - - target.insertBefore(loop); - } - } - }; -}); -$__System.registerDynamic("131", ["17", "d0", "12d", "12f", "130"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function () { - return { - visitor: _babelTraverse.visitors.merge([{ - ArrowFunctionExpression: function ArrowFunctionExpression(path) { - var params = path.get("params"); - for (var _iterator = params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var param = _ref; - - if (param.isRestElement() || param.isAssignmentPattern()) { - path.arrowFunctionToShadowed(); - break; - } - } - } - }, destructuring.visitor, rest.visitor, def.visitor]) - }; - }; - - var _babelTraverse = $__require("d0"); - - var _destructuring = $__require("12d"); - - var destructuring = _interopRequireWildcard(_destructuring); - - var _default = $__require("12f"); - - var def = _interopRequireWildcard(_default); - - var _rest = $__require("130"); - - var rest = _interopRequireWildcard(_rest); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("132", ["1d", "17"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (_ref) { - var t = _ref.types; - - function variableDeclarationHasPattern(node) { - for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var declar = _ref2; - - if (t.isPattern(declar.id)) { - return true; - } - } - return false; - } - - function hasRest(pattern) { - for (var _iterator2 = pattern.elements, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var elem = _ref3; - - if (t.isRestElement(elem)) { - return true; - } - } - return false; - } - - var arrayUnpackVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (state.bindings[path.node.name]) { - state.deopt = true; - path.stop(); - } - } - }; - - var DestructuringTransformer = function () { - function DestructuringTransformer(opts) { - (0, _classCallCheck3.default)(this, DestructuringTransformer); - - this.blockHoist = opts.blockHoist; - this.operator = opts.operator; - this.arrays = {}; - this.nodes = opts.nodes || []; - this.scope = opts.scope; - this.file = opts.file; - this.kind = opts.kind; - } - - DestructuringTransformer.prototype.buildVariableAssignment = function buildVariableAssignment(id, init) { - var op = this.operator; - if (t.isMemberExpression(id)) op = "="; - - var node = void 0; - - if (op) { - node = t.expressionStatement(t.assignmentExpression(op, id, init)); - } else { - node = t.variableDeclaration(this.kind, [t.variableDeclarator(id, init)]); - } - - node._blockHoist = this.blockHoist; - - return node; - }; - - DestructuringTransformer.prototype.buildVariableDeclaration = function buildVariableDeclaration(id, init) { - var declar = t.variableDeclaration("var", [t.variableDeclarator(id, init)]); - declar._blockHoist = this.blockHoist; - return declar; - }; - - DestructuringTransformer.prototype.push = function push(id, init) { - if (t.isObjectPattern(id)) { - this.pushObjectPattern(id, init); - } else if (t.isArrayPattern(id)) { - this.pushArrayPattern(id, init); - } else if (t.isAssignmentPattern(id)) { - this.pushAssignmentPattern(id, init); - } else { - this.nodes.push(this.buildVariableAssignment(id, init)); - } - }; - - DestructuringTransformer.prototype.toArray = function toArray(node, count) { - if (this.file.opts.loose || t.isIdentifier(node) && this.arrays[node.name]) { - return node; - } else { - return this.scope.toArray(node, count); - } - }; - - DestructuringTransformer.prototype.pushAssignmentPattern = function pushAssignmentPattern(pattern, valueRef) { - - var tempValueRef = this.scope.generateUidIdentifierBasedOnNode(valueRef); - - var declar = t.variableDeclaration("var", [t.variableDeclarator(tempValueRef, valueRef)]); - declar._blockHoist = this.blockHoist; - this.nodes.push(declar); - - var tempConditional = t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef); - - var left = pattern.left; - if (t.isPattern(left)) { - var tempValueDefault = t.expressionStatement(t.assignmentExpression("=", tempValueRef, tempConditional)); - tempValueDefault._blockHoist = this.blockHoist; - - this.nodes.push(tempValueDefault); - this.push(left, tempValueRef); - } else { - this.nodes.push(this.buildVariableAssignment(left, tempConditional)); - } - }; - - DestructuringTransformer.prototype.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) { - - var keys = []; - - for (var i = 0; i < pattern.properties.length; i++) { - var prop = pattern.properties[i]; - - if (i >= spreadPropIndex) break; - - if (t.isRestProperty(prop)) continue; - - var key = prop.key; - if (t.isIdentifier(key) && !prop.computed) key = t.stringLiteral(prop.key.name); - keys.push(key); - } - - keys = t.arrayExpression(keys); - - var value = t.callExpression(this.file.addHelper("objectWithoutProperties"), [objRef, keys]); - this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value)); - }; - - DestructuringTransformer.prototype.pushObjectProperty = function pushObjectProperty(prop, propRef) { - if (t.isLiteral(prop.key)) prop.computed = true; - - var pattern = prop.value; - var objRef = t.memberExpression(propRef, prop.key, prop.computed); - - if (t.isPattern(pattern)) { - this.push(pattern, objRef); - } else { - this.nodes.push(this.buildVariableAssignment(pattern, objRef)); - } - }; - - DestructuringTransformer.prototype.pushObjectPattern = function pushObjectPattern(pattern, objRef) { - - if (!pattern.properties.length) { - this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("objectDestructuringEmpty"), [objRef]))); - } - - if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) { - var temp = this.scope.generateUidIdentifierBasedOnNode(objRef); - this.nodes.push(this.buildVariableDeclaration(temp, objRef)); - objRef = temp; - } - - for (var i = 0; i < pattern.properties.length; i++) { - var prop = pattern.properties[i]; - if (t.isRestProperty(prop)) { - this.pushObjectRest(pattern, objRef, prop, i); - } else { - this.pushObjectProperty(prop, objRef); - } - } - }; - - DestructuringTransformer.prototype.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) { - if (!t.isArrayExpression(arr)) return false; - - if (pattern.elements.length > arr.elements.length) return; - if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) return false; - - for (var _iterator3 = pattern.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var elem = _ref4; - - if (!elem) return false; - - if (t.isMemberExpression(elem)) return false; - } - - for (var _iterator4 = arr.elements, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref5; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; - } - - var _elem = _ref5; - - if (t.isSpreadElement(_elem)) return false; - - if (t.isCallExpression(_elem)) return false; - - if (t.isMemberExpression(_elem)) return false; - } - - var bindings = t.getBindingIdentifiers(pattern); - var state = { deopt: false, bindings: bindings }; - this.scope.traverse(arr, arrayUnpackVisitor, state); - return !state.deopt; - }; - - DestructuringTransformer.prototype.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) { - for (var i = 0; i < pattern.elements.length; i++) { - var elem = pattern.elements[i]; - if (t.isRestElement(elem)) { - this.push(elem.argument, t.arrayExpression(arr.elements.slice(i))); - } else { - this.push(elem, arr.elements[i]); - } - } - }; - - DestructuringTransformer.prototype.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) { - if (!pattern.elements) return; - - if (this.canUnpackArrayPattern(pattern, arrayRef)) { - return this.pushUnpackedArrayPattern(pattern, arrayRef); - } - - var count = !hasRest(pattern) && pattern.elements.length; - - var toArray = this.toArray(arrayRef, count); - - if (t.isIdentifier(toArray)) { - arrayRef = toArray; - } else { - arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef); - this.arrays[arrayRef.name] = true; - this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray)); - } - - for (var i = 0; i < pattern.elements.length; i++) { - var elem = pattern.elements[i]; - - if (!elem) continue; - - var elemRef = void 0; - - if (t.isRestElement(elem)) { - elemRef = this.toArray(arrayRef); - elemRef = t.callExpression(t.memberExpression(elemRef, t.identifier("slice")), [t.numericLiteral(i)]); - - elem = elem.argument; - } else { - elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true); - } - - this.push(elem, elemRef); - } - }; - - DestructuringTransformer.prototype.init = function init(pattern, ref) { - - if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) { - var memo = this.scope.maybeGenerateMemoised(ref, true); - if (memo) { - this.nodes.push(this.buildVariableDeclaration(memo, ref)); - ref = memo; - } - } - - this.push(pattern, ref); - - return this.nodes; - }; - - return DestructuringTransformer; - }(); - - return { - visitor: { - ExportNamedDeclaration: function ExportNamedDeclaration(path) { - var declaration = path.get("declaration"); - if (!declaration.isVariableDeclaration()) return; - if (!variableDeclarationHasPattern(declaration.node)) return; - - var specifiers = []; - - for (var name in path.getOuterBindingIdentifiers(path)) { - var id = t.identifier(name); - specifiers.push(t.exportSpecifier(id, id)); - } - - path.replaceWith(declaration.node); - path.insertAfter(t.exportNamedDeclaration(null, specifiers)); - }, - ForXStatement: function ForXStatement(path, file) { - var node = path.node, - scope = path.scope; - - var left = node.left; - - if (t.isPattern(left)) { - - var temp = scope.generateUidIdentifier("ref"); - - node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]); - - path.ensureBlock(); - - node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)])); - - return; - } - - if (!t.isVariableDeclaration(left)) return; - - var pattern = left.declarations[0].id; - if (!t.isPattern(pattern)) return; - - var key = scope.generateUidIdentifier("ref"); - node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]); - - var nodes = []; - - var destructuring = new DestructuringTransformer({ - kind: left.kind, - file: file, - scope: scope, - nodes: nodes - }); - - destructuring.init(pattern, key); - - path.ensureBlock(); - - var block = node.body; - block.body = nodes.concat(block.body); - }, - CatchClause: function CatchClause(_ref6, file) { - var node = _ref6.node, - scope = _ref6.scope; - - var pattern = node.param; - if (!t.isPattern(pattern)) return; - - var ref = scope.generateUidIdentifier("ref"); - node.param = ref; - - var nodes = []; - - var destructuring = new DestructuringTransformer({ - kind: "let", - file: file, - scope: scope, - nodes: nodes - }); - destructuring.init(pattern, ref); - - node.body.body = nodes.concat(node.body.body); - }, - AssignmentExpression: function AssignmentExpression(path, file) { - var node = path.node, - scope = path.scope; - - if (!t.isPattern(node.left)) return; - - var nodes = []; - - var destructuring = new DestructuringTransformer({ - operator: node.operator, - file: file, - scope: scope, - nodes: nodes - }); - - var ref = void 0; - if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) { - ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref"); - - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, node.right)])); - - if (t.isArrayExpression(node.right)) { - destructuring.arrays[ref.name] = true; - } - } - - destructuring.init(node.left, ref || node.right); - - if (ref) { - nodes.push(t.expressionStatement(ref)); - } - - path.replaceWithMultiple(nodes); - }, - VariableDeclaration: function VariableDeclaration(path, file) { - var node = path.node, - scope = path.scope, - parent = path.parent; - - if (t.isForXStatement(parent)) return; - if (!parent || !path.container) return; - if (!variableDeclarationHasPattern(node)) return; - - var nodes = []; - var declar = void 0; - - for (var i = 0; i < node.declarations.length; i++) { - declar = node.declarations[i]; - - var patternId = declar.init; - var pattern = declar.id; - - var destructuring = new DestructuringTransformer({ - blockHoist: node._blockHoist, - nodes: nodes, - scope: scope, - kind: node.kind, - file: file - }); - - if (t.isPattern(pattern)) { - destructuring.init(pattern, patternId); - - if (+i !== node.declarations.length - 1) { - t.inherits(nodes[nodes.length - 1], declar); - } - } else { - nodes.push(t.inherits(destructuring.buildVariableAssignment(declar.id, declar.init), declar)); - } - } - - var nodesOut = []; - for (var _iterator5 = nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref7; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref7 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref7 = _i5.value; - } - - var _node = _ref7; - - var tail = nodesOut[nodesOut.length - 1]; - if (tail && t.isVariableDeclaration(tail) && t.isVariableDeclaration(_node) && tail.kind === _node.kind) { - var _tail$declarations; - - (_tail$declarations = tail.declarations).push.apply(_tail$declarations, _node.declarations); - } else { - nodesOut.push(_node); - } - } - - for (var _iterator6 = nodesOut, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref8; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref8 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref8 = _i6.value; - } - - var nodeOut = _ref8; - - if (!nodeOut.declarations) continue; - for (var _iterator7 = nodeOut.declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref9; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref9 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref9 = _i7.value; - } - - var declaration = _ref9; - var name = declaration.id.name; - - if (scope.bindings[name]) { - scope.bindings[name].kind = nodeOut.kind; - } - } - } - - if (nodesOut.length === 1) { - path.replaceWith(nodesOut[0]); - } else { - path.replaceWithMultiple(nodesOut); - } - } - } - }; - }; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - module.exports = exports["default"]; -}); -$__System.registerDynamic("133", ["11"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.visitor = undefined; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function getTDZStatus(refPath, bindingPath) { - var executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath); - - if (executionStatus === "before") { - return "inside"; - } else if (executionStatus === "after") { - return "outside"; - } else { - return "maybe"; - } - } - - function buildTDZAssert(node, file) { - return t.callExpression(file.addHelper("temporalRef"), [node, t.stringLiteral(node.name), file.addHelper("temporalUndefined")]); - } - - function isReference(node, scope, state) { - var declared = state.letReferences[node.name]; - if (!declared) return false; - - return scope.getBindingIdentifier(node.name) === declared; - } - - var visitor = exports.visitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (!this.file.opts.tdz) return; - - var node = path.node, - parent = path.parent, - scope = path.scope; - - if (path.parentPath.isFor({ left: node })) return; - if (!isReference(node, scope, state)) return; - - var bindingPath = scope.getBinding(node.name).path; - - var status = getTDZStatus(path, bindingPath); - if (status === "inside") return; - - if (status === "maybe") { - var assert = buildTDZAssert(node, state.file); - - bindingPath.parent._tdzThis = true; - - path.skip(); - - if (path.parentPath.isUpdateExpression()) { - if (parent._ignoreBlockScopingTDZ) return; - path.parentPath.replaceWith(t.sequenceExpression([assert, parent])); - } else { - path.replaceWith(assert); - } - } else if (status === "outside") { - path.replaceWith(t.throwStatement(t.inherits(t.newExpression(t.identifier("ReferenceError"), [t.stringLiteral(node.name + " is not defined - temporal dead zone")]), node))); - } - }, - - AssignmentExpression: { - exit: function exit(path, state) { - if (!this.file.opts.tdz) return; - - var node = path.node; - - if (node._ignoreBlockScopingTDZ) return; - - var nodes = []; - var ids = path.getBindingIdentifiers(); - - for (var name in ids) { - var id = ids[name]; - - if (isReference(id, path.scope, state)) { - nodes.push(buildTDZAssert(id, state.file)); - } - } - - if (nodes.length) { - node._ignoreBlockScopingTDZ = true; - nodes.push(node); - path.replaceWithMultiple(nodes.map(t.expressionStatement)); - } - } - } - }; -}); -$__System.registerDynamic('134', ['b7', 'c2', 'b8'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var copyObject = $__require('b7'), - createAssigner = $__require('c2'), - keysIn = $__require('b8'); - - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ - var assignIn = createAssigner(function (object, source) { - copyObject(source, keysIn(source), object); - }); - - module.exports = assignIn; -}); -$__System.registerDynamic('135', ['134'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - module.exports = $__require('134'); -}); -$__System.registerDynamic('136', ['b1'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseClone = $__require('b1'); - - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - - /** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ - function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); - } - - module.exports = cloneDeep; -}); -$__System.registerDynamic("137", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** Used for built-in method references. */ - var objectProto = Object.prototype; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); - } - - module.exports = baseHas; -}); -$__System.registerDynamic('83', ['4b', '90'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var isArray = $__require('4b'), - isSymbol = $__require('90'); - - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); - } - - module.exports = isKey; -}); -$__System.registerDynamic('138', ['139'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var MapCache = $__require('139'); - - /** Error message constants. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ - function memoize(func, resolver) { - if (typeof func != 'function' || resolver != null && typeof resolver != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function () { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache)(); - return memoized; - } - - // Expose `MapCache`. - memoize.Cache = MapCache; - - module.exports = memoize; -}); -$__System.registerDynamic('13a', ['138'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var memoize = $__require('138'); - - /** Used as the maximum memoize cache size. */ - var MAX_MEMOIZE_SIZE = 500; - - /** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ - function memoizeCapped(func) { - var result = memoize(func, function (key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; - } - - module.exports = memoizeCapped; -}); -$__System.registerDynamic('13b', ['13a'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var memoizeCapped = $__require('13a'); - - /** Used to match property names within property paths. */ - var reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; - - /** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ - var stringToPath = memoizeCapped(function (string) { - var result = []; - if (reLeadingDot.test(string)) { - result.push(''); - } - string.replace(rePropName, function (match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : number || match); - }); - return result; - }); - - module.exports = stringToPath; -}); -$__System.registerDynamic('86', ['4b', '83', '13b', '9b'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var isArray = $__require('4b'), - isKey = $__require('83'), - stringToPath = $__require('13b'), - toString = $__require('9b'); - - /** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ - function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); - } - - module.exports = castPath; -}); -$__System.registerDynamic('84', ['90'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var isSymbol = $__require('90'); - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0; - - /** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ - function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = value + ''; - return result == '0' && 1 / value == -INFINITY ? '-0' : result; - } - - module.exports = toKey; -}); -$__System.registerDynamic('80', ['86', '62', '4b', '13c', '13d', '84'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var castPath = $__require('86'), - isArguments = $__require('62'), - isArray = $__require('4b'), - isIndex = $__require('13c'), - isLength = $__require('13d'), - toKey = $__require('84'); - - /** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ - function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); - } - - module.exports = hasPath; -}); -$__System.registerDynamic('114', ['137', '80'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseHas = $__require('137'), - hasPath = $__require('80'); - - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - function has(object, path) { - return object != null && hasPath(object, path, baseHas); - } - - module.exports = has; -}); -$__System.registerDynamic("13e", ["1d", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var Hub = function Hub(file, options) { - (0, _classCallCheck3.default)(this, Hub); - - this.file = file; - this.options = options; - }; - - exports.default = Hub; - module.exports = exports["default"]; -}); -$__System.registerDynamic('13f', [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * Helpers. - */ - - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var y = d * 365.25; - - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - - module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); - }; - - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - - function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } - } - - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - function fmtShort(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; - } - - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - function fmtLong(ms) { - return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms'; - } - - /** - * Pluralization helper. - */ - - function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; - } -}); -$__System.registerDynamic('140', ['13f'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - - exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; - exports.coerce = coerce; - exports.disable = disable; - exports.enable = enable; - exports.enabled = enabled; - exports.humanize = $__require('13f'); - - /** - * The currently active debug mode names, and names to skip. - */ - - exports.names = []; - exports.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - - exports.formatters = {}; - - /** - * Previous log timestamp. - */ - - var prevTime; - - /** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - - function selectColor(namespace) { - var hash = 0, - i; - - for (i in namespace) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; - } - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - - function createDebug(namespace) { - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - return debug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - - function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @api public - */ - - function disable() { - exports.enable(''); - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - - function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - - function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; - } -}); -$__System.registerDynamic('5e', ['@node/tty', '@node/util', '140', '@node/fs', '@node/net'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * Module dependencies. - */ - - var tty = $__require('@node/tty'); - var util = $__require('@node/util'); - - /** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - - exports = module.exports = $__require('140'); - exports.init = init; - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - - /** - * Colors. - */ - - exports.colors = [6, 2, 3, 4, 5, 1]; - - /** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - - exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return (/^debug_/i.test(key) - ); - }).reduce(function (obj, key) { - // camel-case - var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) { - return k.toUpperCase(); - }); - - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true;else if (/^(no|off|false|disabled)$/i.test(val)) val = false;else if (val === 'null') val = null;else val = Number(val); - - obj[prop] = val; - return obj; - }, {}); - - /** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - - var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - - if (1 !== fd && 2 !== fd) { - util.deprecate(function () {}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')(); - } - - var stream = 1 === fd ? process.stdout : 2 === fd ? process.stderr : createWritableStdioStream(fd); - - /** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - - function useColors() { - return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(fd); - } - - /** - * Map %o to `util.inspect()`, all on a single line. - */ - - exports.formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' '); - }; - - /** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - - exports.formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); - }; - - /** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - - function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; - - if (useColors) { - var c = this.color; - var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = new Date().toUTCString() + ' ' + name + ' ' + args[0]; - } - } - - /** - * Invokes `util.format()` with the specified arguments and writes to `stream`. - */ - - function log() { - return stream.write(util.format.apply(util, arguments) + '\n'); - } - - /** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } - } - - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - function load() { - return process.env.DEBUG; - } - - /** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - - function createWritableStdioStream(fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = $__require('@node/fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = $__require('@node/net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; - } - - /** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - - function init(debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } - } - - /** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - - exports.enable(load()); -}); -$__System.registerDynamic('141', ['c'], true, function ($__require, exports, module) { - /** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - 'use strict'; - - /** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var NODE_ENV = 'production'; - - var invariant = function (condition, format, a, b, c, d, e, f) { - if (NODE_ENV !== 'production') { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } - }; - - module.exports = invariant; -}); -$__System.registerDynamic('d1', ['142', 'b7', 'c2', '3f', '143', '40'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var assignValue = $__require('142'), - copyObject = $__require('b7'), - createAssigner = $__require('c2'), - isArrayLike = $__require('3f'), - isPrototype = $__require('143'), - keys = $__require('40'); - - /** Used for built-in method references. */ - var objectProto = Object.prototype; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ - var assign = createAssigner(function (object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } - }); - - module.exports = assign; -}); -$__System.registerDynamic('144', [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** Used as references for various `Number` constants. */ - var MAX_SAFE_INTEGER = 9007199254740991; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeFloor = Math.floor; - - /** - * The base implementation of `_.repeat` which doesn't coerce arguments. - * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. - */ - function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - - return result; - } - - module.exports = baseRepeat; -}); -$__System.registerDynamic('9e', ['61', '49', '4b', '90'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var Symbol = $__require('61'), - arrayMap = $__require('49'), - isArray = $__require('4b'), - isSymbol = $__require('90'); - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0; - - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = value + ''; - return result == '0' && 1 / value == -INFINITY ? '-0' : result; - } - - module.exports = baseToString; -}); -$__System.registerDynamic('9b', ['9e'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseToString = $__require('9e'); - - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - return value == null ? '' : baseToString(value); - } - - module.exports = toString; -}); -$__System.registerDynamic('5c', ['144', '96', '3c', '9b'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseRepeat = $__require('144'), - isIterateeCall = $__require('96'), - toInteger = $__require('3c'), - toString = $__require('9b'); - - /** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=1] The number of times to repeat the string. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ - function repeat(string, n, guard) { - if (guard ? isIterateeCall(string, n, guard) : n === undefined) { - n = 1; - } else { - n = toInteger(n); - } - return baseRepeat(toString(string), n); - } - - module.exports = repeat; -}); -$__System.registerDynamic("145", ["1d", "146", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _binding = $__require("146"); - - var _binding2 = _interopRequireDefault(_binding); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var renameVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { - var node = _ref.node; - - if (node.name === state.oldName) { - node.name = state.newName; - } - }, - Scope: function Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { - path.skip(); - } - }, - "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) { - var ids = path.getOuterBindingIdentifiers(); - - for (var name in ids) { - if (name === state.oldName) ids[name].name = state.newName; - } - } - }; - - var Renamer = function () { - function Renamer(binding, oldName, newName) { - (0, _classCallCheck3.default)(this, Renamer); - - this.newName = newName; - this.oldName = oldName; - this.binding = binding; - } - - Renamer.prototype.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { - var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath; - if (!exportDeclar) return; - - var isDefault = exportDeclar.isExportDefaultDeclaration(); - - if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) { - parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default"); - } - - var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers(); - var specifiers = []; - - for (var name in bindingIdentifiers) { - var localName = name === this.oldName ? this.newName : name; - var exportedName = isDefault ? "default" : name; - specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName))); - } - - if (specifiers.length) { - var aliasDeclar = t.exportNamedDeclaration(null, specifiers); - - if (parentDeclar.isFunctionDeclaration()) { - aliasDeclar._blockHoist = 3; - } - - exportDeclar.insertAfter(aliasDeclar); - exportDeclar.replaceWith(parentDeclar.node); - } - }; - - Renamer.prototype.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) { - return; - - if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; - if (this.binding.kind !== "hoisted") return; - - path.node.id = t.identifier(this.oldName); - path.node._blockHoist = 3; - - path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.identifier(this.newName), t.toExpression(path.node))])); - }; - - Renamer.prototype.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) { - return; - - if (!path.isFunctionExpression() && !path.isClassExpression()) return; - if (this.binding.kind !== "local") return; - - path.node.id = t.identifier(this.oldName); - - this.binding.scope.parent.push({ - id: t.identifier(this.newName) - }); - - path.replaceWith(t.assignmentExpression("=", t.identifier(this.newName), path.node)); - }; - - Renamer.prototype.rename = function rename(block) { - var binding = this.binding, - oldName = this.oldName, - newName = this.newName; - var scope = binding.scope, - path = binding.path; - - var parentDeclar = path.find(function (path) { - return path.isDeclaration() || path.isFunctionExpression(); - }); - if (parentDeclar) { - this.maybeConvertFromExportDeclaration(parentDeclar); - } - - scope.traverse(block || scope.block, renameVisitor, this); - - if (!block) { - scope.removeOwnBinding(oldName); - scope.bindings[newName] = binding; - this.binding.identifier.name = newName; - } - - if (binding.type === "hoisted") {} - - if (parentDeclar) { - this.maybeConvertFromClassFunctionDeclaration(parentDeclar); - this.maybeConvertFromClassFunctionExpression(parentDeclar); - } - }; - - return Renamer; - }(); - - exports.default = Renamer; - module.exports = exports["default"]; -}); -$__System.registerDynamic('96', ['72', '3f', '13c', '81'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var eq = $__require('72'), - isArrayLike = $__require('3f'), - isIndex = $__require('13c'), - isObject = $__require('81'); - - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) { - return eq(object[index], value); - } - return false; - } - - module.exports = isIterateeCall; -}); -$__System.registerDynamic('c2', ['95', '96'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseRest = $__require('95'), - isIterateeCall = $__require('96'); - - /** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return baseRest(function (object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); - } - - module.exports = createAssigner; -}); -$__System.registerDynamic('147', ['b7', 'c2', 'b8'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var copyObject = $__require('b7'), - createAssigner = $__require('c2'), - keysIn = $__require('b8'); - - /** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var assignInWith = createAssigner(function (object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); - }); - - module.exports = assignInWith; -}); -$__System.registerDynamic("148", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ - function apply(func, thisArg, args) { - switch (args.length) { - case 0: - return func.call(thisArg); - case 1: - return func.call(thisArg, args[0]); - case 2: - return func.call(thisArg, args[0], args[1]); - case 3: - return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); - } - - module.exports = apply; -}); -$__System.registerDynamic('149', ['148'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var apply = $__require('148'); - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeMax = Math.max; - - /** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? func.length - 1 : start, 0); - return function () { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; - } - - module.exports = overRest; -}); -$__System.registerDynamic("14a", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ - function constant(value) { - return function () { - return value; - }; - } - - module.exports = constant; -}); -$__System.registerDynamic("89", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ - function identity(value) { - return value; - } - - module.exports = identity; -}); -$__System.registerDynamic('14b', ['14a', '14c', '89'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var constant = $__require('14a'), - defineProperty = $__require('14c'), - identity = $__require('89'); - - /** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var baseSetToString = !defineProperty ? identity : function (func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); - }; - - module.exports = baseSetToString; -}); -$__System.registerDynamic("14d", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 800, - HOT_SPAN = 16; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeNow = Date.now; - - /** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ - function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function () { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; - } - - module.exports = shortOut; -}); -$__System.registerDynamic('14e', ['14b', '14d'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseSetToString = $__require('14b'), - shortOut = $__require('14d'); - - /** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var setToString = shortOut(baseSetToString); - - module.exports = setToString; -}); -$__System.registerDynamic('95', ['89', '149', '14e'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var identity = $__require('89'), - overRest = $__require('149'), - setToString = $__require('14e'); - - /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); - } - - module.exports = baseRest; -}); -$__System.registerDynamic('14f', ['72'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var eq = $__require('72'); - - /** Used for built-in method references. */ - var objectProto = Object.prototype; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ - function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) { - return srcValue; - } - return objValue; - } - - module.exports = customDefaultsAssignIn; -}); -$__System.registerDynamic('d6', ['148', '147', '95', '14f'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var apply = $__require('148'), - assignInWith = $__require('147'), - baseRest = $__require('95'), - customDefaultsAssignIn = $__require('14f'); - - /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var defaults = baseRest(function (args) { - args.push(undefined, customDefaultsAssignIn); - return apply(assignInWith, undefined, args); - }); - - module.exports = defaults; -}); -$__System.registerDynamic("146", ["1d", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var Binding = function () { - function Binding(_ref) { - var existing = _ref.existing, - identifier = _ref.identifier, - scope = _ref.scope, - path = _ref.path, - kind = _ref.kind; - (0, _classCallCheck3.default)(this, Binding); - - this.identifier = identifier; - this.scope = scope; - this.path = path; - this.kind = kind; - - this.constantViolations = []; - this.constant = true; - - this.referencePaths = []; - this.referenced = false; - this.references = 0; - - this.clearValue(); - - if (existing) { - this.constantViolations = [].concat(existing.path, existing.constantViolations, this.constantViolations); - } - } - - Binding.prototype.deoptValue = function deoptValue() { - this.clearValue(); - this.hasDeoptedValue = true; - }; - - Binding.prototype.setValue = function setValue(value) { - if (this.hasDeoptedValue) return; - this.hasValue = true; - this.value = value; - }; - - Binding.prototype.clearValue = function clearValue() { - this.hasDeoptedValue = false; - this.hasValue = false; - this.value = null; - }; - - Binding.prototype.reassign = function reassign(path) { - this.constant = false; - if (this.constantViolations.indexOf(path) !== -1) { - return; - } - this.constantViolations.push(path); - }; - - Binding.prototype.reference = function reference(path) { - if (this.referencePaths.indexOf(path) !== -1) { - return; - } - this.referenced = true; - this.references++; - this.referencePaths.push(path); - }; - - Binding.prototype.dereference = function dereference() { - this.references--; - this.referenced = !!this.references; - }; - - return Binding; - }(); - - exports.default = Binding; - module.exports = exports["default"]; -}); -$__System.registerDynamic("150", [], true, function() { - return { - "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 - } - }; -}); - -$__System.registerDynamic('151', ['150'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - module.exports = $__require('150'); -}); -$__System.registerDynamic("152", ["15", "d4", "cf", "1d", "17", "a5", "5c", "145", "d0", "d6", "f", "146", "151", "11", "153", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _keys = $__require("15"); - - var _keys2 = _interopRequireDefault(_keys); - - var _create = $__require("d4"); - - var _create2 = _interopRequireDefault(_create); - - var _map = $__require("cf"); - - var _map2 = _interopRequireDefault(_map); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _includes = $__require("a5"); - - var _includes2 = _interopRequireDefault(_includes); - - var _repeat = $__require("5c"); - - var _repeat2 = _interopRequireDefault(_repeat); - - var _renamer = $__require("145"); - - var _renamer2 = _interopRequireDefault(_renamer); - - var _index = $__require("d0"); - - var _index2 = _interopRequireDefault(_index); - - var _defaults = $__require("d6"); - - var _defaults2 = _interopRequireDefault(_defaults); - - var _babelMessages = $__require("f"); - - var messages = _interopRequireWildcard(_babelMessages); - - var _binding2 = $__require("146"); - - var _binding3 = _interopRequireDefault(_binding2); - - var _globals = $__require("151"); - - var _globals2 = _interopRequireDefault(_globals); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _cache = $__require("153"); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var _crawlCallsCount = 0; - - function getCache(path, parentScope, self) { - var scopes = _cache.scope.get(path.node) || []; - - for (var _iterator = scopes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var scope = _ref; - - if (scope.parent === parentScope && scope.path === path) return scope; - } - - scopes.push(self); - - if (!_cache.scope.has(path.node)) { - _cache.scope.set(path.node, scopes); - } - } - - function gatherNodeParts(node, parts) { - if (t.isModuleDeclaration(node)) { - if (node.source) { - gatherNodeParts(node.source, parts); - } else if (node.specifiers && node.specifiers.length) { - for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var specifier = _ref2; - - gatherNodeParts(specifier, parts); - } - } else if (node.declaration) { - gatherNodeParts(node.declaration, parts); - } - } else if (t.isModuleSpecifier(node)) { - gatherNodeParts(node.local, parts); - } else if (t.isMemberExpression(node)) { - gatherNodeParts(node.object, parts); - gatherNodeParts(node.property, parts); - } else if (t.isIdentifier(node)) { - parts.push(node.name); - } else if (t.isLiteral(node)) { - parts.push(node.value); - } else if (t.isCallExpression(node)) { - gatherNodeParts(node.callee, parts); - } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) { - for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var prop = _ref3; - - gatherNodeParts(prop.key || prop.argument, parts); - } - } - } - - var collectorVisitor = { - For: function For(path) { - for (var _iterator4 = t.FOR_INIT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var key = _ref4; - - var declar = path.get(key); - if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar); - } - }, - Declaration: function Declaration(path) { - if (path.isBlockScoped()) return; - - if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) return; - - path.scope.getFunctionParent().registerDeclaration(path); - }, - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - state.references.push(path); - }, - ForXStatement: function ForXStatement(path, state) { - var left = path.get("left"); - if (left.isPattern() || left.isIdentifier()) { - state.constantViolations.push(left); - } - }, - - ExportDeclaration: { - exit: function exit(path) { - var node = path.node, - scope = path.scope; - - var declar = node.declaration; - if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) { - var _id = declar.id; - if (!_id) return; - - var binding = scope.getBinding(_id.name); - if (binding) binding.reference(path); - } else if (t.isVariableDeclaration(declar)) { - for (var _iterator5 = declar.declarations, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var decl = _ref5; - - var ids = t.getBindingIdentifiers(decl); - for (var name in ids) { - var _binding = scope.getBinding(name); - if (_binding) _binding.reference(path); - } - } - } - } - }, - - LabeledStatement: function LabeledStatement(path) { - path.scope.getProgramParent().addGlobal(path.node); - path.scope.getBlockParent().registerDeclaration(path); - }, - AssignmentExpression: function AssignmentExpression(path, state) { - state.assignments.push(path); - }, - UpdateExpression: function UpdateExpression(path, state) { - state.constantViolations.push(path.get("argument")); - }, - UnaryExpression: function UnaryExpression(path, state) { - if (path.node.operator === "delete") { - state.constantViolations.push(path.get("argument")); - } - }, - BlockScoped: function BlockScoped(path) { - var scope = path.scope; - if (scope.path === path) scope = scope.parent; - scope.getBlockParent().registerDeclaration(path); - }, - ClassDeclaration: function ClassDeclaration(path) { - var id = path.node.id; - if (!id) return; - - var name = id.name; - path.scope.bindings[name] = path.scope.getBinding(name); - }, - Block: function Block(path) { - var paths = path.get("body"); - for (var _iterator6 = paths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref6; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref6 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref6 = _i6.value; - } - - var bodyPath = _ref6; - - if (bodyPath.isFunctionDeclaration()) { - path.scope.getBlockParent().registerDeclaration(bodyPath); - } - } - } - }; - - var uid = 0; - - var Scope = function () { - function Scope(path, parentScope) { - (0, _classCallCheck3.default)(this, Scope); - - if (parentScope && parentScope.block === path.node) { - return parentScope; - } - - var cached = getCache(path, parentScope, this); - if (cached) return cached; - - this.uid = uid++; - this.parent = parentScope; - this.hub = path.hub; - - this.parentBlock = path.parent; - this.block = path.node; - this.path = path; - - this.labels = new _map2.default(); - } - - Scope.prototype.traverse = function traverse(node, opts, state) { - (0, _index2.default)(node, opts, this, state, this.path); - }; - - Scope.prototype.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - - var id = this.generateUidIdentifier(name); - this.push({ id: id }); - return id; - }; - - Scope.prototype.generateUidIdentifier = function generateUidIdentifier() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - - return t.identifier(this.generateUid(name)); - }; - - Scope.prototype.generateUid = function generateUid() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - - name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); - - var uid = void 0; - var i = 0; - do { - uid = this._generateUid(name, i); - i++; - } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); - - var program = this.getProgramParent(); - program.references[uid] = true; - program.uids[uid] = true; - - return uid; - }; - - Scope.prototype._generateUid = function _generateUid(name, i) { - var id = name; - if (i > 1) id += i; - return "_" + id; - }; - - Scope.prototype.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) { - var node = parent; - - if (t.isAssignmentExpression(parent)) { - node = parent.left; - } else if (t.isVariableDeclarator(parent)) { - node = parent.id; - } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) { - node = node.key; - } - - var parts = []; - gatherNodeParts(node, parts); - - var id = parts.join("$"); - id = id.replace(/^_/, "") || defaultName || "ref"; - - return this.generateUidIdentifier(id.slice(0, 20)); - }; - - Scope.prototype.isStatic = function isStatic(node) { - if (t.isThisExpression(node) || t.isSuper(node)) { - return true; - } - - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (binding) { - return binding.constant; - } else { - return this.hasBinding(node.name); - } - } - - return false; - }; - - Scope.prototype.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) { - if (this.isStatic(node)) { - return null; - } else { - var _id2 = this.generateUidIdentifierBasedOnNode(node); - if (!dontPush) this.push({ id: _id2 }); - return _id2; - } - }; - - Scope.prototype.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) { - if (kind === "param") return; - - if (kind === "hoisted" && local.kind === "let") return; - - var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); - - if (duplicate) { - throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError); - } - }; - - Scope.prototype.rename = function rename(oldName, newName, block) { - var binding = this.getBinding(oldName); - if (binding) { - newName = newName || this.generateUidIdentifier(oldName).name; - return new _renamer2.default(binding, oldName, newName).rename(block); - } - }; - - Scope.prototype._renameFromMap = function _renameFromMap(map, oldName, newName, value) { - if (map[oldName]) { - map[newName] = value; - map[oldName] = null; - } - }; - - Scope.prototype.dump = function dump() { - var sep = (0, _repeat2.default)("-", 60); - console.log(sep); - var scope = this; - do { - console.log("#", scope.block.type); - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - console.log(" -", name, { - constant: binding.constant, - references: binding.references, - violations: binding.constantViolations.length, - kind: binding.kind - }); - } - } while (scope = scope.parent); - console.log(sep); - }; - - Scope.prototype.toArray = function toArray(node, i) { - var file = this.hub.file; - - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (binding && binding.constant && binding.path.isGenericType("Array")) return node; - } - - if (t.isArrayExpression(node)) { - return node; - } - - if (t.isIdentifier(node, { name: "arguments" })) { - return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]); - } - - var helperName = "toArray"; - var args = [node]; - if (i === true) { - helperName = "toConsumableArray"; - } else if (i) { - args.push(t.numericLiteral(i)); - helperName = "slicedToArray"; - } - return t.callExpression(file.addHelper(helperName), args); - }; - - Scope.prototype.hasLabel = function hasLabel(name) { - return !!this.getLabel(name); - }; - - Scope.prototype.getLabel = function getLabel(name) { - return this.labels.get(name); - }; - - Scope.prototype.registerLabel = function registerLabel(path) { - this.labels.set(path.node.label.name, path); - }; - - Scope.prototype.registerDeclaration = function registerDeclaration(path) { - if (path.isLabeledStatement()) { - this.registerLabel(path); - } else if (path.isFunctionDeclaration()) { - this.registerBinding("hoisted", path.get("id"), path); - } else if (path.isVariableDeclaration()) { - var declarations = path.get("declarations"); - for (var _iterator7 = declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref7; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref7 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref7 = _i7.value; - } - - var declar = _ref7; - - this.registerBinding(path.node.kind, declar); - } - } else if (path.isClassDeclaration()) { - this.registerBinding("let", path); - } else if (path.isImportDeclaration()) { - var specifiers = path.get("specifiers"); - for (var _iterator8 = specifiers, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { - var _ref8; - - if (_isArray8) { - if (_i8 >= _iterator8.length) break; - _ref8 = _iterator8[_i8++]; - } else { - _i8 = _iterator8.next(); - if (_i8.done) break; - _ref8 = _i8.value; - } - - var specifier = _ref8; - - this.registerBinding("module", specifier); - } - } else if (path.isExportDeclaration()) { - var _declar = path.get("declaration"); - if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) { - this.registerDeclaration(_declar); - } - } else { - this.registerBinding("unknown", path); - } - }; - - Scope.prototype.buildUndefinedNode = function buildUndefinedNode() { - if (this.hasBinding("undefined")) { - return t.unaryExpression("void", t.numericLiteral(0), true); - } else { - return t.identifier("undefined"); - } - }; - - Scope.prototype.registerConstantViolation = function registerConstantViolation(path) { - var ids = path.getBindingIdentifiers(); - for (var name in ids) { - var binding = this.getBinding(name); - if (binding) binding.reassign(path); - } - }; - - Scope.prototype.registerBinding = function registerBinding(kind, path) { - var bindingPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : path; - - if (!kind) throw new ReferenceError("no `kind`"); - - if (path.isVariableDeclaration()) { - var declarators = path.get("declarations"); - for (var _iterator9 = declarators, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { - var _ref9; - - if (_isArray9) { - if (_i9 >= _iterator9.length) break; - _ref9 = _iterator9[_i9++]; - } else { - _i9 = _iterator9.next(); - if (_i9.done) break; - _ref9 = _i9.value; - } - - var declar = _ref9; - - this.registerBinding(kind, declar); - } - return; - } - - var parent = this.getProgramParent(); - var ids = path.getBindingIdentifiers(true); - - for (var name in ids) { - for (var _iterator10 = ids[name], _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) { - var _ref10; - - if (_isArray10) { - if (_i10 >= _iterator10.length) break; - _ref10 = _iterator10[_i10++]; - } else { - _i10 = _iterator10.next(); - if (_i10.done) break; - _ref10 = _i10.value; - } - - var _id3 = _ref10; - - var local = this.getOwnBinding(name); - if (local) { - if (local.identifier === _id3) continue; - - this.checkBlockScopedCollisions(local, kind, name, _id3); - } - - if (local && local.path.isFlow()) local = null; - - parent.references[name] = true; - - this.bindings[name] = new _binding3.default({ - identifier: _id3, - existing: local, - scope: this, - path: bindingPath, - kind: kind - }); - } - } - }; - - Scope.prototype.addGlobal = function addGlobal(node) { - this.globals[node.name] = node; - }; - - Scope.prototype.hasUid = function hasUid(name) { - var scope = this; - - do { - if (scope.uids[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - Scope.prototype.hasGlobal = function hasGlobal(name) { - var scope = this; - - do { - if (scope.globals[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - Scope.prototype.hasReference = function hasReference(name) { - var scope = this; - - do { - if (scope.references[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - Scope.prototype.isPure = function isPure(node, constantsOnly) { - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (!binding) return false; - if (constantsOnly) return binding.constant; - return true; - } else if (t.isClass(node)) { - if (node.superClass && !this.isPure(node.superClass, constantsOnly)) return false; - return this.isPure(node.body, constantsOnly); - } else if (t.isClassBody(node)) { - for (var _iterator11 = node.body, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, _getIterator3.default)(_iterator11);;) { - var _ref11; - - if (_isArray11) { - if (_i11 >= _iterator11.length) break; - _ref11 = _iterator11[_i11++]; - } else { - _i11 = _iterator11.next(); - if (_i11.done) break; - _ref11 = _i11.value; - } - - var method = _ref11; - - if (!this.isPure(method, constantsOnly)) return false; - } - return true; - } else if (t.isBinary(node)) { - return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); - } else if (t.isArrayExpression(node)) { - for (var _iterator12 = node.elements, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, _getIterator3.default)(_iterator12);;) { - var _ref12; - - if (_isArray12) { - if (_i12 >= _iterator12.length) break; - _ref12 = _iterator12[_i12++]; - } else { - _i12 = _iterator12.next(); - if (_i12.done) break; - _ref12 = _i12.value; - } - - var elem = _ref12; - - if (!this.isPure(elem, constantsOnly)) return false; - } - return true; - } else if (t.isObjectExpression(node)) { - for (var _iterator13 = node.properties, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, _getIterator3.default)(_iterator13);;) { - var _ref13; - - if (_isArray13) { - if (_i13 >= _iterator13.length) break; - _ref13 = _iterator13[_i13++]; - } else { - _i13 = _iterator13.next(); - if (_i13.done) break; - _ref13 = _i13.value; - } - - var prop = _ref13; - - if (!this.isPure(prop, constantsOnly)) return false; - } - return true; - } else if (t.isClassMethod(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - if (node.kind === "get" || node.kind === "set") return false; - return true; - } else if (t.isClassProperty(node) || t.isObjectProperty(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - return this.isPure(node.value, constantsOnly); - } else if (t.isUnaryExpression(node)) { - return this.isPure(node.argument, constantsOnly); - } else { - return t.isPureish(node); - } - }; - - Scope.prototype.setData = function setData(key, val) { - return this.data[key] = val; - }; - - Scope.prototype.getData = function getData(key) { - var scope = this; - do { - var data = scope.data[key]; - if (data != null) return data; - } while (scope = scope.parent); - }; - - Scope.prototype.removeData = function removeData(key) { - var scope = this; - do { - var data = scope.data[key]; - if (data != null) scope.data[key] = null; - } while (scope = scope.parent); - }; - - Scope.prototype.init = function init() { - if (!this.references) this.crawl(); - }; - - Scope.prototype.crawl = function crawl() { - _crawlCallsCount++; - this._crawl(); - _crawlCallsCount--; - }; - - Scope.prototype._crawl = function _crawl() { - var path = this.path; - - this.references = (0, _create2.default)(null); - this.bindings = (0, _create2.default)(null); - this.globals = (0, _create2.default)(null); - this.uids = (0, _create2.default)(null); - this.data = (0, _create2.default)(null); - - if (path.isLoop()) { - for (var _iterator14 = t.FOR_INIT_KEYS, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, _getIterator3.default)(_iterator14);;) { - var _ref14; - - if (_isArray14) { - if (_i14 >= _iterator14.length) break; - _ref14 = _iterator14[_i14++]; - } else { - _i14 = _iterator14.next(); - if (_i14.done) break; - _ref14 = _i14.value; - } - - var key = _ref14; - - var node = path.get(key); - if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); - } - } - - if (path.isFunctionExpression() && path.has("id")) { - if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { - this.registerBinding("local", path.get("id"), path); - } - } - - if (path.isClassExpression() && path.has("id")) { - if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { - this.registerBinding("local", path); - } - } - - if (path.isFunction()) { - var params = path.get("params"); - for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, _getIterator3.default)(_iterator15);;) { - var _ref15; - - if (_isArray15) { - if (_i15 >= _iterator15.length) break; - _ref15 = _iterator15[_i15++]; - } else { - _i15 = _iterator15.next(); - if (_i15.done) break; - _ref15 = _i15.value; - } - - var param = _ref15; - - this.registerBinding("param", param); - } - } - - if (path.isCatchClause()) { - this.registerBinding("let", path); - } - - var parent = this.getProgramParent(); - if (parent.crawling) return; - - var state = { - references: [], - constantViolations: [], - assignments: [] - }; - - this.crawling = true; - path.traverse(collectorVisitor, state); - this.crawling = false; - - for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, _getIterator3.default)(_iterator16);;) { - var _ref16; - - if (_isArray16) { - if (_i16 >= _iterator16.length) break; - _ref16 = _iterator16[_i16++]; - } else { - _i16 = _iterator16.next(); - if (_i16.done) break; - _ref16 = _i16.value; - } - - var _path = _ref16; - - var ids = _path.getBindingIdentifiers(); - var programParent = void 0; - for (var name in ids) { - if (_path.scope.getBinding(name)) continue; - - programParent = programParent || _path.scope.getProgramParent(); - programParent.addGlobal(ids[name]); - } - - _path.scope.registerConstantViolation(_path); - } - - for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : (0, _getIterator3.default)(_iterator17);;) { - var _ref17; - - if (_isArray17) { - if (_i17 >= _iterator17.length) break; - _ref17 = _iterator17[_i17++]; - } else { - _i17 = _iterator17.next(); - if (_i17.done) break; - _ref17 = _i17.value; - } - - var ref = _ref17; - - var binding = ref.scope.getBinding(ref.node.name); - if (binding) { - binding.reference(ref); - } else { - ref.scope.getProgramParent().addGlobal(ref.node); - } - } - - for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : (0, _getIterator3.default)(_iterator18);;) { - var _ref18; - - if (_isArray18) { - if (_i18 >= _iterator18.length) break; - _ref18 = _iterator18[_i18++]; - } else { - _i18 = _iterator18.next(); - if (_i18.done) break; - _ref18 = _i18.value; - } - - var _path2 = _ref18; - - _path2.scope.registerConstantViolation(_path2); - } - }; - - Scope.prototype.push = function push(opts) { - var path = this.path; - - if (!path.isBlockStatement() && !path.isProgram()) { - path = this.getBlockParent().path; - } - - if (path.isSwitchStatement()) { - path = this.getFunctionParent().path; - } - - if (path.isLoop() || path.isCatchClause() || path.isFunction()) { - t.ensureBlock(path.node); - path = path.get("body"); - } - - var unique = opts.unique; - var kind = opts.kind || "var"; - var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; - - var dataKey = "declaration:" + kind + ":" + blockHoist; - var declarPath = !unique && path.getData(dataKey); - - if (!declarPath) { - var declar = t.variableDeclaration(kind, []); - declar._generated = true; - declar._blockHoist = blockHoist; - - var _path$unshiftContaine = path.unshiftContainer("body", [declar]); - - declarPath = _path$unshiftContaine[0]; - - if (!unique) path.setData(dataKey, declarPath); - } - - var declarator = t.variableDeclarator(opts.id, opts.init); - declarPath.node.declarations.push(declarator); - this.registerBinding(kind, declarPath.get("declarations").pop()); - }; - - Scope.prototype.getProgramParent = function getProgramParent() { - var scope = this; - do { - if (scope.path.isProgram()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a Function or Program..."); - }; - - Scope.prototype.getFunctionParent = function getFunctionParent() { - var scope = this; - do { - if (scope.path.isFunctionParent()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a Function or Program..."); - }; - - Scope.prototype.getBlockParent = function getBlockParent() { - var scope = this; - do { - if (scope.path.isBlockParent()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); - }; - - Scope.prototype.getAllBindings = function getAllBindings() { - var ids = (0, _create2.default)(null); - - var scope = this; - do { - (0, _defaults2.default)(ids, scope.bindings); - scope = scope.parent; - } while (scope); - - return ids; - }; - - Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() { - var ids = (0, _create2.default)(null); - - for (var _iterator19 = arguments, _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : (0, _getIterator3.default)(_iterator19);;) { - var _ref19; - - if (_isArray19) { - if (_i19 >= _iterator19.length) break; - _ref19 = _iterator19[_i19++]; - } else { - _i19 = _iterator19.next(); - if (_i19.done) break; - _ref19 = _i19.value; - } - - var kind = _ref19; - - var scope = this; - do { - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - if (binding.kind === kind) ids[name] = binding; - } - scope = scope.parent; - } while (scope); - } - - return ids; - }; - - Scope.prototype.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) { - return this.getBindingIdentifier(name) === node; - }; - - Scope.prototype.warnOnFlowBinding = function warnOnFlowBinding(binding) { - if (_crawlCallsCount === 0 && binding && binding.path.isFlow()) { - console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "); - } - return binding; - }; - - Scope.prototype.getBinding = function getBinding(name) { - var scope = this; - - do { - var binding = scope.getOwnBinding(name); - if (binding) return this.warnOnFlowBinding(binding); - } while (scope = scope.parent); - }; - - Scope.prototype.getOwnBinding = function getOwnBinding(name) { - return this.warnOnFlowBinding(this.bindings[name]); - }; - - Scope.prototype.getBindingIdentifier = function getBindingIdentifier(name) { - var info = this.getBinding(name); - return info && info.identifier; - }; - - Scope.prototype.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) { - var binding = this.bindings[name]; - return binding && binding.identifier; - }; - - Scope.prototype.hasOwnBinding = function hasOwnBinding(name) { - return !!this.getOwnBinding(name); - }; - - Scope.prototype.hasBinding = function hasBinding(name, noGlobals) { - if (!name) return false; - if (this.hasOwnBinding(name)) return true; - if (this.parentHasBinding(name, noGlobals)) return true; - if (this.hasUid(name)) return true; - if (!noGlobals && (0, _includes2.default)(Scope.globals, name)) return true; - if (!noGlobals && (0, _includes2.default)(Scope.contextVariables, name)) return true; - return false; - }; - - Scope.prototype.parentHasBinding = function parentHasBinding(name, noGlobals) { - return this.parent && this.parent.hasBinding(name, noGlobals); - }; - - Scope.prototype.moveBindingTo = function moveBindingTo(name, scope) { - var info = this.getBinding(name); - if (info) { - info.scope.removeOwnBinding(name); - info.scope = scope; - scope.bindings[name] = info; - } - }; - - Scope.prototype.removeOwnBinding = function removeOwnBinding(name) { - delete this.bindings[name]; - }; - - Scope.prototype.removeBinding = function removeBinding(name) { - var info = this.getBinding(name); - if (info) { - info.scope.removeOwnBinding(name); - } - - var scope = this; - do { - if (scope.uids[name]) { - scope.uids[name] = false; - } - } while (scope = scope.parent); - }; - - return Scope; - }(); - - Scope.globals = (0, _keys2.default)(_globals2.default.builtin); - Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; - exports.default = Scope; - module.exports = exports["default"]; -}); -$__System.registerDynamic("154", ["17", "11", "155", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.findParent = findParent; - exports.find = find; - exports.getFunctionParent = getFunctionParent; - exports.getStatementParent = getStatementParent; - exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; - exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; - exports.getAncestry = getAncestry; - exports.isAncestor = isAncestor; - exports.isDescendant = isDescendant; - exports.inType = inType; - exports.inShadow = inShadow; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _index = $__require("155"); - - var _index2 = _interopRequireDefault(_index); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function findParent(callback) { - var path = this; - while (path = path.parentPath) { - if (callback(path)) return path; - } - return null; - } - - function find(callback) { - var path = this; - do { - if (callback(path)) return path; - } while (path = path.parentPath); - return null; - } - - function getFunctionParent() { - return this.findParent(function (path) { - return path.isFunction() || path.isProgram(); - }); - } - - function getStatementParent() { - var path = this; - do { - if (Array.isArray(path.container)) { - return path; - } - } while (path = path.parentPath); - } - - function getEarliestCommonAncestorFrom(paths) { - return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { - var earliest = void 0; - var keys = t.VISITOR_KEYS[deepest.type]; - - for (var _iterator = ancestries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var ancestry = _ref; - - var path = ancestry[i + 1]; - - if (!earliest) { - earliest = path; - continue; - } - - if (path.listKey && earliest.listKey === path.listKey) { - if (path.key < earliest.key) { - earliest = path; - continue; - } - } - - var earliestKeyIndex = keys.indexOf(earliest.parentKey); - var currentKeyIndex = keys.indexOf(path.parentKey); - if (earliestKeyIndex > currentKeyIndex) { - earliest = path; - } - } - - return earliest; - }); - } - - function getDeepestCommonAncestorFrom(paths, filter) { - var _this = this; - - if (!paths.length) { - return this; - } - - if (paths.length === 1) { - return paths[0]; - } - - var minDepth = Infinity; - - var lastCommonIndex = void 0, - lastCommon = void 0; - - var ancestries = paths.map(function (path) { - var ancestry = []; - - do { - ancestry.unshift(path); - } while ((path = path.parentPath) && path !== _this); - - if (ancestry.length < minDepth) { - minDepth = ancestry.length; - } - - return ancestry; - }); - - var first = ancestries[0]; - - depthLoop: for (var i = 0; i < minDepth; i++) { - var shouldMatch = first[i]; - - for (var _iterator2 = ancestries, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var ancestry = _ref2; - - if (ancestry[i] !== shouldMatch) { - break depthLoop; - } - } - - lastCommonIndex = i; - lastCommon = shouldMatch; - } - - if (lastCommon) { - if (filter) { - return filter(lastCommon, lastCommonIndex, ancestries); - } else { - return lastCommon; - } - } else { - throw new Error("Couldn't find intersection"); - } - } - - function getAncestry() { - var path = this; - var paths = []; - do { - paths.push(path); - } while (path = path.parentPath); - return paths; - } - - function isAncestor(maybeDescendant) { - return maybeDescendant.isDescendant(this); - } - - function isDescendant(maybeAncestor) { - return !!this.findParent(function (parent) { - return parent === maybeAncestor; - }); - } - - function inType() { - var path = this; - while (path) { - for (var _iterator3 = arguments, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var type = _ref3; - - if (path.node.type === type) return true; - } - path = path.parentPath; - } - - return false; - } - - function inShadow(key) { - var parentFn = this.isFunction() ? this : this.findParent(function (p) { - return p.isFunction(); - }); - if (!parentFn) return; - - if (parentFn.isFunctionExpression() || parentFn.isFunctionDeclaration()) { - var shadow = parentFn.node.shadow; - - if (shadow && (!key || shadow[key] !== false)) { - return parentFn; - } - } else if (parentFn.isArrowFunctionExpression()) { - return parentFn; - } - - return null; - } -}); -$__System.registerDynamic("156", ["17", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.default = function (node) { - if (!this.isReferenced()) return; - - var binding = this.scope.getBinding(node.name); - if (binding) { - if (binding.identifier.typeAnnotation) { - return binding.identifier.typeAnnotation; - } else { - return getTypeAnnotationBindingConstantViolations(this, node.name); - } - } - - if (node.name === "undefined") { - return t.voidTypeAnnotation(); - } else if (node.name === "NaN" || node.name === "Infinity") { - return t.numberTypeAnnotation(); - } else if (node.name === "arguments") {} - }; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function getTypeAnnotationBindingConstantViolations(path, name) { - var binding = path.scope.getBinding(name); - - var types = []; - path.typeAnnotation = t.unionTypeAnnotation(types); - - var functionConstantViolations = []; - var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); - - var testType = getConditionalAnnotation(path, name); - if (testType) { - var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); - - constantViolations = constantViolations.filter(function (path) { - return testConstantViolations.indexOf(path) < 0; - }); - - types.push(testType.typeAnnotation); - } - - if (constantViolations.length) { - constantViolations = constantViolations.concat(functionConstantViolations); - - for (var _iterator = constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var violation = _ref; - - types.push(violation.getTypeAnnotation()); - } - } - - if (types.length) { - return t.createUnionTypeAnnotation(types); - } - } - - function getConstantViolationsBefore(binding, path, functions) { - var violations = binding.constantViolations.slice(); - violations.unshift(binding.path); - return violations.filter(function (violation) { - violation = violation.resolve(); - var status = violation._guessExecutionStatusRelativeTo(path); - if (functions && status === "function") functions.push(violation); - return status === "before"; - }); - } - - function inferAnnotationFromBinaryExpression(name, path) { - var operator = path.node.operator; - - var right = path.get("right").resolve(); - var left = path.get("left").resolve(); - - var target = void 0; - if (left.isIdentifier({ name: name })) { - target = right; - } else if (right.isIdentifier({ name: name })) { - target = left; - } - if (target) { - if (operator === "===") { - return target.getTypeAnnotation(); - } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else { - return; - } - } else { - if (operator !== "===") return; - } - - var typeofPath = void 0; - var typePath = void 0; - if (left.isUnaryExpression({ operator: "typeof" })) { - typeofPath = left; - typePath = right; - } else if (right.isUnaryExpression({ operator: "typeof" })) { - typeofPath = right; - typePath = left; - } - if (!typePath && !typeofPath) return; - - typePath = typePath.resolve(); - if (!typePath.isLiteral()) return; - - var typeValue = typePath.node.value; - if (typeof typeValue !== "string") return; - - if (!typeofPath.get("argument").isIdentifier({ name: name })) return; - - return t.createTypeAnnotationBasedOnTypeof(typePath.node.value); - } - - function getParentConditionalPath(path) { - var parentPath = void 0; - while (parentPath = path.parentPath) { - if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { - if (path.key === "test") { - return; - } else { - return parentPath; - } - } else { - path = parentPath; - } - } - } - - function getConditionalAnnotation(path, name) { - var ifStatement = getParentConditionalPath(path); - if (!ifStatement) return; - - var test = ifStatement.get("test"); - var paths = [test]; - var types = []; - - do { - var _path = paths.shift().resolve(); - - if (_path.isLogicalExpression()) { - paths.push(_path.get("left")); - paths.push(_path.get("right")); - } - - if (_path.isBinaryExpression()) { - var type = inferAnnotationFromBinaryExpression(name, _path); - if (type) types.push(type); - } - } while (paths.length); - - if (types.length) { - return { - typeAnnotation: t.createUnionTypeAnnotation(types), - ifStatement: ifStatement - }; - } else { - return getConditionalAnnotation(ifStatement, name); - } - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("157", ["156", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = exports.Identifier = undefined; - - var _infererReference = $__require("156"); - - Object.defineProperty(exports, "Identifier", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_infererReference).default; - } - }); - exports.VariableDeclarator = VariableDeclarator; - exports.TypeCastExpression = TypeCastExpression; - exports.NewExpression = NewExpression; - exports.TemplateLiteral = TemplateLiteral; - exports.UnaryExpression = UnaryExpression; - exports.BinaryExpression = BinaryExpression; - exports.LogicalExpression = LogicalExpression; - exports.ConditionalExpression = ConditionalExpression; - exports.SequenceExpression = SequenceExpression; - exports.AssignmentExpression = AssignmentExpression; - exports.UpdateExpression = UpdateExpression; - exports.StringLiteral = StringLiteral; - exports.NumericLiteral = NumericLiteral; - exports.BooleanLiteral = BooleanLiteral; - exports.NullLiteral = NullLiteral; - exports.RegExpLiteral = RegExpLiteral; - exports.ObjectExpression = ObjectExpression; - exports.ArrayExpression = ArrayExpression; - exports.RestElement = RestElement; - exports.CallExpression = CallExpression; - exports.TaggedTemplateExpression = TaggedTemplateExpression; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function VariableDeclarator() { - var id = this.get("id"); - - if (id.isIdentifier()) { - return this.get("init").getTypeAnnotation(); - } else { - return; - } - } - - function TypeCastExpression(node) { - return node.typeAnnotation; - } - - TypeCastExpression.validParent = true; - - function NewExpression(node) { - if (this.get("callee").isIdentifier()) { - return t.genericTypeAnnotation(node.callee); - } - } - - function TemplateLiteral() { - return t.stringTypeAnnotation(); - } - - function UnaryExpression(node) { - var operator = node.operator; - - if (operator === "void") { - return t.voidTypeAnnotation(); - } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.stringTypeAnnotation(); - } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.booleanTypeAnnotation(); - } - } - - function BinaryExpression(node) { - var operator = node.operator; - - if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.booleanTypeAnnotation(); - } else if (operator === "+") { - var right = this.get("right"); - var left = this.get("left"); - - if (left.isBaseType("number") && right.isBaseType("number")) { - return t.numberTypeAnnotation(); - } else if (left.isBaseType("string") || right.isBaseType("string")) { - return t.stringTypeAnnotation(); - } - - return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]); - } - } - - function LogicalExpression() { - return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]); - } - - function ConditionalExpression() { - return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]); - } - - function SequenceExpression() { - return this.get("expressions").pop().getTypeAnnotation(); - } - - function AssignmentExpression() { - return this.get("right").getTypeAnnotation(); - } - - function UpdateExpression(node) { - var operator = node.operator; - if (operator === "++" || operator === "--") { - return t.numberTypeAnnotation(); - } - } - - function StringLiteral() { - return t.stringTypeAnnotation(); - } - - function NumericLiteral() { - return t.numberTypeAnnotation(); - } - - function BooleanLiteral() { - return t.booleanTypeAnnotation(); - } - - function NullLiteral() { - return t.nullLiteralTypeAnnotation(); - } - - function RegExpLiteral() { - return t.genericTypeAnnotation(t.identifier("RegExp")); - } - - function ObjectExpression() { - return t.genericTypeAnnotation(t.identifier("Object")); - } - - function ArrayExpression() { - return t.genericTypeAnnotation(t.identifier("Array")); - } - - function RestElement() { - return ArrayExpression(); - } - - RestElement.validParent = true; - - function Func() { - return t.genericTypeAnnotation(t.identifier("Function")); - } - - exports.FunctionExpression = Func; - exports.ArrowFunctionExpression = Func; - exports.FunctionDeclaration = Func; - exports.ClassExpression = Func; - exports.ClassDeclaration = Func; - function CallExpression() { - return resolveCall(this.get("callee")); - } - - function TaggedTemplateExpression() { - return resolveCall(this.get("tag")); - } - - function resolveCall(callee) { - callee = callee.resolve(); - - if (callee.isFunction()) { - if (callee.is("async")) { - if (callee.is("generator")) { - return t.genericTypeAnnotation(t.identifier("AsyncIterator")); - } else { - return t.genericTypeAnnotation(t.identifier("Promise")); - } - } else { - if (callee.node.returnType) { - return callee.node.returnType; - } else {} - } - } - } -}); -$__System.registerDynamic("158", ["17", "157", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.getTypeAnnotation = getTypeAnnotation; - exports._getTypeAnnotation = _getTypeAnnotation; - exports.isBaseType = isBaseType; - exports.couldBeBaseType = couldBeBaseType; - exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; - exports.isGenericType = isGenericType; - - var _inferers = $__require("157"); - - var inferers = _interopRequireWildcard(_inferers); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function getTypeAnnotation() { - if (this.typeAnnotation) return this.typeAnnotation; - - var type = this._getTypeAnnotation() || t.anyTypeAnnotation(); - if (t.isTypeAnnotation(type)) type = type.typeAnnotation; - return this.typeAnnotation = type; - } - - function _getTypeAnnotation() { - var node = this.node; - - if (!node) { - if (this.key === "init" && this.parentPath.isVariableDeclarator()) { - var declar = this.parentPath.parentPath; - var declarParent = declar.parentPath; - - if (declar.key === "left" && declarParent.isForInStatement()) { - return t.stringTypeAnnotation(); - } - - if (declar.key === "left" && declarParent.isForOfStatement()) { - return t.anyTypeAnnotation(); - } - - return t.voidTypeAnnotation(); - } else { - return; - } - } - - if (node.typeAnnotation) { - return node.typeAnnotation; - } - - var inferer = inferers[node.type]; - if (inferer) { - return inferer.call(this, node); - } - - inferer = inferers[this.parentPath.type]; - if (inferer && inferer.validParent) { - return this.parentPath.getTypeAnnotation(); - } - } - - function isBaseType(baseName, soft) { - return _isBaseType(baseName, this.getTypeAnnotation(), soft); - } - - function _isBaseType(baseName, type, soft) { - if (baseName === "string") { - return t.isStringTypeAnnotation(type); - } else if (baseName === "number") { - return t.isNumberTypeAnnotation(type); - } else if (baseName === "boolean") { - return t.isBooleanTypeAnnotation(type); - } else if (baseName === "any") { - return t.isAnyTypeAnnotation(type); - } else if (baseName === "mixed") { - return t.isMixedTypeAnnotation(type); - } else if (baseName === "empty") { - return t.isEmptyTypeAnnotation(type); - } else if (baseName === "void") { - return t.isVoidTypeAnnotation(type); - } else { - if (soft) { - return false; - } else { - throw new Error("Unknown base type " + baseName); - } - } - } - - function couldBeBaseType(name) { - var type = this.getTypeAnnotation(); - if (t.isAnyTypeAnnotation(type)) return true; - - if (t.isUnionTypeAnnotation(type)) { - for (var _iterator = type.types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var type2 = _ref; - - if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { - return true; - } - } - return false; - } else { - return _isBaseType(name, type, true); - } - } - - function baseTypeStrictlyMatches(right) { - var left = this.getTypeAnnotation(); - right = right.getTypeAnnotation(); - - if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) { - return right.type === left.type; - } - } - - function isGenericType(genericName) { - var type = this.getTypeAnnotation(); - return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, { name: genericName }); - } -}); -$__System.registerDynamic("159", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - // Copyright 2014, 2015, 2016, 2017 Simon Lydell - // License: MIT. (See LICENSE.) - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - // This regex comes from regex.coffee, and is inserted here by generate-index.js - // (run `npm run build`). - 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; - - exports.matchToToken = function (match) { - var token = { type: "invalid", value: match[0] }; - if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace"; - return token; - }; -}); -$__System.registerDynamic('15a', [], true, function ($__require, exports, module) { - 'use strict'; - - var global = this || self, - GLOBAL = global; - var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - - module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); - }; -}); -$__System.registerDynamic('15b', [], true, function ($__require, exports, module) { - 'use strict'; - - var global = this || self, - GLOBAL = global; - function assembleStyles() { - var styles = { - modifiers: { - reset: [0, 0], - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - colors: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39] - }, - bgColors: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] - } - }; - - // fix humans - styles.colors.grey = styles.colors.gray; - - Object.keys(styles).forEach(function (groupName) { - var group = styles[groupName]; - - Object.keys(group).forEach(function (styleName) { - var style = group[styleName]; - - styles[styleName] = group[styleName] = { - open: '\u001b[' + style[0] + 'm', - close: '\u001b[' + style[1] + 'm' - }; - }); - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - }); - - return styles; - } - - module.exports = assembleStyles(); - /* Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles - }); */ -}); -$__System.registerDynamic('15c', ['15d'], true, function ($__require, exports, module) { - 'use strict'; - - var global = this || self, - GLOBAL = global; - var ansiRegex = $__require('15d')(); - - module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; - }; -}); -$__System.registerDynamic('15d', [], true, function ($__require, exports, module) { - 'use strict'; - - var global = this || self, - GLOBAL = global; - module.exports = function () { - return (/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g - ); - }; -}); -$__System.registerDynamic('15e', ['15d'], true, function ($__require, exports, module) { - 'use strict'; - - var global = this || self, - GLOBAL = global; - var ansiRegex = $__require('15d'); - var re = new RegExp(ansiRegex().source); // remove the `g` flag - module.exports = re.test.bind(re); -}); -$__System.registerDynamic('15f', ['c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var argv = process.argv; - - var terminator = argv.indexOf('--'); - var hasFlag = function (flag) { - flag = '--' + flag; - var pos = argv.indexOf(flag); - return pos !== -1 && (terminator !== -1 ? pos < terminator : true); - }; - - module.exports = function () { - if ('FORCE_COLOR' in process.env) { - return true; - } - - if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { - return false; - } - - if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; - }(); -}); -$__System.registerDynamic('160', ['15a', '15b', '15c', '15e', '15f', 'c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var escapeStringRegexp = $__require('15a'); - var ansiStyles = $__require('15b'); - var stripAnsi = $__require('15c'); - var hasAnsi = $__require('15e'); - var supportsColor = $__require('15f'); - var defineProps = Object.defineProperties; - var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); - - function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; - } - - // use bright blue on Windows as the normal blue color is illegible - if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001b[94m'; - } - - var styles = function () { - var ret = {}; - - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; - }); - - return ret; - }(); - - var proto = defineProps(function chalk() {}, styles); - - function build(_styles) { - var builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - /* eslint-disable no-proto */ - builder.__proto__ = proto; - - return builder; - } - - function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || !str) { - return str; - } - - var nestedStyles = this._styles; - var i = nestedStyles.length; - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - var originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { - ansiStyles.dim.open = ''; - } - - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. - ansiStyles.dim.open = originalDim; - - return str; - } - - function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); - - return ret; - } - - defineProps(Chalk.prototype, init()); - - module.exports = new Chalk(); - module.exports.styles = ansiStyles; - module.exports.hasColor = hasAnsi; - module.exports.stripColor = stripAnsi; - module.exports.supportsColor = supportsColor; -}); -$__System.registerDynamic("d5", ["159", "ff", "160"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (rawLines, lineNumber, colNumber) { - var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - colNumber = Math.max(colNumber, 0); - - var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor; - var chalk = _chalk2.default; - if (opts.forceColor) { - chalk = new _chalk2.default.constructor({ enabled: true }); - } - var maybeHighlight = function maybeHighlight(chalkFn, string) { - return highlighted ? chalkFn(string) : string; - }; - var defs = getDefs(chalk); - if (highlighted) rawLines = highlight(defs, rawLines); - - var linesAbove = opts.linesAbove || 2; - var linesBelow = opts.linesBelow || 3; - - var lines = rawLines.split(NEWLINE); - var start = Math.max(lineNumber - (linesAbove + 1), 0); - var end = Math.min(lines.length, lineNumber + linesBelow); - - if (!lineNumber && !colNumber) { - start = 0; - end = lines.length; - } - - var numberMaxWidth = String(end).length; - - var frame = lines.slice(start, end).map(function (line, index) { - var number = start + 1 + index; - var paddedNumber = (" " + number).slice(-numberMaxWidth); - var gutter = " " + paddedNumber + " | "; - if (number === lineNumber) { - var markerLine = ""; - if (colNumber) { - var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " "); - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join(""); - } - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); - } else { - return " " + maybeHighlight(defs.gutter, gutter) + line; - } - }).join("\n"); - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } - }; - - var _jsTokens = $__require("159"); - - var _jsTokens2 = _interopRequireDefault(_jsTokens); - - var _esutils = $__require("ff"); - - var _esutils2 = _interopRequireDefault(_esutils); - - var _chalk = $__require("160"); - - var _chalk2 = _interopRequireDefault(_chalk); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function getDefs(chalk) { - return { - keyword: chalk.cyan, - capitalized: chalk.yellow, - jsx_tag: chalk.yellow, - punctuator: chalk.yellow, - - number: chalk.magenta, - string: chalk.green, - regex: chalk.magenta, - comment: chalk.grey, - invalid: chalk.white.bgRed.bold, - gutter: chalk.grey, - marker: chalk.red.bold - }; - } - - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - - var JSX_TAG = /^[a-z][\w-]*$/i; - - var BRACKET = /^[()\[\]{}]$/; - - function getTokenType(match) { - var _match$slice = match.slice(-2), - offset = _match$slice[0], - text = _match$slice[1]; - - var token = (0, _jsTokens.matchToToken)(match); - - if (token.type === "name") { - if (_esutils2.default.keyword.isReservedWordES6(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var declar = _ref; - - if (declar.init) { - exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init))); - } - } - - path.replaceWithMultiple(exprs); - } - }; - - function replaceWithMultiple(nodes) { - this.resync(); - - nodes = this._verifyNodeList(nodes); - t.inheritLeadingComments(nodes[0], this.node); - t.inheritTrailingComments(nodes[nodes.length - 1], this.node); - this.node = this.container[this.key] = null; - this.insertAfter(nodes); - - if (this.node) { - this.requeue(); - } else { - this.remove(); - } - } - - function replaceWithSourceString(replacement) { - this.resync(); - - try { - replacement = "(" + replacement + ")"; - replacement = (0, _babylon.parse)(replacement); - } catch (err) { - var loc = err.loc; - if (loc) { - err.message += " - make sure this is an expression."; - err.message += "\n" + (0, _babelCodeFrame2.default)(replacement, loc.line, loc.column + 1); - } - throw err; - } - - replacement = replacement.program.body[0].expression; - _index2.default.removeProperties(replacement); - return this.replaceWith(replacement); - } - - function replaceWith(replacement) { - this.resync(); - - if (this.removed) { - throw new Error("You can't replace this node, we've already removed it"); - } - - if (replacement instanceof _index4.default) { - replacement = replacement.node; - } - - if (!replacement) { - throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); - } - - if (this.node === replacement) { - return; - } - - if (this.isProgram() && !t.isProgram(replacement)) { - throw new Error("You can only replace a Program root node with another Program node"); - } - - if (Array.isArray(replacement)) { - throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); - } - - if (typeof replacement === "string") { - throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); - } - - if (this.isNodeType("Statement") && t.isExpression(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { - replacement = t.expressionStatement(replacement); - } - } - - if (this.isNodeType("Expression") && t.isStatement(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { - return this.replaceExpressionWithStatements([replacement]); - } - } - - var oldNode = this.node; - if (oldNode) { - t.inheritsComments(replacement, oldNode); - t.removeComments(oldNode); - } - - this._replaceWith(replacement); - this.type = replacement.type; - - this.setScope(); - - this.requeue(); - } - - function _replaceWith(node) { - if (!this.container) { - throw new ReferenceError("Container is falsy"); - } - - if (this.inList) { - t.validate(this.parent, this.key, [node]); - } else { - t.validate(this.parent, this.key, node); - } - - this.debug(function () { - return "Replace with " + (node && node.type); - }); - - this.node = this.container[this.key] = node; - } - - function replaceExpressionWithStatements(nodes) { - this.resync(); - - var toSequenceExpression = t.toSequenceExpression(nodes, this.scope); - - if (t.isSequenceExpression(toSequenceExpression)) { - var exprs = toSequenceExpression.expressions; - - if (exprs.length >= 2 && this.parentPath.isExpressionStatement()) { - this._maybePopFromStatements(exprs); - } - - if (exprs.length === 1) { - this.replaceWith(exprs[0]); - } else { - this.replaceWith(toSequenceExpression); - } - } else if (toSequenceExpression) { - this.replaceWith(toSequenceExpression); - } else { - var container = t.functionExpression(null, [], t.blockStatement(nodes)); - container.shadow = true; - - this.replaceWith(t.callExpression(container, [])); - this.traverse(hoistVariablesVisitor); - - var completionRecords = this.get("callee").getCompletionRecords(); - for (var _iterator2 = completionRecords, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var path = _ref2; - - if (!path.isExpressionStatement()) continue; - - var loop = path.findParent(function (path) { - return path.isLoop(); - }); - if (loop) { - var uid = loop.getData("expressionReplacementReturnUid"); - - if (!uid) { - var callee = this.get("callee"); - uid = callee.scope.generateDeclaredUidIdentifier("ret"); - callee.get("body").pushContainer("body", t.returnStatement(uid)); - loop.setData("expressionReplacementReturnUid", uid); - } else { - uid = t.identifier(uid.name); - } - - path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression)); - } else { - path.replaceWith(t.returnStatement(path.node.expression)); - } - } - - return this.node; - } - } - - function replaceInline(nodes) { - this.resync(); - - if (Array.isArray(nodes)) { - if (Array.isArray(this.container)) { - nodes = this._verifyNodeList(nodes); - this._containerInsertAfter(nodes); - return this.remove(); - } else { - return this.replaceWithMultiple(nodes); - } - } else { - return this.replaceWith(nodes); - } - } -}); -$__System.registerDynamic('162', ['163', '37', '164', '165', '166', 'c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var global = $__require('163'), - core = $__require('37'), - dP = $__require('164'), - DESCRIPTORS = $__require('165'), - SPECIES = $__require('166')('species'); - - module.exports = function (KEY) { - var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { - return this; - } - }); - }; -}); -$__System.registerDynamic('167', ['164', '168', '169', '10c', '16a', '16b', '16c', '16d', '16e', '162', '165', '16f', 'c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var dP = $__require('164').f, - create = $__require('168'), - redefineAll = $__require('169'), - ctx = $__require('10c'), - anInstance = $__require('16a'), - defined = $__require('16b'), - forOf = $__require('16c'), - $iterDefine = $__require('16d'), - step = $__require('16e'), - setSpecies = $__require('162'), - DESCRIPTORS = $__require('165'), - fastKey = $__require('16f').fastKey, - SIZE = DESCRIPTORS ? '_s' : 'size'; - - var getEntry = function (that, key) { - // fast case - var index = fastKey(key), - entry; - if (index !== 'F') return that._i[index]; - // frozen object case - for (entry = that._f; entry; entry = entry.n) { - if (entry.k == key) return entry; - } - }; - - module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._i = create(null); // index - that._f = undefined; // first entry - that._l = undefined; // last entry - that[SIZE] = 0; // size - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.1.3.1 Map.prototype.clear() - // 23.2.3.2 Set.prototype.clear() - clear: function clear() { - for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) { - entry.r = true; - if (entry.p) entry.p = entry.p.n = undefined; - delete data[entry.i]; - } - that._f = that._l = undefined; - that[SIZE] = 0; - }, - // 23.1.3.3 Map.prototype.delete(key) - // 23.2.3.4 Set.prototype.delete(value) - 'delete': function (key) { - var that = this, - entry = getEntry(that, key); - if (entry) { - var next = entry.n, - prev = entry.p; - delete that._i[entry.i]; - entry.r = true; - if (prev) prev.n = next; - if (next) next.p = prev; - if (that._f == entry) that._f = next; - if (that._l == entry) that._l = prev; - that[SIZE]--; - }return !!entry; - }, - // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) - // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function forEach(callbackfn /*, that = undefined */) { - anInstance(this, C, 'forEach'); - var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3), - entry; - while (entry = entry ? entry.n : this._f) { - f(entry.v, entry.k, this); - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - } - }, - // 23.1.3.7 Map.prototype.has(key) - // 23.2.3.7 Set.prototype.has(value) - has: function has(key) { - return !!getEntry(this, key); - } - }); - if (DESCRIPTORS) dP(C.prototype, 'size', { - get: function () { - return defined(this[SIZE]); - } - }); - return C; - }, - def: function (that, key, value) { - var entry = getEntry(that, key), - prev, - index; - // change existing entry - if (entry) { - entry.v = value; - // create new entry - } else { - that._l = entry = { - i: index = fastKey(key, true), // <- index - k: key, // <- key - v: value, // <- value - p: prev = that._l, // <- previous entry - n: undefined, // <- next entry - r: false // <- removed - }; - if (!that._f) that._f = entry; - if (prev) prev.n = entry; - that[SIZE]++; - // add to index - if (index !== 'F') that._i[index] = entry; - }return that; - }, - getEntry: getEntry, - setStrong: function (C, NAME, IS_MAP) { - // add .keys, .values, .entries, [@@iterator] - // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - $iterDefine(C, NAME, function (iterated, kind) { - this._t = iterated; // target - this._k = kind; // kind - this._l = undefined; // previous - }, function () { - var that = this, - kind = that._k, - entry = that._l; - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - // get next entry - if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { - // or finish the iteration - that._t = undefined; - return step(1); - } - // return step by kind - if (kind == 'keys') return step(0, entry.k); - if (kind == 'values') return step(0, entry.v); - return step(0, [entry.k, entry.v]); - }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); - - // add [@@species], 23.1.2.2, 23.2.2.2 - setSpecies(NAME); - } - }; -}); -$__System.registerDynamic('170', ['167', '33', 'c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var strong = $__require('167'); - - // 23.1 Map Objects - module.exports = $__require('33')('Map', function (get) { - return function Map() { - return get(this, arguments.length > 0 ? arguments[0] : undefined); - }; - }, { - // 23.1.3.6 Map.prototype.get(key) - get: function get(key) { - var entry = strong.getEntry(this, key); - return entry && entry.v; - }, - // 23.1.3.9 Map.prototype.set(key, value) - set: function set(key, value) { - return strong.def(this, key === 0 ? 0 : key, value); - } - }, strong, true); -}); -$__System.registerDynamic('171', ['16c', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var forOf = $__require('16c'); - - module.exports = function (iter, ITERATOR) { - var result = []; - forOf(iter, false, result.push, result, ITERATOR); - return result; - }; -}); -$__System.registerDynamic('172', ['173', '171', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // https://github.com/DavidBruant/Map-Set.prototype.toJSON - var classof = $__require('173'), - from = $__require('171'); - module.exports = function (NAME) { - return function toJSON() { - if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); - return from(this); - }; - }; -}); -$__System.registerDynamic('174', ['c6', '172', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // https://github.com/DavidBruant/Map-Set.prototype.toJSON - var $export = $__require('c6'); - - $export($export.P + $export.R, 'Map', { toJSON: $__require('172')('Map') }); -}); -$__System.registerDynamic('175', ['35', '176', '36', '170', '174', '37', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - $__require('35'); - $__require('176'); - $__require('36'); - $__require('170'); - $__require('174'); - module.exports = $__require('37').Map; -}); -$__System.registerDynamic("cf", ["175"], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - module.exports = { "default": $__require("175"), __esModule: true }; -}); -$__System.registerDynamic("177", ["30", "17", "cf", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _typeof2 = $__require("30"); - - var _typeof3 = _interopRequireDefault(_typeof2); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _map = $__require("cf"); - - var _map2 = _interopRequireDefault(_map); - - exports.evaluateTruthy = evaluateTruthy; - exports.evaluate = evaluate; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var VALID_CALLEES = ["String", "Number", "Math"]; - var INVALID_METHODS = ["random"]; - - function evaluateTruthy() { - var res = this.evaluate(); - if (res.confident) return !!res.value; - } - - function evaluate() { - var confident = true; - var deoptPath = void 0; - var seen = new _map2.default(); - - function deopt(path) { - if (!confident) return; - deoptPath = path; - confident = false; - } - - var value = evaluate(this); - if (!confident) value = undefined; - return { - confident: confident, - deopt: deoptPath, - value: value - }; - - function evaluate(path) { - var node = path.node; - - if (seen.has(node)) { - var existing = seen.get(node); - if (existing.resolved) { - return existing.value; - } else { - deopt(path); - return; - } - } else { - var item = { resolved: false }; - seen.set(node, item); - - var val = _evaluate(path); - if (confident) { - item.resolved = true; - item.value = val; - } - return val; - } - } - - function _evaluate(path) { - if (!confident) return; - - var node = path.node; - - if (path.isSequenceExpression()) { - var exprs = path.get("expressions"); - return evaluate(exprs[exprs.length - 1]); - } - - if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) { - return node.value; - } - - if (path.isNullLiteral()) { - return null; - } - - if (path.isTemplateLiteral()) { - var str = ""; - - var i = 0; - var _exprs = path.get("expressions"); - - for (var _iterator = node.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var elem = _ref; - - if (!confident) break; - - str += elem.value.cooked; - - var expr = _exprs[i++]; - if (expr) str += String(evaluate(expr)); - } - - if (!confident) return; - return str; - } - - if (path.isConditionalExpression()) { - var testResult = evaluate(path.get("test")); - if (!confident) return; - if (testResult) { - return evaluate(path.get("consequent")); - } else { - return evaluate(path.get("alternate")); - } - } - - if (path.isExpressionWrapper()) { - return evaluate(path.get("expression")); - } - - if (path.isMemberExpression() && !path.parentPath.isCallExpression({ callee: node })) { - var property = path.get("property"); - var object = path.get("object"); - - if (object.isLiteral() && property.isIdentifier()) { - var _value = object.node.value; - var type = typeof _value === "undefined" ? "undefined" : (0, _typeof3.default)(_value); - if (type === "number" || type === "string") { - return _value[property.node.name]; - } - } - } - - if (path.isReferencedIdentifier()) { - var binding = path.scope.getBinding(node.name); - - if (binding && binding.constantViolations.length > 0) { - return deopt(binding.path); - } - - if (binding && path.node.start < binding.path.node.end) { - return deopt(binding.path); - } - - if (binding && binding.hasValue) { - return binding.value; - } else { - if (node.name === "undefined") { - return binding ? deopt(binding.path) : undefined; - } else if (node.name === "Infinity") { - return binding ? deopt(binding.path) : Infinity; - } else if (node.name === "NaN") { - return binding ? deopt(binding.path) : NaN; - } - - var resolved = path.resolve(); - if (resolved === path) { - return deopt(path); - } else { - return evaluate(resolved); - } - } - } - - if (path.isUnaryExpression({ prefix: true })) { - if (node.operator === "void") { - return undefined; - } - - var argument = path.get("argument"); - if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) { - return "function"; - } - - var arg = evaluate(argument); - if (!confident) return; - switch (node.operator) { - case "!": - return !arg; - case "+": - return +arg; - case "-": - return -arg; - case "~": - return ~arg; - case "typeof": - return typeof arg === "undefined" ? "undefined" : (0, _typeof3.default)(arg); - } - } - - if (path.isArrayExpression()) { - var arr = []; - var elems = path.get("elements"); - for (var _iterator2 = elems, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _elem = _ref2; - - _elem = _elem.evaluate(); - - if (_elem.confident) { - arr.push(_elem.value); - } else { - return deopt(_elem); - } - } - return arr; - } - - if (path.isObjectExpression()) { - var obj = {}; - var props = path.get("properties"); - for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var prop = _ref3; - - if (prop.isObjectMethod() || prop.isSpreadProperty()) { - return deopt(prop); - } - var keyPath = prop.get("key"); - var key = keyPath; - if (prop.node.computed) { - key = key.evaluate(); - if (!key.confident) { - return deopt(keyPath); - } - key = key.value; - } else if (key.isIdentifier()) { - key = key.node.name; - } else { - key = key.node.value; - } - var valuePath = prop.get("value"); - var _value2 = valuePath.evaluate(); - if (!_value2.confident) { - return deopt(valuePath); - } - _value2 = _value2.value; - obj[key] = _value2; - } - return obj; - } - - if (path.isLogicalExpression()) { - var wasConfident = confident; - var left = evaluate(path.get("left")); - var leftConfident = confident; - confident = wasConfident; - var right = evaluate(path.get("right")); - var rightConfident = confident; - confident = leftConfident && rightConfident; - - switch (node.operator) { - case "||": - if (left && leftConfident) { - confident = true; - return left; - } - - if (!confident) return; - - return left || right; - case "&&": - if (!left && leftConfident || !right && rightConfident) { - confident = true; - } - - if (!confident) return; - - return left && right; - } - } - - if (path.isBinaryExpression()) { - var _left = evaluate(path.get("left")); - if (!confident) return; - var _right = evaluate(path.get("right")); - if (!confident) return; - - switch (node.operator) { - case "-": - return _left - _right; - case "+": - return _left + _right; - case "/": - return _left / _right; - case "*": - return _left * _right; - case "%": - return _left % _right; - case "**": - return Math.pow(_left, _right); - case "<": - return _left < _right; - case ">": - return _left > _right; - case "<=": - return _left <= _right; - case ">=": - return _left >= _right; - case "==": - return _left == _right; - case "!=": - return _left != _right; - case "===": - return _left === _right; - case "!==": - return _left !== _right; - case "|": - return _left | _right; - case "&": - return _left & _right; - case "^": - return _left ^ _right; - case "<<": - return _left << _right; - case ">>": - return _left >> _right; - case ">>>": - return _left >>> _right; - } - } - - if (path.isCallExpression()) { - var callee = path.get("callee"); - var context = void 0; - var func = void 0; - - if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) { - func = global[node.callee.name]; - } - - if (callee.isMemberExpression()) { - var _object = callee.get("object"); - var _property = callee.get("property"); - - if (_object.isIdentifier() && _property.isIdentifier() && VALID_CALLEES.indexOf(_object.node.name) >= 0 && INVALID_METHODS.indexOf(_property.node.name) < 0) { - context = global[_object.node.name]; - func = context[_property.node.name]; - } - - if (_object.isLiteral() && _property.isIdentifier()) { - var _type = (0, _typeof3.default)(_object.node.value); - if (_type === "string" || _type === "number") { - context = _object.node.value; - func = context[_property.node.name]; - } - } - } - - if (func) { - var args = path.get("arguments").map(evaluate); - if (!confident) return; - - return func.apply(context, args); - } - } - - deopt(path); - } - } -}); -$__System.registerDynamic("178", ["11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.toComputedKey = toComputedKey; - exports.ensureBlock = ensureBlock; - exports.arrowFunctionToShadowed = arrowFunctionToShadowed; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function toComputedKey() { - var node = this.node; - - var key = void 0; - if (this.isMemberExpression()) { - key = node.property; - } else if (this.isProperty() || this.isMethod()) { - key = node.key; - } else { - throw new ReferenceError("todo"); - } - - if (!node.computed) { - if (t.isIdentifier(key)) key = t.stringLiteral(key.name); - } - - return key; - } - - function ensureBlock() { - return t.ensureBlock(this.node); - } - - function arrowFunctionToShadowed() { - if (!this.isArrowFunctionExpression()) return; - - this.ensureBlock(); - - var node = this.node; - - node.expression = false; - node.type = "FunctionExpression"; - node.shadow = node.shadow || true; - } -}); -$__System.registerDynamic("179", ["17", "a5", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.is = undefined; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.matchesPattern = matchesPattern; - exports.has = has; - exports.isStatic = isStatic; - exports.isnt = isnt; - exports.equals = equals; - exports.isNodeType = isNodeType; - exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression; - exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement; - exports.isCompletionRecord = isCompletionRecord; - exports.isStatementOrBlock = isStatementOrBlock; - exports.referencesImport = referencesImport; - exports.getSource = getSource; - exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore; - exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo; - exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions; - exports.resolve = resolve; - exports._resolve = _resolve; - - var _includes = $__require("a5"); - - var _includes2 = _interopRequireDefault(_includes); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function matchesPattern(pattern, allowPartial) { - if (!this.isMemberExpression()) return false; - - var parts = pattern.split("."); - var search = [this.node]; - var i = 0; - - function matches(name) { - var part = parts[i]; - return part === "*" || name === part; - } - - while (search.length) { - var node = search.shift(); - - if (allowPartial && i === parts.length) { - return true; - } - - if (t.isIdentifier(node)) { - if (!matches(node.name)) return false; - } else if (t.isLiteral(node)) { - if (!matches(node.value)) return false; - } else if (t.isMemberExpression(node)) { - if (node.computed && !t.isLiteral(node.property)) { - return false; - } else { - search.unshift(node.property); - search.unshift(node.object); - continue; - } - } else if (t.isThisExpression(node)) { - if (!matches("this")) return false; - } else { - return false; - } - - if (++i > parts.length) { - return false; - } - } - - return i === parts.length; - } - - function has(key) { - var val = this.node && this.node[key]; - if (val && Array.isArray(val)) { - return !!val.length; - } else { - return !!val; - } - } - - function isStatic() { - return this.scope.isStatic(this.node); - } - - var is = exports.is = has; - - function isnt(key) { - return !this.has(key); - } - - function equals(key, value) { - return this.node[key] === value; - } - - function isNodeType(type) { - return t.isType(this.type, type); - } - - function canHaveVariableDeclarationOrExpression() { - return (this.key === "init" || this.key === "left") && this.parentPath.isFor(); - } - - function canSwapBetweenExpressionAndStatement(replacement) { - if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) { - return false; - } - - if (this.isExpression()) { - return t.isBlockStatement(replacement); - } else if (this.isBlockStatement()) { - return t.isExpression(replacement); - } - - return false; - } - - function isCompletionRecord(allowInsideFunction) { - var path = this; - var first = true; - - do { - var container = path.container; - - if (path.isFunction() && !first) { - return !!allowInsideFunction; - } - - first = false; - - if (Array.isArray(container) && path.key !== container.length - 1) { - return false; - } - } while ((path = path.parentPath) && !path.isProgram()); - - return true; - } - - function isStatementOrBlock() { - if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) { - return false; - } else { - return (0, _includes2.default)(t.STATEMENT_OR_BLOCK_KEYS, this.key); - } - } - - function referencesImport(moduleSource, importName) { - if (!this.isReferencedIdentifier()) return false; - - var binding = this.scope.getBinding(this.node.name); - if (!binding || binding.kind !== "module") return false; - - var path = binding.path; - var parent = path.parentPath; - if (!parent.isImportDeclaration()) return false; - - if (parent.node.source.value === moduleSource) { - if (!importName) return true; - } else { - return false; - } - - if (path.isImportDefaultSpecifier() && importName === "default") { - return true; - } - - if (path.isImportNamespaceSpecifier() && importName === "*") { - return true; - } - - if (path.isImportSpecifier() && path.node.imported.name === importName) { - return true; - } - - return false; - } - - function getSource() { - var node = this.node; - if (node.end) { - return this.hub.file.code.slice(node.start, node.end); - } else { - return ""; - } - } - - function willIMaybeExecuteBefore(target) { - return this._guessExecutionStatusRelativeTo(target) !== "after"; - } - - function _guessExecutionStatusRelativeTo(target) { - var targetFuncParent = target.scope.getFunctionParent(); - var selfFuncParent = this.scope.getFunctionParent(); - - if (targetFuncParent.node !== selfFuncParent.node) { - var status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent); - if (status) { - return status; - } else { - target = targetFuncParent.path; - } - } - - var targetPaths = target.getAncestry(); - if (targetPaths.indexOf(this) >= 0) return "after"; - - var selfPaths = this.getAncestry(); - - var commonPath = void 0; - var targetIndex = void 0; - var selfIndex = void 0; - for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) { - var selfPath = selfPaths[selfIndex]; - targetIndex = targetPaths.indexOf(selfPath); - if (targetIndex >= 0) { - commonPath = selfPath; - break; - } - } - if (!commonPath) { - return "before"; - } - - var targetRelationship = targetPaths[targetIndex - 1]; - var selfRelationship = selfPaths[selfIndex - 1]; - if (!targetRelationship || !selfRelationship) { - return "before"; - } - - if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) { - return targetRelationship.key > selfRelationship.key ? "before" : "after"; - } - - var targetKeyPosition = t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key); - var selfKeyPosition = t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key); - return targetKeyPosition > selfKeyPosition ? "before" : "after"; - } - - function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) { - var targetFuncPath = targetFuncParent.path; - if (!targetFuncPath.isFunctionDeclaration()) return; - - var binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name); - - if (!binding.references) return "before"; - - var referencePaths = binding.referencePaths; - - for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var path = _ref; - - if (path.key !== "callee" || !path.parentPath.isCallExpression()) { - return; - } - } - - var allStatus = void 0; - - for (var _iterator2 = referencePaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _path = _ref2; - - var childOfFunction = !!_path.find(function (path) { - return path.node === targetFuncPath.node; - }); - if (childOfFunction) continue; - - var status = this._guessExecutionStatusRelativeTo(_path); - - if (allStatus) { - if (allStatus !== status) return; - } else { - allStatus = status; - } - } - - return allStatus; - } - - function resolve(dangerous, resolved) { - return this._resolve(dangerous, resolved) || this; - } - - function _resolve(dangerous, resolved) { - if (resolved && resolved.indexOf(this) >= 0) return; - - resolved = resolved || []; - resolved.push(this); - - if (this.isVariableDeclarator()) { - if (this.get("id").isIdentifier()) { - return this.get("init").resolve(dangerous, resolved); - } else {} - } else if (this.isReferencedIdentifier()) { - var binding = this.scope.getBinding(this.node.name); - if (!binding) return; - - if (!binding.constant) return; - - if (binding.kind === "module") return; - - if (binding.path !== this) { - var ret = binding.path.resolve(dangerous, resolved); - - if (this.find(function (parent) { - return parent.node === ret.node; - })) return; - return ret; - } - } else if (this.isTypeCastExpression()) { - return this.get("expression").resolve(dangerous, resolved); - } else if (dangerous && this.isMemberExpression()) { - - var targetKey = this.toComputedKey(); - if (!t.isLiteral(targetKey)) return; - - var targetName = targetKey.value; - - var target = this.get("object").resolve(dangerous, resolved); - - if (target.isObjectExpression()) { - var props = target.get("properties"); - for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var prop = _ref3; - - if (!prop.isProperty()) continue; - - var key = prop.get("key"); - - var match = prop.isnt("computed") && key.isIdentifier({ name: targetName }); - - match = match || key.isLiteral({ value: targetName }); - - if (match) return prop.get("value").resolve(dangerous, resolved); - } - } else if (target.isArrayExpression() && !isNaN(+targetName)) { - var elems = target.get("elements"); - var elem = elems[targetName]; - if (elem) return elem.resolve(dangerous, resolved); - } - } - } -}); -$__System.registerDynamic("17a", ["17", "d0", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.call = call; - exports._call = _call; - exports.isBlacklisted = isBlacklisted; - exports.visit = visit; - exports.skip = skip; - exports.skipKey = skipKey; - exports.stop = stop; - exports.setScope = setScope; - exports.setContext = setContext; - exports.resync = resync; - exports._resyncParent = _resyncParent; - exports._resyncKey = _resyncKey; - exports._resyncList = _resyncList; - exports._resyncRemoved = _resyncRemoved; - exports.popContext = popContext; - exports.pushContext = pushContext; - exports.setup = setup; - exports.setKey = setKey; - exports.requeue = requeue; - exports._getQueueContexts = _getQueueContexts; - - var _index = $__require("d0"); - - var _index2 = _interopRequireDefault(_index); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function call(key) { - var opts = this.opts; - - this.debug(function () { - return key; - }); - - if (this.node) { - if (this._call(opts[key])) return true; - } - - if (this.node) { - return this._call(opts[this.node.type] && opts[this.node.type][key]); - } - - return false; - } - - function _call(fns) { - if (!fns) return false; - - for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var fn = _ref; - - if (!fn) continue; - - var node = this.node; - if (!node) return true; - - var ret = fn.call(this.state, this, this.state); - if (ret) throw new Error("Unexpected return value from visitor method " + fn); - - if (this.node !== node) return true; - - if (this.shouldStop || this.shouldSkip || this.removed) return true; - } - - return false; - } - - function isBlacklisted() { - var blacklist = this.opts.blacklist; - return blacklist && blacklist.indexOf(this.node.type) > -1; - } - - function visit() { - if (!this.node) { - return false; - } - - if (this.isBlacklisted()) { - return false; - } - - if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { - return false; - } - - if (this.call("enter") || this.shouldSkip) { - this.debug(function () { - return "Skip..."; - }); - return this.shouldStop; - } - - this.debug(function () { - return "Recursing into..."; - }); - _index2.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); - - this.call("exit"); - - return this.shouldStop; - } - - function skip() { - this.shouldSkip = true; - } - - function skipKey(key) { - this.skipKeys[key] = true; - } - - function stop() { - this.shouldStop = true; - this.shouldSkip = true; - } - - function setScope() { - if (this.opts && this.opts.noScope) return; - - var target = this.context && this.context.scope; - - if (!target) { - var path = this.parentPath; - while (path && !target) { - if (path.opts && path.opts.noScope) return; - - target = path.scope; - path = path.parentPath; - } - } - - this.scope = this.getScope(target); - if (this.scope) this.scope.init(); - } - - function setContext(context) { - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.skipKeys = {}; - - if (context) { - this.context = context; - this.state = context.state; - this.opts = context.opts; - } - - this.setScope(); - - return this; - } - - function resync() { - if (this.removed) return; - - this._resyncParent(); - this._resyncList(); - this._resyncKey(); - } - - function _resyncParent() { - if (this.parentPath) { - this.parent = this.parentPath.node; - } - } - - function _resyncKey() { - if (!this.container) return; - - if (this.node === this.container[this.key]) return; - - if (Array.isArray(this.container)) { - for (var i = 0; i < this.container.length; i++) { - if (this.container[i] === this.node) { - return this.setKey(i); - } - } - } else { - for (var key in this.container) { - if (this.container[key] === this.node) { - return this.setKey(key); - } - } - } - - this.key = null; - } - - function _resyncList() { - if (!this.parent || !this.inList) return; - - var newContainer = this.parent[this.listKey]; - if (this.container === newContainer) return; - - this.container = newContainer || null; - } - - function _resyncRemoved() { - if (this.key == null || !this.container || this.container[this.key] !== this.node) { - this._markRemoved(); - } - } - - function popContext() { - this.contexts.pop(); - this.setContext(this.contexts[this.contexts.length - 1]); - } - - function pushContext(context) { - this.contexts.push(context); - this.setContext(context); - } - - function setup(parentPath, container, listKey, key) { - this.inList = !!listKey; - this.listKey = listKey; - this.parentKey = listKey || key; - this.container = container; - - this.parentPath = parentPath || this.parentPath; - this.setKey(key); - } - - function setKey(key) { - this.key = key; - this.node = this.container[this.key]; - this.type = this.node && this.node.type; - } - - function requeue() { - var pathToQueue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this; - - if (pathToQueue.removed) return; - - var contexts = this.contexts; - - for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var context = _ref2; - - context.maybeQueue(pathToQueue); - } - } - - function _getQueueContexts() { - var path = this; - var contexts = this.contexts; - while (!contexts.length) { - path = path.parentPath; - contexts = path.contexts; - } - return contexts; - } -}); -$__System.registerDynamic("17b", ["c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - var hooks = exports.hooks = [function (self, parent) { - 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(); - - if (removeParent) { - parent.remove(); - return true; - } - }, function (self, parent) { - if (parent.isSequenceExpression() && parent.node.expressions.length === 1) { - parent.replaceWith(parent.node.expressions[0]); - return true; - } - }, function (self, parent) { - if (parent.isBinary()) { - if (self.key === "left") { - parent.replaceWith(parent.node.right); - } else { - parent.replaceWith(parent.node.left); - } - return true; - } - }, function (self, parent) { - if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { - self.replaceWith({ - type: "BlockStatement", - body: [] - }); - return true; - } - }]; -}); -$__System.registerDynamic("17c", ["17", "17b", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.remove = remove; - exports._callRemovalHooks = _callRemovalHooks; - exports._remove = _remove; - exports._markRemoved = _markRemoved; - exports._assertUnremoved = _assertUnremoved; - - var _removalHooks = $__require("17b"); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function remove() { - this._assertUnremoved(); - - this.resync(); - - if (this._callRemovalHooks()) { - this._markRemoved(); - return; - } - - this.shareCommentsWithSiblings(); - this._remove(); - this._markRemoved(); - } - - function _callRemovalHooks() { - for (var _iterator = _removalHooks.hooks, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var fn = _ref; - - if (fn(this, this.parentPath)) return true; - } - } - - function _remove() { - if (Array.isArray(this.container)) { - this.container.splice(this.key, 1); - this.updateSiblingKeys(this.key, -1); - } else { - this._replaceWith(null); - } - } - - function _markRemoved() { - this.shouldSkip = true; - this.removed = true; - this.node = null; - } - - function _assertUnremoved() { - if (this.removed) { - throw this.buildCodeFrameError("NodePath has been removed so is read-only."); - } - } -}); -$__System.registerDynamic("1d", [], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - exports.default = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - }; -}); -$__System.registerDynamic("17d", ["17", "1d", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var referenceVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) { - return; - } - - if (path.node.name === "this") { - var scope = path.scope; - do { - if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break; - } while (scope = scope.parent); - if (scope) state.breakOnScopePaths.push(scope.path); - } - - var binding = path.scope.getBinding(path.node.name); - if (!binding) return; - - if (binding !== state.scope.getBinding(path.node.name)) return; - - state.bindings[path.node.name] = binding; - } - }; - - var PathHoister = function () { - function PathHoister(path, scope) { - (0, _classCallCheck3.default)(this, PathHoister); - - this.breakOnScopePaths = []; - - this.bindings = {}; - - this.scopes = []; - - this.scope = scope; - this.path = path; - - this.attachAfter = false; - } - - PathHoister.prototype.isCompatibleScope = function isCompatibleScope(scope) { - for (var key in this.bindings) { - var binding = this.bindings[key]; - if (!scope.bindingIdentifierEquals(key, binding.identifier)) { - return false; - } - } - - return true; - }; - - PathHoister.prototype.getCompatibleScopes = function getCompatibleScopes() { - var scope = this.path.scope; - do { - if (this.isCompatibleScope(scope)) { - this.scopes.push(scope); - } else { - break; - } - - if (this.breakOnScopePaths.indexOf(scope.path) >= 0) { - break; - } - } while (scope = scope.parent); - }; - - PathHoister.prototype.getAttachmentPath = function getAttachmentPath() { - var path = this._getAttachmentPath(); - if (!path) return; - - var targetScope = path.scope; - - if (targetScope.path === path) { - targetScope = path.scope.parent; - } - - if (targetScope.path.isProgram() || targetScope.path.isFunction()) { - for (var name in this.bindings) { - if (!targetScope.hasOwnBinding(name)) continue; - - var binding = this.bindings[name]; - - if (binding.kind === "param") continue; - - if (this.getAttachmentParentForPath(binding.path).key > path.key) { - this.attachAfter = true; - path = binding.path; - - for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var violationPath = _ref; - - if (this.getAttachmentParentForPath(violationPath).key > path.key) { - path = violationPath; - } - } - } - } - } - - if (path.parentPath.isExportDeclaration()) { - path = path.parentPath; - } - - return path; - }; - - PathHoister.prototype._getAttachmentPath = function _getAttachmentPath() { - var scopes = this.scopes; - - var scope = scopes.pop(); - - if (!scope) return; - - if (scope.path.isFunction()) { - if (this.hasOwnParamBindings(scope)) { - if (this.scope === scope) return; - - return scope.path.get("body").get("body")[0]; - } else { - return this.getNextScopeAttachmentParent(); - } - } else if (scope.path.isProgram()) { - return this.getNextScopeAttachmentParent(); - } - }; - - PathHoister.prototype.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() { - var scope = this.scopes.pop(); - if (scope) return this.getAttachmentParentForPath(scope.path); - }; - - PathHoister.prototype.getAttachmentParentForPath = function getAttachmentParentForPath(path) { - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement() || path.isVariableDeclarator() && path.parentPath.node !== null && path.parentPath.node.declarations.length > 1) return path; - } while (path = path.parentPath); - }; - - PathHoister.prototype.hasOwnParamBindings = function hasOwnParamBindings(scope) { - for (var name in this.bindings) { - if (!scope.hasOwnBinding(name)) continue; - - var binding = this.bindings[name]; - - if (binding.kind === "param" && binding.constant) return true; - } - return false; - }; - - PathHoister.prototype.run = function run() { - var node = this.path.node; - if (node._hoisted) return; - node._hoisted = true; - - this.path.traverse(referenceVisitor, this); - - this.getCompatibleScopes(); - - var attachTo = this.getAttachmentPath(); - if (!attachTo) return; - - if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return; - - var uid = attachTo.scope.generateUidIdentifier("ref"); - var declarator = t.variableDeclarator(uid, this.path.node); - - var insertFn = this.attachAfter ? "insertAfter" : "insertBefore"; - attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]); - - var parent = this.path.parentPath; - if (parent.isJSXElement() && this.path.container === parent.node.children) { - uid = t.JSXExpressionContainer(uid); - } - - this.path.replaceWith(uid); - }; - - return PathHoister; - }(); - - exports.default = PathHoister; - module.exports = exports["default"]; -}); -$__System.registerDynamic("17e", ["30", "17", "153", "17d", "155", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _typeof2 = $__require("30"); - - var _typeof3 = _interopRequireDefault(_typeof2); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.insertBefore = insertBefore; - exports._containerInsert = _containerInsert; - exports._containerInsertBefore = _containerInsertBefore; - exports._containerInsertAfter = _containerInsertAfter; - exports._maybePopFromStatements = _maybePopFromStatements; - exports.insertAfter = insertAfter; - exports.updateSiblingKeys = updateSiblingKeys; - exports._verifyNodeList = _verifyNodeList; - exports.unshiftContainer = unshiftContainer; - exports.pushContainer = pushContainer; - exports.hoist = hoist; - - var _cache = $__require("153"); - - var _hoister = $__require("17d"); - - var _hoister2 = _interopRequireDefault(_hoister); - - var _index = $__require("155"); - - var _index2 = _interopRequireDefault(_index); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function insertBefore(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) { - return this.parentPath.insertBefore(nodes); - } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") { - if (this.node) nodes.push(this.node); - this.replaceExpressionWithStatements(nodes); - } else { - this._maybePopFromStatements(nodes); - if (Array.isArray(this.container)) { - return this._containerInsertBefore(nodes); - } else if (this.isStatementOrBlock()) { - if (this.node) nodes.push(this.node); - this._replaceWith(t.blockStatement(nodes)); - } else { - 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?"); - } - } - - return [this]; - } - - function _containerInsert(from, nodes) { - this.updateSiblingKeys(from, nodes.length); - - var paths = []; - - for (var i = 0; i < nodes.length; i++) { - var to = from + i; - var node = nodes[i]; - this.container.splice(to, 0, node); - - if (this.context) { - var path = this.context.create(this.parent, this.container, to, this.listKey); - - if (this.context.queue) path.pushContext(this.context); - paths.push(path); - } else { - paths.push(_index2.default.get({ - parentPath: this.parentPath, - parent: this.parent, - container: this.container, - listKey: this.listKey, - key: to - })); - } - } - - var contexts = this._getQueueContexts(); - - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _path = _ref; - - _path.setScope(); - _path.debug(function () { - return "Inserted."; - }); - - for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var context = _ref2; - - context.maybeQueue(_path, true); - } - } - - return paths; - } - - function _containerInsertBefore(nodes) { - return this._containerInsert(this.key, nodes); - } - - function _containerInsertAfter(nodes) { - return this._containerInsert(this.key + 1, nodes); - } - - function _maybePopFromStatements(nodes) { - var last = nodes[nodes.length - 1]; - var isIdentifier = t.isIdentifier(last) || t.isExpressionStatement(last) && t.isIdentifier(last.expression); - - if (isIdentifier && !this.isCompletionRecord()) { - nodes.pop(); - } - } - - function insertAfter(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) { - return this.parentPath.insertAfter(nodes); - } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") { - if (this.node) { - var temp = this.scope.generateDeclaredUidIdentifier(); - nodes.unshift(t.expressionStatement(t.assignmentExpression("=", temp, this.node))); - nodes.push(t.expressionStatement(temp)); - } - this.replaceExpressionWithStatements(nodes); - } else { - this._maybePopFromStatements(nodes); - if (Array.isArray(this.container)) { - return this._containerInsertAfter(nodes); - } else if (this.isStatementOrBlock()) { - if (this.node) nodes.unshift(this.node); - this._replaceWith(t.blockStatement(nodes)); - } else { - 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?"); - } - } - - return [this]; - } - - function updateSiblingKeys(fromIndex, incrementBy) { - if (!this.parent) return; - - var paths = _cache.path.get(this.parent); - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (path.key >= fromIndex) { - path.key += incrementBy; - } - } - } - - function _verifyNodeList(nodes) { - if (!nodes) { - return []; - } - - if (nodes.constructor !== Array) { - nodes = [nodes]; - } - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var msg = void 0; - - if (!node) { - msg = "has falsy node"; - } else if ((typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node)) !== "object") { - msg = "contains a non-object node"; - } else if (!node.type) { - msg = "without a type"; - } else if (node instanceof _index2.default) { - msg = "has a NodePath when it expected a raw object"; - } - - if (msg) { - var type = Array.isArray(node) ? "array" : typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node); - throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type); - } - } - - return nodes; - } - - function unshiftContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - var path = _index2.default.get({ - parentPath: this, - parent: this.node, - container: this.node[listKey], - listKey: listKey, - key: 0 - }); - - return path.insertBefore(nodes); - } - - function pushContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - var container = this.node[listKey]; - var path = _index2.default.get({ - parentPath: this, - parent: this.node, - container: container, - listKey: listKey, - key: container.length - }); - - return path.replaceWithMultiple(nodes); - } - - function hoist() { - var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.scope; - - var hoister = new _hoister2.default(this, scope); - return hoister.run(); - } -}); -$__System.registerDynamic("17f", ["d4", "17", "155", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _create = $__require("d4"); - - var _create2 = _interopRequireDefault(_create); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.getStatementParent = getStatementParent; - exports.getOpposite = getOpposite; - exports.getCompletionRecords = getCompletionRecords; - exports.getSibling = getSibling; - exports.getPrevSibling = getPrevSibling; - exports.getNextSibling = getNextSibling; - exports.getAllNextSiblings = getAllNextSiblings; - exports.getAllPrevSiblings = getAllPrevSiblings; - exports.get = get; - exports._getKey = _getKey; - exports._getPattern = _getPattern; - exports.getBindingIdentifiers = getBindingIdentifiers; - exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; - exports.getBindingIdentifierPaths = getBindingIdentifierPaths; - exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths; - - var _index = $__require("155"); - - var _index2 = _interopRequireDefault(_index); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function getStatementParent() { - var path = this; - - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { - break; - } else { - path = path.parentPath; - } - } while (path); - - if (path && (path.isProgram() || path.isFile())) { - throw new Error("File/Program node, we can't possibly find a statement parent to this"); - } - - return path; - } - - function getOpposite() { - if (this.key === "left") { - return this.getSibling("right"); - } else if (this.key === "right") { - return this.getSibling("left"); - } - } - - function getCompletionRecords() { - var paths = []; - - var add = function add(path) { - if (path) paths = paths.concat(path.getCompletionRecords()); - }; - - if (this.isIfStatement()) { - add(this.get("consequent")); - add(this.get("alternate")); - } else if (this.isDoExpression() || this.isFor() || this.isWhile()) { - add(this.get("body")); - } else if (this.isProgram() || this.isBlockStatement()) { - add(this.get("body").pop()); - } else if (this.isFunction()) { - return this.get("body").getCompletionRecords(); - } else if (this.isTryStatement()) { - add(this.get("block")); - add(this.get("handler")); - add(this.get("finalizer")); - } else { - paths.push(this); - } - - return paths; - } - - function getSibling(key) { - return _index2.default.get({ - parentPath: this.parentPath, - parent: this.parent, - container: this.container, - listKey: this.listKey, - key: key - }); - } - - function getPrevSibling() { - return this.getSibling(this.key - 1); - } - - function getNextSibling() { - return this.getSibling(this.key + 1); - } - - function getAllNextSiblings() { - var _key = this.key; - var sibling = this.getSibling(++_key); - var siblings = []; - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(++_key); - } - return siblings; - } - - function getAllPrevSiblings() { - var _key = this.key; - var sibling = this.getSibling(--_key); - var siblings = []; - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(--_key); - } - return siblings; - } - - function get(key, context) { - if (context === true) context = this.context; - var parts = key.split("."); - if (parts.length === 1) { - return this._getKey(key, context); - } else { - return this._getPattern(parts, context); - } - } - - function _getKey(key, context) { - var _this = this; - - var node = this.node; - var container = node[key]; - - if (Array.isArray(container)) { - return container.map(function (_, i) { - return _index2.default.get({ - listKey: key, - parentPath: _this, - parent: node, - container: container, - key: i - }).setContext(context); - }); - } else { - return _index2.default.get({ - parentPath: this, - parent: node, - container: node, - key: key - }).setContext(context); - } - } - - function _getPattern(parts, context) { - var path = this; - for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var part = _ref; - - if (part === ".") { - path = path.parentPath; - } else { - if (Array.isArray(path)) { - path = path[part]; - } else { - path = path.get(part, context); - } - } - } - return path; - } - - function getBindingIdentifiers(duplicates) { - return t.getBindingIdentifiers(this.node, duplicates); - } - - function getOuterBindingIdentifiers(duplicates) { - return t.getOuterBindingIdentifiers(this.node, duplicates); - } - - function getBindingIdentifierPaths() { - var duplicates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var outerOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var path = this; - var search = [].concat(path); - var ids = (0, _create2.default)(null); - - while (search.length) { - var id = search.shift(); - if (!id) continue; - if (!id.node) continue; - - var keys = t.getBindingIdentifiers.keys[id.node.type]; - - if (id.isIdentifier()) { - if (duplicates) { - var _ids = ids[id.node.name] = ids[id.node.name] || []; - _ids.push(id); - } else { - ids[id.node.name] = id; - } - continue; - } - - if (id.isExportDeclaration()) { - var declaration = id.get("declaration"); - if (declaration.isDeclaration()) { - search.push(declaration); - } - continue; - } - - if (outerOnly) { - if (id.isFunctionDeclaration()) { - search.push(id.get("id")); - continue; - } - if (id.isFunctionExpression()) { - continue; - } - } - - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var child = id.get(key); - if (Array.isArray(child) || child.node) { - search = search.concat(child); - } - } - } - } - - return ids; - } - - function getOuterBindingIdentifierPaths(duplicates) { - return this.getBindingIdentifierPaths(duplicates, true); - } -}); -$__System.registerDynamic("180", ["c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.shareCommentsWithSiblings = shareCommentsWithSiblings; - exports.addComment = addComment; - exports.addComments = addComments; - function shareCommentsWithSiblings() { - if (typeof this.key === "string") return; - - var node = this.node; - if (!node) return; - - var trailing = node.trailingComments; - var leading = node.leadingComments; - if (!trailing && !leading) return; - - var prev = this.getSibling(this.key - 1); - var next = this.getSibling(this.key + 1); - - if (!prev.node) prev = next; - if (!next.node) next = prev; - - prev.addComments("trailing", leading); - next.addComments("leading", trailing); - } - - function addComment(type, content, line) { - this.addComments(type, [{ - type: line ? "CommentLine" : "CommentBlock", - value: content - }]); - } - - function addComments(type, comments) { - if (!comments) return; - - var node = this.node; - if (!node) return; - - var key = type + "Comments"; - - if (node[key]) { - node[key] = node[key].concat(comments); - } else { - node[key] = comments; - } - } -}); -$__System.registerDynamic("155", ["17", "1d", "181", "5e", "141", "d0", "d1", "152", "11", "153", "154", "158", "161", "177", "178", "179", "17a", "17c", "17e", "17f", "180", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _virtualTypes = $__require("181"); - - var virtualTypes = _interopRequireWildcard(_virtualTypes); - - var _debug2 = $__require("5e"); - - var _debug3 = _interopRequireDefault(_debug2); - - var _invariant = $__require("141"); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _index = $__require("d0"); - - var _index2 = _interopRequireDefault(_index); - - var _assign = $__require("d1"); - - var _assign2 = _interopRequireDefault(_assign); - - var _scope = $__require("152"); - - var _scope2 = _interopRequireDefault(_scope); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _cache = $__require("153"); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var _debug = (0, _debug3.default)("babel"); - - var NodePath = function () { - function NodePath(hub, parent) { - (0, _classCallCheck3.default)(this, NodePath); - - this.parent = parent; - this.hub = hub; - this.contexts = []; - this.data = {}; - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.state = null; - this.opts = null; - this.skipKeys = null; - this.parentPath = null; - this.context = null; - this.container = null; - this.listKey = null; - this.inList = false; - this.parentKey = null; - this.key = null; - this.node = null; - this.scope = null; - this.type = null; - this.typeAnnotation = null; - } - - NodePath.get = function get(_ref) { - var hub = _ref.hub, - parentPath = _ref.parentPath, - parent = _ref.parent, - container = _ref.container, - listKey = _ref.listKey, - key = _ref.key; - - if (!hub && parentPath) { - hub = parentPath.hub; - } - - (0, _invariant2.default)(parent, "To get a node path the parent needs to exist"); - - var targetNode = container[key]; - - var paths = _cache.path.get(parent) || []; - if (!_cache.path.has(parent)) { - _cache.path.set(parent, paths); - } - - var path = void 0; - - for (var i = 0; i < paths.length; i++) { - var pathCheck = paths[i]; - if (pathCheck.node === targetNode) { - path = pathCheck; - break; - } - } - - if (!path) { - path = new NodePath(hub, parent); - paths.push(path); - } - - path.setup(parentPath, container, listKey, key); - - return path; - }; - - NodePath.prototype.getScope = function getScope(scope) { - var ourScope = scope; - - if (this.isScope()) { - ourScope = new _scope2.default(this, scope); - } - - return ourScope; - }; - - NodePath.prototype.setData = function setData(key, val) { - return this.data[key] = val; - }; - - NodePath.prototype.getData = function getData(key, def) { - var val = this.data[key]; - if (!val && def) val = this.data[key] = def; - return val; - }; - - NodePath.prototype.buildCodeFrameError = function buildCodeFrameError(msg) { - var Error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SyntaxError; - - return this.hub.file.buildCodeFrameError(this.node, msg, Error); - }; - - NodePath.prototype.traverse = function traverse(visitor, state) { - (0, _index2.default)(this.node, visitor, this.scope, state, this); - }; - - NodePath.prototype.mark = function mark(type, message) { - this.hub.file.metadata.marked.push({ - type: type, - message: message, - loc: this.node.loc - }); - }; - - NodePath.prototype.set = function set(key, node) { - t.validate(this.node, key, node); - this.node[key] = node; - }; - - NodePath.prototype.getPathLocation = function getPathLocation() { - var parts = []; - var path = this; - do { - var key = path.key; - if (path.inList) key = path.listKey + "[" + key + "]"; - parts.unshift(key); - } while (path = path.parentPath); - return parts.join("."); - }; - - NodePath.prototype.debug = function debug(buildMessage) { - if (!_debug.enabled) return; - _debug(this.getPathLocation() + " " + this.type + ": " + buildMessage()); - }; - - return NodePath; - }(); - - exports.default = NodePath; - - (0, _assign2.default)(NodePath.prototype, $__require("154")); - (0, _assign2.default)(NodePath.prototype, $__require("158")); - (0, _assign2.default)(NodePath.prototype, $__require("161")); - (0, _assign2.default)(NodePath.prototype, $__require("177")); - (0, _assign2.default)(NodePath.prototype, $__require("178")); - (0, _assign2.default)(NodePath.prototype, $__require("179")); - (0, _assign2.default)(NodePath.prototype, $__require("17a")); - (0, _assign2.default)(NodePath.prototype, $__require("17c")); - (0, _assign2.default)(NodePath.prototype, $__require("17e")); - (0, _assign2.default)(NodePath.prototype, $__require("17f")); - (0, _assign2.default)(NodePath.prototype, $__require("180")); - - var _loop2 = function _loop2() { - if (_isArray) { - if (_i >= _iterator.length) return "break"; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) return "break"; - _ref2 = _i.value; - } - - var type = _ref2; - - var typeKey = "is" + type; - NodePath.prototype[typeKey] = function (opts) { - return t[typeKey](this.node, opts); - }; - - NodePath.prototype["assert" + type] = function (opts) { - if (!this[typeKey](opts)) { - throw new TypeError("Expected node path of type " + type); - } - }; - }; - - for (var _iterator = t.TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - var _ret2 = _loop2(); - - if (_ret2 === "break") break; - } - - var _loop = function _loop(type) { - if (type[0] === "_") return "continue"; - if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type); - - var virtualType = virtualTypes[type]; - - NodePath.prototype["is" + type] = function (opts) { - return virtualType.checkPath(this, opts); - }; - }; - - for (var type in virtualTypes) { - var _ret = _loop(type); - - if (_ret === "continue") continue; - } - module.exports = exports["default"]; -}); -$__System.registerDynamic("182", ["17", "1d", "155", "11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _classCallCheck2 = $__require("1d"); - - var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - - var _path2 = $__require("155"); - - var _path3 = _interopRequireDefault(_path2); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var testing = "production" === "test"; - - var TraversalContext = function () { - function TraversalContext(scope, opts, state, parentPath) { - (0, _classCallCheck3.default)(this, TraversalContext); - this.queue = null; - - this.parentPath = parentPath; - this.scope = scope; - this.state = state; - this.opts = opts; - } - - TraversalContext.prototype.shouldVisit = function shouldVisit(node) { - var opts = this.opts; - if (opts.enter || opts.exit) return true; - - if (opts[node.type]) return true; - - var keys = t.VISITOR_KEYS[node.type]; - if (!keys || !keys.length) return false; - - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var key = _ref; - - if (node[key]) return true; - } - - return false; - }; - - TraversalContext.prototype.create = function create(node, obj, key, listKey) { - return _path3.default.get({ - parentPath: this.parentPath, - parent: node, - container: obj, - key: key, - listKey: listKey - }); - }; - - TraversalContext.prototype.maybeQueue = function maybeQueue(path, notPriority) { - if (this.trap) { - throw new Error("Infinite cycle detected"); - } - - if (this.queue) { - if (notPriority) { - this.queue.push(path); - } else { - this.priorityQueue.push(path); - } - } - }; - - TraversalContext.prototype.visitMultiple = function visitMultiple(container, parent, listKey) { - if (container.length === 0) return false; - - var queue = []; - - for (var key = 0; key < container.length; key++) { - var node = container[key]; - if (node && this.shouldVisit(node)) { - queue.push(this.create(parent, container, key, listKey)); - } - } - - return this.visitQueue(queue); - }; - - TraversalContext.prototype.visitSingle = function visitSingle(node, key) { - if (this.shouldVisit(node[key])) { - return this.visitQueue([this.create(node, node, key)]); - } else { - return false; - } - }; - - TraversalContext.prototype.visitQueue = function visitQueue(queue) { - this.queue = queue; - this.priorityQueue = []; - - var visited = []; - var stop = false; - - for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var path = _ref2; - - path.resync(); - - if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { - path.pushContext(this); - } - - if (path.key === null) continue; - - if (testing && queue.length >= 10000) { - this.trap = true; - } - - if (visited.indexOf(path.node) >= 0) continue; - visited.push(path.node); - - if (path.visit()) { - stop = true; - break; - } - - if (this.priorityQueue.length) { - stop = this.visitQueue(this.priorityQueue); - this.priorityQueue = []; - this.queue = queue; - if (stop) break; - } - } - - for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var _path = _ref3; - - _path.popContext(); - } - - this.queue = null; - - return stop; - }; - - TraversalContext.prototype.visit = function visit(node, key) { - var nodes = node[key]; - if (!nodes) return false; - - if (Array.isArray(nodes)) { - return this.visitMultiple(nodes, node, key); - } else { - return this.visitSingle(node, key); - } - }; - - return TraversalContext; - }(); - - exports.default = TraversalContext; - module.exports = exports["default"]; -}); -$__System.registerDynamic("181", ["11", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = undefined; - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - var ReferencedIdentifier = exports.ReferencedIdentifier = { - types: ["Identifier", "JSXIdentifier"], - checkPath: function checkPath(_ref, opts) { - var node = _ref.node, - parent = _ref.parent; - - if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) { - if (t.isJSXIdentifier(node, opts)) { - if (_babelTypes.react.isCompatTag(node.name)) return false; - } else { - return false; - } - } - - return t.isReferenced(node, parent); - } - }; - - var ReferencedMemberExpression = exports.ReferencedMemberExpression = { - types: ["MemberExpression"], - checkPath: function checkPath(_ref2) { - var node = _ref2.node, - parent = _ref2.parent; - - return t.isMemberExpression(node) && t.isReferenced(node, parent); - } - }; - - var BindingIdentifier = exports.BindingIdentifier = { - types: ["Identifier"], - checkPath: function checkPath(_ref3) { - var node = _ref3.node, - parent = _ref3.parent; - - return t.isIdentifier(node) && t.isBinding(node, parent); - } - }; - - var Statement = exports.Statement = { - types: ["Statement"], - checkPath: function checkPath(_ref4) { - var node = _ref4.node, - parent = _ref4.parent; - - if (t.isStatement(node)) { - if (t.isVariableDeclaration(node)) { - if (t.isForXStatement(parent, { left: node })) return false; - if (t.isForStatement(parent, { init: node })) return false; - } - - return true; - } else { - return false; - } - } - }; - - var Expression = exports.Expression = { - types: ["Expression"], - checkPath: function checkPath(path) { - if (path.isIdentifier()) { - return path.isReferencedIdentifier(); - } else { - return t.isExpression(path.node); - } - } - }; - - var Scope = exports.Scope = { - types: ["Scopable"], - checkPath: function checkPath(path) { - return t.isScope(path.node, path.parent); - } - }; - - var Referenced = exports.Referenced = { - checkPath: function checkPath(path) { - return t.isReferenced(path.node, path.parent); - } - }; - - var BlockScoped = exports.BlockScoped = { - checkPath: function checkPath(path) { - return t.isBlockScoped(path.node); - } - }; - - var Var = exports.Var = { - types: ["VariableDeclaration"], - checkPath: function checkPath(path) { - return t.isVar(path.node); - } - }; - - var User = exports.User = { - checkPath: function checkPath(path) { - return path.node && !!path.node.loc; - } - }; - - var Generated = exports.Generated = { - checkPath: function checkPath(path) { - return !path.isUser(); - } - }; - - var Pure = exports.Pure = { - checkPath: function checkPath(path, opts) { - return path.scope.isPure(path.node, opts); - } - }; - - var Flow = exports.Flow = { - types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], - checkPath: function checkPath(_ref5) { - var node = _ref5.node; - - if (t.isFlow(node)) { - return true; - } else if (t.isImportDeclaration(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else if (t.isExportDeclaration(node)) { - return node.exportKind === "type"; - } else if (t.isImportSpecifier(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else { - return false; - } - } - }; -}); -$__System.registerDynamic("183", ["30", "15", "17", "181", "f", "11", "ce", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - - var _typeof2 = $__require("30"); - - var _typeof3 = _interopRequireDefault(_typeof2); - - var _keys = $__require("15"); - - var _keys2 = _interopRequireDefault(_keys); - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - exports.explode = explode; - exports.verify = verify; - exports.merge = merge; - - var _virtualTypes = $__require("181"); - - var virtualTypes = _interopRequireWildcard(_virtualTypes); - - var _babelMessages = $__require("f"); - - var messages = _interopRequireWildcard(_babelMessages); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _clone = $__require("ce"); - - var _clone2 = _interopRequireDefault(_clone); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - function explode(visitor) { - if (visitor._exploded) return visitor; - visitor._exploded = true; - - for (var nodeType in visitor) { - if (shouldIgnoreKey(nodeType)) continue; - - var parts = nodeType.split("|"); - if (parts.length === 1) continue; - - var fns = visitor[nodeType]; - delete visitor[nodeType]; - - for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var part = _ref; - - visitor[part] = fns; - } - } - - verify(visitor); - - delete visitor.__esModule; - - ensureEntranceObjects(visitor); - - ensureCallbackArrays(visitor); - - for (var _iterator2 = (0, _keys2.default)(visitor), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _nodeType3 = _ref2; - - if (shouldIgnoreKey(_nodeType3)) continue; - - var wrapper = virtualTypes[_nodeType3]; - if (!wrapper) continue; - - var _fns2 = visitor[_nodeType3]; - for (var type in _fns2) { - _fns2[type] = wrapCheck(wrapper, _fns2[type]); - } - - delete visitor[_nodeType3]; - - if (wrapper.types) { - for (var _iterator4 = wrapper.types, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var _type = _ref4; - - if (visitor[_type]) { - mergePair(visitor[_type], _fns2); - } else { - visitor[_type] = _fns2; - } - } - } else { - mergePair(visitor, _fns2); - } - } - - for (var _nodeType in visitor) { - if (shouldIgnoreKey(_nodeType)) continue; - - var _fns = visitor[_nodeType]; - - var aliases = t.FLIPPED_ALIAS_KEYS[_nodeType]; - - var deprecratedKey = t.DEPRECATED_KEYS[_nodeType]; - if (deprecratedKey) { - console.trace("Visitor defined for " + _nodeType + " but it has been renamed to " + deprecratedKey); - aliases = [deprecratedKey]; - } - - if (!aliases) continue; - - delete visitor[_nodeType]; - - for (var _iterator3 = aliases, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var alias = _ref3; - - var existing = visitor[alias]; - if (existing) { - mergePair(existing, _fns); - } else { - visitor[alias] = (0, _clone2.default)(_fns); - } - } - } - - for (var _nodeType2 in visitor) { - if (shouldIgnoreKey(_nodeType2)) continue; - - ensureCallbackArrays(visitor[_nodeType2]); - } - - return visitor; - } - - function verify(visitor) { - if (visitor._verified) return; - - if (typeof visitor === "function") { - throw new Error(messages.get("traverseVerifyRootFunction")); - } - - for (var nodeType in visitor) { - if (nodeType === "enter" || nodeType === "exit") { - validateVisitorMethods(nodeType, visitor[nodeType]); - } - - if (shouldIgnoreKey(nodeType)) continue; - - if (t.TYPES.indexOf(nodeType) < 0) { - throw new Error(messages.get("traverseVerifyNodeType", nodeType)); - } - - var visitors = visitor[nodeType]; - if ((typeof visitors === "undefined" ? "undefined" : (0, _typeof3.default)(visitors)) === "object") { - for (var visitorKey in visitors) { - if (visitorKey === "enter" || visitorKey === "exit") { - validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]); - } else { - throw new Error(messages.get("traverseVerifyVisitorProperty", nodeType, visitorKey)); - } - } - } - } - - visitor._verified = true; - } - - function validateVisitorMethods(path, val) { - var fns = [].concat(val); - for (var _iterator5 = fns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var fn = _ref5; - - if (typeof fn !== "function") { - throw new TypeError("Non-function found defined in " + path + " with type " + (typeof fn === "undefined" ? "undefined" : (0, _typeof3.default)(fn))); - } - } - } - - function merge(visitors) { - var states = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - var wrapper = arguments[2]; - - var rootVisitor = {}; - - for (var i = 0; i < visitors.length; i++) { - var visitor = visitors[i]; - var state = states[i]; - - explode(visitor); - - for (var type in visitor) { - var visitorType = visitor[type]; - - if (state || wrapper) { - visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); - } - - var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; - mergePair(nodeVisitor, visitorType); - } - } - - return rootVisitor; - } - - function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { - var newVisitor = {}; - - var _loop = function _loop(key) { - var fns = oldVisitor[key]; - - if (!Array.isArray(fns)) return "continue"; - - fns = fns.map(function (fn) { - var newFn = fn; - - if (state) { - newFn = function newFn(path) { - return fn.call(state, path, state); - }; - } - - if (wrapper) { - newFn = wrapper(state.key, key, newFn); - } - - return newFn; - }); - - newVisitor[key] = fns; - }; - - for (var key in oldVisitor) { - var _ret = _loop(key); - - if (_ret === "continue") continue; - } - - return newVisitor; - } - - function ensureEntranceObjects(obj) { - for (var key in obj) { - if (shouldIgnoreKey(key)) continue; - - var fns = obj[key]; - if (typeof fns === "function") { - obj[key] = { enter: fns }; - } - } - } - - function ensureCallbackArrays(obj) { - if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; - if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; - } - - function wrapCheck(wrapper, fn) { - var newFn = function newFn(path) { - if (wrapper.checkPath(path)) { - return fn.apply(this, arguments); - } - }; - newFn.toString = function () { - return fn.toString(); - }; - return newFn; - } - - function shouldIgnoreKey(key) { - if (key[0] === "_") return true; - - if (key === "enter" || key === "exit" || key === "shouldSkip") return true; - - if (key === "blacklist" || key === "noScope" || key === "skipKeys") return true; - - return false; - } - - function mergePair(dest, src) { - for (var key in src) { - dest[key] = [].concat(dest[key] || [], src[key]); - } - } -}); -$__System.registerDynamic("f", ["5b", "@node/util"], true, function ($__require, exports, module) { - "use strict"; - - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.MESSAGES = undefined; - - var _stringify = $__require("5b"); - - var _stringify2 = _interopRequireDefault(_stringify); - - exports.get = get; - exports.parseArgs = parseArgs; - - var _util = $__require("@node/util"); - - var util = _interopRequireWildcard(_util); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var MESSAGES = exports.MESSAGES = { - tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence", - classesIllegalBareSuper: "Illegal use of bare super", - classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead", - scopeDuplicateDeclaration: "Duplicate declaration $1", - settersNoRest: "Setters aren't allowed to have a rest", - noAssignmentsInForHead: "No assignments allowed in for-in/of head", - expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier", - invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue", - readOnly: "$1 is read-only", - unknownForHead: "Unknown node type $1 in ForStatement", - didYouMean: "Did you mean $1?", - codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.", - missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", - unsupportedOutputType: "Unsupported output type $1", - illegalMethodName: "Illegal method name $1", - lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated", - - modulesIllegalExportName: "Illegal export $1", - modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes", - - undeclaredVariable: "Reference to undeclared variable $1", - undeclaredVariableType: "Referencing a type alias outside of a type annotation", - undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?", - - traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.", - traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", - traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2", - traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type", - - pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3", - pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3", - pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4", - pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3" - }; - - function get(key) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var msg = MESSAGES[key]; - if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key)); - - args = parseArgs(args); - - return msg.replace(/\$(\d+)/g, function (str, i) { - return args[i - 1]; - }); - } - - function parseArgs(args) { - return args.map(function (val) { - if (val != null && val.inspect) { - return val.inspect(); - } else { - try { - return (0, _stringify2.default)(val) || val + ""; - } catch (e) { - return util.inspect(val); - } - } - }); - } -}); -$__System.registerDynamic('184', ['185', '4b', '7b'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseGetTag = $__require('185'), - isArray = $__require('4b'), - isObjectLike = $__require('7b'); - - /** `Object#toString` result references. */ - var stringTag = '[object String]'; - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; - } - - module.exports = isString; -}); -$__System.registerDynamic('90', ['185', '7b'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseGetTag = $__require('185'), - isObjectLike = $__require('7b'); - - /** `Object#toString` result references. */ - var symbolTag = '[object Symbol]'; - - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - function isSymbol(value) { - return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag; - } - - module.exports = isSymbol; -}); -$__System.registerDynamic('186', ['81', '90'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var isObject = $__require('81'), - isSymbol = $__require('90'); - - /** Used as references for various `Number` constants. */ - var NAN = 0 / 0; - - /** Used to match leading and trailing whitespace. */ - var reTrim = /^\s+|\s+$/g; - - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; - - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; - - /** Built-in method references without a dependency on `root`. */ - var freeParseInt = parseInt; - - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ - function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? other + '' : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; - } - - module.exports = toNumber; -}); -$__System.registerDynamic('187', ['186'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var toNumber = $__require('186'); - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - - /** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = value < 0 ? -1 : 1; - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } - - module.exports = toFinite; -}); -$__System.registerDynamic('3c', ['187'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var toFinite = $__require('187'); - - /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ - function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? remainder ? result - remainder : result : 0; - } - - module.exports = toInteger; -}); -$__System.registerDynamic("49", [], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - - module.exports = arrayMap; -}); -$__System.registerDynamic('188', ['49'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var arrayMap = $__require('49'); - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return arrayMap(props, function (key) { - return object[key]; - }); - } - - module.exports = baseValues; -}); -$__System.registerDynamic('189', ['188', '40'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseValues = $__require('188'), - keys = $__require('40'); - - /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); - } - - module.exports = values; -}); -$__System.registerDynamic('a5', ['127', '3f', '184', '3c', '189'], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - var baseIndexOf = $__require('127'), - isArrayLike = $__require('3f'), - isString = $__require('184'), - toInteger = $__require('3c'), - values = $__require('189'); - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeMax = Math.max; - - /** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ - function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; - } - - module.exports = includes; -}); -$__System.registerDynamic('c7', ['18a', '18b', '18c', '18d', '18e', '18f', 'c'], true, function ($__require, exports, module) { - 'use strict'; - // 19.1.2.1 Object.assign(target, source, ...) - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var getKeys = $__require('18a'), - gOPS = $__require('18b'), - pIE = $__require('18c'), - toObject = $__require('18d'), - IObject = $__require('18e'), - $assign = Object.assign; - - // should work with symbols and should have deterministic property order (V8 bug) - module.exports = !$assign || $__require('18f')(function () { - var A = {}, - B = {}, - S = Symbol(), - K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { - B[k] = k; - }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; - }) ? function assign(target, source) { - // eslint-disable-line no-unused-vars - var T = toObject(target), - aLen = arguments.length, - index = 1, - getSymbols = gOPS.f, - isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]), - keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), - length = keys.length, - j = 0, - key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - }return T; - } : $assign; -}); -$__System.registerDynamic('32', ['169', '16f', '10b', '10a', '16a', '16c', '190', '191', 'c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var redefineAll = $__require('169'), - getWeak = $__require('16f').getWeak, - anObject = $__require('10b'), - isObject = $__require('10a'), - anInstance = $__require('16a'), - forOf = $__require('16c'), - createArrayMethod = $__require('190'), - $has = $__require('191'), - arrayFind = createArrayMethod(5), - arrayFindIndex = createArrayMethod(6), - id = 0; - - // fallback for uncaught frozen keys - var uncaughtFrozenStore = function (that) { - return that._l || (that._l = new UncaughtFrozenStore()); - }; - var UncaughtFrozenStore = function () { - this.a = []; - }; - var findUncaughtFrozen = function (store, key) { - return arrayFind(store.a, function (it) { - return it[0] === key; - }); - }; - UncaughtFrozenStore.prototype = { - get: function (key) { - var entry = findUncaughtFrozen(this, key); - if (entry) return entry[1]; - }, - has: function (key) { - return !!findUncaughtFrozen(this, key); - }, - set: function (key, value) { - var entry = findUncaughtFrozen(this, key); - if (entry) entry[1] = value;else this.a.push([key, value]); - }, - 'delete': function (key) { - var index = arrayFindIndex(this.a, function (it) { - return it[0] === key; - }); - if (~index) this.a.splice(index, 1); - return !!~index; - } - }; - - module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._i = id++; // collection id - that._l = undefined; // leak store for uncaught frozen objects - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.3.3.2 WeakMap.prototype.delete(key) - // 23.4.3.3 WeakSet.prototype.delete(value) - 'delete': function (key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(this)['delete'](key); - return data && $has(data, this._i) && delete data[this._i]; - }, - // 23.3.3.4 WeakMap.prototype.has(key) - // 23.4.3.4 WeakSet.prototype.has(value) - has: function has(key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(this).has(key); - return data && $has(data, this._i); - } - }); - return C; - }, - def: function (that, key, value) { - var data = getWeak(anObject(key), true); - if (data === true) uncaughtFrozenStore(that).set(key, value);else data[that._i] = value; - return that; - }, - ufstore: uncaughtFrozenStore - }; -}); -$__System.registerDynamic('169', ['192', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var hide = $__require('192'); - module.exports = function (target, src, safe) { - for (var key in src) { - if (safe && target[key]) target[key] = src[key];else hide(target, key, src[key]); - }return target; - }; -}); -$__System.registerDynamic('193', ['10b', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // call something on iterator step with safe closing on error - var anObject = $__require('10b'); - module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } - }; -}); -$__System.registerDynamic('194', ['195', '166', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // check on default Array iterator - var Iterators = $__require('195'), - ITERATOR = $__require('166')('iterator'), - ArrayProto = Array.prototype; - - module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); - }; -}); -$__System.registerDynamic('16c', ['10c', '193', '194', '10b', '196', '197', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var ctx = $__require('10c'), - call = $__require('193'), - isArrayIter = $__require('194'), - anObject = $__require('10b'), - toLength = $__require('196'), - getIterFn = $__require('197'), - BREAK = {}, - RETURN = {}; - var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { - return iterable; - } : getIterFn(iterable), - f = ctx(fn, that, entries ? 2 : 1), - index = 0, - length, - step, - iterator, - result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } - }; - exports.BREAK = BREAK; - exports.RETURN = RETURN; -}); -$__System.registerDynamic('16a', ['c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) { - throw TypeError(name + ': incorrect invocation!'); - }return it; - }; -}); -$__System.registerDynamic('198', ['10a', '199', '166', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var isObject = $__require('10a'), - isArray = $__require('199'), - SPECIES = $__require('166')('species'); - - module.exports = function (original) { - var C; - if (isArray(original)) { - C = original.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - }return C === undefined ? Array : C; - }; -}); -$__System.registerDynamic('19a', ['198', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // 9.4.2.3 ArraySpeciesCreate(originalArray, length) - var speciesConstructor = $__require('198'); - - module.exports = function (original, length) { - return new (speciesConstructor(original))(length); - }; -}); -$__System.registerDynamic('190', ['10c', '18e', '18d', '196', '19a', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - // 0 -> Array#forEach - // 1 -> Array#map - // 2 -> Array#filter - // 3 -> Array#some - // 4 -> Array#every - // 5 -> Array#find - // 6 -> Array#findIndex - var ctx = $__require('10c'), - IObject = $__require('18e'), - toObject = $__require('18d'), - toLength = $__require('196'), - asc = $__require('19a'); - module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1, - IS_FILTER = TYPE == 2, - IS_SOME = TYPE == 3, - IS_EVERY = TYPE == 4, - IS_FIND_INDEX = TYPE == 6, - NO_HOLES = TYPE == 5 || IS_FIND_INDEX, - create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this), - self = IObject(O), - f = ctx(callbackfn, that, 3), - length = toLength(self.length), - index = 0, - result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined, - val, - res; - for (; length > index; index++) if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res; // map - else if (res) switch (TYPE) { - case 3: - return true; // some - case 5: - return val; // find - case 6: - return index; // findIndex - case 2: - result.push(val); // filter - } else if (IS_EVERY) return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; - }; -}); -$__System.registerDynamic('33', ['163', 'c6', '16f', '18f', '192', '169', '16c', '16a', '10a', '19b', '164', '190', '165', 'c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var global = $__require('163'), - $export = $__require('c6'), - meta = $__require('16f'), - fails = $__require('18f'), - hide = $__require('192'), - redefineAll = $__require('169'), - forOf = $__require('16c'), - anInstance = $__require('16a'), - isObject = $__require('10a'), - setToStringTag = $__require('19b'), - dP = $__require('164').f, - each = $__require('190')(0), - DESCRIPTORS = $__require('165'); - - module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { - var Base = global[NAME], - C = Base, - ADDER = IS_MAP ? 'set' : 'add', - proto = C && C.prototype, - O = {}; - if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { - new C().entries().next(); - }))) { - // create collection constructor - C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); - redefineAll(C.prototype, methods); - meta.NEED = true; - } else { - C = wrapper(function (target, iterable) { - anInstance(target, C, NAME, '_c'); - target._c = new Base(); - if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); - }); - each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { - var IS_ADDER = KEY == 'add' || KEY == 'set'; - if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { - anInstance(this, C, KEY); - if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; - var result = this._c[KEY](a === 0 ? 0 : a, b); - return IS_ADDER ? this : result; - }); - }); - if ('size' in proto) dP(C.prototype, 'size', { - get: function () { - return this._c.size; - } - }); - } - - setToStringTag(C, NAME); - - O[NAME] = C; - $export($export.G + $export.W + $export.F, O); - - if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); - - return C; - }; -}); -$__System.registerDynamic('19c', ['190', '19d', '16f', 'c7', '32', '10a', '33', 'c'], true, function ($__require, exports, module) { - 'use strict'; - - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - var each = $__require('190')(0), - redefine = $__require('19d'), - meta = $__require('16f'), - assign = $__require('c7'), - weak = $__require('32'), - isObject = $__require('10a'), - getWeak = meta.getWeak, - isExtensible = Object.isExtensible, - uncaughtFrozenStore = weak.ufstore, - tmp = {}, - InternalMap; - - var wrapper = function (get) { - return function WeakMap() { - return get(this, arguments.length > 0 ? arguments[0] : undefined); - }; - }; - - var methods = { - // 23.3.3.3 WeakMap.prototype.get(key) - get: function get(key) { - if (isObject(key)) { - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(this).get(key); - return data ? data[this._i] : undefined; - } - }, - // 23.3.3.5 WeakMap.prototype.set(key, value) - set: function set(key, value) { - return weak.def(this, key, value); - } - }; - - // 23.3 WeakMap Objects - var $WeakMap = module.exports = $__require('33')('WeakMap', wrapper, methods, weak, true, true); - - // IE11 WeakMap frozen keys fix - if (new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7) { - InternalMap = weak.getConstructor(wrapper); - assign(InternalMap.prototype, methods); - meta.NEED = true; - each(['delete', 'has', 'get', 'set'], function (key) { - var proto = $WeakMap.prototype, - method = proto[key]; - redefine(proto, key, function (a, b) { - // store frozen objects on internal weakmap shim - if (isObject(a) && !isExtensible(a)) { - if (!this._f) this._f = new InternalMap(); - var result = this._f[key](a, b); - return key == 'set' ? this : result; - // store all the rest on native weakmap - }return method.call(this, a, b); - }); - }); - } -}); -$__System.registerDynamic('19e', ['35', '36', '19c', '37', 'c'], true, function ($__require, exports, module) { - var process = $__require('c'); - var global = this || self, - GLOBAL = global; - $__require('35'); - $__require('36'); - $__require('19c'); - module.exports = $__require('37').WeakMap; -}); -$__System.registerDynamic("19f", ["19e"], true, function ($__require, exports, module) { - var global = this || self, - GLOBAL = global; - module.exports = { "default": $__require("19e"), __esModule: true }; -}); -$__System.registerDynamic("153", ["19f", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.scope = exports.path = undefined; - - var _weakMap = $__require("19f"); - - var _weakMap2 = _interopRequireDefault(_weakMap); - - exports.clear = clear; - exports.clearPath = clearPath; - exports.clearScope = clearScope; - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var path = exports.path = new _weakMap2.default(); - var scope = exports.scope = new _weakMap2.default(); - - function clear() { - clearPath(); - clearScope(); - } - - function clearPath() { - exports.path = path = new _weakMap2.default(); - } - - function clearScope() { - exports.scope = scope = new _weakMap2.default(); - } -}); -$__System.registerDynamic("d0", ["17", "155", "152", "13e", "182", "183", "f", "a5", "11", "153", "c"], true, function ($__require, exports, module) { - "use strict"; - - var process = $__require("c"); - var global = this || self, - GLOBAL = global; - exports.__esModule = true; - exports.visitors = exports.Hub = exports.Scope = exports.NodePath = undefined; - - var _getIterator2 = $__require("17"); - - var _getIterator3 = _interopRequireDefault(_getIterator2); - - var _path = $__require("155"); - - Object.defineProperty(exports, "NodePath", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_path).default; - } - }); - - var _scope = $__require("152"); - - Object.defineProperty(exports, "Scope", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_scope).default; - } - }); - - var _hub = $__require("13e"); - - Object.defineProperty(exports, "Hub", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_hub).default; - } - }); - exports.default = traverse; - - var _context = $__require("182"); - - var _context2 = _interopRequireDefault(_context); - - var _visitors = $__require("183"); - - var visitors = _interopRequireWildcard(_visitors); - - var _babelMessages = $__require("f"); - - var messages = _interopRequireWildcard(_babelMessages); - - var _includes = $__require("a5"); - - var _includes2 = _interopRequireDefault(_includes); - - var _babelTypes = $__require("11"); - - var t = _interopRequireWildcard(_babelTypes); - - var _cache = $__require("153"); - - var cache = _interopRequireWildcard(_cache); - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {};if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - }newObj.default = obj;return newObj; - } - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - exports.visitors = visitors; - function traverse(parent, opts, scope, state, parentPath) { - if (!parent) return; - if (!opts) opts = {}; - - if (!opts.noScope && !scope) { - if (parent.type !== "Program" && parent.type !== "File") { - throw new Error(messages.get("traverseNeedsParent", parent.type)); - } - } - - visitors.explode(opts); - - traverse.node(parent, opts, scope, state, parentPath); - } - - traverse.visitors = visitors; - traverse.verify = visitors.verify; - traverse.explode = visitors.explode; - - traverse.NodePath = $__require("155"); - traverse.Scope = $__require("152"); - traverse.Hub = $__require("13e"); - - traverse.cheap = function (node, enter) { - return t.traverseFast(node, enter); - }; - - traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { - var keys = t.VISITOR_KEYS[node.type]; - if (!keys) return; - - var context = new _context2.default(scope, opts, state, parentPath); - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var key = _ref; - - if (skipKeys && skipKeys[key]) continue; - if (context.visit(node, key)) return; - } - }; - - traverse.clearNode = function (node, opts) { - t.removeProperties(node, opts); - - cache.path.delete(node); - }; - - traverse.removeProperties = function (tree, opts) { - t.traverseFast(tree, traverse.clearNode, opts); - return tree; - }; - - function hasBlacklistedType(path, state) { - if (path.node.type === state.type) { - state.has = true; - path.stop(); - } - } - - traverse.hasType = function (tree, scope, type, blacklistTypes) { - if ((0, _includes2.default)(blacklistTypes, tree.type)) return false; - - if (tree.type === type) return true; - - var state = { - has: false, - type: type - }; - - traverse(tree, { - blacklist: blacklistTypes, - enter: hasBlacklistedType - }, scope, state); - - return state.has; - }; - - traverse.clearCache = function () { - cache.clear(); - }; - - traverse.clearCache.clearPath = cache.clearPath; - traverse.clearCache.clearScope = cache.clearScope; - - traverse.copyCache = function (source, destination) { - if (cache.path.has(source)) { - cache.path.set(destination, cache.path.get(source)); - } - }; -}); -$__System.registerDynamic('d7', [], true, function ($__require, exports, module) { - 'use strict'; - - var global = this || self, - GLOBAL = global; - Object.defineProperty(exports, '__esModule', { value: true }); - - /* eslint max-len: 0 */ - - // This is a trick taken from Esprima. It turns out that, on - // non-Chrome browsers, to check whether a string is in a set, a - // predicate containing a big ugly `switch` statement is faster than - // a regular expression, and on Chrome the two are about on par. - // This function uses `eval` (non-lexical) to produce such a - // predicate from a space-separated string of words. - // - // It starts by sorting the words by length. - - function makePredicate(words) { - words = words.split(" "); - return function (str) { - return words.indexOf(str) >= 0; - }; - } - - // Reserved word lists for various dialects of the language - - var reservedWords = { - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") - }; - - // And the keywords - - 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"); - - // ## Character categories - - // Big ugly regular expressions that match characters in the - // whitespace, identifier, and identifier-start categories. These - // are only applied when a character is found to actually have a - // code point above 128. - // Generated by `bin/generate-identifier-regex.js`. - - var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; - var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; - - var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); - var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - - nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - - // These are a run-length and offset encoded representation of the - // >0xffff code points that are a valid part of identifiers. The - // offset starts at 0x10000, and each pair of numbers represents an - // offset to the next range, and then a size of the range. They were - // generated by `bin/generate-identifier-regex.js`. - // eslint-disable-next-line comma-spacing - 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]; - // eslint-disable-next-line comma-spacing - var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 838, 7, 2, 7, 17, 9, 57, 21, 2, 13, 19882, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239]; - - // This has a complexity linear to the value of the code. The - // assumption is that looking up astral identifier characters is - // rare. - function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - - pos += set[i + 1]; - if (pos >= code) return true; - } - } - - // Test whether a given character code starts an identifier. - - function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - return isInAstralSet(code, astralIdentifierStartCodes); - } - - // Test whether a given character is part of an identifier. - - function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); - } - - // A second optional argument can be given to further configure - var defaultOptions = { - // Source type ("script" or "module") for different semantics - sourceType: "script", - // Source filename. - sourceFilename: undefined, - // Line from which to start counting source. Useful for - // integration with other tools. - startLine: 1, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // TODO - allowSuperOutsideMethod: false, - // An array of plugins to enable - plugins: [], - // TODO - strictMode: null - }; - - // Interpret and default an options object - - function getOptions(opts) { - var options = {}; - for (var key in defaultOptions) { - options[key] = opts && key in opts ? opts[key] : defaultOptions[key]; - } - return options; - } - - 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; - }; - - var classCallCheck = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - }; - - var inherits = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - }; - - var possibleConstructorReturn = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; - }; - - // ## Token types - - // The assignment of fine-grained, information-carrying type objects - // allows the tokenizer to store the information it has about a - // token in a way that is very cheap for the parser to look up. - - // All token type variables start with an underscore, to make them - // easy to recognize. - - // The `beforeExpr` property is used to disambiguate between regular - // expressions and divisions. It is set on all token types that can - // be followed by an expression (thus, a slash after them would be a - // regular expression). - // - // `isLoop` marks a keyword as starting a loop, which is important - // to know when parsing a label, in order to allow or disallow - // continue jumps to that label. - - var beforeExpr = true; - var startsExpr = true; - var isLoop = true; - var isAssign = true; - var prefix = true; - var postfix = true; - - var TokenType = function TokenType(label) { - var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - classCallCheck(this, TokenType); - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; - }; - - var KeywordTokenType = function (_TokenType) { - inherits(KeywordTokenType, _TokenType); - - function KeywordTokenType(name) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - classCallCheck(this, KeywordTokenType); - - options.keyword = name; - - return possibleConstructorReturn(this, _TokenType.call(this, name, options)); - } - - return KeywordTokenType; - }(TokenType); - - var BinopTokenType = function (_TokenType2) { - inherits(BinopTokenType, _TokenType2); - - function BinopTokenType(name, prec) { - classCallCheck(this, BinopTokenType); - return possibleConstructorReturn(this, _TokenType2.call(this, name, { beforeExpr: beforeExpr, binop: prec })); - } - - return BinopTokenType; - }(TokenType); - - var types = { - num: new TokenType("num", { startsExpr: startsExpr }), - regexp: new TokenType("regexp", { startsExpr: startsExpr }), - string: new TokenType("string", { startsExpr: startsExpr }), - name: new TokenType("name", { startsExpr: startsExpr }), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - braceBarL: new TokenType("{|", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - braceR: new TokenType("}"), - braceBarR: new TokenType("|}"), - parenL: new TokenType("(", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - parenR: new TokenType(")"), - comma: new TokenType(",", { beforeExpr: beforeExpr }), - semi: new TokenType(";", { beforeExpr: beforeExpr }), - colon: new TokenType(":", { beforeExpr: beforeExpr }), - doubleColon: new TokenType("::", { beforeExpr: beforeExpr }), - dot: new TokenType("."), - question: new TokenType("?", { beforeExpr: beforeExpr }), - arrow: new TokenType("=>", { beforeExpr: beforeExpr }), - template: new TokenType("template"), - ellipsis: new TokenType("...", { beforeExpr: beforeExpr }), - backQuote: new TokenType("`", { startsExpr: startsExpr }), - dollarBraceL: new TokenType("${", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - at: new TokenType("@"), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", { beforeExpr: beforeExpr, isAssign: isAssign }), - assign: new TokenType("_=", { beforeExpr: beforeExpr, isAssign: isAssign }), - incDec: new TokenType("++/--", { prefix: prefix, postfix: postfix, startsExpr: startsExpr }), - prefix: new TokenType("prefix", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), - logicalOR: new BinopTokenType("||", 1), - logicalAND: new BinopTokenType("&&", 2), - bitwiseOR: new BinopTokenType("|", 3), - bitwiseXOR: new BinopTokenType("^", 4), - bitwiseAND: new BinopTokenType("&", 5), - equality: new BinopTokenType("==/!=", 6), - relational: new BinopTokenType("", 7), - bitShift: new BinopTokenType("<>", 8), - plusMin: new TokenType("+/-", { beforeExpr: beforeExpr, binop: 9, prefix: prefix, startsExpr: startsExpr }), - modulo: new BinopTokenType("%", 10), - star: new BinopTokenType("*", 10), - slash: new BinopTokenType("/", 10), - exponent: new TokenType("**", { beforeExpr: beforeExpr, binop: 11, rightAssociative: true }) - }; - - var keywords = { - "break": new KeywordTokenType("break"), - "case": new KeywordTokenType("case", { beforeExpr: beforeExpr }), - "catch": new KeywordTokenType("catch"), - "continue": new KeywordTokenType("continue"), - "debugger": new KeywordTokenType("debugger"), - "default": new KeywordTokenType("default", { beforeExpr: beforeExpr }), - "do": new KeywordTokenType("do", { isLoop: isLoop, beforeExpr: beforeExpr }), - "else": new KeywordTokenType("else", { beforeExpr: beforeExpr }), - "finally": new KeywordTokenType("finally"), - "for": new KeywordTokenType("for", { isLoop: isLoop }), - "function": new KeywordTokenType("function", { startsExpr: startsExpr }), - "if": new KeywordTokenType("if"), - "return": new KeywordTokenType("return", { beforeExpr: beforeExpr }), - "switch": new KeywordTokenType("switch"), - "throw": new KeywordTokenType("throw", { beforeExpr: beforeExpr }), - "try": new KeywordTokenType("try"), - "var": new KeywordTokenType("var"), - "let": new KeywordTokenType("let"), - "const": new KeywordTokenType("const"), - "while": new KeywordTokenType("while", { isLoop: isLoop }), - "with": new KeywordTokenType("with"), - "new": new KeywordTokenType("new", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - "this": new KeywordTokenType("this", { startsExpr: startsExpr }), - "super": new KeywordTokenType("super", { startsExpr: startsExpr }), - "class": new KeywordTokenType("class"), - "extends": new KeywordTokenType("extends", { beforeExpr: beforeExpr }), - "export": new KeywordTokenType("export"), - "import": new KeywordTokenType("import", { startsExpr: startsExpr }), - "yield": new KeywordTokenType("yield", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - "null": new KeywordTokenType("null", { startsExpr: startsExpr }), - "true": new KeywordTokenType("true", { startsExpr: startsExpr }), - "false": new KeywordTokenType("false", { startsExpr: startsExpr }), - "in": new KeywordTokenType("in", { beforeExpr: beforeExpr, binop: 7 }), - "instanceof": new KeywordTokenType("instanceof", { beforeExpr: beforeExpr, binop: 7 }), - "typeof": new KeywordTokenType("typeof", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), - "void": new KeywordTokenType("void", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), - "delete": new KeywordTokenType("delete", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }) - }; - - // Map keyword names to token types. - Object.keys(keywords).forEach(function (name) { - types["_" + name] = keywords[name]; - }); - - // Matches a whole line break (where CRLF is considered a single - // line break). Used to count lines. - - var lineBreak = /\r\n?|\n|\u2028|\u2029/; - var lineBreakG = new RegExp(lineBreak.source, "g"); - - function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; - } - - var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - - // The algorithm used to determine whether a regexp can appear at a - // given point in the program is loosely based on sweet.js' approach. - // See https://github.com/mozilla/sweet.js/wiki/design - - var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - classCallCheck(this, TokContext); - - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - }; - - var types$1 = { - braceStatement: new TokContext("{", false), - braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", true), - parenStatement: new TokContext("(", false), - parenExpression: new TokContext("(", true), - template: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - functionExpression: new TokContext("function", true) - }; - - // Token-specific context update code - - types.parenR.updateContext = types.braceR.updateContext = function () { - if (this.state.context.length === 1) { - this.state.exprAllowed = true; - return; - } - - var out = this.state.context.pop(); - if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) { - this.state.context.pop(); - this.state.exprAllowed = false; - } else if (out === types$1.templateQuasi) { - this.state.exprAllowed = true; - } else { - this.state.exprAllowed = !out.isExpr; - } - }; - - types.name.updateContext = function (prevType) { - this.state.exprAllowed = false; - - if (prevType === types._let || prevType === types._const || prevType === types._var) { - if (lineBreak.test(this.input.slice(this.state.end))) { - this.state.exprAllowed = true; - } - } - }; - - types.braceL.updateContext = function (prevType) { - this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); - this.state.exprAllowed = true; - }; - - types.dollarBraceL.updateContext = function () { - this.state.context.push(types$1.templateQuasi); - this.state.exprAllowed = true; - }; - - types.parenL.updateContext = function (prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); - this.state.exprAllowed = true; - }; - - types.incDec.updateContext = function () { - // tokExprAllowed stays unchanged - }; - - types._function.updateContext = function () { - if (this.curContext() !== types$1.braceStatement) { - this.state.context.push(types$1.functionExpression); - } - - this.state.exprAllowed = false; - }; - - types.backQuote.updateContext = function () { - if (this.curContext() === types$1.template) { - this.state.context.pop(); - } else { - this.state.context.push(types$1.template); - } - this.state.exprAllowed = false; - }; - - // These are used when `options.locations` is on, for the - // `startLoc` and `endLoc` properties. - - var Position = function Position(line, col) { - classCallCheck(this, Position); - - this.line = line; - this.column = col; - }; - - var SourceLocation = function SourceLocation(start, end) { - classCallCheck(this, SourceLocation); - - this.start = start; - this.end = end; - }; - - // The `getLineInfo` function is mostly useful when the - // `locations` option is off (for performance reasons) and you - // want to find the line/column position for a given character - // offset. `input` should be the code string that the offset refers - // into. - - function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } - } - - var State = function () { - function State() { - classCallCheck(this, State); - } - - State.prototype.init = function init(options, input) { - this.strict = options.strictMode === false ? false : options.sourceType === "module"; - - this.input = input; - - this.potentialArrowAt = -1; - - this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = false; - - this.labels = []; - - this.decorators = []; - - this.tokens = []; - - this.comments = []; - - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - - this.pos = this.lineStart = 0; - this.curLine = options.startLine; - - this.type = types.eof; - this.value = null; - this.start = this.end = this.pos; - this.startLoc = this.endLoc = this.curPosition(); - - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - this.context = [types$1.braceStatement]; - this.exprAllowed = true; - - this.containsEsc = this.containsOctal = false; - this.octalPosition = null; - - this.invalidTemplateEscapePosition = null; - - this.exportedIdentifiers = []; - - return this; - }; - - // TODO - - - // TODO - - - // Used to signify the start of a potential arrow function - - - // Flags to track whether we are in a function, a generator. - - - // Labels in scope. - - - // Leading decorators. - - - // Token store. - - - // Comment store. - - - // Comment attachment store - - - // The current position of the tokenizer in the input. - - - // Properties of the current token: - // Its type - - - // For tokens that include more information than their type, the value - - - // Its start and end offset - - - // And, if locations are used, the {line, column} object - // corresponding to those offsets - - - // Position information for the previous token - - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - - - // TODO - - - // Names of exports store. `default` is stored as a name for both - // `export default foo;` and `export { foo as default };`. - - - State.prototype.curPosition = function curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); - }; - - State.prototype.clone = function clone(skipArrays) { - var state = new State(); - for (var key in this) { - var val = this[key]; - - if ((!skipArrays || key === "context") && Array.isArray(val)) { - val = val.slice(); - } - - state[key] = val; - } - return state; - }; - - return State; - }(); - - // Object type used to represent tokens. Note that normally, tokens - // simply exist as properties on the parser object. This is only - // used for the onToken callback and the external tokenizer. - - var Token = function Token(state) { - classCallCheck(this, Token); - - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); - }; - - // ## Tokenizer - - function codePointToString(code) { - // UTF-16 Decoding - if (code <= 0xFFFF) { - return String.fromCharCode(code); - } else { - return String.fromCharCode((code - 0x10000 >> 10) + 0xD800, (code - 0x10000 & 1023) + 0xDC00); - } - } - - var Tokenizer = function () { - function Tokenizer(options, input) { - classCallCheck(this, Tokenizer); - - this.state = new State(); - this.state.init(options, input); - } - - // Move to the next token - - Tokenizer.prototype.next = function next() { - if (!this.isLookahead) { - this.state.tokens.push(new Token(this.state)); - } - - this.state.lastTokEnd = this.state.end; - this.state.lastTokStart = this.state.start; - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - }; - - // TODO - - Tokenizer.prototype.eat = function eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - }; - - // TODO - - Tokenizer.prototype.match = function match(type) { - return this.state.type === type; - }; - - // TODO - - Tokenizer.prototype.isKeyword = function isKeyword$$1(word) { - return isKeyword(word); - }; - - // TODO - - Tokenizer.prototype.lookahead = function lookahead() { - var old = this.state; - this.state = old.clone(true); - - this.isLookahead = true; - this.next(); - this.isLookahead = false; - - var curr = this.state.clone(true); - this.state = old; - return curr; - }; - - // Toggle strict mode. Re-reads the next number or string to please - // pedantic tests (`"use strict"; 010;` should fail). - - Tokenizer.prototype.setStrict = function setStrict(strict) { - this.state.strict = strict; - if (!this.match(types.num) && !this.match(types.string)) return; - this.state.pos = this.state.start; - while (this.state.pos < this.state.lineStart) { - this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; - --this.state.curLine; - } - this.nextToken(); - }; - - Tokenizer.prototype.curContext = function curContext() { - return this.state.context[this.state.context.length - 1]; - }; - - // Read a single token, updating the parser object's token-related - // properties. - - Tokenizer.prototype.nextToken = function nextToken() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - - this.state.containsOctal = false; - this.state.octalPosition = null; - this.state.start = this.state.pos; - this.state.startLoc = this.state.curPosition(); - if (this.state.pos >= this.input.length) return this.finishToken(types.eof); - - if (curContext.override) { - return curContext.override(this); - } else { - return this.readToken(this.fullCharCodeAtPos()); - } - }; - - Tokenizer.prototype.readToken = function readToken(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code) || code === 92 /* '\' */) { - return this.readWord(); - } else { - return this.getTokenFromCode(code); - } - }; - - Tokenizer.prototype.fullCharCodeAtPos = function fullCharCodeAtPos() { - var code = this.input.charCodeAt(this.state.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - - var next = this.input.charCodeAt(this.state.pos + 1); - return (code << 10) + next - 0x35fdc00; - }; - - Tokenizer.prototype.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "CommentBlock" : "CommentLine", - value: text, - start: start, - end: end, - loc: new SourceLocation(startLoc, endLoc) - }; - - if (!this.isLookahead) { - this.state.tokens.push(comment); - this.state.comments.push(comment); - this.addComment(comment); - } - }; - - Tokenizer.prototype.skipBlockComment = function skipBlockComment() { - var startLoc = this.state.curPosition(); - var start = this.state.pos; - var end = this.input.indexOf("*/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - - this.state.pos = end + 2; - lineBreakG.lastIndex = start; - var match = void 0; - while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { - ++this.state.curLine; - this.state.lineStart = match.index + match[0].length; - } - - this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - Tokenizer.prototype.skipLineComment = function skipLineComment(startSkip) { - var start = this.state.pos; - var startLoc = this.state.curPosition(); - var ch = this.input.charCodeAt(this.state.pos += startSkip); - while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.state.pos; - ch = this.input.charCodeAt(this.state.pos); - } - - this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - // Called at the start of the parse and after every token. Skips - // whitespace and comments, and. - - Tokenizer.prototype.skipSpace = function skipSpace() { - loop: while (this.state.pos < this.input.length) { - var ch = this.input.charCodeAt(this.state.pos); - switch (ch) { - case 32:case 160: - // ' ' - ++this.state.pos; - break; - - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - - case 10:case 8232:case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - - case 47: - // '/' - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - // '*' - this.skipBlockComment(); - break; - - case 47: - this.skipLineComment(2); - break; - - default: - break loop; - } - break; - - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.state.pos; - } else { - break loop; - } - } - } - }; - - // Called at the end of every token. Sets `end`, `val`, and - // maintains `context` and `exprAllowed`, and skips the space after - // the token, so that the next one's `start` will point at the - // right position. - - Tokenizer.prototype.finishToken = function finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - var prevType = this.state.type; - this.state.type = type; - this.state.value = val; - - this.updateContext(prevType); - }; - - // ### Token reading - - // This is the function that is called to fetch the next token. It - // is somewhat obscure, because it works in character codes rather - // than characters, and because operator parsing has been inlined - // into it. - // - // All in the name of speed. - // - - - Tokenizer.prototype.readToken_dot = function readToken_dot() { - var next = this.input.charCodeAt(this.state.pos + 1); - if (next >= 48 && next <= 57) { - return this.readNumber(true); - } - - var next2 = this.input.charCodeAt(this.state.pos + 2); - if (next === 46 && next2 === 46) { - // 46 = dot '.' - this.state.pos += 3; - return this.finishToken(types.ellipsis); - } else { - ++this.state.pos; - return this.finishToken(types.dot); - } - }; - - Tokenizer.prototype.readToken_slash = function readToken_slash() { - // '/' - if (this.state.exprAllowed) { - ++this.state.pos; - return this.readRegexp(); - } - - var next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - return this.finishOp(types.assign, 2); - } else { - return this.finishOp(types.slash, 1); - } - }; - - Tokenizer.prototype.readToken_mult_modulo = function readToken_mult_modulo(code) { - // '%*' - var type = code === 42 ? types.star : types.modulo; - var width = 1; - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 42) { - // '*' - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = types.exponent; - } - - if (next === 61) { - width++; - type = types.assign; - } - - return this.finishOp(type, width); - }; - - Tokenizer.prototype.readToken_pipe_amp = function readToken_pipe_amp(code) { - // '|&' - var next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); - if (next === 61) return this.finishOp(types.assign, 2); - if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(types.braceBarR, 2); - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); - }; - - Tokenizer.prototype.readToken_caret = function readToken_caret() { - // '^' - var next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - return this.finishOp(types.assign, 2); - } else { - return this.finishOp(types.bitwiseXOR, 1); - } - }; - - Tokenizer.prototype.readToken_plus_min = function readToken_plus_min(code) { - // '+-' - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(types.incDec, 2); - } - - if (next === 61) { - return this.finishOp(types.assign, 2); - } else { - return this.finishOp(types.plusMin, 1); - } - }; - - Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) { - // '<>' - var next = this.input.charCodeAt(this.state.pos + 1); - var size = 1; - - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(types.assign, size + 1); - return this.finishOp(types.bitShift, size); - } - - if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - if (this.inModule) this.unexpected(); - // `