@@ -8550,7 +8642,6 @@ return /******/ (function(modules) { // webpackBootstrap
* @static
* @memberOf _
* @since 2.4.0
- * @type {Function}
* @category Date
* @returns {number} Returns the timestamp.
* @example
@@ -8558,9 +8649,11 @@ return /******/ (function(modules) { // webpackBootstrap
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
- * // => Logs the number of milliseconds it took for the deferred function to be invoked.
+ * // => Logs the number of milliseconds it took for the deferred invocation.
*/
- var now = Date.now;
+ function now() {
+ return Date.now();
+ }
/**
* Creates a debounced function that delays invoking `func` until after `wait`
@@ -8618,7 +8711,7 @@ return /******/ (function(modules) { // webpackBootstrap
maxWait,
result,
timerId,
- lastCallTime = 0,
+ lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
@@ -8669,7 +8762,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
- return (!lastCallTime || (timeSinceLastCall >= wait) ||
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
@@ -8683,7 +8776,6 @@ return /******/ (function(modules) { // webpackBootstrap
}
function trailingEdge(time) {
- clearTimeout(timerId);
timerId = undefined;
// Only invoke if we have `lastArgs` which means `func` has been
@@ -8699,8 +8791,8 @@ return /******/ (function(modules) { // webpackBootstrap
if (timerId !== undefined) {
clearTimeout(timerId);
}
- lastCallTime = lastInvokeTime = 0;
- lastArgs = lastThis = timerId = undefined;
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
@@ -8721,7 +8813,6 @@ return /******/ (function(modules) { // webpackBootstrap
}
if (maxing) {
// Handle invocations in a tight loop.
- clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
@@ -8744,8 +8835,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -8828,8 +8918,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -8854,8 +8943,8 @@ return /******/ (function(modules) { // webpackBootstrap
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -8863,8 +8952,8 @@ return /******/ (function(modules) { // webpackBootstrap
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
@@ -8891,7 +8980,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 305 */
+/* 304 */
/***/ function(module, exports, __webpack_require__) {
// CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -10117,7 +10206,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
function hiddenTextarea() {
- var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none");
+ var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
// The textarea is kept positioned near the cursor to prevent the
// fact that it'll be scrolled into view on input from scrolling
@@ -11584,6 +11673,16 @@ return /******/ (function(modules) { // webpackBootstrap
return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd};
}
+ function getUsefulRect(rects, bias) {
+ var rect = nullRect
+ if (bias == "left") for (var i = 0; i < rects.length; i++) {
+ if ((rect = rects[i]).left != rect.right) break
+ } else for (var i = rects.length - 1; i >= 0; i--) {
+ if ((rect = rects[i]).left != rect.right) break
+ }
+ return rect
+ }
+
function measureCharInner(cm, prepared, ch, bias) {
var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
var node = place.node, start = place.start, end = place.end, collapse = place.collapse;
@@ -11593,17 +11692,10 @@ return /******/ (function(modules) { // webpackBootstrap
for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned
while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start;
while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end;
- if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {
+ if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)
rect = node.parentNode.getBoundingClientRect();
- } else if (ie && cm.options.lineWrapping) {
- var rects = range(node, start, end).getClientRects();
- if (rects.length)
- rect = rects[bias == "right" ? rects.length - 1 : 0];
- else
- rect = nullRect;
- } else {
- rect = range(node, start, end).getBoundingClientRect() || nullRect;
- }
+ else
+ rect = getUsefulRect(range(node, start, end).getClientRects(), bias)
if (rect.left || rect.right || start == 0) break;
end = start;
start = start - 1;
@@ -11829,10 +11921,23 @@ return /******/ (function(modules) { // webpackBootstrap
for (;;) {
if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
var ch = x < fromX || x - fromX <= toX - x ? from : to;
+ var outside = ch == from ? fromOutside : toOutside
var xDiff = x - (ch == from ? fromX : toX);
+ // This is a kludge to handle the case where the coordinates
+ // are after a line-wrapped line. We should replace it with a
+ // more general handling of cursor positions around line
+ // breaks. (Issue #4078)
+ if (toOutside && !bidi && !/\s/.test(lineObj.text.charAt(ch)) && xDiff > 0 &&
+ ch < lineObj.text.length && preparedMeasure.view.measure.heights.length > 1) {
+ var charSize = measureCharPrepared(cm, preparedMeasure, ch, "right");
+ if (innerOff <= charSize.bottom && innerOff >= charSize.top && Math.abs(x - charSize.right) < xDiff) {
+ outside = false
+ ch++
+ xDiff = x - charSize.right
+ }
+ }
while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;
- var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
- xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
+ var pos = PosWithInfo(lineNo, ch, outside, xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
return pos;
}
var step = Math.ceil(dist / 2), middle = from + step;
@@ -12556,6 +12661,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Let the drag handler handle this.
if (webkit) display.scroller.draggable = true;
cm.state.draggingText = dragEnd;
+ dragEnd.copy = mac ? e.altKey : e.ctrlKey
// IE's approach to draggable
if (display.scroller.dragDrop) display.scroller.dragDrop();
on(document, "mouseup", dragEnd);
@@ -12786,7 +12892,7 @@ return /******/ (function(modules) { // webpackBootstrap
try {
var text = e.dataTransfer.getData("Text");
if (text) {
- if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey))
+ if (cm.state.draggingText && !cm.state.draggingText.copy)
var selected = cm.listSelections();
setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
if (selected) for (var i = 0; i < selected.length; ++i)
@@ -13301,7 +13407,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Revert a change stored in a document's history.
function makeChangeFromHistory(doc, type, allowSelectionOnly) {
- if (doc.cm && doc.cm.state.suppressEdits) return;
+ if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) return;
var hist = doc.history, event, selAfter = doc.sel;
var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
@@ -15826,6 +15932,7 @@ return /******/ (function(modules) { // webpackBootstrap
var content = elt("span", null, null, webkit ? "padding-right: .1px" : null);
var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content,
col: 0, pos: 0, cm: cm,
+ trailingSpace: false,
splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")};
lineView.measure = {};
@@ -15887,7 +15994,7 @@ return /******/ (function(modules) { // webpackBootstrap
// the line map. Takes care to render special characters separately.
function buildToken(builder, text, style, startStyle, endStyle, title, css) {
if (!text) return;
- var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text;
+ var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text
var special = builder.cm.state.specialChars, mustWrap = false;
if (!special.test(text)) {
builder.col += text.length;
@@ -15932,6 +16039,7 @@ return /******/ (function(modules) { // webpackBootstrap
builder.pos++;
}
}
+ builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32
if (style || startStyle || endStyle || mustWrap || css) {
var fullStyle = style || "";
if (startStyle) fullStyle += startStyle;
@@ -15943,11 +16051,17 @@ return /******/ (function(modules) { // webpackBootstrap
builder.content.appendChild(content);
}
- function splitSpaces(old) {
- var out = " ";
- for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
- out += " ";
- return out;
+ function splitSpaces(text, trailingBefore) {
+ if (text.length > 1 && !/ /.test(text)) return text
+ var spaceBefore = trailingBefore, result = ""
+ for (var i = 0; i < text.length; i++) {
+ var ch = text.charAt(i)
+ if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
+ ch = "\u00a0"
+ result += ch
+ spaceBefore = ch == " "
+ }
+ return result
}
// Work around nonsense dimensions being reported for stretches of
@@ -15984,6 +16098,7 @@ return /******/ (function(modules) { // webpackBootstrap
builder.content.appendChild(widget);
}
builder.pos += size;
+ builder.trailingSpace = false
}
// Outputs a number of spans to make up a line, taking highlighting
@@ -17431,8 +17546,9 @@ return /******/ (function(modules) { // webpackBootstrap
if (badBidiRects != null) return badBidiRects;
var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
var r0 = range(txt, 0, 1).getBoundingClientRect();
- if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780)
var r1 = range(txt, 1, 2).getBoundingClientRect();
+ removeChildren(measure);
+ if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780)
return badBidiRects = (r1.right - r0.right < 3);
}
@@ -17798,14 +17914,14 @@ return /******/ (function(modules) { // webpackBootstrap
// THE END
- CodeMirror.version = "5.15.2";
+ CodeMirror.version = "5.17.0";
return CodeMirror;
});
/***/ },
-/* 306 */
+/* 305 */
/***/ function(module, exports, __webpack_require__) {
// CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -17813,7 +17929,7 @@ return /******/ (function(modules) { // webpackBootstrap
(function(mod) {
if (true) // CommonJS
- mod(__webpack_require__(305), __webpack_require__(307), __webpack_require__(308))
+ mod(__webpack_require__(304), __webpack_require__(306), __webpack_require__(307))
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript"], mod)
else // Plain browser env
@@ -17958,7 +18074,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 307 */
+/* 306 */
/***/ function(module, exports, __webpack_require__) {
// CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -17966,7 +18082,7 @@ return /******/ (function(modules) { // webpackBootstrap
(function(mod) {
if (true) // CommonJS
- mod(__webpack_require__(305));
+ mod(__webpack_require__(304));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
@@ -18358,7 +18474,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 308 */
+/* 307 */
/***/ function(module, exports, __webpack_require__) {
// CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -18368,7 +18484,7 @@ return /******/ (function(modules) { // webpackBootstrap
(function(mod) {
if (true) // CommonJS
- mod(__webpack_require__(305));
+ mod(__webpack_require__(304));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
@@ -18749,8 +18865,8 @@ return /******/ (function(modules) { // webpackBootstrap
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
if (type == "function") return cont(functiondef, maybeop);
- if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
- if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
+ if (type == "keyword c" || type == "async") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
+ if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
@@ -18826,6 +18942,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (type == "variable") {cx.marked = "property"; return cont();}
}
function objprop(type, value) {
+ if (type == "async") return cont(objprop);
if (type == "variable" || cx.style == "keyword") {
cx.marked = "property";
if (value == "get" || value == "set") return cont(getterSetter);
@@ -18857,7 +18974,10 @@ return /******/ (function(modules) { // webpackBootstrap
if (type == ",") {
var lex = cx.state.lexical;
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
- return cont(what, proceed);
+ return cont(function(type, value) {
+ if (type == end || value == end) return pass()
+ return pass(what)
+ }, proceed);
}
if (type == end || value == end) return cont();
return cont(expect(end));
@@ -19000,16 +19120,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
function arrayLiteral(type) {
if (type == "]") return cont();
- return pass(expressionNoComma, maybeArrayComprehension);
- }
- function maybeArrayComprehension(type) {
- if (type == "for") return pass(comprehension, expect("]"));
- if (type == ",") return cont(commasep(maybeexpressionNoComma, "]"));
- return pass(commasep(expressionNoComma, "]"));
- }
- function comprehension(type) {
- if (type == "for") return cont(forspec, comprehension);
- if (type == "if") return cont(expression, comprehension);
+ return pass(expressionNoComma, commasep(expressionNoComma, "]"));
}
function isContinuedStatement(state, textAfter) {
@@ -19112,7 +19223,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 309 */
+/* 308 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
@@ -19121,142 +19232,181 @@ return /******/ (function(modules) { // webpackBootstrap
value: true
});
- var _react = __webpack_require__(300);
+ var _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; }; }();
- var _react2 = _interopRequireDefault(_react);
+ var _react = __webpack_require__(299);
- var _reactDom = __webpack_require__(310);
+ var _react2 = _interopRequireDefault(_react);
- var _reactDom2 = _interopRequireDefault(_reactDom);
+ var _reactDom = __webpack_require__(309);
- var _server = __webpack_require__(311);
+ var _server = __webpack_require__(310);
var _server2 = _interopRequireDefault(_server);
- var _babelStandalone = __webpack_require__(468);
+ var _babelStandalone = __webpack_require__(473);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var Preview = _react2.default.createClass({
- displayName: "Preview",
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- propTypes: {
- code: _react2.default.PropTypes.string.isRequired,
- scope: _react2.default.PropTypes.object.isRequired,
- previewComponent: _react2.default.PropTypes.node,
- noRender: _react2.default.PropTypes.bool,
- context: _react2.default.PropTypes.object
- },
+ function _possibleConstructorReturn(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; }
- getInitialState: function getInitialState() {
- return {
- error: null
+ function _inherits(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 Preview = function (_Component) {
+ _inherits(Preview, _Component);
+
+ function Preview() {
+ var _Object$getPrototypeO;
+
+ var _temp, _this, _ret;
+
+ _classCallCheck(this, Preview);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Preview)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), _possibleConstructorReturn(_this, _ret);
+ }
+
+ _createClass(Preview, [{
+ key: "render",
+ value: function render() {
+ var error = this.state.error;
+
+ return _react2.default.createElement(
+ "div",
+ null,
+ error !== null ? _react2.default.createElement(
+ "div",
+ { className: "playgroundError" },
+ error
+ ) : null,
+ _react2.default.createElement("div", { ref: "mount", className: "previewArea" })
+ );
+ }
+ }]);
+
+ return Preview;
+ }(_react.Component);
+
+ Preview.defaultProps = {
+ previewComponent: "div"
+ };
+ Preview.propTypes = {
+ code: _react.PropTypes.string.isRequired,
+ scope: _react.PropTypes.object.isRequired,
+ previewComponent: _react.PropTypes.node,
+ noRender: _react.PropTypes.bool,
+ context: _react.PropTypes.object
+ };
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this2 = this;
+
+ this.state = {
+ error: null
+ };
+
+ this._compileCode = function () {
+ var _props = _this2.props;
+ var code = _props.code;
+ var context = _props.context;
+ var noRender = _props.noRender;
+ var scope = _props.scope;
+
+ var generateContextTypes = function generateContextTypes(c) {
+ return "{ " + Object.keys(c).map(function (val) {
+ return val + ": React.PropTypes.any.isRequired";
+ }).join(", ") + " }";
};
- },
- getDefaultProps: function getDefaultProps() {
- return {
- previewComponent: "div"
+
+ var generateChildContext = function generateChildContext(c) {
+ return "{ " + Object.keys(c).map(function (val) {
+ return val + " : " + val;
+ }).join(", ") + " }";
};
- },
- componentDidMount: function componentDidMount() {
- this._executeCode();
- },
- componentDidUpdate: function componentDidUpdate(prevProps) {
- clearTimeout(this.timeoutID); //eslint-disable-line
- if (this.props.code !== prevProps.code) {
- this._executeCode();
- }
- },
- _compileCode: function _compileCode() {
- if (this.props.noRender) {
- var generateContextTypes = function generateContextTypes(context) {
- var keys = Object.keys(context).map(function (val) {
- return val + ": React.PropTypes.any.isRequired";
- });
- return "{ " + keys.join(", ") + " }";
- };
- return (0, _babelStandalone.transform)("\n (function (" + Object.keys(this.props.scope).join(", ") + ", mountNode) {\n return React.createClass({\n // childContextTypes: { test: React.PropTypes.string },\n childContextTypes: " + generateContextTypes(this.props.context) + ",\n getChildContext: function () { return " + JSON.stringify(this.props.context) + "; },\n render: function () {\n return (\n " + this.props.code + "\n );\n }\n });\n });\n ", { presets: ["es2015", "react", "stage-1"] }).code;
+ if (noRender) {
+ return (0, _babelStandalone.transform)("\n ((" + Object.keys(scope).concat(Object.keys(context)).join(", ") + ", mountNode) => {\n class Comp extends React.Component {\n\n getChildContext() {\n return " + generateChildContext(context) + ";\n }\n\n render() {\n return (\n " + code + "\n );\n }\n }\n\n Comp.childContextTypes = " + generateContextTypes(context) + ";\n\n return Comp;\n });\n ", { presets: ["es2015", "react", "stage-1"] }).code;
} else {
- return (0, _babelStandalone.transform)("\n (function (" + Object.keys(this.props.scope).join(",") + ", mountNode) {\n " + this.props.code + "\n });\n ", { presets: ["es2015", "react", "stage-1"] }).code;
+ return (0, _babelStandalone.transform)("\n ((" + Object.keys(scope).join(",") + ", mountNode) => {\n " + code + "\n });\n ", { presets: ["es2015", "react", "stage-1"] }).code;
}
- },
- _setTimeout: function _setTimeout() {
- clearTimeout(this.timeoutID); //eslint-disable-line no-undef
- this.timeoutID = setTimeout.apply(null, arguments); //eslint-disable-line no-undef
- },
- _executeCode: function _executeCode() {
- var _this = this;
+ };
- var mountNode = this.refs.mount;
+ this._setTimeout = function () {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
- try {
+ clearTimeout(_this2.timeoutID); //eslint-disable-line no-undef
+ _this2.timeoutID = setTimeout.apply(null, args); //eslint-disable-line no-undef
+ };
- var scope = [];
+ this._executeCode = function () {
+ var mountNode = _this2.refs.mount;
+ var _props2 = _this2.props;
+ var scope = _props2.scope;
+ var noRender = _props2.noRender;
+ var previewComponent = _props2.previewComponent;
- for (var s in this.props.scope) {
- if (this.props.scope.hasOwnProperty(s)) {
- scope.push(this.props.scope[s]);
- }
- }
- scope.push(mountNode);
+ try {
+ var scopeArgs = Object.values(scope);
+ var contextArgs = Object.values(_this2.props.context);
- var compiledCode = this._compileCode();
- if (this.props.noRender) {
+ var compiledCode = _this2._compileCode();
+ if (noRender) {
/* eslint-disable no-eval, max-len */
- var Component = _react2.default.createElement(eval(compiledCode).apply(null, scope));
- _server2.default.renderToString(_react2.default.createElement(this.props.previewComponent, {}, Component));
- _reactDom2.default.render(_react2.default.createElement(this.props.previewComponent, {}, Component), mountNode);
+ var Comp = _react2.default.createElement(eval(compiledCode).apply(null, scopeArgs.concat(contextArgs).concat([mountNode])));
+ _server2.default.renderToString(_react2.default.createElement(previewComponent, {}, Comp));
+ (0, _reactDom.render)(_react2.default.createElement(previewComponent, {}, Comp), mountNode);
} else {
- eval(compiledCode).apply(null, scope);
+ eval(compiledCode).apply(null, scopeArgs.concat([mountNode]));
}
/* eslint-enable no-eval, max-len */
- this.setState({
- error: null
- });
+ _this2.setState({ error: null });
} catch (err) {
- this._setTimeout(function () {
- _this.setState({
- error: err.toString()
- });
+ _this2._setTimeout(function () {
+ _this2.setState({ error: err.toString() });
}, 500);
}
- },
- render: function render() {
- return _react2.default.createElement(
- "div",
- null,
- this.state.error !== null ? _react2.default.createElement(
- "div",
- { className: "playgroundError" },
- this.state.error
- ) : null,
- _react2.default.createElement("div", { ref: "mount", className: "previewArea" })
- );
- }
- });
+ };
+
+ this.componentDidMount = function () {
+ _this2._executeCode();
+ };
+
+ this.componentDidUpdate = function (prevProps) {
+ clearTimeout(_this2.timeoutID); //eslint-disable-line
+ if (_this2.props.code !== prevProps.code) {
+ _this2._executeCode();
+ }
+ };
+ };
exports.default = Preview;
/***/ },
-/* 310 */
+/* 309 */
/***/ function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_310__;
+ module.exports = __WEBPACK_EXTERNAL_MODULE_309__;
/***/ },
-/* 311 */
+/* 310 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- module.exports = __webpack_require__(312);
+ module.exports = __webpack_require__(311);
/***/ },
-/* 312 */
+/* 311 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -19272,9 +19422,9 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var ReactDefaultInjection = __webpack_require__(313);
- var ReactServerRendering = __webpack_require__(462);
- var ReactVersion = __webpack_require__(467);
+ var ReactDefaultInjection = __webpack_require__(312);
+ var ReactServerRendering = __webpack_require__(467);
+ var ReactVersion = __webpack_require__(472);
ReactDefaultInjection.inject();
@@ -19287,7 +19437,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = ReactDOMServer;
/***/ },
-/* 313 */
+/* 312 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -19303,24 +19453,24 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var BeforeInputEventPlugin = __webpack_require__(314);
+ var BeforeInputEventPlugin = __webpack_require__(313);
var ChangeEventPlugin = __webpack_require__(336);
- var DefaultEventPluginOrder = __webpack_require__(357);
- var EnterLeaveEventPlugin = __webpack_require__(358);
- var HTMLDOMPropertyConfig = __webpack_require__(363);
- var ReactComponentBrowserEnvironment = __webpack_require__(364);
- var ReactDOMComponent = __webpack_require__(378);
+ var DefaultEventPluginOrder = __webpack_require__(359);
+ var EnterLeaveEventPlugin = __webpack_require__(360);
+ var HTMLDOMPropertyConfig = __webpack_require__(365);
+ var ReactComponentBrowserEnvironment = __webpack_require__(366);
+ var ReactDOMComponent = __webpack_require__(380);
var ReactDOMComponentTree = __webpack_require__(337);
- var ReactDOMEmptyComponent = __webpack_require__(430);
- var ReactDOMTreeTraversal = __webpack_require__(431);
- var ReactDOMTextComponent = __webpack_require__(432);
- var ReactDefaultBatchingStrategy = __webpack_require__(433);
- var ReactEventListener = __webpack_require__(434);
- var ReactInjection = __webpack_require__(437);
- var ReactReconcileTransaction = __webpack_require__(441);
- var SVGDOMPropertyConfig = __webpack_require__(449);
- var SelectEventPlugin = __webpack_require__(450);
- var SimpleEventPlugin = __webpack_require__(451);
+ var ReactDOMEmptyComponent = __webpack_require__(435);
+ var ReactDOMTreeTraversal = __webpack_require__(436);
+ var ReactDOMTextComponent = __webpack_require__(437);
+ var ReactDefaultBatchingStrategy = __webpack_require__(438);
+ var ReactEventListener = __webpack_require__(439);
+ var ReactInjection = __webpack_require__(442);
+ var ReactReconcileTransaction = __webpack_require__(446);
+ var SVGDOMPropertyConfig = __webpack_require__(454);
+ var SelectEventPlugin = __webpack_require__(455);
+ var SimpleEventPlugin = __webpack_require__(456);
var alreadyInjected = false;
@@ -19354,9 +19504,9 @@ return /******/ (function(modules) { // webpackBootstrap
BeforeInputEventPlugin: BeforeInputEventPlugin
});
- ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent);
+ ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
- ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent);
+ ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
@@ -19376,7 +19526,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
/***/ },
-/* 314 */
+/* 313 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -19392,8 +19542,8 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var EventConstants = __webpack_require__(315);
- var EventPropagators = __webpack_require__(318);
+ var EventConstants = __webpack_require__(314);
+ var EventPropagators = __webpack_require__(317);
var ExecutionEnvironment = __webpack_require__(327);
var FallbackCompositionState = __webpack_require__(328);
var SyntheticCompositionEvent = __webpack_require__(332);
@@ -19769,7 +19919,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = BeforeInputEventPlugin;
/***/ },
-/* 315 */
+/* 314 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -19785,7 +19935,7 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var keyMirror = __webpack_require__(316);
+ var keyMirror = __webpack_require__(315);
var PropagationPhases = keyMirror({ bubbled: null, captured: null });
@@ -19871,7 +20021,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = EventConstants;
/***/ },
-/* 316 */
+/* 315 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -19887,7 +20037,7 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var invariant = __webpack_require__(317);
+ var invariant = __webpack_require__(316);
/**
* Constructs an enumeration with keys equal to their value.
@@ -19924,7 +20074,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 317 */
+/* 316 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -19979,7 +20129,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 318 */
+/* 317 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -19995,8 +20145,8 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var EventConstants = __webpack_require__(315);
- var EventPluginHub = __webpack_require__(319);
+ var EventConstants = __webpack_require__(314);
+ var EventPluginHub = __webpack_require__(318);
var EventPluginUtils = __webpack_require__(321);
var accumulateInto = __webpack_require__(325);
@@ -20122,7 +20272,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 319 */
+/* 318 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -20138,13 +20288,15 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
+ var _prodInvariant = __webpack_require__(319);
+
var EventPluginRegistry = __webpack_require__(320);
var EventPluginUtils = __webpack_require__(321);
var ReactErrorUtils = __webpack_require__(322);
var accumulateInto = __webpack_require__(325);
var forEachAccumulated = __webpack_require__(326);
- var invariant = __webpack_require__(317);
+ var invariant = __webpack_require__(316);
/**
* Internal store for event listeners
@@ -20180,6 +20332,10 @@ return /******/ (function(modules) { // webpackBootstrap
return executeDispatchesAndRelease(e, false);
};
+ var getDictionaryKey = function (inst) {
+ return '.' + inst._rootNodeID;
+ };
+
/**
* This is a unified interface for event plugins to be installed and configured.
*
@@ -20223,17 +20379,18 @@ return /******/ (function(modules) { // webpackBootstrap
},
/**
- * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent.
+ * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
*
* @param {object} inst The instance, which is the source of events.
* @param {string} registrationName Name of listener (e.g. `onClick`).
* @param {function} listener The callback to store.
*/
putListener: function (inst, registrationName, listener) {
- !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(false) : void 0;
+ !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
+ var key = getDictionaryKey(inst);
var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
- bankForRegistrationName[inst._rootNodeID] = listener;
+ bankForRegistrationName[key] = listener;
var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
if (PluginModule && PluginModule.didPutListener) {
@@ -20248,7 +20405,8 @@ return /******/ (function(modules) { // webpackBootstrap
*/
getListener: function (inst, registrationName) {
var bankForRegistrationName = listenerBank[registrationName];
- return bankForRegistrationName && bankForRegistrationName[inst._rootNodeID];
+ var key = getDictionaryKey(inst);
+ return bankForRegistrationName && bankForRegistrationName[key];
},
/**
@@ -20266,7 +20424,8 @@ return /******/ (function(modules) { // webpackBootstrap
var bankForRegistrationName = listenerBank[registrationName];
// TODO: This should never be null -- when is it?
if (bankForRegistrationName) {
- delete bankForRegistrationName[inst._rootNodeID];
+ var key = getDictionaryKey(inst);
+ delete bankForRegistrationName[key];
}
},
@@ -20276,8 +20435,13 @@ return /******/ (function(modules) { // webpackBootstrap
* @param {object} inst The instance, which is the source of events.
*/
deleteAllListeners: function (inst) {
+ var key = getDictionaryKey(inst);
for (var registrationName in listenerBank) {
- if (!listenerBank[registrationName][inst._rootNodeID]) {
+ if (!listenerBank.hasOwnProperty(registrationName)) {
+ continue;
+ }
+
+ if (!listenerBank[registrationName][key]) {
continue;
}
@@ -20286,7 +20450,7 @@ return /******/ (function(modules) { // webpackBootstrap
PluginModule.willDeleteListener(inst, registrationName);
}
- delete listenerBank[registrationName][inst._rootNodeID];
+ delete listenerBank[registrationName][key];
}
},
@@ -20341,7 +20505,7 @@ return /******/ (function(modules) { // webpackBootstrap
} else {
forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
}
- !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(false) : void 0;
+ !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
// This would be a good time to rethrow if any of the event handlers threw.
ReactErrorUtils.rethrowCaughtError();
},
@@ -20362,6 +20526,50 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = EventPluginHub;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
+/***/ },
+/* 319 */
+/***/ function(module, exports) {
+
+ /**
+ * Copyright (c) 2013-present, 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.
+ *
+ * @providesModule reactProdInvariant
+ *
+ */
+ 'use strict';
+
+ /**
+ * WARNING: DO NOT manually require this module.
+ * This is a replacement for `invariant(...)` used by the error code system
+ * and will _only_ be required by the corresponding babel pass.
+ * It always throws.
+ */
+
+ function reactProdInvariant(code) {
+ var argCount = arguments.length - 1;
+
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
+
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
+ }
+
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
+
+ var error = new Error(message);
+ error.name = 'Invariant Violation';
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
+
+ throw error;
+ }
+
+ module.exports = reactProdInvariant;
+
/***/ },
/* 320 */
/***/ function(module, exports, __webpack_require__) {
@@ -20379,7 +20587,9 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var invariant = __webpack_require__(317);
+ var _prodInvariant = __webpack_require__(319);
+
+ var invariant = __webpack_require__(316);
/**
* Injectable ordering of event plugins.
@@ -20404,15 +20614,15 @@ return /******/ (function(modules) { // webpackBootstrap
for (var pluginName in namesToPlugins) {
var PluginModule = namesToPlugins[pluginName];
var pluginIndex = EventPluginOrder.indexOf(pluginName);
- !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : void 0;
+ !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
if (EventPluginRegistry.plugins[pluginIndex]) {
continue;
}
- !PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : void 0;
+ !PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
EventPluginRegistry.plugins[pluginIndex] = PluginModule;
var publishedEvents = PluginModule.eventTypes;
for (var eventName in publishedEvents) {
- !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : void 0;
+ !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
}
}
}
@@ -20426,7 +20636,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @private
*/
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
- !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : void 0;
+ !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
@@ -20454,13 +20664,17 @@ return /******/ (function(modules) { // webpackBootstrap
* @private
*/
function publishRegistrationName(registrationName, PluginModule, eventName) {
- !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : void 0;
+ !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
if (process.env.NODE_ENV !== 'production') {
var lowerCasedName = registrationName.toLowerCase();
EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
+
+ if (registrationName === 'onDoubleClick') {
+ EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
+ }
}
}
@@ -20509,7 +20723,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @see {EventPluginHub.injection.injectEventPluginOrder}
*/
injectEventPluginOrder: function (InjectedEventPluginOrder) {
- !!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : void 0;
+ !!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
// Clone the ordering so it cannot be dynamically mutated.
EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
recomputePluginOrdering();
@@ -20533,7 +20747,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
var PluginModule = injectedNamesToPlugins[pluginName];
if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
- !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : void 0;
+ !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
namesToPlugins[pluginName] = PluginModule;
isOrderingDirty = true;
}
@@ -20626,10 +20840,12 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var EventConstants = __webpack_require__(315);
+ var _prodInvariant = __webpack_require__(319);
+
+ var EventConstants = __webpack_require__(314);
var ReactErrorUtils = __webpack_require__(322);
- var invariant = __webpack_require__(317);
+ var invariant = __webpack_require__(316);
var warning = __webpack_require__(323);
/**
@@ -20784,7 +21000,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
var dispatchListener = event._dispatchListeners;
var dispatchInstance = event._dispatchInstances;
- !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : void 0;
+ !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
var res = dispatchListener ? dispatchListener(event) : null;
event.currentTarget = null;
@@ -21042,14 +21258,16 @@ return /******/ (function(modules) { // webpackBootstrap
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule accumulateInto
+ *
*/
'use strict';
- var invariant = __webpack_require__(317);
+ var _prodInvariant = __webpack_require__(319);
+
+ var invariant = __webpack_require__(316);
/**
- *
* Accumulates items that must not be null or undefined into the first one. This
* is used to conserve memory by avoiding array allocations, and thus sacrifices
* API cleanness. Since `current` can be null before being passed in and not
@@ -21063,27 +21281,24 @@ return /******/ (function(modules) { // webpackBootstrap
*/
function accumulateInto(current, next) {
- !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(false) : void 0;
+ !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
+
if (current == null) {
return next;
}
// Both are not empty. Warning: Never call x.concat(y) when you are not
// certain that x is an Array (x could be a string with concat method).
- var currentIsArray = Array.isArray(current);
- var nextIsArray = Array.isArray(next);
-
- if (currentIsArray && nextIsArray) {
- current.push.apply(current, next);
- return current;
- }
-
- if (currentIsArray) {
+ if (Array.isArray(current)) {
+ if (Array.isArray(next)) {
+ current.push.apply(current, next);
+ return current;
+ }
current.push(next);
return current;
}
- if (nextIsArray) {
+ if (Array.isArray(next)) {
// A bit too dangerous to mutate `next`.
return [current].concat(next);
}
@@ -21107,6 +21322,7 @@ return /******/ (function(modules) { // webpackBootstrap
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule forEachAccumulated
+ *
*/
'use strict';
@@ -21119,13 +21335,13 @@ return /******/ (function(modules) { // webpackBootstrap
* allocate an array).
*/
- var forEachAccumulated = function (arr, cb, scope) {
+ function forEachAccumulated(arr, cb, scope) {
if (Array.isArray(arr)) {
arr.forEach(cb, scope);
} else if (arr) {
cb.call(scope, arr);
}
- };
+ }
module.exports = forEachAccumulated;
@@ -21375,7 +21591,9 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var invariant = __webpack_require__(317);
+ var _prodInvariant = __webpack_require__(319);
+
+ var invariant = __webpack_require__(316);
/**
* Static poolers. Several custom versions for each potential number of
@@ -21441,7 +21659,7 @@ return /******/ (function(modules) { // webpackBootstrap
var standardReleaser = function (instance) {
var Klass = this;
- !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : void 0;
+ !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
instance.destructor();
if (Klass.instancePool.length < Klass.poolSize) {
Klass.instancePool.push(instance);
@@ -21455,7 +21673,7 @@ return /******/ (function(modules) { // webpackBootstrap
* Augments `CopyConstructor` to be a poolable class, augmenting only the class
* itself (statically) not adding any prototypical fields. Any CopyConstructor
* you give this may have a `poolSize` property, and will look for a
- * prototypical `destructor` on instances (optional).
+ * prototypical `destructor` on instances.
*
* @param {Function} CopyConstructor Constructor that can be used to reset.
* @param {Function} pooler Customizable pooler.
@@ -21733,10 +21951,9 @@ return /******/ (function(modules) { // webpackBootstrap
this[shouldBeReleasedProperties[i]] = null;
}
if (process.env.NODE_ENV !== 'production') {
- var noop = __webpack_require__(324);
Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', noop));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', noop));
+ Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
+ Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
}
}
@@ -21927,17 +22144,17 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var EventConstants = __webpack_require__(315);
- var EventPluginHub = __webpack_require__(319);
- var EventPropagators = __webpack_require__(318);
+ var EventConstants = __webpack_require__(314);
+ var EventPluginHub = __webpack_require__(318);
+ var EventPropagators = __webpack_require__(317);
var ExecutionEnvironment = __webpack_require__(327);
var ReactDOMComponentTree = __webpack_require__(337);
var ReactUpdates = __webpack_require__(340);
var SyntheticEvent = __webpack_require__(333);
- var getEventTarget = __webpack_require__(354);
- var isEventSupported = __webpack_require__(355);
- var isTextInputElement = __webpack_require__(356);
+ var getEventTarget = __webpack_require__(356);
+ var isEventSupported = __webpack_require__(357);
+ var isTextInputElement = __webpack_require__(358);
var keyOf = __webpack_require__(335);
var topLevelTypes = EventConstants.topLevelTypes;
@@ -22257,10 +22474,12 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
+ var _prodInvariant = __webpack_require__(319);
+
var DOMProperty = __webpack_require__(338);
var ReactDOMComponentFlags = __webpack_require__(339);
- var invariant = __webpack_require__(317);
+ var invariant = __webpack_require__(316);
var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
var Flags = ReactDOMComponentFlags;
@@ -22268,13 +22487,13 @@ return /******/ (function(modules) { // webpackBootstrap
var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
/**
- * Drill down (through composites and empty components) until we get a native or
- * native text component.
+ * Drill down (through composites and empty components) until we get a host or
+ * host text component.
*
* This is pretty polymorphic but unavoidable with the current structure we have
* for `_renderedChildren`.
*/
- function getRenderedNativeOrTextFromComponent(component) {
+ function getRenderedHostOrTextFromComponent(component) {
var rendered;
while (rendered = component._renderedComponent) {
component = rendered;
@@ -22283,25 +22502,25 @@ return /******/ (function(modules) { // webpackBootstrap
}
/**
- * Populate `_nativeNode` on the rendered native/text component with the given
+ * Populate `_hostNode` on the rendered host/text component with the given
* DOM node. The passed `inst` can be a composite.
*/
function precacheNode(inst, node) {
- var nativeInst = getRenderedNativeOrTextFromComponent(inst);
- nativeInst._nativeNode = node;
- node[internalInstanceKey] = nativeInst;
+ var hostInst = getRenderedHostOrTextFromComponent(inst);
+ hostInst._hostNode = node;
+ node[internalInstanceKey] = hostInst;
}
function uncacheNode(inst) {
- var node = inst._nativeNode;
+ var node = inst._hostNode;
if (node) {
delete node[internalInstanceKey];
- inst._nativeNode = null;
+ inst._hostNode = null;
}
}
/**
- * Populate `_nativeNode` on each child of `inst`, assuming that the children
+ * Populate `_hostNode` on each child of `inst`, assuming that the children
* match up with the DOM (element) children of `node`.
*
* We cache entire levels at once to avoid an n^2 problem where we access the
@@ -22325,7 +22544,7 @@ return /******/ (function(modules) { // webpackBootstrap
continue;
}
var childInst = children[name];
- var childID = getRenderedNativeOrTextFromComponent(childInst)._domID;
+ var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
if (childID == null) {
// We're currently unmounting this child in ReactMultiChild; skip it.
continue;
@@ -22338,7 +22557,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
// We reached the end of the DOM children without finding an ID match.
- true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : invariant(false) : void 0;
+ true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
}
inst._flags |= Flags.hasCachedChildNodes;
}
@@ -22383,7 +22602,7 @@ return /******/ (function(modules) { // webpackBootstrap
*/
function getInstanceFromNode(node) {
var inst = getClosestInstanceFromNode(node);
- if (inst != null && inst._nativeNode === node) {
+ if (inst != null && inst._hostNode === node) {
return inst;
} else {
return null;
@@ -22397,27 +22616,27 @@ return /******/ (function(modules) { // webpackBootstrap
function getNodeFromInstance(inst) {
// Without this first invariant, passing a non-DOM-component triggers the next
// invariant for a missing parent, which is super confusing.
- !(inst._nativeNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;
+ !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
- if (inst._nativeNode) {
- return inst._nativeNode;
+ if (inst._hostNode) {
+ return inst._hostNode;
}
// Walk up the tree until we find an ancestor whose DOM node we have cached.
var parents = [];
- while (!inst._nativeNode) {
+ while (!inst._hostNode) {
parents.push(inst);
- !inst._nativeParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : invariant(false) : void 0;
- inst = inst._nativeParent;
+ !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
+ inst = inst._hostParent;
}
// Now parents contains each ancestor that does *not* have a cached native
// node, and `inst` is the deepest ancestor that does.
for (; parents.length; inst = parents.pop()) {
- precacheChildNodes(inst, inst._nativeNode);
+ precacheChildNodes(inst, inst._hostNode);
}
- return inst._nativeNode;
+ return inst._hostNode;
}
var ReactDOMComponentTree = {
@@ -22449,7 +22668,9 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var invariant = __webpack_require__(317);
+ var _prodInvariant = __webpack_require__(319);
+
+ var invariant = __webpack_require__(316);
function checkMask(value, bitmask) {
return (value & bitmask) === bitmask;
@@ -22461,7 +22682,6 @@ return /******/ (function(modules) { // webpackBootstrap
* specifies how the associated DOM property should be accessed or rendered.
*/
MUST_USE_PROPERTY: 0x1,
- HAS_SIDE_EFFECTS: 0x2,
HAS_BOOLEAN_VALUE: 0x4,
HAS_NUMERIC_VALUE: 0x8,
HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
@@ -22508,7 +22728,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
for (var propName in Properties) {
- !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(false) : void 0;
+ !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
var lowerCased = propName.toLowerCase();
var propConfig = Properties[propName];
@@ -22520,15 +22740,12 @@ return /******/ (function(modules) { // webpackBootstrap
mutationMethod: null,
mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
- hasSideEffects: checkMask(propConfig, Injection.HAS_SIDE_EFFECTS),
hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
};
-
- !(propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(false) : void 0;
- !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(false) : void 0;
+ !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
if (process.env.NODE_ENV !== 'production') {
DOMProperty.getPossibleStandardName[lowerCased] = propName;
@@ -22582,7 +22799,7 @@ return /******/ (function(modules) { // webpackBootstrap
ROOT_ATTRIBUTE_NAME: 'data-reactroot',
ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
- ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040',
+ ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
/**
* Map from property "standard name" to an object with info about how to set
@@ -22599,11 +22816,6 @@ return /******/ (function(modules) { // webpackBootstrap
* initial render.
* mustUseProperty:
* Whether the property must be accessed and mutated as an object property.
- * hasSideEffects:
- * Whether or not setting a value causes side effects such as triggering
- * resources to be loaded or text selection changes. If true, we read from
- * the DOM before updating to ensure that the value is only set if it has
- * changed.
* hasBooleanValue:
* Whether the property should be removed when set to a falsey value.
* hasNumericValue:
@@ -22691,16 +22903,16 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var _assign = __webpack_require__(329);
+ var _prodInvariant = __webpack_require__(319),
+ _assign = __webpack_require__(329);
var CallbackQueue = __webpack_require__(341);
var PooledClass = __webpack_require__(330);
var ReactFeatureFlags = __webpack_require__(342);
- var ReactInstrumentation = __webpack_require__(343);
- var ReactReconciler = __webpack_require__(350);
- var Transaction = __webpack_require__(353);
+ var ReactReconciler = __webpack_require__(343);
+ var Transaction = __webpack_require__(355);
- var invariant = __webpack_require__(317);
+ var invariant = __webpack_require__(316);
var dirtyComponents = [];
var updateBatchNumber = 0;
@@ -22710,7 +22922,7 @@ return /******/ (function(modules) { // webpackBootstrap
var batchingStrategy = null;
function ensureInjected() {
- !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(false) : void 0;
+ !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
}
var NESTED_UPDATES = {
@@ -22791,7 +23003,7 @@ return /******/ (function(modules) { // webpackBootstrap
function runBatchedUpdates(transaction) {
var len = transaction.dirtyComponentsLength;
- !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(false) : void 0;
+ !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
// Since reconciling a component higher in the owner hierarchy usually (not
// always -- see shouldComponentUpdate()) will reconcile children, reconcile
@@ -22843,10 +23055,6 @@ return /******/ (function(modules) { // webpackBootstrap
}
var flushBatchedUpdates = function () {
- if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onBeginFlush();
- }
-
// ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
// array and perform any updates enqueued by mount-ready handlers (i.e.,
// componentDidUpdate) but we need to check here too in order to catch
@@ -22866,10 +23074,6 @@ return /******/ (function(modules) { // webpackBootstrap
CallbackQueue.release(queue);
}
}
-
- if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onEndFlush();
- }
};
/**
@@ -22882,7 +23086,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Various parts of our code (such as ReactCompositeComponent's
// _renderValidatedComponent) assume that calls to render aren't nested;
// verify that that's the case. (This is called by each top-level update
- // function, like setProps, setState, forceUpdate, etc.; creation and
+ // function, like setState, forceUpdate, etc.; creation and
// destruction of top-level components is guarded in ReactMount.)
if (!batchingStrategy.isBatchingUpdates) {
@@ -22901,21 +23105,21 @@ return /******/ (function(modules) { // webpackBootstrap
* if no updates are currently being performed.
*/
function asap(callback, context) {
- !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : void 0;
+ !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
asapCallbackQueue.enqueue(callback, context);
asapEnqueued = true;
}
var ReactUpdatesInjection = {
injectReconcileTransaction: function (ReconcileTransaction) {
- !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : invariant(false) : void 0;
+ !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
},
injectBatchingStrategy: function (_batchingStrategy) {
- !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : invariant(false) : void 0;
- !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : invariant(false) : void 0;
- !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(false) : void 0;
+ !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
+ !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
+ !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
batchingStrategy = _batchingStrategy;
}
};
@@ -22956,11 +23160,12 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var _assign = __webpack_require__(329);
+ var _prodInvariant = __webpack_require__(319),
+ _assign = __webpack_require__(329);
var PooledClass = __webpack_require__(330);
- var invariant = __webpack_require__(317);
+ var invariant = __webpack_require__(316);
/**
* A specialized pseudo-event module to help keep track of components waiting to
@@ -23004,7 +23209,7 @@ return /******/ (function(modules) { // webpackBootstrap
var callbacks = this._callbacks;
var contexts = this._contexts;
if (callbacks) {
- !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : invariant(false) : void 0;
+ !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
this._callbacks = null;
this._contexts = null;
for (var i = 0; i < callbacks.length; i++) {
@@ -23063,6 +23268,7 @@ return /******/ (function(modules) { // webpackBootstrap
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactFeatureFlags
+ *
*/
'use strict';
@@ -23080,7 +23286,372 @@ return /******/ (function(modules) { // webpackBootstrap
/* 343 */
/***/ function(module, exports, __webpack_require__) {
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-present, 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.
+ *
+ * @providesModule ReactReconciler
+ */
+
+ 'use strict';
+
+ var ReactRef = __webpack_require__(344);
+ var ReactInstrumentation = __webpack_require__(346);
+
+ var warning = __webpack_require__(323);
+
+ /**
+ * Helper to call ReactRef.attachRefs with this composite component, split out
+ * to avoid allocations in the transaction mount-ready queue.
+ */
+ function attachRefs() {
+ ReactRef.attachRefs(this, this._currentElement);
+ }
+
+ var ReactReconciler = {
+
+ /**
+ * Initializes the component, renders markup, and registers event listeners.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
+ * @param {?object} the containing host component instance
+ * @param {?object} info about the host container
+ * @return {?string} Rendered markup to be inserted into the DOM.
+ * @final
+ * @internal
+ */
+ mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement);
+ ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'mountComponent');
+ }
+ }
+ var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context);
+ if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'mountComponent');
+ ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
+ }
+ }
+ return markup;
+ },
+
+ /**
+ * Returns a value that can be passed to
+ * ReactComponentEnvironment.replaceNodeWithMarkup.
+ */
+ getHostNode: function (internalInstance) {
+ return internalInstance.getHostNode();
+ },
+
+ /**
+ * Releases any resources allocated by `mountComponent`.
+ *
+ * @final
+ * @internal
+ */
+ unmountComponent: function (internalInstance, safely) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'unmountComponent');
+ }
+ }
+ ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
+ internalInstance.unmountComponent(safely);
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'unmountComponent');
+ ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Update a component using a new element.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactElement} nextElement
+ * @param {ReactReconcileTransaction} transaction
+ * @param {object} context
+ * @internal
+ */
+ receiveComponent: function (internalInstance, nextElement, transaction, context) {
+ var prevElement = internalInstance._currentElement;
+
+ if (nextElement === prevElement && context === internalInstance._context) {
+ // Since elements are immutable after the owner is rendered,
+ // we can do a cheap identity compare here to determine if this is a
+ // superfluous reconcile. It's possible for state to be mutable but such
+ // change should trigger an update of the owner which would recreate
+ // the element. We explicitly check for the existence of an owner since
+ // it's possible for an element created outside a composite to be
+ // deeply mutated and reused.
+
+ // TODO: Bailing out early is just a perf optimization right?
+ // TODO: Removing the return statement should affect correctness?
+ return;
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
+ ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'receiveComponent');
+ }
+ }
+
+ var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
+
+ if (refsChanged) {
+ ReactRef.detachRefs(internalInstance, prevElement);
+ }
+
+ internalInstance.receiveComponent(nextElement, transaction, context);
+
+ if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'receiveComponent');
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Flush any dirty changes in a component.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ */
+ performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
+ if (internalInstance._updateBatchNumber !== updateBatchNumber) {
+ // The component's enqueued batch number should always be the current
+ // batch or the following one.
+ process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
+ return;
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
+ }
+ }
+ internalInstance.performUpdateIfNecessary(transaction);
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ }
+
+ };
+
+ module.exports = ReactReconciler;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
+
+/***/ },
+/* 344 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright 2013-present, 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.
+ *
+ * @providesModule ReactRef
+ */
+
+ 'use strict';
+
+ var ReactOwner = __webpack_require__(345);
+
+ var ReactRef = {};
+
+ function attachRef(ref, component, owner) {
+ if (typeof ref === 'function') {
+ ref(component.getPublicInstance());
+ } else {
+ // Legacy ref
+ ReactOwner.addComponentAsRefTo(component, ref, owner);
+ }
+ }
+
+ function detachRef(ref, component, owner) {
+ if (typeof ref === 'function') {
+ ref(null);
+ } else {
+ // Legacy ref
+ ReactOwner.removeComponentAsRefFrom(component, ref, owner);
+ }
+ }
+
+ ReactRef.attachRefs = function (instance, element) {
+ if (element === null || element === false) {
+ return;
+ }
+ var ref = element.ref;
+ if (ref != null) {
+ attachRef(ref, instance, element._owner);
+ }
+ };
+
+ ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
+ // If either the owner or a `ref` has changed, make sure the newest owner
+ // has stored a reference to `this`, and the previous owner (if different)
+ // has forgotten the reference to `this`. We use the element instead
+ // of the public this.props because the post processing cannot determine
+ // a ref. The ref conceptually lives on the element.
+
+ // TODO: Should this even be possible? The owner cannot change because
+ // it's forbidden by shouldUpdateReactComponent. The ref can change
+ // if you swap the keys of but not the refs. Reconsider where this check
+ // is made. It probably belongs where the key checking and
+ // instantiateReactComponent is done.
+
+ var prevEmpty = prevElement === null || prevElement === false;
+ var nextEmpty = nextElement === null || nextElement === false;
+
+ return(
+ // This has a few false positives w/r/t empty components.
+ prevEmpty || nextEmpty || nextElement.ref !== prevElement.ref ||
+ // If owner changes but we have an unchanged function ref, don't update refs
+ typeof nextElement.ref === 'string' && nextElement._owner !== prevElement._owner
+ );
+ };
+
+ ReactRef.detachRefs = function (instance, element) {
+ if (element === null || element === false) {
+ return;
+ }
+ var ref = element.ref;
+ if (ref != null) {
+ detachRef(ref, instance, element._owner);
+ }
+ };
+
+ module.exports = ReactRef;
+
+/***/ },
+/* 345 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-present, 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.
+ *
+ * @providesModule ReactOwner
+ */
+
+ 'use strict';
+
+ var _prodInvariant = __webpack_require__(319);
+
+ var invariant = __webpack_require__(316);
+
/**
+ * ReactOwners are capable of storing references to owned components.
+ *
+ * All components are capable of //being// referenced by owner components, but
+ * only ReactOwner components are capable of //referencing// owned components.
+ * The named reference is known as a "ref".
+ *
+ * Refs are available when mounted and updated during reconciliation.
+ *
+ * var MyComponent = React.createClass({
+ * render: function() {
+ * return (
+ *
+ *
+ *
+ * );
+ * },
+ * handleClick: function() {
+ * this.refs.custom.handleClick();
+ * },
+ * componentDidMount: function() {
+ * this.refs.custom.initialize();
+ * }
+ * });
+ *
+ * Refs should rarely be used. When refs are used, they should only be done to
+ * control data that is not handled by React's data flow.
+ *
+ * @class ReactOwner
+ */
+ var ReactOwner = {
+
+ /**
+ * @param {?object} object
+ * @return {boolean} True if `object` is a valid owner.
+ * @final
+ */
+ isValidOwner: function (object) {
+ return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
+ },
+
+ /**
+ * Adds a component by ref to an owner component.
+ *
+ * @param {ReactComponent} component Component to reference.
+ * @param {string} ref Name by which to refer to the component.
+ * @param {ReactOwner} owner Component on which to record the ref.
+ * @final
+ * @internal
+ */
+ addComponentAsRefTo: function (component, ref, owner) {
+ !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
+ owner.attachRef(ref, component);
+ },
+
+ /**
+ * Removes a component by ref from an owner component.
+ *
+ * @param {ReactComponent} component Component to dereference.
+ * @param {string} ref Name of the ref to remove.
+ * @param {ReactOwner} owner Component on which the ref is recorded.
+ * @final
+ * @internal
+ */
+ removeComponentAsRefFrom: function (component, ref, owner) {
+ !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
+ var ownerPublicInstance = owner.getPublicInstance();
+ // Check that `component`'s owner is still alive and that `component` is still the current ref
+ // because we do not want to detach the ref if another component stole it.
+ if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
+ owner.detachRef(ref);
+ }
+ }
+
+ };
+
+ module.exports = ReactOwner;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
+
+/***/ },
+/* 346 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
*
@@ -23093,12 +23664,18 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var ReactDebugTool = __webpack_require__(344);
+ var debugTool = null;
- module.exports = { debugTool: ReactDebugTool };
+ if (process.env.NODE_ENV !== 'production') {
+ var ReactDebugTool = __webpack_require__(347);
+ debugTool = ReactDebugTool;
+ }
+
+ module.exports = { debugTool: debugTool };
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 344 */
+/* 347 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -23114,41 +23691,47 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
+ var ReactInvalidSetStateWarningDevTool = __webpack_require__(348);
+ var ReactHostOperationHistoryDevtool = __webpack_require__(349);
+ var ReactComponentTreeDevtool = __webpack_require__(350);
+ var ReactChildrenMutationWarningDevtool = __webpack_require__(352);
var ExecutionEnvironment = __webpack_require__(327);
- var performanceNow = __webpack_require__(345);
+ var performanceNow = __webpack_require__(353);
var warning = __webpack_require__(323);
var eventHandlers = [];
var handlerDoesThrowForEvent = {};
function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
- if (process.env.NODE_ENV !== 'production') {
- eventHandlers.forEach(function (handler) {
- try {
- if (handler[handlerFunctionName]) {
- handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5);
- }
- } catch (e) {
- process.env.NODE_ENV !== 'production' ? warning(!handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e.message) : void 0;
- handlerDoesThrowForEvent[handlerFunctionName] = true;
+ eventHandlers.forEach(function (handler) {
+ try {
+ if (handler[handlerFunctionName]) {
+ handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5);
}
- });
- }
+ } catch (e) {
+ process.env.NODE_ENV !== 'production' ? warning(handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e + '\n' + e.stack) : void 0;
+ handlerDoesThrowForEvent[handlerFunctionName] = true;
+ }
+ });
}
var isProfiling = false;
var flushHistory = [];
+ var lifeCycleTimerStack = [];
var currentFlushNesting = 0;
var currentFlushMeasurements = null;
var currentFlushStartTime = null;
var currentTimerDebugID = null;
var currentTimerStartTime = null;
+ var currentTimerNestedFlushDuration = null;
var currentTimerType = null;
+ var lifeCycleTimerHasWarned = false;
+
function clearHistory() {
ReactComponentTreeDevtool.purgeUnmountedComponents();
- ReactNativeOperationHistoryDevtool.clearHistory();
+ ReactHostOperationHistoryDevtool.clearHistory();
}
function getTreeSnapshot(registeredIDs) {
@@ -23169,38 +23752,100 @@ return /******/ (function(modules) { // webpackBootstrap
}
function resetMeasurements() {
- if (process.env.NODE_ENV !== 'production') {
- var previousStartTime = currentFlushStartTime;
- var previousMeasurements = currentFlushMeasurements || [];
- var previousOperations = ReactNativeOperationHistoryDevtool.getHistory();
-
- if (!isProfiling || currentFlushNesting === 0) {
- currentFlushStartTime = null;
- currentFlushMeasurements = null;
- clearHistory();
- return;
- }
-
- if (previousMeasurements.length || previousOperations.length) {
- var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs();
- flushHistory.push({
- duration: performanceNow() - previousStartTime,
- measurements: previousMeasurements || [],
- operations: previousOperations || [],
- treeSnapshot: getTreeSnapshot(registeredIDs)
- });
- }
+ var previousStartTime = currentFlushStartTime;
+ var previousMeasurements = currentFlushMeasurements || [];
+ var previousOperations = ReactHostOperationHistoryDevtool.getHistory();
+ if (currentFlushNesting === 0) {
+ currentFlushStartTime = null;
+ currentFlushMeasurements = null;
clearHistory();
- currentFlushStartTime = performanceNow();
- currentFlushMeasurements = [];
+ return;
+ }
+
+ if (previousMeasurements.length || previousOperations.length) {
+ var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs();
+ flushHistory.push({
+ duration: performanceNow() - previousStartTime,
+ measurements: previousMeasurements || [],
+ operations: previousOperations || [],
+ treeSnapshot: getTreeSnapshot(registeredIDs)
+ });
}
+
+ clearHistory();
+ currentFlushStartTime = performanceNow();
+ currentFlushMeasurements = [];
}
function checkDebugID(debugID) {
process.env.NODE_ENV !== 'production' ? warning(debugID, 'ReactDebugTool: debugID may not be empty.') : void 0;
}
+ function beginLifeCycleTimer(debugID, timerType) {
+ if (currentFlushNesting === 0) {
+ return;
+ }
+ if (currentTimerType && !lifeCycleTimerHasWarned) {
+ process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
+ lifeCycleTimerHasWarned = true;
+ }
+ currentTimerStartTime = performanceNow();
+ currentTimerNestedFlushDuration = 0;
+ currentTimerDebugID = debugID;
+ currentTimerType = timerType;
+ }
+
+ function endLifeCycleTimer(debugID, timerType) {
+ if (currentFlushNesting === 0) {
+ return;
+ }
+ if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
+ process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
+ lifeCycleTimerHasWarned = true;
+ }
+ if (isProfiling) {
+ currentFlushMeasurements.push({
+ timerType: timerType,
+ instanceID: debugID,
+ duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
+ });
+ }
+ currentTimerStartTime = null;
+ currentTimerNestedFlushDuration = null;
+ currentTimerDebugID = null;
+ currentTimerType = null;
+ }
+
+ function pauseCurrentLifeCycleTimer() {
+ var currentTimer = {
+ startTime: currentTimerStartTime,
+ nestedFlushStartTime: performanceNow(),
+ debugID: currentTimerDebugID,
+ timerType: currentTimerType
+ };
+ lifeCycleTimerStack.push(currentTimer);
+ currentTimerStartTime = null;
+ currentTimerNestedFlushDuration = null;
+ currentTimerDebugID = null;
+ currentTimerType = null;
+ }
+
+ function resumeCurrentLifeCycleTimer() {
+ var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop();
+
+ var startTime = _lifeCycleTimerStack$.startTime;
+ var nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime;
+ var debugID = _lifeCycleTimerStack$.debugID;
+ var timerType = _lifeCycleTimerStack$.timerType;
+
+ var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
+ currentTimerStartTime = startTime;
+ currentTimerNestedFlushDuration += nestedFlushDuration;
+ currentTimerDebugID = debugID;
+ currentTimerType = timerType;
+ }
+
var ReactDebugTool = {
addDevtool: function (devtool) {
eventHandlers.push(devtool);
@@ -23213,73 +23858,51 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
},
+ isProfiling: function () {
+ return isProfiling;
+ },
beginProfiling: function () {
- if (process.env.NODE_ENV !== 'production') {
- if (isProfiling) {
- return;
- }
-
- isProfiling = true;
- flushHistory.length = 0;
- resetMeasurements();
+ if (isProfiling) {
+ return;
}
+
+ isProfiling = true;
+ flushHistory.length = 0;
+ resetMeasurements();
+ ReactDebugTool.addDevtool(ReactHostOperationHistoryDevtool);
},
endProfiling: function () {
- if (process.env.NODE_ENV !== 'production') {
- if (!isProfiling) {
- return;
- }
-
- isProfiling = false;
- resetMeasurements();
+ if (!isProfiling) {
+ return;
}
+
+ isProfiling = false;
+ resetMeasurements();
+ ReactDebugTool.removeDevtool(ReactHostOperationHistoryDevtool);
},
getFlushHistory: function () {
- if (process.env.NODE_ENV !== 'production') {
- return flushHistory;
- }
+ return flushHistory;
},
onBeginFlush: function () {
- if (process.env.NODE_ENV !== 'production') {
- currentFlushNesting++;
- resetMeasurements();
- }
+ currentFlushNesting++;
+ resetMeasurements();
+ pauseCurrentLifeCycleTimer();
emitEvent('onBeginFlush');
},
onEndFlush: function () {
- if (process.env.NODE_ENV !== 'production') {
- resetMeasurements();
- currentFlushNesting--;
- }
+ resetMeasurements();
+ currentFlushNesting--;
+ resumeCurrentLifeCycleTimer();
emitEvent('onEndFlush');
},
onBeginLifeCycleTimer: function (debugID, timerType) {
checkDebugID(debugID);
emitEvent('onBeginLifeCycleTimer', debugID, timerType);
- if (process.env.NODE_ENV !== 'production') {
- if (isProfiling && currentFlushNesting > 0) {
- process.env.NODE_ENV !== 'production' ? warning(!currentTimerType, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
- currentTimerStartTime = performanceNow();
- currentTimerDebugID = debugID;
- currentTimerType = timerType;
- }
- }
+ beginLifeCycleTimer(debugID, timerType);
},
onEndLifeCycleTimer: function (debugID, timerType) {
checkDebugID(debugID);
- if (process.env.NODE_ENV !== 'production') {
- if (isProfiling && currentFlushNesting > 0) {
- process.env.NODE_ENV !== 'production' ? warning(currentTimerType === timerType, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
- currentFlushMeasurements.push({
- timerType: timerType,
- instanceID: debugID,
- duration: performanceNow() - currentTimerStartTime
- });
- currentTimerStartTime = null;
- currentTimerDebugID = null;
- currentTimerType = null;
- }
- }
+ endLifeCycleTimer(debugID, timerType);
emitEvent('onEndLifeCycleTimer', debugID, timerType);
},
onBeginReconcilerTimer: function (debugID, timerType) {
@@ -23290,15 +23913,29 @@ return /******/ (function(modules) { // webpackBootstrap
checkDebugID(debugID);
emitEvent('onEndReconcilerTimer', debugID, timerType);
},
+ onError: function (debugID) {
+ if (currentTimerDebugID != null) {
+ endLifeCycleTimer(currentTimerDebugID, currentTimerType);
+ }
+ emitEvent('onError', debugID);
+ },
onBeginProcessingChildContext: function () {
emitEvent('onBeginProcessingChildContext');
},
onEndProcessingChildContext: function () {
emitEvent('onEndProcessingChildContext');
},
- onNativeOperation: function (debugID, type, payload) {
+ onHostOperation: function (debugID, type, payload) {
+ checkDebugID(debugID);
+ emitEvent('onHostOperation', debugID, type, payload);
+ },
+ onComponentHasMounted: function (debugID) {
+ checkDebugID(debugID);
+ emitEvent('onComponentHasMounted', debugID);
+ },
+ onComponentHasUpdated: function (debugID) {
checkDebugID(debugID);
- emitEvent('onNativeOperation', debugID, type, payload);
+ emitEvent('onComponentHasUpdated', debugID);
},
onSetState: function () {
emitEvent('onSetState');
@@ -23309,12 +23946,17 @@ return /******/ (function(modules) { // webpackBootstrap
},
onSetChildren: function (debugID, childDebugIDs) {
checkDebugID(debugID);
+ childDebugIDs.forEach(checkDebugID);
emitEvent('onSetChildren', debugID, childDebugIDs);
},
onSetOwner: function (debugID, ownerDebugID) {
checkDebugID(debugID);
emitEvent('onSetOwner', debugID, ownerDebugID);
},
+ onSetParent: function (debugID, parentDebugID) {
+ checkDebugID(debugID);
+ emitEvent('onSetParent', debugID, parentDebugID);
+ },
onSetText: function (debugID, text) {
checkDebugID(debugID);
emitEvent('onSetText', debugID, text);
@@ -23323,10 +23965,18 @@ return /******/ (function(modules) { // webpackBootstrap
checkDebugID(debugID);
emitEvent('onMountRootComponent', debugID);
},
+ onBeforeMountComponent: function (debugID, element) {
+ checkDebugID(debugID);
+ emitEvent('onBeforeMountComponent', debugID, element);
+ },
onMountComponent: function (debugID) {
checkDebugID(debugID);
emitEvent('onMountComponent', debugID);
},
+ onBeforeUpdateComponent: function (debugID, element) {
+ checkDebugID(debugID);
+ emitEvent('onBeforeUpdateComponent', debugID, element);
+ },
onUpdateComponent: function (debugID) {
checkDebugID(debugID);
emitEvent('onUpdateComponent', debugID);
@@ -23334,92 +23984,25 @@ return /******/ (function(modules) { // webpackBootstrap
onUnmountComponent: function (debugID) {
checkDebugID(debugID);
emitEvent('onUnmountComponent', debugID);
+ },
+ onTestEvent: function () {
+ emitEvent('onTestEvent');
}
};
- if (process.env.NODE_ENV !== 'production') {
- var ReactInvalidSetStateWarningDevTool = __webpack_require__(347);
- var ReactNativeOperationHistoryDevtool = __webpack_require__(348);
- var ReactComponentTreeDevtool = __webpack_require__(349);
- ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool);
- ReactDebugTool.addDevtool(ReactComponentTreeDevtool);
- ReactDebugTool.addDevtool(ReactNativeOperationHistoryDevtool);
- var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
- if (/[?&]react_perf\b/.test(url)) {
- ReactDebugTool.beginProfiling();
- }
+ ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool);
+ ReactDebugTool.addDevtool(ReactComponentTreeDevtool);
+ ReactDebugTool.addDevtool(ReactChildrenMutationWarningDevtool);
+ var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
+ if (/[?&]react_perf\b/.test(url)) {
+ ReactDebugTool.beginProfiling();
}
module.exports = ReactDebugTool;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 345 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- /**
- * Copyright (c) 2013-present, 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.
- *
- * @typechecks
- */
-
- var performance = __webpack_require__(346);
-
- var performanceNow;
-
- /**
- * Detect if we can use `window.performance.now()` and gracefully fallback to
- * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
- * because of Facebook's testing infrastructure.
- */
- if (performance.now) {
- performanceNow = function performanceNow() {
- return performance.now();
- };
- } else {
- performanceNow = function performanceNow() {
- return Date.now();
- };
- }
-
- module.exports = performanceNow;
-
-/***/ },
-/* 346 */
-/***/ function(module, exports, __webpack_require__) {
-
- /**
- * Copyright (c) 2013-present, 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.
- *
- * @typechecks
- */
-
- 'use strict';
-
- var ExecutionEnvironment = __webpack_require__(327);
-
- var performance;
-
- if (ExecutionEnvironment.canUseDOM) {
- performance = window.performance || window.msPerformance || window.webkitPerformance;
- }
-
- module.exports = performance || {};
-
-/***/ },
-/* 347 */
+/* 348 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -23461,7 +24044,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 348 */
+/* 349 */
/***/ function(module, exports) {
/**
@@ -23472,15 +24055,15 @@ return /******/ (function(modules) { // webpackBootstrap
* 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.
*
- * @providesModule ReactNativeOperationHistoryDevtool
+ * @providesModule ReactHostOperationHistoryDevtool
*/
'use strict';
var history = [];
- var ReactNativeOperationHistoryDevtool = {
- onNativeOperation: function (debugID, type, payload) {
+ var ReactHostOperationHistoryDevtool = {
+ onHostOperation: function (debugID, type, payload) {
history.push({
instanceID: debugID,
type: type,
@@ -23488,7 +24071,7 @@ return /******/ (function(modules) { // webpackBootstrap
});
},
clearHistory: function () {
- if (ReactNativeOperationHistoryDevtool._preventClearing) {
+ if (ReactHostOperationHistoryDevtool._preventClearing) {
// Should only be used for tests.
return;
}
@@ -23500,10 +24083,10 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- module.exports = ReactNativeOperationHistoryDevtool;
+ module.exports = ReactHostOperationHistoryDevtool;
/***/ },
-/* 349 */
+/* 350 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -23519,14 +24102,21 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var invariant = __webpack_require__(317);
+ var _prodInvariant = __webpack_require__(319);
+
+ var ReactCurrentOwner = __webpack_require__(351);
+
+ var invariant = __webpack_require__(316);
+ var warning = __webpack_require__(323);
var tree = {};
- var rootIDs = [];
+ var unmountedIDs = {};
+ var rootIDs = {};
function updateTree(id, update) {
if (!tree[id]) {
tree[id] = {
+ element: null,
parentID: null,
ownerID: null,
text: null,
@@ -23549,6 +24139,22 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
+ function describeComponentFrame(name, source, ownerName) {
+ return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
+ }
+
+ function describeID(id) {
+ var name = ReactComponentTreeDevtool.getDisplayName(id);
+ var element = ReactComponentTreeDevtool.getElement(id);
+ var ownerID = ReactComponentTreeDevtool.getOwnerID(id);
+ var ownerName;
+ if (ownerID) {
+ ownerName = ReactComponentTreeDevtool.getDisplayName(ownerID);
+ }
+ process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeDevtool: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
+ return describeComponentFrame(name, element && element._source, ownerName);
+ }
+
var ReactComponentTreeDevtool = {
onSetDisplayName: function (id, displayName) {
updateTree(id, function (item) {
@@ -23557,19 +24163,21 @@ return /******/ (function(modules) { // webpackBootstrap
},
onSetChildren: function (id, nextChildIDs) {
updateTree(id, function (item) {
- var prevChildIDs = item.childIDs;
item.childIDs = nextChildIDs;
nextChildIDs.forEach(function (nextChildID) {
var nextChild = tree[nextChildID];
- !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected devtool events to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0;
- !(nextChild.displayName != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetDisplayName() to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0;
- !(nextChild.childIDs != null || nextChild.text != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() or onSetText() to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0;
- !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0;
-
- if (prevChildIDs.indexOf(nextChildID) === -1) {
+ !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected devtool events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('68') : void 0;
+ !(nextChild.displayName != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetDisplayName() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('69') : void 0;
+ !(nextChild.childIDs != null || nextChild.text != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() or onSetText() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('70') : void 0;
+ !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
+ if (nextChild.parentID == null) {
nextChild.parentID = id;
+ // TODO: This shouldn't be necessary but mounting a new root during in
+ // componentWillMount currently causes not-yet-mounted components to
+ // be purged from our tree data so their parent ID is missing.
}
+ !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetParent() and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('72', nextChildID, nextChild.parentID, id) : void 0;
});
});
},
@@ -23578,18 +24186,33 @@ return /******/ (function(modules) { // webpackBootstrap
return item.ownerID = ownerID;
});
},
+ onSetParent: function (id, parentID) {
+ updateTree(id, function (item) {
+ return item.parentID = parentID;
+ });
+ },
onSetText: function (id, text) {
updateTree(id, function (item) {
return item.text = text;
});
},
+ onBeforeMountComponent: function (id, element) {
+ updateTree(id, function (item) {
+ return item.element = element;
+ });
+ },
+ onBeforeUpdateComponent: function (id, element) {
+ updateTree(id, function (item) {
+ return item.element = element;
+ });
+ },
onMountComponent: function (id) {
updateTree(id, function (item) {
return item.isMounted = true;
});
},
onMountRootComponent: function (id) {
- rootIDs.push(id);
+ rootIDs[id] = true;
},
onUpdateComponent: function (id) {
updateTree(id, function (item) {
@@ -23600,9 +24223,8 @@ return /******/ (function(modules) { // webpackBootstrap
updateTree(id, function (item) {
return item.isMounted = false;
});
- rootIDs = rootIDs.filter(function (rootID) {
- return rootID !== id;
- });
+ unmountedIDs[id] = true;
+ delete rootIDs[id];
},
purgeUnmountedComponents: function () {
if (ReactComponentTreeDevtool._preventPurging) {
@@ -23610,14 +24232,38 @@ return /******/ (function(modules) { // webpackBootstrap
return;
}
- Object.keys(tree).filter(function (id) {
- return !tree[id].isMounted;
- }).forEach(purgeDeep);
+ for (var id in unmountedIDs) {
+ purgeDeep(id);
+ }
+ unmountedIDs = {};
},
isMounted: function (id) {
var item = tree[id];
return item ? item.isMounted : false;
},
+ getCurrentStackAddendum: function (topElement) {
+ var info = '';
+ if (topElement) {
+ var type = topElement.type;
+ var name = typeof type === 'function' ? type.displayName || type.name : type;
+ var owner = topElement._owner;
+ info += describeComponentFrame(name || 'Unknown', topElement._source, owner && owner.getName());
+ }
+
+ var currentOwner = ReactCurrentOwner.current;
+ var id = currentOwner && currentOwner._debugID;
+
+ info += ReactComponentTreeDevtool.getStackAddendumByID(id);
+ return info;
+ },
+ getStackAddendumByID: function (id) {
+ var info = '';
+ while (id) {
+ info += describeID(id);
+ id = ReactComponentTreeDevtool.getParentID(id);
+ }
+ return info;
+ },
getChildIDs: function (id) {
var item = tree[id];
return item ? item.childIDs : [];
@@ -23626,6 +24272,10 @@ return /******/ (function(modules) { // webpackBootstrap
var item = tree[id];
return item ? item.displayName : 'Unknown';
},
+ getElement: function (id) {
+ var item = tree[id];
+ return item ? item.element : null;
+ },
getOwnerID: function (id) {
var item = tree[id];
return item ? item.ownerID : null;
@@ -23634,6 +24284,12 @@ return /******/ (function(modules) { // webpackBootstrap
var item = tree[id];
return item ? item.parentID : null;
},
+ getSource: function (id) {
+ var item = tree[id];
+ var element = item ? item.element : null;
+ var source = element != null ? element._source : null;
+ return source;
+ },
getText: function (id) {
var item = tree[id];
return item ? item.text : null;
@@ -23643,7 +24299,7 @@ return /******/ (function(modules) { // webpackBootstrap
return item ? item.updateCount : 0;
},
getRootIDs: function () {
- return rootIDs;
+ return Object.keys(rootIDs);
},
getRegisteredIDs: function () {
return Object.keys(tree);
@@ -23654,10 +24310,10 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 350 */
-/***/ function(module, exports, __webpack_require__) {
+/* 351 */
+/***/ function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(process) {/**
+ /**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
@@ -23665,256 +24321,165 @@ return /******/ (function(modules) { // webpackBootstrap
* 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.
*
- * @providesModule ReactReconciler
+ * @providesModule ReactCurrentOwner
*/
'use strict';
- var ReactRef = __webpack_require__(351);
- var ReactInstrumentation = __webpack_require__(343);
-
- var invariant = __webpack_require__(317);
-
/**
- * Helper to call ReactRef.attachRefs with this composite component, split out
- * to avoid allocations in the transaction mount-ready queue.
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
*/
- function attachRefs() {
- ReactRef.attachRefs(this, this._currentElement);
- }
-
- var ReactReconciler = {
-
- /**
- * Initializes the component, renders markup, and registers event listeners.
- *
- * @param {ReactComponent} internalInstance
- * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
- * @param {?object} the containing native component instance
- * @param {?object} info about the native container
- * @return {?string} Rendered markup to be inserted into the DOM.
- * @final
- * @internal
- */
- mountComponent: function (internalInstance, transaction, nativeParent, nativeContainerInfo, context) {
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'mountComponent');
- }
- }
- var markup = internalInstance.mountComponent(transaction, nativeParent, nativeContainerInfo, context);
- if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
- transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
- }
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'mountComponent');
- ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
- }
- }
- return markup;
- },
-
- /**
- * Returns a value that can be passed to
- * ReactComponentEnvironment.replaceNodeWithMarkup.
- */
- getNativeNode: function (internalInstance) {
- return internalInstance.getNativeNode();
- },
- /**
- * Releases any resources allocated by `mountComponent`.
- *
- * @final
- * @internal
- */
- unmountComponent: function (internalInstance, safely) {
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'unmountComponent');
- }
- }
- ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
- internalInstance.unmountComponent(safely);
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'unmountComponent');
- ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
- }
- }
- },
+ var ReactCurrentOwner = {
/**
- * Update a component using a new element.
- *
- * @param {ReactComponent} internalInstance
- * @param {ReactElement} nextElement
- * @param {ReactReconcileTransaction} transaction
- * @param {object} context
* @internal
+ * @type {ReactComponent}
*/
- receiveComponent: function (internalInstance, nextElement, transaction, context) {
- var prevElement = internalInstance._currentElement;
-
- if (nextElement === prevElement && context === internalInstance._context) {
- // Since elements are immutable after the owner is rendered,
- // we can do a cheap identity compare here to determine if this is a
- // superfluous reconcile. It's possible for state to be mutable but such
- // change should trigger an update of the owner which would recreate
- // the element. We explicitly check for the existence of an owner since
- // it's possible for an element created outside a composite to be
- // deeply mutated and reused.
-
- // TODO: Bailing out early is just a perf optimization right?
- // TODO: Removing the return statement should affect correctness?
- return;
- }
+ current: null
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'receiveComponent');
- }
- }
+ };
- var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
+ module.exports = ReactCurrentOwner;
+
+/***/ },
+/* 352 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-present, 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.
+ *
+ * @providesModule ReactChildrenMutationWarningDevtool
+ */
- if (refsChanged) {
- ReactRef.detachRefs(internalInstance, prevElement);
- }
+ 'use strict';
- internalInstance.receiveComponent(nextElement, transaction, context);
+ var ReactComponentTreeDevtool = __webpack_require__(350);
- if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
- transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
- }
+ var warning = __webpack_require__(323);
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'receiveComponent');
- ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
- }
- }
- },
+ var elements = {};
- /**
- * Flush any dirty changes in a component.
- *
- * @param {ReactComponent} internalInstance
- * @param {ReactReconcileTransaction} transaction
- * @internal
- */
- performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
- if (internalInstance._updateBatchNumber !== updateBatchNumber) {
- // The component's enqueued batch number should always be the current
- // batch or the following one.
- !(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : invariant(false) : void 0;
- return;
- }
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
- }
- }
- internalInstance.performUpdateIfNecessary(transaction);
- if (process.env.NODE_ENV !== 'production') {
- if (internalInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
- ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ function handleElement(debugID, element) {
+ if (element == null) {
+ return;
+ }
+ if (element._shadowChildren === undefined) {
+ return;
+ }
+ if (element._shadowChildren === element.props.children) {
+ return;
+ }
+ var isMutated = false;
+ if (Array.isArray(element._shadowChildren)) {
+ if (element._shadowChildren.length === element.props.children.length) {
+ for (var i = 0; i < element._shadowChildren.length; i++) {
+ if (element._shadowChildren[i] !== element.props.children[i]) {
+ isMutated = true;
+ }
}
+ } else {
+ isMutated = true;
}
}
+ process.env.NODE_ENV !== 'production' ? warning(Array.isArray(element._shadowChildren) && !isMutated, 'Component\'s children should not be mutated.%s', ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0;
+ }
+ var ReactDOMUnknownPropertyDevtool = {
+ onBeforeMountComponent: function (debugID, element) {
+ elements[debugID] = element;
+ },
+ onBeforeUpdateComponent: function (debugID, element) {
+ elements[debugID] = element;
+ },
+ onComponentHasMounted: function (debugID) {
+ handleElement(debugID, elements[debugID]);
+ delete elements[debugID];
+ },
+ onComponentHasUpdated: function (debugID) {
+ handleElement(debugID, elements[debugID]);
+ delete elements[debugID];
+ }
};
- module.exports = ReactReconciler;
+ module.exports = ReactDOMUnknownPropertyDevtool;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 351 */
+/* 353 */
/***/ function(module, exports, __webpack_require__) {
+ 'use strict';
+
/**
- * Copyright 2013-present, Facebook, Inc.
+ * Copyright (c) 2013-present, 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.
*
- * @providesModule ReactRef
+ * @typechecks
*/
- 'use strict';
-
- var ReactOwner = __webpack_require__(352);
-
- var ReactRef = {};
+ var performance = __webpack_require__(354);
- function attachRef(ref, component, owner) {
- if (typeof ref === 'function') {
- ref(component.getPublicInstance());
- } else {
- // Legacy ref
- ReactOwner.addComponentAsRefTo(component, ref, owner);
- }
- }
+ var performanceNow;
- function detachRef(ref, component, owner) {
- if (typeof ref === 'function') {
- ref(null);
- } else {
- // Legacy ref
- ReactOwner.removeComponentAsRefFrom(component, ref, owner);
- }
+ /**
+ * Detect if we can use `window.performance.now()` and gracefully fallback to
+ * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
+ * because of Facebook's testing infrastructure.
+ */
+ if (performance.now) {
+ performanceNow = function performanceNow() {
+ return performance.now();
+ };
+ } else {
+ performanceNow = function performanceNow() {
+ return Date.now();
+ };
}
- ReactRef.attachRefs = function (instance, element) {
- if (element === null || element === false) {
- return;
- }
- var ref = element.ref;
- if (ref != null) {
- attachRef(ref, instance, element._owner);
- }
- };
-
- ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
- // If either the owner or a `ref` has changed, make sure the newest owner
- // has stored a reference to `this`, and the previous owner (if different)
- // has forgotten the reference to `this`. We use the element instead
- // of the public this.props because the post processing cannot determine
- // a ref. The ref conceptually lives on the element.
+ module.exports = performanceNow;
+
+/***/ },
+/* 354 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2013-present, 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.
+ *
+ * @typechecks
+ */
- // TODO: Should this even be possible? The owner cannot change because
- // it's forbidden by shouldUpdateReactComponent. The ref can change
- // if you swap the keys of but not the refs. Reconsider where this check
- // is made. It probably belongs where the key checking and
- // instantiateReactComponent is done.
+ 'use strict';
- var prevEmpty = prevElement === null || prevElement === false;
- var nextEmpty = nextElement === null || nextElement === false;
+ var ExecutionEnvironment = __webpack_require__(327);
- return(
- // This has a few false positives w/r/t empty components.
- prevEmpty || nextEmpty || nextElement._owner !== prevElement._owner || nextElement.ref !== prevElement.ref
- );
- };
+ var performance;
- ReactRef.detachRefs = function (instance, element) {
- if (element === null || element === false) {
- return;
- }
- var ref = element.ref;
- if (ref != null) {
- detachRef(ref, instance, element._owner);
- }
- };
+ if (ExecutionEnvironment.canUseDOM) {
+ performance = window.performance || window.msPerformance || window.webkitPerformance;
+ }
- module.exports = ReactRef;
+ module.exports = performance || {};
/***/ },
-/* 352 */
+/* 355 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -23925,147 +24490,51 @@ return /******/ (function(modules) { // webpackBootstrap
* 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.
*
- * @providesModule ReactOwner
+ * @providesModule Transaction
*/
'use strict';
- var invariant = __webpack_require__(317);
+ var _prodInvariant = __webpack_require__(319);
+
+ var invariant = __webpack_require__(316);
/**
- * ReactOwners are capable of storing references to owned components.
- *
- * All components are capable of //being// referenced by owner components, but
- * only ReactOwner components are capable of //referencing// owned components.
- * The named reference is known as a "ref".
+ * `Transaction` creates a black box that is able to wrap any method such that
+ * certain invariants are maintained before and after the method is invoked
+ * (Even if an exception is thrown while invoking the wrapped method). Whoever
+ * instantiates a transaction can provide enforcers of the invariants at
+ * creation time. The `Transaction` class itself will supply one additional
+ * automatic invariant for you - the invariant that any transaction instance
+ * should not be run while it is already being run. You would typically create a
+ * single instance of a `Transaction` for reuse multiple times, that potentially
+ * is used to wrap several different methods. Wrappers are extremely simple -
+ * they only require implementing two methods.
*
- * Refs are available when mounted and updated during reconciliation.
- *
- * var MyComponent = React.createClass({
- * render: function() {
- * return (
- *
- *
- *
- * );
- * },
- * handleClick: function() {
- * this.refs.custom.handleClick();
- * },
- * componentDidMount: function() {
- * this.refs.custom.initialize();
- * }
- * });
- *
- * Refs should rarely be used. When refs are used, they should only be done to
- * control data that is not handled by React's data flow.
- *
- * @class ReactOwner
- */
- var ReactOwner = {
-
- /**
- * @param {?object} object
- * @return {boolean} True if `object` is a valid owner.
- * @final
- */
- isValidOwner: function (object) {
- return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
- },
-
- /**
- * Adds a component by ref to an owner component.
- *
- * @param {ReactComponent} component Component to reference.
- * @param {string} ref Name by which to refer to the component.
- * @param {ReactOwner} owner Component on which to record the ref.
- * @final
- * @internal
- */
- addComponentAsRefTo: function (component, ref, owner) {
- !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might ' + 'be adding a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : void 0;
- owner.attachRef(ref, component);
- },
-
- /**
- * Removes a component by ref from an owner component.
- *
- * @param {ReactComponent} component Component to dereference.
- * @param {string} ref Name of the ref to remove.
- * @param {ReactOwner} owner Component on which the ref is recorded.
- * @final
- * @internal
- */
- removeComponentAsRefFrom: function (component, ref, owner) {
- !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might ' + 'be removing a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : void 0;
- var ownerPublicInstance = owner.getPublicInstance();
- // Check that `component`'s owner is still alive and that `component` is still the current ref
- // because we do not want to detach the ref if another component stole it.
- if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
- owner.detachRef(ref);
- }
- }
-
- };
-
- module.exports = ReactOwner;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
-
-/***/ },
-/* 353 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright 2013-present, 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.
- *
- * @providesModule Transaction
- */
-
- 'use strict';
-
- var invariant = __webpack_require__(317);
-
- /**
- * `Transaction` creates a black box that is able to wrap any method such that
- * certain invariants are maintained before and after the method is invoked
- * (Even if an exception is thrown while invoking the wrapped method). Whoever
- * instantiates a transaction can provide enforcers of the invariants at
- * creation time. The `Transaction` class itself will supply one additional
- * automatic invariant for you - the invariant that any transaction instance
- * should not be run while it is already being run. You would typically create a
- * single instance of a `Transaction` for reuse multiple times, that potentially
- * is used to wrap several different methods. Wrappers are extremely simple -
- * they only require implementing two methods.
- *
- *
- * wrappers (injected at creation time)
- * + +
- * | |
- * +-----------------|--------|--------------+
- * | v | |
- * | +---------------+ | |
- * | +--| wrapper1 |---|----+ |
- * | | +---------------+ v | |
- * | | +-------------+ | |
- * | | +----| wrapper2 |--------+ |
- * | | | +-------------+ | | |
- * | | | | | |
- * | v v v v | wrapper
- * | +---+ +---+ +---------+ +---+ +---+ | invariants
- * perform(anyMethod) | | | | | | | | | | | | maintained
- * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
- * | | | | | | | | | | | |
- * | | | | | | | | | | | |
- * | | | | | | | | | | | |
- * | +---+ +---+ +---------+ +---+ +---+ |
- * | initialize close |
- * +-----------------------------------------+
- *
+ *
+ * wrappers (injected at creation time)
+ * + +
+ * | |
+ * +-----------------|--------|--------------+
+ * | v | |
+ * | +---------------+ | |
+ * | +--| wrapper1 |---|----+ |
+ * | | +---------------+ v | |
+ * | | +-------------+ | |
+ * | | +----| wrapper2 |--------+ |
+ * | | | +-------------+ | | |
+ * | | | | | |
+ * | v v v v | wrapper
+ * | +---+ +---+ +---------+ +---+ +---+ | invariants
+ * perform(anyMethod) | | | | | | | | | | | | maintained
+ * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
+ * | | | | | | | | | | | |
+ * | | | | | | | | | | | |
+ * | | | | | | | | | | | |
+ * | +---+ +---+ +---------+ +---+ +---+ |
+ * | initialize close |
+ * +-----------------------------------------+
+ *
*
* Use cases:
* - Preserving the input selection ranges before/after reconciliation.
@@ -24139,7 +24608,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @return {*} Return value from `method`.
*/
perform: function (method, scope, a, b, c, d, e, f) {
- !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : void 0;
+ !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
var errorThrown;
var ret;
try {
@@ -24203,7 +24672,7 @@ return /******/ (function(modules) { // webpackBootstrap
* invoked).
*/
closeAll: function (startIndex) {
- !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : void 0;
+ !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
var transactionWrappers = this.transactionWrappers;
for (var i = startIndex; i < transactionWrappers.length; i++) {
var wrapper = transactionWrappers[i];
@@ -24249,7 +24718,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 354 */
+/* 356 */
/***/ function(module, exports) {
/**
@@ -24289,7 +24758,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = getEventTarget;
/***/ },
-/* 355 */
+/* 357 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -24354,7 +24823,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = isEventSupported;
/***/ },
-/* 356 */
+/* 358 */
/***/ function(module, exports) {
/**
@@ -24366,6 +24835,7 @@ return /******/ (function(modules) { // webpackBootstrap
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule isTextInputElement
+ *
*/
'use strict';
@@ -24394,13 +24864,22 @@ return /******/ (function(modules) { // webpackBootstrap
function isTextInputElement(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName && (nodeName === 'input' && supportedInputTypes[elem.type] || nodeName === 'textarea');
+
+ if (nodeName === 'input') {
+ return !!supportedInputTypes[elem.type];
+ }
+
+ if (nodeName === 'textarea') {
+ return true;
+ }
+
+ return false;
}
module.exports = isTextInputElement;
/***/ },
-/* 357 */
+/* 359 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -24432,7 +24911,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = DefaultEventPluginOrder;
/***/ },
-/* 358 */
+/* 360 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -24448,10 +24927,10 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var EventConstants = __webpack_require__(315);
- var EventPropagators = __webpack_require__(318);
+ var EventConstants = __webpack_require__(314);
+ var EventPropagators = __webpack_require__(317);
var ReactDOMComponentTree = __webpack_require__(337);
- var SyntheticMouseEvent = __webpack_require__(359);
+ var SyntheticMouseEvent = __webpack_require__(361);
var keyOf = __webpack_require__(335);
@@ -24542,7 +25021,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = EnterLeaveEventPlugin;
/***/ },
-/* 359 */
+/* 361 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -24558,10 +25037,10 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var SyntheticUIEvent = __webpack_require__(360);
- var ViewportMetrics = __webpack_require__(361);
+ var SyntheticUIEvent = __webpack_require__(362);
+ var ViewportMetrics = __webpack_require__(363);
- var getEventModifierState = __webpack_require__(362);
+ var getEventModifierState = __webpack_require__(364);
/**
* @interface MouseEvent
@@ -24619,7 +25098,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = SyntheticMouseEvent;
/***/ },
-/* 360 */
+/* 362 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -24637,7 +25116,7 @@ return /******/ (function(modules) { // webpackBootstrap
var SyntheticEvent = __webpack_require__(333);
- var getEventTarget = __webpack_require__(354);
+ var getEventTarget = __webpack_require__(356);
/**
* @interface UIEvent
@@ -24650,7 +25129,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
var target = getEventTarget(event);
- if (target != null && target.window === target) {
+ if (target.window === target) {
// target is a window object
return target;
}
@@ -24683,7 +25162,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = SyntheticUIEvent;
/***/ },
-/* 361 */
+/* 363 */
/***/ function(module, exports) {
/**
@@ -24715,7 +25194,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = ViewportMetrics;
/***/ },
-/* 362 */
+/* 364 */
/***/ function(module, exports) {
/**
@@ -24763,7 +25242,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = getEventModifierState;
/***/ },
-/* 363 */
+/* 365 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -24783,7 +25262,6 @@ return /******/ (function(modules) { // webpackBootstrap
var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
- var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
@@ -24886,6 +25364,7 @@ return /******/ (function(modules) { // webpackBootstrap
profile: 0,
radioGroup: 0,
readOnly: HAS_BOOLEAN_VALUE,
+ referrerPolicy: 0,
rel: 0,
required: HAS_BOOLEAN_VALUE,
reversed: HAS_BOOLEAN_VALUE,
@@ -24917,7 +25396,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Setting .type throws on non- tags
type: 0,
useMap: 0,
- value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
+ value: 0,
width: 0,
wmode: 0,
wrap: 0,
@@ -24977,7 +25456,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = HTMLDOMPropertyConfig;
/***/ },
-/* 364 */
+/* 366 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -24993,8 +25472,8 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var DOMChildrenOperations = __webpack_require__(365);
- var ReactDOMIDOperations = __webpack_require__(377);
+ var DOMChildrenOperations = __webpack_require__(367);
+ var ReactDOMIDOperations = __webpack_require__(379);
/**
* Abstracts away all functionality of the reconciler that requires knowledge of
@@ -25021,7 +25500,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = ReactComponentBrowserEnvironment;
/***/ },
-/* 365 */
+/* 367 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -25037,19 +25516,19 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var DOMLazyTree = __webpack_require__(366);
- var Danger = __webpack_require__(372);
- var ReactMultiChildUpdateTypes = __webpack_require__(376);
+ var DOMLazyTree = __webpack_require__(368);
+ var Danger = __webpack_require__(374);
+ var ReactMultiChildUpdateTypes = __webpack_require__(378);
var ReactDOMComponentTree = __webpack_require__(337);
- var ReactInstrumentation = __webpack_require__(343);
+ var ReactInstrumentation = __webpack_require__(346);
- var createMicrosoftUnsafeLocalFunction = __webpack_require__(368);
- var setInnerHTML = __webpack_require__(371);
- var setTextContent = __webpack_require__(369);
+ var createMicrosoftUnsafeLocalFunction = __webpack_require__(371);
+ var setInnerHTML = __webpack_require__(370);
+ var setTextContent = __webpack_require__(372);
function getNodeAfter(parentNode, node) {
// Special case for text components, which return [open, close] comments
- // from getNativeNode.
+ // from getHostNode.
if (Array.isArray(node)) {
node = node[1];
}
@@ -25138,7 +25617,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onNativeOperation(ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 'replace text', stringText);
+ ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 'replace text', stringText);
}
}
@@ -25147,11 +25626,11 @@ return /******/ (function(modules) { // webpackBootstrap
dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
if (prevInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onNativeOperation(prevInstance._debugID, 'replace with', markup.toString());
+ ReactInstrumentation.debugTool.onHostOperation(prevInstance._debugID, 'replace with', markup.toString());
} else {
var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
if (nextInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onNativeOperation(nextInstance._debugID, 'mount', markup.toString());
+ ReactInstrumentation.debugTool.onHostOperation(nextInstance._debugID, 'mount', markup.toString());
}
}
};
@@ -25184,31 +25663,31 @@ return /******/ (function(modules) { // webpackBootstrap
case ReactMultiChildUpdateTypes.INSERT_MARKUP:
insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'insert child', { toIndex: update.toIndex, content: update.content.toString() });
+ ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'insert child', { toIndex: update.toIndex, content: update.content.toString() });
}
break;
case ReactMultiChildUpdateTypes.MOVE_EXISTING:
moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'move child', { fromIndex: update.fromIndex, toIndex: update.toIndex });
+ ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'move child', { fromIndex: update.fromIndex, toIndex: update.toIndex });
}
break;
case ReactMultiChildUpdateTypes.SET_MARKUP:
setInnerHTML(parentNode, update.content);
if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'replace children', update.content.toString());
+ ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace children', update.content.toString());
}
break;
case ReactMultiChildUpdateTypes.TEXT_CONTENT:
setTextContent(parentNode, update.content);
if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'replace text', update.content.toString());
+ ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace text', update.content.toString());
}
break;
case ReactMultiChildUpdateTypes.REMOVE_NODE:
removeChild(parentNode, update.fromNode);
if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'remove child', { fromIndex: update.fromIndex });
+ ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'remove child', { fromIndex: update.fromIndex });
}
break;
}
@@ -25221,7 +25700,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ },
-/* 366 */
+/* 368 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -25237,10 +25716,11 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var DOMNamespaces = __webpack_require__(367);
+ var DOMNamespaces = __webpack_require__(369);
+ var setInnerHTML = __webpack_require__(370);
- var createMicrosoftUnsafeLocalFunction = __webpack_require__(368);
- var setTextContent = __webpack_require__(369);
+ var createMicrosoftUnsafeLocalFunction = __webpack_require__(371);
+ var setTextContent = __webpack_require__(372);
var ELEMENT_NODE_TYPE = 1;
var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
@@ -25269,7 +25749,7 @@ return /******/ (function(modules) { // webpackBootstrap
insertTreeBefore(node, children[i], null);
}
} else if (tree.html != null) {
- node.innerHTML = tree.html;
+ setInnerHTML(node, tree.html);
} else if (tree.text != null) {
setTextContent(node, tree.text);
}
@@ -25308,7 +25788,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (enableLazy) {
tree.html = html;
} else {
- tree.node.innerHTML = html;
+ setInnerHTML(tree.node, html);
}
}
@@ -25343,7 +25823,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = DOMLazyTree;
/***/ },
-/* 367 */
+/* 369 */
/***/ function(module, exports) {
/**
@@ -25367,133 +25847,8 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = DOMNamespaces;
-/***/ },
-/* 368 */
-/***/ function(module, exports) {
-
- /**
- * Copyright 2013-present, 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.
- *
- * @providesModule createMicrosoftUnsafeLocalFunction
- */
-
- /* globals MSApp */
-
- 'use strict';
-
- /**
- * Create a function which has 'unsafe' privileges (required by windows8 apps)
- */
-
- var createMicrosoftUnsafeLocalFunction = function (func) {
- if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
- return function (arg0, arg1, arg2, arg3) {
- MSApp.execUnsafeLocalFunction(function () {
- return func(arg0, arg1, arg2, arg3);
- });
- };
- } else {
- return func;
- }
- };
-
- module.exports = createMicrosoftUnsafeLocalFunction;
-
-/***/ },
-/* 369 */
-/***/ function(module, exports, __webpack_require__) {
-
- /**
- * Copyright 2013-present, 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.
- *
- * @providesModule setTextContent
- */
-
- 'use strict';
-
- var ExecutionEnvironment = __webpack_require__(327);
- var escapeTextContentForBrowser = __webpack_require__(370);
- var setInnerHTML = __webpack_require__(371);
-
- /**
- * Set the textContent property of a node, ensuring that whitespace is preserved
- * even in IE8. innerText is a poor substitute for textContent and, among many
- * issues, inserts instead of the literal newline chars. innerHTML behaves
- * as it should.
- *
- * @param {DOMElement} node
- * @param {string} text
- * @internal
- */
- var setTextContent = function (node, text) {
- node.textContent = text;
- };
-
- if (ExecutionEnvironment.canUseDOM) {
- if (!('textContent' in document.documentElement)) {
- setTextContent = function (node, text) {
- setInnerHTML(node, escapeTextContentForBrowser(text));
- };
- }
- }
-
- module.exports = setTextContent;
-
/***/ },
/* 370 */
-/***/ function(module, exports) {
-
- /**
- * Copyright 2013-present, 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.
- *
- * @providesModule escapeTextContentForBrowser
- */
-
- 'use strict';
-
- var ESCAPE_LOOKUP = {
- '&': '&',
- '>': '>',
- '<': '<',
- '"': '"',
- '\'': '''
- };
-
- var ESCAPE_REGEX = /[&><"']/g;
-
- function escaper(match) {
- return ESCAPE_LOOKUP[match];
- }
-
- /**
- * Escapes text to prevent scripting attacks.
- *
- * @param {*} text Text value to escape.
- * @return {string} An escaped string.
- */
- function escapeTextContentForBrowser(text) {
- return ('' + text).replace(ESCAPE_REGEX, escaper);
- }
-
- module.exports = escapeTextContentForBrowser;
-
-/***/ },
-/* 371 */
/***/ function(module, exports, __webpack_require__) {
/**
@@ -25510,11 +25865,15 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
var ExecutionEnvironment = __webpack_require__(327);
+ var DOMNamespaces = __webpack_require__(369);
var WHITESPACE_TEST = /^[ \r\n\t\f]/;
var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
- var createMicrosoftUnsafeLocalFunction = __webpack_require__(368);
+ var createMicrosoftUnsafeLocalFunction = __webpack_require__(371);
+
+ // SVG temp container for IE lacking innerHTML
+ var reusableSVGContainer;
/**
* Set the innerHTML property of a node, ensuring that whitespace is preserved
@@ -25525,7 +25884,19 @@ return /******/ (function(modules) { // webpackBootstrap
* @internal
*/
var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
- node.innerHTML = html;
+ // IE does not have innerHTML for SVG nodes, so instead we inject the
+ // new markup in a temp node and then move the child nodes across into
+ // the target node
+ if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
+ reusableSVGContainer = reusableSVGContainer || document.createElement('div');
+ reusableSVGContainer.innerHTML = '' + html + ' ';
+ var newNodes = reusableSVGContainer.firstChild.childNodes;
+ for (var i = 0; i < newNodes.length; i++) {
+ node.appendChild(newNodes[i]);
+ }
+ } else {
+ node.innerHTML = html;
+ }
});
if (ExecutionEnvironment.canUseDOM) {
@@ -25579,11 +25950,48 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = setInnerHTML;
+/***/ },
+/* 371 */
+/***/ function(module, exports) {
+
+ /**
+ * Copyright 2013-present, 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.
+ *
+ * @providesModule createMicrosoftUnsafeLocalFunction
+ */
+
+ /* globals MSApp */
+
+ 'use strict';
+
+ /**
+ * Create a function which has 'unsafe' privileges (required by windows8 apps)
+ */
+
+ var createMicrosoftUnsafeLocalFunction = function (func) {
+ if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
+ return function (arg0, arg1, arg2, arg3) {
+ MSApp.execUnsafeLocalFunction(function () {
+ return func(arg0, arg1, arg2, arg3);
+ });
+ };
+ } else {
+ return func;
+ }
+ };
+
+ module.exports = createMicrosoftUnsafeLocalFunction;
+
/***/ },
/* 372 */
/***/ function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(process) {/**
+ /**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
@@ -25591,117 +25999,201 @@ return /******/ (function(modules) { // webpackBootstrap
* 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.
*
- * @providesModule Danger
+ * @providesModule setTextContent
*/
'use strict';
- var DOMLazyTree = __webpack_require__(366);
var ExecutionEnvironment = __webpack_require__(327);
+ var escapeTextContentForBrowser = __webpack_require__(373);
+ var setInnerHTML = __webpack_require__(370);
- var createNodesFromMarkup = __webpack_require__(373);
- var emptyFunction = __webpack_require__(324);
- var getMarkupWrap = __webpack_require__(375);
- var invariant = __webpack_require__(317);
+ /**
+ * Set the textContent property of a node, ensuring that whitespace is preserved
+ * even in IE8. innerText is a poor substitute for textContent and, among many
+ * issues, inserts instead of the literal newline chars. innerHTML behaves
+ * as it should.
+ *
+ * @param {DOMElement} node
+ * @param {string} text
+ * @internal
+ */
+ var setTextContent = function (node, text) {
+ if (text) {
+ var firstChild = node.firstChild;
- var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/;
- var RESULT_INDEX_ATTR = 'data-danger-index';
+ if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
+ firstChild.nodeValue = text;
+ return;
+ }
+ }
+ node.textContent = text;
+ };
+ if (ExecutionEnvironment.canUseDOM) {
+ if (!('textContent' in document.documentElement)) {
+ setTextContent = function (node, text) {
+ setInnerHTML(node, escapeTextContentForBrowser(text));
+ };
+ }
+ }
+
+ module.exports = setTextContent;
+
+/***/ },
+/* 373 */
+/***/ function(module, exports) {
+
/**
- * Extracts the `nodeName` from a string of markup.
+ * Copyright 2016-present, 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.
*
- * NOTE: Extracting the `nodeName` does not require a regular expression match
- * because we make assumptions about React-generated markup (i.e. there are no
- * spaces surrounding the opening tag and there is at least one attribute).
+ * Based on the escape-html library, which is used under the MIT License below:
*
- * @param {string} markup String of markup.
- * @return {string} Node name of the supplied markup.
- * @see http://jsperf.com/extract-nodename
+ * Copyright (c) 2012-2013 TJ Holowaychuk
+ * Copyright (c) 2015 Andreas Lubbe
+ * Copyright (c) 2015 Tiancheng "Timothy" Gu
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * 'Software'), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * @providesModule escapeTextContentForBrowser
*/
- function getNodeName(markup) {
- return markup.substring(1, markup.indexOf(' '));
- }
- var Danger = {
+ 'use strict';
- /**
- * Renders markup into an array of nodes. The markup is expected to render
- * into a list of root nodes. Also, the length of `resultList` and
- * `markupList` should be the same.
- *
- * @param {array} markupList List of markup strings to render.
- * @return {array} List of rendered nodes.
- * @internal
- */
- dangerouslyRenderMarkup: function (markupList) {
- !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString for server rendering.') : invariant(false) : void 0;
- var nodeName;
- var markupByNodeName = {};
- // Group markup by `nodeName` if a wrap is necessary, else by '*'.
- for (var i = 0; i < markupList.length; i++) {
- !markupList[i] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : void 0;
- nodeName = getNodeName(markupList[i]);
- nodeName = getMarkupWrap(nodeName) ? nodeName : '*';
- markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];
- markupByNodeName[nodeName][i] = markupList[i];
- }
- var resultList = [];
- var resultListAssignmentCount = 0;
- for (nodeName in markupByNodeName) {
- if (!markupByNodeName.hasOwnProperty(nodeName)) {
- continue;
- }
- var markupListByNodeName = markupByNodeName[nodeName];
-
- // This for-in loop skips the holes of the sparse array. The order of
- // iteration should follow the order of assignment, which happens to match
- // numerical index order, but we don't rely on that.
- var resultIndex;
- for (resultIndex in markupListByNodeName) {
- if (markupListByNodeName.hasOwnProperty(resultIndex)) {
- var markup = markupListByNodeName[resultIndex];
-
- // Push the requested markup with an additional RESULT_INDEX_ATTR
- // attribute. If the markup does not start with a < character, it
- // will be discarded below (with an appropriate console.error).
- markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP,
- // This index will be parsed back out below.
- '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ');
- }
- }
+ // code copied and modified from escape-html
+ /**
+ * Module variables.
+ * @private
+ */
- // Render each group of markup with similar wrapping `nodeName`.
- var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with i)dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+
+ /***/ },
+ /* 8089 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ var has = __webpack_require__(__webpack_module_template_argument_0__)
+ , toObject = __webpack_require__(__webpack_module_template_argument_1__)
+ , IE_PROTO = __webpack_require__(__webpack_module_template_argument_2__)('IE_PROTO')
+ , ObjectProto = Object.prototype;
+
+ module.exports = Object.getPrototypeOf || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ };
+
+ /***/ },
+ /* 8090 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
+
+ var has = __webpack_require__(__webpack_module_template_argument_0__)
+ , toIObject = __webpack_require__(__webpack_module_template_argument_1__)
+ , arrayIndexOf = __webpack_require__(__webpack_module_template_argument_2__)(false)
+ , IE_PROTO = __webpack_require__(__webpack_module_template_argument_3__)('IE_PROTO');
+
+ module.exports = function(object, names){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(names.length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
+
+ /***/ },
+ /* 8091 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ var $keys = __webpack_require__(__webpack_module_template_argument_0__)
+ , enumBugKeys = __webpack_require__(__webpack_module_template_argument_1__);
+
+ module.exports = Object.keys || function keys(O){
+ return $keys(O, enumBugKeys);
+ };
+
+ /***/ },
+ /* 8092 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ module.exports = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /***/ },
+ /* 8093 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ var def = __webpack_require__(__webpack_module_template_argument_0__).f
+ , has = __webpack_require__(__webpack_module_template_argument_1__)
+ , TAG = __webpack_require__(__webpack_module_template_argument_2__)('toStringTag');
+
+ module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+ };
+
+ /***/ },
+ /* 8094 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ var shared = __webpack_require__(__webpack_module_template_argument_0__)('keys')
+ , uid = __webpack_require__(__webpack_module_template_argument_1__);
+ module.exports = function(key){
+ return shared[key] || (shared[key] = uid(key));
+ };
+
+ /***/ },
+ /* 8095 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var global = __webpack_require__(__webpack_module_template_argument_0__)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+ module.exports = function(key){
+ return store[key] || (store[key] = {});
+ };
+
+ /***/ },
+ /* 8096 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ var toInteger = __webpack_require__(__webpack_module_template_argument_0__)
+ , defined = __webpack_require__(__webpack_module_template_argument_1__);
+ // true -> String#at
+ // false -> String#codePointAt
+ module.exports = function(TO_STRING){
+ return function(that, pos){
+ var s = String(defined(that))
+ , i = toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+ };
+
+ /***/ },
+ /* 8097 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var toInteger = __webpack_require__(__webpack_module_template_argument_0__)
+ , max = Math.max
+ , min = Math.min;
+ module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+ };
+
+ /***/ },
+ /* 8098 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(__webpack_module_template_argument_0__)
+ , defined = __webpack_require__(__webpack_module_template_argument_1__);
+ module.exports = function(it){
+ return IObject(defined(it));
+ };
+
+ /***/ },
+ /* 8099 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(__webpack_module_template_argument_0__)
+ , min = Math.min;
+ module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ };
+
+ /***/ },
+ /* 8100 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(__webpack_module_template_argument_0__);
+ module.exports = function(it){
+ return Object(defined(it));
+ };
+
+ /***/ },
+ /* 8101 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+ var isObject = __webpack_require__(__webpack_module_template_argument_0__);
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
+ };
+
+ /***/ },
+ /* 8102 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ var store = __webpack_require__(__webpack_module_template_argument_0__)('wks')
+ , uid = __webpack_require__(__webpack_module_template_argument_1__)
+ , Symbol = __webpack_require__(__webpack_module_template_argument_2__).Symbol
+ , USE_SYMBOL = typeof Symbol == 'function';
+
+ var $exports = module.exports = function(name){
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+ };
+
+ $exports.store = store;
+
+ /***/ },
+ /* 8103 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
+
+ var classof = __webpack_require__(__webpack_module_template_argument_0__)
+ , ITERATOR = __webpack_require__(__webpack_module_template_argument_1__)('iterator')
+ , Iterators = __webpack_require__(__webpack_module_template_argument_2__);
+ module.exports = __webpack_require__(__webpack_module_template_argument_3__).getIteratorMethod = function(it){
+ if(it != undefined)return it[ITERATOR]
+ || it['@@iterator']
+ || Iterators[classof(it)];
+ };
+
+ /***/ },
+ /* 8104 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ var anObject = __webpack_require__(__webpack_module_template_argument_0__)
+ , get = __webpack_require__(__webpack_module_template_argument_1__);
+ module.exports = __webpack_require__(__webpack_module_template_argument_2__).getIterator = function(it){
+ var iterFn = get(it);
+ if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
+ return anObject(iterFn.call(it));
+ };
+
+ /***/ },
+ /* 8105 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
+
+ 'use strict';
+ var addToUnscopables = __webpack_require__(__webpack_module_template_argument_0__)
+ , step = __webpack_require__(__webpack_module_template_argument_1__)
+ , Iterators = __webpack_require__(__webpack_module_template_argument_2__)
+ , toIObject = __webpack_require__(__webpack_module_template_argument_3__);
+
+ // 22.1.3.4 Array.prototype.entries()
+ // 22.1.3.13 Array.prototype.keys()
+ // 22.1.3.29 Array.prototype.values()
+ // 22.1.3.30 Array.prototype[@@iterator]()
+ module.exports = __webpack_require__(__webpack_module_template_argument_4__)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+ // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
+ }
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+ }, 'values');
+
+ // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+ Iterators.Arguments = Iterators.Array;
+
+ addToUnscopables('keys');
+ addToUnscopables('values');
+ addToUnscopables('entries');
+
+ /***/ },
+ /* 8106 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ 'use strict';
+ var $at = __webpack_require__(__webpack_module_template_argument_0__)(true);
+
+ // 21.1.3.27 String.prototype[@@iterator]()
+ __webpack_require__(__webpack_module_template_argument_1__)(String, 'String', function(iterated){
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+ // 21.1.5.2.1 %StringIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , index = this._i
+ , point;
+ if(index >= O.length)return {value: undefined, done: true};
+ point = $at(O, index);
+ this._i += point.length;
+ return {value: point, done: false};
+ });
+
+ /***/ },
+ /* 8107 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
+
+ __webpack_require__(__webpack_module_template_argument_0__);
+ var global = __webpack_require__(__webpack_module_template_argument_1__)
+ , hide = __webpack_require__(__webpack_module_template_argument_2__)
+ , Iterators = __webpack_require__(__webpack_module_template_argument_3__)
+ , TO_STRING_TAG = __webpack_require__(__webpack_module_template_argument_4__)('toStringTag');
+
+ for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
+ var NAME = collections[i]
+ , Collection = global[NAME]
+ , proto = Collection && Collection.prototype;
+ if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
+ Iterators[NAME] = Iterators.Array;
+ }
+
+ /***/ },
+ /* 8108 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ /*istanbul ignore next*/"use strict";
+
+ exports.__esModule = true;
+
+ exports.default = function (path, callId) {
+ var node = path.node;
+ if (node.generator) return;
+
+ path.traverse(awaitVisitor);
+
+ if (path.isClassMethod() || path.isObjectMethod()) {
+ return classOrObjectMethod(path, callId);
+ } else {
+ return plainFunction(path, callId);
+ }
+ };
+
+ var /*istanbul ignore next*/_babelHelperFunctionName = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /*istanbul ignore next*/
+ var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
+
+ var /*istanbul ignore next*/_babelTemplate = __webpack_require__(__webpack_module_template_argument_1__);
+
+ /*istanbul ignore next*/
+ var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
+
+ var /*istanbul ignore next*/_babelTypes = __webpack_require__(__webpack_module_template_argument_2__);
+
+ /*istanbul ignore next*/
+ var t = _interopRequireWildcard(_babelTypes);
+
+ /*istanbul ignore next*/
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* @noflow */
+
+ var buildWrapper = /*istanbul ignore next*/(0, _babelTemplate2.default)( /*istanbul ignore next*/"\n (() => {\n var ref = FUNCTION;\n return function NAME(PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n");
+
+ var namedBuildWrapper = /*istanbul ignore next*/(0, _babelTemplate2.default)( /*istanbul ignore next*/"\n (() => {\n var ref = FUNCTION;\n function NAME(PARAMS) {\n return ref.apply(this, arguments);\n }\n return NAME;\n })\n");
+
+ var awaitVisitor = { /*istanbul ignore next*/
+ ArrowFunctionExpression: function ArrowFunctionExpression(path) {
+ if (!path.node.async) {
+ path.arrowFunctionToShadowed();
+ }
+ },
+ /*istanbul ignore next*/AwaitExpression: function AwaitExpression(_ref) {
+ /*istanbul ignore next*/var node = _ref.node;
+
+ node.type = "YieldExpression";
+ }
+ };
+
+ 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]), []))];
+ }
+
+ 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,
+ FUNCTION: built,
+ PARAMS: node.params.map(function () /*istanbul ignore next*/{
+ return path.scope.generateUidIdentifier("x");
+ })
+ }).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) {
+ /*istanbul ignore next*/(0, _babelHelperFunctionName2.default)({
+ node: retFunction,
+ parent: path.parent,
+ scope: path.scope
+ });
+ }
+
+ if (!retFunction || retFunction.id || node.params.length) {
+ // we have an inferred function id or params so we need this wrapper
+ path.replaceWith(t.callExpression(container, []));
+ } else {
+ // we can omit this wrapper as the conditions it protects for do not apply
+ path.replaceWith(built);
+ }
+ }
+ }
+
+ /*istanbul ignore next*/module.exports = exports["default"];
+
+ /***/ },
+ /* 8109 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__) {
+
+ /*istanbul ignore next*/"use strict";
+
+ exports.__esModule = true;
+
+ var _symbol = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _symbol2 = _interopRequireDefault(_symbol);
+
+ exports.default = function (code, opts) {
+ // since we lazy parse the template, we get the current stack so we have the
+ // original stack to append if it errors when parsing
+ var stack = /*istanbul ignore next*/void 0;
+ try {
+ // error stack gets populated in IE only on throw (https://msdn.microsoft.com/en-us/library/hh699850(v=vs.94).aspx)
+ throw new Error();
+ } catch (error) {
+ if (error.stack) {
+ // error.stack does not exists in IE <= 9
+ stack = error.stack.split("\n").slice(1).join("\n");
+ }
+ }
+
+ var _getAst = function /*istanbul ignore next*/getAst() {
+ var ast = /*istanbul ignore next*/void 0;
+
+ try {
+ ast = babylon.parse(code, /*istanbul ignore next*/(0, _assign2.default)({
+ allowReturnOutsideFunction: true,
+ allowSuperOutsideMethod: true
+ }, opts));
+
+ ast = /*istanbul ignore next*/_babelTraverse2.default.removeProperties(ast);
+
+ /*istanbul ignore next*/_babelTraverse2.default.cheap(ast, function (node) {
+ node[FROM_TEMPLATE] = true;
+ });
+ } catch (err) {
+ err.stack = /*istanbul ignore next*/err.stack + "from\n" + stack;
+ throw err;
+ }
+
+ _getAst = function /*istanbul ignore next*/getAst() {
+ return ast;
+ };
+
+ return ast;
+ };
+
+ return function () {
+ /*istanbul ignore next*/
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return useTemplate(_getAst(), args);
+ };
+ };
+
+ var /*istanbul ignore next*/_cloneDeep = __webpack_require__(__webpack_module_template_argument_1__);
+
+ /*istanbul ignore next*/
+ var _cloneDeep2 = _interopRequireDefault(_cloneDeep);
+
+ var /*istanbul ignore next*/_assign = __webpack_require__(__webpack_module_template_argument_2__);
+
+ /*istanbul ignore next*/
+ var _assign2 = _interopRequireDefault(_assign);
+
+ var /*istanbul ignore next*/_has = __webpack_require__(__webpack_module_template_argument_3__);
+
+ /*istanbul ignore next*/
+ var _has2 = _interopRequireDefault(_has);
+
+ var /*istanbul ignore next*/_babelTraverse = __webpack_require__(__webpack_module_template_argument_4__);
+
+ /*istanbul ignore next*/
+ var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
+
+ var /*istanbul ignore next*/_babylon = __webpack_require__(__webpack_module_template_argument_5__);
+
+ /*istanbul ignore next*/
+ var babylon = _interopRequireWildcard(_babylon);
+
+ var /*istanbul ignore next*/_babelTypes = __webpack_require__(__webpack_module_template_argument_6__);
+
+ /*istanbul ignore next*/
+ var t = _interopRequireWildcard(_babelTypes);
+
+ /*istanbul ignore next*/
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* eslint max-len: 0 */
+
+ var FROM_TEMPLATE = "_fromTemplate"; //Symbol(); // todo: probably wont get copied over
+ var TEMPLATE_SKIP = /*istanbul ignore next*/(0, _symbol2.default)();
+
+ function useTemplate(ast, nodes) {
+ ast = /*istanbul ignore next*/(0, _cloneDeep2.default)(ast);
+ /*istanbul ignore next*/var _ast = ast;
+ /*istanbul ignore next*/var program = _ast.program;
+
+
+ if (nodes.length) {
+ /*istanbul ignore next*/(0, _babelTraverse2.default)(ast, templateVisitor, null, nodes);
+ }
+
+ if (program.body.length > 1) {
+ return program.body;
+ } else {
+ return program.body[0];
+ }
+ }
+
+ var templateVisitor = {
+ // 360
+ noScope: true,
+
+ /*istanbul ignore next*/enter: function enter(path, args) {
+ /*istanbul ignore next*/var node = path.node;
+
+ if (node[TEMPLATE_SKIP]) return path.skip();
+
+ if (t.isExpressionStatement(node)) {
+ node = node.expression;
+ }
+
+ var replacement = /*istanbul ignore next*/void 0;
+
+ if (t.isIdentifier(node) && node[FROM_TEMPLATE]) {
+ if ( /*istanbul ignore next*/(0, _has2.default)(args[0], node.name)) {
+ replacement = args[0][node.name];
+ } else if (node.name[0] === "$") {
+ var i = +node.name.slice(1);
+ if (args[i]) replacement = args[i];
+ }
+ }
+
+ if (replacement === null) {
+ path.remove();
+ }
+
+ if (replacement) {
+ replacement[TEMPLATE_SKIP] = true;
+ path.replaceInline(replacement);
+ }
+ },
+ /*istanbul ignore next*/exit: function exit(_ref) {
+ /*istanbul ignore next*/var node = _ref.node;
+
+ if (!node.loc) /*istanbul ignore next*/_babelTraverse2.default.clearNode(node);
+ }
+ };
+ /*istanbul ignore next*/module.exports = exports["default"];
+
+ /***/ },
+ /* 8110 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__, __webpack_module_template_argument_8__, __webpack_module_template_argument_9__, __webpack_module_template_argument_10__, __webpack_module_template_argument_11__, __webpack_module_template_argument_12__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.tokTypes = undefined;
+ exports.parse = parse;
+
+ var _parser = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _parser2 = _interopRequireDefault(_parser);
+
+ __webpack_require__(__webpack_module_template_argument_1__);
+
+ __webpack_require__(__webpack_module_template_argument_2__);
+
+ __webpack_require__(__webpack_module_template_argument_3__);
+
+ __webpack_require__(__webpack_module_template_argument_4__);
+
+ __webpack_require__(__webpack_module_template_argument_5__);
+
+ __webpack_require__(__webpack_module_template_argument_6__);
+
+ __webpack_require__(__webpack_module_template_argument_7__);
+
+ var _types = __webpack_require__(__webpack_module_template_argument_8__);
+
+ __webpack_require__(__webpack_module_template_argument_9__);
+
+ __webpack_require__(__webpack_module_template_argument_10__);
+
+ var _flow = __webpack_require__(__webpack_module_template_argument_11__);
+
+ var _flow2 = _interopRequireDefault(_flow);
+
+ var _jsx = __webpack_require__(__webpack_module_template_argument_12__);
+
+ var _jsx2 = _interopRequireDefault(_jsx);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ _parser.plugins.flow = _flow2.default;
+ _parser.plugins.jsx = _jsx2.default;
+
+ function parse(input, options) {
+ return new _parser2.default(options, input).parse();
+ }
+
+ exports.tokTypes = _types.types;
+
+ /***/ },
+ /* 8111 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ "use strict";
+
+ var _index = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function last(stack) {
+ return stack[stack.length - 1];
+ } /* eslint max-len: 0 */
+
+ /**
+ * Based on the comment attachment algorithm used in espree and estraverse.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ var pp = _index2.default.prototype;
+
+ pp.addComment = function (comment) {
+ this.state.trailingComments.push(comment);
+ this.state.leadingComments.push(comment);
+ };
+
+ pp.processComment = function (node) {
+ if (node.type === "Program" && node.body.length > 0) return;
+
+ var stack = this.state.commentStack;
+
+ var lastChild = void 0,
+ trailingComments = void 0,
+ i = void 0;
+
+ if (this.state.trailingComments.length > 0) {
+ // If the first comment in trailingComments comes after the
+ // current node, then we're good - all comments in the array will
+ // come after the node and so it's safe to add them as official
+ // trailingComments.
+ if (this.state.trailingComments[0].start >= node.end) {
+ trailingComments = this.state.trailingComments;
+ this.state.trailingComments = [];
+ } else {
+ // Otherwise, if the first comment doesn't come after the
+ // current node, that means we have a mix of leading and trailing
+ // comments in the array and that leadingComments contains the
+ // same items as trailingComments. Reset trailingComments to
+ // zero items and we'll handle this by evaluating leadingComments
+ // later.
+ this.state.trailingComments.length = 0;
+ }
+ } else {
+ var lastInStack = last(stack);
+ if (stack.length > 0 && lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
+ trailingComments = lastInStack.trailingComments;
+ lastInStack.trailingComments = null;
+ }
+ }
+
+ // Eating the stack.
+ while (stack.length > 0 && last(stack).start >= node.start) {
+ lastChild = stack.pop();
+ }
+
+ if (lastChild) {
+ if (lastChild.leadingComments) {
+ if (lastChild !== node && last(lastChild.leadingComments).end <= node.start) {
+ node.leadingComments = lastChild.leadingComments;
+ lastChild.leadingComments = null;
+ } else {
+ // A leading comment for an anonymous class had been stolen by its first ClassMethod,
+ // so this takes back the leading comment.
+ // See also: https://github.com/eslint/espree/issues/158
+ for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
+ if (lastChild.leadingComments[i].end <= node.start) {
+ node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
+ break;
+ }
+ }
+ }
+ }
+ } else if (this.state.leadingComments.length > 0) {
+ if (last(this.state.leadingComments).end <= node.start) {
+ node.leadingComments = this.state.leadingComments;
+ this.state.leadingComments = [];
+ } else {
+ // https://github.com/eslint/espree/issues/2
+ //
+ // In special cases, such as return (without a value) and
+ // debugger, all comments will end up as leadingComments and
+ // will otherwise be eliminated. This step runs when the
+ // commentStack is empty and there are comments left
+ // in leadingComments.
+ //
+ // This loop figures out the stopping point between the actual
+ // leading and trailing comments by finding the location of the
+ // first comment that comes after the given node.
+ for (i = 0; i < this.state.leadingComments.length; i++) {
+ if (this.state.leadingComments[i].end > node.start) {
+ break;
+ }
+ }
+
+ // Split the array based on the location of the first comment
+ // that comes after the node. Keep in mind that this could
+ // result in an empty array, and if so, the array must be
+ // deleted.
+ node.leadingComments = this.state.leadingComments.slice(0, i);
+ if (node.leadingComments.length === 0) {
+ node.leadingComments = null;
+ }
+
+ // Similarly, trailing comments are attached later. The variable
+ // must be reset to null if there are no trailing comments.
+ trailingComments = this.state.leadingComments.slice(i);
+ if (trailingComments.length === 0) {
+ trailingComments = null;
+ }
+ }
+ }
+
+ if (trailingComments) {
+ if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
+ node.innerComments = trailingComments;
+ } else {
+ node.trailingComments = trailingComments;
+ }
+ }
+
+ stack.push(node);
+ };
+
+ /***/ },
+ /* 8112 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
+
+ "use strict";
+
+ var _create = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _create2 = _interopRequireDefault(_create);
+
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
+
+ var _types = __webpack_require__(__webpack_module_template_argument_2__);
+
+ var _index = __webpack_require__(__webpack_module_template_argument_3__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ var _identifier = __webpack_require__(__webpack_module_template_argument_4__);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var pp = _index2.default.prototype;
+
+ // Check if property name clashes with already added.
+ // Object/class getters and setters are not allowed to clash —
+ // either with each other or with an init property — and in
+ // strict mode, init properties are also not allowed to be repeated.
+
+ /* eslint indent: 0 */
+ /* eslint max-len: 0 */
+
+ // A recursive descent parser operates by defining functions for all
+ // syntactic elements, and recursively calling those, each function
+ // advancing the input stream and returning an AST node. Precedence
+ // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
+ // instead of `(!x)[1]` is handled by the fact that the parser
+ // function that parses unary prefix operators is called first, and
+ // in turn calls the function that parses `[]` subscripts — that
+ // way, it'll receive the node for `x[1]` already parsed, and wraps
+ // *that* in the unary operator node.
+ //
+ // Acorn uses an [operator precedence parser][opp] to handle binary
+ // operator precedence, because it is much more compact than using
+ // the technique outlined above, which uses different, nesting
+ // functions to specify precedence, for all of the ten binary
+ // precedence levels that JavaScript defines.
+ //
+ // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
+
+ pp.checkPropClash = function (prop, propHash) {
+ if (prop.computed) return;
+
+ var key = prop.key;
+ var name = void 0;
+ switch (key.type) {
+ case "Identifier":
+ name = key.name;
+ break;
+
+ case "StringLiteral":
+ case "NumericLiteral":
+ name = String(key.value);
+ break;
+
+ default:
+ return;
+ }
+
+ if (name === "__proto__" && prop.kind === "init") {
+ if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
+ propHash.proto = true;
+ }
+ };
+
+ // ### Expression parsing
+
+ // These nest, from the most general expression type at the top to
+ // 'atomic', nondivisible expression types at the bottom. Most of
+ // the functions will simply let the function (s) below them parse,
+ // and, *if* the syntactic construct they handle is present, wrap
+ // the AST node that the inner parser gave them in another node.
+
+ // Parse a full expression. The optional arguments are used to
+ // forbid the `in` operator (in for loops initalization expressions)
+ // and provide reference for storing '=' operator inside shorthand
+ // property assignment in contexts where both object expression
+ // and object pattern might appear (so it's possible to raise
+ // delayed syntax error at correct position).
+
+ pp.parseExpression = function (noIn, refShorthandDefaultPos) {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
+ if (this.match(_types.types.comma)) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.expressions = [expr];
+ while (this.eat(_types.types.comma)) {
+ node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
+ }
+ this.toReferencedList(node.expressions);
+ return this.finishNode(node, "SequenceExpression");
+ }
+ return expr;
+ };
+
+ // Parse an assignment expression. This includes applications of
+ // operators like `+=`.
+
+ pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) {
+ if (this.match(_types.types._yield) && this.state.inGenerator) {
+ return this.parseYield();
+ }
+
+ var failOnShorthandAssign = void 0;
+ if (refShorthandDefaultPos) {
+ failOnShorthandAssign = false;
+ } else {
+ refShorthandDefaultPos = { start: 0 };
+ failOnShorthandAssign = true;
+ }
+
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
+
+ if (this.match(_types.types.parenL) || this.match(_types.types.name)) {
+ this.state.potentialArrowAt = this.state.start;
+ }
+
+ var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos);
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
+ if (this.state.type.isAssign) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.operator = this.state.value;
+ node.left = this.match(_types.types.eq) ? this.toAssignable(left) : left;
+ refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
+
+ this.checkLVal(left);
+
+ if (left.extra && left.extra.parenthesized) {
+ var errorMsg = void 0;
+ if (left.type === "ObjectPattern") {
+ errorMsg = "`({a}) = 0` use `({a} = 0)`";
+ } else if (left.type === "ArrayPattern") {
+ errorMsg = "`([a]) = 0` use `([a] = 0)`";
+ }
+ if (errorMsg) {
+ this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg);
+ }
+ }
+
+ this.next();
+ node.right = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "AssignmentExpression");
+ } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
+ this.unexpected(refShorthandDefaultPos.start);
+ }
+
+ return left;
+ };
+
+ // Parse a ternary conditional (`?:`) operator.
+
+ pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
+ if (this.eat(_types.types.question)) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssign();
+ this.expect(_types.types.colon);
+ node.alternate = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "ConditionalExpression");
+ }
+ return expr;
+ };
+
+ // Start the precedence parser.
+
+ pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var expr = this.parseMaybeUnary(refShorthandDefaultPos);
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
+ return expr;
+ } else {
+ return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
+ }
+ };
+
+ // Parse binary operators with the operator precedence parsing
+ // algorithm. `left` is the left-hand side of the operator.
+ // `minPrec` provides context that allows the function to stop and
+ // defer further parser to one of its callers when it encounters an
+ // operator that has a lower precedence than the set it is parsing.
+
+ pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ var prec = this.state.type.binop;
+ if (prec != null && (!noIn || !this.match(_types.types._in))) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(leftStartPos, leftStartLoc);
+ node.left = left;
+ node.operator = this.state.value;
+
+ if (node.operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument) {
+ this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
+ }
+
+ var op = this.state.type;
+ this.next();
+
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
+ node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
+
+ this.finishNode(node, op === _types.types.logicalOR || op === _types.types.logicalAND ? "LogicalExpression" : "BinaryExpression");
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
+ }
+ }
+ return left;
+ };
+
+ // Parse unary operators, both prefix and postfix.
+
+ pp.parseMaybeUnary = function (refShorthandDefaultPos) {
+ if (this.state.type.prefix) {
+ var node = this.startNode();
+ var update = this.match(_types.types.incDec);
+ node.operator = this.state.value;
+ node.prefix = true;
+ this.next();
+
+ var argType = this.state.type;
+ this.addExtra(node, "parenthesizedArgument", argType === _types.types.parenL);
+ node.argument = this.parseMaybeUnary();
+
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
+ this.unexpected(refShorthandDefaultPos.start);
+ }
+
+ if (update) {
+ this.checkLVal(node.argument);
+ } else if (this.state.strict && node.operator === "delete" && node.argument.type === "Identifier") {
+ this.raise(node.start, "Deleting local variable in strict mode");
+ }
+
+ return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
+ }
+
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var expr = this.parseExprSubscripts(refShorthandDefaultPos);
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
+ while (this.state.type.postfix && !this.canInsertSemicolon()) {
+ var _node = this.startNodeAt(startPos, startLoc);
+ _node.operator = this.state.value;
+ _node.prefix = false;
+ _node.argument = expr;
+ this.checkLVal(expr);
+ this.next();
+ expr = this.finishNode(_node, "UpdateExpression");
+ }
+ return expr;
+ };
+
+ // Parse call, dot, and `[]`-subscript expressions.
+
+ pp.parseExprSubscripts = function (refShorthandDefaultPos) {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var potentialArrowAt = this.state.potentialArrowAt;
+ var expr = this.parseExprAtom(refShorthandDefaultPos);
+
+ if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
+ return expr;
+ }
+
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
+ return expr;
+ }
+
+ return this.parseSubscripts(expr, startPos, startLoc);
+ };
+
+ pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
+ for (;;) {
+ if (!noCalls && this.eat(_types.types.doubleColon)) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.object = base;
+ node.callee = this.parseNoCallExpr();
+ return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
+ } else if (this.eat(_types.types.dot)) {
+ var _node2 = this.startNodeAt(startPos, startLoc);
+ _node2.object = base;
+ _node2.property = this.parseIdentifier(true);
+ _node2.computed = false;
+ base = this.finishNode(_node2, "MemberExpression");
+ } else if (this.eat(_types.types.bracketL)) {
+ var _node3 = this.startNodeAt(startPos, startLoc);
+ _node3.object = base;
+ _node3.property = this.parseExpression();
+ _node3.computed = true;
+ this.expect(_types.types.bracketR);
+ base = this.finishNode(_node3, "MemberExpression");
+ } else if (!noCalls && this.match(_types.types.parenL)) {
+ var possibleAsync = this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
+ this.next();
+
+ var _node4 = this.startNodeAt(startPos, startLoc);
+ _node4.callee = base;
+ _node4.arguments = this.parseCallExpressionArguments(_types.types.parenR, this.hasPlugin("trailingFunctionCommas"), possibleAsync);
+ base = this.finishNode(_node4, "CallExpression");
+
+ if (possibleAsync && this.shouldParseAsyncArrow()) {
+ return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node4);
+ } else {
+ this.toReferencedList(_node4.arguments);
+ }
+ } else if (this.match(_types.types.backQuote)) {
+ var _node5 = this.startNodeAt(startPos, startLoc);
+ _node5.tag = base;
+ _node5.quasi = this.parseTemplate();
+ base = this.finishNode(_node5, "TaggedTemplateExpression");
+ } else {
+ return base;
+ }
+ }
+ };
+
+ pp.parseCallExpressionArguments = function (close, allowTrailingComma, possibleAsyncArrow) {
+ var innerParenStart = void 0;
+
+ var elts = [],
+ first = true;
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_types.types.comma);
+ if (allowTrailingComma && this.eat(close)) break;
+ }
+
+ // we need to make sure that if this is an async arrow functions, that we don't allow inner parens inside the params
+ if (this.match(_types.types.parenL) && !innerParenStart) {
+ innerParenStart = this.state.start;
+ }
+
+ elts.push(this.parseExprListItem());
+ }
+
+ // we found an async arrow function so let's not allow any inner parens
+ if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
+ this.unexpected();
+ }
+
+ return elts;
+ };
+
+ pp.shouldParseAsyncArrow = function () {
+ return this.match(_types.types.arrow);
+ };
+
+ pp.parseAsyncArrowFromCallExpression = function (node, call) {
+ if (!this.hasPlugin("asyncFunctions")) this.unexpected();
+ this.expect(_types.types.arrow);
+ return this.parseArrowExpression(node, call.arguments, true);
+ };
+
+ // Parse a no-call expression (like argument of `new` or `::` operators).
+
+ pp.parseNoCallExpr = function () {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
+ };
+
+ // Parse an atomic expression — either a single token that is an
+ // expression, an expression started by a keyword like `function` or
+ // `new`, or an expression wrapped in punctuation like `()`, `[]`,
+ // or `{}`.
+
+ pp.parseExprAtom = function (refShorthandDefaultPos) {
+ var node = void 0,
+ canBeArrow = this.state.potentialArrowAt === this.state.start;
+ switch (this.state.type) {
+ case _types.types._super:
+ if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) {
+ this.raise(this.state.start, "'super' outside of function or class");
+ }
+
+ node = this.startNode();
+ this.next();
+ if (!this.match(_types.types.parenL) && !this.match(_types.types.bracketL) && !this.match(_types.types.dot)) {
+ this.unexpected();
+ }
+ if (this.match(_types.types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) {
+ this.raise(node.start, "super() outside of class constructor");
+ }
+ return this.finishNode(node, "Super");
+
+ case _types.types._this:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "ThisExpression");
+
+ case _types.types._yield:
+ if (this.state.inGenerator) this.unexpected();
+
+ case _types.types.name:
+ node = this.startNode();
+ var allowAwait = this.hasPlugin("asyncFunctions") && this.state.value === "await" && this.state.inAsync;
+ var allowYield = this.shouldAllowYieldIdentifier();
+ var id = this.parseIdentifier(allowAwait || allowYield);
+
+ if (this.hasPlugin("asyncFunctions")) {
+ if (id.name === "await") {
+ if (this.state.inAsync || this.inModule) {
+ return this.parseAwait(node);
+ }
+ } else if (id.name === "async" && this.match(_types.types._function) && !this.canInsertSemicolon()) {
+ this.next();
+ return this.parseFunction(node, false, false, true);
+ } else if (canBeArrow && id.name === "async" && this.match(_types.types.name)) {
+ var params = [this.parseIdentifier()];
+ this.expect(_types.types.arrow);
+ // let foo = bar => {};
+ return this.parseArrowExpression(node, params, true);
+ }
+ }
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(_types.types.arrow)) {
+ return this.parseArrowExpression(node, [id]);
+ }
+
+ return id;
+
+ case _types.types._do:
+ if (this.hasPlugin("doExpressions")) {
+ var _node6 = this.startNode();
+ this.next();
+ var oldInFunction = this.state.inFunction;
+ var oldLabels = this.state.labels;
+ this.state.labels = [];
+ this.state.inFunction = false;
+ _node6.body = this.parseBlock(false, true);
+ this.state.inFunction = oldInFunction;
+ this.state.labels = oldLabels;
+ return this.finishNode(_node6, "DoExpression");
+ }
+
+ case _types.types.regexp:
+ var value = this.state.value;
+ node = this.parseLiteral(value.value, "RegExpLiteral");
+ node.pattern = value.pattern;
+ node.flags = value.flags;
+ return node;
+
+ case _types.types.num:
+ return this.parseLiteral(this.state.value, "NumericLiteral");
+
+ case _types.types.string:
+ return this.parseLiteral(this.state.value, "StringLiteral");
+
+ case _types.types._null:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "NullLiteral");
+
+ case _types.types._true:case _types.types._false:
+ node = this.startNode();
+ node.value = this.match(_types.types._true);
+ this.next();
+ return this.finishNode(node, "BooleanLiteral");
+
+ case _types.types.parenL:
+ return this.parseParenAndDistinguishExpression(null, null, canBeArrow);
+
+ case _types.types.bracketL:
+ node = this.startNode();
+ this.next();
+ node.elements = this.parseExprList(_types.types.bracketR, true, true, refShorthandDefaultPos);
+ this.toReferencedList(node.elements);
+ return this.finishNode(node, "ArrayExpression");
+
+ case _types.types.braceL:
+ return this.parseObj(false, refShorthandDefaultPos);
+
+ case _types.types._function:
+ return this.parseFunctionExpression();
+
+ case _types.types.at:
+ this.parseDecorators();
+
+ case _types.types._class:
+ node = this.startNode();
+ this.takeDecorators(node);
+ return this.parseClass(node, false);
+
+ case _types.types._new:
+ return this.parseNew();
+
+ case _types.types.backQuote:
+ return this.parseTemplate();
+
+ case _types.types.doubleColon:
+ node = this.startNode();
+ this.next();
+ node.object = null;
+ var callee = node.callee = this.parseNoCallExpr();
+ if (callee.type === "MemberExpression") {
+ return this.finishNode(node, "BindExpression");
+ } else {
+ this.raise(callee.start, "Binding should be performed on object property.");
+ }
+
+ default:
+ this.unexpected();
+ }
+ };
+
+ pp.parseFunctionExpression = function () {
+ var node = this.startNode();
+ var meta = this.parseIdentifier(true);
+ if (this.state.inGenerator && this.eat(_types.types.dot) && this.hasPlugin("functionSent")) {
+ return this.parseMetaProperty(node, meta, "sent");
+ } else {
+ return this.parseFunction(node, false);
+ }
+ };
+
+ pp.parseMetaProperty = function (node, meta, propertyName) {
+ node.meta = meta;
+ node.property = this.parseIdentifier(true);
+
+ if (node.property.name !== propertyName) {
+ this.raise(node.property.start, "The only valid meta property for new is " + meta.name + "." + propertyName);
+ }
+
+ return this.finishNode(node, "MetaProperty");
+ };
+
+ pp.parseLiteral = function (value, type) {
+ var node = this.startNode();
+ this.addExtra(node, "rawValue", value);
+ this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
+ node.value = value;
+ this.next();
+ return this.finishNode(node, type);
+ };
+
+ pp.parseParenExpression = function () {
+ this.expect(_types.types.parenL);
+ var val = this.parseExpression();
+ this.expect(_types.types.parenR);
+ return val;
+ };
+
+ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow, isAsync, allowOptionalCommaStart) {
+ startPos = startPos || this.state.start;
+ startLoc = startLoc || this.state.startLoc;
+
+ var val = void 0;
+ this.next();
+
+ var innerStartPos = this.state.start,
+ innerStartLoc = this.state.startLoc;
+ var exprList = [],
+ first = true;
+ var refShorthandDefaultPos = { start: 0 },
+ spreadStart = void 0,
+ optionalCommaStart = void 0;
+ while (!this.match(_types.types.parenR)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_types.types.comma);
+ if (this.match(_types.types.parenR) && this.hasPlugin("trailingFunctionCommas")) {
+ optionalCommaStart = this.state.start;
+ break;
+ }
+ }
+
+ if (this.match(_types.types.ellipsis)) {
+ var spreadNodeStartPos = this.state.start,
+ spreadNodeStartLoc = this.state.startLoc;
+ spreadStart = this.state.start;
+ exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartLoc, spreadNodeStartPos));
+ break;
+ } else {
+ exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem));
+ }
+ }
+
+ var innerEndPos = this.state.start;
+ var innerEndLoc = this.state.startLoc;
+ this.expect(_types.types.parenR);
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(_types.types.arrow)) {
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = (0, _getIterator3.default)(exprList), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var param = _step.value;
+
+ if (param.extra && param.extra.parenthesized) this.unexpected(param.extra.parenStart);
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, isAsync);
+ }
+
+ if (!exprList.length) {
+ if (isAsync) {
+ return;
+ } else {
+ this.unexpected(this.state.lastTokStart);
+ }
+ }
+ if (optionalCommaStart && !allowOptionalCommaStart) this.unexpected(optionalCommaStart);
+ if (spreadStart) this.unexpected(spreadStart);
+ if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
+
+ if (exprList.length > 1) {
+ val = this.startNodeAt(innerStartPos, innerStartLoc);
+ val.expressions = exprList;
+ this.toReferencedList(val.expressions);
+ this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
+ } else {
+ val = exprList[0];
+ }
+
+ this.addExtra(val, "parenthesized", true);
+ this.addExtra(val, "parenStart", startPos);
+
+ return val;
+ };
+
+ pp.parseParenItem = function (node) {
+ return node;
+ };
+
+ // New's precedence is slightly tricky. It must allow its argument
+ // to be a `[]` or dot subscript expression, but not a call — at
+ // least, not without wrapping it in parentheses. Thus, it uses the
+
+ pp.parseNew = function () {
+ var node = this.startNode();
+ var meta = this.parseIdentifier(true);
+
+ if (this.eat(_types.types.dot)) {
+ return this.parseMetaProperty(node, meta, "target");
+ }
+
+ node.callee = this.parseNoCallExpr();
+
+ if (this.eat(_types.types.parenL)) {
+ node.arguments = this.parseExprList(_types.types.parenR, this.hasPlugin("trailingFunctionCommas"));
+ this.toReferencedList(node.arguments);
+ } else {
+ node.arguments = [];
+ }
+
+ return this.finishNode(node, "NewExpression");
+ };
+
+ // Parse template expression.
+
+ pp.parseTemplateElement = function () {
+ var elem = this.startNode();
+ elem.value = {
+ raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
+ cooked: this.state.value
+ };
+ this.next();
+ elem.tail = this.match(_types.types.backQuote);
+ return this.finishNode(elem, "TemplateElement");
+ };
+
+ pp.parseTemplate = function () {
+ var node = this.startNode();
+ this.next();
+ node.expressions = [];
+ var curElt = this.parseTemplateElement();
+ node.quasis = [curElt];
+ while (!curElt.tail) {
+ this.expect(_types.types.dollarBraceL);
+ node.expressions.push(this.parseExpression());
+ this.expect(_types.types.braceR);
+ node.quasis.push(curElt = this.parseTemplateElement());
+ }
+ this.next();
+ return this.finishNode(node, "TemplateLiteral");
+ };
+
+ // Parse an object literal or binding pattern.
+
+ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
+ var decorators = [];
+ var propHash = (0, _create2.default)(null);
+ var first = true;
+ var node = this.startNode();
+
+ node.properties = [];
+ this.next();
+
+ while (!this.eat(_types.types.braceR)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_types.types.comma);
+ if (this.eat(_types.types.braceR)) break;
+ }
+
+ while (this.match(_types.types.at)) {
+ decorators.push(this.parseDecorator());
+ }
+
+ var prop = this.startNode(),
+ isGenerator = false,
+ isAsync = false,
+ startPos = void 0,
+ startLoc = void 0;
+ if (decorators.length) {
+ prop.decorators = decorators;
+ decorators = [];
+ }
+
+ if (this.hasPlugin("objectRestSpread") && this.match(_types.types.ellipsis)) {
+ prop = this.parseSpread();
+ prop.type = isPattern ? "RestProperty" : "SpreadProperty";
+ node.properties.push(prop);
+ continue;
+ }
+
+ prop.method = false;
+ prop.shorthand = false;
+
+ if (isPattern || refShorthandDefaultPos) {
+ startPos = this.state.start;
+ startLoc = this.state.startLoc;
+ }
+
+ if (!isPattern) {
+ isGenerator = this.eat(_types.types.star);
+ }
+
+ if (!isPattern && this.hasPlugin("asyncFunctions") && this.isContextual("async")) {
+ if (isGenerator) this.unexpected();
+
+ var asyncId = this.parseIdentifier();
+ if (this.match(_types.types.colon) || this.match(_types.types.parenL) || this.match(_types.types.braceR)) {
+ prop.key = asyncId;
+ } else {
+ isAsync = true;
+ if (this.hasPlugin("asyncGenerators")) isGenerator = this.eat(_types.types.star);
+ this.parsePropertyName(prop);
+ }
+ } else {
+ this.parsePropertyName(prop);
+ }
+
+ this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos);
+ this.checkPropClash(prop, propHash);
+
+ if (prop.shorthand) {
+ this.addExtra(prop, "shorthand", true);
+ }
+
+ node.properties.push(prop);
+ }
+
+ if (decorators.length) {
+ this.raise(this.state.start, "You have trailing decorators with no property");
+ }
+
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
+ };
+
+ pp.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
+ if (isAsync || isGenerator || this.match(_types.types.parenL)) {
+ if (isPattern) this.unexpected();
+ prop.kind = "method";
+ prop.method = true;
+ this.parseMethod(prop, isGenerator, isAsync);
+ return this.finishNode(prop, "ObjectMethod");
+ }
+
+ if (this.eat(_types.types.colon)) {
+ prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
+ return this.finishNode(prop, "ObjectProperty");
+ }
+
+ if (!prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && !this.match(_types.types.comma) && !this.match(_types.types.braceR)) {
+ if (isGenerator || isAsync || isPattern) this.unexpected();
+ prop.kind = prop.key.name;
+ this.parsePropertyName(prop);
+ this.parseMethod(prop, false);
+ var paramCount = prop.kind === "get" ? 0 : 1;
+ if (prop.params.length !== paramCount) {
+ var start = prop.start;
+ if (prop.kind === "get") {
+ this.raise(start, "getter should have no params");
+ } else {
+ this.raise(start, "setter should have exactly one param");
+ }
+ }
+ return this.finishNode(prop, "ObjectMethod");
+ }
+
+ if (!prop.computed && prop.key.type === "Identifier") {
+ if (isPattern) {
+ var illegalBinding = this.isKeyword(prop.key.name);
+ if (!illegalBinding && this.state.strict) {
+ illegalBinding = _identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name);
+ }
+ if (illegalBinding) {
+ this.raise(prop.key.start, "Binding " + prop.key.name);
+ }
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
+ } else if (this.match(_types.types.eq) && refShorthandDefaultPos) {
+ if (!refShorthandDefaultPos.start) {
+ refShorthandDefaultPos.start = this.state.start;
+ }
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
+ } else {
+ prop.value = prop.key.__clone();
+ }
+ prop.shorthand = true;
+ return this.finishNode(prop, "ObjectProperty");
+ }
+
+ this.unexpected();
+ };
+
+ pp.parsePropertyName = function (prop) {
+ if (this.eat(_types.types.bracketL)) {
+ prop.computed = true;
+ prop.key = this.parseMaybeAssign();
+ this.expect(_types.types.bracketR);
+ return prop.key;
+ } else {
+ prop.computed = false;
+ return prop.key = this.match(_types.types.num) || this.match(_types.types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
+ }
+ };
+
+ // Initialize empty function node.
+
+ pp.initFunction = function (node, isAsync) {
+ node.id = null;
+ node.generator = false;
+ node.expression = false;
+ if (this.hasPlugin("asyncFunctions")) {
+ node.async = !!isAsync;
+ }
+ };
+
+ // Parse object or class method.
+
+ pp.parseMethod = function (node, isGenerator, isAsync) {
+ var oldInMethod = this.state.inMethod;
+ this.state.inMethod = node.kind || true;
+ this.initFunction(node, isAsync);
+ this.expect(_types.types.parenL);
+ node.params = this.parseBindingList(_types.types.parenR, false, this.hasPlugin("trailingFunctionCommas"));
+ node.generator = isGenerator;
+ this.parseFunctionBody(node);
+ this.state.inMethod = oldInMethod;
+ return node;
+ };
+
+ // Parse arrow function expression with given parameters.
+
+ pp.parseArrowExpression = function (node, params, isAsync) {
+ this.initFunction(node, isAsync);
+ node.params = this.toAssignableList(params, true);
+ this.parseFunctionBody(node, true);
+ return this.finishNode(node, "ArrowFunctionExpression");
+ };
+
+ // Parse function body and check parameters.
+
+ pp.parseFunctionBody = function (node, allowExpression) {
+ var isExpression = allowExpression && !this.match(_types.types.braceL);
+
+ var oldInAsync = this.state.inAsync;
+ this.state.inAsync = node.async;
+ if (isExpression) {
+ node.body = this.parseMaybeAssign();
+ node.expression = true;
+ } else {
+ // Start a new scope with regard to labels and the `inFunction`
+ // flag (restore them to their old value afterwards).
+ var oldInFunc = this.state.inFunction,
+ oldInGen = this.state.inGenerator,
+ oldLabels = this.state.labels;
+ this.state.inFunction = true;this.state.inGenerator = node.generator;this.state.labels = [];
+ node.body = this.parseBlock(true);
+ node.expression = false;
+ this.state.inFunction = oldInFunc;this.state.inGenerator = oldInGen;this.state.labels = oldLabels;
+ }
+ this.state.inAsync = oldInAsync;
+
+ // If this is a strict mode function, verify that argument names
+ // are not repeated, and it does not try to bind the words `eval`
+ // or `arguments`.
+ var checkLVal = this.state.strict;
+ var checkLValStrict = false;
+ var isStrict = false;
+
+ // arrow function
+ if (allowExpression) checkLVal = true;
+
+ // normal function
+ if (!isExpression && node.body.directives.length) {
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = (0, _getIterator3.default)(node.body.directives), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var directive = _step2.value;
+
+ if (directive.value.value === "use strict") {
+ isStrict = true;
+ checkLVal = true;
+ checkLValStrict = true;
+ break;
+ }
+ }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+ }
+
+ //
+ if (isStrict && node.id && node.id.type === "Identifier" && node.id.name === "yield") {
+ this.raise(node.id.start, "Binding yield in strict mode");
+ }
+
+ if (checkLVal) {
+ var nameHash = (0, _create2.default)(null);
+ var oldStrict = this.state.strict;
+ if (checkLValStrict) this.state.strict = true;
+ if (node.id) {
+ this.checkLVal(node.id, true);
+ }
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = (0, _getIterator3.default)(node.params), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var param = _step3.value;
+
+ this.checkLVal(param, true, nameHash);
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ this.state.strict = oldStrict;
+ }
+ };
+
+ // Parses a comma-separated list of expressions, and returns them as
+ // an array. `close` is the token type that ends the list, and
+ // `allowEmpty` can be turned on to allow subsequent commas with
+ // nothing in between them to be parsed as `null` (which is needed
+ // for array literals).
+
+ pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) {
+ var elts = [],
+ first = true;
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_types.types.comma);
+ if (allowTrailingComma && this.eat(close)) break;
+ }
+
+ elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos));
+ }
+ return elts;
+ };
+
+ pp.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) {
+ var elt = void 0;
+ if (allowEmpty && this.match(_types.types.comma)) {
+ elt = null;
+ } else if (this.match(_types.types.ellipsis)) {
+ elt = this.parseSpread(refShorthandDefaultPos);
+ } else {
+ elt = this.parseMaybeAssign(false, refShorthandDefaultPos);
+ }
+ return elt;
+ };
+
+ // Parse the next token as an identifier. If `liberal` is true (used
+ // when parsing properties), it will also convert keywords into
+ // identifiers.
+
+ pp.parseIdentifier = function (liberal) {
+ var node = this.startNode();
+
+ if (this.match(_types.types.name)) {
+ if (!liberal && this.state.strict && _identifier.reservedWords.strict(this.state.value)) {
+ this.raise(this.state.start, "The keyword '" + this.state.value + "' is reserved");
+ }
+
+ node.name = this.state.value;
+ } else if (liberal && this.state.type.keyword) {
+ node.name = this.state.type.keyword;
+ } else {
+ this.unexpected();
+ }
+
+ if (!liberal && node.name === "await" && this.state.inAsync) {
+ this.raise(node.start, "invalid use of await inside of an async function");
+ }
+
+ this.next();
+ return this.finishNode(node, "Identifier");
+ };
+
+ // Parses await expression inside async function.
+
+ pp.parseAwait = function (node) {
+ if (!this.state.inAsync) {
+ this.unexpected();
+ }
+ if (this.isLineTerminator()) {
+ this.unexpected();
+ }
+ if (this.match(_types.types.star)) {
+ this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.");
+ }
+ node.argument = this.parseMaybeUnary();
+ return this.finishNode(node, "AwaitExpression");
+ };
+
+ // Parses yield expression inside generator.
+
+ pp.parseYield = function () {
+ var node = this.startNode();
+ this.next();
+ if (this.match(_types.types.semi) || this.canInsertSemicolon() || !this.match(_types.types.star) && !this.state.type.startsExpr) {
+ node.delegate = false;
+ node.argument = null;
+ } else {
+ node.delegate = this.eat(_types.types.star);
+ node.argument = this.parseMaybeAssign();
+ }
+ return this.finishNode(node, "YieldExpression");
+ };
+
+ /***/ },
+ /* 8113 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__, __webpack_module_template_argument_8__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.plugins = undefined;
+
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
+
+ var _getPrototypeOf = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+ var _classCallCheck2 = __webpack_require__(__webpack_module_template_argument_2__);
+
+ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+ var _createClass2 = __webpack_require__(__webpack_module_template_argument_3__);
+
+ var _createClass3 = _interopRequireDefault(_createClass2);
+
+ var _possibleConstructorReturn2 = __webpack_require__(__webpack_module_template_argument_4__);
+
+ var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+ var _inherits2 = __webpack_require__(__webpack_module_template_argument_5__);
+
+ var _inherits3 = _interopRequireDefault(_inherits2);
+
+ var _identifier = __webpack_require__(__webpack_module_template_argument_6__);
+
+ var _options = __webpack_require__(__webpack_module_template_argument_7__);
+
+ var _tokenizer = __webpack_require__(__webpack_module_template_argument_8__);
+
+ var _tokenizer2 = _interopRequireDefault(_tokenizer);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var plugins = exports.plugins = {};
+
+ var Parser = function (_Tokenizer) {
+ (0, _inherits3.default)(Parser, _Tokenizer);
+
+ function Parser(options, input) {
+ (0, _classCallCheck3.default)(this, Parser);
+
+ options = (0, _options.getOptions)(options);
+
+ var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Parser).call(this, options, input));
+
+ _this.options = options;
+ _this.inModule = _this.options.sourceType === "module";
+ _this.isReservedWord = _identifier.reservedWords[6];
+ _this.input = input;
+ _this.plugins = _this.loadPlugins(_this.options.plugins);
+ _this.filename = options.sourceFilename;
+
+ // If enabled, skip leading hashbang line.
+ if (_this.state.pos === 0 && _this.input[0] === "#" && _this.input[1] === "!") {
+ _this.skipLineComment(2);
+ }
+ return _this;
+ }
+
+ (0, _createClass3.default)(Parser, [{
+ key: "hasPlugin",
+ value: function hasPlugin(name) {
+ return !!(this.plugins["*"] || this.plugins[name]);
+ }
+ }, {
+ key: "extend",
+ value: function extend(name, f) {
+ this[name] = f(this[name]);
+ }
+ }, {
+ key: "loadPlugins",
+ value: function loadPlugins(plugins) {
+ var pluginMap = {};
+
+ if (plugins.indexOf("flow") >= 0) {
+ // ensure flow plugin loads last
+ plugins = plugins.filter(function (plugin) {
+ return plugin !== "flow";
+ });
+ plugins.push("flow");
+ }
+
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = (0, _getIterator3.default)(plugins), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var name = _step.value;
+
+ if (!pluginMap[name]) {
+ pluginMap[name] = true;
+
+ var plugin = exports.plugins[name];
+ if (plugin) plugin(this);
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ return pluginMap;
+ }
+ }, {
+ key: "parse",
+ value: function parse() {
+ var file = this.startNode();
+ var program = this.startNode();
+ this.nextToken();
+ return this.parseTopLevel(file, program);
+ }
+ }]);
+ return Parser;
+ }(_tokenizer2.default);
+
+ exports.default = Parser;
+
+ /***/ },
+ /* 8114 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ "use strict";
+
+ var _location = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _index = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var pp = _index2.default.prototype;
+
+ // This function is used to raise exceptions on parse errors. It
+ // takes an offset integer (into the current `input`) to indicate
+ // the location of the error, attaches the position to the end
+ // of the error message, and then raises a `SyntaxError` with that
+ // message.
+
+ pp.raise = function (pos, message) {
+ var loc = (0, _location.getLineInfo)(this.input, pos);
+ message += " (" + loc.line + ":" + loc.column + ")";
+ var err = new SyntaxError(message);
+ err.pos = pos;
+ err.loc = loc;
+ throw err;
+ };
+
+ /***/ },
+ /* 8115 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
+
+ "use strict";
+
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
+
+ var _types = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _index = __webpack_require__(__webpack_module_template_argument_2__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ var _identifier = __webpack_require__(__webpack_module_template_argument_3__);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var pp = _index2.default.prototype;
+
+ // Convert existing expression atom to assignable pattern
+ // if possible.
+
+ /* eslint indent: 0 */
+
+ pp.toAssignable = function (node, isBinding) {
+ if (node) {
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ break;
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern";
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = (0, _getIterator3.default)(node.properties), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var prop = _step.value;
+
+ if (prop.type === "ObjectMethod") {
+ if (prop.kind === "get" || prop.kind === "set") {
+ this.raise(prop.key.start, "Object pattern can't contain getter or setter");
+ } else {
+ this.raise(prop.key.start, "Object pattern can't contain methods");
+ }
+ } else {
+ this.toAssignable(prop, isBinding);
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ break;
+
+ case "ObjectProperty":
+ this.toAssignable(node.value, isBinding);
+ break;
+
+ case "SpreadProperty":
+ node.type = "RestProperty";
+ break;
+
+ case "ArrayExpression":
+ node.type = "ArrayPattern";
+ this.toAssignableList(node.elements, isBinding);
+ break;
+
+ case "AssignmentExpression":
+ if (node.operator === "=") {
+ node.type = "AssignmentPattern";
+ delete node.operator;
+ } else {
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
+ }
+ break;
+
+ case "MemberExpression":
+ if (!isBinding) break;
+
+ default:
+ this.raise(node.start, "Assigning to rvalue");
+ }
+ }
+ return node;
+ };
+
+ // Convert list of expression atoms to binding list.
+
+ pp.toAssignableList = function (exprList, isBinding) {
+ var end = exprList.length;
+ if (end) {
+ var last = exprList[end - 1];
+ if (last && last.type === "RestElement") {
+ --end;
+ } else if (last && last.type === "SpreadElement") {
+ last.type = "RestElement";
+ var arg = last.argument;
+ this.toAssignable(arg, isBinding);
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") {
+ this.unexpected(arg.start);
+ }
+ --end;
+ }
+ }
+ for (var i = 0; i < end; i++) {
+ var elt = exprList[i];
+ if (elt) this.toAssignable(elt, isBinding);
+ }
+ return exprList;
+ };
+
+ // Convert list of expression atoms to a list of
+
+ pp.toReferencedList = function (exprList) {
+ return exprList;
+ };
+
+ // Parses spread element.
+
+ pp.parseSpread = function (refShorthandDefaultPos) {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeAssign(refShorthandDefaultPos);
+ return this.finishNode(node, "SpreadElement");
+ };
+
+ pp.parseRest = function () {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseBindingIdentifier();
+ return this.finishNode(node, "RestElement");
+ };
+
+ pp.shouldAllowYieldIdentifier = function () {
+ return this.match(_types.types._yield) && !this.state.strict && !this.state.inGenerator;
+ };
+
+ pp.parseBindingIdentifier = function () {
+ return this.parseIdentifier(this.shouldAllowYieldIdentifier());
+ };
+
+ // Parses lvalue (assignable) atom.
+
+ pp.parseBindingAtom = function () {
+ switch (this.state.type) {
+ case _types.types._yield:
+ if (this.state.strict || this.state.inGenerator) this.unexpected();
+
+ case _types.types.name:
+ return this.parseIdentifier(true);
+
+ case _types.types.bracketL:
+ var node = this.startNode();
+ this.next();
+ node.elements = this.parseBindingList(_types.types.bracketR, true, true);
+ return this.finishNode(node, "ArrayPattern");
+
+ case _types.types.braceL:
+ return this.parseObj(true);
+
+ default:
+ this.unexpected();
+ }
+ };
+
+ pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
+ var elts = [];
+ var first = true;
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_types.types.comma);
+ }
+ if (allowEmpty && this.match(_types.types.comma)) {
+ elts.push(null);
+ } else if (allowTrailingComma && this.eat(close)) {
+ break;
+ } else if (this.match(_types.types.ellipsis)) {
+ elts.push(this.parseAssignableListItemTypes(this.parseRest()));
+ this.expect(close);
+ break;
+ } else {
+ var decorators = [];
+ while (this.match(_types.types.at)) {
+ decorators.push(this.parseDecorator());
+ }
+ var left = this.parseMaybeDefault();
+ if (decorators.length) {
+ left.decorators = decorators;
+ }
+ this.parseAssignableListItemTypes(left);
+ elts.push(this.parseMaybeDefault(null, null, left));
+ }
+ }
+ return elts;
+ };
+
+ pp.parseAssignableListItemTypes = function (param) {
+ return param;
+ };
+
+ // Parses assignment pattern around given atom if possible.
+
+ pp.parseMaybeDefault = function (startPos, startLoc, left) {
+ startLoc = startLoc || this.state.startLoc;
+ startPos = startPos || this.state.start;
+ left = left || this.parseBindingAtom();
+ if (!this.eat(_types.types.eq)) return left;
+
+ var node = this.startNodeAt(startPos, startLoc);
+ node.left = left;
+ node.right = this.parseMaybeAssign();
+ return this.finishNode(node, "AssignmentPattern");
+ };
+
+ // Verify that a node is an lval — something that can be assigned
+ // to.
+
+ pp.checkLVal = function (expr, isBinding, checkClashes) {
+ switch (expr.type) {
+ case "Identifier":
+ if (this.state.strict && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) {
+ this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
+ }
+
+ if (checkClashes) {
+ // we need to prefix this with an underscore for the cases where we have a key of
+ // `__proto__`. there's a bug in old V8 where the following wouldn't work:
+ //
+ // > var obj = Object.create(null);
+ // undefined
+ // > obj.__proto__
+ // null
+ // > obj.__proto__ = true;
+ // true
+ // > obj.__proto__
+ // null
+ var key = "_" + expr.name;
+
+ if (checkClashes[key]) {
+ this.raise(expr.start, "Argument name clash in strict mode");
+ } else {
+ checkClashes[key] = true;
+ }
+ }
+ break;
+
+ case "MemberExpression":
+ if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression");
+ break;
+
+ case "ObjectPattern":
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = (0, _getIterator3.default)(expr.properties), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var prop = _step2.value;
+
+ if (prop.type === "ObjectProperty") prop = prop.value;
+ this.checkLVal(prop, isBinding, checkClashes);
+ }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+
+ break;
+
+ case "ArrayPattern":
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = (0, _getIterator3.default)(expr.elements), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var elem = _step3.value;
+
+ if (elem) this.checkLVal(elem, isBinding, checkClashes);
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ break;
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, isBinding, checkClashes);
+ break;
+
+ case "RestProperty":
+ case "RestElement":
+ this.checkLVal(expr.argument, isBinding, checkClashes);
+ break;
+
+ default:
+ this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue");
+ }
+ };
+
+ /***/ },
+ /* 8116 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
+
+ "use strict";
+
+ var _classCallCheck2 = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+ var _createClass2 = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _createClass3 = _interopRequireDefault(_createClass2);
+
+ var _index = __webpack_require__(__webpack_module_template_argument_2__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ var _location = __webpack_require__(__webpack_module_template_argument_3__);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // Start an AST node, attaching a start offset.
+
+ var pp = _index2.default.prototype;
+
+ var Node = function () {
+ function Node(pos, loc, filename) {
+ (0, _classCallCheck3.default)(this, Node);
+
+ this.type = "";
+ this.start = pos;
+ this.end = 0;
+ this.loc = new _location.SourceLocation(loc);
+ if (filename) this.loc.filename = filename;
+ }
+
+ (0, _createClass3.default)(Node, [{
+ key: "__clone",
+ value: function __clone() {
+ var node2 = new Node();
+ for (var key in this) {
+ node2[key] = this[key];
+ }return node2;
+ }
+ }]);
+ return Node;
+ }();
+
+ pp.startNode = function () {
+ return new Node(this.state.start, this.state.startLoc, this.filename);
+ };
+
+ pp.startNodeAt = function (pos, loc) {
+ return new Node(pos, loc, this.filename);
+ };
+
+ function finishNodeAt(node, type, pos, loc) {
+ node.type = type;
+ node.end = pos;
+ node.loc.end = loc;
+ this.processComment(node);
+ return node;
+ }
+
+ // Finish an AST node, adding `type` and `end` properties.
+
+ pp.finishNode = function (node, type) {
+ return finishNodeAt.call(this, node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
+ };
+
+ // Finish node at given position
+
+ pp.finishNodeAt = function (node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc);
+ };
+
+ /***/ },
+ /* 8117 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
+
+ "use strict";
+
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
+
+ var _create = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _create2 = _interopRequireDefault(_create);
+
+ var _types = __webpack_require__(__webpack_module_template_argument_2__);
+
+ var _index = __webpack_require__(__webpack_module_template_argument_3__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ var _whitespace = __webpack_require__(__webpack_module_template_argument_4__);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var pp = _index2.default.prototype;
+
+ // ### Statement parsing
+
+ // Parse a program. Initializes the parser, reads any number of
+ // statements, and wraps them in a Program node. Optionally takes a
+ // `program` argument. If present, the statements will be appended
+ // to its body instead of creating a new node.
+
+ /* eslint indent: 0 */
+ /* eslint max-len: 0 */
+
+ pp.parseTopLevel = function (file, program) {
+ program.sourceType = this.options.sourceType;
+
+ this.parseBlockBody(program, true, true, _types.types.eof);
+
+ file.program = this.finishNode(program, "Program");
+ file.comments = this.state.comments;
+ file.tokens = this.state.tokens;
+
+ return this.finishNode(file, "File");
+ };
+
+ var loopLabel = { kind: "loop" },
+ switchLabel = { kind: "switch" };
+
+ // TODO
+
+ pp.stmtToDirective = function (stmt) {
+ var expr = stmt.expression;
+
+ var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
+ var directive = this.startNodeAt(stmt.start, stmt.loc.start);
+
+ var raw = this.input.slice(expr.start, expr.end);
+ var val = directiveLiteral.value = raw.slice(1, -1); // remove quotes
+
+ this.addExtra(directiveLiteral, "raw", raw);
+ this.addExtra(directiveLiteral, "rawValue", val);
+
+ directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
+
+ return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
+ };
+
+ // Parse a single statement.
+ //
+ // If expecting a statement and finding a slash operator, parse a
+ // regular expression literal. This is to handle cases like
+ // `if (foo) /blah/.exec(foo)`, where looking at the previous token
+ // does not help.
+
+ pp.parseStatement = function (declaration, topLevel) {
+ if (this.match(_types.types.at)) {
+ this.parseDecorators(true);
+ }
+
+ var starttype = this.state.type,
+ node = this.startNode();
+
+ // Most types of statements are recognized by the keyword they
+ // start with. Many are trivial to parse, some require a bit of
+ // complexity.
+
+ switch (starttype) {
+ case _types.types._break:case _types.types._continue:
+ return this.parseBreakContinueStatement(node, starttype.keyword);
+ case _types.types._debugger:
+ return this.parseDebuggerStatement(node);
+ case _types.types._do:
+ return this.parseDoStatement(node);
+ case _types.types._for:
+ return this.parseForStatement(node);
+ case _types.types._function:
+ if (!declaration) this.unexpected();
+ return this.parseFunctionStatement(node);
+
+ case _types.types._class:
+ if (!declaration) this.unexpected();
+ this.takeDecorators(node);
+ return this.parseClass(node, true);
+
+ case _types.types._if:
+ return this.parseIfStatement(node);
+ case _types.types._return:
+ return this.parseReturnStatement(node);
+ case _types.types._switch:
+ return this.parseSwitchStatement(node);
+ case _types.types._throw:
+ return this.parseThrowStatement(node);
+ case _types.types._try:
+ return this.parseTryStatement(node);
+
+ case _types.types._let:
+ case _types.types._const:
+ if (!declaration) this.unexpected(); // NOTE: falls through to _var
+
+ case _types.types._var:
+ return this.parseVarStatement(node, starttype);
+
+ case _types.types._while:
+ return this.parseWhileStatement(node);
+ case _types.types._with:
+ return this.parseWithStatement(node);
+ case _types.types.braceL:
+ return this.parseBlock();
+ case _types.types.semi:
+ return this.parseEmptyStatement(node);
+ case _types.types._export:
+ case _types.types._import:
+ if (!this.options.allowImportExportEverywhere) {
+ if (!topLevel) {
+ this.raise(this.state.start, "'import' and 'export' may only appear at the top level");
+ }
+
+ if (!this.inModule) {
+ this.raise(this.state.start, "'import' and 'export' may appear only with 'sourceType: module'");
+ }
+ }
+ return starttype === _types.types._import ? this.parseImport(node) : this.parseExport(node);
+
+ case _types.types.name:
+ if (this.hasPlugin("asyncFunctions") && this.state.value === "async") {
+ // peek ahead and see if next token is a function
+ var state = this.state.clone();
+ this.next();
+ if (this.match(_types.types._function) && !this.canInsertSemicolon()) {
+ this.expect(_types.types._function);
+ return this.parseFunction(node, true, false, true);
+ } else {
+ this.state = state;
+ }
+ }
+ }
+
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ var maybeName = this.state.value;
+ var expr = this.parseExpression();
+
+ if (starttype === _types.types.name && expr.type === "Identifier" && this.eat(_types.types.colon)) {
+ return this.parseLabeledStatement(node, maybeName, expr);
+ } else {
+ return this.parseExpressionStatement(node, expr);
+ }
+ };
+
+ pp.takeDecorators = function (node) {
+ if (this.state.decorators.length) {
+ node.decorators = this.state.decorators;
+ this.state.decorators = [];
+ }
+ };
+
+ pp.parseDecorators = function (allowExport) {
+ while (this.match(_types.types.at)) {
+ this.state.decorators.push(this.parseDecorator());
+ }
+
+ if (allowExport && this.match(_types.types._export)) {
+ return;
+ }
+
+ if (!this.match(_types.types._class)) {
+ this.raise(this.state.start, "Leading decorators must be attached to a class declaration");
+ }
+ };
+
+ pp.parseDecorator = function () {
+ if (!this.hasPlugin("decorators")) {
+ this.unexpected();
+ }
+ var node = this.startNode();
+ this.next();
+ node.expression = this.parseMaybeAssign();
+ return this.finishNode(node, "Decorator");
+ };
+
+ pp.parseBreakContinueStatement = function (node, keyword) {
+ var isBreak = keyword === "break";
+ this.next();
+
+ if (this.isLineTerminator()) {
+ node.label = null;
+ } else if (!this.match(_types.types.name)) {
+ this.unexpected();
+ } else {
+ node.label = this.parseIdentifier();
+ this.semicolon();
+ }
+
+ // Verify that there is an actual destination to break or
+ // continue to.
+ var i = void 0;
+ for (i = 0; i < this.state.labels.length; ++i) {
+ var lab = this.state.labels[i];
+ if (node.label == null || lab.name === node.label.name) {
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
+ if (node.label && isBreak) break;
+ }
+ }
+ if (i === this.state.labels.length) this.raise(node.start, "Unsyntactic " + keyword);
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
+ };
+
+ pp.parseDebuggerStatement = function (node) {
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement");
+ };
+
+ pp.parseDoStatement = function (node) {
+ this.next();
+ this.state.labels.push(loopLabel);
+ node.body = this.parseStatement(false);
+ this.state.labels.pop();
+ this.expect(_types.types._while);
+ node.test = this.parseParenExpression();
+ this.eat(_types.types.semi);
+ return this.finishNode(node, "DoWhileStatement");
+ };
+
+ // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
+ // loop is non-trivial. Basically, we have to parse the init `var`
+ // statement or expression, disallowing the `in` operator (see
+ // the second parameter to `parseExpression`), and then check
+ // whether the next token is `in` or `of`. When there is no init
+ // part (semicolon immediately after the opening parenthesis), it
+ // is a regular `for` loop.
+
+ pp.parseForStatement = function (node) {
+ this.next();
+ this.state.labels.push(loopLabel);
+
+ var forAwait = false;
+ if (this.hasPlugin("asyncGenerators") && this.state.inAsync && this.isContextual("await")) {
+ forAwait = true;
+ this.next();
+ }
+ this.expect(_types.types.parenL);
+
+ if (this.match(_types.types.semi)) {
+ if (forAwait) {
+ this.unexpected();
+ }
+ return this.parseFor(node, null);
+ }
+
+ if (this.match(_types.types._var) || this.match(_types.types._let) || this.match(_types.types._const)) {
+ var _init = this.startNode(),
+ varKind = this.state.type;
+ this.next();
+ this.parseVar(_init, true, varKind);
+ this.finishNode(_init, "VariableDeclaration");
+
+ if (this.match(_types.types._in) || this.isContextual("of")) {
+ if (_init.declarations.length === 1 && !_init.declarations[0].init) {
+ return this.parseForIn(node, _init, forAwait);
+ }
+ }
+ if (forAwait) {
+ this.unexpected();
+ }
+ return this.parseFor(node, _init);
+ }
+
+ var refShorthandDefaultPos = { start: 0 };
+ var init = this.parseExpression(true, refShorthandDefaultPos);
+ if (this.match(_types.types._in) || this.isContextual("of")) {
+ this.toAssignable(init);
+ this.checkLVal(init);
+ return this.parseForIn(node, init, forAwait);
+ } else if (refShorthandDefaultPos.start) {
+ this.unexpected(refShorthandDefaultPos.start);
+ }
+ if (forAwait) {
+ this.unexpected();
+ }
+ return this.parseFor(node, init);
+ };
+
+ pp.parseFunctionStatement = function (node) {
+ this.next();
+ return this.parseFunction(node, true);
+ };
+
+ pp.parseIfStatement = function (node) {
+ this.next();
+ node.test = this.parseParenExpression();
+ node.consequent = this.parseStatement(false);
+ node.alternate = this.eat(_types.types._else) ? this.parseStatement(false) : null;
+ return this.finishNode(node, "IfStatement");
+ };
+
+ pp.parseReturnStatement = function (node) {
+ if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) {
+ this.raise(this.state.start, "'return' outside of function");
+ }
+
+ this.next();
+
+ // In `return` (and `break`/`continue`), the keywords with
+ // optional arguments, we eagerly look for a semicolon or the
+ // possibility to insert one.
+
+ if (this.isLineTerminator()) {
+ node.argument = null;
+ } else {
+ node.argument = this.parseExpression();
+ this.semicolon();
+ }
+
+ return this.finishNode(node, "ReturnStatement");
+ };
+
+ pp.parseSwitchStatement = function (node) {
+ this.next();
+ node.discriminant = this.parseParenExpression();
+ node.cases = [];
+ this.expect(_types.types.braceL);
+ this.state.labels.push(switchLabel);
+
+ // Statements under must be grouped (by label) in SwitchCase
+ // nodes. `cur` is used to keep the node that we are currently
+ // adding statements to.
+
+ var cur = void 0;
+ for (var sawDefault; !this.match(_types.types.braceR);) {
+ if (this.match(_types.types._case) || this.match(_types.types._default)) {
+ var isCase = this.match(_types.types._case);
+ if (cur) this.finishNode(cur, "SwitchCase");
+ node.cases.push(cur = this.startNode());
+ cur.consequent = [];
+ this.next();
+ if (isCase) {
+ cur.test = this.parseExpression();
+ } else {
+ if (sawDefault) this.raise(this.state.lastTokStart, "Multiple default clauses");
+ sawDefault = true;
+ cur.test = null;
+ }
+ this.expect(_types.types.colon);
+ } else {
+ if (cur) {
+ cur.consequent.push(this.parseStatement(true));
+ } else {
+ this.unexpected();
+ }
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase");
+ this.next(); // Closing brace
+ this.state.labels.pop();
+ return this.finishNode(node, "SwitchStatement");
+ };
+
+ pp.parseThrowStatement = function (node) {
+ this.next();
+ if (_whitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) this.raise(this.state.lastTokEnd, "Illegal newline after throw");
+ node.argument = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(node, "ThrowStatement");
+ };
+
+ // Reused empty array added for node fields that are always empty.
+
+ var empty = [];
+
+ pp.parseTryStatement = function (node) {
+ this.next();
+
+ node.block = this.parseBlock();
+ node.handler = null;
+
+ if (this.match(_types.types._catch)) {
+ var clause = this.startNode();
+ this.next();
+
+ this.expect(_types.types.parenL);
+ clause.param = this.parseBindingAtom();
+ this.checkLVal(clause.param, true, (0, _create2.default)(null));
+ this.expect(_types.types.parenR);
+
+ clause.body = this.parseBlock();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+
+ node.guardedHandlers = empty;
+ node.finalizer = this.eat(_types.types._finally) ? this.parseBlock() : null;
+
+ if (!node.handler && !node.finalizer) {
+ this.raise(node.start, "Missing catch or finally clause");
+ }
+
+ return this.finishNode(node, "TryStatement");
+ };
+
+ pp.parseVarStatement = function (node, kind) {
+ this.next();
+ this.parseVar(node, false, kind);
+ this.semicolon();
+ return this.finishNode(node, "VariableDeclaration");
+ };
+
+ pp.parseWhileStatement = function (node) {
+ this.next();
+ node.test = this.parseParenExpression();
+ this.state.labels.push(loopLabel);
+ node.body = this.parseStatement(false);
+ this.state.labels.pop();
+ return this.finishNode(node, "WhileStatement");
+ };
+
+ pp.parseWithStatement = function (node) {
+ if (this.state.strict) this.raise(this.state.start, "'with' in strict mode");
+ this.next();
+ node.object = this.parseParenExpression();
+ node.body = this.parseStatement(false);
+ return this.finishNode(node, "WithStatement");
+ };
+
+ pp.parseEmptyStatement = function (node) {
+ this.next();
+ return this.finishNode(node, "EmptyStatement");
+ };
+
+ pp.parseLabeledStatement = function (node, maybeName, expr) {
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = (0, _getIterator3.default)(this.state.labels), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var _label = _step.value;
+
+ if (_label.name === maybeName) {
+ this.raise(expr.start, "Label '" + maybeName + "' is already declared");
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ var kind = this.state.type.isLoop ? "loop" : this.match(_types.types._switch) ? "switch" : null;
+ for (var i = this.state.labels.length - 1; i >= 0; i--) {
+ var label = this.state.labels[i];
+ if (label.statementStart === node.start) {
+ label.statementStart = this.state.start;
+ label.kind = kind;
+ } else {
+ break;
+ }
+ }
+
+ this.state.labels.push({ name: maybeName, kind: kind, statementStart: this.state.start });
+ node.body = this.parseStatement(true);
+ this.state.labels.pop();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement");
+ };
+
+ pp.parseExpressionStatement = function (node, expr) {
+ node.expression = expr;
+ this.semicolon();
+ return this.finishNode(node, "ExpressionStatement");
+ };
+
+ // Parse a semicolon-enclosed block of statements, handling `"use
+ // strict"` declarations when `allowStrict` is true (used for
+ // function bodies).
+
+ pp.parseBlock = function (allowDirectives) {
+ var node = this.startNode();
+ this.expect(_types.types.braceL);
+ this.parseBlockBody(node, allowDirectives, false, _types.types.braceR);
+ return this.finishNode(node, "BlockStatement");
+ };
+
+ // TODO
+
+ pp.parseBlockBody = function (node, allowDirectives, topLevel, end) {
+ node.body = [];
+ node.directives = [];
+
+ var parsedNonDirective = false;
+ var oldStrict = void 0;
+ var octalPosition = void 0;
+
+ while (!this.eat(end)) {
+ if (!parsedNonDirective && this.state.containsOctal && !octalPosition) {
+ octalPosition = this.state.octalPosition;
+ }
+
+ var stmt = this.parseStatement(true, topLevel);
+
+ if (allowDirectives && !parsedNonDirective && stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized) {
+ var directive = this.stmtToDirective(stmt);
+ node.directives.push(directive);
+
+ if (oldStrict === undefined && directive.value.value === "use strict") {
+ oldStrict = this.state.strict;
+ this.setStrict(true);
+
+ if (octalPosition) {
+ this.raise(octalPosition, "Octal literal in strict mode");
+ }
+ }
+
+ continue;
+ }
+
+ parsedNonDirective = true;
+ node.body.push(stmt);
+ }
+
+ if (oldStrict === false) {
+ this.setStrict(false);
+ }
+ };
+
+ // Parse a regular `for` loop. The disambiguation code in
+ // `parseStatement` will already have parsed the init statement or
+ // expression.
+
+ pp.parseFor = function (node, init) {
+ node.init = init;
+ this.expect(_types.types.semi);
+ node.test = this.match(_types.types.semi) ? null : this.parseExpression();
+ this.expect(_types.types.semi);
+ node.update = this.match(_types.types.parenR) ? null : this.parseExpression();
+ this.expect(_types.types.parenR);
+ node.body = this.parseStatement(false);
+ this.state.labels.pop();
+ return this.finishNode(node, "ForStatement");
+ };
+
+ // Parse a `for`/`in` and `for`/`of` loop, which are almost
+ // same from parser's perspective.
+
+ pp.parseForIn = function (node, init, forAwait) {
+ var type = void 0;
+ if (forAwait) {
+ this.eatContextual("of");
+ type = "ForAwaitStatement";
+ } else {
+ type = this.match(_types.types._in) ? "ForInStatement" : "ForOfStatement";
+ this.next();
+ }
+ node.left = init;
+ node.right = this.parseExpression();
+ this.expect(_types.types.parenR);
+ node.body = this.parseStatement(false);
+ this.state.labels.pop();
+ return this.finishNode(node, type);
+ };
+
+ // Parse a list of variable declarations.
+
+ pp.parseVar = function (node, isFor, kind) {
+ node.declarations = [];
+ node.kind = kind.keyword;
+ for (;;) {
+ var decl = this.startNode();
+ this.parseVarHead(decl);
+ if (this.eat(_types.types.eq)) {
+ decl.init = this.parseMaybeAssign(isFor);
+ } else if (kind === _types.types._const && !(this.match(_types.types._in) || this.isContextual("of"))) {
+ this.unexpected();
+ } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(_types.types._in) || this.isContextual("of")))) {
+ this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value");
+ } else {
+ decl.init = null;
+ }
+ node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
+ if (!this.eat(_types.types.comma)) break;
+ }
+ return node;
+ };
+
+ pp.parseVarHead = function (decl) {
+ decl.id = this.parseBindingAtom();
+ this.checkLVal(decl.id, true);
+ };
+
+ // Parse a function declaration or literal (depending on the
+ // `isStatement` parameter).
+
+ pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) {
+ var oldInMethod = this.state.inMethod;
+ this.state.inMethod = false;
+
+ this.initFunction(node, isAsync);
+
+ if (this.match(_types.types.star)) {
+ if (node.async && !this.hasPlugin("asyncGenerators")) {
+ this.unexpected();
+ } else {
+ node.generator = true;
+ this.next();
+ }
+ }
+
+ if (isStatement && !optionalId && !this.match(_types.types.name) && !this.match(_types.types._yield)) {
+ this.unexpected();
+ }
+
+ if (this.match(_types.types.name) || this.match(_types.types._yield)) {
+ node.id = this.parseBindingIdentifier();
+ }
+
+ this.parseFunctionParams(node);
+ this.parseFunctionBody(node, allowExpressionBody);
+
+ this.state.inMethod = oldInMethod;
+
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
+ };
+
+ pp.parseFunctionParams = function (node) {
+ this.expect(_types.types.parenL);
+ node.params = this.parseBindingList(_types.types.parenR, false, this.hasPlugin("trailingFunctionCommas"));
+ };
+
+ // Parse a class declaration or literal (depending on the
+ // `isStatement` parameter).
+
+ pp.parseClass = function (node, isStatement, optionalId) {
+ this.next();
+ this.parseClassId(node, isStatement, optionalId);
+ this.parseClassSuper(node);
+ this.parseClassBody(node);
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
+ };
+
+ pp.isClassProperty = function () {
+ return this.match(_types.types.eq) || this.isLineTerminator();
+ };
+
+ pp.parseClassBody = function (node) {
+ // class bodies are implicitly strict
+ var oldStrict = this.state.strict;
+ this.state.strict = true;
+
+ var hadConstructorCall = false;
+ var hadConstructor = false;
+ var decorators = [];
+ var classBody = this.startNode();
+
+ classBody.body = [];
+
+ this.expect(_types.types.braceL);
+
+ while (!this.eat(_types.types.braceR)) {
+ if (this.eat(_types.types.semi)) {
+ continue;
+ }
+
+ if (this.match(_types.types.at)) {
+ decorators.push(this.parseDecorator());
+ continue;
+ }
+
+ var method = this.startNode();
+
+ // steal the decorators if there are any
+ if (decorators.length) {
+ method.decorators = decorators;
+ decorators = [];
+ }
+
+ var isConstructorCall = false;
+ var isMaybeStatic = this.match(_types.types.name) && this.state.value === "static";
+ var isGenerator = this.eat(_types.types.star);
+ var isGetSet = false;
+ var isAsync = false;
+
+ this.parsePropertyName(method);
+
+ method.static = isMaybeStatic && !this.match(_types.types.parenL);
+ if (method.static) {
+ if (isGenerator) this.unexpected();
+ isGenerator = this.eat(_types.types.star);
+ this.parsePropertyName(method);
+ }
+
+ if (!isGenerator && method.key.type === "Identifier" && !method.computed) {
+ if (this.isClassProperty()) {
+ classBody.body.push(this.parseClassProperty(method));
+ continue;
+ }
+
+ if (this.hasPlugin("classConstructorCall") && method.key.name === "call" && this.match(_types.types.name) && this.state.value === "constructor") {
+ isConstructorCall = true;
+ this.parsePropertyName(method);
+ }
+ }
+
+ var isAsyncMethod = this.hasPlugin("asyncFunctions") && !this.match(_types.types.parenL) && !method.computed && method.key.type === "Identifier" && method.key.name === "async";
+ if (isAsyncMethod) {
+ if (this.hasPlugin("asyncGenerators") && this.eat(_types.types.star)) isGenerator = true;
+ isAsync = true;
+ this.parsePropertyName(method);
+ }
+
+ method.kind = "method";
+
+ if (!method.computed) {
+ var key = method.key;
+
+ // handle get/set methods
+ // eg. class Foo { get bar() {} set bar() {} }
+
+ if (!isAsync && !isGenerator && key.type === "Identifier" && !this.match(_types.types.parenL) && (key.name === "get" || key.name === "set")) {
+ isGetSet = true;
+ method.kind = key.name;
+ key = this.parsePropertyName(method);
+ }
+
+ // disallow invalid constructors
+ var isConstructor = !isConstructorCall && !method.static && (key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor");
+ if (isConstructor) {
+ if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class");
+ if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier");
+ if (isGenerator) this.raise(key.start, "Constructor can't be a generator");
+ if (isAsync) this.raise(key.start, "Constructor can't be an async function");
+ method.kind = "constructor";
+ hadConstructor = true;
+ }
+
+ // disallow static prototype method
+ var isStaticPrototype = method.static && (key.type === "Identifier" && key.name === "prototype" || key.type === "StringLiteral" && key.value === "prototype");
+ if (isStaticPrototype) {
+ this.raise(key.start, "Classes may not have static property named prototype");
+ }
+ }
+
+ // convert constructor to a constructor call
+ if (isConstructorCall) {
+ if (hadConstructorCall) this.raise(method.start, "Duplicate constructor call in the same class");
+ method.kind = "constructorCall";
+ hadConstructorCall = true;
+ }
+
+ // disallow decorators on class constructors
+ if ((method.kind === "constructor" || method.kind === "constructorCall") && method.decorators) {
+ this.raise(method.start, "You can't attach decorators to a class constructor");
+ }
+
+ this.parseClassMethod(classBody, method, isGenerator, isAsync);
+
+ // get methods aren't allowed to have any parameters
+ // set methods must have exactly 1 parameter
+ if (isGetSet) {
+ var paramCount = method.kind === "get" ? 0 : 1;
+ if (method.params.length !== paramCount) {
+ var start = method.start;
+ if (method.kind === "get") {
+ this.raise(start, "getter should have no params");
+ } else {
+ this.raise(start, "setter should have exactly one param");
+ }
+ }
+ }
+ }
+
+ if (decorators.length) {
+ this.raise(this.state.start, "You have trailing decorators with no method");
+ }
+
+ node.body = this.finishNode(classBody, "ClassBody");
+
+ this.state.strict = oldStrict;
+ };
+
+ pp.parseClassProperty = function (node) {
+ if (this.match(_types.types.eq)) {
+ if (!this.hasPlugin("classProperties")) this.unexpected();
+ this.next();
+ node.value = this.parseMaybeAssign();
+ } else {
+ node.value = null;
+ }
+ this.semicolon();
+ return this.finishNode(node, "ClassProperty");
+ };
+
+ pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) {
+ this.parseMethod(method, isGenerator, isAsync);
+ classBody.body.push(this.finishNode(method, "ClassMethod"));
+ };
+
+ pp.parseClassId = function (node, isStatement, optionalId) {
+ if (this.match(_types.types.name)) {
+ node.id = this.parseIdentifier();
+ } else {
+ if (optionalId || !isStatement) {
+ node.id = null;
+ } else {
+ this.unexpected();
+ }
+ }
+ };
+
+ pp.parseClassSuper = function (node) {
+ node.superClass = this.eat(_types.types._extends) ? this.parseExprSubscripts() : null;
+ };
+
+ // Parses module export declaration.
+
+ pp.parseExport = function (node) {
+ this.next();
+ // export * from '...'
+ if (this.match(_types.types.star)) {
+ var specifier = this.startNode();
+ this.next();
+ if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) {
+ specifier.exported = this.parseIdentifier();
+ node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")];
+ this.parseExportSpecifiersMaybe(node);
+ this.parseExportFrom(node, true);
+ } else {
+ this.parseExportFrom(node, true);
+ return this.finishNode(node, "ExportAllDeclaration");
+ }
+ } else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) {
+ var _specifier = this.startNode();
+ _specifier.exported = this.parseIdentifier(true);
+ node.specifiers = [this.finishNode(_specifier, "ExportDefaultSpecifier")];
+ if (this.match(_types.types.comma) && this.lookahead().type === _types.types.star) {
+ this.expect(_types.types.comma);
+ var _specifier2 = this.startNode();
+ this.expect(_types.types.star);
+ this.expectContextual("as");
+ _specifier2.exported = this.parseIdentifier();
+ node.specifiers.push(this.finishNode(_specifier2, "ExportNamespaceSpecifier"));
+ } else {
+ this.parseExportSpecifiersMaybe(node);
+ }
+ this.parseExportFrom(node, true);
+ } else if (this.eat(_types.types._default)) {
+ // export default ...
+ var expr = this.startNode();
+ var needsSemi = false;
+ if (this.eat(_types.types._function)) {
+ expr = this.parseFunction(expr, true, false, false, true);
+ } else if (this.match(_types.types._class)) {
+ expr = this.parseClass(expr, true, true);
+ } else {
+ needsSemi = true;
+ expr = this.parseMaybeAssign();
+ }
+ node.declaration = expr;
+ if (needsSemi) this.semicolon();
+ this.checkExport(node);
+ return this.finishNode(node, "ExportDefaultDeclaration");
+ } else if (this.state.type.keyword || this.shouldParseExportDeclaration()) {
+ node.specifiers = [];
+ node.source = null;
+ node.declaration = this.parseExportDeclaration(node);
+ } else {
+ // export { x, y as z } [from '...']
+ node.declaration = null;
+ node.specifiers = this.parseExportSpecifiers();
+ this.parseExportFrom(node);
+ }
+ this.checkExport(node);
+ return this.finishNode(node, "ExportNamedDeclaration");
+ };
+
+ pp.parseExportDeclaration = function () {
+ return this.parseStatement(true);
+ };
+
+ pp.isExportDefaultSpecifier = function () {
+ if (this.match(_types.types.name)) {
+ return this.state.value !== "type" && this.state.value !== "async" && this.state.value !== "interface";
+ }
+
+ if (!this.match(_types.types._default)) {
+ return false;
+ }
+
+ var lookahead = this.lookahead();
+ return lookahead.type === _types.types.comma || lookahead.type === _types.types.name && lookahead.value === "from";
+ };
+
+ pp.parseExportSpecifiersMaybe = function (node) {
+ if (this.eat(_types.types.comma)) {
+ node.specifiers = node.specifiers.concat(this.parseExportSpecifiers());
+ }
+ };
+
+ pp.parseExportFrom = function (node, expect) {
+ if (this.eatContextual("from")) {
+ node.source = this.match(_types.types.string) ? this.parseExprAtom() : this.unexpected();
+ this.checkExport(node);
+ } else {
+ if (expect) {
+ this.unexpected();
+ } else {
+ node.source = null;
+ }
+ }
+
+ this.semicolon();
+ };
+
+ pp.shouldParseExportDeclaration = function () {
+ return this.hasPlugin("asyncFunctions") && this.isContextual("async");
+ };
+
+ pp.checkExport = function (node) {
+ if (this.state.decorators.length) {
+ var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
+ if (!node.declaration || !isClass) {
+ this.raise(node.start, "You can only use decorators on an export when exporting a class");
+ }
+ this.takeDecorators(node.declaration);
+ }
+ };
+
+ // Parses a comma-separated list of module exports.
+
+ pp.parseExportSpecifiers = function () {
+ var nodes = [];
+ var first = true;
+ var needsFrom = void 0;
+
+ // export { x, y as z } [from '...']
+ this.expect(_types.types.braceL);
+
+ while (!this.eat(_types.types.braceR)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_types.types.comma);
+ if (this.eat(_types.types.braceR)) break;
+ }
+
+ var isDefault = this.match(_types.types._default);
+ if (isDefault && !needsFrom) needsFrom = true;
+
+ var node = this.startNode();
+ node.local = this.parseIdentifier(isDefault);
+ node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
+ nodes.push(this.finishNode(node, "ExportSpecifier"));
+ }
+
+ // https://github.com/ember-cli/ember-cli/pull/3739
+ if (needsFrom && !this.isContextual("from")) {
+ this.unexpected();
+ }
+
+ return nodes;
+ };
+
+ // Parses import declaration.
+
+ pp.parseImport = function (node) {
+ this.next();
+
+ // import '...'
+ if (this.match(_types.types.string)) {
+ node.specifiers = [];
+ node.source = this.parseExprAtom();
+ } else {
+ node.specifiers = [];
+ this.parseImportSpecifiers(node);
+ this.expectContextual("from");
+ node.source = this.match(_types.types.string) ? this.parseExprAtom() : this.unexpected();
+ }
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+ };
+
+ // Parses a comma-separated list of module imports.
+
+ pp.parseImportSpecifiers = function (node) {
+ var first = true;
+ if (this.match(_types.types.name)) {
+ // import defaultObj, { x, y as z } from '...'
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc));
+ if (!this.eat(_types.types.comma)) return;
+ }
+
+ if (this.match(_types.types.star)) {
+ var specifier = this.startNode();
+ this.next();
+ this.expectContextual("as");
+ specifier.local = this.parseIdentifier();
+ this.checkLVal(specifier.local, true);
+ node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier"));
+ return;
+ }
+
+ this.expect(_types.types.braceL);
+ while (!this.eat(_types.types.braceR)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_types.types.comma);
+ if (this.eat(_types.types.braceR)) break;
+ }
+
+ var _specifier3 = this.startNode();
+ _specifier3.imported = this.parseIdentifier(true);
+ _specifier3.local = this.eatContextual("as") ? this.parseIdentifier() : _specifier3.imported.__clone();
+ this.checkLVal(_specifier3.local, true);
+ node.specifiers.push(this.finishNode(_specifier3, "ImportSpecifier"));
+ }
+ };
+
+ pp.parseImportSpecifierDefault = function (id, startPos, startLoc) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.local = id;
+ this.checkLVal(node.local, true);
+ return this.finishNode(node, "ImportDefaultSpecifier");
+ };
+
+ /***/ },
+ /* 8118 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ "use strict";
+
+ var _types = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _index = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ var _whitespace = __webpack_require__(__webpack_module_template_argument_2__);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var pp = _index2.default.prototype;
+
+ // ## Parser utilities
+
+ // TODO
+
+ pp.addExtra = function (node, key, val) {
+ if (!node) return;
+
+ var extra = node.extra = node.extra || {};
+ extra[key] = val;
+ };
+
+ // TODO
+
+ pp.isRelational = function (op) {
+ return this.match(_types.types.relational) && this.state.value === op;
+ };
+
+ // TODO
+
+ pp.expectRelational = function (op) {
+ if (this.isRelational(op)) {
+ this.next();
+ } else {
+ this.unexpected();
+ }
+ };
+
+ // Tests whether parsed token is a contextual keyword.
+
+ pp.isContextual = function (name) {
+ return this.match(_types.types.name) && this.state.value === name;
+ };
+
+ // Consumes contextual keyword if possible.
+
+ pp.eatContextual = function (name) {
+ return this.state.value === name && this.eat(_types.types.name);
+ };
+
+ // Asserts that following token is given contextual keyword.
+
+ pp.expectContextual = function (name) {
+ if (!this.eatContextual(name)) this.unexpected();
+ };
+
+ // Test whether a semicolon can be inserted at the current position.
+
+ pp.canInsertSemicolon = function () {
+ return this.match(_types.types.eof) || this.match(_types.types.braceR) || _whitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
+ };
+
+ // TODO
+
+ pp.isLineTerminator = function () {
+ return this.eat(_types.types.semi) || this.canInsertSemicolon();
+ };
+
+ // Consume a semicolon, or, failing that, see if we are allowed to
+ // pretend that there is a semicolon at this position.
+
+ pp.semicolon = function () {
+ if (!this.isLineTerminator()) this.unexpected();
+ };
+
+ // Expect a token of a given type. If found, consume it, otherwise,
+ // raise an unexpected token error.
+
+ pp.expect = function (type) {
+ return this.eat(type) || this.unexpected();
+ };
+
+ // Raise an unexpected token error.
+
+ pp.unexpected = function (pos) {
+ this.raise(pos != null ? pos : this.state.start, "Unexpected token");
+ };
+
+ /***/ },
+ /* 8119 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ exports.default = function (instance) {
+ // plain function return types: function name(): string {}
+ instance.extend("parseFunctionBody", function (inner) {
+ return function (node, allowExpression) {
+ if (this.match(_types.types.colon) && !allowExpression) {
+ // if allowExpression is true then we're parsing an arrow function and if
+ // there's a return type then it's been handled elsewhere
+ node.returnType = this.flowParseTypeAnnotation();
+ }
+
+ return inner.call(this, node, allowExpression);
+ };
+ });
+
+ // interfaces
+ instance.extend("parseStatement", function (inner) {
+ return function (declaration, topLevel) {
+ // strict mode handling of `interface` since it's a reserved word
+ if (this.state.strict && this.match(_types.types.name) && this.state.value === "interface") {
+ var node = this.startNode();
+ this.next();
+ return this.flowParseInterface(node);
+ } else {
+ return inner.call(this, declaration, topLevel);
+ }
+ };
+ });
+
+ // declares, interfaces and type aliases
+ instance.extend("parseExpressionStatement", function (inner) {
+ return function (node, expr) {
+ if (expr.type === "Identifier") {
+ if (expr.name === "declare") {
+ if (this.match(_types.types._class) || this.match(_types.types.name) || this.match(_types.types._function) || this.match(_types.types._var)) {
+ return this.flowParseDeclare(node);
+ }
+ } else if (this.match(_types.types.name)) {
+ if (expr.name === "interface") {
+ return this.flowParseInterface(node);
+ } else if (expr.name === "type") {
+ return this.flowParseTypeAlias(node);
+ }
+ }
+ }
+
+ return inner.call(this, node, expr);
+ };
+ });
+
+ // export type
+ instance.extend("shouldParseExportDeclaration", function (inner) {
+ return function () {
+ return this.isContextual("type") || this.isContextual("interface") || inner.call(this);
+ };
+ });
+
+ instance.extend("parseParenItem", function () {
+ return function (node, startLoc, startPos, forceArrow) {
+ var canBeArrow = this.state.potentialArrowAt = startPos;
+ if (this.match(_types.types.colon)) {
+ var typeCastNode = this.startNodeAt(startLoc, startPos);
+ typeCastNode.expression = node;
+ typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
+
+ if (forceArrow && !this.match(_types.types.arrow)) {
+ this.unexpected();
+ }
+
+ if (canBeArrow && this.eat(_types.types.arrow)) {
+ // ((lol): number => {});
+ var params = node.type === "SequenceExpression" ? node.expressions : [node];
+ var func = this.parseArrowExpression(this.startNodeAt(startLoc, startPos), params);
+ func.returnType = typeCastNode.typeAnnotation;
+ return func;
+ } else {
+ return this.finishNode(typeCastNode, "TypeCastExpression");
+ }
+ } else {
+ return node;
+ }
+ };
+ });
+
+ instance.extend("parseExport", function (inner) {
+ return function (node) {
+ node = inner.call(this, node);
+ if (node.type === "ExportNamedDeclaration") {
+ node.exportKind = node.exportKind || "value";
+ }
+ return node;
+ };
+ });
+
+ instance.extend("parseExportDeclaration", function (inner) {
+ return function (node) {
+ if (this.isContextual("type")) {
+ node.exportKind = "type";
+
+ var declarationNode = this.startNode();
+ this.next();
+
+ if (this.match(_types.types.braceL)) {
+ // export type { foo, bar };
+ node.specifiers = this.parseExportSpecifiers();
+ this.parseExportFrom(node);
+ return null;
+ } else {
+ // export type Foo = Bar;
+ return this.flowParseTypeAlias(declarationNode);
+ }
+ } else if (this.isContextual("interface")) {
+ node.exportKind = "type";
+ var _declarationNode = this.startNode();
+ this.next();
+ return this.flowParseInterface(_declarationNode);
+ } else {
+ return inner.call(this, node);
+ }
+ };
+ });
+
+ instance.extend("parseClassId", function (inner) {
+ return function (node) {
+ inner.apply(this, arguments);
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+ };
+ });
+
+ // don't consider `void` to be a keyword as then it'll use the void token type
+ // and set startExpr
+ instance.extend("isKeyword", function (inner) {
+ return function (name) {
+ if (this.state.inType && name === "void") {
+ return false;
+ } else {
+ return inner.call(this, name);
+ }
+ };
+ });
+
+ // ensure that inside flow types, we bypass the jsx parser plugin
+ instance.extend("readToken", function (inner) {
+ return function (code) {
+ if (this.state.inType && (code === 62 || code === 60)) {
+ return this.finishOp(_types.types.relational, 1);
+ } else {
+ return inner.call(this, code);
+ }
+ };
+ });
+
+ // don't lex any token as a jsx one inside a flow type
+ instance.extend("jsx_readToken", function (inner) {
+ return function () {
+ if (!this.state.inType) return inner.call(this);
+ };
+ });
+
+ function typeCastToParameter(node) {
+ node.expression.typeAnnotation = node.typeAnnotation;
+ return node.expression;
+ }
+
+ instance.extend("toAssignable", function (inner) {
+ return function (node) {
+ if (node.type === "TypeCastExpression") {
+ return typeCastToParameter(node);
+ } else {
+ return inner.apply(this, arguments);
+ }
+ };
+ });
+
+ // turn type casts that we found in function parameter head into type annotated params
+ instance.extend("toAssignableList", function (inner) {
+ return function (exprList, isBinding) {
+ for (var i = 0; i < exprList.length; i++) {
+ var expr = exprList[i];
+ if (expr && expr.type === "TypeCastExpression") {
+ exprList[i] = typeCastToParameter(expr);
+ }
+ }
+ return inner.call(this, exprList, isBinding);
+ };
+ });
+
+ // this is a list of nodes, from something like a call expression, we need to filter the
+ // type casts that we've found that are illegal in this context
+ instance.extend("toReferencedList", function () {
+ return function (exprList) {
+ for (var i = 0; i < exprList.length; i++) {
+ var expr = exprList[i];
+ if (expr && expr._exprListItem && expr.type === "TypeCastExpression") {
+ this.raise(expr.start, "Unexpected type cast");
+ }
+ }
+
+ return exprList;
+ };
+ });
+
+ // parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents
+ // the position where this function is cal;ed
+ instance.extend("parseExprListItem", function (inner) {
+ return function (allowEmpty, refShorthandDefaultPos) {
+ var container = this.startNode();
+ var node = inner.call(this, allowEmpty, refShorthandDefaultPos);
+ if (this.match(_types.types.colon)) {
+ container._exprListItem = true;
+ container.expression = node;
+ container.typeAnnotation = this.flowParseTypeAnnotation();
+ return this.finishNode(container, "TypeCastExpression");
+ } else {
+ return node;
+ }
+ };
+ });
+
+ instance.extend("checkLVal", function (inner) {
+ return function (node) {
+ if (node.type !== "TypeCastExpression") {
+ return inner.apply(this, arguments);
+ }
+ };
+ });
+
+ // parse class property type annotations
+ instance.extend("parseClassProperty", function (inner) {
+ return function (node) {
+ if (this.match(_types.types.colon)) {
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ }
+ return inner.call(this, node);
+ };
+ });
+
+ // determine whether or not we're currently in the position where a class property would appear
+ instance.extend("isClassProperty", function (inner) {
+ return function () {
+ return this.match(_types.types.colon) || inner.call(this);
+ };
+ });
+
+ // parse type parameters for class methods
+ instance.extend("parseClassMethod", function () {
+ return function (classBody, method, isGenerator, isAsync) {
+ if (this.isRelational("<")) {
+ method.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+ this.parseMethod(method, isGenerator, isAsync);
+ classBody.body.push(this.finishNode(method, "ClassMethod"));
+ };
+ });
+
+ // parse a the super class type parameters and implements
+ instance.extend("parseClassSuper", function (inner) {
+ return function (node, isStatement) {
+ inner.call(this, node, isStatement);
+ if (node.superClass && this.isRelational("<")) {
+ node.superTypeParameters = this.flowParseTypeParameterInstantiation();
+ }
+ if (this.isContextual("implements")) {
+ this.next();
+ var implemented = node.implements = [];
+ do {
+ var _node = this.startNode();
+ _node.id = this.parseIdentifier();
+ if (this.isRelational("<")) {
+ _node.typeParameters = this.flowParseTypeParameterInstantiation();
+ } else {
+ _node.typeParameters = null;
+ }
+ implemented.push(this.finishNode(_node, "ClassImplements"));
+ } while (this.eat(_types.types.comma));
+ }
+ };
+ });
+
+ // parse type parameters for object method shorthand
+ instance.extend("parseObjPropValue", function (inner) {
+ return function (prop) {
+ var typeParameters = void 0;
+
+ // method shorthand
+ if (this.isRelational("<")) {
+ typeParameters = this.flowParseTypeParameterDeclaration();
+ if (!this.match(_types.types.parenL)) this.unexpected();
+ }
+
+ inner.apply(this, arguments);
+
+ // add typeParameters if we found them
+ if (typeParameters) {
+ (prop.value || prop).typeParameters = typeParameters;
+ }
+ };
+ });
+
+ instance.extend("parseAssignableListItemTypes", function () {
+ return function (param) {
+ if (this.eat(_types.types.question)) {
+ param.optional = true;
+ }
+ if (this.match(_types.types.colon)) {
+ param.typeAnnotation = this.flowParseTypeAnnotation();
+ }
+ this.finishNode(param, param.type);
+ return param;
+ };
+ });
+
+ // parse typeof and type imports
+ instance.extend("parseImportSpecifiers", function (inner) {
+ return function (node) {
+ node.importKind = "value";
+
+ var kind = null;
+ if (this.match(_types.types._typeof)) {
+ kind = "typeof";
+ } else if (this.isContextual("type")) {
+ kind = "type";
+ }
+ if (kind) {
+ var lh = this.lookahead();
+ if (lh.type === _types.types.name && lh.value !== "from" || lh.type === _types.types.braceL || lh.type === _types.types.star) {
+ this.next();
+ node.importKind = kind;
+ }
+ }
+
+ inner.call(this, node);
+ };
+ });
+
+ // parse function type parameters - function foo() {}
+ instance.extend("parseFunctionParams", function (inner) {
+ return function (node) {
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+ inner.call(this, node);
+ };
+ });
+
+ // parse flow type annotations on variable declarator heads - let foo: string = bar
+ instance.extend("parseVarHead", function (inner) {
+ return function (decl) {
+ inner.call(this, decl);
+ if (this.match(_types.types.colon)) {
+ decl.id.typeAnnotation = this.flowParseTypeAnnotation();
+ this.finishNode(decl.id, decl.id.type);
+ }
+ };
+ });
+
+ // parse the return type of an async arrow function - let foo = (async (): number => {});
+ instance.extend("parseAsyncArrowFromCallExpression", function (inner) {
+ return function (node, call) {
+ if (this.match(_types.types.colon)) {
+ node.returnType = this.flowParseTypeAnnotation();
+ }
+
+ return inner.call(this, node, call);
+ };
+ });
+
+ // todo description
+ instance.extend("shouldParseAsyncArrow", function (inner) {
+ return function () {
+ return this.match(_types.types.colon) || inner.call(this);
+ };
+ });
+
+ // handle return types for arrow functions
+ instance.extend("parseParenAndDistinguishExpression", function (inner) {
+ return function (startPos, startLoc, canBeArrow, isAsync) {
+ startPos = startPos || this.state.start;
+ startLoc = startLoc || this.state.startLoc;
+
+ if (canBeArrow && this.lookahead().type === _types.types.parenR) {
+ // let foo = (): number => {};
+ this.expect(_types.types.parenL);
+ this.expect(_types.types.parenR);
+
+ var node = this.startNodeAt(startPos, startLoc);
+ if (this.match(_types.types.colon)) node.returnType = this.flowParseTypeAnnotation();
+ this.expect(_types.types.arrow);
+ return this.parseArrowExpression(node, [], isAsync);
+ } else {
+ // let foo = (foo): number => {};
+ var _node2 = inner.call(this, startPos, startLoc, canBeArrow, isAsync, this.hasPlugin("trailingFunctionCommas"));
+
+ if (this.match(_types.types.colon)) {
+ var state = this.state.clone();
+ try {
+ return this.parseParenItem(_node2, startPos, startLoc, true);
+ } catch (err) {
+ if (err instanceof SyntaxError) {
+ this.state = state;
+ return _node2;
+ } else {
+ throw err;
+ }
+ }
+ } else {
+ return _node2;
+ }
+ }
+ };
+ });
+ };
+
+ var _types = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _parser = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _parser2 = _interopRequireDefault(_parser);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* eslint indent: 0 */
+ /* eslint max-len: 0 */
+
+ var pp = _parser2.default.prototype;
+
+ pp.flowParseTypeInitialiser = function (tok, allowLeadingPipeOrAnd) {
+ var oldInType = this.state.inType;
+ this.state.inType = true;
+ this.expect(tok || _types.types.colon);
+ if (allowLeadingPipeOrAnd) {
+ if (this.match(_types.types.bitwiseAND) || this.match(_types.types.bitwiseOR)) {
+ this.next();
+ }
+ }
+ var type = this.flowParseType();
+ this.state.inType = oldInType;
+ return type;
+ };
+
+ pp.flowParseDeclareClass = function (node) {
+ this.next();
+ this.flowParseInterfaceish(node, true);
+ return this.finishNode(node, "DeclareClass");
+ };
+
+ pp.flowParseDeclareFunction = function (node) {
+ this.next();
+
+ var id = node.id = this.parseIdentifier();
+
+ var typeNode = this.startNode();
+ var typeContainer = this.startNode();
+
+ if (this.isRelational("<")) {
+ typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ typeNode.typeParameters = null;
+ }
+
+ this.expect(_types.types.parenL);
+ var tmp = this.flowParseFunctionTypeParams();
+ typeNode.params = tmp.params;
+ typeNode.rest = tmp.rest;
+ this.expect(_types.types.parenR);
+ typeNode.returnType = this.flowParseTypeInitialiser();
+
+ typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
+ id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
+
+ this.finishNode(id, id.type);
+
+ this.semicolon();
+
+ return this.finishNode(node, "DeclareFunction");
+ };
+
+ pp.flowParseDeclare = function (node) {
+ if (this.match(_types.types._class)) {
+ return this.flowParseDeclareClass(node);
+ } else if (this.match(_types.types._function)) {
+ return this.flowParseDeclareFunction(node);
+ } else if (this.match(_types.types._var)) {
+ return this.flowParseDeclareVariable(node);
+ } else if (this.isContextual("module")) {
+ return this.flowParseDeclareModule(node);
+ } else if (this.isContextual("type")) {
+ return this.flowParseDeclareTypeAlias(node);
+ } else if (this.isContextual("interface")) {
+ return this.flowParseDeclareInterface(node);
+ } else {
+ this.unexpected();
+ }
+ };
+
+ pp.flowParseDeclareVariable = function (node) {
+ this.next();
+ node.id = this.flowParseTypeAnnotatableIdentifier();
+ this.semicolon();
+ return this.finishNode(node, "DeclareVariable");
+ };
+
+ pp.flowParseDeclareModule = function (node) {
+ this.next();
+
+ if (this.match(_types.types.string)) {
+ node.id = this.parseExprAtom();
+ } else {
+ node.id = this.parseIdentifier();
+ }
+
+ var bodyNode = node.body = this.startNode();
+ var body = bodyNode.body = [];
+ this.expect(_types.types.braceL);
+ while (!this.match(_types.types.braceR)) {
+ var node2 = this.startNode();
+
+ // todo: declare check
+ this.next();
+
+ body.push(this.flowParseDeclare(node2));
+ }
+ this.expect(_types.types.braceR);
+
+ this.finishNode(bodyNode, "BlockStatement");
+ return this.finishNode(node, "DeclareModule");
+ };
+
+ pp.flowParseDeclareTypeAlias = function (node) {
+ this.next();
+ this.flowParseTypeAlias(node);
+ return this.finishNode(node, "DeclareTypeAlias");
+ };
+
+ pp.flowParseDeclareInterface = function (node) {
+ this.next();
+ this.flowParseInterfaceish(node);
+ return this.finishNode(node, "DeclareInterface");
+ };
+
+ // Interfaces
+
+ pp.flowParseInterfaceish = function (node, allowStatic) {
+ node.id = this.parseIdentifier();
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.extends = [];
+ node.mixins = [];
+
+ if (this.eat(_types.types._extends)) {
+ do {
+ node.extends.push(this.flowParseInterfaceExtends());
+ } while (this.eat(_types.types.comma));
+ }
+
+ if (this.isContextual("mixins")) {
+ this.next();
+ do {
+ node.mixins.push(this.flowParseInterfaceExtends());
+ } while (this.eat(_types.types.comma));
+ }
+
+ node.body = this.flowParseObjectType(allowStatic);
+ };
+
+ pp.flowParseInterfaceExtends = function () {
+ var node = this.startNode();
+
+ node.id = this.parseIdentifier();
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ } else {
+ node.typeParameters = null;
+ }
+
+ return this.finishNode(node, "InterfaceExtends");
+ };
+
+ pp.flowParseInterface = function (node) {
+ this.flowParseInterfaceish(node, false);
+ return this.finishNode(node, "InterfaceDeclaration");
+ };
+
+ // Type aliases
+
+ pp.flowParseTypeAlias = function (node) {
+ node.id = this.parseIdentifier();
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.right = this.flowParseTypeInitialiser(_types.types.eq,
+ /*allowLeadingPipeOrAnd*/true);
+ this.semicolon();
+
+ return this.finishNode(node, "TypeAlias");
+ };
+
+ // Type annotations
+
+ pp.flowParseTypeParameterDeclaration = function () {
+ var node = this.startNode();
+ node.params = [];
+
+ this.expectRelational("<");
+ while (!this.isRelational(">")) {
+ node.params.push(this.flowParseExistentialTypeParam() || this.flowParseTypeAnnotatableIdentifier());
+ if (!this.isRelational(">")) {
+ this.expect(_types.types.comma);
+ }
+ }
+ this.expectRelational(">");
+
+ return this.finishNode(node, "TypeParameterDeclaration");
+ };
+
+ pp.flowParseExistentialTypeParam = function () {
+ if (this.match(_types.types.star)) {
+ var node = this.startNode();
+ this.next();
+ return this.finishNode(node, "ExistentialTypeParam");
+ }
+ };
+
+ pp.flowParseTypeParameterInstantiation = function () {
+ var node = this.startNode(),
+ oldInType = this.state.inType;
+ node.params = [];
+
+ this.state.inType = true;
+
+ this.expectRelational("<");
+ while (!this.isRelational(">")) {
+ node.params.push(this.flowParseExistentialTypeParam() || this.flowParseType());
+ if (!this.isRelational(">")) {
+ this.expect(_types.types.comma);
+ }
+ }
+ this.expectRelational(">");
+
+ this.state.inType = oldInType;
+
+ return this.finishNode(node, "TypeParameterInstantiation");
+ };
+
+ pp.flowParseObjectPropertyKey = function () {
+ return this.match(_types.types.num) || this.match(_types.types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
+ };
+
+ pp.flowParseObjectTypeIndexer = function (node, isStatic) {
+ node.static = isStatic;
+
+ this.expect(_types.types.bracketL);
+ node.id = this.flowParseObjectPropertyKey();
+ node.key = this.flowParseTypeInitialiser();
+ this.expect(_types.types.bracketR);
+ node.value = this.flowParseTypeInitialiser();
+
+ this.flowObjectTypeSemicolon();
+ return this.finishNode(node, "ObjectTypeIndexer");
+ };
+
+ pp.flowParseObjectTypeMethodish = function (node) {
+ node.params = [];
+ node.rest = null;
+ node.typeParameters = null;
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ this.expect(_types.types.parenL);
+ while (this.match(_types.types.name)) {
+ node.params.push(this.flowParseFunctionTypeParam());
+ if (!this.match(_types.types.parenR)) {
+ this.expect(_types.types.comma);
+ }
+ }
+
+ if (this.eat(_types.types.ellipsis)) {
+ node.rest = this.flowParseFunctionTypeParam();
+ }
+ this.expect(_types.types.parenR);
+ node.returnType = this.flowParseTypeInitialiser();
+
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ };
+
+ pp.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc));
+ node.static = isStatic;
+ node.key = key;
+ node.optional = false;
+ this.flowObjectTypeSemicolon();
+ return this.finishNode(node, "ObjectTypeProperty");
+ };
+
+ pp.flowParseObjectTypeCallProperty = function (node, isStatic) {
+ var valueNode = this.startNode();
+ node.static = isStatic;
+ node.value = this.flowParseObjectTypeMethodish(valueNode);
+ this.flowObjectTypeSemicolon();
+ return this.finishNode(node, "ObjectTypeCallProperty");
+ };
+
+ pp.flowParseObjectType = function (allowStatic) {
+ var nodeStart = this.startNode();
+ var node = void 0;
+ var propertyKey = void 0;
+ var isStatic = void 0;
+
+ nodeStart.callProperties = [];
+ nodeStart.properties = [];
+ nodeStart.indexers = [];
+
+ this.expect(_types.types.braceL);
+
+ while (!this.match(_types.types.braceR)) {
+ var optional = false;
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ node = this.startNode();
+ if (allowStatic && this.isContextual("static")) {
+ this.next();
+ isStatic = true;
+ }
+
+ if (this.match(_types.types.bracketL)) {
+ nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic));
+ } else if (this.match(_types.types.parenL) || this.isRelational("<")) {
+ nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, allowStatic));
+ } else {
+ if (isStatic && this.match(_types.types.colon)) {
+ propertyKey = this.parseIdentifier();
+ } else {
+ propertyKey = this.flowParseObjectPropertyKey();
+ }
+ if (this.isRelational("<") || this.match(_types.types.parenL)) {
+ // This is a method property
+ nodeStart.properties.push(this.flowParseObjectTypeMethod(startPos, startLoc, isStatic, propertyKey));
+ } else {
+ if (this.eat(_types.types.question)) {
+ optional = true;
+ }
+ node.key = propertyKey;
+ node.value = this.flowParseTypeInitialiser();
+ node.optional = optional;
+ node.static = isStatic;
+ this.flowObjectTypeSemicolon();
+ nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty"));
+ }
+ }
+ }
+
+ this.expect(_types.types.braceR);
+
+ return this.finishNode(nodeStart, "ObjectTypeAnnotation");
+ };
+
+ pp.flowObjectTypeSemicolon = function () {
+ if (!this.eat(_types.types.semi) && !this.eat(_types.types.comma) && !this.match(_types.types.braceR)) {
+ this.unexpected();
+ }
+ };
+
+ pp.flowParseGenericType = function (startPos, startLoc, id) {
+ var node = this.startNodeAt(startPos, startLoc);
+
+ node.typeParameters = null;
+ node.id = id;
+
+ while (this.eat(_types.types.dot)) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ node2.qualification = node.id;
+ node2.id = this.parseIdentifier();
+ node.id = this.finishNode(node2, "QualifiedTypeIdentifier");
+ }
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ }
+
+ return this.finishNode(node, "GenericTypeAnnotation");
+ };
+
+ pp.flowParseTypeofType = function () {
+ var node = this.startNode();
+ this.expect(_types.types._typeof);
+ node.argument = this.flowParsePrimaryType();
+ return this.finishNode(node, "TypeofTypeAnnotation");
+ };
+
+ pp.flowParseTupleType = function () {
+ var node = this.startNode();
+ node.types = [];
+ this.expect(_types.types.bracketL);
+ // We allow trailing commas
+ while (this.state.pos < this.input.length && !this.match(_types.types.bracketR)) {
+ node.types.push(this.flowParseType());
+ if (this.match(_types.types.bracketR)) break;
+ this.expect(_types.types.comma);
+ }
+ this.expect(_types.types.bracketR);
+ return this.finishNode(node, "TupleTypeAnnotation");
+ };
+
+ pp.flowParseFunctionTypeParam = function () {
+ var optional = false;
+ var node = this.startNode();
+ node.name = this.parseIdentifier();
+ if (this.eat(_types.types.question)) {
+ optional = true;
+ }
+ node.optional = optional;
+ node.typeAnnotation = this.flowParseTypeInitialiser();
+ return this.finishNode(node, "FunctionTypeParam");
+ };
+
+ pp.flowParseFunctionTypeParams = function () {
+ var ret = { params: [], rest: null };
+ while (this.match(_types.types.name)) {
+ ret.params.push(this.flowParseFunctionTypeParam());
+ if (!this.match(_types.types.parenR)) {
+ this.expect(_types.types.comma);
+ }
+ }
+ if (this.eat(_types.types.ellipsis)) {
+ ret.rest = this.flowParseFunctionTypeParam();
+ }
+ return ret;
+ };
+
+ pp.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
+ switch (id.name) {
+ case "any":
+ return this.finishNode(node, "AnyTypeAnnotation");
+
+ case "void":
+ return this.finishNode(node, "VoidTypeAnnotation");
+
+ case "bool":
+ case "boolean":
+ return this.finishNode(node, "BooleanTypeAnnotation");
+
+ case "mixed":
+ return this.finishNode(node, "MixedTypeAnnotation");
+
+ case "number":
+ return this.finishNode(node, "NumberTypeAnnotation");
+
+ case "string":
+ return this.finishNode(node, "StringTypeAnnotation");
+
+ default:
+ return this.flowParseGenericType(startPos, startLoc, id);
+ }
+ };
+
+ // The parsing of types roughly parallels the parsing of expressions, and
+ // primary types are kind of like primary expressions...they're the
+ // primitives with which other types are constructed.
+ pp.flowParsePrimaryType = function () {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var node = this.startNode();
+ var tmp = void 0;
+ var type = void 0;
+ var isGroupedType = false;
+
+ switch (this.state.type) {
+ case _types.types.name:
+ return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
+
+ case _types.types.braceL:
+ return this.flowParseObjectType();
+
+ case _types.types.bracketL:
+ return this.flowParseTupleType();
+
+ case _types.types.relational:
+ if (this.state.value === "<") {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ this.expect(_types.types.parenL);
+ tmp = this.flowParseFunctionTypeParams();
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+ this.expect(_types.types.parenR);
+
+ this.expect(_types.types.arrow);
+
+ node.returnType = this.flowParseType();
+
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+
+ case _types.types.parenL:
+ this.next();
+
+ // Check to see if this is actually a grouped type
+ if (!this.match(_types.types.parenR) && !this.match(_types.types.ellipsis)) {
+ if (this.match(_types.types.name)) {
+ var token = this.lookahead().type;
+ isGroupedType = token !== _types.types.question && token !== _types.types.colon;
+ } else {
+ isGroupedType = true;
+ }
+ }
+
+ if (isGroupedType) {
+ type = this.flowParseType();
+ this.expect(_types.types.parenR);
+
+ // If we see a => next then someone was probably confused about
+ // function types, so we can provide a better error message
+ if (this.eat(_types.types.arrow)) {
+ this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType");
+ }
+
+ return type;
+ }
+
+ tmp = this.flowParseFunctionTypeParams();
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+
+ this.expect(_types.types.parenR);
+
+ this.expect(_types.types.arrow);
+
+ node.returnType = this.flowParseType();
+ node.typeParameters = null;
+
+ return this.finishNode(node, "FunctionTypeAnnotation");
+
+ case _types.types.string:
+ node.value = this.state.value;
+ this.addExtra(node, "rawValue", node.value);
+ this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
+ this.next();
+ return this.finishNode(node, "StringLiteralTypeAnnotation");
+
+ case _types.types._true:case _types.types._false:
+ node.value = this.match(_types.types._true);
+ this.next();
+ return this.finishNode(node, "BooleanLiteralTypeAnnotation");
+
+ case _types.types.num:
+ node.value = this.state.value;
+ this.addExtra(node, "rawValue", node.value);
+ this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
+ this.next();
+ return this.finishNode(node, "NumericLiteralTypeAnnotation");
+
+ case _types.types._null:
+ node.value = this.match(_types.types._null);
+ this.next();
+ return this.finishNode(node, "NullLiteralTypeAnnotation");
+
+ case _types.types._this:
+ node.value = this.match(_types.types._this);
+ this.next();
+ return this.finishNode(node, "ThisTypeAnnotation");
+
+ default:
+ if (this.state.type.keyword === "typeof") {
+ return this.flowParseTypeofType();
+ }
+ }
+
+ this.unexpected();
+ };
+
+ pp.flowParsePostfixType = function () {
+ var node = this.startNode();
+ var type = node.elementType = this.flowParsePrimaryType();
+ if (this.match(_types.types.bracketL)) {
+ this.expect(_types.types.bracketL);
+ this.expect(_types.types.bracketR);
+ return this.finishNode(node, "ArrayTypeAnnotation");
+ } else {
+ return type;
+ }
+ };
+
+ pp.flowParsePrefixType = function () {
+ var node = this.startNode();
+ if (this.eat(_types.types.question)) {
+ node.typeAnnotation = this.flowParsePrefixType();
+ return this.finishNode(node, "NullableTypeAnnotation");
+ } else {
+ return this.flowParsePostfixType();
+ }
+ };
+
+ pp.flowParseIntersectionType = function () {
+ var node = this.startNode();
+ var type = this.flowParsePrefixType();
+ node.types = [type];
+ while (this.eat(_types.types.bitwiseAND)) {
+ node.types.push(this.flowParsePrefixType());
+ }
+ return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
+ };
+
+ pp.flowParseUnionType = function () {
+ var node = this.startNode();
+ var type = this.flowParseIntersectionType();
+ node.types = [type];
+ while (this.eat(_types.types.bitwiseOR)) {
+ node.types.push(this.flowParseIntersectionType());
+ }
+ return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
+ };
+
+ pp.flowParseType = function () {
+ var oldInType = this.state.inType;
+ this.state.inType = true;
+ var type = this.flowParseUnionType();
+ this.state.inType = oldInType;
+ return type;
+ };
+
+ pp.flowParseTypeAnnotation = function () {
+ var node = this.startNode();
+ node.typeAnnotation = this.flowParseTypeInitialiser();
+ return this.finishNode(node, "TypeAnnotation");
+ };
+
+ pp.flowParseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) {
+ var variance = void 0;
+ if (this.match(_types.types.plusMin)) {
+ if (this.state.value === "+") {
+ variance = "plus";
+ } else if (this.state.value === "-") {
+ variance = "minus";
+ }
+ this.eat(_types.types.plusMin);
+ }
+
+ var ident = this.parseIdentifier();
+ var isOptionalParam = false;
+
+ if (variance) {
+ ident.variance = variance;
+ }
+
+ if (canBeOptionalParam && this.eat(_types.types.question)) {
+ this.expect(_types.types.question);
+ isOptionalParam = true;
+ }
+
+ if (requireTypeAnnotation || this.match(_types.types.colon)) {
+ ident.typeAnnotation = this.flowParseTypeAnnotation();
+ this.finishNode(ident, ident.type);
+ }
+
+ if (isOptionalParam) {
+ ident.optional = true;
+ this.finishNode(ident, ident.type);
+ }
+
+ return ident;
+ };
+
+ /***/ },
+ /* 8120 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ exports.default = function (instance) {
+ instance.extend("parseExprAtom", function (inner) {
+ return function (refShortHandDefaultPos) {
+ if (this.match(_types.types.jsxText)) {
+ var node = this.parseLiteral(this.state.value, "JSXText");
+ // https://github.com/babel/babel/issues/2078
+ node.extra = null;
+ return node;
+ } else if (this.match(_types.types.jsxTagStart)) {
+ return this.jsxParseElement();
+ } else {
+ return inner.call(this, refShortHandDefaultPos);
+ }
+ };
+ });
+
+ instance.extend("readToken", function (inner) {
+ return function (code) {
+ var context = this.curContext();
+
+ if (context === _context.types.j_expr) {
+ return this.jsxReadToken();
+ }
+
+ if (context === _context.types.j_oTag || context === _context.types.j_cTag) {
+ if ((0, _identifier.isIdentifierStart)(code)) {
+ return this.jsxReadWord();
+ }
+
+ if (code === 62) {
+ ++this.state.pos;
+ return this.finishToken(_types.types.jsxTagEnd);
+ }
+
+ if ((code === 34 || code === 39) && context === _context.types.j_oTag) {
+ return this.jsxReadString(code);
+ }
+ }
+
+ if (code === 60 && this.state.exprAllowed) {
+ ++this.state.pos;
+ return this.finishToken(_types.types.jsxTagStart);
+ }
+
+ return inner.call(this, code);
+ };
+ });
+
+ instance.extend("updateContext", function (inner) {
+ return function (prevType) {
+ if (this.match(_types.types.braceL)) {
+ var curContext = this.curContext();
+ if (curContext === _context.types.j_oTag) {
+ this.state.context.push(_context.types.b_expr);
+ } else if (curContext === _context.types.j_expr) {
+ this.state.context.push(_context.types.b_tmpl);
+ } else {
+ inner.call(this, prevType);
+ }
+ this.state.exprAllowed = true;
+ } else if (this.match(_types.types.slash) && prevType === _types.types.jsxTagStart) {
+ this.state.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
+ this.state.context.push(_context.types.j_cTag); // reconsider as closing tag context
+ this.state.exprAllowed = false;
+ } else {
+ return inner.call(this, prevType);
+ }
+ };
+ });
+ };
+
+ var _xhtml = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _xhtml2 = _interopRequireDefault(_xhtml);
+
+ var _types = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _context = __webpack_require__(__webpack_module_template_argument_2__);
+
+ var _parser = __webpack_require__(__webpack_module_template_argument_3__);
+
+ var _parser2 = _interopRequireDefault(_parser);
+
+ var _identifier = __webpack_require__(__webpack_module_template_argument_4__);
+
+ var _whitespace = __webpack_require__(__webpack_module_template_argument_5__);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* eslint indent: 0 */
+
+ var HEX_NUMBER = /^[\da-fA-F]+$/;
+ var DECIMAL_NUMBER = /^\d+$/;
+
+ _context.types.j_oTag = new _context.TokContext("... ", true, true);
+
+ _types.types.jsxName = new _types.TokenType("jsxName");
+ _types.types.jsxText = new _types.TokenType("jsxText", { beforeExpr: true });
+ _types.types.jsxTagStart = new _types.TokenType("jsxTagStart");
+ _types.types.jsxTagEnd = new _types.TokenType("jsxTagEnd");
+
+ _types.types.jsxTagStart.updateContext = function () {
+ this.state.context.push(_context.types.j_expr); // treat as beginning of JSX expression
+ this.state.context.push(_context.types.j_oTag); // start opening tag context
+ this.state.exprAllowed = false;
+ };
+
+ _types.types.jsxTagEnd.updateContext = function (prevType) {
+ var out = this.state.context.pop();
+ if (out === _context.types.j_oTag && prevType === _types.types.slash || out === _context.types.j_cTag) {
+ this.state.context.pop();
+ this.state.exprAllowed = this.curContext() === _context.types.j_expr;
+ } else {
+ this.state.exprAllowed = true;
+ }
+ };
+
+ var pp = _parser2.default.prototype;
+
+ // Reads inline JSX contents token.
+
+ pp.jsxReadToken = function () {
+ var out = "";
+ var chunkStart = this.state.pos;
+ for (;;) {
+ if (this.state.pos >= this.input.length) {
+ this.raise(this.state.start, "Unterminated JSX contents");
+ }
+
+ var ch = this.input.charCodeAt(this.state.pos);
+
+ switch (ch) {
+ case 60: // "<"
+ case 123:
+ // "{"
+ if (this.state.pos === this.state.start) {
+ if (ch === 60 && this.state.exprAllowed) {
+ ++this.state.pos;
+ return this.finishToken(_types.types.jsxTagStart);
+ }
+ return this.getTokenFromCode(ch);
+ }
+ out += this.input.slice(chunkStart, this.state.pos);
+ return this.finishToken(_types.types.jsxText, out);
+
+ case 38:
+ // "&"
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ break;
+
+ default:
+ if ((0, _whitespace.isNewLine)(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(true);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+ }
+ }
+ };
+
+ pp.jsxReadNewLine = function (normalizeCRLF) {
+ var ch = this.input.charCodeAt(this.state.pos);
+ var out = void 0;
+ ++this.state.pos;
+ if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
+ ++this.state.pos;
+ out = normalizeCRLF ? "\n" : "\r\n";
+ } else {
+ out = String.fromCharCode(ch);
+ }
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+
+ return out;
+ };
+
+ pp.jsxReadString = function (quote) {
+ var out = "";
+ var chunkStart = ++this.state.pos;
+ for (;;) {
+ if (this.state.pos >= this.input.length) {
+ this.raise(this.state.start, "Unterminated string constant");
+ }
+
+ var ch = this.input.charCodeAt(this.state.pos);
+ if (ch === quote) break;
+ if (ch === 38) {
+ // "&"
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ } else if ((0, _whitespace.isNewLine)(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(false);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+ }
+ out += this.input.slice(chunkStart, this.state.pos++);
+ return this.finishToken(_types.types.string, out);
+ };
+
+ pp.jsxReadEntity = function () {
+ var str = "";
+ var count = 0;
+ var entity = void 0;
+ var ch = this.input[this.state.pos];
+
+ var startPos = ++this.state.pos;
+ while (this.state.pos < this.input.length && count++ < 10) {
+ ch = this.input[this.state.pos++];
+ if (ch === ";") {
+ if (str[0] === "#") {
+ if (str[1] === "x") {
+ str = str.substr(2);
+ if (HEX_NUMBER.test(str)) entity = String.fromCharCode(parseInt(str, 16));
+ } else {
+ str = str.substr(1);
+ if (DECIMAL_NUMBER.test(str)) entity = String.fromCharCode(parseInt(str, 10));
+ }
+ } else {
+ entity = _xhtml2.default[str];
+ }
+ break;
+ }
+ str += ch;
+ }
+ if (!entity) {
+ this.state.pos = startPos;
+ return "&";
+ }
+ return entity;
+ };
+
+ // Read a JSX identifier (valid tag or attribute name).
+ //
+ // Optimized version since JSX identifiers can"t contain
+ // escape characters and so can be read as single slice.
+ // Also assumes that first character was already checked
+ // by isIdentifierStart in readToken.
+
+ pp.jsxReadWord = function () {
+ var ch = void 0;
+ var start = this.state.pos;
+ do {
+ ch = this.input.charCodeAt(++this.state.pos);
+ } while ((0, _identifier.isIdentifierChar)(ch) || ch === 45); // "-"
+ return this.finishToken(_types.types.jsxName, this.input.slice(start, this.state.pos));
+ };
+
+ // Transforms JSX element name to string.
+
+ function getQualifiedJSXName(object) {
+ if (object.type === "JSXIdentifier") {
+ return object.name;
+ }
+
+ if (object.type === "JSXNamespacedName") {
+ return object.namespace.name + ":" + object.name.name;
+ }
+
+ if (object.type === "JSXMemberExpression") {
+ return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
+ }
+ }
+
+ // Parse next token as JSX identifier
+
+ pp.jsxParseIdentifier = function () {
+ var node = this.startNode();
+ if (this.match(_types.types.jsxName)) {
+ node.name = this.state.value;
+ } else if (this.state.type.keyword) {
+ node.name = this.state.type.keyword;
+ } else {
+ this.unexpected();
+ }
+ this.next();
+ return this.finishNode(node, "JSXIdentifier");
+ };
+
+ // Parse namespaced identifier.
+
+ pp.jsxParseNamespacedName = function () {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var name = this.jsxParseIdentifier();
+ if (!this.eat(_types.types.colon)) return name;
+
+ var node = this.startNodeAt(startPos, startLoc);
+ node.namespace = name;
+ node.name = this.jsxParseIdentifier();
+ return this.finishNode(node, "JSXNamespacedName");
+ };
+
+ // Parses element name in any form - namespaced, member
+ // or single identifier.
+
+ pp.jsxParseElementName = function () {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var node = this.jsxParseNamespacedName();
+ while (this.eat(_types.types.dot)) {
+ var newNode = this.startNodeAt(startPos, startLoc);
+ newNode.object = node;
+ newNode.property = this.jsxParseIdentifier();
+ node = this.finishNode(newNode, "JSXMemberExpression");
+ }
+ return node;
+ };
+
+ // Parses any type of JSX attribute value.
+
+ pp.jsxParseAttributeValue = function () {
+ var node = void 0;
+ switch (this.state.type) {
+ case _types.types.braceL:
+ node = this.jsxParseExpressionContainer();
+ if (node.expression.type === "JSXEmptyExpression") {
+ this.raise(node.start, "JSX attributes must only be assigned a non-empty expression");
+ } else {
+ return node;
+ }
+
+ case _types.types.jsxTagStart:
+ case _types.types.string:
+ node = this.parseExprAtom();
+ node.extra = null;
+ return node;
+
+ default:
+ this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text");
+ }
+ };
+
+ // JSXEmptyExpression is unique type since it doesn't actually parse anything,
+ // and so it should start at the end of last read token (left brace) and finish
+ // at the beginning of the next one (right brace).
+
+ pp.jsxParseEmptyExpression = function () {
+ var node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
+ return this.finishNodeAt(node, "JSXEmptyExpression", this.start, this.startLoc);
+ };
+
+ // Parses JSX expression enclosed into curly brackets.
+
+ pp.jsxParseExpressionContainer = function () {
+ var node = this.startNode();
+ this.next();
+ if (this.match(_types.types.braceR)) {
+ node.expression = this.jsxParseEmptyExpression();
+ } else {
+ node.expression = this.parseExpression();
+ }
+ this.expect(_types.types.braceR);
+ return this.finishNode(node, "JSXExpressionContainer");
+ };
+
+ // Parses following JSX attribute name-value pair.
+
+ pp.jsxParseAttribute = function () {
+ var node = this.startNode();
+ if (this.eat(_types.types.braceL)) {
+ this.expect(_types.types.ellipsis);
+ node.argument = this.parseMaybeAssign();
+ this.expect(_types.types.braceR);
+ return this.finishNode(node, "JSXSpreadAttribute");
+ }
+ node.name = this.jsxParseNamespacedName();
+ node.value = this.eat(_types.types.eq) ? this.jsxParseAttributeValue() : null;
+ return this.finishNode(node, "JSXAttribute");
+ };
+
+ // Parses JSX opening tag starting after "<".
+
+ pp.jsxParseOpeningElementAt = function (startPos, startLoc) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.attributes = [];
+ node.name = this.jsxParseElementName();
+ while (!this.match(_types.types.slash) && !this.match(_types.types.jsxTagEnd)) {
+ node.attributes.push(this.jsxParseAttribute());
+ }
+ node.selfClosing = this.eat(_types.types.slash);
+ this.expect(_types.types.jsxTagEnd);
+ return this.finishNode(node, "JSXOpeningElement");
+ };
+
+ // Parses JSX closing tag starting after "".
+
+ pp.jsxParseClosingElementAt = function (startPos, startLoc) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.name = this.jsxParseElementName();
+ this.expect(_types.types.jsxTagEnd);
+ return this.finishNode(node, "JSXClosingElement");
+ };
+
+ // Parses entire JSX element, including it"s opening tag
+ // (starting after "<"), attributes, contents and closing tag.
+
+ pp.jsxParseElementAt = function (startPos, startLoc) {
+ var node = this.startNodeAt(startPos, startLoc);
+ var children = [];
+ var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
+ var closingElement = null;
+
+ if (!openingElement.selfClosing) {
+ contents: for (;;) {
+ switch (this.state.type) {
+ case _types.types.jsxTagStart:
+ startPos = this.state.start;startLoc = this.state.startLoc;
+ this.next();
+ if (this.eat(_types.types.slash)) {
+ closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
+ break contents;
+ }
+ children.push(this.jsxParseElementAt(startPos, startLoc));
+ break;
+
+ case _types.types.jsxText:
+ children.push(this.parseExprAtom());
+ break;
+
+ case _types.types.braceL:
+ children.push(this.jsxParseExpressionContainer());
+ break;
+
+ default:
+ this.unexpected();
+ }
+ }
+
+ if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
+ this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
+ }
+ }
+
+ node.openingElement = openingElement;
+ node.closingElement = closingElement;
+ node.children = children;
+ if (this.match(_types.types.relational) && this.state.value === "<") {
+ this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
+ }
+ return this.finishNode(node, "JSXElement");
+ };
+
+ // Parses entire JSX element from current position.
+
+ pp.jsxParseElement = function () {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ this.next();
+ return this.jsxParseElementAt(startPos, startLoc);
+ };
+
+ /***/ },
+ /* 8121 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.types = exports.TokContext = undefined;
+
+ var _classCallCheck2 = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+ var _types = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _whitespace = __webpack_require__(__webpack_module_template_argument_2__);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // 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 = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) {
+ (0, _classCallCheck3.default)(this, TokContext);
+
+ this.token = token;
+ this.isExpr = !!isExpr;
+ this.preserveSpace = !!preserveSpace;
+ this.override = override;
+ };
+
+ var types = exports.types = {
+ b_stat: new TokContext("{", false),
+ b_expr: new TokContext("{", true),
+ b_tmpl: new TokContext("${", true),
+ p_stat: new TokContext("(", false),
+ p_expr: new TokContext("(", true),
+ q_tmpl: new TokContext("`", true, true, function (p) {
+ return p.readTmplToken();
+ }),
+ f_expr: new TokContext("function", true)
+ };
+
+ // Token-specific context update code
+
+ _types.types.parenR.updateContext = _types.types.braceR.updateContext = function () {
+ if (this.state.context.length === 1) {
+ this.state.exprAllowed = true;
+ return;
+ }
+
+ var out = this.state.context.pop();
+ if (out === types.b_stat && this.curContext() === types.f_expr) {
+ this.state.context.pop();
+ this.state.exprAllowed = false;
+ } else if (out === types.b_tmpl) {
+ this.state.exprAllowed = true;
+ } else {
+ this.state.exprAllowed = !out.isExpr;
+ }
+ };
+
+ _types.types.name.updateContext = function (prevType) {
+ this.state.exprAllowed = false;
+
+ if (prevType === _types.types._let || prevType === _types.types._const || prevType === _types.types._var) {
+ if (_whitespace.lineBreak.test(this.input.slice(this.state.end))) {
+ this.state.exprAllowed = true;
+ }
+ }
+ };
+
+ _types.types.braceL.updateContext = function (prevType) {
+ this.state.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
+ this.state.exprAllowed = true;
+ };
+
+ _types.types.dollarBraceL.updateContext = function () {
+ this.state.context.push(types.b_tmpl);
+ this.state.exprAllowed = true;
+ };
+
+ _types.types.parenL.updateContext = function (prevType) {
+ var statementParens = prevType === _types.types._if || prevType === _types.types._for || prevType === _types.types._with || prevType === _types.types._while;
+ this.state.context.push(statementParens ? types.p_stat : types.p_expr);
+ this.state.exprAllowed = true;
+ };
+
+ _types.types.incDec.updateContext = function () {
+ // tokExprAllowed stays unchanged
+ };
+
+ _types.types._function.updateContext = function () {
+ if (this.curContext() !== types.b_stat) {
+ this.state.context.push(types.f_expr);
+ }
+
+ this.state.exprAllowed = false;
+ };
+
+ _types.types.backQuote.updateContext = function () {
+ if (this.curContext() === types.q_tmpl) {
+ this.state.context.pop();
+ } else {
+ this.state.context.push(types.q_tmpl);
+ }
+ this.state.exprAllowed = false;
+ };
+
+ /***/ },
+ /* 8122 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Token = undefined;
+
+ var _createClass2 = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _createClass3 = _interopRequireDefault(_createClass2);
+
+ var _classCallCheck2 = __webpack_require__(__webpack_module_template_argument_1__);
+
+ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+ var _identifier = __webpack_require__(__webpack_module_template_argument_2__);
+
+ var _types = __webpack_require__(__webpack_module_template_argument_3__);
+
+ var _context = __webpack_require__(__webpack_module_template_argument_4__);
+
+ var _location = __webpack_require__(__webpack_module_template_argument_5__);
+
+ var _whitespace = __webpack_require__(__webpack_module_template_argument_6__);
+
+ var _state = __webpack_require__(__webpack_module_template_argument_7__);
+
+ var _state2 = _interopRequireDefault(_state);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // 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 = exports.Token = function Token(state) {
+ (0, _classCallCheck3.default)(this, Token);
+
+ this.type = state.type;
+ this.value = state.value;
+ this.start = state.start;
+ this.end = state.end;
+ this.loc = new _location.SourceLocation(state.startLoc, state.endLoc);
+ };
+
+ // ## Tokenizer
+
+ /* eslint max-len: 0 */
+ /* eslint indent: 0 */
+
+ 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) {
+ (0, _classCallCheck3.default)(this, Tokenizer);
+
+ this.state = new _state2.default();
+ this.state.init(options, input);
+ }
+
+ // Move to the next token
+
+ (0, _createClass3.default)(Tokenizer, [{
+ key: "next",
+ value: 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
+
+ }, {
+ key: "eat",
+ value: function eat(type) {
+ if (this.match(type)) {
+ this.next();
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ // TODO
+
+ }, {
+ key: "match",
+ value: function match(type) {
+ return this.state.type === type;
+ }
+
+ // TODO
+
+ }, {
+ key: "isKeyword",
+ value: function isKeyword(word) {
+ return (0, _identifier.isKeyword)(word);
+ }
+
+ // TODO
+
+ }, {
+ key: "lookahead",
+ value: 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).
+
+ }, {
+ key: "setStrict",
+ value: function setStrict(strict) {
+ this.state.strict = strict;
+ if (!this.match(_types.types.num) && !this.match(_types.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();
+ }
+ }, {
+ key: "curContext",
+ value: function curContext() {
+ return this.state.context[this.state.context.length - 1];
+ }
+
+ // Read a single token, updating the parser object's token-related
+ // properties.
+
+ }, {
+ key: "nextToken",
+ value: 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.types.eof);
+
+ if (curContext.override) {
+ return curContext.override(this);
+ } else {
+ return this.readToken(this.fullCharCodeAtPos());
+ }
+ }
+ }, {
+ key: "readToken",
+ value: function readToken(code) {
+ // Identifier or keyword. '\uXXXX' sequences are allowed in
+ // identifiers, so '\' also dispatches to that.
+ if ((0, _identifier.isIdentifierStart)(code) || code === 92 /* '\' */) {
+ return this.readWord();
+ } else {
+ return this.getTokenFromCode(code);
+ }
+ }
+ }, {
+ key: "fullCharCodeAtPos",
+ value: 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;
+ }
+ }, {
+ key: "pushComment",
+ value: function pushComment(block, text, start, end, startLoc, endLoc) {
+ var comment = {
+ type: block ? "CommentBlock" : "CommentLine",
+ value: text,
+ start: start,
+ end: end,
+ loc: new _location.SourceLocation(startLoc, endLoc)
+ };
+
+ if (!this.isLookahead) {
+ this.state.tokens.push(comment);
+ this.state.comments.push(comment);
+ }
+
+ this.addComment(comment);
+ }
+ }, {
+ key: "skipBlockComment",
+ value: function skipBlockComment() {
+ var startLoc = this.state.curPosition();
+ var start = this.state.pos,
+ end = this.input.indexOf("*/", this.state.pos += 2);
+ if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
+
+ this.state.pos = end + 2;
+ _whitespace.lineBreakG.lastIndex = start;
+ var match = void 0;
+ while ((match = _whitespace.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());
+ }
+ }, {
+ key: "skipLineComment",
+ value: 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.
+
+ }, {
+ key: "skipSpace",
+ value: 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 && _whitespace.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.
+
+ }, {
+ key: "finishToken",
+ value: 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.
+ //
+
+ }, {
+ key: "readToken_dot",
+ value: 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.types.ellipsis);
+ } else {
+ ++this.state.pos;
+ return this.finishToken(_types.types.dot);
+ }
+ }
+ }, {
+ key: "readToken_slash",
+ value: 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.types.assign, 2);
+ } else {
+ return this.finishOp(_types.types.slash, 1);
+ }
+ }
+ }, {
+ key: "readToken_mult_modulo",
+ value: function readToken_mult_modulo(code) {
+ // '%*'
+ var type = code === 42 ? _types.types.star : _types.types.modulo;
+ var width = 1;
+ var next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 42 && this.hasPlugin("exponentiationOperator")) {
+ // '*'
+ width++;
+ next = this.input.charCodeAt(this.state.pos + 2);
+ type = _types.types.exponent;
+ }
+
+ if (next === 61) {
+ width++;
+ type = _types.types.assign;
+ }
+
+ return this.finishOp(type, width);
+ }
+ }, {
+ key: "readToken_pipe_amp",
+ value: function readToken_pipe_amp(code) {
+ // '|&'
+ var next = this.input.charCodeAt(this.state.pos + 1);
+ if (next === code) return this.finishOp(code === 124 ? _types.types.logicalOR : _types.types.logicalAND, 2);
+ if (next === 61) return this.finishOp(_types.types.assign, 2);
+ return this.finishOp(code === 124 ? _types.types.bitwiseOR : _types.types.bitwiseAND, 1);
+ }
+ }, {
+ key: "readToken_caret",
+ value: function readToken_caret() {
+ // '^'
+ var next = this.input.charCodeAt(this.state.pos + 1);
+ if (next === 61) {
+ return this.finishOp(_types.types.assign, 2);
+ } else {
+ return this.finishOp(_types.types.bitwiseXOR, 1);
+ }
+ }
+ }, {
+ key: "readToken_plus_min",
+ value: 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 && _whitespace.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.types.incDec, 2);
+ }
+
+ if (next === 61) {
+ return this.finishOp(_types.types.assign, 2);
+ } else {
+ return this.finishOp(_types.types.plusMin, 1);
+ }
+ }
+ }, {
+ key: "readToken_lt_gt",
+ value: 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.types.assign, size + 1);
+ return this.finishOp(_types.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();
+ // ` regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this)
- }, this)
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- this.debug(this.pattern, set)
+ (0, _index2.default)("AnyTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"],
+ fields: {
+ // todo
+ }
+ });
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return s.indexOf(false) === -1
- })
+ (0, _index2.default)("ArrayTypeAnnotation", {
+ visitor: ["elementType"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- this.debug(this.pattern, set)
+ (0, _index2.default)("BooleanTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"],
+ fields: {
+ // todo
+ }
+ });
- this.set = set
- }
+ (0, _index2.default)("BooleanLiteralTypeAnnotation", {
+ aliases: ["Flow"],
+ fields: {}
+ });
- Minimatch.prototype.parseNegate = parseNegate
- function parseNegate () {
- var pattern = this.pattern
- var negate = false
- var options = this.options
- var negateOffset = 0
+ (0, _index2.default)("NullLiteralTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"],
+ fields: {}
+ });
- if (options.nonegate) return
+ (0, _index2.default)("ClassImplements", {
+ visitor: ["id", "typeParameters"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- for (var i = 0, l = pattern.length
- ; i < l && pattern.charAt(i) === '!'
- ; i++) {
- negate = !negate
- negateOffset++
+ (0, _index2.default)("ClassProperty", {
+ visitor: ["key", "value", "typeAnnotation", "decorators"],
+ aliases: ["Flow", "Property"],
+ fields: {
+ // todo
}
+ });
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
- this.negate = negate
- }
+ (0, _index2.default)("DeclareClass", {
+ visitor: ["id", "typeParameters", "extends", "body"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
+ }
+ });
- // 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)
- }
+ (0, _index2.default)("DeclareFunction", {
+ visitor: ["id"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
+ }
+ });
- Minimatch.prototype.braceExpand = braceExpand
+ (0, _index2.default)("DeclareInterface", {
+ visitor: ["id", "typeParameters", "extends", "body"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
+ }
+ });
- function braceExpand (pattern, options) {
- if (!options) {
- if (this instanceof Minimatch) {
- options = this.options
- } else {
- options = {}
- }
+ (0, _index2.default)("DeclareModule", {
+ visitor: ["id", "body"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
}
+ });
- pattern = typeof pattern === 'undefined'
- ? this.pattern : pattern
+ (0, _index2.default)("DeclareTypeAlias", {
+ visitor: ["id", "typeParameters", "right"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
+ }
+ });
- if (typeof pattern === 'undefined') {
- throw new Error('undefined pattern')
+ (0, _index2.default)("DeclareVariable", {
+ visitor: ["id"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
}
+ });
- if (options.nobrace ||
- !pattern.match(/\{.*\}/)) {
- // shortcut. no need to expand.
- return [pattern]
+ (0, _index2.default)("ExistentialTypeParam", {
+ aliases: ["Flow"]
+ });
+
+ (0, _index2.default)("FunctionTypeAnnotation", {
+ visitor: ["typeParameters", "params", "rest", "returnType"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
}
+ });
- return expand(pattern)
- }
+ (0, _index2.default)("FunctionTypeParam", {
+ visitor: ["name", "typeAnnotation"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- // 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) {
- var options = this.options
+ (0, _index2.default)("GenericTypeAnnotation", {
+ visitor: ["id", "typeParameters"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- // shortcuts
- if (!options.noglobstar && pattern === '**') return GLOBSTAR
- if (pattern === '') return ''
+ (0, _index2.default)("InterfaceExtends", {
+ visitor: ["id", "typeParameters"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- var re = ''
- var hasMagic = !!options.nocase
- var escaping = false
- // ? => one single character
- var patternListStack = []
- var negativeLists = []
- var plType
- 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
+ (0, _index2.default)("InterfaceDeclaration", {
+ visitor: ["id", "typeParameters", "extends", "body"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
+ }
+ });
- 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
- }
+ (0, _index2.default)("IntersectionTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
}
+ });
- 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)
+ (0, _index2.default)("MixedTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"]
+ });
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += '\\' + c
- escaping = false
- continue
- }
+ (0, _index2.default)("NullableTypeAnnotation", {
+ visitor: ["typeAnnotation"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- switch (c) {
- case '/':
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false
+ (0, _index2.default)("NumericLiteralTypeAnnotation", {
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- case '\\':
- clearStateChar()
- escaping = true
- continue
+ (0, _index2.default)("NumberTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"],
+ fields: {
+ // todo
+ }
+ });
- // 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)
+ (0, _index2.default)("StringLiteralTypeAnnotation", {
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- // 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
- }
+ (0, _index2.default)("StringTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"],
+ fields: {
+ // todo
+ }
+ });
- // 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
+ (0, _index2.default)("ThisTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"],
+ fields: {}
+ });
- case '(':
- if (inClass) {
- re += '('
- continue
- }
+ (0, _index2.default)("TupleTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- if (!stateChar) {
- re += '\\('
- continue
- }
+ (0, _index2.default)("TypeofTypeAnnotation", {
+ visitor: ["argument"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- plType = stateChar
- patternListStack.push({
- type: plType,
- start: i - 1,
- reStart: re.length
- })
- // negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
- this.debug('plType %j %j', stateChar, re)
- stateChar = false
- continue
+ (0, _index2.default)("TypeAlias", {
+ visitor: ["id", "typeParameters", "right"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ // todo
+ }
+ });
- case ')':
- if (inClass || !patternListStack.length) {
- re += '\\)'
- continue
- }
+ (0, _index2.default)("TypeAnnotation", {
+ visitor: ["typeAnnotation"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- clearStateChar()
- hasMagic = true
- re += ')'
- var pl = patternListStack.pop()
- plType = pl.type
- // negation is (?:(?!js)[^/]*)
- // The others are (?:)
- switch (plType) {
- case '!':
- negativeLists.push(pl)
- re += ')[^/]*?)'
- pl.reEnd = re.length
- break
- case '?':
- case '+':
- case '*':
- re += plType
- break
- case '@': break // the default anyway
- }
- continue
+ (0, _index2.default)("TypeCastExpression", {
+ visitor: ["expression", "typeAnnotation"],
+ aliases: ["Flow", "ExpressionWrapper", "Expression"],
+ fields: {
+ // todo
+ }
+ });
- case '|':
- if (inClass || !patternListStack.length || escaping) {
- re += '\\|'
- escaping = false
- continue
- }
+ (0, _index2.default)("TypeParameter", {
+ visitor: ["bound"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- clearStateChar()
- re += '|'
- continue
+ (0, _index2.default)("TypeParameterDeclaration", {
+ visitor: ["params"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- // these are mostly the same in regexp and glob
- case '[':
- // swallow any state-tracking char before the [
- clearStateChar()
+ (0, _index2.default)("TypeParameterInstantiation", {
+ visitor: ["params"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- if (inClass) {
- re += '\\' + c
- continue
- }
+ (0, _index2.default)("ObjectTypeAnnotation", {
+ visitor: ["properties", "indexers", "callProperties"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- inClass = true
- classStart = i
- reClassStart = re.length
- re += c
- continue
+ (0, _index2.default)("ObjectTypeCallProperty", {
+ visitor: ["value"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ // todo
+ }
+ });
- 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
- }
+ (0, _index2.default)("ObjectTypeIndexer", {
+ visitor: ["id", "key", "value"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ // todo
+ }
+ });
- // 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
- }
- }
+ (0, _index2.default)("ObjectTypeProperty", {
+ visitor: ["key", "value"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ // todo
+ }
+ });
+
+ (0, _index2.default)("QualifiedTypeIdentifier", {
+ visitor: ["id", "qualification"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- // finish up the class.
- hasMagic = true
- inClass = false
- re += c
- continue
+ (0, _index2.default)("UnionTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["Flow"],
+ fields: {
+ // todo
+ }
+ });
- default:
- // swallow any state char that wasn't consumed
- clearStateChar()
+ (0, _index2.default)("VoidTypeAnnotation", {
+ aliases: ["Flow", "FlowBaseAnnotation"],
+ fields: {
+ // todo
+ }
+ });
- if (escaping) {
- // no need
- escaping = false
- } else if (reSpecials[c]
- && !(c === '^' && inClass)) {
- re += '\\'
- }
+ /***/ },
+ /* 8315 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
- re += c
+ "use strict";
- } // switch
- } // for
+ exports.__esModule = true;
+ exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = undefined;
- // 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]
- }
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_0__);
- // 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 + 3)
- // maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
- if (!$2) {
- // the | isn't already escaped, so escape it.
- $2 = '\\'
- }
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
- // 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 + '|'
- })
+ var _stringify = __webpack_require__(__webpack_module_template_argument_1__);
- this.debug('tail=%j\n %s', tail, tail)
- var t = pl.type === '*' ? star
- : pl.type === '?' ? qmark
- : '\\' + pl.type
+ var _stringify2 = _interopRequireDefault(_stringify);
- hasMagic = true
- re = re.slice(0, pl.reStart) + t + '\\(' + tail
- }
+ var _typeof2 = __webpack_require__(__webpack_module_template_argument_2__);
- // handle trailing things that only matter at the very end.
- clearStateChar()
- if (escaping) {
- // trailing \\
- re += '\\\\'
- }
+ var _typeof3 = _interopRequireDefault(_typeof2);
- // 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
- }
+ exports.assertEach = assertEach;
+ exports.assertOneOf = assertOneOf;
+ exports.assertNodeType = assertNodeType;
+ exports.assertNodeOrValueType = assertNodeOrValueType;
+ exports.assertValueType = assertValueType;
+ exports.chain = chain;
+ exports.default = defineType;
- // 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 _index = __webpack_require__(__webpack_module_template_argument_3__);
- 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)
+ var t = _interopRequireWildcard(_index);
- nlLast += nlAfter
+ 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; } }
- // 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
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var dollar = ''
- if (nlAfter === '' && isSub !== SUBPARSE) {
- dollar = '$'
- }
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
- re = newRe
+ var VISITOR_KEYS = exports.VISITOR_KEYS = {};
+ var ALIAS_KEYS = exports.ALIAS_KEYS = {};
+ var NODE_FIELDS = exports.NODE_FIELDS = {};
+ var BUILDER_KEYS = exports.BUILDER_KEYS = {};
+ var DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {};
+
+ function getType(val) {
+ if (Array.isArray(val)) {
+ return "array";
+ } else if (val === null) {
+ return "null";
+ } else if (val === undefined) {
+ return "undefined";
+ } else {
+ return typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val);
}
+ }
- // 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
+ function assertEach(callback) {
+ function validator(node, key, val) {
+ if (!Array.isArray(val)) return;
+
+ for (var i = 0; i < val.length; i++) {
+ callback(node, key + "[" + i + "]", val[i]);
+ }
}
+ validator.each = callback;
+ return validator;
+ }
- if (addPatternStart) {
- re = patternStart + re
+ function assertOneOf() {
+ for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) {
+ vals[_key] = arguments[_key];
}
- // parsing just a piece of a larger pattern.
- if (isSub === SUBPARSE) {
- return [re, hasMagic]
+ function validate(node, key, val) {
+ if (vals.indexOf(val) < 0) {
+ throw new TypeError("Property " + key + " expected value to be one of " + (0, _stringify2.default)(vals) + " but got " + (0, _stringify2.default)(val));
+ }
}
- // 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)
+ validate.oneOf = vals;
+
+ return validate;
+ }
+
+ function assertNodeType() {
+ for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ types[_key2] = arguments[_key2];
}
- var flags = options.nocase ? 'i' : ''
- var regExp = new RegExp('^' + re + '$', flags)
+ function validate(node, key, val) {
+ var valid = false;
- regExp._glob = pattern
- regExp._src = re
+ for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
+ var _ref;
- return regExp
- }
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref = _i.value;
+ }
- minimatch.makeRe = function (pattern, options) {
- return new Minimatch(pattern, options || {}).makeRe()
- }
+ var type = _ref;
- Minimatch.prototype.makeRe = makeRe
- function makeRe () {
- if (this.regexp || this.regexp === false) return this.regexp
+ if (t.is(type, val)) {
+ valid = true;
+ break;
+ }
+ }
- // 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 (!valid) {
+ throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type)));
+ }
+ }
- if (!set.length) {
- this.regexp = false
- return this.regexp
+ validate.oneOfNodeTypes = types;
+
+ return validate;
+ }
+
+ function assertNodeOrValueType() {
+ for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
+ types[_key3] = arguments[_key3];
}
- var options = this.options
- var twoStar = options.noglobstar ? star
- : options.dot ? twoStarDot
- : twoStarNoDot
- var flags = options.nocase ? 'i' : ''
+ function validate(node, key, val) {
+ var valid = false;
- var re = set.map(function (pattern) {
- return pattern.map(function (p) {
- return (p === GLOBSTAR) ? twoStar
- : (typeof p === 'string') ? regExpEscape(p)
- : p._src
- }).join('\\\/')
- }).join('|')
+ for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
+ var _ref2;
- // must match entire pattern
- // ending in a * or ** will make it less strict.
- re = '^(?:' + re + ')$'
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref2 = _i2.value;
+ }
- // can match anything, as long as it's not this.
- if (this.negate) re = '^(?!' + re + ').*$'
+ var type = _ref2;
- try {
- this.regexp = new RegExp(re, flags)
- } catch (ex) {
- this.regexp = false
+ if (getType(val) === type || t.is(type, val)) {
+ valid = true;
+ break;
+ }
+ }
+
+ if (!valid) {
+ throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type)));
+ }
}
- return this.regexp
+
+ validate.oneOfNodeOrValueTypes = types;
+
+ return validate;
}
- 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)
+ function assertValueType(type) {
+ function validate(node, key, val) {
+ var valid = getType(val) === type;
+
+ if (!valid) {
+ throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val));
+ }
}
- return list
+
+ validate.type = type;
+
+ return validate;
}
- 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 === ''
+ function chain() {
+ for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
+ fns[_key4] = arguments[_key4];
+ }
- if (f === '/' && partial) return true
+ function validate() {
+ for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
+ var _ref3;
- var options = this.options
+ if (_isArray3) {
+ if (_i3 >= _iterator3.length) break;
+ _ref3 = _iterator3[_i3++];
+ } else {
+ _i3 = _iterator3.next();
+ if (_i3.done) break;
+ _ref3 = _i3.value;
+ }
- // windows: need to use /, not \
- if (path.sep !== '/') {
- f = f.split(path.sep).join('/')
+ var fn = _ref3;
+
+ fn.apply(undefined, arguments);
+ }
}
+ validate.chainOf = fns;
+ return validate;
+ }
- // treat the test path as a set of pathparts.
- f = f.split(slashSplit)
- this.debug(this.pattern, 'split', f)
+ function defineType(type) {
+ var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- // 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 inherits = opts.inherits && store[opts.inherits] || {};
- var set = this.set
- this.debug(this.pattern, 'set', set)
+ opts.fields = opts.fields || inherits.fields || {};
+ opts.visitor = opts.visitor || inherits.visitor || [];
+ opts.aliases = opts.aliases || inherits.aliases || [];
+ opts.builder = opts.builder || inherits.builder || opts.visitor || [];
- // 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
+ if (opts.deprecatedAlias) {
+ DEPRECATED_KEYS[opts.deprecatedAlias] = type;
}
- for (i = 0; i < set.length; i++) {
- var pattern = set[i]
- var file = f
- if (options.matchBase && pattern.length === 1) {
- file = [filename]
+ // ensure all field keys are represented in `fields`
+ for (var _iterator4 = opts.visitor.concat(opts.builder), _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 hit = this.matchOne(file, pattern, partial)
- if (hit) {
- if (options.flipNegate) return true
- return !this.negate
+
+ var _key5 = _ref4;
+
+ opts.fields[_key5] = opts.fields[_key5] || {};
+ }
+
+ for (var key in opts.fields) {
+ var field = opts.fields[key];
+
+ if (field.default === undefined) {
+ field.default = null;
+ } else if (!field.validate) {
+ field.validate = assertValueType(getType(field.default));
}
}
- // didn't get any hits. this is success if it's a negative
- // pattern, failure otherwise.
- if (options.flipNegate) return false
- return this.negate
+ VISITOR_KEYS[type] = opts.visitor;
+ BUILDER_KEYS[type] = opts.builder;
+ NODE_FIELDS[type] = opts.fields;
+ ALIAS_KEYS[type] = opts.aliases;
+
+ store[type] = opts;
}
- // 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
+ var store = {};
- this.debug('matchOne',
- { 'this': this, file: file, pattern: pattern })
+ /***/ },
+ /* 8316 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__) {
- this.debug('matchOne', file.length, pattern.length)
+ "use strict";
- 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]
+ __webpack_require__(__webpack_module_template_argument_0__);
- this.debug(pattern, p, f)
+ __webpack_require__(__webpack_module_template_argument_1__);
- // should be impossible.
- // some invalid regexp stuff in the set.
- if (p === false) return false
+ __webpack_require__(__webpack_module_template_argument_2__);
- if (p === GLOBSTAR) {
- this.debug('GLOBSTAR', [pattern, p, f])
+ __webpack_require__(__webpack_module_template_argument_3__);
- // "**"
- // 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
- }
+ __webpack_require__(__webpack_module_template_argument_4__);
- // ok, let's see if we can swallow whatever we can.
- while (fr < fl) {
- var swallowee = file[fr]
+ __webpack_require__(__webpack_module_template_argument_5__);
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+ __webpack_require__(__webpack_module_template_argument_6__);
- // 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
- }
+ /***/ },
+ /* 8317 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ "use strict";
+
+ var _index = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ (0, _index2.default)("JSXAttribute", {
+ visitor: ["name", "value"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ name: {
+ validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
+ },
+ value: {
+ optional: true,
+ validate: (0, _index.assertNodeType)("JSXElement", "StringLiteral", "JSXExpressionContainer")
+ }
+ }
+ });
+
+ (0, _index2.default)("JSXClosingElement", {
+ visitor: ["name"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ name: {
+ validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
+ }
+ }
+ });
+
+ (0, _index2.default)("JSXElement", {
+ builder: ["openingElement", "closingElement", "children", "selfClosing"],
+ visitor: ["openingElement", "children", "closingElement"],
+ aliases: ["JSX", "Immutable", "Expression"],
+ fields: {
+ openingElement: {
+ validate: (0, _index.assertNodeType)("JSXOpeningElement")
+ },
+ closingElement: {
+ optional: true,
+ validate: (0, _index.assertNodeType)("JSXClosingElement")
+ },
+ children: {
+ validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXElement")))
+ }
+ }
+ });
- // ** swallows a segment, and continue.
- this.debug('globstar swallow a segment, and continue')
- fr++
- }
- }
+ (0, _index2.default)("JSXEmptyExpression", {
+ aliases: ["JSX", "Expression"]
+ });
- // 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
+ (0, _index2.default)("JSXExpressionContainer", {
+ visitor: ["expression"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ expression: {
+ validate: (0, _index.assertNodeType)("Expression")
}
+ }
+ });
- // 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)
+ (0, _index2.default)("JSXIdentifier", {
+ builder: ["name"],
+ aliases: ["JSX", "Expression"],
+ fields: {
+ name: {
+ validate: (0, _index.assertValueType)("string")
}
+ }
+ });
- if (!hit) return false
+ (0, _index2.default)("JSXMemberExpression", {
+ visitor: ["object", "property"],
+ aliases: ["JSX", "Expression"],
+ fields: {
+ object: {
+ validate: (0, _index.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
+ },
+ property: {
+ validate: (0, _index.assertNodeType)("JSXIdentifier")
+ }
}
+ });
- // 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/*
+ (0, _index2.default)("JSXNamespacedName", {
+ visitor: ["namespace", "name"],
+ aliases: ["JSX"],
+ fields: {
+ namespace: {
+ validate: (0, _index.assertNodeType)("JSXIdentifier")
+ },
+ name: {
+ validate: (0, _index.assertNodeType)("JSXIdentifier")
+ }
+ }
+ });
- // 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
+ (0, _index2.default)("JSXOpeningElement", {
+ builder: ["name", "attributes", "selfClosing"],
+ visitor: ["name", "attributes"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ name: {
+ validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
+ },
+ selfClosing: {
+ default: false,
+ validate: (0, _index.assertValueType)("boolean")
+ },
+ attributes: {
+ validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
+ }
}
+ });
- // should be unreachable.
- throw new Error('wtf?')
- }
+ (0, _index2.default)("JSXSpreadAttribute", {
+ visitor: ["argument"],
+ aliases: ["JSX"],
+ fields: {
+ argument: {
+ validate: (0, _index.assertNodeType)("Expression")
+ }
+ }
+ });
- // replace stuff like \* with *
- function globUnescape (s) {
- return s.replace(/\\(.)/g, '$1')
- }
+ (0, _index2.default)("JSXText", {
+ aliases: ["JSX", "Immutable"],
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _index.assertValueType)("string")
+ }
+ }
+ });
- function regExpEscape (s) {
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
- }
+ /***/ },
+ /* 8318 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ "use strict";
+ var _index = __webpack_require__(__webpack_module_template_argument_0__);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ (0, _index2.default)("Noop", {
+ visitor: []
+ });
+
+ (0, _index2.default)("ParenthesizedExpression", {
+ visitor: ["expression"],
+ aliases: ["Expression", "ExpressionWrapper"],
+ fields: {
+ expression: {
+ validate: (0, _index.assertNodeType)("Expression")
+ }
+ }
+ });
/***/ },
- /* 518 */
- /*!***********************!*\
- !*** ./~/ms/index.js ***!
- \***********************/
- /***/ function(module, exports) {
+ /* 8319 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- /**
- * Helpers.
- */
+ "use strict";
- var s = 1000;
- var m = s * 60;
- var h = m * 60;
- var d = h * 24;
- var y = d * 365.25;
+ exports.__esModule = true;
+ exports.createUnionTypeAnnotation = createUnionTypeAnnotation;
+ exports.removeTypeDuplicates = removeTypeDuplicates;
+ exports.createTypeAnnotationBasedOnTypeof = createTypeAnnotationBasedOnTypeof;
- /**
- * Parse or format the given `val`.
- *
- * Options:
- *
- * - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} options
- * @return {String|Number}
- * @api public
- */
+ var _index = __webpack_require__(__webpack_module_template_argument_0__);
- module.exports = function(val, options){
- options = options || {};
- if ('string' == typeof val) return parse(val);
- return options.long
- ? long(val)
- : short(val);
- };
+ var t = _interopRequireWildcard(_index);
+
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
/**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
+ * Takes an array of `types` and flattens them, removing duplicates and
+ * returns a `UnionTypeAnnotation` node containg them.
*/
- function parse(str) {
- str = '' + str;
- if (str.length > 10000) return;
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
- if (!match) return;
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
- switch (type) {
- case 'years':
- case 'year':
- case 'yrs':
- case 'yr':
- case 'y':
- return n * y;
- case 'days':
- case 'day':
- case 'd':
- return n * d;
- case 'hours':
- case 'hour':
- case 'hrs':
- case 'hr':
- case 'h':
- return n * h;
- case 'minutes':
- case 'minute':
- case 'mins':
- case 'min':
- case 'm':
- return n * m;
- case 'seconds':
- case 'second':
- case 'secs':
- case 'sec':
- case 's':
- return n * s;
- case 'milliseconds':
- case 'millisecond':
- case 'msecs':
- case 'msec':
- case 'ms':
- return n;
+ function createUnionTypeAnnotation(types) {
+ var flattened = removeTypeDuplicates(types);
+
+ if (flattened.length === 1) {
+ return flattened[0];
+ } else {
+ return t.unionTypeAnnotation(flattened);
}
}
/**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
+ * Dedupe type annotations.
*/
- function short(ms) {
- if (ms >= d) return Math.round(ms / d) + 'd';
- if (ms >= h) return Math.round(ms / h) + 'h';
- if (ms >= m) return Math.round(ms / m) + 'm';
- if (ms >= s) return Math.round(ms / s) + 's';
- return ms + 'ms';
- }
+ function removeTypeDuplicates(nodes) {
+ var generics = {};
+ var bases = {};
- /**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
+ // store union type groups to circular references
+ var typeGroups = [];
- function long(ms) {
- return plural(ms, d, 'day')
- || plural(ms, h, 'hour')
- || plural(ms, m, 'minute')
- || plural(ms, s, 'second')
- || ms + ' ms';
+ var types = [];
+
+ for (var i = 0; i < nodes.length; i++) {
+ var node = nodes[i];
+ if (!node) continue;
+
+ // detect duplicates
+ if (types.indexOf(node) >= 0) {
+ continue;
+ }
+
+ // this type matches anything
+ if (t.isAnyTypeAnnotation(node)) {
+ return [node];
+ }
+
+ //
+ if (t.isFlowBaseAnnotation(node)) {
+ bases[node.type] = node;
+ continue;
+ }
+
+ //
+ if (t.isUnionTypeAnnotation(node)) {
+ if (typeGroups.indexOf(node.types) < 0) {
+ nodes = nodes.concat(node.types);
+ typeGroups.push(node.types);
+ }
+ continue;
+ }
+
+ // find a matching generic type and merge and deduplicate the type parameters
+ if (t.isGenericTypeAnnotation(node)) {
+ var name = node.id.name;
+
+ if (generics[name]) {
+ var existing = generics[name];
+ if (existing.typeParameters) {
+ if (node.typeParameters) {
+ existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
+ }
+ } else {
+ existing = node.typeParameters;
+ }
+ } else {
+ generics[name] = node;
+ }
+
+ continue;
+ }
+
+ types.push(node);
+ }
+
+ // add back in bases
+ for (var type in bases) {
+ types.push(bases[type]);
+ }
+
+ // add back in generics
+ for (var _name in generics) {
+ types.push(generics[_name]);
+ }
+
+ return types;
}
/**
- * Pluralization helper.
+ * Create a type anotation based on typeof expression.
*/
- function plural(ms, n, name) {
- if (ms < n) return;
- if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
- return Math.ceil(ms / n) + ' ' + name + 's';
+ function createTypeAnnotationBasedOnTypeof(type) {
+ if (type === "string") {
+ return t.stringTypeAnnotation();
+ } else if (type === "number") {
+ return t.numberTypeAnnotation();
+ } else if (type === "undefined") {
+ return t.voidTypeAnnotation();
+ } else if (type === "boolean") {
+ return t.booleanTypeAnnotation();
+ } else if (type === "function") {
+ return t.genericTypeAnnotation(t.identifier("Function"));
+ } else if (type === "object") {
+ return t.genericTypeAnnotation(t.identifier("Object"));
+ } else if (type === "symbol") {
+ return t.genericTypeAnnotation(t.identifier("Symbol"));
+ } else {
+ throw new Error("Invalid typeof value");
+ }
}
-
/***/ },
- /* 519 */
- /*!**********************************!*\
- !*** ./~/number-is-nan/index.js ***!
- \**********************************/
- /***/ function(module, exports) {
+ /* 8320 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__, __webpack_module_template_argument_8__, __webpack_module_template_argument_9__, __webpack_module_template_argument_10__, __webpack_module_template_argument_11__, __webpack_module_template_argument_12__, __webpack_module_template_argument_13__, __webpack_module_template_argument_14__, __webpack_module_template_argument_15__, __webpack_module_template_argument_16__) {
- 'use strict';
- module.exports = Number.isNaN || function (x) {
- return x !== x;
- };
+ "use strict";
+ exports.__esModule = true;
+ exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
- /***/ },
- /* 520 */
- /*!********************************!*\
- !*** ./~/path-exists/index.js ***!
- \********************************/
- /***/ function(module, exports, __webpack_require__) {
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_0__);
- 'use strict';
- var fs = __webpack_require__(/*! fs */ 40)
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
- module.exports = function (pth, cb) {
- var fn = typeof fs.access === 'function' ? fs.access : fs.stat;
+ var _keys = __webpack_require__(__webpack_module_template_argument_1__);
- fn(pth, function (err) {
- cb(null, !err);
- });
- };
+ var _keys2 = _interopRequireDefault(_keys);
- module.exports.sync = function (pth) {
- var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync;
+ var _stringify = __webpack_require__(__webpack_module_template_argument_2__);
- try {
- fn(pth);
- return true;
- } catch (err) {
- return false;
- }
- };
+ var _stringify2 = _interopRequireDefault(_stringify);
+ var _constants = __webpack_require__(__webpack_module_template_argument_3__);
- /***/ },
- /* 521 */
- /*!*************************************!*\
- !*** ./~/path-is-absolute/index.js ***!
- \*************************************/
- /***/ function(module, exports, __webpack_require__) {
+ Object.defineProperty(exports, "STATEMENT_OR_BLOCK_KEYS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.STATEMENT_OR_BLOCK_KEYS;
+ }
+ });
+ Object.defineProperty(exports, "FLATTENABLE_KEYS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.FLATTENABLE_KEYS;
+ }
+ });
+ Object.defineProperty(exports, "FOR_INIT_KEYS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.FOR_INIT_KEYS;
+ }
+ });
+ Object.defineProperty(exports, "COMMENT_KEYS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.COMMENT_KEYS;
+ }
+ });
+ Object.defineProperty(exports, "LOGICAL_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.LOGICAL_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "UPDATE_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.UPDATE_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "BOOLEAN_NUMBER_BINARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.BOOLEAN_NUMBER_BINARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "EQUALITY_BINARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.EQUALITY_BINARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "COMPARISON_BINARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.COMPARISON_BINARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "BOOLEAN_BINARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.BOOLEAN_BINARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "NUMBER_BINARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.NUMBER_BINARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "BINARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.BINARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "BOOLEAN_UNARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.BOOLEAN_UNARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "NUMBER_UNARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.NUMBER_UNARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "STRING_UNARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.STRING_UNARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "UNARY_OPERATORS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.UNARY_OPERATORS;
+ }
+ });
+ Object.defineProperty(exports, "INHERIT_KEYS", {
+ enumerable: true,
+ get: function get() {
+ return _constants.INHERIT_KEYS;
+ }
+ });
+ Object.defineProperty(exports, "BLOCK_SCOPED_SYMBOL", {
+ enumerable: true,
+ get: function get() {
+ return _constants.BLOCK_SCOPED_SYMBOL;
+ }
+ });
+ Object.defineProperty(exports, "NOT_LOCAL_BINDING", {
+ enumerable: true,
+ get: function get() {
+ return _constants.NOT_LOCAL_BINDING;
+ }
+ });
+ exports.is = is;
+ exports.isType = isType;
+ exports.validate = validate;
+ exports.shallowEqual = shallowEqual;
+ exports.appendToMemberExpression = appendToMemberExpression;
+ exports.prependToMemberExpression = prependToMemberExpression;
+ exports.ensureBlock = ensureBlock;
+ exports.clone = clone;
+ exports.cloneWithoutLoc = cloneWithoutLoc;
+ exports.cloneDeep = cloneDeep;
+ exports.buildMatchMemberExpression = buildMatchMemberExpression;
+ exports.removeComments = removeComments;
+ exports.inheritsComments = inheritsComments;
+ exports.inheritTrailingComments = inheritTrailingComments;
+ exports.inheritLeadingComments = inheritLeadingComments;
+ exports.inheritInnerComments = inheritInnerComments;
+ exports.inherits = inherits;
+ exports.assertNode = assertNode;
+ exports.isNode = isNode;
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
+ var _retrievers = __webpack_require__(__webpack_module_template_argument_4__);
- function posix(path) {
- return path.charAt(0) === '/';
- };
+ Object.defineProperty(exports, "getBindingIdentifiers", {
+ enumerable: true,
+ get: function get() {
+ return _retrievers.getBindingIdentifiers;
+ }
+ });
+ Object.defineProperty(exports, "getOuterBindingIdentifiers", {
+ enumerable: true,
+ get: function get() {
+ return _retrievers.getOuterBindingIdentifiers;
+ }
+ });
- function win32(path) {
- // https://github.com/joyent/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 = !!device && device.charAt(1) !== ':';
+ var _validators = __webpack_require__(__webpack_module_template_argument_5__);
- // UNC paths are always absolute
- return !!result[2] || isUnc;
- };
+ Object.defineProperty(exports, "isBinding", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isBinding;
+ }
+ });
+ Object.defineProperty(exports, "isReferenced", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isReferenced;
+ }
+ });
+ Object.defineProperty(exports, "isValidIdentifier", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isValidIdentifier;
+ }
+ });
+ Object.defineProperty(exports, "isLet", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isLet;
+ }
+ });
+ Object.defineProperty(exports, "isBlockScoped", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isBlockScoped;
+ }
+ });
+ Object.defineProperty(exports, "isVar", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isVar;
+ }
+ });
+ Object.defineProperty(exports, "isSpecifierDefault", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isSpecifierDefault;
+ }
+ });
+ Object.defineProperty(exports, "isScope", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isScope;
+ }
+ });
+ Object.defineProperty(exports, "isImmutable", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isImmutable;
+ }
+ });
+
+ var _converters = __webpack_require__(__webpack_module_template_argument_6__);
+
+ Object.defineProperty(exports, "toComputedKey", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toComputedKey;
+ }
+ });
+ Object.defineProperty(exports, "toSequenceExpression", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toSequenceExpression;
+ }
+ });
+ Object.defineProperty(exports, "toKeyAlias", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toKeyAlias;
+ }
+ });
+ Object.defineProperty(exports, "toIdentifier", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toIdentifier;
+ }
+ });
+ Object.defineProperty(exports, "toBindingIdentifierName", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toBindingIdentifierName;
+ }
+ });
+ Object.defineProperty(exports, "toStatement", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toStatement;
+ }
+ });
+ Object.defineProperty(exports, "toExpression", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toExpression;
+ }
+ });
+ Object.defineProperty(exports, "toBlock", {
+ enumerable: true,
+ get: function get() {
+ return _converters.toBlock;
+ }
+ });
+ Object.defineProperty(exports, "valueToNode", {
+ enumerable: true,
+ get: function get() {
+ return _converters.valueToNode;
+ }
+ });
+
+ var _flow = __webpack_require__(__webpack_module_template_argument_7__);
+
+ Object.defineProperty(exports, "createUnionTypeAnnotation", {
+ enumerable: true,
+ get: function get() {
+ return _flow.createUnionTypeAnnotation;
+ }
+ });
+ Object.defineProperty(exports, "removeTypeDuplicates", {
+ enumerable: true,
+ get: function get() {
+ return _flow.removeTypeDuplicates;
+ }
+ });
+ Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
+ enumerable: true,
+ get: function get() {
+ return _flow.createTypeAnnotationBasedOnTypeof;
+ }
+ });
+
+ var _toFastProperties = __webpack_require__(__webpack_module_template_argument_8__);
+
+ var _toFastProperties2 = _interopRequireDefault(_toFastProperties);
- module.exports = process.platform === 'win32' ? win32 : posix;
- module.exports.posix = posix;
- module.exports.win32 = win32;
+ var _compact = __webpack_require__(__webpack_module_template_argument_9__);
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./~/process/browser.js */ 18)))
+ var _compact2 = _interopRequireDefault(_compact);
- /***/ },
- /* 522 */
- /*!************************************************************!*\
- !*** ./~/regexpu-core/data/character-class-escape-sets.js ***!
- \************************************************************/
- /***/ function(module, exports, __webpack_require__) {
+ var _clone = __webpack_require__(__webpack_module_template_argument_10__);
- // Generated by `/scripts/character-class-escape-sets.js`. Do not edit.
- var regenerate = __webpack_require__(/*! regenerate */ 236);
+ var _clone2 = _interopRequireDefault(_clone);
- exports.REGULAR = {
- 'd': regenerate()
- .addRange(0x30, 0x39),
- 'D': regenerate()
- .addRange(0x0, 0x2F)
- .addRange(0x3A, 0xFFFF),
- 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 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, 0x180D)
- .addRange(0x180F, 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)
- };
+ var _each = __webpack_require__(__webpack_module_template_argument_11__);
- exports.UNICODE = {
- 'd': regenerate()
- .addRange(0x30, 0x39),
- 'D': regenerate()
- .addRange(0x0, 0x2F)
- .addRange(0x3A, 0x10FFFF),
- 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 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, 0x180D)
- .addRange(0x180F, 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)
- };
+ var _each2 = _interopRequireDefault(_each);
- exports.UNICODE_IGNORE_CASE = {
- 'd': regenerate()
- .addRange(0x30, 0x39),
- 'D': regenerate()
- .addRange(0x0, 0x2F)
- .addRange(0x3A, 0x10FFFF),
- 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 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, 0x180D)
- .addRange(0x180F, 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)
- };
+ var _uniq = __webpack_require__(__webpack_module_template_argument_12__);
+ var _uniq2 = _interopRequireDefault(_uniq);
- /***/ },
- /* 523 */
- /*!*******************************************!*\
- !*** ./~/regexpu-core/rewrite-pattern.js ***!
- \*******************************************/
- /***/ function(module, exports, __webpack_require__) {
+ __webpack_require__(__webpack_module_template_argument_13__);
- var generate = __webpack_require__(/*! regjsgen */ 524).generate;
- var parse = __webpack_require__(/*! regjsparser */ 525).parse;
- var regenerate = __webpack_require__(/*! regenerate */ 236);
- var iuMappings = __webpack_require__(/*! ./data/iu-mappings.json */ 465);
- var ESCAPE_SETS = __webpack_require__(/*! ./data/character-class-escape-sets.js */ 522);
+ var _definitions = __webpack_require__(__webpack_module_template_argument_14__);
- 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 _react2 = __webpack_require__(__webpack_module_template_argument_15__);
- var object = {};
- var hasOwnProperty = object.hasOwnProperty;
- function has(object, property) {
- return hasOwnProperty.call(object, property);
- }
+ var _react = _interopRequireWildcard(_react2);
- // 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);
+ 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; } }
- // 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);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- // 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;
- };
+ var t = exports;
- function assign(target, source) {
- for (var key in source) {
- // Note: `hasOwnProperty` is not needed here.
- target[key] = source[key];
- }
- }
+ /**
+ * Registers `is[Type]` and `assert[Type]` generated functions for a given `type`.
+ * Pass `skipAliasCheck` to force it to directly compare `node.type` with `type`.
+ */
- function 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 registerType(type) {
+ var is = t["is" + type];
+ if (!is) {
+ is = t["is" + type] = function (node, opts) {
+ return t.is(type, node, opts);
+ };
+ }
- function wrap(tree, pattern) {
- // Wrap the pattern in a non-capturing group.
- return {
- 'type': 'group',
- 'behavior': 'ignore',
- 'body': [tree],
- 'raw': '(?:' + pattern + ')'
- };
+ t["assert" + type] = function (node, opts) {
+ opts = opts || {};
+ if (!is(node, opts)) {
+ throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts));
+ }
+ };
}
- 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;
- }
+ exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
+ exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;
+ exports.NODE_FIELDS = _definitions.NODE_FIELDS;
+ exports.BUILDER_KEYS = _definitions.BUILDER_KEYS;
+ exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS;
+ exports.react = _react;
- 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;
- };
+ /**
+ * Registers `is[Type]` and `assert[Type]` for all types.
+ */
- 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);
- };
+ for (var type in t.VISITOR_KEYS) {
+ registerType(type);
+ }
+ /**
+ * Flip `ALIAS_KEYS` for faster access in the reverse direction.
+ */
- /***/ },
- /* 524 */
- /*!********************************!*\
- !*** ./~/regjsgen/regjsgen.js ***!
- \********************************/
- /***/ function(module, exports, __webpack_require__) {
+ t.FLIPPED_ALIAS_KEYS = {};
- var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*!
- * RegJSGen
- * Copyright 2014 Benjamin Tan
- * Available under MIT license
+ (0, _each2.default)(t.ALIAS_KEYS, function (aliases, type) {
+ (0, _each2.default)(aliases, function (alias) {
+ var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
+ types.push(type);
+ });
+ });
+
+ /**
+ * Registers `is[Alias]` and `assert[Alias]` functions for all aliases.
*/
- ;(function() {
- 'use strict';
- /** Used to determine if values are of the language type `Object` */
- var objectTypes = {
- 'function': true,
- 'object': true
- };
+ (0, _each2.default)(t.FLIPPED_ALIAS_KEYS, function (types, type) {
+ t[type.toUpperCase() + "_TYPES"] = types;
+ registerType(type);
+ });
- /** Used as a reference to the global object */
- var root = (objectTypes[typeof window] && window) || this;
+ var TYPES = exports.TYPES = (0, _keys2.default)(t.VISITOR_KEYS).concat((0, _keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0, _keys2.default)(t.DEPRECATED_KEYS));
- /** Backup possible global object */
- var oldRoot = root;
+ /**
+ * Returns whether `node` is of given `type`.
+ *
+ * For better performance, use this instead of `is[Type]` when `type` is unknown.
+ * Optionally, pass `skipAliasCheck` to directly compare `node.type` with `type`.
+ */
- /** Detect free variable `exports` */
- var freeExports = objectTypes[typeof exports] && exports;
+ function is(type, node, opts) {
+ if (!node) return false;
- /** Detect free variable `module` */
- var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
+ var matches = isType(node.type, type);
+ if (!matches) return false;
- /** 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;
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return t.shallowEqual(node, opts);
}
+ }
- /*--------------------------------------------------------------------------*/
+ /**
+ * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`.
+ */
- /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */
+ function isType(nodeType, targetType) {
+ if (nodeType === targetType) return true;
- 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);
+ // This is a fast-path. If the test above failed, but an alias key is found, then the
+ // targetType was a primary node type, so there's no need to check the aliases.
+ if (t.ALIAS_KEYS[targetType]) return false;
+
+ var aliases = t.FLIPPED_ALIAS_KEYS[targetType];
+ if (aliases) {
+ if (aliases[0] === nodeType) return true;
+
+ for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
+ var _ref;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref = _iterator[_i++];
} else {
- // 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;
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref = _i.value;
}
+
+ var alias = _ref;
+
+ if (nodeType === alias) return true;
}
- return result;
}
- function assertType(type, expected) {
- if (expected.indexOf('|') == -1) {
- if (type == expected) {
- return;
- }
+ return false;
+ }
- throw Error('Invalid node type: ' + type);
+ /**
+ * Description
+ */
+
+ (0, _each2.default)(t.BUILDER_KEYS, function (keys, type) {
+ function builder() {
+ if (arguments.length > keys.length) {
+ throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length));
}
- expected = assertType.hasOwnProperty(expected)
- ? assertType[expected]
- : (assertType[expected] = RegExp('^(?:' + expected + ')$'));
+ var node = {};
+ node.type = type;
- if (expected.test(type)) {
- return;
+ var i = 0;
+
+ for (var _iterator2 = keys, _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;
+
+ var field = t.NODE_FIELDS[type][_key];
+
+ var arg = arguments[i++];
+ if (arg === undefined) arg = (0, _clone2.default)(field.default);
+
+ node[_key] = arg;
}
- throw Error('Invalid node type: ' + type);
+ for (var key in node) {
+ validate(node, key, node[key]);
+ }
+
+ return node;
}
- /*--------------------------------------------------------------------------*/
+ t[type] = builder;
+ t[type[0].toLowerCase() + type.slice(1)] = builder;
+ });
- function generate(node) {
- var type = node.type;
+ /**
+ * Description
+ */
- if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') {
- return generate[type](node);
- }
+ var _loop = function _loop(_type) {
+ var newType = t.DEPRECATED_KEYS[_type];
- throw Error('Invalid node type: ' + type);
+ function proxy(fn) {
+ return function () {
+ console.trace("The node type " + _type + " has been renamed to " + newType);
+ return fn.apply(this, arguments);
+ };
}
- /*--------------------------------------------------------------------------*/
+ t[_type] = t[_type[0].toLowerCase() + _type.slice(1)] = proxy(t[newType]);
+ t["is" + _type] = proxy(t["is" + newType]);
+ t["assert" + _type] = proxy(t["assert" + newType]);
+ };
- function generateAlternative(node) {
- assertType(node.type, 'alternative');
+ for (var _type in t.DEPRECATED_KEYS) {
+ _loop(_type);
+ }
- var terms = node.body,
- length = terms ? terms.length : 0;
+ /**
+ * Description
+ */
- if (length == 1) {
- return generateTerm(terms[0]);
- } else {
- var i = -1,
- result = '';
+ function validate(node, key, val) {
+ if (!node) return;
+
+ var fields = t.NODE_FIELDS[node.type];
+ if (!fields) return;
+
+ var field = fields[key];
+ if (!field || !field.validate) return;
+ if (field.optional && val == null) return;
+
+ field.validate(node, key, val);
+ }
+
+ /**
+ * Test if an object is shallowly equal.
+ */
- while (++i < length) {
- result += generateTerm(terms[i]);
- }
+ function shallowEqual(actual, expected) {
+ var keys = (0, _keys2.default)(expected);
- return result;
+ for (var _iterator3 = keys, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
+ var _ref3;
+
+ if (_isArray3) {
+ if (_i3 >= _iterator3.length) break;
+ _ref3 = _iterator3[_i3++];
+ } else {
+ _i3 = _iterator3.next();
+ if (_i3.done) break;
+ _ref3 = _i3.value;
}
- }
- function generateAnchor(node) {
- assertType(node.type, 'anchor');
+ var key = _ref3;
- switch (node.kind) {
- case 'start':
- return '^';
- case 'end':
- return '$';
- case 'boundary':
- return '\\b';
- case 'not-boundary':
- return '\\B';
- default:
- throw Error('Invalid assertion');
+ if (actual[key] !== expected[key]) {
+ return false;
}
}
- function generateAtom(node) {
- assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value');
+ return true;
+ }
- return generate(node);
- }
+ /**
+ * Append a node to a member expression.
+ */
- function generateCharacterClass(node) {
- assertType(node.type, 'characterClass');
+ function appendToMemberExpression(member, append, computed) {
+ member.object = t.memberExpression(member.object, member.property, member.computed);
+ member.property = append;
+ member.computed = !!computed;
+ return member;
+ }
- var classRanges = node.body,
- length = classRanges ? classRanges.length : 0;
+ /**
+ * Prepend a node to a member expression.
+ */
- var i = -1,
- result = '[';
+ function prependToMemberExpression(member, prepend) {
+ member.object = t.memberExpression(prepend, member.object);
+ return member;
+ }
- if (node.negative) {
- result += '^';
- }
+ /**
+ * Ensure the `key` (defaults to "body") of a `node` is a block.
+ * Casting it to a block if it is not.
+ */
- while (++i < length) {
- result += generateClassAtom(classRanges[i]);
- }
+ function ensureBlock(node) {
+ var key = arguments.length <= 1 || arguments[1] === undefined ? "body" : arguments[1];
- result += ']';
+ return node[key] = t.toBlock(node[key], node);
+ }
- return result;
+ /**
+ * Create a shallow clone of a `node` excluding `_private` properties.
+ */
+
+ function clone(node) {
+ var newNode = {};
+ for (var key in node) {
+ if (key[0] === "_") continue;
+ newNode[key] = node[key];
}
+ return newNode;
+ }
- function generateCharacterClassEscape(node) {
- assertType(node.type, 'characterClassEscape');
+ /**
+ * Create a shallow clone of a `node` excluding `_private` and location properties.
+ */
- return '\\' + node.value;
- }
+ function cloneWithoutLoc(node) {
+ var newNode = clone(node);
+ delete newNode.loc;
+ return newNode;
+ }
- function generateCharacterClassRange(node) {
- assertType(node.type, 'characterClassRange');
+ /**
+ * Create a deep clone of a `node` and all of it's child nodes
+ * exluding `_private` properties.
+ */
- var min = node.min,
- max = node.max;
+ function cloneDeep(node) {
+ var newNode = {};
- if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {
- throw Error('Invalid character class range');
+ for (var key in node) {
+ if (key[0] === "_") continue;
+
+ var val = node[key];
+
+ if (val) {
+ if (val.type) {
+ val = t.cloneDeep(val);
+ } else if (Array.isArray(val)) {
+ val = val.map(t.cloneDeep);
+ }
}
- return generateClassAtom(min) + '-' + generateClassAtom(max);
+ newNode[key] = val;
}
- function generateClassAtom(node) {
- assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value');
+ return newNode;
+ }
- return generate(node);
- }
+ /**
+ * Build a function that when called will return whether or not the
+ * input `node` `MemberExpression` matches the input `match`.
+ *
+ * For example, given the match `React.createClass` it would match the
+ * parsed nodes of `React.createClass` and `React["createClass"]`.
+ */
- function generateDisjunction(node) {
- assertType(node.type, 'disjunction');
+ function buildMatchMemberExpression(match, allowPartial) {
+ var parts = match.split(".");
- var body = node.body,
- length = body ? body.length : 0;
+ return function (member) {
+ // not a member expression
+ if (!t.isMemberExpression(member)) return false;
- if (length == 0) {
- throw Error('No body');
- } else if (length == 1) {
- return generate(body[0]);
- } else {
- var i = -1,
- result = '';
+ var search = [member];
+ var i = 0;
- while (++i < length) {
- if (i != 0) {
- result += '|';
+ while (search.length) {
+ var node = search.shift();
+
+ if (allowPartial && i === parts.length) {
+ return true;
+ }
+
+ if (t.isIdentifier(node)) {
+ // this part doesn't match
+ if (parts[i] !== node.name) return false;
+ } else if (t.isStringLiteral(node)) {
+ // this part doesn't match
+ if (parts[i] !== node.value) return false;
+ } else if (t.isMemberExpression(node)) {
+ if (node.computed && !t.isStringLiteral(node.property)) {
+ // we can't deal with this
+ return false;
+ } else {
+ search.push(node.object);
+ search.push(node.property);
+ continue;
}
- result += generate(body[i]);
+ } else {
+ // we can't deal with this
+ return false;
}
- return result;
+ // too many parts
+ if (++i > parts.length) {
+ return false;
+ }
}
- }
-
- function generateDot(node) {
- assertType(node.type, 'dot');
-
- return '.';
- }
-
- function generateGroup(node) {
- assertType(node.type, 'group');
- var result = '(';
+ return true;
+ };
+ }
- 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);
- }
+ /**
+ * Remove comment properties from a node.
+ */
- var body = node.body,
- length = body ? body.length : 0;
+ function removeComments(node) {
+ for (var _iterator4 = t.COMMENT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
+ var _ref4;
- if (length == 1) {
- result += generate(body[0]);
+ if (_isArray4) {
+ if (_i4 >= _iterator4.length) break;
+ _ref4 = _iterator4[_i4++];
} else {
- var i = -1;
-
- while (++i < length) {
- result += generate(body[i]);
- }
+ _i4 = _iterator4.next();
+ if (_i4.done) break;
+ _ref4 = _i4.value;
}
- result += ')';
+ var key = _ref4;
- return result;
+ delete node[key];
}
+ return node;
+ }
- function generateQuantifier(node) {
- assertType(node.type, 'quantifier');
-
- var quantifier = '',
- min = node.min,
- max = node.max;
+ /**
+ * Inherit all unique comments from `parent` node to `child` node.
+ */
- 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;
- }
+ function inheritsComments(child, parent) {
+ inheritTrailingComments(child, parent);
+ inheritLeadingComments(child, parent);
+ inheritInnerComments(child, parent);
+ return child;
+ }
- if (!node.greedy) {
- quantifier += '?';
- }
+ function inheritTrailingComments(child, parent) {
+ _inheritComments("trailingComments", child, parent);
+ }
- return generateAtom(node.body[0]) + quantifier;
- }
+ function inheritLeadingComments(child, parent) {
+ _inheritComments("leadingComments", child, parent);
+ }
- function generateReference(node) {
- assertType(node.type, 'reference');
+ function inheritInnerComments(child, parent) {
+ _inheritComments("innerComments", child, parent);
+ }
- return '\\' + node.matchIndex;
+ function _inheritComments(key, child, parent) {
+ if (child && parent) {
+ child[key] = (0, _uniq2.default)((0, _compact2.default)([].concat(child[key], parent[key])));
}
+ }
- function generateTerm(node) {
- assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value');
-
- return generate(node);
- }
+ // Can't use import because of cyclic dependency between babel-traverse
+ // and this module (babel-types). This require needs to appear after
+ // we export the TYPES constant, so we lazy-initialize it before use.
+ var traverse = void 0;
- function generateValue(node) {
- assertType(node.type, 'value');
+ /**
+ * Inherit all contextual properties from `parent` node to `child` node.
+ */
- var kind = node.kind,
- codePoint = node.codePoint;
+ function inherits(child, parent) {
+ if (!traverse) traverse = __webpack_require__(__webpack_module_template_argument_16__).default;
- 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);
- }
- }
+ if (!child || !parent) return child;
- /*--------------------------------------------------------------------------*/
+ // optionally inherit specific properties if not null
+ for (var _iterator5 = t.INHERIT_KEYS.optional, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
+ var _ref5;
- 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;
+ if (_isArray5) {
+ if (_i5 >= _iterator5.length) break;
+ _ref5 = _iterator5[_i5++];
+ } else {
+ _i5 = _iterator5.next();
+ if (_i5.done) break;
+ _ref5 = _i5.value;
+ }
- /*--------------------------------------------------------------------------*/
+ var _key2 = _ref5;
- // export regjsgen
- // some AMD build optimizers, like r.js, check for condition patterns like the following:
- if (true) {
- // define as an anonymous module so, through path mapping, it can be aliased
- !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
- return {
- 'generate': generate
- };
- }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- }
- // 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
- };
+ if (child[_key2] == null) {
+ child[_key2] = parent[_key2];
+ }
}
- }.call(this));
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/module.js */ 143)(module), (function() { return this; }())))
-
- /***/ },
- /* 525 */
- /*!*********************************!*\
- !*** ./~/regjsparser/parser.js ***!
- \*********************************/
- /***/ function(module, exports) {
-
- // 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
+ // force inherit "private" properties
+ for (var key in parent) {
+ if (key[0] === "_") child[key] = parent[key];
+ }
- (function() {
+ // force inherit select properties
+ for (var _iterator6 = t.INHERIT_KEYS.force, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
+ var _ref6;
- function parse(str, flags) {
- function addRaw(node) {
- node.raw = str.substring(node.range[0], node.range[1]);
- return node;
+ if (_isArray6) {
+ if (_i6 >= _iterator6.length) break;
+ _ref6 = _iterator6[_i6++];
+ } else {
+ _i6 = _iterator6.next();
+ if (_i6.done) break;
+ _ref6 = _i6.value;
}
- function updateRawStart(node, start) {
- node.range[0] = start;
- return addRaw(node);
- }
+ var _key3 = _ref6;
- function createAnchor(kind, rawLength) {
- return addRaw({
- type: 'anchor',
- kind: kind,
- range: [
- pos - rawLength,
- pos
- ]
- });
- }
+ child[_key3] = parent[_key3];
+ }
- function createValue(kind, codePoint, from, to) {
- return addRaw({
- type: 'value',
- kind: kind,
- codePoint: codePoint,
- range: [from, to]
- });
- }
+ t.inheritsComments(child, parent);
+ traverse.copyCache(parent, child);
- function createEscaped(kind, codePoint, value, fromOffset) {
- fromOffset = fromOffset || 0;
- return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);
- }
+ return child;
+ }
- 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);
- }
+ /**
+ * TODO
+ */
- function createDisjunction(alternatives, from, to) {
- return addRaw({
- type: 'disjunction',
- body: alternatives,
- range: [
- from,
- to
- ]
- });
- }
+ function assertNode(node) {
+ if (!isNode(node)) {
+ // $FlowFixMe
+ throw new TypeError("Not a valid node " + (node && node.type));
+ }
+ }
- function createDot() {
- return addRaw({
- type: 'dot',
- range: [
- pos - 1,
- pos
- ]
- });
- }
+ /**
+ * TODO
+ */
- function createCharacterClassEscape(value) {
- return addRaw({
- type: 'characterClassEscape',
- value: value,
- range: [
- pos - 2,
- pos
- ]
- });
- }
+ function isNode(node) {
+ return !!(node && _definitions.VISITOR_KEYS[node.type]);
+ }
- function createReference(matchIndex) {
- return addRaw({
- type: 'reference',
- matchIndex: parseInt(matchIndex, 10),
- range: [
- pos - 1 - matchIndex.length,
- pos
- ]
- });
- }
+ // Optimize property access.
+ (0, _toFastProperties2.default)(t);
+ (0, _toFastProperties2.default)(t.VISITOR_KEYS);
- 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;
- }
+ /***/ },
+ /* 8321 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- return addRaw({
- type: 'quantifier',
- min: min,
- max: max,
- greedy: true,
- body: null, // set later on
- range: [
- from,
- to
- ]
- });
- }
+ "use strict";
- function createAlternative(terms, from, to) {
- return addRaw({
- type: 'alternative',
- body: terms,
- range: [
- from,
- to
- ]
- });
- }
+ exports.__esModule = true;
+ exports.isReactComponent = undefined;
+ exports.isCompatTag = isCompatTag;
+ exports.buildChildren = buildChildren;
- function createCharacterClass(classRanges, negative, from, to) {
- return addRaw({
- type: 'characterClass',
- body: classRanges,
- negative: negative,
- range: [
- from,
- to
- ]
- });
- }
+ var _index = __webpack_require__(__webpack_module_template_argument_0__);
- 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);
- }
+ var t = _interopRequireWildcard(_index);
- return addRaw({
- type: 'characterClassRange',
- min: min,
- max: max,
- range: [
- from,
- to
- ]
- });
- }
+ 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 flattenBody(body) {
- if (body.type === 'alternative') {
- return body.body;
- } else {
- return [body];
- }
- }
+ var isReactComponent = exports.isReactComponent = t.buildMatchMemberExpression("React.Component");
- function isEmpty(obj) {
- return obj.type === 'empty';
- }
+ function isCompatTag(tagName) {
+ return !!tagName && /^[a-z]|\-/.test(tagName);
+ }
- function incr(amount) {
- amount = (amount || 1);
- var res = str.substring(pos, pos + amount);
- pos += (amount || 1);
- return res;
- }
+ function cleanJSXElementLiteralChild(child, args) {
+ var lines = child.value.split(/\r\n|\n|\r/);
- function skip(value) {
- if (!match(value)) {
- bail('character', value);
- }
- }
+ var lastNonEmptyLine = 0;
- function match(value) {
- if (str.indexOf(value, pos) === pos) {
- return incr(value.length);
- }
+ for (var i = 0; i < lines.length; i++) {
+ if (lines[i].match(/[^ \t]/)) {
+ lastNonEmptyLine = i;
}
+ }
- function lookahead() {
- return str[pos];
- }
+ var str = "";
- function current(value) {
- return str.indexOf(value, pos) === pos;
+ for (var _i = 0; _i < lines.length; _i++) {
+ var line = lines[_i];
+
+ var isFirstLine = _i === 0;
+ var isLastLine = _i === lines.length - 1;
+ var isLastNonEmptyLine = _i === lastNonEmptyLine;
+
+ // replace rendered whitespace tabs with spaces
+ var trimmedLine = line.replace(/\t/g, " ");
+
+ // trim whitespace touching a newline
+ if (!isFirstLine) {
+ trimmedLine = trimmedLine.replace(/^[ ]+/, "");
}
- function next(value) {
- return str[pos + 1] === value;
+ // trim whitespace touching an endline
+ if (!isLastLine) {
+ trimmedLine = trimmedLine.replace(/[ ]+$/, "");
}
- 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;
+ if (trimmedLine) {
+ if (!isLastNonEmptyLine) {
+ trimmedLine += " ";
}
- return res;
+
+ str += trimmedLine;
}
+ }
- function parseDisjunction() {
- // Disjunction ::
- // Alternative
- // Alternative | Disjunction
- var res = [], from = pos;
- res.push(parseAlternative());
+ if (str) args.push(t.stringLiteral(str));
+ }
- while (match('|')) {
- res.push(parseAlternative());
- }
+ function buildChildren(node) {
+ var elems = [];
- if (res.length === 1) {
- return res[0];
- }
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
- return createDisjunction(res, from, pos);
+ if (t.isJSXText(child)) {
+ cleanJSXElementLiteralChild(child, elems);
+ continue;
}
- function parseAlternative() {
- var res = [], from = pos;
- var term;
+ if (t.isJSXExpressionContainer(child)) child = child.expression;
+ if (t.isJSXEmptyExpression(child)) continue;
- // Alternative ::
- // [empty]
- // Alternative Term
- while (term = parseTerm()) {
- res.push(term);
- }
+ elems.push(child);
+ }
- if (res.length === 1) {
- return res[0];
- }
+ return elems;
+ }
- return createAlternative(res, from, pos);
- }
+ /***/ },
+ /* 8322 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- function parseTerm() {
- // Term ::
- // Anchor
- // Atom
- // Atom Quantifier
+ "use strict";
- if (pos >= str.length || current('|') || current(')')) {
- return null; /* Means: The term is empty */
- }
+ exports.__esModule = true;
- var anchor = parseAnchor();
+ var _create = __webpack_require__(__webpack_module_template_argument_0__);
- if (anchor) {
- return anchor;
- }
+ var _create2 = _interopRequireDefault(_create);
- 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;
- }
+ exports.getBindingIdentifiers = getBindingIdentifiers;
+ exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
- function parseGroup(matchA, typeA, matchB, typeB) {
- var type = null, from = pos;
+ var _index = __webpack_require__(__webpack_module_template_argument_1__);
- if (match(matchA)) {
- type = typeA;
- } else if (match(matchB)) {
- type = typeB;
- } else {
- return false;
- }
+ var t = _interopRequireWildcard(_index);
- var body = parseDisjunction();
- if (!body) {
- bail('Expected disjunction');
- }
- skip(')');
- var group = createGroup(type, flattenBody(body), from, pos);
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
- if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function parseAnchor() {
- // Anchor ::
- // ^
- // $
- // \ b
- // \ B
- // ( ? = Disjunction )
- // ( ? ! Disjunction )
- var res, from = pos;
+ /**
+ * Return a list of binding identifiers associated with the input `node`.
+ */
- 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 getBindingIdentifiers(node, duplicates, outerOnly) {
+ var search = [].concat(node);
+ var ids = (0, _create2.default)(null);
- function parseQuantifier() {
- // Quantifier ::
- // QuantifierPrefix
- // QuantifierPrefix ?
- //
- // QuantifierPrefix ::
- // *
- // +
- // ?
- // { DecimalDigits }
- // { DecimalDigits , }
- // { DecimalDigits , DecimalDigits }
+ while (search.length) {
+ var id = search.shift();
+ if (!id) continue;
- var res, from = pos;
- var quantifier;
- var min, max;
+ var keys = t.getBindingIdentifiers.keys[id.type];
- 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 (t.isIdentifier(id)) {
+ if (duplicates) {
+ var _ids = ids[id.name] = ids[id.name] || [];
+ _ids.push(id);
+ } else {
+ ids[id.name] = id;
}
+ continue;
+ }
- if (quantifier) {
- if (match('?')) {
- quantifier.greedy = false;
- quantifier.range[1] += 1;
- }
+ if (t.isExportDeclaration(id)) {
+ if (t.isDeclaration(node.declaration)) {
+ search.push(node.declaration);
}
-
- return quantifier;
+ continue;
}
- 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;
+ if (outerOnly) {
+ if (t.isFunctionDeclaration(id)) {
+ search.push(id.id);
+ continue;
}
- else {
- // ( Disjunction )
- // ( ? : Disjunction )
- return parseGroup('(?:', 'ignore', '(', 'normal');
+
+ if (t.isFunctionExpression(id)) {
+ continue;
}
}
- 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;
- }
+ if (keys) {
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ if (id[key]) {
+ search = search.concat(id[key]);
}
}
- return firstEscape;
}
+ }
- function parseClassEscape() {
- return parseAtomEscape(true);
- }
+ return ids;
+ }
- function parseAtomEscape(insideCharacterClass) {
- // AtomEscape ::
- // DecimalEscape
- // CharacterEscape
- // CharacterClassEscape
+ /**
+ * Mapping of types to their identifier keys.
+ */
- var res, from = pos;
+ getBindingIdentifiers.keys = {
+ DeclareClass: ["id"],
+ DeclareFunction: ["id"],
+ DeclareModule: ["id"],
+ DeclareVariable: ["id"],
+ InterfaceDeclaration: ["id"],
+ TypeAlias: ["id"],
- res = parseDecimalEscape();
- if (res) {
- return res;
- }
+ CatchClause: ["param"],
+ LabeledStatement: ["label"],
+ UnaryExpression: ["argument"],
+ AssignmentExpression: ["left"],
- // 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);
- }
- }
+ ImportSpecifier: ["local"],
+ ImportNamespaceSpecifier: ["local"],
+ ImportDefaultSpecifier: ["local"],
+ ImportDeclaration: ["specifiers"],
- res = parseCharacterEscape();
+ ExportSpecifier: ["exported"],
+ ExportNamespaceSpecifier: ["exported"],
+ ExportDefaultSpecifier: ["exported"],
- return res;
- }
+ FunctionDeclaration: ["id", "params"],
+ FunctionExpression: ["id", "params"],
+ ClassDeclaration: ["id"],
+ ClassExpression: ["id"],
- function parseDecimalEscape() {
- // DecimalEscape ::
- // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]
- // CharacterClassEscape :: one of d D s S w W
+ RestElement: ["argument"],
+ UpdateExpression: ["argument"],
- var res, match;
+ RestProperty: ["argument"],
+ ObjectProperty: ["value"],
- 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.
+ AssignmentPattern: ["left"],
+ ArrayPattern: ["elements"],
+ ObjectPattern: ["properties"],
- // Recall the negative decision to decide if the input must be parsed
- // a second time with the total normal-groups.
- backrefDenied.push(refIdx);
+ VariableDeclaration: ["declarations"],
+ VariableDeclarator: ["id"]
+ };
- // 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 getOuterBindingIdentifiers(node, duplicates) {
+ return getBindingIdentifiers(node, duplicates, true);
+ }
- function parseCharacterEscape() {
- // CharacterEscape ::
- // ControlEscape
- // c ControlLetter
- // HexEscapeSequence
- // UnicodeEscapeSequence
- // IdentityEscape
+ /***/ },
+ /* 8323 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- 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();
- }
- }
+ "use strict";
- // 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]');
+ exports.__esModule = true;
- 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)));
- }
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_0__);
- function parseIdentityEscape() {
- // IdentityEscape ::
- // SourceCharacter but not IdentifierPart
- //
- //
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
- var ZWJ = '\u200C';
- var ZWNJ = '\u200D';
+ exports.isBinding = isBinding;
+ exports.isReferenced = isReferenced;
+ exports.isValidIdentifier = isValidIdentifier;
+ exports.isLet = isLet;
+ exports.isBlockScoped = isBlockScoped;
+ exports.isVar = isVar;
+ exports.isSpecifierDefault = isSpecifierDefault;
+ exports.isScope = isScope;
+ exports.isImmutable = isImmutable;
- var tmp;
+ var _retrievers = __webpack_require__(__webpack_module_template_argument_1__);
- if (!isIdentifierPart(lookahead())) {
- tmp = incr();
- return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);
- }
+ var _esutils = __webpack_require__(__webpack_module_template_argument_2__);
- if (match(ZWJ)) {
- //
- return createEscaped('identifier', 0x200C, ZWJ);
- } else if (match(ZWNJ)) {
- //
- return createEscaped('identifier', 0x200D, ZWNJ);
- }
+ var _esutils2 = _interopRequireDefault(_esutils);
- return null;
- }
+ var _index = __webpack_require__(__webpack_module_template_argument_3__);
- function parseCharacterClass() {
- // CharacterClass ::
- // [ [lookahead ∉ {^}] ClassRanges ]
- // [ ^ ClassRanges ]
+ var t = _interopRequireWildcard(_index);
- 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);
- }
+ var _constants = __webpack_require__(__webpack_module_template_argument_4__);
- return null;
- }
+ 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 parseClassRanges() {
- // ClassRanges ::
- // [empty]
- // NonemptyClassRanges
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var res;
- if (current(']')) {
- // Empty array means nothing insinde of the ClassRange.
- return [];
+ /**
+ * Check if the input `node` is a binding identifier.
+ */
+
+ /* eslint indent: 0 */
+
+ function isBinding(node, parent) {
+ var keys = _retrievers.getBindingIdentifiers.keys[parent.type];
+ if (keys) {
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var val = parent[key];
+ if (Array.isArray(val)) {
+ if (val.indexOf(node) >= 0) return true;
} else {
- res = parseNonemptyClassRanges();
- if (!res) {
- bail('nonEmptyClassRanges');
- }
- return res;
+ if (val === node) return true;
}
}
+ }
- function parseHelperClassRanges(atom) {
- var from, to, res;
- if (current('-') && !next(']')) {
- // ClassAtom - ClassAtom ClassRanges
- skip('-');
+ return false;
+ }
- 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);
- }
+ /**
+ * Check if the input `node` is a reference to a bound variable.
+ */
- res = parseNonemptyClassRangesNoDash();
- if (!res) {
- bail('nonEmptyClassRangesNoDash');
- }
+ function isReferenced(node, parent) {
+ switch (parent.type) {
+ // yes: object::NODE
+ // yes: NODE::callee
+ case "BindExpression":
+ return parent.object === node || parent.callee === node;
- return [atom].concat(res);
- }
+ // yes: PARENT[NODE]
+ // yes: NODE.child
+ // no: parent.NODE
+ case "MemberExpression":
+ case "JSXMemberExpression":
+ if (parent.property === node && parent.computed) {
+ return true;
+ } else if (parent.object === node) {
+ return true;
+ } else {
+ return false;
+ }
- function parseNonemptyClassRanges() {
- // NonemptyClassRanges ::
- // ClassAtom
- // ClassAtom NonemptyClassRangesNoDash
- // ClassAtom - ClassAtom ClassRanges
+ // no: new.NODE
+ // no: NODE.target
+ case "MetaProperty":
+ return false;
- var atom = parseClassAtom();
- if (!atom) {
- bail('classAtom');
+ // yes: { [NODE]: "" }
+ // yes: { NODE }
+ // no: { NODE: "" }
+ case "ObjectProperty":
+ if (parent.key === node) {
+ return parent.computed;
}
- if (current(']')) {
- // ClassAtom
- return [atom];
- }
+ // no: let NODE = init;
+ // yes: let id = NODE;
+ case "VariableDeclarator":
+ return parent.id !== node;
- // ClassAtom NonemptyClassRangesNoDash
- // ClassAtom - ClassAtom ClassRanges
- return parseHelperClassRanges(atom);
- }
+ // no: function NODE() {}
+ // no: function foo(NODE) {}
+ case "ArrowFunctionExpression":
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ for (var _iterator = parent.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
+ var _ref;
- function parseNonemptyClassRangesNoDash() {
- // NonemptyClassRangesNoDash ::
- // ClassAtom
- // ClassAtomNoDash NonemptyClassRangesNoDash
- // ClassAtomNoDash - ClassAtom ClassRanges
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref = _i.value;
+ }
- var res = parseClassAtom();
- if (!res) {
- bail('classAtom');
- }
- if (current(']')) {
- // ClassAtom
- return res;
+ var param = _ref;
+
+ if (param === node) return false;
}
- // ClassAtomNoDash NonemptyClassRangesNoDash
- // ClassAtomNoDash - ClassAtom ClassRanges
- return parseHelperClassRanges(res);
- }
+ return parent.id !== node;
- function parseClassAtom() {
- // ClassAtom ::
- // -
- // ClassAtomNoDash
- if (match('-')) {
- return createCharacter('-');
+ // no: export { foo as NODE };
+ // yes: export { NODE as foo };
+ // no: export { NODE as foo } from "foo";
+ case "ExportSpecifier":
+ if (parent.source) {
+ return false;
} else {
- return parseClassAtomNoDash();
+ return parent.local === node;
}
- }
- function parseClassAtomNoDash() {
- // ClassAtomNoDash ::
- // SourceCharacter but not one of \ or ] or -
- // \ ClassEscape
+ // no: export NODE from "foo";
+ // no: export * as NODE from "foo";
+ case "ExportNamespaceSpecifier":
+ case "ExportDefaultSpecifier":
+ return false;
- var res;
- if (res = matchReg(/^[^\\\]-]/)) {
- return createCharacter(res[0]);
- } else if (match('\\')) {
- res = parseClassEscape();
- if (!res) {
- bail('classEscape');
- }
+ // no:
+ case "JSXAttribute":
+ return parent.name !== node;
- return parseUnicodeSurrogatePairEscape(res);
- }
- }
+ // no: class { NODE = value; }
+ // yes: class { key = NODE; }
+ case "ClassProperty":
+ return parent.value === node;
- function bail(message, details, from, to) {
- from = from == null ? pos : from;
- to = to == null ? from : to;
+ // no: import NODE from "foo";
+ // no: import * as NODE from "foo";
+ // no: import { NODE as foo } from "foo";
+ // no: import { foo as NODE } from "foo";
+ // no: import NODE from "bar";
+ case "ImportDefaultSpecifier":
+ case "ImportNamespaceSpecifier":
+ case "ImportSpecifier":
+ return false;
- var contextStart = Math.max(0, from - 10);
- var contextEnd = Math.min(to + 10, str.length);
+ // no: class NODE {}
+ case "ClassDeclaration":
+ case "ClassExpression":
+ return parent.id !== node;
- // 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(' ') + '^';
+ // yes: class { [NODE]() {} }
+ case "ClassMethod":
+ case "ObjectMethod":
+ return parent.key === node && parent.computed;
+
+ // no: NODE: for (;;) {}
+ case "LabeledStatement":
+ return false;
+
+ // no: try {} catch (NODE) {}
+ case "CatchClause":
+ return parent.param !== node;
+
+ // no: function foo(...NODE) {}
+ case "RestElement":
+ return false;
+
+ // yes: left = NODE;
+ // no: NODE = right;
+ case "AssignmentExpression":
+ return parent.right === node;
+
+ // no: [NODE = foo] = [];
+ // yes: [foo = NODE] = [];
+ case "AssignmentPattern":
+ return parent.right === node;
+
+ // no: [NODE] = [];
+ // no: ({ NODE }) = [];
+ case "ObjectPattern":
+ case "ArrayPattern":
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if the input `name` is a valid identifier name
+ * and isn't a reserved word.
+ */
+
+ function isValidIdentifier(name) {
+ if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) {
+ return false;
+ } else {
+ return _esutils2.default.keyword.isIdentifierNameES6(name);
+ }
+ }
+
+ /**
+ * Check if the input `node` is a `let` variable declaration.
+ */
+
+ function isLet(node) {
+ return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
+ }
+
+ /**
+ * Check if the input `node` is block scoped.
+ */
+
+ function isBlockScoped(node) {
+ return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node);
+ }
+
+ /**
+ * Check if the input `node` is a variable declaration.
+ */
+
+ function isVar(node) {
+ return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
+ }
+
+ /**
+ * Check if the input `specifier` is a `default` import or export.
+ */
+
+ function isSpecifierDefault(specifier) {
+ return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" });
+ }
- throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\n' + context + '\n' + pointer);
- }
+ /**
+ * Check if the input `node` is a scope.
+ */
- var backrefDenied = [];
- var closedCaptureCounter = 0;
- var firstIteration = true;
- var hasUnicodeFlag = (flags || "").indexOf("u") !== -1;
- var pos = 0;
+ function isScope(node, parent) {
+ if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) {
+ return false;
+ }
- // Convert the input to a string and treat the empty string special.
- str = String(str);
- if (str === '') {
- str = '(?:)';
- }
+ return t.isScopable(node);
+ }
- var result = parseDisjunction();
+ /**
+ * Check if the input `node` is definitely immutable.
+ */
- if (result.range[1] !== str.length) {
- bail('Could not parse entire input - got stuck', '', result.range[1]);
- }
+ function isImmutable(node) {
+ if (t.isType(node.type, "Immutable")) return true;
- // 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();
- }
+ if (t.isIdentifier(node)) {
+ if (node.name === "undefined") {
+ // immutable!
+ return true;
+ } else {
+ // no idea...
+ return false;
}
-
- return result;
}
- var regjsparser = {
- parse: parse
- };
-
- if (typeof module !== 'undefined' && module.exports) {
- module.exports = regjsparser;
- } else {
- window.regjsparser = regjsparser;
- }
+ return false;
+ }
- }());
+ /***/ },
+ /* 8324 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+ var getNative = __webpack_require__(__webpack_module_template_argument_0__),
+ root = __webpack_require__(__webpack_module_template_argument_1__);
- /***/ },
- /* 526 */
- /*!**********************************!*\
- !*** ./~/shebang-regex/index.js ***!
- \**********************************/
- /***/ function(module, exports) {
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(root, 'DataView');
- 'use strict';
- module.exports = /^#!.*/;
+ module.exports = DataView;
/***/ },
- /* 527 */
- /*!************************************!*\
- !*** ./~/source-map/lib/base64.js ***!
- \************************************/
- /***/ function(module, exports) {
+ /* 8325 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
+ var hashClear = __webpack_require__(__webpack_module_template_argument_0__),
+ hashDelete = __webpack_require__(__webpack_module_template_argument_1__),
+ hashGet = __webpack_require__(__webpack_module_template_argument_2__),
+ hashHas = __webpack_require__(__webpack_module_template_argument_3__),
+ hashSet = __webpack_require__(__webpack_module_template_argument_4__);
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
*/
- {
- var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+ function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
- /**
- * Encode an integer in the range of 0 to 63 to a single base 64 digit.
- */
- exports.encode = function (number) {
- if (0 <= number && number < intToCharMap.length) {
- return intToCharMap[number];
- }
- throw new TypeError("Must be between 0 and 63: " + number);
- };
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
- /**
- * Decode a single base 64 character code digit to an integer. Returns -1 on
- * failure.
- */
- exports.decode = function (charCode) {
- var bigA = 65; // 'A'
- var bigZ = 90; // 'Z'
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
- var littleA = 97; // 'a'
- var littleZ = 122; // 'z'
+ module.exports = Hash;
- var zero = 48; // '0'
- var nine = 57; // '9'
- var plus = 43; // '+'
- var slash = 47; // '/'
+ /***/ },
+ /* 8326 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- var littleOffset = 26;
- var numberOffset = 52;
+ var listCacheClear = __webpack_require__(__webpack_module_template_argument_0__),
+ listCacheDelete = __webpack_require__(__webpack_module_template_argument_1__),
+ listCacheGet = __webpack_require__(__webpack_module_template_argument_2__),
+ listCacheHas = __webpack_require__(__webpack_module_template_argument_3__),
+ listCacheSet = __webpack_require__(__webpack_module_template_argument_4__);
- // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
- if (bigA <= charCode && charCode <= bigZ) {
- return (charCode - bigA);
- }
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
- // 26 - 51: abcdefghijklmnopqrstuvwxyz
- if (littleA <= charCode && charCode <= littleZ) {
- return (charCode - littleA + littleOffset);
- }
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
- // 52 - 61: 0123456789
- if (zero <= charCode && charCode <= nine) {
- return (charCode - zero + numberOffset);
- }
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
- // 62: +
- if (charCode == plus) {
- return 62;
- }
+ module.exports = ListCache;
- // 63: /
- if (charCode == slash) {
- return 63;
- }
- // Invalid base64 digit.
- return -1;
- };
- }
+ /***/ },
+ /* 8327 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ var getNative = __webpack_require__(__webpack_module_template_argument_0__),
+ root = __webpack_require__(__webpack_module_template_argument_1__);
+
+ /* Built-in method references that are verified to be native. */
+ var Map = getNative(root, 'Map');
+
+ module.exports = Map;
/***/ },
- /* 528 */
- /*!*******************************************!*\
- !*** ./~/source-map/lib/binary-search.js ***!
- \*******************************************/
- /***/ function(module, exports) {
+ /* 8328 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
+ var mapCacheClear = __webpack_require__(__webpack_module_template_argument_0__),
+ mapCacheDelete = __webpack_require__(__webpack_module_template_argument_1__),
+ mapCacheGet = __webpack_require__(__webpack_module_template_argument_2__),
+ mapCacheHas = __webpack_require__(__webpack_module_template_argument_3__),
+ mapCacheSet = __webpack_require__(__webpack_module_template_argument_4__);
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
*/
- {
- exports.GREATEST_LOWER_BOUND = 1;
- exports.LEAST_UPPER_BOUND = 2;
+ function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
- /**
- * Recursive implementation of binary search.
- *
- * @param aLow Indices here and lower do not contain the needle.
- * @param aHigh Indices here and higher do not contain the needle.
- * @param aNeedle The element being searched for.
- * @param aHaystack The non-empty array being searched.
- * @param aCompare Function which takes two elements and returns -1, 0, or 1.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- */
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
- // This function terminates when one of the following is true:
- //
- // 1. We find the exact element we are looking for.
- //
- // 2. We did not find the exact element, but we can return the index of
- // the next-closest element.
- //
- // 3. We did not find the exact element, and there is no next-closest
- // element than the one we are searching for, so we return -1.
- var mid = Math.floor((aHigh - aLow) / 2) + aLow;
- var cmp = aCompare(aNeedle, aHaystack[mid], true);
- if (cmp === 0) {
- // Found the element we are looking for.
- return mid;
- }
- else if (cmp > 0) {
- // Our needle is greater than aHaystack[mid].
- if (aHigh - mid > 1) {
- // The element is in the upper half.
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
- }
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
- // The exact needle element was not found in this haystack. Determine if
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return aHigh < aHaystack.length ? aHigh : -1;
- } else {
- return mid;
- }
- }
- else {
- // Our needle is less than aHaystack[mid].
- if (mid - aLow > 1) {
- // The element is in the lower half.
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
- }
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return mid;
- } else {
- return aLow < 0 ? -1 : aLow;
- }
- }
- }
+ module.exports = MapCache;
- /**
- * This is an implementation of binary search which will always try and return
- * the index of the closest element if there is no exact hit. This is because
- * mappings between original and generated line/col pairs are single points,
- * and there is an implicit region between each of them, so a miss just means
- * that you aren't on the very start of a region.
- *
- * @param aNeedle The element you are looking for.
- * @param aHaystack The array that is being searched.
- * @param aCompare A function which takes the needle and an element in the
- * array and returns -1, 0, or 1 depending on whether the needle is less
- * than, equal to, or greater than the element, respectively.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
- */
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
- if (aHaystack.length === 0) {
- return -1;
- }
- var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
- aCompare, aBias || exports.GREATEST_LOWER_BOUND);
- if (index < 0) {
- return -1;
- }
+ /***/ },
+ /* 8329 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- // We have found either the exact element, or the next-closest element than
- // the one we are searching for. However, there may be more than one such
- // element. Make sure we always return the smallest of these.
- while (index - 1 >= 0) {
- if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
- break;
- }
- --index;
- }
+ var getNative = __webpack_require__(__webpack_module_template_argument_0__),
+ root = __webpack_require__(__webpack_module_template_argument_1__);
- return index;
- };
- }
+ /* Built-in method references that are verified to be native. */
+ var Promise = getNative(root, 'Promise');
+
+ module.exports = Promise;
/***/ },
- /* 529 */
- /*!******************************************!*\
- !*** ./~/source-map/lib/mapping-list.js ***!
- \******************************************/
- /***/ function(module, exports, __webpack_require__) {
+ /* 8330 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2014 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(/*! ./util */ 68);
+ var root = __webpack_require__(__webpack_module_template_argument_0__);
- /**
- * Determine whether mappingB is after mappingA with respect to generated
- * position.
- */
- function generatedPositionAfter(mappingA, mappingB) {
- // Optimized for most common case
- var lineA = mappingA.generatedLine;
- var lineB = mappingB.generatedLine;
- var columnA = mappingA.generatedColumn;
- var columnB = mappingB.generatedColumn;
- return lineB > lineA || lineB == lineA && columnB >= columnA ||
- util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
- }
+ /** Built-in value references. */
+ var Reflect = root.Reflect;
- /**
- * A data structure to provide a sorted view of accumulated mappings in a
- * performance conscious manner. It trades a neglibable overhead in general
- * case for a large speedup in case of mappings being added in order.
- */
- function MappingList() {
- this._array = [];
- this._sorted = true;
- // Serves as infimum
- this._last = {generatedLine: -1, generatedColumn: 0};
- }
+ module.exports = Reflect;
- /**
- * Iterate through internal items. This method takes the same arguments that
- * `Array.prototype.forEach` takes.
- *
- * NOTE: The order of the mappings is NOT guaranteed.
- */
- MappingList.prototype.unsortedForEach =
- function MappingList_forEach(aCallback, aThisArg) {
- this._array.forEach(aCallback, aThisArg);
- };
- /**
- * Add the given source mapping.
- *
- * @param Object aMapping
- */
- MappingList.prototype.add = function MappingList_add(aMapping) {
- if (generatedPositionAfter(this._last, aMapping)) {
- this._last = aMapping;
- this._array.push(aMapping);
- } else {
- this._sorted = false;
- this._array.push(aMapping);
- }
- };
+ /***/ },
+ /* 8331 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- /**
- * Returns the flat, sorted array of mappings. The mappings are sorted by
- * generated position.
- *
- * WARNING: This method returns internal data without copying, for
- * performance. The return value must NOT be mutated, and should be treated as
- * an immutable borrow. If you want to take ownership, you must make your own
- * copy.
- */
- MappingList.prototype.toArray = function MappingList_toArray() {
- if (!this._sorted) {
- this._array.sort(util.compareByGeneratedPositionsInflated);
- this._sorted = true;
- }
- return this._array;
- };
+ var getNative = __webpack_require__(__webpack_module_template_argument_0__),
+ root = __webpack_require__(__webpack_module_template_argument_1__);
- exports.MappingList = MappingList;
- }
+ /* Built-in method references that are verified to be native. */
+ var Set = getNative(root, 'Set');
+
+ module.exports = Set;
/***/ },
- /* 530 */
- /*!****************************************!*\
- !*** ./~/source-map/lib/quick-sort.js ***!
- \****************************************/
- /***/ function(module, exports) {
+ /* 8332 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- // It turns out that some (most?) JavaScript engines don't self-host
- // `Array.prototype.sort`. This makes sense because C++ will likely remain
- // faster than JS when doing raw CPU-intensive sorting. However, when using a
- // custom comparator function, calling back and forth between the VM's C++ and
- // JIT'd JS is rather slow *and* loses JIT type information, resulting in
- // worse generated code for the comparator function than would be optimal. In
- // fact, when sorting with a comparator, these costs outweigh the benefits of
- // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
- // a ~3500ms mean speed-up in `bench/bench.html`.
+ var MapCache = __webpack_require__(__webpack_module_template_argument_0__),
+ setCacheAdd = __webpack_require__(__webpack_module_template_argument_1__),
+ setCacheHas = __webpack_require__(__webpack_module_template_argument_2__);
- /**
- * Swap the elements indexed by `x` and `y` in the array `ary`.
- *
- * @param {Array} ary
- * The array.
- * @param {Number} x
- * The index of the first item.
- * @param {Number} y
- * The index of the second item.
- */
- function swap(ary, x, y) {
- var temp = ary[x];
- ary[x] = ary[y];
- ary[y] = temp;
- }
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
- /**
- * Returns a random integer within the range `low .. high` inclusive.
- *
- * @param {Number} low
- * The lower bound on the range.
- * @param {Number} high
- * The upper bound on the range.
- */
- function randomIntInRange(low, high) {
- return Math.round(low + (Math.random() * (high - low)));
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
}
+ }
- /**
- * The Quick Sort algorithm.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- * @param {Number} p
- * Start index of the array
- * @param {Number} r
- * End index of the array
- */
- function doQuickSort(ary, comparator, p, r) {
- // If our lower bound is less than our upper bound, we (1) partition the
- // array into two pieces and (2) recurse on each half. If it is not, this is
- // the empty array and our base case.
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
- if (p < r) {
- // (1) Partitioning.
- //
- // The partitioning chooses a pivot between `p` and `r` and moves all
- // elements that are less than or equal to the pivot to the before it, and
- // all the elements that are greater than it after it. The effect is that
- // once partition is done, the pivot is in the exact place it will be when
- // the array is put in sorted order, and it will not need to be moved
- // again. This runs in O(n) time.
-
- // Always choose a random pivot so that an input array which is reverse
- // sorted does not cause O(n^2) running time.
- var pivotIndex = randomIntInRange(p, r);
- var i = p - 1;
-
- swap(ary, pivotIndex, r);
- var pivot = ary[r];
-
- // Immediately after `j` is incremented in this loop, the following hold
- // true:
- //
- // * Every element in `ary[p .. i]` is less than or equal to the pivot.
- //
- // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
- for (var j = p; j < r; j++) {
- if (comparator(ary[j], pivot) <= 0) {
- i += 1;
- swap(ary, i, j);
- }
- }
+ module.exports = SetCache;
- swap(ary, i + 1, j);
- var q = i + 1;
- // (2) Recurse on each half.
+ /***/ },
+ /* 8333 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) {
- doQuickSort(ary, comparator, p, q - 1);
- doQuickSort(ary, comparator, q + 1, r);
- }
- }
+ var ListCache = __webpack_require__(__webpack_module_template_argument_0__),
+ stackClear = __webpack_require__(__webpack_module_template_argument_1__),
+ stackDelete = __webpack_require__(__webpack_module_template_argument_2__),
+ stackGet = __webpack_require__(__webpack_module_template_argument_3__),
+ stackHas = __webpack_require__(__webpack_module_template_argument_4__),
+ stackSet = __webpack_require__(__webpack_module_template_argument_5__);
- /**
- * Sort the given array in-place with the given comparator function.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- */
- exports.quickSort = function (ary, comparator) {
- doQuickSort(ary, comparator, 0, ary.length - 1);
- };
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ this.__data__ = new ListCache(entries);
}
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ module.exports = Stack;
+
/***/ },
- /* 531 */
- /*!*************************************************!*\
- !*** ./~/source-map/lib/source-map-consumer.js ***!
- \*************************************************/
- /***/ function(module, exports, __webpack_require__) {
+ /* 8334 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(/*! ./util */ 68);
- var binarySearch = __webpack_require__(/*! ./binary-search */ 528);
- var ArraySet = __webpack_require__(/*! ./array-set */ 238).ArraySet;
- var base64VLQ = __webpack_require__(/*! ./base64-vlq */ 239);
- var quickSort = __webpack_require__(/*! ./quick-sort */ 530).quickSort;
+ var root = __webpack_require__(__webpack_module_template_argument_0__);
- function SourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
+ /** Built-in value references. */
+ var Symbol = root.Symbol;
- return sourceMap.sections != null
- ? new IndexedSourceMapConsumer(sourceMap)
- : new BasicSourceMapConsumer(sourceMap);
- }
+ module.exports = Symbol;
- SourceMapConsumer.fromSourceMap = function(aSourceMap) {
- return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
- }
- /**
- * The version of the source mapping spec that we are consuming.
- */
- SourceMapConsumer.prototype._version = 3;
-
- // `__generatedMappings` and `__originalMappings` are arrays that hold the
- // parsed mapping coordinates from the source map's "mappings" attribute. They
- // are lazily instantiated, accessed via the `_generatedMappings` and
- // `_originalMappings` getters respectively, and we only parse the mappings
- // and create these arrays once queried for a source location. We jump through
- // these hoops because there can be many thousands of mappings, and parsing
- // them is expensive, so we only want to do it if we must.
- //
- // Each object in the arrays is of the form:
- //
- // {
- // generatedLine: The line number in the generated code,
- // generatedColumn: The column number in the generated code,
- // source: The path to the original source file that generated this
- // chunk of code,
- // originalLine: The line number in the original source that
- // corresponds to this chunk of generated code,
- // originalColumn: The column number in the original source that
- // corresponds to this chunk of generated code,
- // name: The name of the original symbol which generated this chunk of
- // code.
- // }
- //
- // All properties except for `generatedLine` and `generatedColumn` can be
- // `null`.
- //
- // `_generatedMappings` is ordered by the generated positions.
- //
- // `_originalMappings` is ordered by the original positions.
+ /***/ },
+ /* 8335 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- SourceMapConsumer.prototype.__generatedMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
- get: function () {
- if (!this.__generatedMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
+ var root = __webpack_require__(__webpack_module_template_argument_0__);
- return this.__generatedMappings;
- }
- });
+ /** Built-in value references. */
+ var Uint8Array = root.Uint8Array;
- SourceMapConsumer.prototype.__originalMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
- get: function () {
- if (!this.__originalMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
+ module.exports = Uint8Array;
- return this.__originalMappings;
- }
- });
- SourceMapConsumer.prototype._charIsMappingSeparator =
- function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
- var c = aStr.charAt(index);
- return c === ";" || c === ",";
- };
+ /***/ },
+ /* 8336 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- SourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- throw new Error("Subclasses must implement _parseMappings");
- };
+ var getNative = __webpack_require__(__webpack_module_template_argument_0__),
+ root = __webpack_require__(__webpack_module_template_argument_1__);
- SourceMapConsumer.GENERATED_ORDER = 1;
- SourceMapConsumer.ORIGINAL_ORDER = 2;
+ /* Built-in method references that are verified to be native. */
+ var WeakMap = getNative(root, 'WeakMap');
- SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
- SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+ module.exports = WeakMap;
- /**
- * Iterate over each mapping between an original source/line/column and a
- * generated line/column in this source map.
- *
- * @param Function aCallback
- * The function that is called with each mapping.
- * @param Object aContext
- * Optional. If specified, this object will be the value of `this` every
- * time that `aCallback` is called.
- * @param aOrder
- * Either `SourceMapConsumer.GENERATED_ORDER` or
- * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
- * iterate over the mappings sorted by the generated file's line/column
- * order or the original's source/line/column order, respectively. Defaults to
- * `SourceMapConsumer.GENERATED_ORDER`.
- */
- SourceMapConsumer.prototype.eachMapping =
- function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
- var context = aContext || null;
- var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
-
- var mappings;
- switch (order) {
- case SourceMapConsumer.GENERATED_ORDER:
- mappings = this._generatedMappings;
- break;
- case SourceMapConsumer.ORIGINAL_ORDER:
- mappings = this._originalMappings;
- break;
- default:
- throw new Error("Unknown order of iteration.");
- }
- var sourceRoot = this.sourceRoot;
- mappings.map(function (mapping) {
- var source = mapping.source === null ? null : this._sources.at(mapping.source);
- if (source != null && sourceRoot != null) {
- source = util.join(sourceRoot, source);
- }
- return {
- source: source,
- generatedLine: mapping.generatedLine,
- generatedColumn: mapping.generatedColumn,
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: mapping.name === null ? null : this._names.at(mapping.name)
- };
- }, this).forEach(aCallback, context);
- };
+ /***/ },
+ /* 8337 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- /**
- * Returns all generated line and column information for the original source,
- * line, and column provided. If no column is provided, returns all mappings
- * corresponding to a either the line we are searching for or the next
- * closest line that has any mappings. Otherwise, returns all mappings
- * corresponding to the given line and either the column we are searching for
- * or the next closest column that has any offsets.
- *
- * The only argument is an object with the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: Optional. the column number in the original source.
- *
- * and an array of objects is returned, each with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- SourceMapConsumer.prototype.allGeneratedPositionsFor =
- function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
- var line = util.getArg(aArgs, 'line');
-
- // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
- // returns the index of the closest mapping less than the needle. By
- // setting needle.originalColumn to 0, we thus find the last mapping for
- // the given line, provided such a mapping exists.
- var needle = {
- source: util.getArg(aArgs, 'source'),
- originalLine: line,
- originalColumn: util.getArg(aArgs, 'column', 0)
- };
+ var baseIndexOf = __webpack_require__(__webpack_module_template_argument_0__);
- if (this.sourceRoot != null) {
- needle.source = util.relative(this.sourceRoot, needle.source);
- }
- if (!this._sources.has(needle.source)) {
- return [];
- }
- needle.source = this._sources.indexOf(needle.source);
-
- var mappings = [];
-
- var index = this._findMapping(needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- binarySearch.LEAST_UPPER_BOUND);
- if (index >= 0) {
- var mapping = this._originalMappings[index];
-
- if (aArgs.column === undefined) {
- var originalLine = mapping.originalLine;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we found. Since
- // mappings are sorted, this is guaranteed to find all mappings for
- // the line we found.
- while (mapping && mapping.originalLine === originalLine) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to search.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ var length = array ? array.length : 0;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
- mapping = this._originalMappings[++index];
- }
- } else {
- var originalColumn = mapping.originalColumn;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we were searching for.
- // Since mappings are sorted, this is guaranteed to find all mappings for
- // the line we are searching for.
- while (mapping &&
- mapping.originalLine === line &&
- mapping.originalColumn == originalColumn) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
+ module.exports = arrayIncludes;
- mapping = this._originalMappings[++index];
- }
- }
- }
- return mappings;
- };
+ /***/ },
+ /* 8338 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- exports.SourceMapConsumer = SourceMapConsumer;
+ var eq = __webpack_require__(__webpack_module_template_argument_0__);
- /**
- * A BasicSourceMapConsumer instance represents a parsed source map which we can
- * query for information about the original file positions by giving it a file
- * position in the generated source.
- *
- * The only parameter is the raw source map (either as a JSON string, or
- * already parsed to an object). According to the spec, source maps have the
- * following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - sources: An array of URLs to the original source files.
- * - names: An array of identifiers which can be referrenced by individual mappings.
- * - sourceRoot: Optional. The URL root from which all sources are relative.
- * - sourcesContent: Optional. An array of contents of the original source files.
- * - mappings: A string of base64 VLQs which contain the actual mappings.
- * - file: Optional. The generated file this source map is associated with.
- *
- * Here is an example source map, taken from the source map spec[0]:
- *
- * {
- * version : 3,
- * file: "out.js",
- * sourceRoot : "",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AA,AB;;ABCDE;"
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
- */
- function BasicSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- var version = util.getArg(sourceMap, 'version');
- var sources = util.getArg(sourceMap, 'sources');
- // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
- // requires the array) to play nice here.
- var names = util.getArg(sourceMap, 'names', []);
- var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
- var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
- var mappings = util.getArg(sourceMap, 'mappings');
- var file = util.getArg(sourceMap, 'file', null);
-
- // Once again, Sass deviates from the spec and supplies the version as a
- // string rather than a number, so we use loose equality checking here.
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
-
- sources = sources
- // Some source maps produce relative source paths like "./foo.js" instead of
- // "foo.js". Normalize these first so that future comparisons will succeed.
- // See bugzil.la/1090768.
- .map(util.normalize)
- // Always ensure that absolute sources are internally stored relative to
- // the source root, if the source root is absolute. Not doing this would
- // be particularly problematic when the source root is a prefix of the
- // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
- .map(function (source) {
- return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
- ? util.relative(sourceRoot, source)
- : source;
- });
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- // Pass `true` below to allow duplicate names and sources. While source maps
- // are intended to be compressed and deduplicated, the TypeScript compiler
- // sometimes generates source maps with duplicates in them. See Github issue
- // #72 and bugzil.la/889492.
- this._names = ArraySet.fromArray(names, true);
- this._sources = ArraySet.fromArray(sources, true);
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- this.sourceRoot = sourceRoot;
- this.sourcesContent = sourcesContent;
- this._mappings = mappings;
- this.file = file;
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function assignInDefaults(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
}
+ return objValue;
+ }
- BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+ module.exports = assignInDefaults;
- /**
- * Create a BasicSourceMapConsumer from a SourceMapGenerator.
- *
- * @param SourceMapGenerator aSourceMap
- * The source map that will be consumed.
- * @returns BasicSourceMapConsumer
- */
- BasicSourceMapConsumer.fromSourceMap =
- function SourceMapConsumer_fromSourceMap(aSourceMap) {
- var smc = Object.create(BasicSourceMapConsumer.prototype);
-
- var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
- var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
- smc.sourceRoot = aSourceMap._sourceRoot;
- smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
- smc.sourceRoot);
- smc.file = aSourceMap._file;
-
- // Because we are modifying the entries (by converting string sources and
- // names to indices into the sources and names ArraySets), we have to make
- // a copy of the entry or else bad things happen. Shared mutable state
- // strikes again! See github issue #191.
-
- var generatedMappings = aSourceMap._mappings.toArray().slice();
- var destGeneratedMappings = smc.__generatedMappings = [];
- var destOriginalMappings = smc.__originalMappings = [];
-
- for (var i = 0, length = generatedMappings.length; i < length; i++) {
- var srcMapping = generatedMappings[i];
- var destMapping = new Mapping;
- destMapping.generatedLine = srcMapping.generatedLine;
- destMapping.generatedColumn = srcMapping.generatedColumn;
-
- if (srcMapping.source) {
- destMapping.source = sources.indexOf(srcMapping.source);
- destMapping.originalLine = srcMapping.originalLine;
- destMapping.originalColumn = srcMapping.originalColumn;
-
- if (srcMapping.name) {
- destMapping.name = names.indexOf(srcMapping.name);
- }
- destOriginalMappings.push(destMapping);
- }
+ /***/ },
+ /* 8339 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- destGeneratedMappings.push(destMapping);
- }
+ var eq = __webpack_require__(__webpack_module_template_argument_0__);
- quickSort(smc.__originalMappings, util.compareByOriginalPositions);
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- return smc;
- };
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- /**
- * The version of the source mapping spec that we are consuming.
- */
- BasicSourceMapConsumer.prototype._version = 3;
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
- /**
- * The list of original sources.
- */
- Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
- get: function () {
- return this._sources.toArray().map(function (s) {
- return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
- }, this);
- }
- });
+ module.exports = assignValue;
- /**
- * Provide the JIT with a nice shape / hidden class.
- */
- function Mapping() {
- this.generatedLine = 0;
- this.generatedColumn = 0;
- this.source = null;
- this.originalLine = null;
- this.originalColumn = null;
- this.name = null;
- }
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- BasicSourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- var generatedLine = 1;
- var previousGeneratedColumn = 0;
- var previousOriginalLine = 0;
- var previousOriginalColumn = 0;
- var previousSource = 0;
- var previousName = 0;
- var length = aStr.length;
- var index = 0;
- var cachedSegments = {};
- var temp = {};
- var originalMappings = [];
- var generatedMappings = [];
- var mapping, str, segment, end, value;
-
- while (index < length) {
- if (aStr.charAt(index) === ';') {
- generatedLine++;
- index++;
- previousGeneratedColumn = 0;
- }
- else if (aStr.charAt(index) === ',') {
- index++;
- }
- else {
- mapping = new Mapping();
- mapping.generatedLine = generatedLine;
-
- // Because each offset is encoded relative to the previous one,
- // many segments often have the same encoding. We can exploit this
- // fact by caching the parsed variable length fields of each segment,
- // allowing us to avoid a second parse if we encounter the same
- // segment again.
- for (end = index; end < length; end++) {
- if (this._charIsMappingSeparator(aStr, end)) {
- break;
- }
- }
- str = aStr.slice(index, end);
+ /***/ },
+ /* 8340 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- segment = cachedSegments[str];
- if (segment) {
- index += str.length;
- } else {
- segment = [];
- while (index < end) {
- base64VLQ.decode(aStr, index, temp);
- value = temp.value;
- index = temp.rest;
- segment.push(value);
- }
+ var eq = __webpack_require__(__webpack_module_template_argument_0__);
- if (segment.length === 2) {
- throw new Error('Found a source, but no line and column');
- }
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
- if (segment.length === 3) {
- throw new Error('Found a source and line, but no column');
- }
+ module.exports = assocIndexOf;
- cachedSegments[str] = segment;
- }
- // Generated column.
- mapping.generatedColumn = previousGeneratedColumn + segment[0];
- previousGeneratedColumn = mapping.generatedColumn;
-
- if (segment.length > 1) {
- // Original source.
- mapping.source = previousSource + segment[1];
- previousSource += segment[1];
-
- // Original line.
- mapping.originalLine = previousOriginalLine + segment[2];
- previousOriginalLine = mapping.originalLine;
- // Lines are stored 0-based
- mapping.originalLine += 1;
-
- // Original column.
- mapping.originalColumn = previousOriginalColumn + segment[3];
- previousOriginalColumn = mapping.originalColumn;
-
- if (segment.length > 4) {
- // Original name.
- mapping.name = previousName + segment[4];
- previousName += segment[4];
- }
- }
+ /***/ },
+ /* 8341 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- generatedMappings.push(mapping);
- if (typeof mapping.originalLine === 'number') {
- originalMappings.push(mapping);
- }
- }
- }
+ var copyObject = __webpack_require__(__webpack_module_template_argument_0__),
+ keys = __webpack_require__(__webpack_module_template_argument_1__);
- quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
- this.__generatedMappings = generatedMappings;
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
- quickSort(originalMappings, util.compareByOriginalPositions);
- this.__originalMappings = originalMappings;
- };
+ module.exports = baseAssign;
- /**
- * Find the mapping that best matches the hypothetical "needle" mapping that
- * we are searching for in the given "haystack" of mappings.
- */
- BasicSourceMapConsumer.prototype._findMapping =
- function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
- aColumnName, aComparator, aBias) {
- // To return the position we are searching for, we must first find the
- // mapping for the given position and then return the opposite position it
- // points to. Because the mappings are sorted, we can use binary search to
- // find the best mapping.
- if (aNeedle[aLineName] <= 0) {
- throw new TypeError('Line must be greater than or equal to 1, got '
- + aNeedle[aLineName]);
- }
- if (aNeedle[aColumnName] < 0) {
- throw new TypeError('Column must be greater than or equal to 0, got '
- + aNeedle[aColumnName]);
- }
+ /***/ },
+ /* 8342 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__, __webpack_module_template_argument_8__, __webpack_module_template_argument_9__, __webpack_module_template_argument_10__, __webpack_module_template_argument_11__, __webpack_module_template_argument_12__, __webpack_module_template_argument_13__, __webpack_module_template_argument_14__, __webpack_module_template_argument_15__, __webpack_module_template_argument_16__) {
+
+ var Stack = __webpack_require__(__webpack_module_template_argument_0__),
+ arrayEach = __webpack_require__(__webpack_module_template_argument_1__),
+ assignValue = __webpack_require__(__webpack_module_template_argument_2__),
+ baseAssign = __webpack_require__(__webpack_module_template_argument_3__),
+ cloneBuffer = __webpack_require__(__webpack_module_template_argument_4__),
+ copyArray = __webpack_require__(__webpack_module_template_argument_5__),
+ copySymbols = __webpack_require__(__webpack_module_template_argument_6__),
+ getAllKeys = __webpack_require__(__webpack_module_template_argument_7__),
+ getTag = __webpack_require__(__webpack_module_template_argument_8__),
+ initCloneArray = __webpack_require__(__webpack_module_template_argument_9__),
+ initCloneByTag = __webpack_require__(__webpack_module_template_argument_10__),
+ initCloneObject = __webpack_require__(__webpack_module_template_argument_11__),
+ isArray = __webpack_require__(__webpack_module_template_argument_12__),
+ isBuffer = __webpack_require__(__webpack_module_template_argument_13__),
+ isHostObject = __webpack_require__(__webpack_module_template_argument_14__),
+ isObject = __webpack_require__(__webpack_module_template_argument_15__),
+ keys = __webpack_require__(__webpack_module_template_argument_16__);
- return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
- };
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
- /**
- * Compute the last column for each generated mapping. The last column is
- * inclusive.
- */
- BasicSourceMapConsumer.prototype.computeColumnSpans =
- function SourceMapConsumer_computeColumnSpans() {
- for (var index = 0; index < this._generatedMappings.length; ++index) {
- var mapping = this._generatedMappings[index];
-
- // Mappings do not contain a field for the last generated columnt. We
- // can come up with an optimistic estimate, however, by assuming that
- // mappings are contiguous (i.e. given two consecutive mappings, the
- // first mapping ends where the second one starts).
- if (index + 1 < this._generatedMappings.length) {
- var nextMapping = this._generatedMappings[index + 1];
-
- if (mapping.generatedLine === nextMapping.generatedLine) {
- mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
- continue;
- }
- }
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
- // The last mapping for each line spans the entire line.
- mapping.lastGeneratedColumn = Infinity;
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ if (isHostObject(value)) {
+ return object ? value : {};
}
- };
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- BasicSourceMapConsumer.prototype.originalPositionFor =
- function SourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
+ if (!isArr) {
+ var props = isFull ? getAllKeys(value) : keys(value);
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ });
+ return result;
+ }
- var index = this._findMapping(
- needle,
- this._generatedMappings,
- "generatedLine",
- "generatedColumn",
- util.compareByGeneratedPositionsDeflated,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
+ module.exports = baseClone;
- if (index >= 0) {
- var mapping = this._generatedMappings[index];
- if (mapping.generatedLine === needle.generatedLine) {
- var source = util.getArg(mapping, 'source', null);
- if (source !== null) {
- source = this._sources.at(source);
- if (this.sourceRoot != null) {
- source = util.join(this.sourceRoot, source);
- }
- }
- var name = util.getArg(mapping, 'name', null);
- if (name !== null) {
- name = this._names.at(name);
- }
- return {
- source: source,
- line: util.getArg(mapping, 'originalLine', null),
- column: util.getArg(mapping, 'originalColumn', null),
- name: name
- };
- }
- }
+ /***/ },
+ /* 8343 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var isObject = __webpack_require__(__webpack_module_template_argument_0__);
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- };
+ /** Built-in value references. */
+ var objectCreate = Object.create;
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
- function BasicSourceMapConsumer_hasContentsOfAllSources() {
- if (!this.sourcesContent) {
- return false;
- }
- return this.sourcesContent.length >= this._sources.size() &&
- !this.sourcesContent.some(function (sc) { return sc == null; });
- };
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
+ }
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- BasicSourceMapConsumer.prototype.sourceContentFor =
- function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- if (!this.sourcesContent) {
- return null;
- }
+ module.exports = baseCreate;
- if (this.sourceRoot != null) {
- aSource = util.relative(this.sourceRoot, aSource);
- }
- if (this._sources.has(aSource)) {
- return this.sourcesContent[this._sources.indexOf(aSource)];
- }
+ /***/ },
+ /* 8344 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- var url;
- if (this.sourceRoot != null
- && (url = util.urlParse(this.sourceRoot))) {
- // XXX: file:// URIs and absolute paths lead to unexpected behavior for
- // many users. We can help them out when they expect file:// URIs to
- // behave like it would if they were running a local HTTP server. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
- var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
- if (url.scheme == "file"
- && this._sources.has(fileUriAbsPath)) {
- return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
- }
+ var baseForOwn = __webpack_require__(__webpack_module_template_argument_0__),
+ createBaseEach = __webpack_require__(__webpack_module_template_argument_1__);
- if ((!url.path || url.path == "/")
- && this._sources.has("/" + aSource)) {
- return this.sourcesContent[this._sources.indexOf("/" + aSource)];
- }
- }
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
- // This function is used recursively from
- // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
- // don't want to throw if we can't find the source - we just want to
- // return null, so we provide a flag to exit gracefully.
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
+ module.exports = baseEach;
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- BasicSourceMapConsumer.prototype.generatedPositionFor =
- function SourceMapConsumer_generatedPositionFor(aArgs) {
- var source = util.getArg(aArgs, 'source');
- if (this.sourceRoot != null) {
- source = util.relative(this.sourceRoot, source);
- }
- if (!this._sources.has(source)) {
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- }
- source = this._sources.indexOf(source);
- var needle = {
- source: source,
- originalLine: util.getArg(aArgs, 'line'),
- originalColumn: util.getArg(aArgs, 'column')
- };
+ /***/ },
+ /* 8345 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- var index = this._findMapping(
- needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
+ var createBaseFor = __webpack_require__(__webpack_module_template_argument_0__);
- if (index >= 0) {
- var mapping = this._originalMappings[index];
+ /**
+ * 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();
- if (mapping.source === needle.source) {
- return {
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- };
- }
- }
+ module.exports = baseFor;
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- };
- exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+ /***/ },
+ /* 8346 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- /**
- * An IndexedSourceMapConsumer instance represents a parsed source map which
- * we can query for information. It differs from BasicSourceMapConsumer in
- * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
- * input.
- *
- * The only parameter is a raw source map (either as a JSON string, or already
- * parsed to an object). According to the spec for indexed source maps, they
- * have the following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - file: Optional. The generated file this source map is associated with.
- * - sections: A list of section definitions.
- *
- * Each value under the "sections" field has two fields:
- * - offset: The offset into the original specified at which this section
- * begins to apply, defined as an object with a "line" and "column"
- * field.
- * - map: A source map definition. This source map could also be indexed,
- * but doesn't have to be.
- *
- * Instead of the "map" field, it's also possible to have a "url" field
- * specifying a URL to retrieve a source map from, but that's currently
- * unsupported.
- *
- * Here's an example source map, taken from the source map spec[0], but
- * modified to omit a section which uses the "url" field.
- *
- * {
- * version : 3,
- * file: "app.js",
- * sections: [{
- * offset: {line:100, column:10},
- * map: {
- * version : 3,
- * file: "section.js",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AAAA,E;;ABCDE;"
- * }
- * }],
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
- */
- function IndexedSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
+ var baseFor = __webpack_require__(__webpack_module_template_argument_0__),
+ keys = __webpack_require__(__webpack_module_template_argument_1__);
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
- var version = util.getArg(sourceMap, 'version');
- var sections = util.getArg(sourceMap, 'sections');
+ module.exports = baseForOwn;
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
- this._sources = new ArraySet();
- this._names = new ArraySet();
+ /***/ },
+ /* 8347 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- var lastOffset = {
- line: -1,
- column: 0
- };
- this._sections = sections.map(function (s) {
- if (s.url) {
- // The url field will require support for asynchronicity.
- // See https://github.com/mozilla/source-map/issues/16
- throw new Error('Support for url field in sections not implemented.');
- }
- var offset = util.getArg(s, 'offset');
- var offsetLine = util.getArg(offset, 'line');
- var offsetColumn = util.getArg(offset, 'column');
+ var castPath = __webpack_require__(__webpack_module_template_argument_0__),
+ isKey = __webpack_require__(__webpack_module_template_argument_1__),
+ toKey = __webpack_require__(__webpack_module_template_argument_2__);
- if (offsetLine < lastOffset.line ||
- (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
- throw new Error('Section offsets must be ordered and non-overlapping.');
- }
- lastOffset = offset;
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
- return {
- generatedOffset: {
- // The offset fields are 0-based, but we use 1-based indices when
- // encoding/decoding from VLQ.
- generatedLine: offsetLine + 1,
- generatedColumn: offsetColumn + 1
- },
- consumer: new SourceMapConsumer(util.getArg(s, 'map'))
- }
- });
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
}
+ return (index && index == length) ? object : undefined;
+ }
- IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+ module.exports = baseGet;
- /**
- * The version of the source mapping spec that we are consuming.
- */
- IndexedSourceMapConsumer.prototype._version = 3;
- /**
- * The list of original sources.
- */
- Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
- get: function () {
- var sources = [];
- for (var i = 0; i < this._sections.length; i++) {
- for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
- sources.push(this._sections[i].consumer.sources[j]);
- }
- }
- return sources;
- }
- });
+ /***/ },
+ /* 8348 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- IndexedSourceMapConsumer.prototype.originalPositionFor =
- function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
+ var arrayPush = __webpack_require__(__webpack_module_template_argument_0__),
+ isArray = __webpack_require__(__webpack_module_template_argument_1__);
- // Find the section containing the generated position we're trying to map
- // to an original position.
- var sectionIndex = binarySearch.search(needle, this._sections,
- function(needle, section) {
- var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
- if (cmp) {
- return cmp;
- }
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+ }
- return (needle.generatedColumn -
- section.generatedOffset.generatedColumn);
- });
- var section = this._sections[sectionIndex];
+ module.exports = baseGetAllKeys;
- if (!section) {
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- }
- return section.consumer.originalPositionFor({
- line: needle.generatedLine -
- (section.generatedOffset.generatedLine - 1),
- column: needle.generatedColumn -
- (section.generatedOffset.generatedLine === needle.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- bias: aArgs.bias
- });
- };
+ /***/ },
+ /* 8349 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
- function IndexedSourceMapConsumer_hasContentsOfAllSources() {
- return this._sections.every(function (s) {
- return s.consumer.hasContentsOfAllSources();
- });
- };
+ var getPrototype = __webpack_require__(__webpack_module_template_argument_0__);
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- IndexedSourceMapConsumer.prototype.sourceContentFor =
- function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- var content = section.consumer.sourceContentFor(aSource, true);
- if (content) {
- return content;
- }
- }
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- IndexedSourceMapConsumer.prototype.generatedPositionFor =
- function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- // Only consider this section if the requested source is in the list of
- // sources of the consumer.
- if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
- continue;
- }
- var generatedPosition = section.consumer.generatedPositionFor(aArgs);
- if (generatedPosition) {
- var ret = {
- line: generatedPosition.line +
- (section.generatedOffset.generatedLine - 1),
- column: generatedPosition.column +
- (section.generatedOffset.generatedLine === generatedPosition.line
- ? section.generatedOffset.generatedColumn - 1
- : 0)
- };
- return ret;
- }
- }
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- return {
- line: null,
- column: null
- };
- };
+ /**
+ * 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) {
+ // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
+ // that are composed entirely of index properties, return `false` for
+ // `hasOwnProperty` checks of them.
+ return object != null &&
+ (hasOwnProperty.call(object, key) ||
+ (typeof object == 'object' && key in object && getPrototype(object) === null));
+ }
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- IndexedSourceMapConsumer.prototype._parseMappings =
- function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- this.__generatedMappings = [];
- this.__originalMappings = [];
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
- var sectionMappings = section.consumer._generatedMappings;
- for (var j = 0; j < sectionMappings.length; j++) {
- var mapping = sectionMappings[j];
-
- var source = section.consumer._sources.at(mapping.source);
- if (section.consumer.sourceRoot !== null) {
- source = util.join(section.consumer.sourceRoot, source);
- }
- this._sources.add(source);
- source = this._sources.indexOf(source);
-
- var name = section.consumer._names.at(mapping.name);
- this._names.add(name);
- name = this._names.indexOf(name);
-
- // The mappings coming from the consumer for the section have
- // generated positions relative to the start of the section, so we
- // need to offset them to be relative to the start of the concatenated
- // generated file.
- var adjustedMapping = {
- source: source,
- generatedLine: mapping.generatedLine +
- (section.generatedOffset.generatedLine - 1),
- generatedColumn: mapping.generatedColumn +
- (section.generatedOffset.generatedLine === mapping.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: name
- };
+ module.exports = baseHas;
- this.__generatedMappings.push(adjustedMapping);
- if (typeof adjustedMapping.originalLine === 'number') {
- this.__originalMappings.push(adjustedMapping);
- }
- }
- }
- quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
- quickSort(this.__originalMappings, util.compareByOriginalPositions);
- };
+ /***/ },
+ /* 8350 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
+ var baseIsEqualDeep = __webpack_require__(__webpack_module_template_argument_0__),
+ isObject = __webpack_require__(__webpack_module_template_argument_1__),
+ isObjectLike = __webpack_require__(__webpack_module_template_argument_2__);
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
}
+ module.exports = baseIsEqual;
+
/***/ },
- /* 532 */
- /*!*****************************************!*\
- !*** ./~/source-map/lib/source-node.js ***!
- \*****************************************/
- /***/ function(module, exports, __webpack_require__) {
+ /* 8351 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
+ var Stack = __webpack_require__(__webpack_module_template_argument_0__),
+ equalArrays = __webpack_require__(__webpack_module_template_argument_1__),
+ equalByTag = __webpack_require__(__webpack_module_template_argument_2__),
+ equalObjects = __webpack_require__(__webpack_module_template_argument_3__),
+ getTag = __webpack_require__(__webpack_module_template_argument_4__),
+ isArray = __webpack_require__(__webpack_module_template_argument_5__),
+ isHostObject = __webpack_require__(__webpack_module_template_argument_6__),
+ isTypedArray = __webpack_require__(__webpack_module_template_argument_7__);
+
+ /** Used to compose bitmasks for comparison styles. */
+ var PARTIAL_COMPARE_FLAG = 2;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
- {
- var SourceMapGenerator = __webpack_require__(/*! ./source-map-generator */ 240).SourceMapGenerator;
- var util = __webpack_require__(/*! ./util */ 68);
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
- // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
- // operating systems these days (capturing the result).
- var REGEX_NEWLINE = /(\r?\n)/;
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag && !isHostObject(object),
+ othIsObj = othTag == objectTag && !isHostObject(other),
+ isSameTag = objTag == othTag;
- // Newline character code for charCodeAt() comparisons
- var NEWLINE_CODE = 10;
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
+ }
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
- // Private symbol for identifying `SourceNode`s when multiple versions of
- // the source-map library are loaded. This MUST NOT CHANGE across
- // versions!
- var isSourceNode = "$$$isSourceNode$$$";
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
- /**
- * SourceNodes provide a way to abstract over interpolating/concatenating
- * snippets of generated JavaScript source code while maintaining the line and
- * column information associated with the original source code.
- *
- * @param aLine The original line number.
- * @param aColumn The original column number.
- * @param aSource The original source's filename.
- * @param aChunks Optional. An array of strings which are snippets of
- * generated JS, or other SourceNodes.
- * @param aName The original identifier.
- */
- function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
- this.children = [];
- this.sourceContents = {};
- this.line = aLine == null ? null : aLine;
- this.column = aColumn == null ? null : aColumn;
- this.source = aSource == null ? null : aSource;
- this.name = aName == null ? null : aName;
- this[isSourceNode] = true;
- if (aChunks != null) this.add(aChunks);
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
}
+ stack || (stack = new Stack);
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ }
- /**
- * Creates a SourceNode from generated code and a SourceMapConsumer.
- *
- * @param aGeneratedCode The generated code
- * @param aSourceMapConsumer The SourceMap for the generated code
- * @param aRelativePath Optional. The path that relative sources in the
- * SourceMapConsumer should be relative to.
- */
- SourceNode.fromStringWithSourceMap =
- function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
- // The SourceNode we want to fill with the generated code
- // and the SourceMap
- var node = new SourceNode();
-
- // All even indices of this array are one line of the generated code,
- // while all odd indices are the newlines between two adjacent lines
- // (since `REGEX_NEWLINE` captures its match).
- // Processed fragments are removed from this array, by calling `shiftNextLine`.
- var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
- var shiftNextLine = function() {
- var lineContents = remainingLines.shift();
- // The last line of a file might not have a newline.
- var newLine = remainingLines.shift() || "";
- return lineContents + newLine;
- };
+ module.exports = baseIsEqualDeep;
- // We need to remember the position of "remainingLines"
- var lastGeneratedLine = 1, lastGeneratedColumn = 0;
-
- // The generate SourceNodes we need a code range.
- // To extract it current and last mapping is used.
- // Here we store the last mapping.
- var lastMapping = null;
-
- aSourceMapConsumer.eachMapping(function (mapping) {
- if (lastMapping !== null) {
- // We add the code from "lastMapping" to "mapping":
- // First check if there is a new line in between.
- if (lastGeneratedLine < mapping.generatedLine) {
- // Associate first line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- lastGeneratedLine++;
- lastGeneratedColumn = 0;
- // The remaining code is added without mapping
- } else {
- // There is no new line in between.
- // Associate the code between "lastGeneratedColumn" and
- // "mapping.generatedColumn" with "lastMapping"
- var nextLine = remainingLines[0];
- var code = nextLine.substr(0, mapping.generatedColumn -
- lastGeneratedColumn);
- remainingLines[0] = nextLine.substr(mapping.generatedColumn -
- lastGeneratedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- addMappingWithCode(lastMapping, code);
- // No more remaining code, continue
- lastMapping = mapping;
- return;
- }
- }
- // We add the generated code until the first mapping
- // to the SourceNode without any mapping.
- // Each line is added as separate string.
- while (lastGeneratedLine < mapping.generatedLine) {
- node.add(shiftNextLine());
- lastGeneratedLine++;
- }
- if (lastGeneratedColumn < mapping.generatedColumn) {
- var nextLine = remainingLines[0];
- node.add(nextLine.substr(0, mapping.generatedColumn));
- remainingLines[0] = nextLine.substr(mapping.generatedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- }
- lastMapping = mapping;
- }, this);
- // We have processed all mappings.
- if (remainingLines.length > 0) {
- if (lastMapping) {
- // Associate the remaining code in the current line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- }
- // and add the remaining lines without any mapping
- node.add(remainingLines.join(""));
- }
- // Copy sourcesContent into SourceNode
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aRelativePath != null) {
- sourceFile = util.join(aRelativePath, sourceFile);
- }
- node.setSourceContent(sourceFile, content);
- }
- });
+ /***/ },
+ /* 8352 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- return node;
+ var Stack = __webpack_require__(__webpack_module_template_argument_0__),
+ baseIsEqual = __webpack_require__(__webpack_module_template_argument_1__);
- function addMappingWithCode(mapping, code) {
- if (mapping === null || mapping.source === undefined) {
- node.add(code);
- } else {
- var source = aRelativePath
- ? util.join(aRelativePath, mapping.source)
- : mapping.source;
- node.add(new SourceNode(mapping.originalLine,
- mapping.originalColumn,
- source,
- code,
- mapping.name));
- }
- }
- };
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
- /**
- * Add a chunk of generated JS to this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.add = function SourceNode_add(aChunk) {
- if (Array.isArray(aChunk)) {
- aChunk.forEach(function (chunk) {
- this.add(chunk);
- }, this);
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- if (aChunk) {
- this.children.push(aChunk);
- }
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
- /**
- * Add a chunk of generated JS to the beginning of this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
- if (Array.isArray(aChunk)) {
- for (var i = aChunk.length-1; i >= 0; i--) {
- this.prepend(aChunk[i]);
- }
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- this.children.unshift(aChunk);
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
}
- return this;
- };
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
- /**
- * Walk over the tree of JS snippets in this node and its children. The
- * walking function is called once for each snippet of JS and is passed that
- * snippet and the its original associated source's line/column location.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walk = function SourceNode_walk(aFn) {
- var chunk;
- for (var i = 0, len = this.children.length; i < len; i++) {
- chunk = this.children[i];
- if (chunk[isSourceNode]) {
- chunk.walk(aFn);
- }
- else {
- if (chunk !== '') {
- aFn(chunk, { source: this.source,
- line: this.line,
- column: this.column,
- name: this.name });
- }
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
}
- }
- };
-
- /**
- * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
- * each of `this.children`.
- *
- * @param aSep The separator.
- */
- SourceNode.prototype.join = function SourceNode_join(aSep) {
- var newChildren;
- var i;
- var len = this.children.length;
- if (len > 0) {
- newChildren = [];
- for (i = 0; i < len-1; i++) {
- newChildren.push(this.children[i]);
- newChildren.push(aSep);
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
+ : result
+ )) {
+ return false;
}
- newChildren.push(this.children[i]);
- this.children = newChildren;
}
- return this;
- };
+ }
+ return true;
+ }
- /**
- * Call String.prototype.replace on the very right-most source snippet. Useful
- * for trimming whitespace from the end of a source node, etc.
- *
- * @param aPattern The pattern to replace.
- * @param aReplacement The thing to replace the pattern with.
- */
- SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
- var lastChild = this.children[this.children.length - 1];
- if (lastChild[isSourceNode]) {
- lastChild.replaceRight(aPattern, aReplacement);
- }
- else if (typeof lastChild === 'string') {
- this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
- }
- else {
- this.children.push(''.replace(aPattern, aReplacement));
- }
- return this;
- };
+ module.exports = baseIsMatch;
- /**
- * Set the source content for a source file. This will be added to the SourceMapGenerator
- * in the sourcesContent field.
- *
- * @param aSourceFile The filename of the source file
- * @param aSourceContent The content of the source file
- */
- SourceNode.prototype.setSourceContent =
- function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
- this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
- };
- /**
- * Walk over the tree of SourceNodes. The walking function is called for each
- * source file content and is passed the filename and source content.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walkSourceContents =
- function SourceNode_walkSourceContents(aFn) {
- for (var i = 0, len = this.children.length; i < len; i++) {
- if (this.children[i][isSourceNode]) {
- this.children[i].walkSourceContents(aFn);
- }
- }
+ /***/ },
+ /* 8353 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- var sources = Object.keys(this.sourceContents);
- for (var i = 0, len = sources.length; i < len; i++) {
- aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
- }
- };
+ var isFunction = __webpack_require__(__webpack_module_template_argument_0__),
+ isHostObject = __webpack_require__(__webpack_module_template_argument_1__),
+ isMasked = __webpack_require__(__webpack_module_template_argument_2__),
+ isObject = __webpack_require__(__webpack_module_template_argument_3__),
+ toSource = __webpack_require__(__webpack_module_template_argument_4__);
- /**
- * Return the string representation of this source node. Walks over the tree
- * and concatenates all the various snippets together to one string.
- */
- SourceNode.prototype.toString = function SourceNode_toString() {
- var str = "";
- this.walk(function (chunk) {
- str += chunk;
- });
- return str;
- };
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- /**
- * Returns the string representation of this source node along with a source
- * map.
- */
- SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
- var generated = {
- code: "",
- line: 1,
- column: 0
- };
- var map = new SourceMapGenerator(aArgs);
- var sourceMappingActive = false;
- var lastOriginalSource = null;
- var lastOriginalLine = null;
- var lastOriginalColumn = null;
- var lastOriginalName = null;
- this.walk(function (chunk, original) {
- generated.code += chunk;
- if (original.source !== null
- && original.line !== null
- && original.column !== null) {
- if(lastOriginalSource !== original.source
- || lastOriginalLine !== original.line
- || lastOriginalColumn !== original.column
- || lastOriginalName !== original.name) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- lastOriginalSource = original.source;
- lastOriginalLine = original.line;
- lastOriginalColumn = original.column;
- lastOriginalName = original.name;
- sourceMappingActive = true;
- } else if (sourceMappingActive) {
- map.addMapping({
- generated: {
- line: generated.line,
- column: generated.column
- }
- });
- lastOriginalSource = null;
- sourceMappingActive = false;
- }
- for (var idx = 0, length = chunk.length; idx < length; idx++) {
- if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
- generated.line++;
- generated.column = 0;
- // Mappings end at eol
- if (idx + 1 === length) {
- lastOriginalSource = null;
- sourceMappingActive = false;
- } else if (sourceMappingActive) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- } else {
- generated.column++;
- }
- }
- });
- this.walkSourceContents(function (sourceFile, sourceContent) {
- map.setSourceContent(sourceFile, sourceContent);
- });
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
- return { code: generated.code, map: map };
- };
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- exports.SourceNode = SourceNode;
- }
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- /***/ },
- /* 533 */
- /*!*******************************!*\
- !*** ./~/strip-ansi/index.js ***!
- \*******************************/
- /***/ function(module, exports, __webpack_require__) {
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
- 'use strict';
- var ansiRegex = __webpack_require__(/*! ansi-regex */ 144)();
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
- module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
- };
+ module.exports = baseIsNative;
/***/ },
- /* 534 */
- /*!***********************************!*\
- !*** ./~/supports-color/index.js ***!
- \***********************************/
- /***/ function(module, exports, __webpack_require__) {
+ /* 8354 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
- var argv = process.argv;
+ var baseMatches = __webpack_require__(__webpack_module_template_argument_0__),
+ baseMatchesProperty = __webpack_require__(__webpack_module_template_argument_1__),
+ identity = __webpack_require__(__webpack_module_template_argument_2__),
+ isArray = __webpack_require__(__webpack_module_template_argument_3__),
+ property = __webpack_require__(__webpack_module_template_argument_4__);
- var terminator = argv.indexOf('--');
- var hasFlag = function (flag) {
- flag = '--' + flag;
- var pos = argv.indexOf(flag);
- return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
- };
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
- module.exports = (function () {
- if ('FORCE_COLOR' in process.env) {
- return true;
- }
+ module.exports = baseIteratee;
- 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;
- }
+ /***/ },
+ /* 8355 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- if (process.stdout && !process.stdout.isTTY) {
- return false;
- }
+ var Reflect = __webpack_require__(__webpack_module_template_argument_0__),
+ iteratorToArray = __webpack_require__(__webpack_module_template_argument_1__);
- if (process.platform === 'win32') {
- return true;
- }
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- if ('COLORTERM' in process.env) {
- return true;
- }
+ /** Built-in value references. */
+ var enumerate = Reflect ? Reflect.enumerate : undefined,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
- if (process.env.TERM === 'dumb') {
- return false;
- }
+ /**
+ * The base implementation of `_.keysIn` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ object = object == null ? object : Object(object);
+
+ var result = [];
+ for (var key in object) {
+ result.push(key);
+ }
+ return result;
+ }
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
- return true;
- }
+ // Fallback for IE < 9 with es6-shim.
+ if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
+ baseKeysIn = function(object) {
+ return iteratorToArray(enumerate(object));
+ };
+ }
- return false;
- })();
+ module.exports = baseKeysIn;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./~/process/browser.js */ 18)))
/***/ },
- /* 535 */
- /*!*******************************!*\
- !*** ./~/trim-right/index.js ***!
- \*******************************/
- /***/ function(module, exports) {
+ /* 8356 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- 'use strict';
- module.exports = function (str) {
- var tail = str.length;
+ var baseIsMatch = __webpack_require__(__webpack_module_template_argument_0__),
+ getMatchData = __webpack_require__(__webpack_module_template_argument_1__),
+ matchesStrictComparable = __webpack_require__(__webpack_module_template_argument_2__);
- while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) {
- tail--;
- }
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
- return str.slice(0, tail);
- };
+ module.exports = baseMatches;
/***/ },
- /* 536 */
- /*!***********************************!*\
- !*** ./~/tty-browserify/index.js ***!
- \***********************************/
- /***/ function(module, exports) {
+ /* 8357 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__) {
- exports.isatty = function () { return false; };
+ var baseIsEqual = __webpack_require__(__webpack_module_template_argument_0__),
+ get = __webpack_require__(__webpack_module_template_argument_1__),
+ hasIn = __webpack_require__(__webpack_module_template_argument_2__),
+ isKey = __webpack_require__(__webpack_module_template_argument_3__),
+ isStrictComparable = __webpack_require__(__webpack_module_template_argument_4__),
+ matchesStrictComparable = __webpack_require__(__webpack_module_template_argument_5__),
+ toKey = __webpack_require__(__webpack_module_template_argument_6__);
- function ReadStream() {
- throw new Error('tty.ReadStream is not implemented');
- }
- exports.ReadStream = ReadStream;
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
- function WriteStream() {
- throw new Error('tty.ReadStream is not implemented');
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
+ };
}
- exports.WriteStream = WriteStream;
-
- /***/ },
- /* 537 */
- /*!*******************************************!*\
- !*** ./~/util/support/isBufferBrowser.js ***!
- \*******************************************/
- /***/ function(module, exports) {
+ module.exports = baseMatchesProperty;
- module.exports = function isBuffer(arg) {
- return arg && typeof arg === 'object'
- && typeof arg.copy === 'function'
- && typeof arg.fill === 'function'
- && typeof arg.readUInt8 === 'function';
- }
/***/ },
- /* 538 */
- /*!***************************************************************!*\
- !*** template of 393 referencing 52, 1, 2, 46, 45, 47, 38, 6 ***!
- \***************************************************************/
+ /* 8358 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- "use strict";
-
- var _Number$MAX_SAFE_INTEGER = __webpack_require__(/*! babel-runtime/core-js/number/max-safe-integer */ 52)["default"];
+ var baseGet = __webpack_require__(__webpack_module_template_argument_0__);
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ module.exports = basePropertyDeep;
- exports.__esModule = true;
- exports.toComputedKey = toComputedKey;
- exports.toSequenceExpression = toSequenceExpression;
- exports.toKeyAlias = toKeyAlias;
- exports.toIdentifier = toIdentifier;
- exports.toBindingIdentifierName = toBindingIdentifierName;
- exports.toStatement = toStatement;
- exports.toExpression = toExpression;
- exports.toBlock = toBlock;
- exports.valueToNode = valueToNode;
- var _lodashLangIsPlainObject = __webpack_require__(/*! lodash/lang/isPlainObject */ 46);
+ /***/ },
+ /* 8359 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- var _lodashLangIsPlainObject2 = _interopRequireDefault(_lodashLangIsPlainObject);
+ var Symbol = __webpack_require__(__webpack_module_template_argument_0__),
+ isSymbol = __webpack_require__(__webpack_module_template_argument_1__);
- var _lodashLangIsNumber = __webpack_require__(/*! lodash/lang/isNumber */ 45);
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0;
- var _lodashLangIsNumber2 = _interopRequireDefault(_lodashLangIsNumber);
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
- var _lodashLangIsRegExp = __webpack_require__(/*! lodash/lang/isRegExp */ 47);
+ /**
+ * 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 (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
- var _lodashLangIsRegExp2 = _interopRequireDefault(_lodashLangIsRegExp);
+ module.exports = baseToString;
- var _lodashLangIsString = __webpack_require__(/*! lodash/lang/isString */ 38);
- var _lodashLangIsString2 = _interopRequireDefault(_lodashLangIsString);
+ /***/ },
+ /* 8360 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) {
- var _babelTraverse = __webpack_require__(/*! babel-traverse */ 6);
+ var SetCache = __webpack_require__(__webpack_module_template_argument_0__),
+ arrayIncludes = __webpack_require__(__webpack_module_template_argument_1__),
+ arrayIncludesWith = __webpack_require__(__webpack_module_template_argument_2__),
+ cacheHas = __webpack_require__(__webpack_module_template_argument_3__),
+ createSet = __webpack_require__(__webpack_module_template_argument_4__),
+ setToArray = __webpack_require__(__webpack_module_template_argument_5__);
- var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
- var t = _interopRequireWildcard(_index);
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
- function toComputedKey(node) {
- var key = arguments.length <= 1 || arguments[1] === undefined ? node.key || node.property : arguments[1];
- return (function () {
- if (!node.computed) {
- if (t.isIdentifier(key)) key = t.stringLiteral(key.name);
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
}
- return key;
- })();
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
}
+ module.exports = baseUniq;
+
+
+ /***/ },
+ /* 8361 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var arrayMap = __webpack_require__(__webpack_module_template_argument_0__);
+
/**
- * Turn an array of statement `nodes` into a `SequenceExpression`.
- *
- * Variable declarations are turned into simple assignments and their
- * declarations hoisted to the top of the current scope.
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
*
- * Expression statements are just resolved to their expression.
+ * @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];
+ });
+ }
- function toSequenceExpression(nodes, scope) {
- if (!nodes || !nodes.length) return;
+ module.exports = baseValues;
- var declars = [];
- var bailed = false;
- var result = convert(nodes);
- if (bailed) return;
+ /***/ },
+ /* 8362 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- for (var i = 0; i < declars.length; i++) {
- scope.push(declars[i]);
- }
+ var isArray = __webpack_require__(__webpack_module_template_argument_0__),
+ stringToPath = __webpack_require__(__webpack_module_template_argument_1__);
- return result;
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value) {
+ return isArray(value) ? value : stringToPath(value);
+ }
- function convert(nodes) {
- var ensureLastUndefined = false;
- var exprs = [];
+ module.exports = castPath;
- var _arr = nodes;
- for (var _i = 0; _i < _arr.length; _i++) {
- var node = _arr[_i];
- if (t.isExpression(node)) {
- exprs.push(node);
- } else if (t.isExpressionStatement(node)) {
- exprs.push(node.expression);
- } else if (t.isVariableDeclaration(node)) {
- if (node.kind !== "var") return bailed = true; // bailed
- var _arr2 = node.declarations;
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var declar = _arr2[_i2];
- var bindings = t.getBindingIdentifiers(declar);
- for (var key in bindings) {
- declars.push({
- kind: node.kind,
- id: bindings[key]
- });
- }
+ /***/ },
+ /* 8363 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- if (declar.init) {
- exprs.push(t.assignmentExpression("=", declar.id, declar.init));
- }
- }
+ var Uint8Array = __webpack_require__(__webpack_module_template_argument_0__);
- ensureLastUndefined = true;
- continue;
- } else if (t.isIfStatement(node)) {
- var consequent = node.consequent ? convert([node.consequent]) : scope.buildUndefinedNode();
- var alternate = node.alternate ? convert([node.alternate]) : scope.buildUndefinedNode();
- if (!consequent || !alternate) return bailed = true;
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
- exprs.push(t.conditionalExpression(node.test, consequent, alternate));
- } else if (t.isBlockStatement(node)) {
- exprs.push(convert(node.body));
- } else if (t.isEmptyStatement(node)) {
- // empty statement so ensure the last item is undefined if we're last
- ensureLastUndefined = true;
- continue;
- } else {
- // bailed, we can't turn this statement into an expression
- return bailed = true;
- }
+ module.exports = cloneArrayBuffer;
- ensureLastUndefined = false;
- }
- if (ensureLastUndefined || exprs.length === 0) {
- exprs.push(scope.buildUndefinedNode());
- }
+ /***/ },
+ /* 8364 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- //
+ var cloneArrayBuffer = __webpack_require__(__webpack_module_template_argument_0__);
- if (exprs.length === 1) {
- return exprs[0];
- } else {
- return t.sequenceExpression(exprs);
- }
- }
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
- function toKeyAlias(node) {
- var key = arguments.length <= 1 || arguments[1] === undefined ? node.key : arguments[1];
- return (function () {
- var alias = undefined;
+ module.exports = cloneDataView;
- if (node.kind === "method") {
- return toKeyAlias.increment() + "";
- } else if (t.isIdentifier(key)) {
- alias = key.name;
- } else if (t.isStringLiteral(key)) {
- alias = JSON.stringify(key.value);
- } else {
- alias = JSON.stringify(_babelTraverse2["default"].removeProperties(t.cloneDeep(key)));
- }
- if (node.computed) {
- alias = "[" + alias + "]";
- }
+ /***/ },
+ /* 8365 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- if (node["static"]) {
- alias = "static:" + alias;
- }
+ var addMapEntry = __webpack_require__(__webpack_module_template_argument_0__),
+ arrayReduce = __webpack_require__(__webpack_module_template_argument_1__),
+ mapToArray = __webpack_require__(__webpack_module_template_argument_2__);
- return alias;
- })();
+ /**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned map.
+ */
+ function cloneMap(map, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
+ return arrayReduce(array, addMapEntry, new map.constructor);
}
- toKeyAlias.uid = 0;
+ module.exports = cloneMap;
- toKeyAlias.increment = function () {
- if (toKeyAlias.uid >= _Number$MAX_SAFE_INTEGER) {
- return toKeyAlias.uid = 0;
- } else {
- return toKeyAlias.uid++;
- }
- };
- function toIdentifier(name) {
- name = name + "";
+ /***/ },
+ /* 8366 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- // replace all non-valid identifiers with dashes
- name = name.replace(/[^a-zA-Z0-9$_]/g, "-");
+ var addSetEntry = __webpack_require__(__webpack_module_template_argument_0__),
+ arrayReduce = __webpack_require__(__webpack_module_template_argument_1__),
+ setToArray = __webpack_require__(__webpack_module_template_argument_2__);
- // remove all dashes and numbers from start of name
- name = name.replace(/^[-0-9]+/, "");
+ /**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned set.
+ */
+ function cloneSet(set, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
+ return arrayReduce(array, addSetEntry, new set.constructor);
+ }
- // camel case
- name = name.replace(/[-\s]+(.)?/g, function (match, c) {
- return c ? c.toUpperCase() : "";
- });
+ module.exports = cloneSet;
- if (!t.isValidIdentifier(name)) {
- name = "_" + name;
- }
- return name || "_";
- }
+ /***/ },
+ /* 8367 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- function toBindingIdentifierName(name) {
- name = toIdentifier(name);
- if (name === "eval" || name === "arguments") name = "_" + name;
- return name;
- }
+ var Symbol = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
- * [Please add a description.]
- * @returns {Object|Boolean}
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
*/
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
- function toStatement(node, ignore) {
- if (t.isStatement(node)) {
- return node;
- }
+ module.exports = cloneSymbol;
- var mustHaveId = false;
- var newType = undefined;
- if (t.isClass(node)) {
- mustHaveId = true;
- newType = "ClassDeclaration";
- } else if (t.isFunction(node)) {
- mustHaveId = true;
- newType = "FunctionDeclaration";
- } else if (t.isAssignmentExpression(node)) {
- return t.expressionStatement(node);
- }
+ /***/ },
+ /* 8368 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- if (mustHaveId && !node.id) {
- newType = false;
- }
+ var cloneArrayBuffer = __webpack_require__(__webpack_module_template_argument_0__);
- if (!newType) {
- if (ignore) {
- return false;
- } else {
- throw new Error("cannot turn " + node.type + " to a statement");
- }
- }
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
- node.type = newType;
+ module.exports = cloneTypedArray;
- return node;
- }
- function toExpression(node) {
- if (t.isExpressionStatement(node)) {
- node = node.expression;
- }
+ /***/ },
+ /* 8369 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- if (t.isClass(node)) {
- node.type = "ClassExpression";
- } else if (t.isFunction(node)) {
- node.type = "FunctionExpression";
- }
+ var assignValue = __webpack_require__(__webpack_module_template_argument_0__);
- if (t.isExpression(node)) {
- return node;
- } else {
- throw new Error("cannot turn " + node.type + " to an expression");
- }
- }
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ object || (object = {});
- function toBlock(node, parent) {
- if (t.isBlockStatement(node)) {
- return node;
- }
+ var index = -1,
+ length = props.length;
- if (t.isEmptyStatement(node)) {
- node = [];
- }
+ while (++index < length) {
+ var key = props[index];
- if (!Array.isArray(node)) {
- if (!t.isStatement(node)) {
- if (t.isFunction(parent)) {
- node = t.returnStatement(node);
- } else {
- node = t.expressionStatement(node);
- }
- }
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
- node = [node];
+ assignValue(object, key, newValue);
}
-
- return t.blockStatement(node);
+ return object;
}
- function valueToNode(value) {
- // undefined
- if (value === undefined) {
- return t.identifier("undefined");
- }
+ module.exports = copyObject;
- // boolean
- if (value === true || value === false) {
- return t.booleanLiteral(value);
- }
- // null
- if (value === null) {
- return t.nullLiteral();
- }
+ /***/ },
+ /* 8370 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- // strings
- if (_lodashLangIsString2["default"](value)) {
- return t.stringLiteral(value);
- }
+ var copyObject = __webpack_require__(__webpack_module_template_argument_0__),
+ getSymbols = __webpack_require__(__webpack_module_template_argument_1__);
- // numbers
- if (_lodashLangIsNumber2["default"](value)) {
- return t.numericLiteral(value);
- }
+ /**
+ * Copies own symbol properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
- // regexes
- if (_lodashLangIsRegExp2["default"](value)) {
- var pattern = value.source;
- var flags = value.toString().match(/\/([a-z]+|)$/)[1];
- return t.regExpLiteral(pattern, flags);
- }
+ module.exports = copySymbols;
- // array
- if (Array.isArray(value)) {
- return t.arrayExpression(value.map(t.valueToNode));
- }
- // object
- if (_lodashLangIsPlainObject2["default"](value)) {
- var props = [];
- for (var key in value) {
- var nodeKey = undefined;
- if (t.isValidIdentifier(key)) {
- nodeKey = t.identifier(key);
- } else {
- nodeKey = t.stringLiteral(key);
- }
- props.push(t.objectProperty(nodeKey, t.valueToNode(value[key])));
- }
- return t.objectExpression(props);
- }
+ /***/ },
+ /* 8371 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- throw new Error("don't know how to turn this value into a node");
- }
+ var root = __webpack_require__(__webpack_module_template_argument_0__);
- /***/ },
- /* 539 */
- /*!****************************************!*\
- !*** template of 257 referencing 2, 1 ***!
- \****************************************/
- /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = root['__core-js_shared__'];
- /* eslint max-len: 0 */
+ module.exports = coreJsData;
- "use strict";
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ /***/ },
+ /* 8372 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ var isIterateeCall = __webpack_require__(__webpack_module_template_argument_0__),
+ rest = __webpack_require__(__webpack_module_template_argument_1__);
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
+ /**
+ * 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 rest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
- var t = _interopRequireWildcard(_index);
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
- var _constants = __webpack_require__(__webpack_module_template_argument_1__);
+ 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;
+ });
+ }
- var _index2 = __webpack_require__(__webpack_module_template_argument_2__);
+ module.exports = createAssigner;
- var _index3 = _interopRequireDefault(_index2);
- _index3["default"]("ArrayExpression", {
- fields: {
- elements: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeOrValueType("null", "Expression", "SpreadElement"))),
- "default": []
- }
- },
- visitor: ["elements"],
- aliases: ["Expression"]
- });
+ /***/ },
+ /* 8373 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- _index3["default"]("AssignmentExpression", {
- fields: {
- operator: {
- validate: _index2.assertValueType("string")
- },
- left: {
- validate: _index2.assertNodeType("LVal")
- },
- right: {
- validate: _index2.assertNodeType("Expression")
- }
- },
- builder: ["operator", "left", "right"],
- visitor: ["left", "right"],
- aliases: ["Expression"]
- });
+ var isArrayLike = __webpack_require__(__webpack_module_template_argument_0__);
- _index3["default"]("BinaryExpression", {
- builder: ["operator", "left", "right"],
- fields: {
- operator: {
- validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS)
- },
- left: {
- validate: _index2.assertNodeType("Expression")
- },
- right: {
- validate: _index2.assertNodeType("Expression")
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
}
- },
- visitor: ["left", "right"],
- aliases: ["Binary", "Expression"]
- });
-
- _index3["default"]("Directive", {
- visitor: ["value"],
- fields: {
- value: {
- validate: _index2.assertNodeType("DirectiveLiteral")
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
}
- }
- });
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
- _index3["default"]("DirectiveLiteral", {
- builder: ["value"],
- fields: {
- value: {
- validate: _index2.assertValueType("string")
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
}
- }
- });
+ return collection;
+ };
+ }
- _index3["default"]("BlockStatement", {
- builder: ["body", "directives"],
- visitor: ["directives", "body"],
- fields: {
- directives: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Directive"))),
- "default": []
- },
- body: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Statement")))
- }
- },
- aliases: ["Scopable", "BlockParent", "Block", "Statement"]
- });
+ module.exports = createBaseEach;
- _index3["default"]("BreakStatement", {
- visitor: ["label"],
- fields: {
- label: {
- validate: _index2.assertNodeType("Identifier"),
- optional: true
- }
- },
- aliases: ["Statement", "Terminatorless", "CompletionStatement"]
- });
- _index3["default"]("CallExpression", {
- visitor: ["callee", "arguments"],
- fields: {
- callee: {
- validate: _index2.assertNodeType("Expression")
- },
- arguments: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Expression", "SpreadElement")))
- }
- },
- aliases: ["Expression"]
- });
+ /***/ },
+ /* 8374 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- _index3["default"]("CatchClause", {
- visitor: ["param", "body"],
- fields: {
- param: {
- validate: _index2.assertNodeType("Identifier")
- },
- body: {
- validate: _index2.assertNodeType("BlockStatement")
- }
- },
- aliases: ["Scopable"]
- });
+ var Set = __webpack_require__(__webpack_module_template_argument_0__),
+ noop = __webpack_require__(__webpack_module_template_argument_1__),
+ setToArray = __webpack_require__(__webpack_module_template_argument_2__);
- _index3["default"]("ConditionalExpression", {
- visitor: ["test", "consequent", "alternate"],
- fields: {
- test: {
- validate: _index2.assertNodeType("Expression")
- },
- consequent: {
- validate: _index2.assertNodeType("Expression")
- },
- alternate: {
- validate: _index2.assertNodeType("Expression")
- }
- },
- aliases: ["Expression", "Conditional"]
- });
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0;
- _index3["default"]("ContinueStatement", {
- visitor: ["label"],
- fields: {
- label: {
- validate: _index2.assertNodeType("Identifier"),
- optional: true
- }
- },
- aliases: ["Statement", "Terminatorless", "CompletionStatement"]
- });
+ /**
+ * Creates a set of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
- _index3["default"]("DebuggerStatement", {
- aliases: ["Statement"]
- });
+ module.exports = createSet;
- _index3["default"]("DoWhileStatement", {
- visitor: ["test", "body"],
- fields: {
- test: {
- validate: _index2.assertNodeType("Expression")
- },
- body: {
- validate: _index2.assertNodeType("Statement")
- }
- },
- aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
- });
- _index3["default"]("EmptyStatement", {
- aliases: ["Statement"]
- });
+ /***/ },
+ /* 8375 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- _index3["default"]("ExpressionStatement", {
- visitor: ["expression"],
- fields: {
- expression: {
- validate: _index2.assertNodeType("Expression")
- }
- },
- aliases: ["Statement", "ExpressionWrapper"]
- });
+ var SetCache = __webpack_require__(__webpack_module_template_argument_0__),
+ arraySome = __webpack_require__(__webpack_module_template_argument_1__);
- _index3["default"]("File", {
- builder: ["program", "comments", "tokens"],
- visitor: ["program"],
- fields: {
- program: {
- validate: _index2.assertNodeType("Program")
- }
- }
- });
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
- _index3["default"]("ForInStatement", {
- visitor: ["left", "right", "body"],
- aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
- fields: {
- left: {
- validate: _index2.assertNodeType("VariableDeclaration", "LVal")
- },
- right: {
- validate: _index2.assertNodeType("Expression")
- },
- body: {
- validate: _index2.assertNodeType("Statement")
- }
- }
- });
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
- _index3["default"]("ForStatement", {
- visitor: ["init", "test", "update", "body"],
- aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
- fields: {
- init: {
- validate: _index2.assertNodeType("VariableDeclaration", "Expression"),
- optional: true
- },
- test: {
- validate: _index2.assertNodeType("Expression"),
- optional: true
- },
- update: {
- validate: _index2.assertNodeType("Expression"),
- optional: true
- },
- body: {
- validate: _index2.assertNodeType("Statement")
- }
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
}
- });
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
- _index3["default"]("FunctionDeclaration", {
- builder: ["id", "params", "body", "generator", "async"],
- visitor: ["id", "params", "body", "returnType", "typeParameters"],
- fields: {
- id: {
- validate: _index2.assertNodeType("Identifier")
- },
- params: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("LVal")))
- },
- body: {
- validate: _index2.assertNodeType("BlockStatement")
- },
- generator: {
- "default": false,
- validate: _index2.assertValueType("boolean")
- },
- async: {
- "default": false,
- validate: _index2.assertValueType("boolean")
- }
- },
- aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"]
- });
+ stack.set(array, other);
- _index3["default"]("FunctionExpression", {
- inherits: "FunctionDeclaration",
- aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
- fields: {
- id: {
- validate: _index2.assertNodeType("Identifier"),
- optional: true
- },
- params: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("LVal")))
- },
- body: {
- validate: _index2.assertNodeType("BlockStatement")
- },
- generator: {
- "default": false,
- validate: _index2.assertValueType("boolean")
- },
- async: {
- "default": false,
- validate: _index2.assertValueType("boolean")
- }
- }
- });
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
- _index3["default"]("Identifier", {
- builder: ["name"],
- visitor: ["typeAnnotation"],
- aliases: ["Expression", "LVal"],
- fields: {
- name: {
- validate: function validate(node, key, val) {
- if (!t.isValidIdentifier(val)) {
- // todo
- }
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
}
+ result = false;
+ break;
}
- }
- });
-
- _index3["default"]("IfStatement", {
- visitor: ["test", "consequent", "alternate"],
- aliases: ["Statement", "Conditional"],
- fields: {
- test: {
- validate: _index2.assertNodeType("Expression")
- },
- consequent: {
- validate: _index2.assertNodeType("Statement")
- },
- alternate: {
- optional: true,
- validate: _index2.assertNodeType("Statement")
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!seen.has(othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
+ return seen.add(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
+ )) {
+ result = false;
+ break;
}
}
- });
+ stack['delete'](array);
+ return result;
+ }
- _index3["default"]("LabeledStatement", {
- visitor: ["label", "body"],
- aliases: ["Statement"],
- fields: {
- label: {
- validate: _index2.assertNodeType("Identifier")
- },
- body: {
- validate: _index2.assertNodeType("Statement")
- }
- }
- });
+ module.exports = equalArrays;
- _index3["default"]("StringLiteral", {
- builder: ["value"],
- fields: {
- value: {
- validate: _index2.assertValueType("string")
- }
- },
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
- });
- _index3["default"]("NumericLiteral", {
- builder: ["value"],
- deprecatedAlias: "NumberLiteral",
- fields: {
- value: {
- validate: _index2.assertValueType("number")
- }
- },
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
- });
+ /***/ },
+ /* 8376 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- _index3["default"]("NullLiteral", {
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
- });
+ var Symbol = __webpack_require__(__webpack_module_template_argument_0__),
+ Uint8Array = __webpack_require__(__webpack_module_template_argument_1__),
+ equalArrays = __webpack_require__(__webpack_module_template_argument_2__),
+ mapToArray = __webpack_require__(__webpack_module_template_argument_3__),
+ setToArray = __webpack_require__(__webpack_module_template_argument_4__);
- _index3["default"]("BooleanLiteral", {
- builder: ["value"],
- fields: {
- value: {
- validate: _index2.assertValueType("boolean")
- }
- },
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
- });
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
- _index3["default"]("RegExpLiteral", {
- builder: ["pattern", "flags"],
- deprecatedAlias: "RegexLiteral",
- aliases: ["Expression", "Literal"],
- fields: {
- pattern: {
- validate: _index2.assertValueType("string")
- },
- flags: {
- validate: _index2.assertValueType("string"),
- "default": ""
- }
- }
- });
+ /** `Object#toString` result references. */
+ var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
- _index3["default"]("LogicalExpression", {
- builder: ["operator", "left", "right"],
- visitor: ["left", "right"],
- aliases: ["Binary", "Expression"],
- fields: {
- operator: {
- validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS)
- },
- left: {
- validate: _index2.assertNodeType("Expression")
- },
- right: {
- validate: _index2.assertNodeType("Expression")
- }
- }
- });
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]';
- _index3["default"]("MemberExpression", {
- builder: ["object", "property", "computed"],
- visitor: ["object", "property"],
- aliases: ["Expression", "LVal"],
- fields: {
- object: {
- validate: _index2.assertNodeType("Expression")
- },
- property: {
- validate: function validate(node, key, val) {
- var expectedType = node.computed ? "Expression" : "Identifier";
- _index2.assertNodeType(expectedType)(node, key, val);
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
}
- },
- computed: {
- "default": false
- }
- }
- });
+ object = object.buffer;
+ other = other.buffer;
- _index3["default"]("NewExpression", {
- visitor: ["callee", "arguments"],
- aliases: ["Expression"],
- fields: {
- callee: {
- validate: _index2.assertNodeType("Expression")
- },
- arguments: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Expression", "SpreadElement")))
- }
- }
- });
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
- _index3["default"]("Program", {
- visitor: ["directives", "body"],
- builder: ["body", "directives"],
- fields: {
- directives: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Directive"))),
- "default": []
- },
- body: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Statement")))
- }
- },
- aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"]
- });
+ case boolTag:
+ case dateTag:
+ // Coerce dates and booleans to numbers, dates to milliseconds and
+ // booleans to `1` or `0` treating invalid dates coerced to `NaN` as
+ // not equal.
+ return +object == +other;
- _index3["default"]("ObjectExpression", {
- visitor: ["properties"],
- aliases: ["Expression"],
- fields: {
- properties: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("ObjectMethod", "ObjectProperty", "SpreadProperty")))
- }
- }
- });
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
- _index3["default"]("ObjectMethod", {
- builder: ["kind", "key", "params", "body", "computed"],
- fields: {
- kind: {
- validate: _index2.chain(_index2.assertValueType("string"), _index2.assertOneOf("method", "get", "set")),
- "default": "method"
- },
- computed: {
- validate: _index2.assertValueType("boolean"),
- "default": false
- },
- key: {
- validate: function validate(node, key, val) {
- var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
- _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
- }
- },
- decorators: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Decorator")))
- },
- body: {
- validate: _index2.assertNodeType("BlockStatement")
- },
- generator: {
- "default": false,
- validate: _index2.assertValueType("boolean")
- },
- async: {
- "default": false,
- validate: _index2.assertValueType("boolean")
- }
- },
- visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
- aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
- });
+ case numberTag:
+ // Treat `NaN` vs. `NaN` as equal.
+ return (object != +object) ? other != +other : object == +other;
- _index3["default"]("ObjectProperty", {
- builder: ["key", "value", "computed", "shorthand", "decorators"],
- fields: {
- computed: {
- validate: _index2.assertValueType("boolean"),
- "default": false
- },
- key: {
- validate: function validate(node, key, val) {
- var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
- _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
- }
- },
- value: {
- validate: _index2.assertNodeType("Expression")
- },
- shorthand: {
- validate: _index2.assertValueType("boolean"),
- "default": false
- },
- decorators: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Decorator"))),
- optional: true
- }
- },
- visitor: ["key", "value", "decorators"],
- aliases: ["UserWhitespacable", "Property", "ObjectMember"]
- });
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
- _index3["default"]("RestElement", {
- visitor: ["argument", "typeAnnotation"],
- aliases: ["LVal"],
- fields: {
- argument: {
- validate: _index2.assertNodeType("LVal")
- }
- }
- });
+ case mapTag:
+ var convert = mapToArray;
- _index3["default"]("ReturnStatement", {
- visitor: ["argument"],
- aliases: ["Statement", "Terminatorless", "CompletionStatement"],
- fields: {
- argument: {
- validate: _index2.assertNodeType("Expression"),
- optional: true
- }
- }
- });
+ case setTag:
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+ convert || (convert = setToArray);
- _index3["default"]("SequenceExpression", {
- visitor: ["expressions"],
- fields: {
- expressions: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Expression")))
- }
- },
- aliases: ["Expression"]
- });
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= UNORDERED_COMPARE_FLAG;
+ stack.set(object, other);
- _index3["default"]("SwitchCase", {
- visitor: ["test", "consequent"],
- fields: {
- test: {
- validate: _index2.assertNodeType("Expression"),
- optional: true
- },
- consequent: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("Statement")))
- }
- }
- });
+ // Recursively compare objects (susceptible to call stack limits).
+ return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
- _index3["default"]("SwitchStatement", {
- visitor: ["discriminant", "cases"],
- aliases: ["Statement", "BlockParent", "Scopable"],
- fields: {
- discriminant: {
- validate: _index2.assertNodeType("Expression")
- },
- cases: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("SwitchCase")))
- }
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
}
- });
+ return false;
+ }
- _index3["default"]("ThisExpression", {
- aliases: ["Expression"]
- });
+ module.exports = equalByTag;
- _index3["default"]("ThrowStatement", {
- visitor: ["argument"],
- aliases: ["Statement", "Terminatorless", "CompletionStatement"],
- fields: {
- argument: {
- validate: _index2.assertNodeType("Expression")
- }
- }
- });
- // todo: at least handler or finalizer should be set to be valid
- _index3["default"]("TryStatement", {
- visitor: ["block", "handler", "finalizer"],
- aliases: ["Statement"],
- fields: {
- body: {
- validate: _index2.assertNodeType("BlockStatement")
- },
- handler: {
- optional: true,
- handler: _index2.assertNodeType("BlockStatement")
- },
- finalizer: {
- optional: true,
- validate: _index2.assertNodeType("BlockStatement")
- }
- }
- });
+ /***/ },
+ /* 8377 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- _index3["default"]("UnaryExpression", {
- builder: ["operator", "argument", "prefix"],
- fields: {
- prefix: {
- "default": true
- },
- argument: {
- validate: _index2.assertNodeType("Expression")
- },
- operator: {
- validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS)
- }
- },
- visitor: ["argument"],
- aliases: ["UnaryLike", "Expression"]
- });
+ var baseHas = __webpack_require__(__webpack_module_template_argument_0__),
+ keys = __webpack_require__(__webpack_module_template_argument_1__);
- _index3["default"]("UpdateExpression", {
- builder: ["operator", "argument", "prefix"],
- fields: {
- prefix: {
- "default": false
- },
- argument: {
- validate: _index2.assertNodeType("Expression")
- },
- operator: {
- validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS)
- }
- },
- visitor: ["argument"],
- aliases: ["Expression"]
- });
+ /** Used to compose bitmasks for comparison styles. */
+ var PARTIAL_COMPARE_FLAG = 2;
- _index3["default"]("VariableDeclaration", {
- builder: ["kind", "declarations"],
- visitor: ["declarations"],
- aliases: ["Statement", "Declaration"],
- fields: {
- kind: {
- validate: _index2.chain(_index2.assertValueType("string"), _index2.assertOneOf("var", "let", "const"))
- },
- declarations: {
- validate: _index2.chain(_index2.assertValueType("array"), _index2.assertEach(_index2.assertNodeType("VariableDeclarator")))
- }
- }
- });
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
- _index3["default"]("VariableDeclarator", {
- visitor: ["id", "init"],
- fields: {
- id: {
- validate: _index2.assertNodeType("LVal")
- },
- init: {
- optional: true,
- validate: _index2.assertNodeType("Expression")
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : baseHas(other, key))) {
+ return false;
}
}
- });
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
- _index3["default"]("WhileStatement", {
- visitor: ["test", "body"],
- aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
- fields: {
- test: {
- validate: _index2.assertNodeType("Expression")
- },
- body: {
- validate: _index2.assertNodeType("BlockStatement", "Statement")
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
}
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
}
- });
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
- _index3["default"]("WithStatement", {
- visitor: ["object", "body"],
- aliases: ["Statement"],
- fields: {
- object: {
- object: _index2.assertNodeType("Expression")
- },
- body: {
- validate: _index2.assertNodeType("BlockStatement", "Statement")
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
}
}
- });
+ stack['delete'](object);
+ return result;
+ }
+
+ module.exports = equalObjects;
+
/***/ },
- /* 540 */
- /*!*************************************!*\
- !*** template of 258 referencing 1 ***!
- \*************************************/
+ /* 8378 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
+
+ var baseGetAllKeys = __webpack_require__(__webpack_module_template_argument_0__),
+ getSymbols = __webpack_require__(__webpack_module_template_argument_1__),
+ keys = __webpack_require__(__webpack_module_template_argument_2__);
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ module.exports = getAllKeys;
+
+
+ /***/ },
+ /* 8379 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- /* eslint max-len: 0 */
+ var baseProperty = __webpack_require__(__webpack_module_template_argument_0__);
- "use strict";
+ /**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a
+ * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
+ * Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+ var getLength = baseProperty('length');
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ module.exports = getLength;
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
- var _index2 = _interopRequireDefault(_index);
+ /***/ },
+ /* 8380 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- _index2["default"]("AssignmentPattern", {
- visitor: ["left", "right"],
- aliases: ["Pattern", "LVal"],
- fields: {
- left: {
- validate: _index.assertNodeType("Identifier")
- },
- right: {
- validate: _index.assertNodeType("Expression")
- }
- }
- });
+ var isKeyable = __webpack_require__(__webpack_module_template_argument_0__);
- _index2["default"]("ArrayPattern", {
- visitor: ["elements", "typeAnnotation"],
- aliases: ["Pattern", "LVal"],
- fields: {
- elements: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Expression")))
- }
- }
- });
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
- _index2["default"]("ArrowFunctionExpression", {
- builder: ["params", "body", "async"],
- visitor: ["params", "body", "returnType"],
- aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
- fields: {
- params: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("LVal")))
- },
- body: {
- validate: _index.assertNodeType("BlockStatement", "Expression")
- },
- async: {
- validate: _index.assertValueType("boolean"),
- "default": false
- }
- }
- });
+ module.exports = getMapData;
- _index2["default"]("ClassBody", {
- visitor: ["body"],
- fields: {
- body: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("ClassMethod", "ClassProperty")))
- }
- }
- });
- _index2["default"]("ClassDeclaration", {
- builder: ["id", "superClass", "body", "decorators"],
- visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
- aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"],
- fields: {
- id: {
- validate: _index.assertNodeType("Identifier")
- },
- body: {
- validate: _index.assertNodeType("ClassBody")
- },
- superClass: {
- optional: true,
- validate: _index.assertNodeType("Expression")
- },
- decorators: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Decorator")))
- }
- }
- });
+ /***/ },
+ /* 8381 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- _index2["default"]("ClassExpression", {
- inherits: "ClassDeclaration",
- aliases: ["Scopable", "Class", "Expression", "Pureish"],
- fields: {
- id: {
- optional: true,
- validate: _index.assertNodeType("Identifier")
- },
- body: {
- validate: _index.assertNodeType("ClassBody")
- },
- superClass: {
- optional: true,
- validate: _index.assertNodeType("Expression")
- },
- decorators: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Decorator")))
- }
- }
- });
+ var isStrictComparable = __webpack_require__(__webpack_module_template_argument_0__),
+ keys = __webpack_require__(__webpack_module_template_argument_1__);
- _index2["default"]("ExportAllDeclaration", {
- visitor: ["source"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
- fields: {
- source: {
- validate: _index.assertNodeType("StringLiteral")
- }
- }
- });
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
- _index2["default"]("ExportDefaultDeclaration", {
- visitor: ["declaration"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
- fields: {
- declaration: {
- validate: _index.assertNodeType("FunctionDeclaration", "ClassDeclaration", "Expression")
- }
- }
- });
+ while (length--) {
+ var key = result[length],
+ value = object[key];
- _index2["default"]("ExportNamedDeclaration", {
- visitor: ["declaration", "specifiers", "source"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
- fields: {
- declaration: {
- validate: _index.assertNodeType("Declaration"),
- optional: true
- },
- specifiers: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("ExportSpecifier")))
- },
- source: {
- validate: _index.assertNodeType("StringLiteral"),
- optional: true
- }
+ result[length] = [key, value, isStrictComparable(value)];
}
- });
+ return result;
+ }
- _index2["default"]("ExportSpecifier", {
- visitor: ["local", "exported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: _index.assertNodeType("Identifier")
- },
- exported: {
- validate: _index.assertNodeType("Identifier")
- }
- }
- });
+ module.exports = getMatchData;
- _index2["default"]("ForOfStatement", {
- visitor: ["left", "right", "body"],
- aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
- fields: {
- left: {
- validate: _index.assertNodeType("VariableDeclaration", "LVal")
- },
- right: {
- validate: _index.assertNodeType("Expression")
- },
- body: {
- validate: _index.assertNodeType("Statement")
- }
- }
- });
- _index2["default"]("ImportDeclaration", {
- visitor: ["specifiers", "source"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration"],
- fields: {
- specifiers: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
- },
- source: {
- validate: _index.assertNodeType("StringLiteral")
- }
- }
- });
+ /***/ },
+ /* 8382 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- _index2["default"]("ImportDefaultSpecifier", {
- visitor: ["local"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: _index.assertNodeType("Identifier")
- }
- }
- });
+ var baseIsNative = __webpack_require__(__webpack_module_template_argument_0__),
+ getValue = __webpack_require__(__webpack_module_template_argument_1__);
- _index2["default"]("ImportNamespaceSpecifier", {
- visitor: ["local"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: _index.assertNodeType("Identifier")
- }
- }
- });
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
- _index2["default"]("ImportSpecifier", {
- visitor: ["local", "imported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: _index.assertNodeType("Identifier")
- },
- imported: {
- validate: _index.assertNodeType("Identifier")
- }
- }
- });
+ module.exports = getNative;
- _index2["default"]("MetaProperty", {
- visitor: ["meta", "property"],
- aliases: ["Expression"],
- fields: {
- // todo: limit to new.target
- meta: {
- validate: _index.assertValueType("string")
- },
- property: {
- validate: _index.assertValueType("string")
- }
- }
- });
- _index2["default"]("ClassMethod", {
- aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
- builder: ["kind", "key", "params", "body", "computed", "static"],
- visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
- fields: {
- kind: {
- validate: _index.chain(_index.assertValueType("string"), _index.assertOneOf("get", "set", "method", "constructor")),
- "default": "method"
- },
- computed: {
- "default": false,
- validate: _index.assertValueType("boolean")
- },
- "static": {
- "default": false,
- validate: _index.assertValueType("boolean")
- },
- key: {
- validate: function validate(node, key, val) {
- var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
- _index.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
+ /***/ },
+ /* 8383 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var stubArray = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /** Built-in value references. */
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+
+ /**
+ * Creates an array of the own enumerable symbol properties of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ function getSymbols(object) {
+ // Coerce `object` to an object to avoid non-object errors in V8.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
+ return getOwnPropertySymbols(Object(object));
+ }
+
+ // Fallback for IE < 11.
+ if (!getOwnPropertySymbols) {
+ getSymbols = stubArray;
+ }
+
+ module.exports = getSymbols;
+
+
+ /***/ },
+ /* 8384 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) {
+
+ var DataView = __webpack_require__(__webpack_module_template_argument_0__),
+ Map = __webpack_require__(__webpack_module_template_argument_1__),
+ Promise = __webpack_require__(__webpack_module_template_argument_2__),
+ Set = __webpack_require__(__webpack_module_template_argument_3__),
+ WeakMap = __webpack_require__(__webpack_module_template_argument_4__),
+ toSource = __webpack_require__(__webpack_module_template_argument_5__);
+
+ /** `Object#toString` result references. */
+ var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
+
+ var dataViewTag = '[object DataView]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function getTag(value) {
+ return objectToString.call(value);
+ }
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
+ // for data views in Edge, and promises in Node.js.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : undefined;
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
}
- },
- params: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("LVal")))
- },
- body: {
- validate: _index.assertNodeType("BlockStatement")
- },
- generator: {
- "default": false,
- validate: _index.assertValueType("boolean")
- },
- async: {
- "default": false,
- validate: _index.assertValueType("boolean")
}
- }
- });
+ return result;
+ };
+ }
- _index2["default"]("ObjectPattern", {
- visitor: ["properties", "typeAnnotation"],
- aliases: ["Pattern", "LVal"],
- fields: {
- properties: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("RestProperty", "Property")))
- }
- }
- });
+ module.exports = getTag;
- _index2["default"]("SpreadElement", {
- visitor: ["argument"],
- aliases: ["UnaryLike"],
- fields: {
- argument: {
- validate: _index.assertNodeType("Expression")
- }
- }
- });
- _index2["default"]("Super", {
- aliases: ["Expression"]
- });
+ /***/ },
+ /* 8385 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__) {
- _index2["default"]("TaggedTemplateExpression", {
- visitor: ["tag", "quasi"],
- aliases: ["Expression"],
- fields: {
- tag: {
- validate: _index.assertNodeType("Expression")
- },
- quasi: {
- validate: _index.assertNodeType("TemplateLiteral")
- }
- }
- });
+ var castPath = __webpack_require__(__webpack_module_template_argument_0__),
+ isArguments = __webpack_require__(__webpack_module_template_argument_1__),
+ isArray = __webpack_require__(__webpack_module_template_argument_2__),
+ isIndex = __webpack_require__(__webpack_module_template_argument_3__),
+ isKey = __webpack_require__(__webpack_module_template_argument_4__),
+ isLength = __webpack_require__(__webpack_module_template_argument_5__),
+ isString = __webpack_require__(__webpack_module_template_argument_6__),
+ toKey = __webpack_require__(__webpack_module_template_argument_7__);
- _index2["default"]("TemplateElement", {
- builder: ["value", "tail"],
- fields: {
- value: {
- // todo: flatten `raw` into main node
- },
- tail: {
- validate: _index.assertValueType("boolean"),
- "default": false
- }
- }
- });
+ /**
+ * 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 = isKey(path, object) ? [path] : castPath(path);
- _index2["default"]("TemplateLiteral", {
- visitor: ["quasis", "expressions"],
- aliases: ["Expression", "Literal"],
- fields: {
- quasis: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("TemplateElement")))
- },
- expressions: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("Expression")))
- }
- }
- });
+ var result,
+ index = -1,
+ length = path.length;
- _index2["default"]("YieldExpression", {
- builder: ["argument", "delegate"],
- visitor: ["argument"],
- aliases: ["Expression", "Terminatorless"],
- fields: {
- delegate: {
- validate: _index.assertValueType("boolean"),
- "default": false
- },
- argument: {
- optional: true,
- validate: _index.assertNodeType("Expression")
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
}
+ object = object[key];
}
- });
+ if (result) {
+ return result;
+ }
+ var length = object ? object.length : 0;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isString(object) || isArguments(object));
+ }
+
+ module.exports = hasPath;
+
/***/ },
- /* 541 */
- /*!*************************************!*\
- !*** template of 259 referencing 1 ***!
- \*************************************/
+ /* 8386 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- "use strict";
+ var nativeCreate = __webpack_require__(__webpack_module_template_argument_0__);
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ }
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
+ module.exports = hashClear;
- var _index2 = _interopRequireDefault(_index);
- _index2["default"]("AwaitExpression", {
- builder: ["argument"],
- visitor: ["argument"],
- aliases: ["Expression", "Terminatorless"],
- fields: {
- argument: {
- validate: _index.assertNodeType("Expression")
- }
- }
- });
+ /***/ },
+ /* 8387 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- _index2["default"]("BindExpression", {
- visitor: ["object", "callee"],
- aliases: ["Expression"],
- fields: {
- // todo
- }
- });
+ var nativeCreate = __webpack_require__(__webpack_module_template_argument_0__);
- _index2["default"]("Decorator", {
- visitor: ["expression"],
- fields: {
- expression: {
- validate: _index.assertNodeType("Expression")
- }
- }
- });
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
- _index2["default"]("DoExpression", {
- visitor: ["body"],
- aliases: ["Expression"],
- fields: {
- body: {
- validate: _index.assertNodeType("BlockStatement")
- }
- }
- });
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- _index2["default"]("ExportDefaultSpecifier", {
- visitor: ["exported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- exported: {
- validate: _index.assertNodeType("Identifier")
- }
- }
- });
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- _index2["default"]("ExportNamespaceSpecifier", {
- visitor: ["exported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- exported: {
- validate: _index.assertNodeType("Identifier")
- }
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
}
- });
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
- _index2["default"]("RestProperty", {
- visitor: ["argument"],
- aliases: ["UnaryLike"],
- fields: {
- argument: {
- validate: _index.assertNodeType("LVal")
- }
- }
- });
+ module.exports = hashGet;
- _index2["default"]("SpreadProperty", {
- visitor: ["argument"],
- aliases: ["UnaryLike"],
- fields: {
- argument: {
- validate: _index.assertNodeType("Expression")
- }
- }
- });
/***/ },
- /* 542 */
- /*!*************************************!*\
- !*** template of 260 referencing 1 ***!
- \*************************************/
+ /* 8388 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- "use strict";
+ var nativeCreate = __webpack_require__(__webpack_module_template_argument_0__);
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- var _index2 = _interopRequireDefault(_index);
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ }
- _index2["default"]("AnyTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {
- // todo
- }
- });
+ module.exports = hashHas;
- _index2["default"]("ArrayTypeAnnotation", {
- visitor: ["elementType"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
- _index2["default"]("BooleanTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {
- // todo
- }
- });
+ /***/ },
+ /* 8389 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var nativeCreate = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ module.exports = hashSet;
- _index2["default"]("BooleanLiteralTypeAnnotation", {
- aliases: ["Flow"],
- fields: {}
- });
- _index2["default"]("NullLiteralTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
- });
+ /***/ },
+ /* 8390 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- _index2["default"]("ClassImplements", {
- visitor: ["id", "typeParameters"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ var baseTimes = __webpack_require__(__webpack_module_template_argument_0__),
+ isArguments = __webpack_require__(__webpack_module_template_argument_1__),
+ isArray = __webpack_require__(__webpack_module_template_argument_2__),
+ isLength = __webpack_require__(__webpack_module_template_argument_3__),
+ isString = __webpack_require__(__webpack_module_template_argument_4__);
- _index2["default"]("ClassProperty", {
- visitor: ["key", "value", "typeAnnotation", "decorators"],
- aliases: ["Flow", "Property"],
- fields: {
- // todo
+ /**
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
+ */
+ function indexKeys(object) {
+ var length = object ? object.length : undefined;
+ if (isLength(length) &&
+ (isArray(object) || isString(object) || isArguments(object))) {
+ return baseTimes(length, String);
}
- });
+ return null;
+ }
- _index2["default"]("DeclareClass", {
- visitor: ["id", "typeParameters", "extends", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
+ module.exports = indexKeys;
- _index2["default"]("DeclareFunction", {
- visitor: ["id"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
- _index2["default"]("DeclareInterface", {
- visitor: ["id", "typeParameters", "extends", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
+ /***/ },
+ /* 8391 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__) {
- _index2["default"]("DeclareModule", {
- visitor: ["id", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
+ var cloneArrayBuffer = __webpack_require__(__webpack_module_template_argument_0__),
+ cloneDataView = __webpack_require__(__webpack_module_template_argument_1__),
+ cloneMap = __webpack_require__(__webpack_module_template_argument_2__),
+ cloneRegExp = __webpack_require__(__webpack_module_template_argument_3__),
+ cloneSet = __webpack_require__(__webpack_module_template_argument_4__),
+ cloneSymbol = __webpack_require__(__webpack_module_template_argument_5__),
+ cloneTypedArray = __webpack_require__(__webpack_module_template_argument_6__);
- _index2["default"]("DeclareTypeAlias", {
- visitor: ["id", "typeParameters", "right"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
+ /** `Object#toString` result references. */
+ var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
- _index2["default"]("DeclareVariable", {
- visitor: ["id"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
- _index2["default"]("ExistentialTypeParam", {
- aliases: ["Flow"]
- });
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
- _index2["default"]("FunctionTypeAnnotation", {
- visitor: ["typeParameters", "params", "rest", "returnType"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
- _index2["default"]("FunctionTypeParam", {
- visitor: ["name", "typeAnnotation"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
- _index2["default"]("GenericTypeAnnotation", {
- visitor: ["id", "typeParameters"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
- _index2["default"]("InterfaceExtends", {
- visitor: ["id", "typeParameters"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ case mapTag:
+ return cloneMap(object, isDeep, cloneFunc);
- _index2["default"]("InterfaceDeclaration", {
- visitor: ["id", "typeParameters", "extends", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
- _index2["default"]("IntersectionTypeAnnotation", {
- visitor: ["types"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ case regexpTag:
+ return cloneRegExp(object);
- _index2["default"]("MixedTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"]
- });
+ case setTag:
+ return cloneSet(object, isDeep, cloneFunc);
- _index2["default"]("NullableTypeAnnotation", {
- visitor: ["typeAnnotation"],
- aliases: ["Flow"],
- fields: {
- // todo
+ case symbolTag:
+ return cloneSymbol(object);
}
- });
+ }
- _index2["default"]("NumericLiteralTypeAnnotation", {
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ module.exports = initCloneByTag;
- _index2["default"]("NumberTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {
- // todo
- }
- });
- _index2["default"]("StringLiteralTypeAnnotation", {
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ /***/ },
+ /* 8392 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- _index2["default"]("StringTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {
- // todo
- }
- });
+ var baseCreate = __webpack_require__(__webpack_module_template_argument_0__),
+ getPrototype = __webpack_require__(__webpack_module_template_argument_1__),
+ isPrototype = __webpack_require__(__webpack_module_template_argument_2__);
- _index2["default"]("ThisTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
- });
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
- _index2["default"]("TupleTypeAnnotation", {
- visitor: ["types"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ module.exports = initCloneObject;
- _index2["default"]("TypeofTypeAnnotation", {
- visitor: ["argument"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
- _index2["default"]("TypeAlias", {
- visitor: ["id", "typeParameters", "right"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- // todo
- }
- });
+ /***/ },
+ /* 8393 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
- _index2["default"]("TypeAnnotation", {
- visitor: ["typeAnnotation"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ var eq = __webpack_require__(__webpack_module_template_argument_0__),
+ isArrayLike = __webpack_require__(__webpack_module_template_argument_1__),
+ isIndex = __webpack_require__(__webpack_module_template_argument_2__),
+ isObject = __webpack_require__(__webpack_module_template_argument_3__);
- _index2["default"]("TypeCastExpression", {
- visitor: ["expression", "typeAnnotation"],
- aliases: ["Flow", "ExpressionWrapper", "Expression"],
- fields: {
- // todo
+ /**
+ * 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;
}
- });
-
- _index2["default"]("TypeParameterDeclaration", {
- visitor: ["params"],
- aliases: ["Flow"],
- fields: {
- // todo
+ 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;
+ }
- _index2["default"]("TypeParameterInstantiation", {
- visitor: ["params"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
+ module.exports = isIterateeCall;
- _index2["default"]("ObjectTypeAnnotation", {
- visitor: ["properties", "indexers", "callProperties"],
- aliases: ["Flow"],
- fields: {
- // todo
- }
- });
- _index2["default"]("ObjectTypeCallProperty", {
- visitor: ["value"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- // todo
- }
- });
+ /***/ },
+ /* 8394 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- _index2["default"]("ObjectTypeIndexer", {
- visitor: ["id", "key", "value"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- // todo
- }
- });
+ var isArray = __webpack_require__(__webpack_module_template_argument_0__),
+ isSymbol = __webpack_require__(__webpack_module_template_argument_1__);
- _index2["default"]("ObjectTypeProperty", {
- visitor: ["key", "value"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- // todo
- }
- });
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
- _index2["default"]("QualifiedTypeIdentifier", {
- visitor: ["id", "qualification"],
- aliases: ["Flow"],
- fields: {
- // todo
+ /**
+ * 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;
}
- });
-
- _index2["default"]("UnionTypeAnnotation", {
- visitor: ["types"],
- aliases: ["Flow"],
- fields: {
- // todo
+ 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;
- _index2["default"]("VoidTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {
- // todo
- }
- });
/***/ },
- /* 543 */
- /*!***************************************!*\
- !*** template of 23 referencing 4, 2 ***!
- \***************************************/
+ /* 8395 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- "use strict";
+ var coreJsData = __webpack_require__(__webpack_module_template_argument_0__);
- var _getIterator = __webpack_require__(/*! babel-runtime/core-js/get-iterator */ 4)["default"];
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
- exports.__esModule = true;
- exports.assertEach = assertEach;
- exports.assertOneOf = assertOneOf;
- exports.assertNodeType = assertNodeType;
- exports.assertNodeOrValueType = assertNodeOrValueType;
- exports.assertValueType = assertValueType;
- exports.chain = chain;
- exports["default"] = defineType;
+ module.exports = isMasked;
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
- var t = _interopRequireWildcard(_index);
+ /***/ },
+ /* 8396 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- var VISITOR_KEYS = {};
- exports.VISITOR_KEYS = VISITOR_KEYS;
- var ALIAS_KEYS = {};
- exports.ALIAS_KEYS = ALIAS_KEYS;
- var NODE_FIELDS = {};
- exports.NODE_FIELDS = NODE_FIELDS;
- var BUILDER_KEYS = {};
- exports.BUILDER_KEYS = BUILDER_KEYS;
- var DEPRECATED_KEYS = {};
-
- exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
- function getType(val) {
- if (Array.isArray(val)) {
- return "array";
- } else if (val === null) {
- return "null";
- } else if (val === undefined) {
- return "undefined";
- } else {
- return typeof val;
- }
+ var isObject = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
}
- function assertEach(callback) {
- function validator(node, key, val) {
- if (!Array.isArray(val)) return;
+ module.exports = isStrictComparable;
- for (var i = 0; i < val.length; i++) {
- callback(node, key + "[" + i + "]", val[i]);
- }
- }
- validator.each = callback;
- return validator;
- }
- function assertOneOf() {
- for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) {
- vals[_key] = arguments[_key];
- }
+ /***/ },
+ /* 8397 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- function validate(node, key, val) {
- if (vals.indexOf(val) < 0) {
- throw new TypeError("Property " + key + " expected value to be one of " + JSON.stringify(vals) + " but got " + JSON.stringify(val));
- }
- }
+ var assocIndexOf = __webpack_require__(__webpack_module_template_argument_0__);
- validate.oneOf = vals;
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype;
- return validate;
- }
+ /** Built-in value references. */
+ var splice = arrayProto.splice;
- function assertNodeType() {
- for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- types[_key2] = arguments[_key2];
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
}
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+ }
- function validate(node, key, val) {
- var valid = false;
+ module.exports = listCacheDelete;
- for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) {
- var _ref;
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
+ /***/ },
+ /* 8398 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- var type = _ref;
+ var assocIndexOf = __webpack_require__(__webpack_module_template_argument_0__);
- if (t.is(type, val)) {
- valid = true;
- break;
- }
- }
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
- if (!valid) {
- throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " " + ("but instead got " + JSON.stringify(val && val.type)));
- }
- }
+ return index < 0 ? undefined : data[index][1];
+ }
- validate.oneOfNodeTypes = types;
+ module.exports = listCacheGet;
- return validate;
- }
- function assertNodeOrValueType() {
- for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
- types[_key3] = arguments[_key3];
- }
+ /***/ },
+ /* 8399 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- function validate(node, key, val) {
- var valid = false;
+ var assocIndexOf = __webpack_require__(__webpack_module_template_argument_0__);
- for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) {
- var _ref2;
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
- }
+ module.exports = listCacheHas;
- var type = _ref2;
- if (getType(val) === type || t.is(type, val)) {
- valid = true;
- break;
- }
- }
+ /***/ },
+ /* 8400 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- if (!valid) {
- throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " " + ("but instead got " + JSON.stringify(val && val.type)));
- }
- }
+ var assocIndexOf = __webpack_require__(__webpack_module_template_argument_0__);
- validate.oneOfNodeOrValueTypes = types;
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
- return validate;
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
}
- function assertValueType(type) {
- function validate(node, key, val) {
- var valid = getType(val) === type;
+ module.exports = listCacheSet;
- if (!valid) {
- throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val));
- }
- }
- validate.type = type;
+ /***/ },
+ /* 8401 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- return validate;
+ var Hash = __webpack_require__(__webpack_module_template_argument_0__),
+ ListCache = __webpack_require__(__webpack_module_template_argument_1__),
+ Map = __webpack_require__(__webpack_module_template_argument_2__);
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
}
- function chain() {
- for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
- fns[_key4] = arguments[_key4];
- }
+ module.exports = mapCacheClear;
- function validate() {
- for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) {
- var _ref3;
- if (_isArray3) {
- if (_i3 >= _iterator3.length) break;
- _ref3 = _iterator3[_i3++];
- } else {
- _i3 = _iterator3.next();
- if (_i3.done) break;
- _ref3 = _i3.value;
- }
+ /***/ },
+ /* 8402 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- var fn = _ref3;
+ var getMapData = __webpack_require__(__webpack_module_template_argument_0__);
- fn.apply(undefined, arguments);
- }
- }
- validate.chainOf = fns;
- return validate;
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
}
- function defineType(type) {
- var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ module.exports = mapCacheDelete;
+
+
+ /***/ },
+ /* 8403 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var getMapData = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
- var inherits = opts.inherits && store[opts.inherits] || {};
+ module.exports = mapCacheGet;
- opts.fields = opts.fields || inherits.fields || {};
- opts.visitor = opts.visitor || inherits.visitor || [];
- opts.aliases = opts.aliases || inherits.aliases || [];
- opts.builder = opts.builder || inherits.builder || opts.visitor || [];
- if (opts.deprecatedAlias) {
- DEPRECATED_KEYS[opts.deprecatedAlias] = type;
- }
+ /***/ },
+ /* 8404 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- // ensure all field keys are represented in `fields`
+ var getMapData = __webpack_require__(__webpack_module_template_argument_0__);
- var _arr = opts.visitor.concat(opts.builder);
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
- for (var _i4 = 0; _i4 < _arr.length; _i4++) {
- var key = _arr[_i4];
- opts.fields[key] = opts.fields[key] || {};
- }
+ module.exports = mapCacheHas;
- for (var key in opts.fields) {
- var field = opts.fields[key];
- if (field["default"] === undefined) {
- field["default"] = null;
- } else if (!field.validate) {
- field.validate = assertValueType(getType(field["default"]));
- }
- }
+ /***/ },
+ /* 8405 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- VISITOR_KEYS[type] = opts.visitor;
- BUILDER_KEYS[type] = opts.builder;
- NODE_FIELDS[type] = opts.fields;
- ALIAS_KEYS[type] = opts.aliases;
+ var getMapData = __webpack_require__(__webpack_module_template_argument_0__);
- store[type] = opts;
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
}
- var store = {};
+ module.exports = mapCacheSet;
+
/***/ },
- /* 544 */
- /*!************************************!*\
- !*** template of 261 referencing ***!
- \************************************/
- /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__) {
+ /* 8406 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- "use strict";
+ var getNative = __webpack_require__(__webpack_module_template_argument_0__);
- __webpack_require__(__webpack_module_template_argument_0__);
+ /* Built-in method references that are verified to be native. */
+ var nativeCreate = getNative(Object, 'create');
- __webpack_require__(__webpack_module_template_argument_1__);
+ module.exports = nativeCreate;
- __webpack_require__(__webpack_module_template_argument_2__);
- __webpack_require__(__webpack_module_template_argument_3__);
+ /***/ },
+ /* 8407 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- __webpack_require__(__webpack_module_template_argument_4__);
+ /* WEBPACK VAR INJECTION */(function(global) {var checkGlobal = __webpack_require__(__webpack_module_template_argument_0__);
- __webpack_require__(__webpack_module_template_argument_5__);
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = checkGlobal(typeof global == 'object' && global);
- __webpack_require__(__webpack_module_template_argument_6__);
+ /** Detect free variable `self`. */
+ var freeSelf = checkGlobal(typeof self == 'object' && self);
+
+ /** Detect `this` as the global object. */
+ var thisGlobal = checkGlobal(typeof this == 'object' && this);
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || thisGlobal || Function('return this')();
+
+ module.exports = root;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
- /* 545 */
- /*!*************************************!*\
- !*** template of 262 referencing 1 ***!
- \*************************************/
+ /* 8408 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- "use strict";
+ var ListCache = __webpack_require__(__webpack_module_template_argument_0__);
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ }
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
+ module.exports = stackClear;
- var _index2 = _interopRequireDefault(_index);
- _index2["default"]("JSXAttribute", {
- visitor: ["name", "value"],
- aliases: ["JSX", "Immutable"],
- fields: {
- name: {
- validate: _index.assertNodeType("JSXIdentifier", "JSXNamespacedName")
- },
- value: {
- optional: true,
- validate: _index.assertNodeType("JSXElement", "StringLiteral", "JSXExpressionContainer")
- }
- }
- });
+ /***/ },
+ /* 8409 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- _index2["default"]("JSXClosingElement", {
- visitor: ["name"],
- aliases: ["JSX", "Immutable"],
- fields: {
- name: {
- validate: _index.assertNodeType("JSXIdentifier", "JSXMemberExpression")
- }
- }
- });
+ var ListCache = __webpack_require__(__webpack_module_template_argument_0__),
+ MapCache = __webpack_require__(__webpack_module_template_argument_1__);
- _index2["default"]("JSXElement", {
- builder: ["openingElement", "closingElement", "children", "selfClosing"],
- visitor: ["openingElement", "children", "closingElement"],
- aliases: ["JSX", "Immutable", "Expression"],
- fields: {
- openingElement: {
- validate: _index.assertNodeType("JSXOpeningElement")
- },
- closingElement: {
- optional: true,
- validate: _index.assertNodeType("JSXClosingElement")
- },
- children: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("JSXText", "JSXExpressionContainer", "JSXElement")))
- }
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var cache = this.__data__;
+ if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) {
+ cache = this.__data__ = new MapCache(cache.__data__);
}
- });
+ cache.set(key, value);
+ return this;
+ }
- _index2["default"]("JSXEmptyExpression", {
- aliases: ["JSX", "Expression"]
- });
+ module.exports = stackSet;
- _index2["default"]("JSXExpressionContainer", {
- visitor: ["expression"],
- aliases: ["JSX", "Immutable"],
- fields: {
- expression: {
- validate: _index.assertNodeType("Expression")
- }
- }
- });
- _index2["default"]("JSXIdentifier", {
- builder: ["name"],
- aliases: ["JSX", "Expression"],
- fields: {
- name: {
- validate: _index.assertValueType("string")
- }
- }
- });
+ /***/ },
+ /* 8410 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- _index2["default"]("JSXMemberExpression", {
- visitor: ["object", "property"],
- aliases: ["JSX", "Expression"],
- fields: {
- object: {
- validate: _index.assertNodeType("JSXMemberExpression", "JSXIdentifier")
- },
- property: {
- validate: _index.assertNodeType("JSXIdentifier")
- }
- }
- });
+ var memoize = __webpack_require__(__webpack_module_template_argument_0__),
+ toString = __webpack_require__(__webpack_module_template_argument_1__);
- _index2["default"]("JSXNamespacedName", {
- visitor: ["namespace", "name"],
- aliases: ["JSX"],
- fields: {
- namespace: {
- validate: _index.assertNodeType("JSXIdentifier")
- },
- name: {
- validate: _index.assertNodeType("JSXIdentifier")
- }
- }
- });
+ /** Used to match property names within property paths. */
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g;
- _index2["default"]("JSXOpeningElement", {
- builder: ["name", "attributes", "selfClosing"],
- visitor: ["name", "attributes"],
- aliases: ["JSX", "Immutable"],
- fields: {
- name: {
- validate: _index.assertNodeType("JSXIdentifier", "JSXMemberExpression")
- },
- selfClosing: {
- "default": false,
- validate: _index.assertValueType("boolean")
- },
- attributes: {
- validate: _index.chain(_index.assertValueType("array"), _index.assertEach(_index.assertNodeType("JSXAttribute", "JSXSpreadAttribute")))
- }
- }
- });
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
- _index2["default"]("JSXSpreadAttribute", {
- visitor: ["argument"],
- aliases: ["JSX"],
- fields: {
- argument: {
- validate: _index.assertNodeType("Expression")
- }
- }
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoize(function(string) {
+ var result = [];
+ toString(string).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
});
- _index2["default"]("JSXText", {
- aliases: ["JSX"],
- builder: ["value"],
- fields: {
- value: {
- validate: _index.assertValueType("string")
- }
- }
- });
+ module.exports = stringToPath;
+
/***/ },
- /* 546 */
- /*!*************************************!*\
- !*** template of 263 referencing 1 ***!
- \*************************************/
+ /* 8411 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- "use strict";
+ var isSymbol = __webpack_require__(__webpack_module_template_argument_0__);
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0;
- var _index = __webpack_require__(__webpack_module_template_argument_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;
+ }
- var _index2 = _interopRequireDefault(_index);
+ module.exports = toKey;
- _index2["default"]("Noop", {
- visitor: []
- });
- _index2["default"]("ParenthesizedExpression", {
- visitor: ["expression"],
- aliases: ["Expression", "ExpressionWrapper"],
- fields: {
- expression: {
- validate: _index.assertNodeType("Expression")
+ /***/ },
+ /* 8412 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) {
+
+ var assignValue = __webpack_require__(__webpack_module_template_argument_0__),
+ copyObject = __webpack_require__(__webpack_module_template_argument_1__),
+ createAssigner = __webpack_require__(__webpack_module_template_argument_2__),
+ isArrayLike = __webpack_require__(__webpack_module_template_argument_3__),
+ isPrototype = __webpack_require__(__webpack_module_template_argument_4__),
+ keys = __webpack_require__(__webpack_module_template_argument_5__);
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Built-in value references. */
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+ /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
+ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
+
+ /**
+ * 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.c = 3;
+ * }
+ *
+ * function Bar() {
+ * this.e = 5;
+ * }
+ *
+ * Foo.prototype.d = 4;
+ * Bar.prototype.f = 6;
+ *
+ * _.assign({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3, 'e': 5 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (nonEnumShadows || 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;
+
+
/***/ },
- /* 547 */
- /*!*************************************!*\
- !*** template of 401 referencing 2 ***!
- \*************************************/
- /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+ /* 8413 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- "use strict";
+ var copyObject = __webpack_require__(__webpack_module_template_argument_0__),
+ createAssigner = __webpack_require__(__webpack_module_template_argument_1__),
+ keysIn = __webpack_require__(__webpack_module_template_argument_2__);
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ /**
+ * 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);
+ });
- exports.__esModule = true;
- exports.createUnionTypeAnnotation = createUnionTypeAnnotation;
- exports.removeTypeDuplicates = removeTypeDuplicates;
- exports.createTypeAnnotationBasedOnTypeof = createTypeAnnotationBasedOnTypeof;
+ module.exports = assignInWith;
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
- var t = _interopRequireWildcard(_index);
+ /***/ },
+ /* 8414 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var baseClone = __webpack_require__(__webpack_module_template_argument_0__);
/**
- * Takes an array of `types` and flattens them, removing duplicates and
- * returns a `UnionTypeAnnotation` node containg them.
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
*/
+ function clone(value) {
+ return baseClone(value, false, true);
+ }
- function createUnionTypeAnnotation(types) {
- var flattened = removeTypeDuplicates(types);
+ module.exports = clone;
- if (flattened.length === 1) {
- return flattened[0];
- } else {
- return t.unionTypeAnnotation(flattened);
- }
- }
+
+ /***/ },
+ /* 8415 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var baseClone = __webpack_require__(__webpack_module_template_argument_0__);
/**
- * Dedupe type annotations.
+ * 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, true, true);
+ }
- function removeTypeDuplicates(nodes) {
- var generics = {};
- var bases = {};
+ module.exports = cloneDeep;
- // store union type groups to circular references
- var typeGroups = [];
- var types = [];
+ /***/ },
+ /* 8416 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
- for (var i = 0; i < nodes.length; i++) {
- var node = nodes[i];
- if (!node) continue;
+ var apply = __webpack_require__(__webpack_module_template_argument_0__),
+ assignInDefaults = __webpack_require__(__webpack_module_template_argument_1__),
+ assignInWith = __webpack_require__(__webpack_module_template_argument_2__),
+ rest = __webpack_require__(__webpack_module_template_argument_3__);
- // detect duplicates
- if (types.indexOf(node) >= 0) {
- continue;
- }
+ /**
+ * 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({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+ var defaults = rest(function(args) {
+ args.push(undefined, assignInDefaults);
+ return apply(assignInWith, undefined, args);
+ });
- // this type matches anything
- if (t.isAnyTypeAnnotation(node)) {
- return [node];
- }
+ module.exports = defaults;
- //
- if (t.isFlowBaseAnnotation(node)) {
- bases[node.type] = node;
- continue;
- }
- //
- if (t.isUnionTypeAnnotation(node)) {
- if (typeGroups.indexOf(node.types) < 0) {
- nodes = nodes.concat(node.types);
- typeGroups.push(node.types);
- }
- continue;
- }
+ /***/ },
+ /* 8417 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
- // find a matching generic type and merge and deduplicate the type parameters
- if (t.isGenericTypeAnnotation(node)) {
- var _name = node.id.name;
+ var arrayEach = __webpack_require__(__webpack_module_template_argument_0__),
+ baseEach = __webpack_require__(__webpack_module_template_argument_1__),
+ baseIteratee = __webpack_require__(__webpack_module_template_argument_2__),
+ isArray = __webpack_require__(__webpack_module_template_argument_3__);
- if (generics[_name]) {
- var existing = generics[_name];
- if (existing.typeParameters) {
- if (node.typeParameters) {
- existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
- }
- } else {
- existing = node.typeParameters;
- }
- } else {
- generics[_name] = node;
- }
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _([1, 2]).forEach(function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, baseIteratee(iteratee, 3));
+ }
- continue;
- }
+ module.exports = forEach;
- types.push(node);
- }
- // add back in bases
- for (var type in bases) {
- types.push(bases[type]);
- }
+ /***/ },
+ /* 8418 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- // add back in generics
- for (var _name2 in generics) {
- types.push(generics[_name2]);
- }
+ var baseGet = __webpack_require__(__webpack_module_template_argument_0__);
- return types;
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is used in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
}
+ module.exports = get;
+
+
+ /***/ },
+ /* 8419 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ var baseHas = __webpack_require__(__webpack_module_template_argument_0__),
+ hasPath = __webpack_require__(__webpack_module_template_argument_1__);
+
/**
- * Create a type anotation based on typeof expression.
+ * 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 createTypeAnnotationBasedOnTypeof(type) {
- if (type === "string") {
- return t.stringTypeAnnotation();
- } else if (type === "number") {
- return t.numberTypeAnnotation();
- } else if (type === "undefined") {
- return t.voidTypeAnnotation();
- } else if (type === "boolean") {
- return t.booleanTypeAnnotation();
- } else if (type === "function") {
- return t.genericTypeAnnotation(t.identifier("Function"));
- } else if (type === "object") {
- return t.genericTypeAnnotation(t.identifier("Object"));
- } else if (type === "symbol") {
- return t.genericTypeAnnotation(t.identifier("Symbol"));
- } else {
- throw new Error("Invalid typeof value");
- }
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
}
+ module.exports = has;
+
+
/***/ },
- /* 548 */
- /*!*****************************************************************************!*\
- !*** template of 11 referencing 14, 4, 1, 2, 54, 55, 69, 62, 34, 31, 63, 6 ***!
- \*****************************************************************************/
- /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__) {
+ /* 8420 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- "use strict";
+ var baseHasIn = __webpack_require__(__webpack_module_template_argument_0__),
+ hasPath = __webpack_require__(__webpack_module_template_argument_1__);
- var _Object$keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ 14)["default"];
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
- var _getIterator = __webpack_require__(/*! babel-runtime/core-js/get-iterator */ 4)["default"];
+ module.exports = hasIn;
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ /***/ },
+ /* 8421 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- var _defaults = __webpack_require__(/*! babel-runtime/helpers/defaults */ 54)["default"];
+ var baseIndexOf = __webpack_require__(__webpack_module_template_argument_0__),
+ isArrayLike = __webpack_require__(__webpack_module_template_argument_1__),
+ isString = __webpack_require__(__webpack_module_template_argument_2__),
+ toInteger = __webpack_require__(__webpack_module_template_argument_3__),
+ values = __webpack_require__(__webpack_module_template_argument_4__);
- var _interopExportWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-export-wildcard */ 55)["default"];
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeMax = Math.max;
- exports.__esModule = true;
- exports.is = is;
- exports.isType = isType;
- exports.validate = validate;
- exports.shallowEqual = shallowEqual;
- exports.appendToMemberExpression = appendToMemberExpression;
- exports.prependToMemberExpression = prependToMemberExpression;
- exports.ensureBlock = ensureBlock;
- exports.clone = clone;
- exports.cloneWithoutLoc = cloneWithoutLoc;
- exports.cloneDeep = cloneDeep;
- exports.buildMatchMemberExpression = buildMatchMemberExpression;
- exports.removeComments = removeComments;
- exports.inheritsComments = inheritsComments;
- exports.inheritTrailingComments = inheritTrailingComments;
- exports.inheritLeadingComments = inheritLeadingComments;
- exports.inheritInnerComments = inheritInnerComments;
- exports.inherits = inherits;
- exports.assertNode = assertNode;
- exports.isNode = isNode;
+ /**
+ * 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/6.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 search.
+ * @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({ 'user': 'fred', 'age': 40 }, 'fred');
+ * // => true
+ *
+ * _.includes('pebbles', 'eb');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
- var _toFastProperties = __webpack_require__(/*! to-fast-properties */ 69);
+ 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);
+ }
- var _toFastProperties2 = _interopRequireDefault(_toFastProperties);
+ module.exports = includes;
- var _lodashArrayCompact = __webpack_require__(/*! lodash/array/compact */ 62);
- var _lodashArrayCompact2 = _interopRequireDefault(_lodashArrayCompact);
+ /***/ },
+ /* 8422 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- var _lodashLangClone = __webpack_require__(/*! lodash/lang/clone */ 34);
+ var isArrayLikeObject = __webpack_require__(__webpack_module_template_argument_0__);
- var _lodashLangClone2 = _interopRequireDefault(_lodashLangClone);
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]';
- var _lodashCollectionEach = __webpack_require__(/*! lodash/collection/each */ 31);
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- var _lodashCollectionEach2 = _interopRequireDefault(_lodashCollectionEach);
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- var _lodashArrayUniq = __webpack_require__(/*! lodash/array/uniq */ 63);
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
- var _lodashArrayUniq2 = _interopRequireDefault(_lodashArrayUniq);
+ /** Built-in value references. */
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
- __webpack_require__(__webpack_module_template_argument_0__);
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
- var _definitions = __webpack_require__(__webpack_module_template_argument_1__);
+ module.exports = isArguments;
- var _react2 = __webpack_require__(__webpack_module_template_argument_2__);
- var _react = _interopRequireWildcard(_react2);
+ /***/ },
+ /* 8423 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- var t = exports;
+ var getLength = __webpack_require__(__webpack_module_template_argument_0__),
+ isFunction = __webpack_require__(__webpack_module_template_argument_1__),
+ isLength = __webpack_require__(__webpack_module_template_argument_2__);
/**
- * Registers `is[Type]` and `assert[Type]` generated functions for a given `type`.
- * Pass `skipAliasCheck` to force it to directly compare `node.type` with `type`.
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
*/
-
- function registerType(type) {
- var is = t["is" + type] = function (node, opts) {
- return t.is(type, node, opts);
- };
-
- t["assert" + type] = function (node, opts) {
- opts = opts || {};
- if (!is(node, opts)) {
- throw new Error("Expected type " + JSON.stringify(type) + " with option " + JSON.stringify(opts));
- }
- };
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
- //
+ module.exports = isArrayLike;
- var _constants = __webpack_require__(__webpack_module_template_argument_3__);
- _defaults(exports, _interopExportWildcard(_constants, _defaults));
+ /***/ },
+ /* 8424 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
- exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;
- exports.NODE_FIELDS = _definitions.NODE_FIELDS;
- exports.BUILDER_KEYS = _definitions.BUILDER_KEYS;
- exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS;
- exports.react = _react;
+ var isArrayLike = __webpack_require__(__webpack_module_template_argument_0__),
+ isObjectLike = __webpack_require__(__webpack_module_template_argument_1__);
/**
- * Registers `is[Type]` and `assert[Type]` for all types.
+ * 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
*/
-
- for (var type in t.VISITOR_KEYS) {
- registerType(type);
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
}
- /**
- * Flip `ALIAS_KEYS` for faster access in the reverse direction.
- */
+ module.exports = isArrayLikeObject;
- t.FLIPPED_ALIAS_KEYS = {};
- _lodashCollectionEach2["default"](t.ALIAS_KEYS, function (aliases, type) {
- _lodashCollectionEach2["default"](aliases, function (alias) {
- var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
- types.push(type);
- });
- });
+ /***/ },
+ /* 8425 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- /**
- * Registers `is[Alias]` and `assert[Alias]` functions for all aliases.
- */
+ /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(__webpack_module_template_argument_0__),
+ stubFalse = __webpack_require__(__webpack_module_template_argument_1__);
- _lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS, function (types, type) {
- t[type.toUpperCase() + "_TYPES"] = types;
- registerType(type);
- });
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports;
- var TYPES = _Object$keys(t.VISITOR_KEYS).concat(_Object$keys(t.FLIPPED_ALIAS_KEYS)).concat(_Object$keys(t.DEPRECATED_KEYS));
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? root.Buffer : undefined;
- exports.TYPES = TYPES;
/**
- * Returns whether `node` is of given `type`.
+ * Checks if `value` is a buffer.
*
- * For better performance, use this instead of `is[Type]` when `type` is unknown.
- * Optionally, pass `skipAliasCheck` to directly compare `node.type` with `type`.
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
*/
+ var isBuffer = !Buffer ? stubFalse : function(value) {
+ return value instanceof Buffer;
+ };
- function is(type, node, opts) {
- if (!node) return false;
+ module.exports = isBuffer;
- var matches = isType(node.type, type);
- if (!matches) return false;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(13)(module)))
- if (typeof opts === "undefined") {
- return true;
- } else {
- return t.shallowEqual(node, opts);
- }
- }
+ /***/ },
+ /* 8426 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+
+ var isObjectLike = __webpack_require__(__webpack_module_template_argument_0__);
+
+ /** `Object#toString` result references. */
+ var numberTag = '[object Number]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
/**
- * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`.
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
+ var objectToString = objectProto.toString;
- function isType(nodeType, targetType) {
- if (nodeType === targetType) return true;
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && objectToString.call(value) == numberTag);
+ }
- // This is a fast-path. If the test above failed, but an alias key is found, then the
- // targetType was a primary node type, so there's no need to check the aliases.
- if (t.ALIAS_KEYS[targetType]) return false;
+ module.exports = isNumber;
- var aliases = t.FLIPPED_ALIAS_KEYS[targetType];
- if (aliases) {
- if (aliases[0] === nodeType) return true;
- for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) {
- var _ref;
+ /***/ },
+ /* 8427 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
+ var getPrototype = __webpack_require__(__webpack_module_template_argument_0__),
+ isHostObject = __webpack_require__(__webpack_module_template_argument_1__),
+ isObjectLike = __webpack_require__(__webpack_module_template_argument_2__);
- var alias = _ref;
+ /** `Object#toString` result references. */
+ var objectTag = '[object Object]';
- if (nodeType === alias) return true;
- }
- }
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- return false;
- }
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
/**
- * Description
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
+ var objectToString = objectProto.toString;
- _lodashCollectionEach2["default"](t.BUILDER_KEYS, function (keys, type) {
- function builder() {
- if (arguments.length > keys.length) {
- throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length));
- }
-
- var node = {};
- node.type = type;
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object,
+ * else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ }
- var i = 0;
+ module.exports = isPlainObject;
- var _arr = keys;
- for (var _i2 = 0; _i2 < _arr.length; _i2++) {
- var key = _arr[_i2];
- var field = t.NODE_FIELDS[type][key];
- var arg = arguments[i++];
- if (arg === undefined) arg = _lodashLangClone2["default"](field["default"]);
+ /***/ },
+ /* 8428 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- node[key] = arg;
- }
+ var isObject = __webpack_require__(__webpack_module_template_argument_0__);
- for (var key in node) {
- validate(node, key, node[key]);
- }
+ /** `Object#toString` result references. */
+ var regexpTag = '[object RegExp]';
- return node;
- }
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- t[type] = builder;
- t[type[0].toLowerCase() + type.slice(1)] = builder;
- });
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
/**
- * Description
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
*/
+ function isRegExp(value) {
+ return isObject(value) && objectToString.call(value) == regexpTag;
+ }
- var _loop = function (type) {
- var proxy = function proxy(fn) {
- return function () {
- console.trace("The node type " + type + " has been renamed to " + newType);
- return fn.apply(this, arguments);
- };
- };
+ module.exports = isRegExp;
- var newType = t.DEPRECATED_KEYS[type];
- t[type] = t[type[0].toLowerCase() + type.slice(1)] = proxy(t[newType]);
- t["is" + type] = proxy(t["is" + newType]);
- t["assert" + type] = proxy(t["assert" + newType]);
- };
+ /***/ },
+ /* 8429 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- for (var type in t.DEPRECATED_KEYS) {
- _loop(type);
- }
+ var isArray = __webpack_require__(__webpack_module_template_argument_0__),
+ isObjectLike = __webpack_require__(__webpack_module_template_argument_1__);
+
+ /** `Object#toString` result references. */
+ var stringTag = '[object String]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
/**
- * Description
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
+ var objectToString = objectProto.toString;
- function validate(node, key, val) {
- if (!node) return;
+ /**
+ * 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 correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+ }
- var fields = t.NODE_FIELDS[node.type];
- if (!fields) return;
+ module.exports = isString;
- var field = fields[key];
- if (!field || !field.validate) return;
- if (field.optional && val == null) return;
- field.validate(node, key, val);
- }
+ /***/ },
+ /* 8430 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- /**
- * Test if an object is shallowly equal.
- */
+ var isLength = __webpack_require__(__webpack_module_template_argument_0__),
+ isObjectLike = __webpack_require__(__webpack_module_template_argument_1__);
- function shallowEqual(actual, expected) {
- var keys = _Object$keys(expected);
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
- var _arr2 = keys;
- for (var _i3 = 0; _i3 < _arr2.length; _i3++) {
- var key = _arr2[_i3];
- if (actual[key] !== expected[key]) {
- return false;
- }
- }
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
- return true;
- }
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
/**
- * Append a node to a member expression.
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
-
- function appendToMemberExpression(member, append, computed) {
- member.object = t.memberExpression(member.object, member.property, member.computed);
- member.property = append;
- member.computed = !!computed;
- return member;
- }
+ var objectToString = objectProto.toString;
/**
- * Prepend a node to a member expression.
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
*/
-
- function prependToMemberExpression(member, prepend) {
- member.object = t.memberExpression(prepend, member.object);
- return member;
+ function isTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}
- /**
- * Ensure the `key` (defaults to "body") of a `node` is a block.
- * Casting it to a block if it is not.
- */
+ module.exports = isTypedArray;
- function ensureBlock(node) {
- var key = arguments.length <= 1 || arguments[1] === undefined ? "body" : arguments[1];
- return node[key] = t.toBlock(node[key], node);
- }
+ /***/ },
+ /* 8431 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) {
+
+ var baseHas = __webpack_require__(__webpack_module_template_argument_0__),
+ baseKeys = __webpack_require__(__webpack_module_template_argument_1__),
+ indexKeys = __webpack_require__(__webpack_module_template_argument_2__),
+ isArrayLike = __webpack_require__(__webpack_module_template_argument_3__),
+ isIndex = __webpack_require__(__webpack_module_template_argument_4__),
+ isPrototype = __webpack_require__(__webpack_module_template_argument_5__);
/**
- * Create a shallow clone of a `node` excluding `_private` properties.
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
*/
+ function keys(object) {
+ var isProto = isPrototype(object);
+ if (!(isProto || isArrayLike(object))) {
+ return baseKeys(object);
+ }
+ var indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
- function clone(node) {
- var newNode = {};
- for (var key in node) {
- if (key[0] === "_") continue;
- newNode[key] = node[key];
+ for (var key in object) {
+ if (baseHas(object, key) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(isProto && key == 'constructor')) {
+ result.push(key);
+ }
}
- return newNode;
+ return result;
}
- /**
- * Create a shallow clone of a `node` excluding `_private` and location properties.
- */
+ module.exports = keys;
- function cloneWithoutLoc(node) {
- var newNode = clone(node);
- delete newNode.loc;
- return newNode;
- }
+
+ /***/ },
+ /* 8432 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
+
+ var baseKeysIn = __webpack_require__(__webpack_module_template_argument_0__),
+ indexKeys = __webpack_require__(__webpack_module_template_argument_1__),
+ isIndex = __webpack_require__(__webpack_module_template_argument_2__),
+ isPrototype = __webpack_require__(__webpack_module_template_argument_3__);
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Create a deep clone of a `node` and all of it's child nodes
- * exluding `_private` properties.
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
+ function keysIn(object) {
+ var index = -1,
+ isProto = isPrototype(object),
+ props = baseKeysIn(object),
+ propsLength = props.length,
+ indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
- function cloneDeep(node) {
- var newNode = {};
+ while (++index < propsLength) {
+ var key = props[index];
+ if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
- for (var key in node) {
- if (key[0] === "_") continue;
+ module.exports = keysIn;
- var val = node[key];
- if (val) {
- if (val.type) {
- val = t.cloneDeep(val);
- } else if (Array.isArray(val)) {
- val = val.map(t.cloneDeep);
- }
- }
+ /***/ },
+ /* 8433 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- newNode[key] = val;
- }
+ var MapCache = __webpack_require__(__webpack_module_template_argument_0__);
- return newNode;
- }
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
/**
- * Build a function that when called will return whether or not the
- * input `node` `MemberExpression` matches the input `match`.
+ * 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.
*
- * For example, given the match `React.createClass` it would match the
- * parsed nodes of `React.createClass` and `React["createClass"]`.
+ * **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/6.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
*/
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
- function buildMatchMemberExpression(match, allowPartial) {
- var parts = match.split(".");
-
- return function (member) {
- // not a member expression
- if (!t.isMemberExpression(member)) return false;
-
- var search = [member];
- var i = 0;
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
- while (search.length) {
- var node = search.shift();
+ // Assign cache to `_.memoize`.
+ memoize.Cache = MapCache;
- if (allowPartial && i === parts.length) {
- return true;
- }
+ module.exports = memoize;
- if (t.isIdentifier(node)) {
- // this part doesn't match
- if (parts[i] !== node.name) return false;
- } else if (t.isStringLiteral(node)) {
- // this part doesn't match
- if (parts[i] !== node.value) return false;
- } else if (t.isMemberExpression(node)) {
- if (node.computed && !t.isStringLiteral(node.property)) {
- // we can't deal with this
- return false;
- } else {
- search.push(node.object);
- search.push(node.property);
- continue;
- }
- } else {
- // we can't deal with this
- return false;
- }
- // too many parts
- if (++i > parts.length) {
- return false;
- }
- }
+ /***/ },
+ /* 8434 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
- return true;
- };
- }
+ var baseProperty = __webpack_require__(__webpack_module_template_argument_0__),
+ basePropertyDeep = __webpack_require__(__webpack_module_template_argument_1__),
+ isKey = __webpack_require__(__webpack_module_template_argument_2__),
+ toKey = __webpack_require__(__webpack_module_template_argument_3__);
/**
- * Remove comment properties from a node.
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
*/
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
- function removeComments(node) {
- for (var _iterator2 = t.COMMENT_KEYS, _isArray2 = Array.isArray(_iterator2), _i4 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) {
- var _ref2;
+ module.exports = property;
- if (_isArray2) {
- if (_i4 >= _iterator2.length) break;
- _ref2 = _iterator2[_i4++];
- } else {
- _i4 = _iterator2.next();
- if (_i4.done) break;
- _ref2 = _i4.value;
- }
- var key = _ref2;
+ /***/ },
+ /* 8435 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) {
- delete node[key];
- }
- return node;
- }
+ var baseRepeat = __webpack_require__(__webpack_module_template_argument_0__),
+ isIterateeCall = __webpack_require__(__webpack_module_template_argument_1__),
+ toInteger = __webpack_require__(__webpack_module_template_argument_2__),
+ toString = __webpack_require__(__webpack_module_template_argument_3__);
/**
- * Inherit all unique comments from `parent` node to `child` node.
+ * 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 inheritsComments(child, parent) {
- inheritTrailingComments(child, parent);
- inheritLeadingComments(child, parent);
- inheritInnerComments(child, parent);
- return child;
- }
-
- function inheritTrailingComments(child, parent) {
- _inheritComments("trailingComments", child, parent);
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
}
- function inheritLeadingComments(child, parent) {
- _inheritComments("leadingComments", child, parent);
- }
+ module.exports = repeat;
- function inheritInnerComments(child, parent) {
- _inheritComments("innerComments", child, parent);
- }
- function _inheritComments(key, child, parent) {
- if (child && parent) {
- child[key] = _lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key], parent[key])));
- }
- }
+ /***/ },
+ /* 8436 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- // Can't use import because of cyclic dependency between babel-traverse
- // and this module (babel-types). This require needs to appear after
- // we export the TYPES constant.
- var traverse = __webpack_require__(/*! babel-traverse */ 6)["default"];
+ var baseToString = __webpack_require__(__webpack_module_template_argument_0__);
/**
- * Inherit all contextual properties from `parent` node to `child` node.
+ * 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 process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
*/
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
- function inherits(child, parent) {
- if (!child || !parent) return child;
-
- // optionally inherit specific properties if not null
- var _arr3 = t.INHERIT_KEYS.optional;
- for (var _i5 = 0; _i5 < _arr3.length; _i5++) {
- var key = _arr3[_i5];
- if (child[key] == null) {
- child[key] = parent[key];
- }
- }
-
- // force inherit "private" properties
- for (var key in parent) {
- if (key[0] === "_") child[key] = parent[key];
- }
+ module.exports = toString;
- // force inherit select properties
- var _arr4 = t.INHERIT_KEYS.force;
- for (var _i6 = 0; _i6 < _arr4.length; _i6++) {
- var key = _arr4[_i6];
- child[key] = parent[key];
- }
- t.inheritsComments(child, parent);
- traverse.copyCache(parent, child);
+ /***/ },
+ /* 8437 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- return child;
- }
+ var baseUniq = __webpack_require__(__webpack_module_template_argument_0__);
/**
- * TODO
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each
+ * element is kept.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
*/
-
- function assertNode(node) {
- if (!isNode(node)) {
- // $FlowFixMe
- throw new TypeError("Not a valid node " + (node && node.type));
- }
+ function uniq(array) {
+ return (array && array.length)
+ ? baseUniq(array)
+ : [];
}
+ module.exports = uniq;
+
+
+ /***/ },
+ /* 8438 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
+
+ var baseValues = __webpack_require__(__webpack_module_template_argument_0__),
+ keys = __webpack_require__(__webpack_module_template_argument_1__);
+
/**
- * TODO
+ * 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 isNode(node) {
- return !!(node && _definitions.VISITOR_KEYS[node.type]);
+ function values(object) {
+ return object ? baseValues(object, keys(object)) : [];
}
- // Optimize property access.
- _toFastProperties2["default"](t);
- _toFastProperties2["default"](t.VISITOR_KEYS);
+ module.exports = values;
- //
- var _retrievers = __webpack_require__(__webpack_module_template_argument_4__);
+ /***/ },
+ /* 8439 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
- _defaults(exports, _interopExportWildcard(_retrievers, _defaults));
+ /*istanbul ignore next*/"use strict";
- var _validators = __webpack_require__(__webpack_module_template_argument_5__);
+ exports.__esModule = true;
- _defaults(exports, _interopExportWildcard(_validators, _defaults));
+ exports.default = function (callee, thisNode, args) {
+ if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, { name: "arguments" })) {
+ // eg. super(...arguments);
+ return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]);
+ } else {
+ return t.callExpression(t.memberExpression(callee, t.identifier("call")), /*istanbul ignore next*/[thisNode].concat(args));
+ }
+ };
- var _converters = __webpack_require__(__webpack_module_template_argument_6__);
+ var /*istanbul ignore next*/_babelTypes = __webpack_require__(__webpack_module_template_argument_0__);
- _defaults(exports, _interopExportWildcard(_converters, _defaults));
+ /*istanbul ignore next*/
+ var t = _interopRequireWildcard(_babelTypes);
- var _flow = __webpack_require__(__webpack_module_template_argument_7__);
+ /*istanbul ignore next*/
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
- _defaults(exports, _interopExportWildcard(_flow, _defaults));
+ /* eslint max-len: 0 */
- /***/ },
- /* 549 */
- /*!*************************************!*\
- !*** template of 265 referencing 2 ***!
- \*************************************/
- /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
+ module.exports = exports["default"];
- "use strict";
+ /***/ },
+ /* 8440 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) {
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ /*istanbul ignore next*/"use strict";
exports.__esModule = true;
- exports.isCompatTag = isCompatTag;
- exports.buildChildren = buildChildren;
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
+ var _classCallCheck2 = __webpack_require__(__webpack_module_template_argument_0__);
- var t = _interopRequireWildcard(_index);
+ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var isReactComponent = t.buildMatchMemberExpression("React.Component");
+ var _symbol = __webpack_require__(__webpack_module_template_argument_1__);
- exports.isReactComponent = isReactComponent;
+ var _symbol2 = _interopRequireDefault(_symbol);
- function isCompatTag(tagName) {
- return !!tagName && /^[a-z]|\-/.test(tagName);
- }
+ var /*istanbul ignore next*/_babelHelperOptimiseCallExpression = __webpack_require__(__webpack_module_template_argument_2__);
- function cleanJSXElementLiteralChild(child, args) {
- var lines = child.value.split(/\r\n|\n|\r/);
+ /*istanbul ignore next*/
+ var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression);
- var lastNonEmptyLine = 0;
+ var /*istanbul ignore next*/_babelMessages = __webpack_require__(__webpack_module_template_argument_3__);
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].match(/[^ \t]/)) {
- lastNonEmptyLine = i;
- }
- }
+ /*istanbul ignore next*/
+ var messages = _interopRequireWildcard(_babelMessages);
- var str = "";
+ var /*istanbul ignore next*/_babelTypes = __webpack_require__(__webpack_module_template_argument_4__);
- for (var i = 0; i < lines.length; i++) {
- var line = lines[i];
+ /*istanbul ignore next*/
+ var t = _interopRequireWildcard(_babelTypes);
- var isFirstLine = i === 0;
- var isLastLine = i === lines.length - 1;
- var isLastNonEmptyLine = i === lastNonEmptyLine;
+ /*istanbul ignore next*/
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
- // replace rendered whitespace tabs with spaces
- var trimmedLine = line.replace(/\t/g, " ");
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- // trim whitespace touching a newline
- if (!isFirstLine) {
- trimmedLine = trimmedLine.replace(/^[ ]+/, "");
- }
+ // ✌️
+ /* eslint max-len: 0 */
- // trim whitespace touching an endline
- if (!isLastLine) {
- trimmedLine = trimmedLine.replace(/[ ]+$/, "");
- }
+ var HARDCORE_THIS_REF = /*istanbul ignore next*/(0, _symbol2.default)();
- if (trimmedLine) {
- if (!isLastNonEmptyLine) {
- trimmedLine += " ";
- }
+ 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;
+ }
- str += trimmedLine;
+ function isMemberExpressionSuper(node) {
+ return t.isMemberExpression(node) && t.isSuper(node.object);
+ }
+
+ var visitor = { /*istanbul ignore next*/
+ Function: function Function(path) {
+ if (!path.inShadow("this")) {
+ path.skip();
}
- }
+ },
+ /*istanbul ignore next*/ReturnStatement: function ReturnStatement(path, state) {
+ if (!path.inShadow("this")) {
+ state.returns.push(path);
+ }
+ },
+ /*istanbul ignore next*/ThisExpression: function ThisExpression(path, state) {
+ if (!path.node[HARDCORE_THIS_REF]) {
+ state.thises.push(path);
+ }
+ },
+ /*istanbul ignore next*/enter: function enter(path, state) {
+ var callback = state.specHandle;
+ if (state.isLoose) callback = state.looseHandle;
- if (str) args.push(t.stringLiteral(str));
- }
+ var isBareSuper = path.isCallExpression() && path.get("callee").isSuper();
- function buildChildren(node) {
- var elems = [];
+ var result = callback.call(state, path);
- for (var i = 0; i < node.children.length; i++) {
- var child = node.children[i];
+ if (result) {
+ state.hasSuper = true;
+ }
- if (t.isJSXText(child)) {
- cleanJSXElementLiteralChild(child, elems);
- continue;
+ if (isBareSuper) {
+ state.bareSupers.push(path);
}
- if (t.isJSXExpressionContainer(child)) child = child.expression;
- if (t.isJSXEmptyExpression(child)) continue;
+ if (result === true) {
+ path.requeue();
+ }
- elems.push(child);
+ if (result !== true && result) {
+ if (Array.isArray(result)) {
+ path.replaceWithMultiple(result);
+ } else {
+ path.replaceWith(result);
+ }
+ }
}
+ };
- return elems;
- }
-
- /***/ },
- /* 550 */
- /*!*****************************************!*\
- !*** template of 194 referencing 10, 2 ***!
- \*****************************************/
- /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) {
-
- "use strict";
-
- var _Object$create = __webpack_require__(/*! babel-runtime/core-js/object/create */ 10)["default"];
+ /*istanbul ignore next*/
+ var ReplaceSupers = function () {
+ function /*istanbul ignore next*/ReplaceSupers(opts) {
+ /*istanbul ignore next*/var inClass = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
+ /*istanbul ignore next*/(0, _classCallCheck3.default)(this, ReplaceSupers);
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ 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;
- exports.__esModule = true;
- exports.getBindingIdentifiers = getBindingIdentifiers;
- exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
+ this.bareSupers = [];
+ this.returns = [];
+ this.thises = [];
+ }
- var _index = __webpack_require__(__webpack_module_template_argument_0__);
+ ReplaceSupers.prototype.getObjectRef = function getObjectRef() {
+ return this.opts.objectRef || this.opts.getObjectRef();
+ };
- var t = _interopRequireWildcard(_index);
+ /**
+ * Sets a super class value of the named property.
+ *
+ * @example
+ *
+ * _set(Object.getPrototypeOf(CLASS.prototype), "METHOD", "VALUE", this)
+ *
+ */
- /**
- * Return a list of binding identifiers associated with the input `node`.
- */
+ ReplaceSupers.prototype.setSuperProperty = function setSuperProperty(property, value, isComputed) {
+ return t.callExpression(this.file.addHelper("set"), [t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [this.isStatic ? this.getObjectRef() : t.memberExpression(this.getObjectRef(), t.identifier("prototype"))]), isComputed ? property : t.stringLiteral(property.name), value, t.thisExpression()]);
+ };
- function getBindingIdentifiers(node, duplicates, outerOnly) {
- var search = [].concat(node);
- var ids = _Object$create(null);
+ /**
+ * Gets a node representing the super class value of the named property.
+ *
+ * @example
+ *
+ * _get(Object.getPrototypeOf(CLASS.prototype), "METHOD", this)
+ *
+ */
- while (search.length) {
- var id = search.shift();
- if (!id) continue;
+ ReplaceSupers.prototype.getSuperProperty = function getSuperProperty(property, isComputed) {
+ return t.callExpression(this.file.addHelper("get"), [t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [this.isStatic ? this.getObjectRef() : t.memberExpression(this.getObjectRef(), t.identifier("prototype"))]), isComputed ? property : t.stringLiteral(property.name), t.thisExpression()]);
+ };
- var keys = t.getBindingIdentifiers.keys[id.type];
+ ReplaceSupers.prototype.replace = function replace() {
+ this.methodPath.traverse(visitor, this);
+ };
- if (t.isIdentifier(id)) {
- if (duplicates) {
- var _ids = ids[id.name] = ids[id.name] || [];
- _ids.push(id);
- } else {
- ids[id.name] = id;
- }
- continue;
- }
+ ReplaceSupers.prototype.getLooseSuperProperty = function getLooseSuperProperty(id, parent) {
+ var methodNode = this.methodNode;
+ var superRef = this.superRef || t.identifier("Function");
- if (t.isExportDeclaration(id)) {
- if (t.isDeclaration(node.declaration)) {
- search.push(node.declaration);
- }
- continue;
+ if (parent.property === id) {
+ return;
+ } else if (t.isCallExpression(parent, { callee: id })) {
+ return;
+ } else if (t.isMemberExpression(parent) && !methodNode.static) {
+ // super.test -> objectRef.prototype.test
+ return t.memberExpression(superRef, t.identifier("prototype"));
+ } else {
+ return superRef;
}
+ };
- if (outerOnly) {
- if (t.isFunctionDeclaration(id)) {
- search.push(id.id);
- continue;
- }
+ 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;
- if (t.isFunctionExpression(id)) {
- continue;
- }
+ // super.test(); -> objectRef.prototype.MethodName.call(this);
+ t.appendToMemberExpression(callee, t.identifier("call"));
+ node.arguments.unshift(t.thisExpression());
+ return true;
}
+ };
- if (keys) {
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- if (id[key]) {
- search = search.concat(id[key]);
- }
- }
+ ReplaceSupers.prototype.specHandleAssignmentExpression = function specHandleAssignmentExpression(ref, path, node) {
+ if (node.operator === "=") {
+ // super.name = "val"; -> _set(Object.getPrototypeOf(objectRef.prototype), "name", this);
+ return this.setSuperProperty(node.left.property, node.right, node.left.computed);
+ } else {
+ // super.age += 2; -> let _ref = super.age; super.age = _ref + 2;
+ 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)))];
}
- }
-
- return ids;
- }
-
- /**
- * Mapping of types to their identifier keys.
- */
-
- getBindingIdentifiers.keys = {
- DeclareClass: ["id"],
- DeclareFunction: ["id"],
- DeclareModule: ["id"],
- DeclareVariable: ["id"],
- InterfaceDeclaration: ["id"],
- TypeAlias: ["id"],
+ };
- CatchClause: ["param"],
- LabeledStatement: ["label"],
- UnaryExpression: ["argument"],
- AssignmentExpression: ["left"],
+ ReplaceSupers.prototype.specHandle = function specHandle(path) {
+ var property = /*istanbul ignore next*/void 0;
+ var computed = /*istanbul ignore next*/void 0;
+ var args = /*istanbul ignore next*/void 0;
+ var thisReference = /*istanbul ignore next*/void 0;
- ImportSpecifier: ["local"],
- ImportNamespaceSpecifier: ["local"],
- ImportDefaultSpecifier: ["local"],
- ImportDeclaration: ["specifiers"],
+ var parent = path.parent;
+ var node = path.node;
- ExportSpecifier: ["exported"],
- ExportNamespaceSpecifier: ["exported"],
- ExportDefaultSpecifier: ["exported"],
+ if (isIllegalBareSuper(node, parent)) {
+ throw path.buildCodeFrameError(messages.get("classesIllegalBareSuper"));
+ }
- FunctionDeclaration: ["id", "params"],
- FunctionExpression: ["id", "params"],
+ if (t.isCallExpression(node)) {
+ var callee = node.callee;
+ if (t.isSuper(callee)) {
+ return;
+ } else if (isMemberExpressionSuper(callee)) {
+ // super.test(); -> _get(Object.getPrototypeOf(objectRef.prototype), "test", this).call(this);
+ property = callee.property;
+ computed = callee.computed;
+ args = node.arguments;
+ }
+ } else if (t.isMemberExpression(node) && t.isSuper(node.object)) {
+ // super.name; -> _get(Object.getPrototypeOf(objectRef.prototype), "name", this);
+ 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) {
+ // ++super.foo; -> super.foo += 1;
+ return this.specHandleAssignmentExpression(null, path, binary);
+ } else {
+ // super.foo++; -> let _ref = super.foo; super.foo = _ref + 1;
+ 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);
+ }
- ClassDeclaration: ["id"],
- ClassExpression: ["id"],
+ if (!property) return;
- RestElement: ["argument"],
- UpdateExpression: ["argument"],
+ var superProperty = this.getSuperProperty(property, computed, thisReference);
- RestProperty: ["argument"],
- ObjectProperty: ["value"],
+ if (args) {
+ return this.optimiseCall(superProperty, args);
+ } else {
+ return superProperty;
+ }
+ };
- AssignmentPattern: ["left"],
- ArrayPattern: ["elements"],
- ObjectPattern: ["properties"],
+ ReplaceSupers.prototype.optimiseCall = function optimiseCall(callee, args) {
+ var thisNode = t.thisExpression();
+ thisNode[HARDCORE_THIS_REF] = true;
+ return (/*istanbul ignore next*/(0, _babelHelperOptimiseCallExpression2.default)(callee, thisNode, args)
+ );
+ };
- VariableDeclaration: ["declarations"],
- VariableDeclarator: ["id"]
- };
+ return ReplaceSupers;
+ }();
- function getOuterBindingIdentifiers(node, duplicates) {
- return getBindingIdentifiers(node, duplicates, true);
- }
+ /*istanbul ignore next*/exports.default = ReplaceSupers;
+ /*istanbul ignore next*/module.exports = exports["default"];
/***/ },
- /* 551 */
- /*!********************************************!*\
- !*** template of 403 referencing 1, 2, 30 ***!
- \********************************************/
+ /* 8441 */
/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) {
- /* eslint indent: 0 */
+ /*istanbul ignore next*/"use strict";
- "use strict";
+ exports.__esModule = true;
- var _interopRequireDefault = __webpack_require__(/*! babel-runtime/helpers/interop-require-default */ 1)["default"];
+ var _getIterator2 = __webpack_require__(__webpack_module_template_argument_0__);
- var _interopRequireWildcard = __webpack_require__(/*! babel-runtime/helpers/interop-require-wildcard */ 2)["default"];
+ var _getIterator3 = _interopRequireDefault(_getIterator2);
- exports.__esModule = true;
- exports.isBinding = isBinding;
- exports.isReferenced = isReferenced;
- exports.isValidIdentifier = isValidIdentifier;
- exports.isLet = isLet;
- exports.isBlockScoped = isBlockScoped;
- exports.isVar = isVar;
- exports.isSpecifierDefault = isSpecifierDefault;
- exports.isScope = isScope;
- exports.isImmutable = isImmutable;
+ var _create = __webpack_require__(__webpack_module_template_argument_1__);
- var _retrievers = __webpack_require__(__webpack_module_template_argument_0__);
+ var _create2 = _interopRequireDefault(_create);
- var _esutils = __webpack_require__(/*! esutils */ 30);
+ exports.default = function () {
+ return {
+ visitor: { /*istanbul ignore next*/
+ ObjectExpression: function ObjectExpression(path) {
+ /*istanbul ignore next*/var node = path.node;
- var _esutils2 = _interopRequireDefault(_esutils);
+ var plainProps = node.properties.filter(function (prop) /*istanbul ignore next*/{
+ return !t.isSpreadProperty(prop) && !prop.computed;
+ });
- var _index = __webpack_require__(__webpack_module_template_argument_1__);
+ // A property is a duplicate key if:
+ // * the property is a data property, and is preceeded by a data,
+ // getter, or setter property of the same name.
+ // * the property is a getter property, and is preceeded by a data or
+ // getter property of the same name.
+ // * the property is a setter property, and is preceeded by a data or
+ // setter property of the same name.
- var t = _interopRequireWildcard(_index);
+ var alreadySeenData = /*istanbul ignore next*/(0, _create2.default)(null);
+ var alreadySeenGetters = /*istanbul ignore next*/(0, _create2.default)(null);
+ var alreadySeenSetters = /*istanbul ignore next*/(0, _create2.default)(null);
- var _constants = __webpack_require__(__webpack_module_template_argument_2__);
+ for ( /*istanbul ignore next*/var _iterator = plainProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
+ /*istanbul ignore next*/
+ var _ref;
- /**
- * Check if the input `node` is a binding identifier.
- */
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref = _i.value;
+ }
- function isBinding(node, parent) {
- var keys = _retrievers.getBindingIdentifiers.keys[parent.type];
- if (keys) {
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var val = parent[key];
- if (Array.isArray(val)) {
- if (val.indexOf(node) >= 0) return true;
- } else {
- if (val === node) return true;
+ var prop = _ref;
+
+ var name = getName(prop.key);
+ var isDuplicate = false;
+ switch (prop.kind) {
+ case "get":
+ if (alreadySeenData[name] || alreadySeenGetters[name]) {
+ isDuplicate = true;
+ }
+ alreadySeenGetters[name] = true;
+ break;
+ case "set":
+ if (alreadySeenData[name] || alreadySeenSetters[name]) {
+ isDuplicate = true;
+ }
+ alreadySeenSetters[name] = true;
+ break;
+ default:
+ if (alreadySeenData[name] || alreadySeenGetters[name] || alreadySeenSetters[name]) {
+ isDuplicate = true;
+ }
+ alreadySeenData[name] = true;
+ }
+
+ if (isDuplicate) {
+ // Rely on the computed properties transform to split the property
+ // assignment out of the object literal.
+ prop.computed = true;
+ prop.key = t.stringLiteral(name);
+ }
+ }
}
}
- }
+ };
+ };
- return false;
+ var /*istanbul ignore next*/_babelTypes = __webpack_require__(__webpack_module_template_argument_2__);
+
+ /*istanbul ignore next*/
+ var t = _interopRequireWildcard(_babelTypes);
+
+ /*istanbul ignore next*/
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function getName(key) {
+ if (t.isIdentifier(key)) {
+ return key.name;
+ }
+ return key.value.toString();
}
- /**
- * Check if the input `node` is a reference to a bound variable.
- */
+ /*istanbul ignore next*/module.exports = exports["default"];
- function isReferenced(node, parent) {
- switch (parent.type) {
- // yes: object::NODE
- // yes: NODE::callee
- case "BindExpression":
- return parent.object === node || parent.callee === node;
+ /***/ },
+ /* 8442 */
+ /***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) {
- // yes: PARENT[NODE]
- // yes: NODE.child
- // no: parent.NODE
- case "MemberExpression":
- case "JSXMemberExpression":
- if (parent.property === node && parent.computed) {
- return true;
- } else if (parent.object === node) {
- return true;
- } else {
- return false;
- }
+ /*istanbul ignore next*/"use strict";
- // no: new.NODE
- // no: NODE.target
- case "MetaProperty":
- return false;
+ exports.__esModule = true;
- // yes: { [NODE]: "" }
- // yes: { NODE }
- // no: { NODE: "" }
- case "ObjectProperty":
- if (parent.key === node) {
- return parent.computed;
- }
+ exports.default = function (opts) {
+ var visitor = {};
- // no: let NODE = init;
- // yes: let id = NODE;
- case "VariableDeclarator":
- return parent.id !== node;
+ visitor.JSXNamespacedName = function (path) {
+ throw path.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML.");
+ };
- // no: function NODE() {}
- // no: function foo(NODE) {}
- case "ArrowFunctionExpression":
- case "FunctionDeclaration":
- case "FunctionExpression":
- var _arr = parent.params;
+ visitor.JSXElement = { /*istanbul ignore next*/
+ exit: function exit(path, file) {
+ var callExpr = buildElementCall(path.get("openingElement"), file);
- for (var _i = 0; _i < _arr.length; _i++) {
- var param = _arr[_i];
- if (param === node) return false;
+ callExpr.arguments = callExpr.arguments.concat(path.node.children);
+
+ if (callExpr.arguments.length >= 3) {
+ callExpr._prettyCall = true;
}
- return parent.id !== node;
+ path.replaceWith(t.inherits(callExpr, path.node));
+ }
+ };
- // no: export { foo as NODE };
- // yes: export { NODE as foo };
- // no: export { NODE as foo } from "foo";
- case "ExportSpecifier":
- if (parent.source) {
- return false;
+ return visitor;
+
+ function convertJSXIdentifier(node, parent) {
+ if (t.isJSXIdentifier(node)) {
+ if (node.name === "this" && t.isReferenced(node, parent)) {
+ return t.thisExpression();
+ } else if ( /*istanbul ignore next*/_esutils2.default.keyword.isIdentifierNameES6(node.name)) {
+ node.type = "Identifier";
} else {
- return parent.local === node;
+ return t.stringLiteral(node.name);
}
+ } else if (t.isJSXMemberExpression(node)) {
+ return t.memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node));
+ }
- // no: export NODE from "foo";
- // no: export * as NODE from "foo";
- case "ExportNamespaceSpecifier":
- case "ExportDefaultSpecifier":
- return false;
+ return node;
+ }
- // no:
- case "JSXAttribute":
- return parent.name !== node;
+ function convertAttributeValue(node) {
+ if (t.isJSXExpressionContainer(node)) {
+ return node.expression;
+ } else {
+ return node;
+ }
+ }
- // no: class { NODE = value; }
- // yes: class { key = NODE; }
- case "ClassProperty":
- return parent.value === node;
+ function convertAttribute(node) {
+ var value = convertAttributeValue(node.value || t.booleanLiteral(true));
- // no: import NODE from "foo";
- // no: import * as NODE from "foo";
- // no: import { NODE as foo } from "foo";
- // no: import { foo as NODE } from "foo";
- // no: import NODE from "bar";
- case "ImportDefaultSpecifier":
- case "ImportNamespaceSpecifier":
- case "ImportSpecifier":
- return false;
+ if (t.isStringLiteral(value) && !t.isJSXExpressionContainer(node.value)) {
+ value.value = value.value.replace(/\n\s+/g, " ");
+ }
- // no: class NODE {}
- case "ClassDeclaration":
- case "ClassExpression":
- return parent.id !== node;
+ if (t.isValidIdentifier(node.name.name)) {
+ node.name.type = "Identifier";
+ } else {
+ node.name = t.stringLiteral(node.name.name);
+ }
- // yes: class { [NODE](){} }
- case "ClassMethod":
- case "ObjectMethod":
- return parent.key === node && parent.computed;
+ return t.inherits(t.objectProperty(node.name, value), node);
+ }
- // no: NODE: for (;;) {}
- case "LabeledStatement":
- return false;
+ function buildElementCall(path, file) {
+ path.parent.children = t.react.buildChildren(path.parent);
- // no: try {} catch (NODE) {}
- case "CatchClause":
- return parent.param !== node;
+ var tagExpr = convertJSXIdentifier(path.node.name, path.node);
+ var args = [];
- // no: function foo(...NODE) {}
- case "RestElement":
- return false;
+ var tagName = /*istanbul ignore next*/void 0;
+ if (t.isIdentifier(tagExpr)) {
+ tagName = tagExpr.name;
+ } else if (t.isLiteral(tagExpr)) {
+ tagName = tagExpr.value;
+ }
- // yes: left = NODE;
- // no: NODE = right;
- case "AssignmentExpression":
- return parent.right === node;
+ var state = {
+ tagExpr: tagExpr,
+ tagName: tagName,
+ args: args
+ };
- // no: [NODE = foo] = [];
- // yes: [foo = NODE] = [];
- case "AssignmentPattern":
- return parent.right === node;
+ if (opts.pre) {
+ opts.pre(state, file);
+ }
- // no: [NODE] = [];
- // no: ({ NODE }) = [];
- case "ObjectPattern":
- case "ArrayPattern":
- return false;
- }
+ var attribs = path.node.attributes;
+ if (attribs.length) {
+ attribs = buildOpeningElementAttributes(attribs, file);
+ } else {
+ attribs = t.nullLiteral();
+ }
- return true;
- }
+ args.push(attribs);
- /**
- * Check if the input `name` is a valid identifier name
- * and isn't a reserved word.
- */
+ if (opts.post) {
+ opts.post(state, file);
+ }
- function isValidIdentifier(name) {
- if (typeof name !== "string" || _esutils2["default"].keyword.isReservedWordES6(name, true)) {
- return false;
- } else {
- return _esutils2["default"].keyword.isIdentifierNameES6(name);
+ return state.call || t.callExpression(state.callee, args);
}
- }
-
- /**
- * Check if the input `node` is a `let` variable declaration.
- */
- function isLet(node) {
- return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
- }
+ /**
+ * The logic for this is quite terse. It's because we need to
+ * support spread elements. We loop over all attributes,
+ * breaking on spreads, we then push a new object containg
+ * all prior attributes to an array for later processing.
+ */
- /**
- * Check if the input `node` is block scoped.
- */
+ function buildOpeningElementAttributes(attribs, file) {
+ var _props = [];
+ var objs = [];
- function isBlockScoped(node) {
- return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node);
- }
+ function pushProps() {
+ if (!_props.length) return;
- /**
- * Check if the input `node` is a variable declaration.
- */
+ objs.push(t.objectExpression(_props));
+ _props = [];
+ }
- function isVar(node) {
- return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
- }
+ while (attribs.length) {
+ var prop = attribs.shift();
+ if (t.isJSXSpreadAttribute(prop)) {
+ pushProps();
+ objs.push(prop.argument);
+ } else {
+ _props.push(convertAttribute(prop));
+ }
+ }
- /**
- * Check if the input `specifier` is a `default` import or export.
- */
+ pushProps();
- function isSpecifierDefault(specifier) {
- return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" });
- }
+ if (objs.length === 1) {
+ // only one object
+ attribs = objs[0];
+ } else {
+ // looks like we have multiple objects
+ if (!t.isObjectExpression(objs[0])) {
+ objs.unshift(t.objectExpression([]));
+ }
- /**
- * Check if the input `node` is a scope.
- */
+ // spread it
+ attribs = t.callExpression(file.addHelper("extends"), objs);
+ }
- function isScope(node, parent) {
- if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) {
- return false;
+ return attribs;
}
+ };
- return t.isScopable(node);
- }
+ var /*istanbul ignore next*/_esutils = __webpack_require__(__webpack_module_template_argument_0__);
- /**
- * Check if the input `node` is definitely immutable.
- */
+ /*istanbul ignore next*/
+ var _esutils2 = _interopRequireDefault(_esutils);
- function isImmutable(node) {
- if (t.isType(node.type, "Immutable")) return true;
+ var /*istanbul ignore next*/_babelTypes = __webpack_require__(__webpack_module_template_argument_1__);
- if (t.isIdentifier(node)) {
- if (node.name === "undefined") {
- // immutable!
- return true;
- } else {
- // no idea...
- return false;
- }
- }
+ /*istanbul ignore next*/
+ var t = _interopRequireWildcard(_babelTypes);
- return false;
- }
+ /*istanbul ignore next*/
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ module.exports = exports["default"]; // function called with (state: ElementState) after building attribs
/***/ }
/******/ ])))
@@ -95208,7 +142466,7 @@ return /******/ (function(modules) { // webpackBootstrap
;
/***/ },
-/* 469 */
+/* 474 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
@@ -95217,21 +142475,27 @@ return /******/ (function(modules) { // webpackBootstrap
value: true
});
+ var _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; }; }();
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /* eslint new-cap:0 no-unused-vars:0 */
- var _react = __webpack_require__(300);
+ var _react = __webpack_require__(299);
var _react2 = _interopRequireDefault(_react);
- var _reactDom = __webpack_require__(310);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
+ var _reactDom = __webpack_require__(309);
- var _babelStandalone = __webpack_require__(468);
+ var _babelStandalone = __webpack_require__(473);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(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; }
+
+ function _inherits(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 getType = function getType(el) {
var t = typeof el === "undefined" ? "undefined" : _typeof(el);
@@ -95333,107 +142597,163 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- var Preview = _react2.default.createClass({
- displayName: "Preview",
+ var EsPreview = function (_Component) {
+ _inherits(EsPreview, _Component);
- propTypes: {
- code: _react2.default.PropTypes.string.isRequired,
- scope: _react2.default.PropTypes.object.isRequired
- },
+ function EsPreview() {
+ var _Object$getPrototypeO;
- componentDidMount: function componentDidMount() {
- this._executeCode();
- },
- componentDidUpdate: function componentDidUpdate(prevProps) {
- clearTimeout(this.timeoutID); //eslint-disable-line
- if (this.props.code !== prevProps.code) {
- this._executeCode();
+ var _temp, _this, _ret;
+
+ _classCallCheck(this, EsPreview);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
}
- },
- _compileCode: function _compileCode() {
- return (0, _babelStandalone.transform)("\n (function(" + Object.keys(this.props.scope).join(",") + ") {\n var list = [];\n var console = { log(...x) {\n list.push({val: x, multipleArgs: x.length !== 1})\n }};\n " + this.props.code + "\n return list;\n });\n ", { presets: ["es2015", "react", "stage-1"] }).code;
- },
- _setTimeout: function _setTimeout() {
- clearTimeout(this.timeoutID); //eslint-disable-line
- this.timeoutID = setTimeout.apply(null, arguments); //eslint-disable-line
- },
- _executeCode: function _executeCode() {
- var _this = this;
- var mountNode = this.refs.mount;
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(EsPreview)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), _possibleConstructorReturn(_this, _ret);
+ }
+
+ _createClass(EsPreview, [{
+ key: "render",
+ value: function render() {
+ return _react2.default.createElement("div", { ref: "mount" });
+ }
+ }]);
+
+ return EsPreview;
+ }(_react.Component);
+
+ EsPreview.propTypes = {
+ code: _react.PropTypes.string.isRequired,
+ scope: _react.PropTypes.object.isRequired
+ };
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this2 = this;
+
+ this._compileCode = function () {
+ var _props = _this2.props;
+ var code = _props.code;
+ var scope = _props.scope;
+
+ return (0, _babelStandalone.transform)("\n ((" + Object.keys(scope).join(",") + ") => {\n var list = [];\n var console = { log(...x) {\n list.push({val: x, multipleArgs: x.length !== 1})\n }};\n " + code + "\n return list;\n });\n ", { presets: ["es2015", "react", "stage-1"] }).code;
+ };
+
+ this._setTimeout = function () {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ clearTimeout(_this2.timeoutID); //eslint-disable-line
+ _this2.timeoutID = setTimeout.apply(null, args); //eslint-disable-line
+ };
+
+ this._executeCode = function () {
+ var mountNode = _this2.refs.mount;
try {
- _reactDom2.default.unmountComponentAtNode(mountNode);
+ (0, _reactDom.unmountComponentAtNode)(mountNode);
} catch (e) {
console.error(e); //eslint-disable-line
}
try {
(function () {
- var scope = [];
- for (var s in _this.props.scope) {
- if (_this.props.scope.hasOwnProperty(s)) {
- scope.push(_this.props.scope[s]);
- }
- }
- scope.push(mountNode);
- var compiledCode = _this._compileCode();
- var Component = _react2.default.createElement(_react2.default.createClass({
- displayName: "Component",
- _createConsoleLine: function _createConsoleLine(x, multipleArgs) {
- var _this2 = this;
+ var scope = _this2.props.scope;
- return _react2.default.createElement(
- "span",
- { style: { marginRight: "20px" } },
- multipleArgs ? x.map(function (y) {
- return _this2._createConsoleLine([y], false);
- }) : wrapMap["wrap" + getType(x[0])](x[0])
- );
- },
- render: function render() {
- var _this3 = this;
+ var tempScope = [];
+ Object.keys(scope).forEach(function (s) {
+ return tempScope.push(scope[s]);
+ });
+ tempScope.push(mountNode);
+ var compiledCode = _this2._compileCode();
- return _react2.default.createElement(
- "div",
- { style: { padding: 15, fontFamily: "Consolas, Courier, monospace" } },
- eval(compiledCode).apply(null, scope).map(function (x, i) {
- //eslint-disable-line
- return _react2.default.createElement(
- "div",
- {
- key: i,
- style: {
- borderBottom: "1px solid #ccc",
- padding: "4px 0"
- } },
- _this3._createConsoleLine(x.val, x.multipleArgs)
- );
- })
- );
+ var Comp = function (_Component2) {
+ _inherits(Comp, _Component2);
+
+ function Comp() {
+ var _Object$getPrototypeO2;
+
+ var _temp2, _this3, _ret3;
+
+ _classCallCheck(this, Comp);
+
+ for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
+ args[_key3] = arguments[_key3];
+ }
+
+ return _ret3 = (_temp2 = (_this3 = _possibleConstructorReturn(this, (_Object$getPrototypeO2 = Object.getPrototypeOf(Comp)).call.apply(_Object$getPrototypeO2, [this].concat(args))), _this3), _this3._createConsoleLine = function (_ref) {
+ var val = _ref.val;
+ var multipleArgs = _ref.multipleArgs;
+ return _react2.default.createElement(
+ "span",
+ { style: { marginRight: "20px" } },
+ multipleArgs ? val.map(function (y) {
+ return _this3._createConsoleLine([y], false);
+ }) : wrapMap["wrap" + getType(val[0])](val[0])
+ );
+ }, _temp2), _possibleConstructorReturn(_this3, _ret3);
}
- }));
- _reactDom2.default.render(Component, mountNode);
+
+ _createClass(Comp, [{
+ key: "render",
+ value: function render() {
+ var _this4 = this;
+
+ return _react2.default.createElement(
+ "div",
+ { style: { padding: 15, fontFamily: "Consolas, Courier, monospace" } },
+ eval(compiledCode).apply(null, tempScope).map(function (x, i) {
+ return (//eslint-disable-line
+ _react2.default.createElement(
+ "div",
+ {
+ key: i,
+ style: {
+ borderBottom: "1px solid #ccc",
+ padding: "4px 0"
+ } },
+ _this4._createConsoleLine(x)
+ )
+ );
+ })
+ );
+ }
+ }]);
+
+ return Comp;
+ }(_react.Component);
+
+ (0, _reactDom.render)(_react2.default.createElement(Comp, null), mountNode);
})();
} catch (err) {
- this._setTimeout(function () {
- _reactDom2.default.render(_react2.default.createElement(
+ _this2._setTimeout(function () {
+ (0, _reactDom.render)(_react2.default.createElement(
"div",
{ className: "playgroundError" },
err.toString()
), mountNode);
}, 500);
}
- },
- render: function render() {
- return _react2.default.createElement("div", { ref: "mount" });
- }
- });
+ };
- exports.default = Preview;
+ this.componentDidMount = function () {
+ _this2._executeCode();
+ };
+
+ this.componentDidUpdate = function (prevProps) {
+ clearTimeout(_this2.timeoutID); //eslint-disable-line
+ if (_this2.props.code !== prevProps.code) {
+ _this2._executeCode();
+ }
+ };
+ };
+
+ exports.default = EsPreview;
/***/ },
-/* 470 */
+/* 475 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
@@ -95442,130 +142762,148 @@ return /******/ (function(modules) { // webpackBootstrap
value: true
});
- var _react = __webpack_require__(300);
+ var _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; }; }();
+
+ var _react = __webpack_require__(299);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(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; }
+
+ function _inherits(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 propTypesArray = [{
key: "array",
- test: _react2.default.PropTypes.array,
- isRequired: _react2.default.PropTypes.array.isRequired
+ test: _react.PropTypes.array,
+ isRequired: _react.PropTypes.array.isRequired
}, {
key: "boolean",
- test: _react2.default.PropTypes.bool,
- isRequired: _react2.default.PropTypes.bool.isRequired
+ test: _react.PropTypes.bool,
+ isRequired: _react.PropTypes.bool.isRequired
}, {
key: "function",
- test: _react2.default.PropTypes.func,
- isRequired: _react2.default.PropTypes.func.isRequired
+ test: _react.PropTypes.func,
+ isRequired: _react.PropTypes.func.isRequired
}, {
key: "number",
- test: _react2.default.PropTypes.number,
- isRequired: _react2.default.PropTypes.number.isRequired
+ test: _react.PropTypes.number,
+ isRequired: _react.PropTypes.number.isRequired
}, {
key: "object",
- test: _react2.default.PropTypes.object,
- isRequired: _react2.default.PropTypes.array.isRequired
+ test: _react.PropTypes.object,
+ isRequired: _react.PropTypes.array.isRequired
}, {
key: "string",
- test: _react2.default.PropTypes.string,
- isRequired: _react2.default.PropTypes.string.isRequired
+ test: _react.PropTypes.string,
+ isRequired: _react.PropTypes.string.isRequired
}, {
key: "node",
- test: _react2.default.PropTypes.node,
- isRequired: _react2.default.PropTypes.node.isRequired
+ test: _react.PropTypes.node,
+ isRequired: _react.PropTypes.node.isRequired
}, {
key: "element",
- test: _react2.default.PropTypes.element,
- isRequired: _react2.default.PropTypes.element.isRequired
+ test: _react.PropTypes.element,
+ isRequired: _react.PropTypes.element.isRequired
}];
var getReactPropType = function getReactPropType(propTypeFunc) {
- var propType = {
- name: "custom",
- isRequired: false
- };
+ var name = "custom";
+ var isRequired = false;
- for (var i = 0; i < propTypesArray.length; i++) {
- if (propTypeFunc === propTypesArray[i].test) {
- propType.name = propTypesArray[i].key;
-
- break;
+ propTypesArray.some(function (propType) {
+ if (propTypeFunc === propType.test) {
+ name = propType.key;
+ return true;
+ }
+ if (propTypeFunc === propType.isRequired) {
+ name = propType.key;
+ isRequired = true;
+ return true;
}
+ return false;
+ });
+ return { name: name, isRequired: isRequired };
+ };
- if (propTypeFunc === propTypesArray[i].isRequired) {
- propType.name = propTypesArray[i].key;
- propType.isRequired = true;
+ var Doc = function (_Component) {
+ _inherits(Doc, _Component);
- break;
- }
+ function Doc() {
+ _classCallCheck(this, Doc);
+
+ return _possibleConstructorReturn(this, Object.getPrototypeOf(Doc).apply(this, arguments));
}
- return propType;
- };
+ _createClass(Doc, [{
+ key: "render",
+ value: function render() {
- exports.default = _react2.default.createClass({
- displayName: "doc",
+ var propTypes = [];
+ var _props = this.props;
+ var componentClass = _props.componentClass;
+ var ignore = _props.ignore;
+ var propDescriptionMap = _props.propDescriptionMap;
- propTypes: {
- componentClass: _react2.default.PropTypes.func,
- propDescriptionMap: _react2.default.PropTypes.object,
- ignore: _react2.default.PropTypes.array
- },
- getDefaultProps: function getDefaultProps() {
- return {
- propDescriptionMap: {},
- ignore: []
- };
- },
- render: function render() {
- var propTypes = [];
- var propName = void 0;
-
- for (propName in this.props.componentClass.propTypes) {
- if (this.props.ignore.indexOf(propName)) {
- propTypes.push({
- propName: propName,
- type: getReactPropType(this.props.componentClass.propTypes[propName]),
- description: this.props.propDescriptionMap[propName] || ""
- });
+ for (var propName in componentClass.propTypes) {
+ if (ignore.indexOf(propName)) {
+ propTypes.push({
+ propName: propName,
+ type: getReactPropType(componentClass.propTypes[propName]),
+ description: propDescriptionMap[propName] || ""
+ });
+ }
}
- }
- return _react2.default.createElement(
- "div",
- null,
- _react2.default.createElement(
- "ul",
+ return _react2.default.createElement(
+ "div",
null,
- propTypes.map(function (propObj) {
- return _react2.default.createElement(
- "li",
- { key: propObj.propName },
- _react2.default.createElement(
- "b",
- null,
- propObj.propName
- ),
- _react2.default.createElement(
- "i",
- null,
- ": " + propObj.type.name
- ),
- propObj.description && " - " + propObj.description,
- _react2.default.createElement(
- "b",
- null,
- propObj.type.isRequired ? " required" : ""
- )
- );
- })
- )
- );
- }
- });
+ _react2.default.createElement(
+ "ul",
+ null,
+ propTypes.map(function (propObj) {
+ return _react2.default.createElement(
+ "li",
+ { key: propObj.propName },
+ _react2.default.createElement(
+ "b",
+ null,
+ propObj.propName
+ ),
+ _react2.default.createElement(
+ "i",
+ null,
+ ": " + propObj.type.name
+ ),
+ propObj.description && " - " + propObj.description,
+ _react2.default.createElement(
+ "b",
+ null,
+ "" + (propObj.type.isRequired ? " required" : "")
+ )
+ );
+ })
+ )
+ );
+ }
+ }]);
+
+ return Doc;
+ }(_react.Component);
+
+ Doc.defaultProps = {
+ propDescriptionMap: {},
+ ignore: []
+ };
+ Doc.propTypes = {
+ componentClass: _react.PropTypes.func,
+ propDescriptionMap: _react.PropTypes.object,
+ ignore: _react.PropTypes.array
+ };
+ exports.default = Doc;
/***/ }
/******/ ])
diff --git a/dist/component-playground.min.js b/dist/component-playground.min.js
index 1a15e79..350b1ef 100644
--- a/dist/component-playground.min.js
+++ b/dist/component-playground.min.js
@@ -1,17 +1,17 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ComponentPlayground=t(require("react"),require("react-dom")):e.ComponentPlayground=t(e.React,e.ReactDom)}(this,function(__WEBPACK_EXTERNAL_MODULE_300__,__WEBPACK_EXTERNAL_MODULE_310__){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=r(i);t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),n(2);var i=n(300),o=r(i),s=n(301),a=r(s),u=n(309),l=r(u),c=n(466),p=r(c),f=n(467),d=r(f),h=o["default"].createClass({displayName:"ReactPlayground",propTypes:{codeText:o["default"].PropTypes.string.isRequired,scope:o["default"].PropTypes.object.isRequired,collapsableCode:o["default"].PropTypes.bool,docClass:o["default"].PropTypes.func,propDescriptionMap:o["default"].PropTypes.object,theme:o["default"].PropTypes.string,selectedLines:o["default"].PropTypes.array,noRender:o["default"].PropTypes.bool,es6Console:o["default"].PropTypes.bool,context:o["default"].PropTypes.object,initiallyExpanded:o["default"].PropTypes.bool,previewComponent:o["default"].PropTypes.node},getDefaultProps:function(){return{theme:"monokai",noRender:!0,context:{},initiallyExpanded:!1}},getInitialState:function(){return{code:this.props.codeText,expandedCode:this.props.initiallyExpanded,external:!0}},componentWillReceiveProps:function(e){this.setState({code:e.codeText,external:!0})},_handleCodeChange:function(e){this.setState({code:e,external:!1})},_toggleCode:function(){this.setState({expandedCode:!this.state.expandedCode})},render:function(){return this.props.noRender===!1,o["default"].createElement("div",{className:"playground"+(this.props.collapsableCode?" collapsableCode":"")},this.props.docClass?o["default"].createElement(d["default"],{componentClass:this.props.docClass,propDescriptionMap:this.props.propDescriptionMap}):"",o["default"].createElement("div",{className:"playgroundCode"+(this.state.expandedCode?" expandedCode":"")},o["default"].createElement(a["default"],{className:"playgroundStage",codeText:this.state.code,external:this.state.external,onChange:this._handleCodeChange,selectedLines:this.props.selectedLines,theme:this.props.theme})),this.props.collapsableCode?o["default"].createElement("div",{className:"playgroundToggleCodeBar"},o["default"].createElement("span",{className:"playgroundToggleCodeLink",onClick:this._toggleCode},this.state.expandedCode?"collapse":"expand")):"",o["default"].createElement("div",{className:"playgroundPreview"},this.props.es6Console?o["default"].createElement(p["default"],{code:this.state.code,scope:this.props.scope}):o["default"].createElement(l["default"],{context:this.props.context,code:this.state.code,scope:this.props.scope,noRender:this.props.noRender,previewComponent:this.props.previewComponent})))}});t["default"]=h},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(3),n(295),n(297),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(4),n(53),n(54),n(55),n(56),n(58),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(69),n(71),n(73),n(75),n(77),n(80),n(81),n(82),n(86),n(88),n(90),n(94),n(95),n(96),n(97),n(99),n(100),n(101),n(102),n(103),n(104),n(105),n(107),n(108),n(109),n(111),n(112),n(113),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(127),n(128),n(133),n(134),n(138),n(139),n(140),n(141),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(161),n(162),n(168),n(169),n(171),n(172),n(173),n(177),n(178),n(179),n(180),n(181),n(183),n(184),n(185),n(186),n(189),n(191),n(192),n(193),n(195),n(197),n(199),n(200),n(201),n(203),n(204),n(205),n(206),n(212),n(215),n(216),n(218),n(219),n(222),n(223),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(246),n(247),n(248),n(249),n(250),n(251),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(262),n(263),n(265),n(266),n(267),n(268),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(293),n(294),e.exports=n(10)},function(e,t,n){"use strict";var r=n(5),i=n(6),o=n(7),s=n(9),a=n(19),u=n(23).KEY,l=n(8),c=n(24),p=n(25),f=n(20),d=n(26),h=n(27),m=n(28),v=n(30),g=n(43),y=n(46),b=n(13),x=n(33),E=n(17),C=n(18),A=n(47),S=n(50),w=n(52),D=n(12),_=n(31),T=w.f,k=D.f,P=S.f,F=r.Symbol,M=r.JSON,N=M&&M.stringify,O="prototype",I=d("_hidden"),L=d("toPrimitive"),R={}.propertyIsEnumerable,B=c("symbol-registry"),j=c("symbols"),U=c("op-symbols"),V=Object[O],W="function"==typeof F,G=r.QObject,H=!G||!G[O]||!G[O].findChild,q=o&&l(function(){return 7!=A(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=T(V,t);r&&delete V[t],k(e,t,n),r&&e!==V&&k(V,t,r)}:k,K=function(e){var t=j[e]=A(F[O]);return t._k=e,t},z=W&&"symbol"==typeof F.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof F},Y=function(e,t,n){return e===V&&Y(U,t,n),b(e),t=E(t,!0),b(n),i(j,t)?(n.enumerable?(i(e,I)&&e[I][t]&&(e[I][t]=!1),n=A(n,{enumerable:C(0,!1)})):(i(e,I)||k(e,I,C(1,{})),e[I][t]=!0),q(e,t,n)):k(e,t,n)},X=function(e,t){b(e);for(var n,r=g(t=x(t)),i=0,o=r.length;o>i;)Y(e,n=r[i++],t[n]);return e},J=function(e,t){return void 0===t?A(e):X(A(e),t)},$=function(e){var t=R.call(this,e=E(e,!0));return this===V&&i(j,e)&&!i(U,e)?!1:t||!i(this,e)||!i(j,e)||i(this,I)&&this[I][e]?t:!0},Q=function(e,t){if(e=x(e),t=E(t,!0),e!==V||!i(j,t)||i(U,t)){var n=T(e,t);return!n||!i(j,t)||i(e,I)&&e[I][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=P(x(e)),r=[],o=0;n.length>o;)i(j,t=n[o++])||t==I||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===V,r=P(n?U:x(e)),o=[],s=0;r.length>s;)i(j,t=r[s++])&&(n?i(V,t):!0)&&o.push(j[t]);return o};W||(F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(U,n),i(this,I)&&i(this[I],e)&&(this[I][e]=!1),q(this,e,C(1,n))};return o&&H&&q(V,e,{configurable:!0,set:t}),K(e)},a(F[O],"toString",function(){return this._k}),w.f=Q,D.f=Y,n(51).f=S.f=Z,n(45).f=$,n(44).f=ee,o&&!n(29)&&a(V,"propertyIsEnumerable",$,!0),h.f=function(e){return K(d(e))}),s(s.G+s.W+s.F*!W,{Symbol:F});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var te=_(d.store),ne=0;te.length>ne;)m(te[ne++]);s(s.S+s.F*!W,"Symbol",{"for":function(e){return i(B,e+="")?B[e]:B[e]=F(e)},keyFor:function(e){if(z(e))return v(B,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!W,"Object",{create:J,defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee}),M&&s(s.S+s.F*(!W||l(function(){var e=F();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){return n&&(t=n.call(this,e,t)),z(t)?void 0:t}),r[1]=t,N.apply(M,r)}}}),F[O][L]||n(11)(F[O],L,F[O].valueOf),p(F,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){e.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(5),i=n(10),o=n(11),s=n(19),a=n(21),u="prototype",l=function(e,t,n){var c,p,f,d,h=e&l.F,m=e&l.G,v=e&l.S,g=e&l.P,y=e&l.B,b=m?r:v?r[t]||(r[t]={}):(r[t]||{})[u],x=m?i:i[t]||(i[t]={}),E=x[u]||(x[u]={});m&&(n=t);for(c in n)p=!h&&b&&void 0!==b[c],f=(p?b:n)[c],d=y&&p?a(f,r):g&&"function"==typeof f?a(Function.call,f):f,b&&s(b,c,f,e&l.U),x[c]!=f&&o(x,c,d),g&&E[c]!=f&&(E[c]=f)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(12),i=n(18);e.exports=n(7)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(13),i=n(15),o=n(17),s=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(14);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(14),i=n(5).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(14);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(5),i=n(11),o=n(6),s=n(20)("src"),a="toString",u=Function[a],l=(""+u).split(a);n(10).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,a){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,s)||i(n,s,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:a?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[s]||u.call(this)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(22);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(20)("meta"),i=n(14),o=n(6),s=n(12).f,a=0,u=Object.isExtensible||function(){return!0},l=!n(8)(function(){return u(Object.preventExtensions({}))}),c=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},f=function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return l&&h.NEED&&u(e)&&!o(e,r)&&c(e),e},h=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},function(e,t,n){var r=n(5),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,n){var r=n(12).f,i=n(6),o=n(26)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(24)("wks"),i=n(20),o=n(5).Symbol,s="function"==typeof o,a=e.exports=function(e){return r[e]||(r[e]=s&&o[e]||(s?o:i)("Symbol."+e))};a.store=r},function(e,t,n){t.f=n(26)},function(e,t,n){var r=n(5),i=n(10),o=n(29),s=n(27),a=n(12).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t){e.exports=!1},function(e,t,n){var r=n(31),i=n(33);e.exports=function(e,t){for(var n,o=i(e),s=r(o),a=s.length,u=0;a>u;)if(o[n=s[u++]]===t)return n}},function(e,t,n){var r=n(32),i=n(42);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(6),i=n(33),o=n(37)(!1),s=n(41)("IE_PROTO");e.exports=function(e,t){var n,a=i(e),u=0,l=[];for(n in a)n!=s&&r(a,n)&&l.push(n);for(;t.length>u;)r(a,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(34),i=n(36);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(35);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(33),i=n(38),o=n(40);e.exports=function(e){return function(t,n,s){var a,u=r(t),l=i(u.length),c=o(s,l);if(e&&n!=n){for(;l>c;)if(a=u[c++],a!=a)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(39),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(39),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),0>e?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(24)("keys"),i=n(20);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(31),i=n(44),o=n(45);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var s,a=n(e),u=o.f,l=0;a.length>l;)u.call(e,s=a[l++])&&t.push(s);return t}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(35);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(13),i=n(48),o=n(42),s=n(41)("IE_PROTO"),a=function(){},u="prototype",l=function(){var e,t=n(16)("iframe"),r=o.length,i=">";for(t.style.display="none",n(49).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("u;)r.f(e,n=s[u++],t[n]);return e}},function(e,t,n){e.exports=n(5).document&&document.documentElement},function(e,t,n){var r=n(33),i=n(51).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return i(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?a(e):i(r(e))}},function(e,t,n){var r=n(32),i=n(42).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(45),i=n(18),o=n(33),s=n(17),a=n(6),u=n(15),l=Object.getOwnPropertyDescriptor;t.f=n(7)?l:function(e,t){if(e=o(e),t=s(t,!0),u)try{return l(e,t)}catch(n){}return a(e,t)?i(!r.f.call(e,t),e[t]):void 0}},function(e,t,n){var r=n(9);r(r.S,"Object",{create:n(47)})},function(e,t,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperty:n(12).f})},function(e,t,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperties:n(48)})},function(e,t,n){var r=n(33),i=n(52).f;n(57)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){var r=n(9),i=n(10),o=n(8);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(e,t,n){var r=n(59),i=n(60);n(57)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(36);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(6),i=n(59),o=n(41)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var r=n(59),i=n(31);n(57)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){n(57)("getOwnPropertyNames",function(){return n(50).f})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14);n(57)("isFrozen",function(e){return function(t){return r(t)?e?e(t):!1:!0}})},function(e,t,n){var r=n(14);n(57)("isSealed",function(e){return function(t){return r(t)?e?e(t):!1:!0}})},function(e,t,n){var r=n(14);n(57)("isExtensible",function(e){return function(t){return r(t)?e?e(t):!0:!1}})},function(e,t,n){var r=n(9);r(r.S+r.F,"Object",{assign:n(70)})},function(e,t,n){"use strict";var r=n(31),i=n(44),o=n(45),s=n(59),a=n(34),u=Object.assign;e.exports=!u||n(8)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=s(e),u=arguments.length,l=1,c=i.f,p=o.f;u>l;)for(var f,d=a(arguments[l++]),h=c?r(d).concat(c(d)):r(d),m=h.length,v=0;m>v;)p.call(d,f=h[v++])&&(n[f]=d[f]);return n}:u},function(e,t,n){var r=n(9);r(r.S,"Object",{is:n(72)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){var r=n(14),i=n(13),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(21)(Function.call,n(52).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";var r=n(76),i={};i[n(26)("toStringTag")]="z",i+""!="[object z]"&&n(19)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(35),i=n(26)("toStringTag"),o="Arguments"==r(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(9);r(r.P,"Function",{bind:n(78)})},function(e,t,n){"use strict";var r=n(22),i=n(14),o=n(79),s=[].slice,a={},u=function(e,t,n){if(!(t in a)){for(var r=[],i=0;t>i;i++)r[i]="a["+i+"]";a[t]=Function("F,a","return new F("+r.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=s.call(arguments,1),a=function(){var r=n.concat(s.call(arguments));return this instanceof a?u(t,r.length,r):o(t,r,e)};return i(t.prototype)&&(a.prototype=t.prototype),a}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(12).f,i=n(18),o=n(6),s=Function.prototype,a=/^\s*function ([^ (]*)/,u="name",l=Object.isExtensible||function(){return!0};u in s||n(7)&&r(s,u,{configurable:!0,get:function(){try{var e=this,t=(""+e).match(a)[1];return o(e,u)||!l(e)||r(e,u,i(5,t)),t}catch(n){return""}}})},function(e,t,n){"use strict";var r=n(14),i=n(60),o=n(26)("hasInstance"),s=Function.prototype;o in s||n(12).f(s,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(9),i=n(83);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(5).parseInt,i=n(84).trim,o=n(85),s=/^[\-+]?0[xX]/;e.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(s.test(n)?16:10))}:r},function(e,t,n){var r=n(9),i=n(36),o=n(8),s=n(85),a="["+s+"]",u="
",l=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),p=function(e,t,n){var i={},a=o(function(){return!!s[e]()||u[e]()!=u}),l=i[e]=a?t(f):s[e];n&&(i[n]=l),r(r.P+r.F*a,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=p},function(e,t){e.exports=" \n\x0B\f\r \u2028\u2029\ufeff"},function(e,t,n){var r=n(9),i=n(87);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(5).parseFloat,i=n(84).trim;e.exports=1/r(n(85)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(5),i=n(6),o=n(35),s=n(89),a=n(17),u=n(8),l=n(51).f,c=n(52).f,p=n(12).f,f=n(84).trim,d="Number",h=r[d],m=h,v=h.prototype,g=o(n(47)(v))==d,y="trim"in String.prototype,b=function(e){var t=a(e,!1);if("string"==typeof t&&t.length>2){t=y?t.trim():f(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var s,u=t.slice(2),l=0,c=u.length;c>l;l++)if(s=u.charCodeAt(l),48>s||s>i)return NaN;return parseInt(u,r)}}return+t};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof h&&(g?u(function(){v.valueOf.call(n)}):o(n)!=d)?s(new m(b(t)),n,h):b(t)};for(var x,E=n(7)?l(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;E.length>C;C++)i(m,x=E[C])&&!i(h,x)&&p(h,x,c(m,x));h.prototype=v,v.constructor=h,n(19)(r,d,h)}},function(e,t,n){var r=n(14),i=n(74).set;e.exports=function(e,t,n){var o,s=t.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(9),i=(n(91),n(39)),o=n(92),s=n(93),a=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},h=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+s.call(p,7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2===1?m(e,t-1,n*e):m(e*e,t/2,n)},v=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0))||!n(8)(function(){a.call({})})),"Number",{toFixed:function(e){var t,n,r,a,u=o(this,c),l=i(e),g="",y=p;if(0>l||l>20)throw RangeError(c);if(u!=u)return"NaN";if(-1e21>=u||u>=1e21)return String(u);if(0>u&&(g="-",u=-u),u>1e-21)if(t=v(u*m(2,69,1))-69,n=0>t?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=l;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<0?(a=y.length,y=g+(l>=a?"0."+s.call(p,l-a)+y:y.slice(0,a-l)+"."+y.slice(a-l))):y=g+y,y}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(35);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(39),i=n(36);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(0>o||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(9),i=n(8),o=n(92),s=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==s.call(1,void 0)})||!i(function(){s.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?s.call(t):s.call(t,e)}})},function(e,t,n){var r=n(9);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(9),i=n(5).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(9);r(r.S,"Number",{isInteger:n(98)})},function(e,t,n){var r=n(14),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(9);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(9),i=n(98),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(9);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(9);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(9),i=n(87);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(9),i=n(83);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(9),i=n(106),o=Math.sqrt,s=Math.acosh;r(r.S+r.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?0>e?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(9),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(9),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(9),i=n(110);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1}},function(e,t,n){var r=n(9);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(9),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(9),i=n(114);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(9),i=n(110),o=Math.pow,s=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),l=o(2,-126),c=function(e){return e+1/s-1/s};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),o=i(e);return l>r?o*c(r/l/a)*l*a:(t=(1+a/s)*r,n=t-(t-r),n>u||n!=n?o*(1/0):o*n)}})},function(e,t,n){var r=n(9),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,s=0,a=arguments.length,u=0;a>s;)n=i(arguments[s++]),n>u?(r=u/n,o=o*r*r+1,u=n):n>0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(e,t,n){var r=n(9),i=Math.imul;r(r.S+r.F*n(8)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,s=n&i;return 0|o*s+((n&r>>>16)*s+o*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(9);r(r.S,"Math",{log1p:n(106)})},function(e,t,n){var r=n(9);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(9);r(r.S,"Math",{sign:n(110)})},function(e,t,n){var r=n(9),i=n(114),o=Math.exp;r(r.S+r.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(9),i=n(114),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(9);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(9),i=n(40),o=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,s=0;r>s;){if(t=+arguments[s++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(65536>t?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(9),i=n(33),o=n(38);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,s=[],a=0;n>a;)s.push(String(t[a++])),r>a&&s.push(String(arguments[a]));return s.join("")}})},function(e,t,n){"use strict";n(84)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(129)(!0);n(130)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(39),i=n(36);e.exports=function(e){return function(t,n){var o,s,a=String(i(t)),u=r(n),l=a.length;return 0>u||u>=l?e?"":void 0:(o=a.charCodeAt(u),55296>o||o>56319||u+1===l||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):o:e?a.slice(u,u+2):(o-55296<<10)+(s-56320)+65536)}}},function(e,t,n){"use strict";var r=n(29),i=n(9),o=n(19),s=n(11),a=n(6),u=n(131),l=n(132),c=n(25),p=n(60),f=n(26)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){return this};e.exports=function(e,t,n,y,b,x,E){l(n,t,y);var C,A,S,w=function(e){if(!d&&e in k)return k[e];switch(e){case m:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},D=t+" Iterator",_=b==v,T=!1,k=e.prototype,P=k[f]||k[h]||b&&k[b],F=P||w(b),M=b?_?w("entries"):F:void 0,N="Array"==t?k.entries||P:P;if(N&&(S=p(N.call(new e)),S!==Object.prototype&&(c(S,D,!0),r||a(S,f)||s(S,f,g))),_&&P&&P.name!==v&&(T=!0,F=function(){return P.call(this)}),r&&!E||!d&&!T&&k[f]||s(k,f,F),u[t]=F,u[D]=g,b)if(C={values:_?F:w(v),keys:x?F:w(m),entries:M},E)for(A in C)A in k||o(k,A,C[A]);else i(i.P+i.F*(d||T),t,C);return C}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(47),i=n(18),o=n(25),s={};n(11)(s,n(26)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(9),i=n(129)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(9),i=n(38),o=n(135),s="endsWith",a=""[s];r(r.P+r.F*n(137)(s),"String",{endsWith:function(e){var t=o(this,e,s),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),l=String(e);return a?a.call(t,l,u):t.slice(u-l.length,u)===l}})},function(e,t,n){var r=n(136),i=n(36);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(14),i=n(35),o=n(26)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){
-var r=n(26)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(i){}}return!0}},function(e,t,n){"use strict";var r=n(9),i=n(135),o="includes";r(r.P+r.F*n(137)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(9);r(r.P,"String",{repeat:n(93)})},function(e,t,n){"use strict";var r=n(9),i=n(38),o=n(135),s="startsWith",a=""[s];r(r.P+r.F*n(137)(s),"String",{startsWith:function(e){var t=o(this,e,s),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(142)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){var r=n(9),i=n(8),o=n(36),s=/"/g,a=function(e,t,n,r){var i=String(o(e)),a="<"+t;return""!==n&&(a+=" "+n+'="'+String(r).replace(s,""")+'"'),a+">"+i+""+t+">"};e.exports=function(e,t){var n={};n[e]=t(a),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";n(142)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(142)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(142)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(142)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(142)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(142)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(142)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(142)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(142)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(142)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(142)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(142)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(9);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(17);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(9),i=n(8),o=Date.prototype.getTime,s=function(e){return e>9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=0>t?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+s(e.getUTCMonth()+1)+"-"+s(e.getUTCDate())+"T"+s(e.getUTCHours())+":"+s(e.getUTCMinutes())+":"+s(e.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}})},function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",s=r[o],a=r.getTime;new Date(NaN)+""!=i&&n(19)(r,o,function(){var e=a.call(this);return e===e?s.call(this):i})},function(e,t,n){var r=n(26)("toPrimitive"),i=Date.prototype;r in i||n(11)(i,r,n(160))},function(e,t,n){"use strict";var r=n(13),i=n(17),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},function(e,t,n){var r=n(9);r(r.S,"Array",{isArray:n(46)})},function(e,t,n){"use strict";var r=n(21),i=n(9),o=n(59),s=n(163),a=n(164),u=n(38),l=n(165),c=n(166);i(i.S+i.F*!n(167)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,p,f=o(e),d="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,v=void 0!==m,g=0,y=c(f);if(v&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==y||d==Array&&a(y))for(t=u(f.length),n=new d(t);t>g;g++)l(n,g,v?m(f[g],g):f[g]);else for(p=y.call(f),n=new d;!(i=p.next()).done;g++)l(n,g,v?s(p,m,[i.value,g],!0):i.value);return n.length=g,n}})},function(e,t,n){var r=n(13);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(o){var s=e["return"];throw void 0!==s&&r(s.call(e)),o}}},function(e,t,n){var r=n(131),i=n(26)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(12),i=n(18);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(76),i=n(26)("iterator"),o=n(131);e.exports=n(10).getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||o[r(e)]:void 0}},function(e,t,n){var r=n(26)("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(a){}return n}},function(e,t,n){"use strict";var r=n(9),i=n(165);r(r.S+r.F*n(8)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(9),i=n(33),o=[].join;r(r.P+r.F*(n(34)!=Object||!n(170)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(8);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(9),i=n(49),o=n(35),s=n(40),a=n(38),u=[].slice;r(r.P+r.F*n(8)(function(){i&&u.call(i)}),"Array",{slice:function(e,t){var n=a(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=s(e,n),l=s(t,n),c=a(l-i),p=Array(c),f=0;c>f;f++)p[f]="String"==r?this.charAt(i+f):this[i+f];return p}})},function(e,t,n){"use strict";var r=n(9),i=n(22),o=n(59),s=n(8),a=[].sort,u=[1,2,3];r(r.P+r.F*(s(function(){u.sort(void 0)})||!s(function(){u.sort(null)})||!n(170)(a)),"Array",{sort:function(e){return void 0===e?a.call(o(this)):a.call(o(this),i(e))}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(0),o=n(170)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(21),i=n(34),o=n(59),s=n(38),a=n(175);e.exports=function(e,t){var n=1==e,u=2==e,l=3==e,c=4==e,p=6==e,f=5==e||p,d=t||a;return function(t,a,h){for(var m,v,g=o(t),y=i(g),b=r(a,h,3),x=s(y.length),E=0,C=n?d(t,x):u?d(t,0):void 0;x>E;E++)if((f||E in y)&&(m=y[E],v=b(m,E,g),e))if(n)C[E]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:C.push(m)}else if(c)return!1;return p?-1:l||c?c:C}}},function(e,t,n){var r=n(176);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(14),i=n(46),o=n(26)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&(t=t[o],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(9),i=n(174)(1);r(r.P+r.F*!n(170)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(2);r(r.P+r.F*!n(170)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(3);r(r.P+r.F*!n(170)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(4);r(r.P+r.F*!n(170)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(182);r(r.P+r.F*!n(170)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){var r=n(22),i=n(59),o=n(34),s=n(38);e.exports=function(e,t,n,a,u){r(t);var l=i(e),c=o(l),p=s(l.length),f=u?p-1:0,d=u?-1:1;if(2>n)for(;;){if(f in c){a=c[f],f+=d;break}if(f+=d,u?0>f:f>=p)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:p>f;f+=d)f in c&&(a=t(a,c[f],f,l));return a}},function(e,t,n){"use strict";var r=n(9),i=n(182);r(r.P+r.F*!n(170)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(9),i=n(37)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(s||!n(170)(o)),"Array",{indexOf:function(e){return s?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(33),o=n(39),s=n(38),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(170)(a)),"Array",{lastIndexOf:function(e){if(u)return a.apply(this,arguments)||0;var t=i(this),n=s(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),0>r&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(9);r(r.P,"Array",{copyWithin:n(187)}),n(188)("copyWithin")},function(e,t,n){"use strict";var r=n(59),i=n(40),o=n(38);e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),a=i(e,s),u=i(t,s),l=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===l?s:i(l,s))-u,s-a),p=1;for(a>u&&u+c>a&&(p=-1,u+=c-1,a+=c-1);c-- >0;)u in n?n[a]=n[u]:delete n[a],a+=p,u+=p;return n}},function(e,t,n){var r=n(26)("unscopables"),i=Array.prototype;void 0==i[r]&&n(11)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(9);r(r.P,"Array",{fill:n(190)}),n(188)("fill")},function(e,t,n){"use strict";var r=n(59),i=n(40),o=n(38);e.exports=function(e){for(var t=r(this),n=o(t.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>a;)t[a++]=e;return t}},function(e,t,n){"use strict";var r=n(9),i=n(174)(5),o="find",s=!0;o in[]&&Array(1)[o](function(){s=!1}),r(r.P+r.F*s,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(188)(o)},function(e,t,n){"use strict";var r=n(9),i=n(174)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),r(r.P+r.F*s,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(188)(o)},function(e,t,n){n(194)("Array")},function(e,t,n){"use strict";var r=n(5),i=n(12),o=n(7),s=n(26)("species");e.exports=function(e){var t=r[e];o&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(188),i=n(196),o=n(131),s=n(33);e.exports=n(130)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(5),i=n(89),o=n(12).f,s=n(51).f,a=n(136),u=n(198),l=r.RegExp,c=l,p=l.prototype,f=/a/g,d=/a/g,h=new l(f)!==f;if(n(7)&&(!h||n(8)(function(){return d[n(26)("match")]=!1,l(f)!=f||l(d)==d||"/a/i"!=l(f,"i")}))){l=function(e,t){var n=this instanceof l,r=a(e),o=void 0===t;return!n&&r&&e.constructor===l&&o?e:i(h?new c(r&&!o?e.source:e,t):c((r=e instanceof l)?e.source:e,r&&o?u.call(e):t),n?this:p,l)};for(var m=(function(e){e in l||o(l,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})}),v=s(c),g=0;v.length>g;)m(v[g++]);p.constructor=l,l.prototype=p,n(19)(r,"RegExp",l)}n(194)("RegExp")},function(e,t,n){"use strict";var r=n(13);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(200);var r=n(13),i=n(198),o=n(7),s="toString",a=/./[s],u=function(e){n(19)(RegExp.prototype,s,e,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?u(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):a.name!=s&&u(function(){return a.call(this)})},function(e,t,n){n(7)&&"g"!=/./g.flags&&n(12).f(RegExp.prototype,"flags",{configurable:!0,get:n(198)})},function(e,t,n){n(202)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){"use strict";var r=n(11),i=n(19),o=n(8),s=n(36),a=n(26);e.exports=function(e,t,n){var u=a(e),l=n(s,u,""[e]),c=l[0],p=l[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,c),r(RegExp.prototype,u,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){n(202)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),s=void 0==r?void 0:r[t];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},n]})},function(e,t,n){n(202)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(202)("split",2,function(e,t,r){"use strict";var i=n(136),o=r,s=[].push,a="split",u="length",l="lastIndex";if("c"=="abbc"[a](/(b)*/)[1]||4!="test"[a](/(?:)/,-1)[u]||2!="ab"[a](/(?:ab)*/)[u]||4!="."[a](/(.?)(.?)/)[u]||"."[a](/()()/)[u]>1||""[a](/.?/)[u]){var c=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,a,p,f,d,h=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,g=void 0===t?4294967295:t>>>0,y=new RegExp(e.source,m+"g");for(c||(r=new RegExp("^"+y.source+"$(?!\\s)",m));(a=y.exec(n))&&(p=a.index+a[0][u],!(p>v&&(h.push(n.slice(v,a.index)),!c&&a[u]>1&&a[0].replace(r,function(){for(d=1;d1&&a.index=g)));)y[l]===a.index&&y[l]++;return v===n[u]?!f&&y.test("")||h.push(""):h.push(n.slice(v)),h[u]>g?h.slice(0,g):h}}else"0"[a](void 0,0)[u]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)},r]})},function(e,t,n){"use strict";var r,i,o,s=n(29),a=n(5),u=n(21),l=n(76),c=n(9),p=n(14),f=(n(13),n(22)),d=n(91),h=n(207),m=(n(74).set,n(208)),v=n(209).set,g=n(210)(),y="Promise",b=a.TypeError,x=a.process,E=a[y],x=a.process,C="process"==l(x),A=function(){},S=!!function(){try{var e=E.resolve(1),t=(e.constructor={})[n(26)("species")]=function(e){e(A,A)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(A)instanceof t}catch(r){}}(),w=function(e,t){return e===t||e===E&&t===o},D=function(e){var t;return p(e)&&"function"==typeof(t=e.then)?t:!1},_=function(e){return w(E,e)?new T(e):new i(e)},T=i=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw b("Bad Promise constructor");t=e,n=r}),this.resolve=f(t),this.reject=f(n)},k=function(e){try{e()}catch(t){return{error:t}}},P=function(e,t){if(!e._n){e._n=!0;var n=e._c;g(function(){for(var r=e._v,i=1==e._s,o=0,s=function(t){var n,o,s=i?t.ok:t.fail,a=t.resolve,u=t.reject,l=t.domain;try{s?(i||(2==e._h&&N(e),e._h=1),s===!0?n=r:(l&&l.enter(),n=s(r),l&&l.exit()),n===t.promise?u(b("Promise-chain cycle")):(o=D(n))?o.call(n,a,u):a(n)):u(r)}catch(c){u(c)}};n.length>o;)s(n[o++]);e._c=[],e._n=!1,t&&!e._h&&F(e)})}},F=function(e){v.call(a,function(){var t,n,r,i=e._v;if(M(e)&&(t=k(function(){C?x.emit("unhandledRejection",i,e):(n=a.onunhandledrejection)?n({promise:e,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=C||M(e)?2:1),e._a=void 0,t)throw t.error})},M=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!M(t.promise))return!1;return!0},N=function(e){v.call(a,function(){var t;C?x.emit("rejectionHandled",e):(t=a.onrejectionhandled)&&t({promise:e,reason:e._v})})},O=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),P(t,!0))},I=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw b("Promise can't be resolved itself");(t=D(e))?g(function(){var r={_w:n,_d:!1};try{t.call(e,u(I,r,1),u(O,r,1))}catch(i){O.call(r,i)}}):(n._v=e,n._s=1,P(n,!1))}catch(r){O.call({_w:n,_d:!1},r)}}};S||(E=function(e){d(this,E,y,"_h"),f(e),r.call(this);try{e(u(I,this,1),u(O,this,1))}catch(t){O.call(this,t)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(211)(E.prototype,{then:function(e,t){var n=_(m(this,E));return n.ok="function"==typeof e?e:!0,n.fail="function"==typeof t&&t,n.domain=C?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},"catch":function(e){return this.then(void 0,e)}}),T=function(){var e=new r;this.promise=e,this.resolve=u(I,e,1),this.reject=u(O,e,1)}),c(c.G+c.W+c.F*!S,{Promise:E}),n(25)(E,y),n(194)(y),o=n(10)[y],c(c.S+c.F*!S,y,{reject:function(e){var t=_(this),n=t.reject;return n(e),t.promise}}),c(c.S+c.F*(s||!S),y,{resolve:function(e){if(e instanceof E&&w(e.constructor,this))return e;var t=_(this),n=t.resolve;return n(e),t.promise}}),c(c.S+c.F*!(S&&n(167)(function(e){E.all(e)["catch"](A)})),y,{all:function(e){var t=this,n=_(t),r=n.resolve,i=n.reject,o=k(function(){var n=[],o=0,s=1;h(e,!1,function(e){var a=o++,u=!1;n.push(void 0),s++,t.resolve(e).then(function(e){u||(u=!0,n[a]=e,--s||r(n))},i)}),--s||r(n)});return o&&i(o.error),n.promise},race:function(e){var t=this,n=_(t),r=n.reject,i=k(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t,n){var r=n(21),i=n(163),o=n(164),s=n(13),a=n(38),u=n(166),l={},c={},t=e.exports=function(e,t,n,p,f){var d,h,m,v,g=f?function(){return e}:u(e),y=r(n,p,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(o(g)){for(d=a(e.length);d>b;b++)if(v=t?y(s(h=e[b])[0],h[1]):y(e[b]),v===l||v===c)return v}else for(m=g.call(e);!(h=m.next()).done;)if(v=i(m,y,h.value,t),v===l||v===c)return v};t.BREAK=l,t.RETURN=c},function(e,t,n){var r=n(13),i=n(22),o=n(26)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||void 0==(n=r(s)[o])?t:i(n)}},function(e,t,n){var r,i,o,s=n(21),a=n(79),u=n(49),l=n(16),c=n(5),p=c.process,f=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,m=0,v={},g="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){y.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++m]=function(){a("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete v[e]},"process"==n(35)(p)?r=function(e){p.nextTick(s(y,e,1))}:h?(i=new h,o=i.port2,i.port1.onmessage=b,r=s(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r=g in l("script")?function(e){u.appendChild(l("script"))[g]=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(s(y,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,n){var r=n(5),i=n(209).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(35)(s);e.exports=function(){var e,t,n,l=function(){var r,i;for(u&&(r=s.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(o){throw e?n():t=void 0,o}}t=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(l)};else if(o){var c=!0,p=document.createTextNode("");new o(l).observe(p,{characterData:!0}),n=function(){p.data=c=!c}}else if(a&&a.resolve){var f=a.resolve();n=function(){f.then(l)}}else n=function(){i.call(r,l)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(19);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(213);e.exports=n(214)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(12).f,i=n(47),o=(n(11),n(211)),s=n(21),a=n(91),u=n(36),l=n(207),c=n(130),p=n(196),f=n(194),d=n(7),h=n(23).fastKey,m=d?"_s":"size",v=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var p=e(function(e,r){a(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&l(r,n,e[c],e)});return o(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[m]=0},"delete":function(e){var t=this,n=v(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[m]--}return!!n},forEach:function(e){a(this,p,"forEach");for(var t,n=s(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!v(this,e)}}),d&&r(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,n){var r,i,o=v(e,t);return o?o.v=n:(e._l=o={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:v,setStrong:function(e,t,n){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(5),i=n(9),o=n(19),s=n(211),a=n(23),u=n(207),l=n(91),c=n(14),p=n(8),f=n(167),d=n(25),h=n(89);e.exports=function(e,t,n,m,v,g){var y=r[e],b=y,x=v?"set":"add",E=b&&b.prototype,C={},A=function(e){var t=E[e];o(E,e,"delete"==e?function(e){return g&&!c(e)?!1:t.call(this,0===e?0:e)}:"has"==e?function(e){return g&&!c(e)?!1:t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(g||E.forEach&&!p(function(){(new b).entries().next()}))){var S=new b,w=S[x](g?{}:-0,1)!=S,D=p(function(){S.has(1)}),_=f(function(e){new b(e)}),T=!g&&p(function(){for(var e=new b,t=5;t--;)e[x](t,t);return!e.has(-0)});_||(b=t(function(t,n){l(t,b,e);var r=h(new y,t,b);return void 0!=n&&u(n,v,r[x],r),r}),b.prototype=E,E.constructor=b),(D||T)&&(A("delete"),A("has"),v&&A("get")),(T||w)&&A(x),g&&E.clear&&delete E.clear}else b=m.getConstructor(t,e,v,x),s(b.prototype,n),a.NEED=!0;return d(b,e),C[e]=b,i(i.G+i.W+i.F*(b!=y),C),g||m.setStrong(b,e,v),b}},function(e,t,n){"use strict";var r=n(213);e.exports=n(214)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(174)(0),o=n(19),s=n(23),a=n(70),u=n(217),l=n(14),c=(n(6),s.getWeak),p=Object.isExtensible,f=u.ufstore,d={},h=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(l(e)){var t=c(e);return t===!0?f(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},v=e.exports=n(214)("WeakMap",h,m,u,!0,!0);7!=(new v).set((Object.freeze||Object)(d),7).get(d)&&(r=u.getConstructor(h),a(r.prototype,m),s.NEED=!0,i(["delete","has","get","set"],function(e){var t=v.prototype,n=t[e];o(t,e,function(t,i){if(l(t)&&!p(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(211),i=n(23).getWeak,o=n(13),s=n(14),a=n(91),u=n(207),l=n(174),c=n(6),p=l(5),f=l(6),d=0,h=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},v=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=v(this,e);return t?t[1]:void 0},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var l=e(function(e,r){a(e,l,t,"_i"),e._i=d++,e._l=void 0,void 0!=r&&u(r,n,e[o],e)});return r(l.prototype,{"delete":function(e){if(!s(e))return!1;var t=i(e);return t===!0?h(this)["delete"](e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!s(e))return!1;var t=i(e);return t===!0?h(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,n){var r=i(o(t),!0);return r===!0?h(e).set(t,n):r[e._i]=n,e},ufstore:h}},function(e,t,n){"use strict";var r=n(217);n(214)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(9),i=n(220),o=n(221),s=n(13),a=n(40),u=n(38),l=n(14),c=(n(26)("typed_array"),n(5).ArrayBuffer),p=n(208),f=o.ArrayBuffer,d=o.DataView,h=i.ABV&&c.isView,m=f.prototype.slice,v=i.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(c!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,g,{isView:function(e){return h&&h(e)||l(e)&&v in e}}),r(r.P+r.U+r.F*n(8)(function(){return!new f(2).slice(1,void 0).byteLength}),g,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(s(this),e);for(var n=s(this).byteLength,r=a(e,n),i=a(void 0===t?n:t,n),o=new(p(this,f))(u(i-r)),l=new d(this),c=new d(o),h=0;i>r;)c.setUint8(h++,l.getUint8(r++));return o}}),n(194)(g)},function(e,t,n){for(var r,i=n(5),o=n(11),s=n(20),a=s("typed_array"),u=s("view"),l=!(!i.ArrayBuffer||!i.DataView),c=l,p=0,f=9,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f>p;)(r=i[d[p++]])?(o(r.prototype,a,!0),o(r.prototype,u,!0)):c=!1;e.exports={ABV:l,CONSTR:c,TYPED:a,VIEW:u}},function(e,t,n){"use strict";var r=n(5),i=n(7),o=n(29),s=n(220),a=n(11),u=n(211),l=n(8),c=n(91),p=n(39),f=n(38),d=n(51).f,h=n(12).f,m=n(190),v=n(25),g="ArrayBuffer",y="DataView",b="prototype",x="Wrong length!",E="Wrong index!",C=r[g],A=r[y],S=r.Math,w=(r.parseInt,r.RangeError),D=r.Infinity,_=C,T=S.abs,k=S.pow,P=(S.min,S.floor),F=S.log,M=S.LN2,N="buffer",O="byteLength",I="byteOffset",L=i?"_b":N,R=i?"_l":O,B=i?"_o":I,j=function(e,t,n){var r,i,o,s=Array(n),a=8*n-t-1,u=(1<>1,c=23===t?k(2,-24)-k(2,-77):0,p=0,f=0>e||0===e&&0>1/e?1:0;for(e=T(e),e!=e||e===D?(i=e!=e?1:0,r=u):(r=P(F(e)/M),e*(o=k(2,-r))<1&&(r--,o*=2),e+=r+l>=1?c/o:c*k(2,1-l),e*o>=2&&(r++,o/=2),r+l>=u?(i=0,r=u):r+l>=1?(i=(e*o-1)*k(2,t),r+=l):(i=e*k(2,l-1)*k(2,t),r=0));t>=8;s[p++]=255&i,i/=256,t-=8);for(r=r<0;s[p++]=255&r,r/=256,a-=8);return s[--p]|=128*f,s},U=function(e,t,n){var r,i=8*n-t-1,o=(1<>1,a=i-7,u=n-1,l=e[u--],c=127&l;for(l>>=7;a>0;c=256*c+e[u],u--,a-=8);for(r=c&(1<<-a)-1,c>>=-a,a+=t;a>0;r=256*r+e[u],u--,a-=8);if(0===c)c=1-s;else{if(c===o)return r?NaN:l?-D:D;r+=k(2,t),c-=s}return(l?-1:1)*r*k(2,c-t)},V=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},W=function(e){return[255&e]},G=function(e){return[255&e,e>>8&255]},H=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},q=function(e){return j(e,52,8)},K=function(e){return j(e,23,4)},z=function(e,t,n){h(e[b],t,{get:function(){return this[n]}})},Y=function(e,t,n,r){var i=+n,o=p(i);if(i!=o||0>o||o+t>e[R])throw w(E);var s=e[L]._b,a=o+e[B],u=s.slice(a,a+t);return r?u:u.reverse()},X=function(e,t,n,r,i,o){var s=+n,a=p(s);if(s!=a||0>a||a+t>e[R])throw w(E);for(var u=e[L]._b,l=a+e[B],c=r(+i),f=0;t>f;f++)u[l+f]=c[o?f:t-f-1]},J=function(e,t){c(e,C,g);var n=+t,r=f(n);if(n!=r)throw w(x);return r};if(s.ABV){if(!l(function(){new C})||!l(function(){new C(.5)})){C=function(e){return new _(J(this,e))};for(var $,Q=C[b]=_[b],Z=d(_),ee=0;Z.length>ee;)($=Z[ee++])in C||a(C,$,_[$]);o||(Q.constructor=C)}var te=new A(new C(2)),ne=A[b].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(A[b],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else C=function(e){var t=J(this,e);this._b=m.call(Array(t),0),this[R]=t},A=function(e,t,n){c(this,A,y),c(e,C,y);var r=e[R],i=p(t);if(0>i||i>r)throw w("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw w(x);this[L]=e,this[B]=i,this[R]=n},i&&(z(C,O,"_l"),z(A,N,"_b"),z(A,O,"_l"),z(A,I,"_o")),u(A[b],{getInt8:function(e){return Y(this,1,e)[0]<<24>>24},getUint8:function(e){return Y(this,1,e)[0]},getInt16:function(e){var t=Y(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Y(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return V(Y(this,4,e,arguments[1]))},getUint32:function(e){return V(Y(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return U(Y(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return U(Y(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){X(this,1,e,W,t)},setUint8:function(e,t){X(this,1,e,W,t)},setInt16:function(e,t){X(this,2,e,G,t,arguments[2])},setUint16:function(e,t){X(this,2,e,G,t,arguments[2])},setInt32:function(e,t){X(this,4,e,H,t,arguments[2])},setUint32:function(e,t){X(this,4,e,H,t,arguments[2])},setFloat32:function(e,t){X(this,4,e,K,t,arguments[2])},setFloat64:function(e,t){X(this,8,e,q,t,arguments[2])}});v(C,g),v(A,y),a(A[b],s.VIEW,!0),t[g]=C,t[y]=A},function(e,t,n){var r=n(9);r(r.G+r.W+r.F*!n(220).ABV,{DataView:n(221).DataView})},function(e,t,n){n(224)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";if(n(7)){var r=n(29),i=n(5),o=n(8),s=n(9),a=n(220),u=n(221),l=n(21),c=n(91),p=n(18),f=n(11),d=n(211),h=(n(98),n(39)),m=n(38),v=n(40),g=n(17),y=n(6),b=n(72),x=n(76),E=n(14),C=n(59),A=n(164),S=n(47),w=n(60),D=n(51).f,_=(n(225),n(166)),T=n(20),k=n(26),P=n(174),F=n(37),M=n(208),N=n(195),O=n(131),I=n(167),L=n(194),R=n(190),B=n(187),j=n(12),U=n(52),V=j.f,W=U.f,G=i.RangeError,H=i.TypeError,q=i.Uint8Array,K="ArrayBuffer",z="Shared"+K,Y="BYTES_PER_ELEMENT",X="prototype",J=Array[X],$=u.ArrayBuffer,Q=u.DataView,Z=P(0),ee=P(2),te=P(3),ne=P(4),re=P(5),ie=P(6),oe=F(!0),se=F(!1),ae=N.values,ue=N.keys,le=N.entries,ce=J.lastIndexOf,pe=J.reduce,fe=J.reduceRight,de=J.join,he=J.sort,me=J.slice,ve=J.toString,ge=J.toLocaleString,ye=k("iterator"),be=k("toStringTag"),xe=T("typed_constructor"),Ee=T("def_constructor"),Ce=a.CONSTR,Ae=a.TYPED,Se=a.VIEW,we="Wrong length!",De=P(1,function(e,t){return Me(M(e,e[Ee]),t)}),_e=o(function(){return 1===new q(new Uint16Array([1]).buffer)[0]}),Te=!!q&&!!q[X].set&&o(function(){new q(1).set({})}),ke=function(e,t){if(void 0===e)throw H(we);var n=+e,r=m(e);if(t&&!b(n,r))throw G(we);return r},Pe=function(e,t){var n=h(e);if(0>n||n%t)throw G("Wrong offset!");return n},Fe=function(e){if(E(e)&&Ae in e)return e;throw H(e+" is not a typed array!")},Me=function(e,t){if(!(E(e)&&xe in e))throw H("It is not a typed array constructor!");return new e(t)},Ne=function(e,t){return Oe(M(e,e[Ee]),t)},Oe=function(e,t){for(var n=0,r=t.length,i=Me(e,r);r>n;)i[n]=t[n++];return i},Ie=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Le=function(e){var t,n,r,i,o,s,a=C(e),u=arguments.length,c=u>1?arguments[1]:void 0,p=void 0!==c,f=_(a);if(void 0!=f&&!A(f)){for(s=f.call(a),r=[],t=0;!(o=s.next()).done;t++)r.push(o.value);a=r}for(p&&u>2&&(c=l(c,arguments[2],2)),t=0,n=m(a.length),i=Me(this,n);n>t;t++)i[t]=p?c(a[t],t):a[t];return i},Re=function(){for(var e=0,t=arguments.length,n=Me(this,t);t>e;)n[e]=arguments[e++];return n},Be=!!q&&o(function(){ge.call(new q(1))}),je=function(){return ge.apply(Be?me.call(Fe(this)):Fe(this),arguments)},Ue={copyWithin:function(e,t){return B.call(Fe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Fe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return R.apply(Fe(this),arguments)},filter:function(e){return Ne(this,ee(Fe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){
-return re(Fe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(Fe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Z(Fe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return se(Fe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Fe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return de.apply(Fe(this),arguments)},lastIndexOf:function(e){return ce.apply(Fe(this),arguments)},map:function(e){return De(Fe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(Fe(this),arguments)},reduceRight:function(e){return fe.apply(Fe(this),arguments)},reverse:function(){for(var e,t=this,n=Fe(t).length,r=Math.floor(n/2),i=0;r>i;)e=t[i],t[i++]=t[--n],t[n]=e;return t},some:function(e){return te(Fe(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return he.call(Fe(this),e)},subarray:function(e,t){var n=Fe(this),r=n.length,i=v(e,r);return new(M(n,n[Ee]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:v(t,r))-i))}},Ve=function(e,t){return Ne(this,me.call(Fe(this),e,t))},We=function(e){Fe(this);var t=Pe(arguments[1],1),n=this.length,r=C(e),i=m(r.length),o=0;if(i+t>n)throw G(we);for(;i>o;)this[t+o]=r[o++]},Ge={entries:function(){return le.call(Fe(this))},keys:function(){return ue.call(Fe(this))},values:function(){return ae.call(Fe(this))}},He=function(e,t){return E(e)&&e[Ae]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},qe=function(e,t){return He(e,t=g(t,!0))?p(2,e[t]):W(e,t)},Ke=function(e,t,n){return!(He(e,t=g(t,!0))&&E(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};Ce||(U.f=qe,j.f=Ke),s(s.S+s.F*!Ce,"Object",{getOwnPropertyDescriptor:qe,defineProperty:Ke}),o(function(){ve.call({})})&&(ve=ge=function(){return de.call(this)});var ze=d({},Ue);d(ze,Ge),f(ze,ye,Ge.values),d(ze,{slice:Ve,set:We,constructor:function(){},toString:ve,toLocaleString:je}),Ie(ze,"buffer","b"),Ie(ze,"byteOffset","o"),Ie(ze,"byteLength","l"),Ie(ze,"length","e"),V(ze,be,{get:function(){return this[Ae]}}),e.exports=function(e,t,n,u){u=!!u;var l=e+(u?"Clamped":"")+"Array",p="Uint8Array"!=l,d="get"+e,h="set"+e,v=i[l],g=v||{},y=v&&w(v),b=!v||!a.ABV,C={},A=v&&v[X],_=function(e,n){var r=e._d;return r.v[d](n*t+r.o,_e)},T=function(e,n,r){var i=e._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[h](n*t+i.o,r,_e)},k=function(e,t){V(e,t,{get:function(){return _(this,t)},set:function(e){return T(this,t,e)},enumerable:!0})};b?(v=n(function(e,n,r,i){c(e,v,l,"_d");var o,s,a,u,p=0,d=0;if(E(n)){if(!(n instanceof $||(u=x(n))==K||u==z))return Ae in n?Oe(v,n):Le.call(v,n);o=n,d=Pe(r,t);var h=n.byteLength;if(void 0===i){if(h%t)throw G(we);if(s=h-d,0>s)throw G(we)}else if(s=m(i)*t,s+d>h)throw G(we);a=s/t}else a=ke(n,!0),s=a*t,o=new $(s);for(f(e,"_d",{b:o,o:d,l:s,e:a,v:new Q(o)});a>p;)k(e,p++)}),A=v[X]=S(ze),f(A,"constructor",v)):I(function(e){new v(null),new v(e)},!0)||(v=n(function(e,n,r,i){c(e,v,l);var o;return E(n)?n instanceof $||(o=x(n))==K||o==z?void 0!==i?new g(n,Pe(r,t),i):void 0!==r?new g(n,Pe(r,t)):new g(n):Ae in n?Oe(v,n):Le.call(v,n):new g(ke(n,p))}),Z(y!==Function.prototype?D(g).concat(D(y)):D(g),function(e){e in v||f(v,e,g[e])}),v[X]=A,r||(A.constructor=v));var P=A[ye],F=!!P&&("values"==P.name||void 0==P.name),M=Ge.values;f(v,xe,!0),f(A,Ae,l),f(A,Se,!0),f(A,Ee,v),(u?new v(1)[be]==l:be in A)||V(A,be,{get:function(){return l}}),C[l]=v,s(s.G+s.W+s.F*(v!=g),C),s(s.S,l,{BYTES_PER_ELEMENT:t,from:Le,of:Re}),Y in A||f(A,Y,t),s(s.P,l,Ue),L(l),s(s.P+s.F*Te,l,{set:We}),s(s.P+s.F*!F,l,Ge),s(s.P+s.F*(A.toString!=ve),l,{toString:ve}),s(s.P+s.F*o(function(){new v(1).slice()}),l,{slice:Ve}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!o(function(){A.toLocaleString.call([1,2])})),l,{toLocaleString:je}),O[l]=F?P:M,r||F||f(A,ye,M)}}else e.exports=function(){}},function(e,t,n){var r=n(76),i=n(26)("iterator"),o=n(131);e.exports=n(10).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){n(224)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){n(224)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){var r=n(9),i=n(22),o=n(13),s=Function.apply;r(r.S,"Reflect",{apply:function(e,t,n){return s.call(i(e),t,o(n))}})},function(e,t,n){var r=n(9),i=n(47),o=n(22),s=n(13),a=n(14),u=n(78);r(r.S+r.F*n(8)(function(){function e(){}return!(Reflect.construct(function(){},[],e)instanceof e)}),"Reflect",{construct:function(e,t){o(e),s(t);var n=arguments.length<3?e:o(arguments[2]);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var l=n.prototype,c=i(a(l)?l:Object.prototype),p=Function.apply.call(e,c,t);return a(p)?p:c}})},function(e,t,n){var r=n(12),i=n(9),o=n(13),s=n(17);i(i.S+i.F*n(8)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){o(e),t=s(t,!0),o(n);try{return r.f(e,t,n),!0}catch(i){return!1}}})},function(e,t,n){var r=n(9),i=n(52).f,o=n(13);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return n&&!n.configurable?!1:delete e[t]}})},function(e,t,n){"use strict";var r=n(9),i=n(13),o=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(132)(o,"Object",function(){var e,t=this,n=t._k;do if(t._i>=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){function r(e,t){var n,a,c=arguments.length<3?e:arguments[2];return l(e)===c?e[t]:(n=i.f(e,t))?s(n,"value")?n.value:void 0!==n.get?n.get.call(c):void 0:u(a=o(e))?r(a,t,c):void 0}var i=n(52),o=n(60),s=n(6),a=n(9),u=n(14),l=n(13);a(a.S,"Reflect",{get:r})},function(e,t,n){var r=n(52),i=n(9),o=n(13);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(9),i=n(60),o=n(13);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(9);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(9),i=n(13),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),o?o(e):!0}})},function(e,t,n){var r=n(9);r(r.S,"Reflect",{ownKeys:n(245)})},function(e,t,n){var r=n(51),i=n(44),o=n(13),s=n(5).Reflect;e.exports=s&&s.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(9),i=n(13),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(t){return!1}}})},function(e,t,n){function r(e,t,n){var u,f,d=arguments.length<4?e:arguments[3],h=o.f(c(e),t);if(!h){if(p(f=s(e)))return r(f,t,n,d);h=l(0)}return a(h,"value")?h.writable!==!1&&p(d)?(u=o.f(d,t)||l(0),u.value=n,i.f(d,t,u),!0):!1:void 0===h.set?!1:(h.set.call(d,n),!0)}var i=n(12),o=n(52),s=n(60),a=n(6),u=n(9),l=n(18),c=n(13),p=n(14);u(u.S,"Reflect",{set:r})},function(e,t,n){var r=n(9),i=n(74);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var r=n(9),i=n(37)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(188)("includes")},function(e,t,n){"use strict";var r=n(9),i=n(129)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(9),i=n(252);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(38),i=n(93),o=n(36);e.exports=function(e,t,n,s){var a=String(o(e)),u=a.length,l=void 0===n?" ":String(n),c=r(t);if(u>=c||""==l)return a;var p=c-u,f=i.call(l,Math.ceil(p/l.length));return f.length>p&&(f=f.slice(0,p)),s?f+a:a+f}},function(e,t,n){"use strict";var r=n(9),i=n(252);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(84)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(84)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(9),i=n(36),o=n(38),s=n(136),a=n(198),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(132)(l,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!s(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):a.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(e.lastIndex),new l(r,t)}})},function(e,t,n){n(28)("asyncIterator")},function(e,t,n){n(28)("observable")},function(e,t,n){var r=n(9),i=n(245),o=n(33),s=n(52),a=n(165);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=o(e),r=s.f,u=i(n),l={},c=0;u.length>c;)a(l,t=u[c++],r(n,t));return l}})},function(e,t,n){var r=n(9),i=n(261)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(31),i=n(33),o=n(45).f;e.exports=function(e){return function(t){for(var n,s=i(t),a=r(s),u=a.length,l=0,c=[];u>l;)o.call(s,n=a[l++])&&c.push(e?[n,s[n]]:s[n]);return c}}},function(e,t,n){var r=n(9),i=n(261)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(22),s=n(12);n(7)&&r(r.P+n(264),"Object",{__defineGetter__:function(e,t){s.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){e.exports=n(29)||!n(8)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(5)[e]})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(22),s=n(12);n(7)&&r(r.P+n(264),"Object",{__defineSetter__:function(e,t){s.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(17),s=n(60),a=n(52).f;n(7)&&r(r.P+n(264),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=a(n,r))return t.get;while(n=s(n))}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(17),s=n(60),a=n(52).f;n(7)&&r(r.P+n(264),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=a(n,r))return t.set;while(n=s(n))}})},function(e,t,n){var r=n(9);r(r.P+r.R,"Map",{toJSON:n(269)("Map")})},function(e,t,n){var r=n(76),i=n(270);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(207);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(9);r(r.P+r.R,"Set",{toJSON:n(269)("Set")})},function(e,t,n){var r=n(9);r(r.S,"System",{global:n(5)})},function(e,t,n){var r=n(9),i=n(35);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=t>>>0,s=n>>>0;return o+(r>>>0)+((i&s|(i|s)&~(i+s>>>0))>>>31)|0}})},function(e,t,n){var r=n(9);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=t>>>0,s=n>>>0;return o-(r>>>0)-((~i&s|~(i^s)&i-s>>>0)>>>31)|0}})},function(e,t,n){var r=n(9);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,s=i&n,a=r>>16,u=i>>16,l=(a*s>>>0)+(o*s>>>16);return a*u+(l>>16)+((o*u>>>0)+(l&n)>>16)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,s=i&n,a=r>>>16,u=i>>>16,l=(a*s>>>0)+(o*s>>>16);return a*u+(l>>>16)+((o*u>>>0)+(l&n)>>>16)}})},function(e,t,n){var r=n(279),i=n(13),o=r.key,s=r.set;r.exp({defineMetadata:function(e,t,n,r){s(e,t,i(n),o(r))}})},function(e,t,n){var r=n(212),i=n(9),o=n(24)("metadata"),s=o.store||(o.store=new(n(216))),a=function(e,t,n){var i=s.get(e);if(!i){if(!n)return;s.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},u=function(e,t,n){var r=a(t,n,!1);return void 0===r?!1:r.has(e)},l=function(e,t,n){var r=a(t,n,!1);return void 0===r?void 0:r.get(e)},c=function(e,t,n,r){a(n,r,!0).set(e,t)},p=function(e,t){var n=a(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},d=function(e){i(i.S,"Reflect",e)};e.exports={store:s,map:a,has:u,get:l,set:c,keys:p,key:f,exp:d}},function(e,t,n){var r=n(279),i=n(13),o=r.key,s=r.map,a=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=s(i(t),n,!1);if(void 0===r||!r["delete"](e))return!1;if(r.size)return!0;var u=a.get(t);return u["delete"](n),!!u.size||a["delete"](t)}})},function(e,t,n){var r=n(279),i=n(13),o=n(60),s=r.has,a=r.get,u=r.key,l=function(e,t,n){var r=s(e,t,n);if(r)return a(e,t,n);var i=o(t);return null!==i?l(e,i,n):void 0};r.exp({getMetadata:function(e,t){return l(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(215),i=n(270),o=n(279),s=n(13),a=n(60),u=o.keys,l=o.key,c=function(e,t){var n=u(e,t),o=a(e);if(null===o)return n;var s=c(o,t);return s.length?n.length?i(new r(n.concat(s))):s:n};o.exp({getMetadataKeys:function(e){return c(s(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(279),i=n(13),o=r.get,s=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(279),i=n(13),o=r.keys,s=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:s(arguments[1]))}})},function(e,t,n){var r=n(279),i=n(13),o=n(60),s=r.has,a=r.key,u=function(e,t,n){var r=s(e,t,n);if(r)return!0;var i=o(t);return null!==i?u(e,i,n):!1};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(279),i=n(13),o=r.has,s=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(279),i=n(13),o=n(22),s=r.key,a=r.set;r.exp({metadata:function(e,t){return function(n,r){a(e,t,(void 0!==r?i:o)(n),s(r))}}})},function(e,t,n){var r=n(9),i=n(210)(),o=n(5).process,s="process"==n(35)(o);r(r.G,{asap:function(e){var t=s&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(9),i=n(5),o=n(10),s=n(210)(),a=n(26)("observable"),u=n(22),l=n(13),c=n(91),p=n(211),f=n(11),d=n(207),h=d.RETURN,m=function(e){return null==e?void 0:u(e)},v=function(e){var t=e._c;t&&(e._c=void 0,t())},g=function(e){return void 0===e._o},y=function(e){g(e)||(e._o=void 0,v(e))},b=function(e,t){l(e),this._c=void 0,this._o=e,e=new x(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(i){return void e.error(i)}g(this)&&v(this)};b.prototype=p({},{unsubscribe:function(){y(this)}});var x=function(e){this._s=e};x.prototype=p({},{next:function(e){var t=this._s;if(!g(t)){var n=t._o;try{var r=m(n.next);if(r)return r.call(n,e)}catch(i){try{y(t)}finally{throw i}}}},error:function(e){var t=this._s;if(g(t))throw e;var n=t._o;t._o=void 0;try{var r=m(n.error);if(!r)throw e;e=r.call(n,e)}catch(i){try{v(t)}finally{throw i}}return v(t),e},complete:function(e){var t=this._s;if(!g(t)){var n=t._o;t._o=void 0;try{var r=m(n.complete);e=r?r.call(n,e):void 0}catch(i){try{v(t)}finally{throw i}}return v(t),e}}});var E=function(e){c(this,E,"Observable","_f")._f=u(e)};p(E.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:n})})}}),p(E,{from:function(e){var t="function"==typeof this?this:E,n=m(l(e)[a]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return s(function(){if(!n){try{if(d(e,!1,function(e){return t.next(e),n?h:void 0})===h)return}catch(r){if(n)throw r;return void t.error(r)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);t>e;)n[e]=arguments[e++];return new("function"==typeof this?this:E)(function(e){var t=!1;return s(function(){if(!t){for(var r=0;rs;)(n[s]=arguments[s++])===a&&(u=!0);return function(){var r,o=this,s=arguments.length,l=0,c=0;if(!u&&!s)return i(e,n,o);if(r=n.slice(),u)for(;t>l;l++)r[l]===a&&(r[l]=arguments[c++]);for(;s>c;)r.push(arguments[c++]);return i(e,r,o)}}},function(e,t,n){e.exports=n(5)},function(e,t,n){var r=n(9),i=n(209);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(195),i=n(19),o=n(5),s=n(11),a=n(131),u=n(26),l=u("iterator"),c=u("toStringTag"),p=a.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;5>d;d++){var h,m=f[d],v=o[m],g=v&&v.prototype;if(g){g[l]||s(g,l,p),g[c]||s(g,c,m),a[m]=p;for(h in r)g[h]||i(g,h,r[h],!0)}}},function(e,t,n){(function(t,n){!function(t){"use strict";function r(e,t,n,r){var i=Object.create((t||o).prototype),s=new h(r||[]);return i._invoke=p(e,n,s),i}function i(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function o(){}function s(){}function a(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){this.arg=e}function c(e){function t(n,r,o,s){var a=i(e[n],e,r);if("throw"!==a.type){var u=a.arg,c=u.value;return c instanceof l?Promise.resolve(c.arg).then(function(e){t("next",e,o,s)},function(e){t("throw",e,o,s)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},s)}s(a.arg)}function r(e,n){function r(){return new Promise(function(r,i){t(e,n,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof n&&n.domain&&(t=n.domain.bind(t));var o;this._invoke=r}function p(e,t,n){var r=S;return function(o,s){if(r===D)throw new Error("Generator is already running");if(r===_){if("throw"===o)throw s;return v()}for(;;){var a=n.delegate;if(a){if("return"===o||"throw"===o&&a.iterator[o]===g){n.delegate=null;var u=a.iterator["return"];if(u){var l=i(u,a.iterator,s);if("throw"===l.type){o="throw",s=l.arg;continue}}if("return"===o)continue}var l=i(a.iterator[o],a.iterator,s);if("throw"===l.type){n.delegate=null,o="throw",s=l.arg;continue}o="next",s=g;var c=l.arg;if(!c.done)return r=w,c;n[a.resultName]=c.value,n.next=a.nextLoc,n.delegate=null}if("next"===o)n.sent=n._sent=s;else if("throw"===o){if(r===S)throw r=_,s;n.dispatchException(s)&&(o="next",s=g)}else"return"===o&&n.abrupt("return",s);r=D;var l=i(e,t,n);if("normal"===l.type){r=n.done?_:w;var c={value:l.arg,done:n.done};if(l.arg!==T)return c;n.delegate&&"next"===o&&(s=g)}else"throw"===l.type&&(r=_,o="throw",s=l.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function m(e){if(e){var t=e[x];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function i(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=y.call(i,"catchLoc"),a=y.call(i,"finallyLoc");if(s&&a){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),T}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;d(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:m(e),resultName:t,nextLoc:n},T}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),n(296))},function(e,t){function n(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&r())}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c1)for(var n=1;ni;)z(e,n=r[i++],t[n]);return e},J=function(e,t){return void 0===t?_(e):X(_(e),t)},$=function(e){var t=L.call(this,e=E(e,!0));return!(this===V&&i(j,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(j,e)||i(this,M)&&this[M][e])||t)},Q=function(e,t){if(e=x(e),t=E(t,!0),e!==V||!i(j,t)||i(U,t)){var n=k(e,t);return!n||!i(j,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=D(x(e)),r=[],a=0;n.length>a;)i(j,t=n[a++])||t==M||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===V,r=D(n?U:x(e)),a=[],s=0;r.length>s;)!i(j,t=r[s++])||n&&!i(V,t)||a.push(j[t]);return a};W||(O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(U,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),K(this,e,A(1,n))};return a&&G&&K(V,e,{configurable:!0,set:t}),H(e)},o(O[I],"toString",function(){return this._k}),C.f=Q,w.f=z,n(51).f=S.f=Z,n(45).f=$,n(44).f=ee,a&&!n(29)&&o(V,"propertyIsEnumerable",$,!0),h.f=function(e){return H(d(e))}),s(s.G+s.W+s.F*!W,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var te=T(d.store),ne=0;te.length>ne;)v(te[ne++]);s(s.S+s.F*!W,"Symbol",{"for":function(e){return i(B,e+="")?B[e]:B[e]=O(e)},keyFor:function(e){if(q(e))return y(B,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),s(s.S+s.F*!W,"Object",{create:J,defineProperty:z,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee}),N&&s(s.S+s.F*(!W||l(function(){var e=O();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!q(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,F.apply(N,r)}}}),O[I][R]||n(11)(O[I],R,O[I].valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){e.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(5),i=n(10),a=n(11),s=n(19),o=n(21),u="prototype",l=function(e,t,n){var c,p,f,d,h=e&l.F,v=e&l.G,y=e&l.S,m=e&l.P,g=e&l.B,b=v?r:y?r[t]||(r[t]={}):(r[t]||{})[u],x=v?i:i[t]||(i[t]={}),E=x[u]||(x[u]={});v&&(n=t);for(c in n)p=!h&&b&&void 0!==b[c],f=(p?b:n)[c],d=g&&p?o(f,r):m&&"function"==typeof f?o(Function.call,f):f,b&&s(b,c,f,e&l.U),x[c]!=f&&a(x,c,d),m&&E[c]!=f&&(E[c]=f)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(12),i=n(18);e.exports=n(7)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(13),i=n(15),a=n(17),s=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return s(e,t,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(14);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(14),i=n(5).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(14);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(5),i=n(11),a=n(6),s=n(20)("src"),o="toString",u=Function[o],l=(""+u).split(o);n(10).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,o){var u="function"==typeof n;u&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(a(n,s)||i(n,s,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:o?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,o,function(){return"function"==typeof this&&this[s]||u.call(this)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(22);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(20)("meta"),i=n(14),a=n(6),s=n(12).f,o=0,u=Object.isExtensible||function(){return!0},l=!n(8)(function(){return u(Object.preventExtensions({}))}),c=function(e){s(e,r,{value:{i:"O"+ ++o,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},f=function(e,t){if(!a(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return l&&h.NEED&&u(e)&&!a(e,r)&&c(e),e},h=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},function(e,t,n){var r=n(5),i="__core-js_shared__",a=r[i]||(r[i]={});e.exports=function(e){return a[e]||(a[e]={})}},function(e,t,n){var r=n(12).f,i=n(6),a=n(26)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(24)("wks"),i=n(20),a=n(5).Symbol,s="function"==typeof a,o=e.exports=function(e){return r[e]||(r[e]=s&&a[e]||(s?a:i)("Symbol."+e))};o.store=r},function(e,t,n){t.f=n(26)},function(e,t,n){var r=n(5),i=n(10),a=n(29),s=n(27),o=n(12).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:s.f(e)})}},function(e,t){e.exports=!1},function(e,t,n){var r=n(31),i=n(33);e.exports=function(e,t){for(var n,a=i(e),s=r(a),o=s.length,u=0;o>u;)if(a[n=s[u++]]===t)return n}},function(e,t,n){var r=n(32),i=n(42);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(6),i=n(33),a=n(37)(!1),s=n(41)("IE_PROTO");e.exports=function(e,t){var n,o=i(e),u=0,l=[];for(n in o)n!=s&&r(o,n)&&l.push(n);for(;t.length>u;)r(o,n=t[u++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var r=n(34),i=n(36);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(35);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(33),i=n(38),a=n(40);e.exports=function(e){return function(t,n,s){var o,u=r(t),l=i(u.length),c=a(s,l);if(e&&n!=n){for(;l>c;)if(o=u[c++],o!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(39),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(39),i=Math.max,a=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(24)("keys"),i=n(20);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(31),i=n(44),a=n(45);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var s,o=n(e),u=a.f,l=0;o.length>l;)u.call(e,s=o[l++])&&t.push(s);return t}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(35);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(13),i=n(48),a=n(42),s=n(41)("IE_PROTO"),o=function(){},u="prototype",l=function(){var e,t=n(16)("iframe"),r=a.length,i="<",s=">";for(t.style.display="none",n(49).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+s+"document.F=Object"+i+"/script"+s),e.close(),l=e.F;r--;)delete l[u][a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(o[u]=r(e),n=new o,o[u]=null,n[s]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(12),i=n(13),a=n(31);e.exports=n(7)?Object.defineProperties:function(e,t){i(e);for(var n,s=a(t),o=s.length,u=0;o>u;)r.f(e,n=s[u++],t[n]);return e}},function(e,t,n){e.exports=n(5).document&&document.documentElement},function(e,t,n){var r=n(33),i=n(51).f,a={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return i(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==a.call(e)?o(e):i(r(e))}},function(e,t,n){var r=n(32),i=n(42).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(45),i=n(18),a=n(33),s=n(17),o=n(6),u=n(15),l=Object.getOwnPropertyDescriptor;t.f=n(7)?l:function(e,t){if(e=a(e),t=s(t,!0),u)try{return l(e,t)}catch(n){}if(o(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(9);r(r.S,"Object",{create:n(47)})},function(e,t,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperty:n(12).f})},function(e,t,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperties:n(48)})},function(e,t,n){var r=n(33),i=n(52).f;n(57)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){var r=n(9),i=n(10),a=n(8);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",s)}},function(e,t,n){var r=n(59),i=n(60);n(57)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(36);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(6),i=n(59),a=n(41)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var r=n(59),i=n(31);n(57)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){n(57)("getOwnPropertyNames",function(){return n(50).f})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14);n(57)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(14);n(57)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(14);n(57)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},function(e,t,n){var r=n(9);r(r.S+r.F,"Object",{assign:n(70)})},function(e,t,n){"use strict";var r=n(31),i=n(44),a=n(45),s=n(59),o=n(34),u=Object.assign;e.exports=!u||n(8)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=s(e),u=arguments.length,l=1,c=i.f,p=a.f;u>l;)for(var f,d=o(arguments[l++]),h=c?r(d).concat(c(d)):r(d),v=h.length,y=0;v>y;)p.call(d,f=h[y++])&&(n[f]=d[f]);return n}:u},function(e,t,n){var r=n(9);r(r.S,"Object",{is:n(72)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){var r=n(14),i=n(13),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(21)(Function.call,n(52).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){"use strict";var r=n(76),i={};i[n(26)("toStringTag")]="z",i+""!="[object z]"&&n(19)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(35),i=n(26)("toStringTag"),a="Arguments"==r(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){var r=n(9);r(r.P,"Function",{bind:n(78)})},function(e,t,n){"use strict";var r=n(22),i=n(14),a=n(79),s=[].slice,o={},u=function(e,t,n){if(!(t in o)){for(var r=[],i=0;i>>0||(s.test(n)?16:10))}:r},function(e,t,n){var r=n(9),i=n(36),a=n(8),s=n(85),o="["+s+"]",u="
",l=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),p=function(e,t,n){var i={},o=a(function(){return!!s[e]()||u[e]()!=u}),l=i[e]=o?t(f):s[e];n&&(i[n]=l),r(r.P+r.F*o,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=p},function(e,t){e.exports="\t\n\x0B\f\r \u2028\u2029\ufeff"},function(e,t,n){var r=n(9),i=n(87);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(5).parseFloat,i=n(84).trim;e.exports=1/r(n(85)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(5),i=n(6),a=n(35),s=n(89),o=n(17),u=n(8),l=n(51).f,c=n(52).f,p=n(12).f,f=n(84).trim,d="Number",h=r[d],v=h,y=h.prototype,m=a(n(47)(y))==d,g="trim"in String.prototype,b=function(e){var t=o(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():f(t,3);var n,r,i,a=t.charCodeAt(0);if(43===a||45===a){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var s,u=t.slice(2),l=0,c=u.length;li)return NaN;return parseInt(u,r)}}return+t};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof h&&(m?u(function(){y.valueOf.call(n)}):a(n)!=d)?s(new v(b(t)),n,h):b(t)};for(var x,E=n(7)?l(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),A=0;E.length>A;A++)i(v,x=E[A])&&!i(h,x)&&p(h,x,c(v,x));h.prototype=y,y.constructor=h,n(19)(r,d,h)}},function(e,t,n){var r=n(14),i=n(74).set;e.exports=function(e,t,n){var a,s=t.constructor;return s!==n&&"function"==typeof s&&(a=s.prototype)!==n.prototype&&r(a)&&i&&i(e,a),e}},function(e,t,n){"use strict";var r=n(9),i=n(39),a=n(91),s=n(92),o=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},h=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+s.call(p,7-n.length)+n}return t},v=function(e,t,n){return 0===t?n:t%2===1?v(e,t-1,n*e):v(e*e,t/2,n)},y=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!o&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)(function(){o.call({})})),"Number",{toFixed:function(e){var t,n,r,o,u=a(this,c),l=i(e),m="",g=p;if(l<0||l>20)throw RangeError(c);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(m="-",u=-u),u>1e-21)if(t=y(u*v(2,69,1))-69,n=t<0?u*v(2,-t,1):u/v(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=l;r>=7;)f(1e7,0),r-=7;for(f(v(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<0?(o=g.length,g=m+(o<=l?"0."+s.call(p,l-o)+g:g.slice(0,o-l)+"."+g.slice(o-l))):g=m+g,g}})},function(e,t,n){var r=n(35);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(39),i=n(36);e.exports=function(e){var t=String(i(this)),n="",a=r(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(9),i=n(8),a=n(91),s=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==s.call(1,void 0)})||!i(function(){s.call({})})),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?s.call(t):s.call(t,e)}})},function(e,t,n){var r=n(9);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(9),i=n(5).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(9);r(r.S,"Number",{isInteger:n(97)})},function(e,t,n){var r=n(14),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(9);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(9),i=n(97),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,t,n){var r=n(9);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(9);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(9),i=n(87);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(9),i=n(83);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(9),i=n(105),a=Math.sqrt,s=Math.acosh;r(r.S+r.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(9),a=Math.asinh;i(i.S+i.F*!(a&&1/a(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(9),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(9),i=n(109);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(9);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(9),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(9),i=n(113);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(9),i=n(109),a=Math.pow,s=a(2,-52),o=a(2,-23),u=a(2,127)*(2-o),l=a(2,-126),c=function(e){return e+1/s-1/s};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),a=i(e);return ru||n!=n?a*(1/0):a*n)}})},function(e,t,n){var r=n(9),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,a=0,s=0,o=arguments.length,u=0;s0?(r=n/u,a+=r*r):a+=n;return u===1/0?1/0:u*Math.sqrt(a)}})},function(e,t,n){var r=n(9),i=Math.imul;r(r.S+r.F*n(8)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,a=n&r,s=n&i;return 0|a*s+((n&r>>>16)*s+a*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(9);r(r.S,"Math",{log1p:n(105)})},function(e,t,n){var r=n(9);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(9);r(r.S,"Math",{sign:n(109)})},function(e,t,n){var r=n(9),i=n(113),a=Math.exp;r(r.S+r.F*n(8)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(9),i=n(113),a=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){var r=n(9);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(9),i=n(40),a=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,s=0;r>s;){if(t=+arguments[s++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(9),i=n(33),a=n(38);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=a(t.length),r=arguments.length,s=[],o=0;n>o;)s.push(String(t[o++])),o=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(39),i=n(36);e.exports=function(e){return function(t,n){var a,s,o=String(i(t)),u=r(n),l=o.length;return u<0||u>=l?e?"":void 0:(a=o.charCodeAt(u),a<55296||a>56319||u+1===l||(s=o.charCodeAt(u+1))<56320||s>57343?e?o.charAt(u):a:e?o.slice(u,u+2):(a-55296<<10)+(s-56320)+65536)}}},function(e,t,n){"use strict";var r=n(29),i=n(9),a=n(19),s=n(11),o=n(6),u=n(130),l=n(131),c=n(25),p=n(60),f=n(26)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",v="keys",y="values",m=function(){return this};e.exports=function(e,t,n,g,b,x,E){l(n,t,g);var A,_,S,C=function(e){if(!d&&e in P)return P[e];switch(e){case v:return function(){return new n(this,e)};case y:return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",T=b==y,k=!1,P=e.prototype,D=P[f]||P[h]||b&&P[b],O=D||C(b),N=b?T?C("entries"):O:void 0,F="Array"==t?P.entries||D:D;if(F&&(S=p(F.call(new e)),S!==Object.prototype&&(c(S,w,!0),r||o(S,f)||s(S,f,m))),T&&D&&D.name!==y&&(k=!0,O=function(){return D.call(this)}),r&&!E||!d&&!k&&P[f]||s(P,f,O),u[t]=O,u[w]=m,b)if(A={values:T?O:C(y),keys:x?O:C(v),entries:N},E)for(_ in A)_ in P||a(P,_,A[_]);else i(i.P+i.F*(d||k),t,A);return A}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(47),i=n(18),a=n(25),s={};n(11)(s,n(26)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(9),i=n(128)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(9),i=n(38),a=n(134),s="endsWith",o=""[s];
+r(r.P+r.F*n(136)(s),"String",{endsWith:function(e){var t=a(this,e,s),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),l=String(e);return o?o.call(t,l,u):t.slice(u-l.length,u)===l}})},function(e,t,n){var r=n(135),i=n(36);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(14),i=n(35),a=n(26)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(26)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(i){}}return!0}},function(e,t,n){"use strict";var r=n(9),i=n(134),a="includes";r(r.P+r.F*n(136)(a),"String",{includes:function(e){return!!~i(this,e,a).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(9);r(r.P,"String",{repeat:n(92)})},function(e,t,n){"use strict";var r=n(9),i=n(38),a=n(134),s="startsWith",o=""[s];r(r.P+r.F*n(136)(s),"String",{startsWith:function(e){var t=a(this,e,s),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(141)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){var r=n(9),i=n(8),a=n(36),s=/"/g,o=function(e,t,n,r){var i=String(a(e)),o="<"+t;return""!==n&&(o+=" "+n+'="'+String(r).replace(s,""")+'"'),o+">"+i+""+t+">"};e.exports=function(e,t){var n={};n[e]=t(o),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";n(141)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(141)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(141)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(141)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(141)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(141)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(141)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(141)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(141)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(141)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(141)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(141)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(9);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(9),i=n(59),a=n(17);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(9),i=n(8),a=Date.prototype.getTime,s=function(e){return e>9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(a.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+s(e.getUTCMonth()+1)+"-"+s(e.getUTCDate())+"T"+s(e.getUTCHours())+":"+s(e.getUTCMinutes())+":"+s(e.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}})},function(e,t,n){var r=Date.prototype,i="Invalid Date",a="toString",s=r[a],o=r.getTime;new Date(NaN)+""!=i&&n(19)(r,a,function(){var e=o.call(this);return e===e?s.call(this):i})},function(e,t,n){var r=n(26)("toPrimitive"),i=Date.prototype;r in i||n(11)(i,r,n(159))},function(e,t,n){"use strict";var r=n(13),i=n(17),a="number";e.exports=function(e){if("string"!==e&&e!==a&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=a)}},function(e,t,n){var r=n(9);r(r.S,"Array",{isArray:n(46)})},function(e,t,n){"use strict";var r=n(21),i=n(9),a=n(59),s=n(162),o=n(163),u=n(38),l=n(164),c=n(165);i(i.S+i.F*!n(166)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,p,f=a(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,m=0,g=c(f);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==g||d==Array&&o(g))for(t=u(f.length),n=new d(t);t>m;m++)l(n,m,y?v(f[m],m):f[m]);else for(p=g.call(f),n=new d;!(i=p.next()).done;m++)l(n,m,y?s(p,v,[i.value,m],!0):i.value);return n.length=m,n}})},function(e,t,n){var r=n(13);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(a){var s=e["return"];throw void 0!==s&&r(s.call(e)),a}}},function(e,t,n){var r=n(130),i=n(26)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(12),i=n(18);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(76),i=n(26)("iterator"),a=n(130);e.exports=n(10).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){var r=n(26)("iterator"),i=!1;try{var a=[7][r]();a["return"]=function(){i=!0},Array.from(a,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],s=a[r]();s.next=function(){return{done:n=!0}},a[r]=function(){return s},e(a)}catch(o){}return n}},function(e,t,n){"use strict";var r=n(9),i=n(164);r(r.S+r.F*n(8)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(9),i=n(33),a=[].join;r(r.P+r.F*(n(34)!=Object||!n(169)(a)),"Array",{join:function(e){return a.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(8);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(9),i=n(49),a=n(35),s=n(40),o=n(38),u=[].slice;r(r.P+r.F*n(8)(function(){i&&u.call(i)}),"Array",{slice:function(e,t){var n=o(this.length),r=a(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=s(e,n),l=s(t,n),c=o(l-i),p=Array(c),f=0;fE;E++)if((f||E in g)&&(v=g[E],y=b(v,E,m),e))if(n)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return E;case 2:A.push(v)}else if(c)return!1;return p?-1:l||c?c:A}}},function(e,t,n){var r=n(175);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(14),i=n(46),a=n(26)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&(t=t[a],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(9),i=n(173)(1);r(r.P+r.F*!n(169)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(173)(2);r(r.P+r.F*!n(169)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(173)(3);r(r.P+r.F*!n(169)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(173)(4);r(r.P+r.F*!n(169)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(181);r(r.P+r.F*!n(169)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){var r=n(22),i=n(59),a=n(34),s=n(38);e.exports=function(e,t,n,o,u){r(t);var l=i(e),c=a(l),p=s(l.length),f=u?p-1:0,d=u?-1:1;if(n<2)for(;;){if(f in c){o=c[f],f+=d;break}if(f+=d,u?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:p>f;f+=d)f in c&&(o=t(o,c[f],f,l));return o}},function(e,t,n){"use strict";var r=n(9),i=n(181);r(r.P+r.F*!n(169)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(9),i=n(37)(!1),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(s||!n(169)(a)),"Array",{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(33),a=n(39),s=n(38),o=[].lastIndexOf,u=!!o&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(169)(o)),"Array",{lastIndexOf:function(e){if(u)return o.apply(this,arguments)||0;var t=i(this),n=s(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,a(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(9);r(r.P,"Array",{copyWithin:n(186)}),n(187)("copyWithin")},function(e,t,n){"use strict";var r=n(59),i=n(40),a=n(38);e.exports=[].copyWithin||function(e,t){var n=r(this),s=a(n.length),o=i(e,s),u=i(t,s),l=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===l?s:i(l,s))-u,s-o),p=1;for(u0;)u in n?n[o]=n[u]:delete n[o],o+=p,u+=p;return n}},function(e,t,n){var r=n(26)("unscopables"),i=Array.prototype;void 0==i[r]&&n(11)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(9);r(r.P,"Array",{fill:n(189)}),n(187)("fill")},function(e,t,n){"use strict";var r=n(59),i=n(40),a=n(38);e.exports=function(e){for(var t=r(this),n=a(t.length),s=arguments.length,o=i(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>o;)t[o++]=e;return t}},function(e,t,n){"use strict";var r=n(9),i=n(173)(5),a="find",s=!0;a in[]&&Array(1)[a](function(){s=!1}),r(r.P+r.F*s,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(187)(a)},function(e,t,n){"use strict";var r=n(9),i=n(173)(6),a="findIndex",s=!0;a in[]&&Array(1)[a](function(){s=!1}),r(r.P+r.F*s,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(187)(a)},function(e,t,n){n(193)("Array")},function(e,t,n){"use strict";var r=n(5),i=n(12),a=n(7),s=n(26)("species");e.exports=function(e){var t=r[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(187),i=n(195),a=n(130),s=n(33);e.exports=n(129)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(5),i=n(89),a=n(12).f,s=n(51).f,o=n(135),u=n(197),l=r.RegExp,c=l,p=l.prototype,f=/a/g,d=/a/g,h=new l(f)!==f;if(n(7)&&(!h||n(8)(function(){return d[n(26)("match")]=!1,l(f)!=f||l(d)==d||"/a/i"!=l(f,"i")}))){l=function(e,t){var n=this instanceof l,r=o(e),a=void 0===t;return!n&&r&&e.constructor===l&&a?e:i(h?new c(r&&!a?e.source:e,t):c((r=e instanceof l)?e.source:e,r&&a?u.call(e):t),n?this:p,l)};for(var v=(function(e){e in l||a(l,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})}),y=s(c),m=0;y.length>m;)v(y[m++]);p.constructor=l,l.prototype=p,n(19)(r,"RegExp",l)}n(193)("RegExp")},function(e,t,n){"use strict";var r=n(13);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(199);var r=n(13),i=n(197),a=n(7),s="toString",o=/./[s],u=function(e){n(19)(RegExp.prototype,s,e,!0)};n(8)(function(){return"/a/b"!=o.call({source:"a",flags:"b"})})?u(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?i.call(e):void 0)}):o.name!=s&&u(function(){return o.call(this)})},function(e,t,n){n(7)&&"g"!=/./g.flags&&n(12).f(RegExp.prototype,"flags",{configurable:!0,get:n(197)})},function(e,t,n){n(201)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){"use strict";var r=n(11),i=n(19),a=n(8),s=n(36),o=n(26);e.exports=function(e,t,n){var u=o(e),l=n(s,u,""[e]),c=l[0],p=l[1];a(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,c),r(RegExp.prototype,u,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){n(201)("replace",2,function(e,t,n){return[function(r,i){"use strict";var a=e(this),s=void 0==r?void 0:r[t];return void 0!==s?s.call(r,a,i):n.call(String(a),r,i)},n]})},function(e,t,n){n(201)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(201)("split",2,function(e,t,r){"use strict";var i=n(135),a=r,s=[].push,o="split",u="length",l="lastIndex";if("c"=="abbc"[o](/(b)*/)[1]||4!="test"[o](/(?:)/,-1)[u]||2!="ab"[o](/(?:ab)*/)[u]||4!="."[o](/(.?)(.?)/)[u]||"."[o](/()()/)[u]>1||""[o](/.?/)[u]){var c=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return a.call(n,e,t);var r,o,p,f,d,h=[],v=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,m=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,v+"g");for(c||(r=new RegExp("^"+g.source+"$(?!\\s)",v));(o=g.exec(n))&&(p=o.index+o[0][u],!(p>y&&(h.push(n.slice(y,o.index)),!c&&o[u]>1&&o[0].replace(r,function(){for(d=1;d1&&o.index=m)));)g[l]===o.index&&g[l]++;return y===n[u]?!f&&g.test("")||h.push(""):h.push(n.slice(y)),h[u]>m?h.slice(0,m):h}}else"0"[o](void 0,0)[u]&&(r=function(e,t){return void 0===e&&0===t?[]:a.call(this,e,t)});return[function(n,i){var a=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,a,i):r.call(String(a),n,i)},r]})},function(e,t,n){"use strict";var r,i,a,s=n(29),o=n(5),u=n(21),l=n(76),c=n(9),p=n(14),f=n(22),d=n(206),h=n(207),v=n(208),y=n(209).set,m=n(210)(),g="Promise",b=o.TypeError,x=o.process,E=o[g],x=o.process,A="process"==l(x),_=function(){},S=!!function(){try{var e=E.resolve(1),t=(e.constructor={})[n(26)("species")]=function(e){e(_,_)};return(A||"function"==typeof PromiseRejectionEvent)&&e.then(_)instanceof t}catch(r){}}(),C=function(e,t){return e===t||e===E&&t===a},w=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},T=function(e){return C(E,e)?new k(e):new i(e)},k=i=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw b("Bad Promise constructor");t=e,n=r}),this.resolve=f(t),this.reject=f(n)},P=function(e){try{e()}catch(t){return{error:t}}},D=function(e,t){if(!e._n){e._n=!0;var n=e._c;m(function(){for(var r=e._v,i=1==e._s,a=0,s=function(t){var n,a,s=i?t.ok:t.fail,o=t.resolve,u=t.reject,l=t.domain;try{s?(i||(2==e._h&&F(e),e._h=1),s===!0?n=r:(l&&l.enter(),n=s(r),l&&l.exit()),n===t.promise?u(b("Promise-chain cycle")):(a=w(n))?a.call(n,o,u):o(n)):u(r)}catch(c){u(c)}};n.length>a;)s(n[a++]);e._c=[],e._n=!1,t&&!e._h&&O(e)})}},O=function(e){y.call(o,function(){var t,n,r,i=e._v;if(N(e)&&(t=P(function(){A?x.emit("unhandledRejection",i,e):(n=o.onunhandledrejection)?n({promise:e,reason:i}):(r=o.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=A||N(e)?2:1),e._a=void 0,t)throw t.error})},N=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!N(t.promise))return!1;return!0},F=function(e){y.call(o,function(){var t;A?x.emit("rejectionHandled",e):(t=o.onrejectionhandled)&&t({promise:e,reason:e._v})})},I=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},M=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw b("Promise can't be resolved itself");(t=w(e))?m(function(){var r={_w:n,_d:!1};try{t.call(e,u(M,r,1),u(I,r,1))}catch(i){I.call(r,i)}}):(n._v=e,n._s=1,D(n,!1))}catch(r){I.call({_w:n,_d:!1},r)}}};S||(E=function(e){d(this,E,g,"_h"),f(e),r.call(this);try{e(u(M,this,1),u(I,this,1))}catch(t){I.call(this,t)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(211)(E.prototype,{then:function(e,t){var n=T(v(this,E));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=A?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},"catch":function(e){return this.then(void 0,e)}}),k=function(){var e=new r;this.promise=e,this.resolve=u(M,e,1),this.reject=u(I,e,1)}),c(c.G+c.W+c.F*!S,{Promise:E}),n(25)(E,g),n(193)(g),a=n(10)[g],c(c.S+c.F*!S,g,{reject:function(e){var t=T(this),n=t.reject;return n(e),t.promise}}),c(c.S+c.F*(s||!S),g,{resolve:function(e){if(e instanceof E&&C(e.constructor,this))return e;var t=T(this),n=t.resolve;return n(e),t.promise}}),c(c.S+c.F*!(S&&n(166)(function(e){E.all(e)["catch"](_)})),g,{all:function(e){var t=this,n=T(t),r=n.resolve,i=n.reject,a=P(function(){var n=[],a=0,s=1;h(e,!1,function(e){var o=a++,u=!1;n.push(void 0),s++,t.resolve(e).then(function(e){u||(u=!0,n[o]=e,--s||r(n))},i)}),--s||r(n)});return a&&i(a.error),n.promise},race:function(e){var t=this,n=T(t),r=n.reject,i=P(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(21),i=n(162),a=n(163),s=n(13),o=n(38),u=n(165),l={},c={},t=e.exports=function(e,t,n,p,f){var d,h,v,y,m=f?function(){return e}:u(e),g=r(n,p,t?2:1),b=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(a(m)){for(d=o(e.length);d>b;b++)if(y=t?g(s(h=e[b])[0],h[1]):g(e[b]),y===l||y===c)return y}else for(v=m.call(e);!(h=v.next()).done;)if(y=i(v,g,h.value,t),y===l||y===c)return y};t.BREAK=l,t.RETURN=c},function(e,t,n){var r=n(13),i=n(22),a=n(26)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||void 0==(n=r(s)[a])?t:i(n)}},function(e,t,n){var r,i,a,s=n(21),o=n(79),u=n(49),l=n(16),c=n(5),p=c.process,f=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,v=0,y={},m="onreadystatechange",g=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},b=function(e){g.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++v]=function(){o("function"==typeof e?e:Function(e),t)},r(v),v},d=function(e){delete y[e]},"process"==n(35)(p)?r=function(e){p.nextTick(s(g,e,1))}:h?(i=new h,a=i.port2,i.port1.onmessage=b,r=s(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r=m in l("script")?function(e){u.appendChild(l("script"))[m]=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(s(g,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,n){var r=n(5),i=n(209).set,a=r.MutationObserver||r.WebKitMutationObserver,s=r.process,o=r.Promise,u="process"==n(35)(s);e.exports=function(){var e,t,n,l=function(){var r,i;for(u&&(r=s.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(a){throw e?n():t=void 0,a}}t=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(l)};else if(a){var c=!0,p=document.createTextNode("");new a(l).observe(p,{characterData:!0}),n=function(){p.data=c=!c}}else if(o&&o.resolve){var f=o.resolve();n=function(){f.then(l)}}else n=function(){i.call(r,l)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(19);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(213);e.exports=n(214)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(12).f,i=n(47),a=n(211),s=n(21),o=n(206),u=n(36),l=n(207),c=n(129),p=n(195),f=n(193),d=n(7),h=n(23).fastKey,v=d?"_s":"size",y=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var p=e(function(e,r){o(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[v]=0,void 0!=r&&l(r,n,e[c],e)});return a(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[v]=0},"delete":function(e){var t=this,n=y(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[v]--}return!!n},forEach:function(e){o(this,p,"forEach");for(var t,n=s(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),d&&r(p.prototype,"size",{get:function(){return u(this[v])}}),p},def:function(e,t,n){var r,i,a=y(e,t);return a?a.v=n:(e._l=a={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[v]++,"F"!==i&&(e._i[i]=a)),e},getEntry:y,setStrong:function(e,t,n){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(5),i=n(9),a=n(19),s=n(211),o=n(23),u=n(207),l=n(206),c=n(14),p=n(8),f=n(166),d=n(25),h=n(89);e.exports=function(e,t,n,v,y,m){var g=r[e],b=g,x=y?"set":"add",E=b&&b.prototype,A={},_=function(e){var t=E[e];a(E,e,"delete"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(m||E.forEach&&!p(function(){(new b).entries().next()}))){var S=new b,C=S[x](m?{}:-0,1)!=S,w=p(function(){S.has(1)}),T=f(function(e){new b(e)}),k=!m&&p(function(){for(var e=new b,t=5;t--;)e[x](t,t);return!e.has(-0)});T||(b=t(function(t,n){l(t,b,e);var r=h(new g,t,b);return void 0!=n&&u(n,y,r[x],r),r}),b.prototype=E,E.constructor=b),(w||k)&&(_("delete"),_("has"),y&&_("get")),(k||C)&&_(x),m&&E.clear&&delete E.clear}else b=v.getConstructor(t,e,y,x),s(b.prototype,n),o.NEED=!0;return d(b,e),A[e]=b,i(i.G+i.W+i.F*(b!=g),A),m||v.setStrong(b,e,y),b}},function(e,t,n){"use strict";var r=n(213);e.exports=n(214)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(173)(0),a=n(19),s=n(23),o=n(70),u=n(217),l=n(14),c=s.getWeak,p=Object.isExtensible,f=u.ufstore,d={},h=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(e){if(l(e)){var t=c(e);return t===!0?f(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},y=e.exports=n(214)("WeakMap",h,v,u,!0,!0);7!=(new y).set((Object.freeze||Object)(d),7).get(d)&&(r=u.getConstructor(h),o(r.prototype,v),s.NEED=!0,i(["delete","has","get","set"],function(e){var t=y.prototype,n=t[e];a(t,e,function(t,i){if(l(t)&&!p(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(211),i=n(23).getWeak,a=n(13),s=n(14),o=n(206),u=n(207),l=n(173),c=n(6),p=l(5),f=l(6),d=0,h=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return p(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var l=e(function(e,r){o(e,l,t,"_i"),e._i=d++,e._l=void 0,void 0!=r&&u(r,n,e[a],e)});return r(l.prototype,{"delete":function(e){if(!s(e))return!1;var t=i(e);return t===!0?h(this)["delete"](e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!s(e))return!1;var t=i(e);return t===!0?h(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,n){var r=i(a(t),!0);return r===!0?h(e).set(t,n):r[e._i]=n,e},ufstore:h}},function(e,t,n){"use strict";var r=n(217);n(214)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(9),i=n(220),a=n(221),s=n(13),o=n(40),u=n(38),l=n(14),c=n(5).ArrayBuffer,p=n(208),f=a.ArrayBuffer,d=a.DataView,h=i.ABV&&c.isView,v=f.prototype.slice,y=i.VIEW,m="ArrayBuffer";r(r.G+r.W+r.F*(c!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,m,{isView:function(e){return h&&h(e)||l(e)&&y in e}}),r(r.P+r.U+r.F*n(8)(function(){return!new f(2).slice(1,void 0).byteLength}),m,{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(s(this),e);for(var n=s(this).byteLength,r=o(e,n),i=o(void 0===t?n:t,n),a=new(p(this,f))(u(i-r)),l=new d(this),c=new d(a),h=0;r>1,c=23===t?P(2,-24)-P(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=k(e),e!=e||e===w?(i=e!=e?1:0,r=u):(r=D(O(e)/N),e*(a=P(2,-r))<1&&(r--,a*=2),e+=r+l>=1?c/a:c*P(2,1-l),e*a>=2&&(r++,a/=2),r+l>=u?(i=0,r=u):r+l>=1?(i=(e*a-1)*P(2,t),r+=l):(i=e*P(2,l-1)*P(2,t),r=0));t>=8;s[p++]=255&i,i/=256,t-=8);for(r=r<0;s[p++]=255&r,r/=256,o-=8);return s[--p]|=128*f,s},U=function(e,t,n){var r,i=8*n-t-1,a=(1<>1,o=i-7,u=n-1,l=e[u--],c=127&l;for(l>>=7;o>0;c=256*c+e[u],u--,o-=8);for(r=c&(1<<-o)-1,c>>=-o,o+=t;o>0;r=256*r+e[u],u--,o-=8);if(0===c)c=1-s;else{if(c===a)return r?NaN:l?-w:w;r+=P(2,t),c-=s}return(l?-1:1)*r*P(2,c-t)},V=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},W=function(e){return[255&e]},Y=function(e){return[255&e,e>>8&255]},G=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},K=function(e){return j(e,52,8)},H=function(e){return j(e,23,4)},q=function(e,t,n){h(e[b],t,{get:function(){return this[n]}})},z=function(e,t,n,r){var i=+n,a=p(i);if(i!=a||a<0||a+t>e[L])throw C(E);var s=e[R]._b,o=a+e[B],u=s.slice(o,o+t);return r?u:u.reverse()},X=function(e,t,n,r,i,a){var s=+n,o=p(s);if(s!=o||o<0||o+t>e[L])throw C(E);for(var u=e[R]._b,l=o+e[B],c=r(+i),f=0;fee;)($=Z[ee++])in A||o(A,$,T[$]);a||(Q.constructor=A)}var te=new _(new A(2)),ne=_[b].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(_[b],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else A=function(e){var t=J(this,e);this._b=v.call(Array(t),0),this[L]=t},_=function(e,t,n){c(this,_,g),c(e,A,g);var r=e[L],i=p(t);if(i<0||i>r)throw C("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw C(x);this[R]=e,this[B]=i,this[L]=n},i&&(q(A,I,"_l"),q(_,F,"_b"),q(_,I,"_l"),q(_,M,"_o")),u(_[b],{getInt8:function(e){return z(this,1,e)[0]<<24>>24},getUint8:function(e){return z(this,1,e)[0]},getInt16:function(e){var t=z(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=z(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return V(z(this,4,e,arguments[1]))},getUint32:function(e){return V(z(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return U(z(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return U(z(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){X(this,1,e,W,t)},setUint8:function(e,t){X(this,1,e,W,t)},setInt16:function(e,t){X(this,2,e,Y,t,arguments[2])},setUint16:function(e,t){X(this,2,e,Y,t,arguments[2])},setInt32:function(e,t){X(this,4,e,G,t,arguments[2])},setUint32:function(e,t){X(this,4,e,G,t,arguments[2])},setFloat32:function(e,t){X(this,4,e,H,t,arguments[2])},setFloat64:function(e,t){X(this,8,e,K,t,arguments[2])}});y(A,m),y(_,g),o(_[b],s.VIEW,!0),t[m]=A,t[g]=_},function(e,t,n){var r=n(9);r(r.G+r.W+r.F*!n(220).ABV,{DataView:n(221).DataView})},function(e,t,n){n(224)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";if(n(7)){var r=n(29),i=n(5),a=n(8),s=n(9),o=n(220),u=n(221),l=n(21),c=n(206),p=n(18),f=n(11),d=n(211),h=n(39),v=n(38),y=n(40),m=n(17),g=n(6),b=n(72),x=n(76),E=n(14),A=n(59),_=n(163),S=n(47),C=n(60),w=n(51).f,T=n(165),k=n(20),P=n(26),D=n(173),O=n(37),N=n(208),F=n(194),I=n(130),M=n(166),R=n(193),L=n(189),B=n(186),j=n(12),U=n(52),V=j.f,W=U.f,Y=i.RangeError,G=i.TypeError,K=i.Uint8Array,H="ArrayBuffer",q="Shared"+H,z="BYTES_PER_ELEMENT",X="prototype",J=Array[X],$=u.ArrayBuffer,Q=u.DataView,Z=D(0),ee=D(2),te=D(3),ne=D(4),re=D(5),ie=D(6),ae=O(!0),se=O(!1),oe=F.values,ue=F.keys,le=F.entries,ce=J.lastIndexOf,pe=J.reduce,fe=J.reduceRight,de=J.join,he=J.sort,ve=J.slice,ye=J.toString,me=J.toLocaleString,ge=P("iterator"),be=P("toStringTag"),xe=k("typed_constructor"),Ee=k("def_constructor"),Ae=o.CONSTR,_e=o.TYPED,Se=o.VIEW,Ce="Wrong length!",we=D(1,function(e,t){return Ne(N(e,e[Ee]),t)}),Te=a(function(){return 1===new K(new Uint16Array([1]).buffer)[0]}),ke=!!K&&!!K[X].set&&a(function(){new K(1).set({})}),Pe=function(e,t){if(void 0===e)throw G(Ce);var n=+e,r=v(e);if(t&&!b(n,r))throw Y(Ce);return r},De=function(e,t){var n=h(e);if(n<0||n%t)throw Y("Wrong offset!");return n},Oe=function(e){if(E(e)&&_e in e)return e;throw G(e+" is not a typed array!")},Ne=function(e,t){if(!(E(e)&&xe in e))throw G("It is not a typed array constructor!");return new e(t)},Fe=function(e,t){return Ie(N(e,e[Ee]),t)},Ie=function(e,t){for(var n=0,r=t.length,i=Ne(e,r);r>n;)i[n]=t[n++];return i},Me=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Re=function(e){var t,n,r,i,a,s,o=A(e),u=arguments.length,c=u>1?arguments[1]:void 0,p=void 0!==c,f=T(o);if(void 0!=f&&!_(f)){for(s=f.call(o),r=[],t=0;!(a=s.next()).done;t++)r.push(a.value);o=r}for(p&&u>2&&(c=l(c,arguments[2],2)),t=0,n=v(o.length),i=Ne(this,n);n>t;t++)i[t]=p?c(o[t],t):o[t];
+return i},Le=function(){for(var e=0,t=arguments.length,n=Ne(this,t);t>e;)n[e]=arguments[e++];return n},Be=!!K&&a(function(){me.call(new K(1))}),je=function(){return me.apply(Be?ve.call(Oe(this)):Oe(this),arguments)},Ue={copyWithin:function(e,t){return B.call(Oe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Oe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return L.apply(Oe(this),arguments)},filter:function(e){return Fe(this,ee(Oe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(Oe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(Oe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Z(Oe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return se(Oe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return ae(Oe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return de.apply(Oe(this),arguments)},lastIndexOf:function(e){return ce.apply(Oe(this),arguments)},map:function(e){return we(Oe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(Oe(this),arguments)},reduceRight:function(e){return fe.apply(Oe(this),arguments)},reverse:function(){for(var e,t=this,n=Oe(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return he.call(Oe(this),e)},subarray:function(e,t){var n=Oe(this),r=n.length,i=y(e,r);return new(N(n,n[Ee]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===t?r:y(t,r))-i))}},Ve=function(e,t){return Fe(this,ve.call(Oe(this),e,t))},We=function(e){Oe(this);var t=De(arguments[1],1),n=this.length,r=A(e),i=v(r.length),a=0;if(i+t>n)throw Y(Ce);for(;a255?255:255&r),i.v[h](n*t+i.o,r,Te)},P=function(e,t){V(e,t,{get:function(){return T(this,t)},set:function(e){return k(this,t,e)},enumerable:!0})};b?(y=n(function(e,n,r,i){c(e,y,l,"_d");var a,s,o,u,p=0,d=0;if(E(n)){if(!(n instanceof $||(u=x(n))==H||u==q))return _e in n?Ie(y,n):Re.call(y,n);a=n,d=De(r,t);var h=n.byteLength;if(void 0===i){if(h%t)throw Y(Ce);if(s=h-d,s<0)throw Y(Ce)}else if(s=v(i)*t,s+d>h)throw Y(Ce);o=s/t}else o=Pe(n,!0),s=o*t,a=new $(s);for(f(e,"_d",{b:a,o:d,l:s,e:o,v:new Q(a)});p=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,t,n){function r(e,t){var n,o,c=arguments.length<3?e:arguments[2];return l(e)===c?e[t]:(n=i.f(e,t))?s(n,"value")?n.value:void 0!==n.get?n.get.call(c):void 0:u(o=a(e))?r(o,t,c):void 0}var i=n(52),a=n(60),s=n(6),o=n(9),u=n(14),l=n(13);o(o.S,"Reflect",{get:r})},function(e,t,n){var r=n(52),i=n(9),a=n(13);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(a(e),t)}})},function(e,t,n){var r=n(9),i=n(60),a=n(13);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){var r=n(9);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(9),i=n(13),a=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!a||a(e)}})},function(e,t,n){var r=n(9);r(r.S,"Reflect",{ownKeys:n(244)})},function(e,t,n){var r=n(51),i=n(44),a=n(13),s=n(5).Reflect;e.exports=s&&s.ownKeys||function(e){var t=r.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(9),i=n(13),a=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return a&&a(e),!0}catch(t){return!1}}})},function(e,t,n){function r(e,t,n){var u,f,d=arguments.length<4?e:arguments[3],h=a.f(c(e),t);if(!h){if(p(f=s(e)))return r(f,t,n,d);h=l(0)}return o(h,"value")?!(h.writable===!1||!p(d))&&(u=a.f(d,t)||l(0),u.value=n,i.f(d,t,u),!0):void 0!==h.set&&(h.set.call(d,n),!0)}var i=n(12),a=n(52),s=n(60),o=n(6),u=n(9),l=n(18),c=n(13),p=n(14);u(u.S,"Reflect",{set:r})},function(e,t,n){var r=n(9),i=n(74);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var r=n(9),i=n(37)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(187)("includes")},function(e,t,n){"use strict";var r=n(9),i=n(128)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(9),i=n(251);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(38),i=n(92),a=n(36);e.exports=function(e,t,n,s){var o=String(a(e)),u=o.length,l=void 0===n?" ":String(n),c=r(t);if(c<=u||""==l)return o;var p=c-u,f=i.call(l,Math.ceil(p/l.length));return f.length>p&&(f=f.slice(0,p)),s?f+o:o+f}},function(e,t,n){"use strict";var r=n(9),i=n(251);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(84)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(84)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(9),i=n(36),a=n(38),s=n(135),o=n(197),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(131)(l,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!s(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):o.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=a(e.lastIndex),new l(r,t)}})},function(e,t,n){n(28)("asyncIterator")},function(e,t,n){n(28)("observable")},function(e,t,n){var r=n(9),i=n(244),a=n(33),s=n(52),o=n(164);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=a(e),r=s.f,u=i(n),l={},c=0;u.length>c;)o(l,t=u[c++],r(n,t));return l}})},function(e,t,n){var r=n(9),i=n(260)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(31),i=n(33),a=n(45).f;e.exports=function(e){return function(t){for(var n,s=i(t),o=r(s),u=o.length,l=0,c=[];u>l;)a.call(s,n=o[l++])&&c.push(e?[n,s[n]]:s[n]);return c}}},function(e,t,n){var r=n(9),i=n(260)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(9),i=n(59),a=n(22),s=n(12);n(7)&&r(r.P+n(263),"Object",{__defineGetter__:function(e,t){s.f(i(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){e.exports=n(29)||!n(8)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(5)[e]})},function(e,t,n){"use strict";var r=n(9),i=n(59),a=n(22),s=n(12);n(7)&&r(r.P+n(263),"Object",{__defineSetter__:function(e,t){s.f(i(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(9),i=n(59),a=n(17),s=n(60),o=n(52).f;n(7)&&r(r.P+n(263),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=a(e,!0);do if(t=o(n,r))return t.get;while(n=s(n))}})},function(e,t,n){"use strict";var r=n(9),i=n(59),a=n(17),s=n(60),o=n(52).f;n(7)&&r(r.P+n(263),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=a(e,!0);do if(t=o(n,r))return t.set;while(n=s(n))}})},function(e,t,n){var r=n(9);r(r.P+r.R,"Map",{toJSON:n(268)("Map")})},function(e,t,n){var r=n(76),i=n(269);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(207);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(9);r(r.P+r.R,"Set",{toJSON:n(268)("Set")})},function(e,t,n){var r=n(9);r(r.S,"System",{global:n(5)})},function(e,t,n){var r=n(9),i=n(35);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,a=t>>>0,s=n>>>0;return a+(r>>>0)+((i&s|(i|s)&~(i+s>>>0))>>>31)|0}})},function(e,t,n){var r=n(9);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,a=t>>>0,s=n>>>0;return a-(r>>>0)-((~i&s|~(i^s)&i-s>>>0)>>>31)|0}})},function(e,t,n){var r=n(9);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,a=r&n,s=i&n,o=r>>16,u=i>>16,l=(o*s>>>0)+(a*s>>>16);return o*u+(l>>16)+((a*u>>>0)+(l&n)>>16)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,a=r&n,s=i&n,o=r>>>16,u=i>>>16,l=(o*s>>>0)+(a*s>>>16);return o*u+(l>>>16)+((a*u>>>0)+(l&n)>>>16)}})},function(e,t,n){var r=n(278),i=n(13),a=r.key,s=r.set;r.exp({defineMetadata:function(e,t,n,r){s(e,t,i(n),a(r))}})},function(e,t,n){var r=n(212),i=n(9),a=n(24)("metadata"),s=a.store||(a.store=new(n(216))),o=function(e,t,n){var i=s.get(e);if(!i){if(!n)return;s.set(e,i=new r)}var a=i.get(t);if(!a){if(!n)return;i.set(t,a=new r)}return a},u=function(e,t,n){var r=o(t,n,!1);return void 0!==r&&r.has(e)},l=function(e,t,n){var r=o(t,n,!1);return void 0===r?void 0:r.get(e)},c=function(e,t,n,r){o(n,r,!0).set(e,t)},p=function(e,t){var n=o(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},d=function(e){i(i.S,"Reflect",e)};e.exports={store:s,map:o,has:u,get:l,set:c,keys:p,key:f,exp:d}},function(e,t,n){var r=n(278),i=n(13),a=r.key,s=r.map,o=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:a(arguments[2]),r=s(i(t),n,!1);if(void 0===r||!r["delete"](e))return!1;if(r.size)return!0;var u=o.get(t);return u["delete"](n),!!u.size||o["delete"](t)}})},function(e,t,n){var r=n(278),i=n(13),a=n(60),s=r.has,o=r.get,u=r.key,l=function(e,t,n){var r=s(e,t,n);if(r)return o(e,t,n);var i=a(t);return null!==i?l(e,i,n):void 0};r.exp({getMetadata:function(e,t){return l(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(215),i=n(269),a=n(278),s=n(13),o=n(60),u=a.keys,l=a.key,c=function(e,t){var n=u(e,t),a=o(e);if(null===a)return n;var s=c(a,t);return s.length?n.length?i(new r(n.concat(s))):s:n};a.exp({getMetadataKeys:function(e){return c(s(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(278),i=n(13),a=r.get,s=r.key;r.exp({getOwnMetadata:function(e,t){return a(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(278),i=n(13),a=r.keys,s=r.key;r.exp({getOwnMetadataKeys:function(e){return a(i(e),arguments.length<2?void 0:s(arguments[1]))}})},function(e,t,n){var r=n(278),i=n(13),a=n(60),s=r.has,o=r.key,u=function(e,t,n){var r=s(e,t,n);if(r)return!0;var i=a(t);return null!==i&&u(e,i,n)};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(278),i=n(13),a=r.has,s=r.key;r.exp({hasOwnMetadata:function(e,t){return a(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(278),i=n(13),a=n(22),s=r.key,o=r.set;r.exp({metadata:function(e,t){return function(n,r){o(e,t,(void 0!==r?i:a)(n),s(r))}}})},function(e,t,n){var r=n(9),i=n(210)(),a=n(5).process,s="process"==n(35)(a);r(r.G,{asap:function(e){var t=s&&a.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(9),i=n(5),a=n(10),s=n(210)(),o=n(26)("observable"),u=n(22),l=n(13),c=n(206),p=n(211),f=n(11),d=n(207),h=d.RETURN,v=function(e){return null==e?void 0:u(e)},y=function(e){var t=e._c;t&&(e._c=void 0,t())},m=function(e){return void 0===e._o},g=function(e){m(e)||(e._o=void 0,y(e))},b=function(e,t){l(e),this._c=void 0,this._o=e,e=new x(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(i){return void e.error(i)}m(this)&&y(this)};b.prototype=p({},{unsubscribe:function(){g(this)}});var x=function(e){this._s=e};x.prototype=p({},{next:function(e){var t=this._s;if(!m(t)){var n=t._o;try{var r=v(n.next);if(r)return r.call(n,e)}catch(i){try{g(t)}finally{throw i}}}},error:function(e){var t=this._s;if(m(t))throw e;var n=t._o;t._o=void 0;try{var r=v(n.error);if(!r)throw e;e=r.call(n,e)}catch(i){try{y(t)}finally{throw i}}return y(t),e},complete:function(e){var t=this._s;if(!m(t)){var n=t._o;t._o=void 0;try{var r=v(n.complete);e=r?r.call(n,e):void 0}catch(i){try{y(t)}finally{throw i}}return y(t),e}}});var E=function(e){c(this,E,"Observable","_f")._f=u(e)};p(E.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(a.Promise||i.Promise)(function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:n})})}}),p(E,{from:function(e){var t="function"==typeof this?this:E,n=v(l(e)[o]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return s(function(){if(!n){try{if(d(e,!1,function(e){if(t.next(e),n)return h})===h)return}catch(r){if(n)throw r;return void t.error(r)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);es;)(n[s]=arguments[s++])===o&&(u=!0);return function(){var r,a=this,s=arguments.length,l=0,c=0;if(!u&&!s)return i(e,n,a);if(r=n.slice(),u)for(;t>l;l++)r[l]===o&&(r[l]=arguments[c++]);for(;s>c;)r.push(arguments[c++]);return i(e,r,a)}}},function(e,t,n){e.exports=n(5)},function(e,t,n){var r=n(9),i=n(209);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(194),i=n(19),a=n(5),s=n(11),o=n(130),u=n(26),l=u("iterator"),c=u("toStringTag"),p=o.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;d<5;d++){var h,v=f[d],y=a[v],m=y&&y.prototype;if(m){m[l]||s(m,l,p),m[c]||s(m,c,v),o[v]=p;for(h in r)m[h]||i(m,h,r[h],!0)}}},function(e,t,n){(function(t,n){!function(t){"use strict";function r(e,t,n,r){var i=Object.create((t||a).prototype),s=new h(r||[]);return i._invoke=p(e,n,s),i}function i(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function a(){}function s(){}function o(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){this.arg=e}function c(e){function t(n,r,a,s){var o=i(e[n],e,r);if("throw"!==o.type){var u=o.arg,c=u.value;return c instanceof l?Promise.resolve(c.arg).then(function(e){t("next",e,a,s)},function(e){t("throw",e,a,s)}):Promise.resolve(c).then(function(e){u.value=e,a(u)},s)}s(o.arg)}function r(e,n){function r(){return new Promise(function(r,i){t(e,n,r,i)})}return a=a?a.then(r,r):r()}"object"==typeof n&&n.domain&&(t=n.domain.bind(t));var a;this._invoke=r}function p(e,t,n){var r=S;return function(a,s){if(r===w)throw new Error("Generator is already running");if(r===T){if("throw"===a)throw s;return y()}for(;;){var o=n.delegate;if(o){if("return"===a||"throw"===a&&o.iterator[a]===m){n.delegate=null;var u=o.iterator["return"];if(u){var l=i(u,o.iterator,s);if("throw"===l.type){a="throw",s=l.arg;continue}}if("return"===a)continue}var l=i(o.iterator[a],o.iterator,s);if("throw"===l.type){n.delegate=null,a="throw",s=l.arg;continue}a="next",s=m;var c=l.arg;if(!c.done)return r=C,c;n[o.resultName]=c.value,n.next=o.nextLoc,n.delegate=null}if("next"===a)n.sent=n._sent=s;else if("throw"===a){if(r===S)throw r=T,s;n.dispatchException(s)&&(a="next",s=m)}else"return"===a&&n.abrupt("return",s);r=w;var l=i(e,t,n);if("normal"===l.type){r=n.done?T:C;var c={value:l.arg,done:n.done};if(l.arg!==k)return c;n.delegate&&"next"===a&&(s=m)}else"throw"===l.type&&(r=T,a="throw",s=l.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function v(e){if(e){var t=e[x];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function i(){for(;++n=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=g.call(i,"catchLoc"),o=g.call(i,"finallyLoc");if(s&&o){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),k}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;d(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:v(e),resultName:t,nextLoc:n},k}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),n(295))},function(e,t){function n(e){return u===setTimeout?setTimeout(e,0):u.call(null,e,0)}function r(e){l===clearTimeout?clearTimeout(e):l.call(null,e)}function i(){d&&p&&(d=!1,p.length?f=p.concat(f):h=-1,f.length&&a())}function a(){if(!d){var e=n(i);d=!0;for(var t=f.length;t;){for(p=f,f=[];++h1)for(var r=1;r=t||0>n||D&&r>=g}function c(){var e=C();return l(e)?p(e):void(b=setTimeout(c,s(e)))}function p(e){return clearTimeout(b),b=void 0,_&&m?r(e):(m=v=void 0,y)}function f(){void 0!==b&&clearTimeout(b),A=S=0,m=v=b=void 0}function d(){return void 0===b?y:p(C())}function h(){var e=C(),n=l(e);if(m=arguments,v=this,A=e,n){if(void 0===b)return o(A);if(D)return clearTimeout(b),b=setTimeout(c,t),r(A)}return void 0===b&&(b=setTimeout(c,t)),y}var m,v,g,y,b,A=0,S=0,w=!1,D=!1,_=!0;if("function"!=typeof e)throw new TypeError(u);return t=a(t)||0,i(n)&&(w=!!n.leading,D="maxWait"in n,g=D?x(a(n.maxWait)||0,t):g,_="trailing"in n?!!n.trailing:_),h.cancel=f,h.flush=d,h}function r(e){var t=i(e)?b.call(e):"";return t==c||t==p}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){return!!e&&"object"==typeof e}function s(e){return"symbol"==typeof e||o(e)&&b.call(e)==f}function a(e){if("number"==typeof e)return e;if(s(e))return l;if(i(e)){var t=r(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=m.test(e);return n||v.test(e)?g(e.slice(2),n?2:8):h.test(e)?l:+e}var u="Expected a function",l=NaN,c="[object Function]",p="[object GeneratorFunction]",f="[object Symbol]",d=/^\s+|\s+$/g,h=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,v=/^0o[0-7]+$/i,g=parseInt,y=Object.prototype,b=y.toString,x=Math.max,E=Math.min,C=Date.now;e.exports=n},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Ri(r):{},Ri(es,r,!1),d(r);var i=r.value;"string"==typeof i&&(i=new Ss(i,r.mode,null,r.lineSeparator)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),s=this.display=new t(n,i,o);s.wrapper.CodeMirror=this,l(this),a(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!ko&&s.input.focus(),g(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Pi,keySeq:null,specialChars:null};var u=this;bo&&11>xo&&setTimeout(function(){u.display.input.reset(!0)},20),Wt(this),Xi(),xt(this),this.curOp.forceUpdate=!0,Jr(this,i),r.autofocus&&!ko||u.hasFocus()?setTimeout(Bi(gn,this),20):yn(this);for(var c in ts)ts.hasOwnProperty(c)&&ts[c](this,r[c],ns);C(this),r.finishInit&&r.finishInit(this);for(var p=0;pxo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),Eo||vo&&ko||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,je(e,100),e.state.modeGen++,e.curOp&&It(e)}function i(e){e.options.lineWrapping?(Qs(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):($s(e.display.wrapper,"CodeMirror-wrap"),f(e)),s(e),It(e),at(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(i){if(Cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;st.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function d(e){var t=Ni(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+He(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Wi("div",[Wi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Wi("div",[Wi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ps(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ps(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&8>xo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function g(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&$s(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ps(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Qs(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&F(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function x(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ge(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ni(t,r),s=ni(t,i);if(n&&n.ensure){var a=n.ensure.from.line,u=n.ensure.to.line;o>a?(o=a,s=ni(t,ri($r(t,a))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=s&&(o=ni(t,ri($r(t,u))-e.wrapper.clientHeight),s=u)}return{from:o,to:Math.max(s,o+1)}}function E(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=S(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Vt(e))return!1;C(e)&&(Rt(e),t.dims=N(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),Ro&&(o=xr(e.doc,o),s=Er(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ut(e,o,s),n.viewOffset=ri($r(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Vt(e);if(!a&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=qi();return u>4&&(n.lineDiv.style.display="none"),O(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,l&&qi()!=l&&l.offsetHeight&&l.focus(),Gi(n.cursorDiv),Gi(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,je(e,400)),n.updateLineNumbers=null,!0}function T(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=ze(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+He(e.display)-Ye(e),n.top)}),t.visible=x(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&_(e,t);r=!1){F(e);var i=h(e);Oe(e),y(e,i),P(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function k(e,t){var n=new w(e,t);if(_(e,n)){F(e),T(e,n);var r=h(e);Oe(e),y(e,r),P(e,r),n.finish()}}function P(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ke(e)+"px"}function F(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rxo){var s=o.node.offsetTop+o.node.offsetHeight;i=s-n,n=s}else{var a=o.node.getBoundingClientRect();i=a.bottom-a.top}var u=o.line.height-i;if(2>i&&(i=yt(t)),(u>.001||-.001>u)&&(ei(o.line,i),M(o.line),o.rest))for(var l=0;l=t&&p.lineNumber;p.changes&&(Ni(p.changes,"gutter")>-1&&(f=!1),I(e,p,l,n)),f&&(Gi(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(A(e.options,l)))),a=p.node.nextSibling}else{var d=G(e,p,l,n);s.insertBefore(d,a)}l+=p.size}for(;a;)a=r(a)}function I(e,t,n,r){for(var i=0;ixo&&(e.node.style.zIndex=2)),e.node}function R(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=L(e);e.background=n.insertBefore(Wi("div",null,t),n.firstChild)}}function B(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Br(e,t)}function j(e,t){var n=t.text.className,r=B(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,U(t)):n&&(t.text.className=n)}function U(e){R(e),e.line.wrapClass?L(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function V(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=L(t);t.gutterBackground=Wi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=L(t),s=t.gutter=Wi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),i.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(Wi("div",A(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a1)if(Uo&&Uo.text.join("\n")==t){if(r.ranges.length%Uo.text.length==0){u=[];for(var l=0;l=0;l--){var c=r.ranges[l],p=c.from(),f=c.to();c.empty()&&(n&&n>0?p=Bo(p.line,p.ch-n):e.state.overwrite&&!s?f=Bo(f.line,Math.min($r(o,f.line).text.length,f.ch+Mi(a).length)):Uo&&Uo.lineWise&&Uo.text.join("\n")==t&&(p=f=Bo(p.line,0)));var d=e.curOp.updateInput,h={from:p,to:f,text:u?u[l%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};Dn(e.doc,h),Si(e,"inputRead",e,h)}t&&!s&&Z(e,t),Bn(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Q(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||kt(t,function(){$(t,n,0,null,"paste")}),!0):void 0}function Z(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Un(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test($r(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Un(e,i.head.line,"smart"));s&&Si(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?l.map:c[i],s=0;si?e.line:e.rest[i]),p=o[s]+r;return(0>r||a!=t)&&(p=o[s+(r?1:0)]),Bo(u,p)}}}var i=e.text.firstChild,o=!1;if(!t||!Ys(i,t))return se(Bo(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var s=e.rest?Mi(e.rest):e.line;return se(Bo(ti(s),s.text.length),o)}var a=3==t.nodeType?t:null,u=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));u.parentNode!=i;)u=u.parentNode;var l=e.measure,c=l.maps,p=r(a,u,n);if(p)return se(p,o);for(var f=u.nextSibling,d=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(p=r(f,f.firstChild,0))return se(Bo(p.line,p.ch-d),o);d+=f.textContent.length}for(var h=u.previousSibling,d=n;h;h=h.previousSibling){if(p=r(h,h.firstChild,-1))return se(Bo(p.line,p.ch+d),o);d+=f.textContent.length}}function le(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function s(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(a+=n);var c,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(Bo(r,0),Bo(i+1,0),o(+p));return void(f.length&&(c=f[0].find())&&(a+=Qr(e.doc,c.from,c.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var s=X(o.from(),i.from()),a=Y(o.to(),i.to()),u=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new pe(u?a:s,u?s:a))}}return new ce(e,t)}function de(e,t){return new ce([new pe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function me(e,t){if(t.linen?Bo(n,$r(e,n).text.length):ve(t,$r(e,t.line).text.length)}function ve(e,t){var n=e.ch;return null==n||n>t?Bo(e.line,t):0>n?Bo(e.line,0):e}function ge(e,t){return t>=e.first&&t=t.ch:a.to>t.ch))){if(i&&(Ns(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!u.atomic)continue;if(n){var l,c=u.find(0>r?1:-1);if((0>r?u.inclusiveRight:u.inclusiveLeft)&&(c=Ne(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(l=jo(c,n))&&(0>r?0>l:l>0))return Fe(e,c,t,r,i)}var p=u.find(0>r?-1:1);return(0>r?u.inclusiveLeft:u.inclusiveRight)&&(p=Ne(e,p,r,p.line==t.line?o:null)),p?Fe(e,p,t,r,i):null}}return t}function Me(e,t,n,r,i){var o=r||1,s=Fe(e,t,n,o,i)||!i&&Fe(e,t,n,o,!0)||Fe(e,t,n,-o,i)||!i&&Fe(e,t,n,-o,!0);return s?s:(e.cantEdit=!0,Bo(e.first,0))}function Ne(e,t,n,r){return 0>n&&0==t.ch?t.line>e.first?me(e,Bo(t.line-1)):null:n>0&&t.ch==(r||$r(e,t.line)).text.length?t.line=e.display.viewTo||a.to().linet&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(Wi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return ft(e,Bo(t,n),"div",p,r)}var a,u,p=$r(s,t),f=p.text.length;return eo(ii(p),n||0,null==i?f:i,function(e,t,s){var p,d,h,m=o(e,"left");if(e==t)p=m,d=h=m.left;else{if(p=o(t-1,"right"),"rtl"==s){var v=m;m=p,p=v}d=m.left,h=p.right}null==n&&0==e&&(d=l),p.top-m.top>3&&(r(d,m.top,null,m.bottom),d=l,m.bottomu.bottom||p.bottom==u.bottom&&p.right>u.right)&&(u=p),l+1>d&&(d=l),r(d,p.top,h-d,p.bottom)}),{start:a,end:u}}var o=e.display,s=e.doc,a=document.createDocumentFragment(),u=qe(e.display),l=u.left,c=Math.max(o.sizerWidth,ze(e)-o.sizer.offsetLeft)-u.right,p=t.from(),f=t.to();if(p.line==f.line)i(p.line,p.ch,f.ch);else{var d=$r(s,p.line),h=$r(s,f.line),m=yr(d)==yr(h),v=i(p.line,p.ch,m?d.text.length+1:null).end,g=i(f.line,m?0:null,f.ch).start;m&&(v.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function je(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=us(t.mode,We(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength,u=Or(e,o,a?us(t.mode,r):r,!0);o.styles=u.styles;var l=o.styleClasses,c=u.classes;c?o.styleClasses=c:l&&(o.styleClasses=null);for(var p=!s||s.length!=o.styles.length||l!=c&&(!l||!c||l.bgClass!=c.bgClass||l.textClass!=c.textClass),f=0;!p&&fn?(je(e,e.options.workDelay),!0):void 0}),i.length&&kt(e,function(){for(var t=0;ts;--a){if(a<=o.first)return o.first;var u=$r(o,a-1);if(u.stateAfter&&(!n||a<=o.frontier))return a;var l=Us(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=a-1,r=l)}return i}function We(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Ve(e,t,n),s=o>r.first&&$r(r,o-1).stateAfter;return s=s?us(r.mode,s):ls(r.mode),r.iter(o,t,function(n){Lr(e,n.text,s);var a=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((u.bottom+l.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Je(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function $e(e,t){t=yr(t);var n=ti(t),r=e.display.externalMeasured=new Nt(e.doc,t,n);r.lineN=n;var i=r.built=Br(e,r);return r.text=i.pre,Hi(e.display.lineMeasure,i.pre),r}function Qe(e,t,n,r){return tt(e,et(e,t),n,r)}function Ze(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,s="left"):l>t?(i=t-u,o=i+1):(a==e.length-3||t==l&&e[a+3]>t)&&(o=l-u,i=o-1,t>=l&&(s="right")),null!=i){if(r=e[a+2],u==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)r=e[(a-=3)+2],s="left";if("right"==n&&i==l-u)for(;ac;c++){for(;a&&Vi(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+uxo&&0==a&&u==o.coverEnd-o.coverStart)i=s.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var p=Hs(s,a,u).getClientRects();i=p.length?p["right"==r?p.length-1:0]:Ho}else i=Hs(s,a,u).getBoundingClientRect()||Ho;if(i.left||i.right||0==a)break;u=a,a-=1,l="right"}bo&&11>xo&&(i=it(e.display.measure,i))}else{a>0&&(l=r="right");var p;i=e.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==r?p.length-1:0]:s.getBoundingClientRect()}if(bo&&9>xo&&!a&&(!i||!i.left&&!i.right)){var f=s.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+bt(e.display),top:f.top,bottom:f.bottom}:Ho}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(d+h)/2,v=t.view.measure.heights,c=0;cn.from?s(e-1):s(e,r)}r=r||$r(e.doc,t.line),i||(i=et(e,r));var u=ii(r),l=t.ch;if(!u)return s(l);var c=lo(u,l),p=a(l,c);return null!=sa&&(p.other=a(l,sa)),p}function ht(e,t){var n=0,t=me(e.doc,t);e.options.lineWrapping||(n=bt(e.display)*t.ch);var r=$r(e.doc,t.line),i=ri(r)+Ge(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function mt(e,t,n,r){var i=Bo(e,t);return i.xRel=r,n&&(i.outside=!0),i}function vt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return mt(r.first,0,!0,-1);var i=ni(r,n),o=r.first+r.size-1;if(i>o)return mt(r.first+r.size-1,$r(r,o).text.length,!0,1);0>t&&(t=0);for(var s=$r(r,i);;){var a=gt(e,s,i,t,n),u=vr(s),l=u&&u.find(0,!0);if(!u||!(a.ch>l.from.ch||a.ch==l.from.ch&&a.xRel>0))return a;i=ti(s=l.to.line)}}function gt(e,t,n,r,i){function o(r){var i=dt(e,Bo(n,r),"line",t,l);return a=!0,s>i.bottom?i.left-u:sv)return mt(n,d,g,1);for(;;){if(c?d==f||d==po(t,f,1):1>=d-f){for(var y=h>r||v-r>=r-h?f:d,b=r-(y==f?h:v);Vi(t.text.charAt(y));)++y;var x=mt(n,y,y==f?m:g,-1>b?-1:b>1?1:0);return x}var E=Math.ceil(p/2),C=f+E;if(c){C=f;for(var A=0;E>A;++A)C=po(t,C,1)}var S=o(C);S>r?(d=C,v=S,(g=a)&&(v+=1e3),p=E):(f=C,h=S,m=a,p-=E)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Vo){Vo=Wi("pre");for(var t=0;49>t;++t)Vo.appendChild(document.createTextNode("x")),Vo.appendChild(Wi("br"));Vo.appendChild(document.createTextNode("x"))}Hi(e.measure,Vo);var n=Vo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Gi(e.measure),n||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Wi("span","xxxxxxxxxx"),n=Wi("pre",[t]);Hi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function xt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ko},qo?qo.ops.push(e.curOp):e.curOp.ownsGroup=qo={ops:[e.curOp],delayedCallbacks:[]}}function Et(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new w(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function wt(e){e.updatedDisplay=e.mustUpdate&&_(e.cm,e.update)}function Dt(e){var t=e.cm,n=t.display;e.updatedDisplay&&F(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-ze(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function _t(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var s=new Nt(e.doc,$r(e.doc,o),o);r=o+s.size,i.push(s)}return i}function It(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ro&&xr(e.doc,t)i.viewFrom?Rt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Rt(e);else if(t<=i.viewFrom){var o=jt(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Rt(e)}else if(n>=i.viewTo){var o=jt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Rt(e)}else{var s=jt(e,t,t,-1),a=jt(e,n,n+r,1);s&&a?(i.view=i.view.slice(0,s.index).concat(Ot(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):Rt(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Bt(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==Ni(s,n)&&s.push(n)}}}function Rt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function jt(e,t,n,r){var i,o=Bt(e,t),s=e.display.view;if(!Ro||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,u=e.display.viewFrom;o>a;a++)u+=s[a].size;if(u!=t){if(r>0){if(o==s.length-1)return null;i=u+s[o].size-t,o++}else i=u-t;t+=i,n+=i}for(;xr(e.doc,n)!=n;){if(o==(0>r?0:s.length-1))return null;n+=r*s[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Ut(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Ot(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Ot(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Bt(e,n)))),r.viewTo=n}function Vt(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ps(i.scroller,"mousedown",Pt(e,zt)),bo&&11>xo?Ps(i.scroller,"dblclick",Pt(e,function(t){if(!Di(e,t)){var n=Kt(e,t);if(n&&!Qt(e,t)&&!qt(e.display,t)){_s(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):Ps(i.scroller,"dblclick",function(t){Di(e,t)||_s(t)}),Io||Ps(i.scroller,"contextmenu",function(t){bn(e,t)});var o,s={end:0};Ps(i.scroller,"touchstart",function(t){if(!Di(e,t)&&!n(t)){clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-s.end<=300?s:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Ps(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ps(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!qt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=e.coordsChar(i.activeTouch,"page");s=!o.prev||r(o,o.prev)?new pe(a,a):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(a):new pe(Bo(a.line,0),me(e.doc,Bo(a.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),_s(n)}t()}),Ps(i.scroller,"touchcancel",t),Ps(i.scroller,"scroll",function(){i.scroller.clientHeight&&(rn(e,i.scroller.scrollTop),on(e,i.scroller.scrollLeft,!0),Ns(e,"scroll",e))}),Ps(i.scroller,"mousewheel",function(t){sn(e,t)}),Ps(i.scroller,"DOMMouseScroll",function(t){sn(e,t)}),Ps(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Di(e,t)||ks(t)},over:function(t){Di(e,t)||(tn(e,t),ks(t))},start:function(t){en(e,t)},drop:Pt(e,Zt),leave:function(t){Di(e,t)||nn(e)}};var a=i.input.getField();Ps(a,"keyup",function(t){hn.call(e,t)}),Ps(a,"keydown",Pt(e,fn)),Ps(a,"keypress",Pt(e,mn)),Ps(a,"focus",Bi(gn,e)),Ps(a,"blur",Bi(yn,e))}function Gt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,s=n?Ps:Ms;s(t.display.scroller,"dragstart",o.start),s(t.display.scroller,"dragenter",o.enter),s(t.display.scroller,"dragover",o.over),s(t.display.scroller,"dragleave",o.leave),s(t.display.scroller,"drop",o.drop)}}function Ht(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function qt(e,t){for(var n=Ei(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Kt(e,t,n,r){var i=e.display;if(!n&&"true"==Ei(t).getAttribute("cm-not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(t){return null}var u,l=vt(e,o,s);if(r&&1==l.xRel&&(u=$r(e.doc,l.line).text).length==l.ch){var c=Us(u,u.length,e.options.tabSize)-u.length;l=Bo(l.line,Math.max(0,Math.round((o-qe(e.display).left)/bt(e.display))-c))}return l}function zt(e){var t=this,n=t.display;if(!(Di(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,qt(n,e))return void(Eo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Qt(t,e)){var r=Kt(t,e);switch(window.focus(),Ci(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Yt(t,e,r):Ei(e)==n.scroller&&_s(e);break;case 2:Eo&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),_s(e);break;case 3:Io?bn(t,e):vn(t)}}}}function Yt(e,t,n){bo?setTimeout(Bi(J,e),0):e.curOp.focus=qi();var r,i=+new Date;Go&&Go.time>i-400&&0==jo(Go.pos,n)?r="triple":Wo&&Wo.time>i-400&&0==jo(Wo.pos,n)?(r="double",Go={time:i,pos:n}):(r="single",Wo={time:i,pos:n});var o,s=e.doc.sel,a=Po?t.metaKey:t.ctrlKey;e.options.dragDrop&&ea&&!e.isReadOnly()&&"single"==r&&(o=s.contains(n))>-1&&(jo((o=s.ranges[o]).from(),n)<0||n.xRel>0)&&(jo(o.to(),n)>0||n.xRel<0)?Xt(e,t,n,a):Jt(e,t,n,r,a)}function Xt(e,t,n,r){var i=e.display,o=+new Date,s=Pt(e,function(a){Eo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ms(document,"mouseup",s),Ms(i.scroller,"drop",s),Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10&&(_s(a),!r&&+new Date-200=h;h++){var g=$r(l,h).text,y=Vs(g,u,o);u==d?i.push(new pe(Bo(h,y),Bo(h,y))):g.length>y&&i.push(new pe(Bo(h,y),Bo(h,Vs(g,d,o))))}i.length||i.push(new pe(n,n)),De(l,fe(f.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,x=b.anchor,E=t;if("single"!=r){if("double"==r)var C=e.findWordAt(t);else var C=new pe(Bo(t.line,0),me(l,Bo(t.line+1,0)));jo(C.anchor,x)>0?(E=C.head,x=X(b.from(),C.anchor)):(E=C.anchor,x=Y(b.to(),C.head))}var i=f.ranges.slice(0);i[p]=new pe(me(l,x),E),De(l,fe(i,p),Bs)}}function s(t){var n=++y,i=Kt(e,t,!0,"rect"==r);if(i)if(0!=jo(i,v)){e.curOp.focus=qi(),o(i);var a=x(u,l);(i.line>=a.to||i.lineg.bottom?20:0;c&&setTimeout(Pt(e,function(){y==n&&(u.scroller.scrollTop+=c,s(t))}),50)}}function a(t){e.state.selectingText=!1,y=1/0,_s(t),u.input.focus(),Ms(document,"mousemove",b),Ms(document,"mouseup",E),l.history.lastSelOrigin=null}var u=e.display,l=e.doc;_s(t);var c,p,f=l.sel,d=f.ranges;if(i&&!t.shiftKey?(p=l.sel.contains(n),c=p>-1?d[p]:new pe(n,n)):(c=l.sel.primary(),p=l.sel.primIndex),Fo?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(c=new pe(n,n)),n=Kt(e,t,!0,!0),p=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||l.extend?be(l,c,h.anchor,h.head):h}else if("triple"==r){var m=new pe(Bo(n.line,0),me(l,Bo(n.line+1,0)));c=e.display.shift||l.extend?be(l,c,m.anchor,m.head):m}else c=be(l,c,n);i?-1==p?(p=d.length,De(l,fe(d.concat([c]),p),{scroll:!1,origin:"*mouse"})):d.length>1&&d[p].empty()&&"single"==r&&!t.shiftKey?(De(l,fe(d.slice(0,p).concat(d.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),f=l.sel):Ce(l,p,c,Bs):(p=0,De(l,new ce([c],0),Bs),f=l.sel);var v=n,g=u.wrapper.getBoundingClientRect(),y=0,b=Pt(e,function(e){Ci(e)?s(e):a(e)}),E=Pt(e,a);e.state.selectingText=E,Ps(document,"mousemove",b),Ps(document,"mouseup",E)}function $t(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&_s(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ti(e,n))return xi(t);o-=a.top-s.viewOffset;for(var u=0;u=i){var c=ni(e.doc,o),p=e.options.gutters[u];return Ns(e,n,e,c,p,t),xi(t)}}}function Qt(e,t){return $t(e,t,"gutterClick",!0)}function Zt(e){var t=this;if(nn(t),!Di(t,e)&&!qt(t.display,e)){_s(e),bo&&(zo=+new Date);var n=Kt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,a=function(e,r){if(!t.options.allowDropFileTypes||-1!=Ni(t.options.allowDropFileTypes,e.type)){var a=new FileReader;a.onload=Pt(t,function(){var e=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++s==i){n=me(t.doc,n);var u={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Dn(t.doc,u),we(t.doc,de(n,Zo(u)))}}),a.readAsText(e)}},u=0;i>u;++u)a(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Po?e.altKey:e.ctrlKey))var l=t.listSelections();if(_e(t.doc,de(n,n)),l)for(var u=0;us.clientWidth,u=s.scrollHeight>s.clientHeight;if(r&&a||i&&u){if(i&&Po&&Eo)e:for(var l=t.target,c=o.view;l!=s;l=l.parentNode)for(var p=0;pf?d=Math.max(0,d+f-50):h=Math.min(e.doc.height,h+f+50),k(e,{top:d,bottom:h})}20>Yo&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Xo=(Xo*Yo+n)/(Yo+1),++Yo)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function an(e,t,n){if("string"==typeof t&&(t=cs[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ls}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function un(e,t,n){for(var r=0;rxo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=cn(t,e);So&&(Qo=r?n:null,!r&&88==n&&!ra&&(Po?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||dn(t)}}function dn(e){function t(e){18!=e.keyCode&&e.altKey||($s(n,"CodeMirror-crosshair"),Ms(document,"keyup",t),Ms(document,"mouseover",t))}var n=e.display.lineDiv;Qs(n,"CodeMirror-crosshair"),Ps(document,"keyup",t),Ps(document,"mouseover",t)}function hn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Di(this,e)}function mn(e){var t=this;if(!(qt(t.display,e)||Di(t,e)||e.ctrlKey&&!e.altKey||Po&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(So&&n==Qo)return Qo=null,void _s(e);if(!So||e.which&&!(e.which<10)||!cn(t,e)){var i=String.fromCharCode(null==r?n:r);pn(t,e,i)||t.display.input.onKeyPress(e)}}}function vn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function gn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ns(e,"focus",e),e.state.focused=!0,Qs(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Eo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Be(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(Ns(e,"blur",e),e.state.focused=!1,$s(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e,t){qt(e.display,t)||xn(e,t)||Di(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function xn(e,t){return Ti(e,"gutterContextMenu")?$t(e,t,"gutterContextMenu",!1):!1}function En(e,t){if(jo(e,t.from)<0)return e;if(jo(e,t.to)<=0)return Zo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Zo(t).ch-t.to.ch),Bo(n,r)}function Cn(e,t){for(var n=[],r=0;r=0;--i)_n(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else _n(e,t)}}function _n(e,t){if(1!=t.text.length||""!=t.text[0]||0!=jo(t.from,t.to)){var n=Cn(e,t);li(e,t,n,e.cm?e.cm.curOp.id:NaN),Pn(e,t,n,or(e,t));var r=[];Xr(e,function(e,n){n||-1!=Ni(r,e.history)||(bi(e.history,t),r.push(e.history)),Pn(e,t,null,or(e,t))})}}function Tn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,s="undo"==t?i.done:i.undone,a="undo"==t?i.undone:i.done,u=0;u=0;--u){var p=r.changes[u];if(p.origin=t,c&&!wn(e,p,!1))return void(s.length=0);l.push(si(e,p));var f=u?Cn(e,p):Mi(s);Pn(e,p,f,ar(e,p)),!u&&e.cm&&e.cm.scrollIntoView({from:p.from,to:Zo(p)});var d=[];Xr(e,function(e,t){t||-1!=Ni(d,e.history)||(bi(e.history,p),d.push(e.history)),Pn(e,p,null,ar(e,p))})}}}}function kn(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Oi(e.sel.ranges,function(e){return new pe(Bo(e.anchor.line+t,e.anchor.ch),Bo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){It(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Bo(o,$r(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qr(e,t.from,t.to),n||(n=Cn(e,t)),e.cm?Fn(e.cm,t,r):Kr(e,t,r),_e(e,n,Rs)}}function Fn(e,t,n){var r=e.doc,i=e.display,s=t.from,a=t.to,u=!1,l=s.line;e.options.lineWrapping||(l=ti(yr($r(r,s.line))),r.iter(l,a.line+1,function(e){return e==i.maxLine?(u=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&_i(e),Kr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(l,s.line+t.text.length,function(e){var t=p(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,s.line),je(e,400);var c=t.text.length-(a.line-s.line)-1;t.full?It(e):s.line!=a.line||1!=t.text.length||qr(e.doc,t)?It(e,s.line,a.line+1,c):Lt(e,s.line,"text");var f=Ti(e,"changes"),d=Ti(e,"change");if(d||f){var h={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Si(e,"change",e,h),f&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Mn(e,t,n,r,i){if(r||(r=n),jo(r,n)<0){
-var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Dn(e,{from:n,to:r,text:t,origin:i})}function Nn(e,t){if(!Di(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!_o){var o=Wi("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-Ge(e.display))+"px; height: "+(t.bottom-t.top+Ke(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function On(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,s=dt(e,t),a=n&&n!=t?dt(e,n):s,u=Ln(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-r,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+r),l=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=u.scrollTop&&(rn(e,u.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(o=!0)),null!=u.scrollLeft&&(on(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return s}function In(e,t,n,r,i){var o=Ln(e,t,n,r,i);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function Ln(e,t,n,r,i){var o=e.display,s=yt(e.display);0>n&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,u=Ye(e),l={};i-n>u&&(i=n+u);var c=e.doc.height+He(o),p=s>n,f=i>c-s;if(a>n)l.scrollTop=p?0:n;else if(i>a+u){var d=Math.min(n,(f?c:i)-u);d!=a&&(l.scrollTop=d)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=ze(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=r-t>m;return v&&(r=t+m),10>t?l.scrollLeft=0:h>t?l.scrollLeft=Math.max(0,t-(v?0:10)):r>m+h-3&&(l.scrollLeft=r+(v?0:10)-m),l}function Rn(e,t,n){null==t&&null==n||jn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Bn(e){jn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Bo(t.line,t.ch-1):t,r=Bo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function jn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ht(e,t.from),r=ht(e,t.to),i=Ln(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Un(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=We(e,t):n="prev");var s=e.options.tabSize,a=$r(o,t),u=Us(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var l,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(l=o.mode.indent(i,a.text.slice(c.length),a.text),l==Ls||l>150)){if(!r)return;n="prev"}}else l=0,n="not";"prev"==n?l=t>o.first?Us($r(o,t-1).text,null,s):0:"add"==n?l=u+e.options.indentUnit:"subtract"==n?l=u-e.options.indentUnit:"number"==typeof n&&(l=u+n),l=Math.max(0,l);var p="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(l/s);d;--d)f+=s,p+=" ";if(l>f&&(p+=Fi(l-f)),p!=c)return Mn(o,p,Bo(t,0),Bo(t,c.length),"+input"),a.stateAfter=null,!0;for(var d=0;d=0;t--)Mn(e.doc,"",r[t].from,r[t].to,"+delete");Bn(e)})}function Gn(e,t,n,r,i){function o(){var t=a+n;return t=e.first+e.size?!1:(a=t,c=$r(e,t))}function s(e){var t=(i?po:fo)(c,u,n,!0);if(null==t){if(e||!o())return!1;u=i?(0>n?io:ro)(c):0>n?c.text.length:0}else u=t;return!0}var a=t.line,u=t.ch,l=n,c=$r(e,a);if("char"==r)s();else if("column"==r)s(!0);else if("word"==r||"group"==r)for(var p=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(0>n)||s(!h);h=!1){var m=c.text.charAt(u)||"\n",v=ji(m,d)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||v||(v="s"),p&&p!=v){0>n&&(n=1,s());break}if(v&&(p=v),n>0&&!s(!h))break}var g=Me(e,Bo(a,u),t,l,!0);return jo(t,g)||(g.hitSide=!0),g}function Hn(e,t,n,r){var i,o=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(a-(0>n?1.5:.5)*yt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var u=vt(e,s,i);if(!u.outside)break;if(0>n?0>=i:i>=o.height){u.hitSide=!0;break}i+=5*n}return u}function qn(t,n,r,i){e.defaults[t]=n,r&&(ts[t]=i?function(e,t,n){n!=ns&&r(e,t,n)}:r)}function Kn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],s=0;s0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Wi("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(gr(e,t.line,t,n,o)||t.line!=n.line&&gr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ro=!0}o.addToHistory&&li(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,u=t.line,l=e.cm;if(e.iter(u,n.line+1,function(e){l&&o.collapsed&&!l.options.lineWrapping&&yr(e)==l.display.maxLine&&(a=!0),o.collapsed&&u!=t.line&&ei(e,0),nr(e,new Zn(o,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Cr(e,t)&&ei(t,0)}),o.clearOnEnter&&Ps(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Lo=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++vs,o.atomic=!0),l){if(a&&(l.curOp.updateMaxLine=!0),o.collapsed)It(l,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Lt(l,c,"text");o.atomic&&ke(l.doc),Si(l,"markerAdded",l,o)}return o}function Xn(e,t,n,r,i){r=Ri(r),r.shared=!1;var o=[Yn(e,t,n,r,i)],s=o[0],a=r.widgetNode;return Xr(e,function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Yn(e,me(e,t),me(e,n),r,i));for(var u=0;u=t:o.to>t);(r||(r=[])).push(new Zn(s,o.from,u?null:o.to))}}return r}function ir(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(s.inclusiveLeft?o.from<=t:o.from0&&a)for(var p=0;pp;++p)h.push(m);h.push(u)}return h}function sr(e){for(var t=0;t0)){var c=[u,1],p=jo(l.from,a.from),f=jo(l.to,a.to);(0>p||!s.inclusiveLeft&&!p)&&c.push({from:l.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&c.push({from:a.to,to:l.to}),i.splice.apply(i,c),u+=c.length-1}}return i}function lr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=p||0>=c&&p>=0)&&(0>=c&&(u.marker.inclusiveRight&&i.inclusiveLeft?jo(l.to,n)>=0:jo(l.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?jo(l.from,r)<=0:jo(l.from,r)<0)))return!0}}}function yr(e){for(var t;t=mr(e);)e=t.find(-1,!0).line;return e}function br(e){for(var t,n;t=vr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function xr(e,t){var n=$r(e,t),r=yr(n);return n==r?t:ti(r)}function Er(e,t){if(t>e.lastLine())return t;var n,r=$r(e,t);if(!Cr(e,r))return t;for(;n=vr(r);)r=n.find(1,!0).line;return ti(r)+1}function Cr(e,t){var n=Ro&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var s=t.token(n,r);if(n.pos>n.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function Mr(e,t,n,r){function i(e){return{start:p.start,end:p.pos,string:p.current(),type:o||null,state:e?us(s.mode,c):c}}var o,s=e.doc,a=s.mode;t=me(s,t);var u,l=$r(s,t.line),c=We(e,t.line,n),p=new ms(l.text,e.options.tabSize);for(r&&(u=[]);(r||p.pose.options.maxHighlightLength?(a=!1,s&&Lr(e,t,r,p.pos),p.pos=t.length,u=null):u=kr(Fr(n,p,r,f),o),f){var d=f[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!a||c!=u){for(;ll;){var r=i[u];r>e&&i.splice(u,1,e,i[u+1],r),u+=2,l=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,u-n,e,"cm-overlay "+t),u=n+2;else for(;u>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Ir(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=We(e,ti(t)),i=Or(e,t,t.text.length>e.options.maxHighlightLength?us(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Lr(e,t,n,r){var i=e.doc.mode,o=new ms(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Pr(i,n);!o.eol();)Fr(i,o,n),o.start=o.pos}function Rr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Cs:Es;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Br(e,t){var n=Wi("span",null,null,Eo?"padding-right: .1px":null),r={pre:Wi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(bo||Eo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,s=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Ur,Qi(e.display.measure)&&(o=ii(s))&&(r.addToken=Wr(r.addToken,o)),r.map=[];var a=t!=e.display.externalMeasured&&ti(s);Hr(s,r,Ir(e,s,a)),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=zi(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=zi(s.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild($i(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Eo){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ns(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=zi(r.pre.className,r.textClass||"")),r}function jr(e){var t=Wi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ur(e,t,n,r,i,o,s){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,Vr):t,u=e.cm.state.specialChars,l=!1;if(u.test(t))for(var c=document.createDocumentFragment(),p=0;;){u.lastIndex=p;var f=u.exec(t),d=f?f.index-p:t.length-p;if(d){var h=document.createTextNode(a.slice(p,p+d));bo&&9>xo?c.appendChild(Wi("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+d,h),e.col+=d,e.pos+=d}if(!f)break;if(p+=d+1," "==f[0]){var m=e.cm.options.tabSize,v=m-e.col%m,h=c.appendChild(Wi("span",Fi(v),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=v}else if("\r"==f[0]||"\n"==f[0]){var h=c.appendChild(Wi("span","\r"==f[0]?"␍":"","cm-invalidchar"));h.setAttribute("cm-text",f[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(f[0]);h.setAttribute("cm-text",f[0]),bo&&9>xo?c.appendChild(Wi("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,c),bo&&9>xo&&(l=!0),e.pos+=t.length}if(n||r||i||l||s){var g=n||"";r&&(g+=r),i&&(g+=i);var y=Wi("span",[c],g,s);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Vr(e){for(var t=" ",n=0;nl&&f.from<=l)break}if(f.to>=c)return e(n,r,i,o,s,a,u);e(n,r.slice(0,f.to-l),i,o,null,a,u),o=null,r=r.slice(f.to-l),l=f.to}}}function Gr(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Hr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,u,l,c,p,f,d=i.length,h=0,m=1,v="",g=0;;){if(g==h){u=l=c=p=a="",f=null,g=1/0;for(var y,b=[],x=0;xh||C.collapsed&&E.to==h&&E.from==h)?(null!=E.to&&E.to!=h&&g>E.to&&(g=E.to,l=""),C.className&&(u+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&E.from==h&&(c+=" "+C.startStyle),C.endStyle&&E.to==g&&(y||(y=[])).push(C.endStyle,E.to),C.title&&!p&&(p=C.title),C.collapsed&&(!f||dr(f.marker,C)<0)&&(f=E)):E.from>h&&g>E.from&&(g=E.from)}if(y)for(var x=0;x=d)break;for(var A=Math.min(d,g);;){if(v){var S=h+v.length;if(!f){var w=S>A?v.slice(0,A-h):v;t.addToken(t,w,s?s+u:u,c,h+w.length==g?l:"",p,a)}if(S>=A){v=v.slice(A-h),h=A;break}h=S,c=""}v=i.slice(o,o=n[m++]),s=Rr(n[m++],t.cm.options)}}else for(var m=1;mn;++n)o.push(new xs(l[n],i(n),r));return o}var a=t.from,u=t.to,l=t.text,c=$r(e,a.line),p=$r(e,u.line),f=Mi(l),d=i(l.length-1),h=u.line-a.line;if(t.full)e.insert(0,s(0,l.length)),e.remove(l.length,e.size-l.length);else if(qr(e,t)){var m=s(0,l.length-1);o(p,p.text,d),h&&e.remove(a.line,h),m.length&&e.insert(a.line,m)}else if(c==p)if(1==l.length)o(c,c.text.slice(0,a.ch)+f+c.text.slice(u.ch),d);else{var m=s(1,l.length-1);m.push(new xs(f+c.text.slice(u.ch),d,r)),o(c,c.text.slice(0,a.ch)+l[0],i(0)),e.insert(a.line+1,m)}else if(1==l.length)o(c,c.text.slice(0,a.ch)+l[0]+p.text.slice(u.ch),i(0)),e.remove(a.line+1,h);else{o(c,c.text.slice(0,a.ch)+l[0],i(0)),o(p,f+p.text.slice(u.ch),d);var m=s(1,l.length-1);h>1&&e.remove(a.line+1,h-1),e.insert(a.line+1,m)}Si(e,"change",e,t)}function zr(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Qr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Zr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ei(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ti(e){if(null==e.parent)return null;for(var t=e.parent,n=Ni(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ni(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=a}return n+r}function ri(e){e=yr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Mi(e.done)):void 0}function li(e,t,n,r){var i=e.history;i.undone.length=0;var o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ui(i,i.lastOp==r))){var a=Mi(o.changes);0==jo(t.from,t.to)&&0==jo(t.from,a.to)?a.to=Zo(t):o.changes.push(si(e,t))}else{var u=Mi(i.done);for(u&&u.ranges||fi(e.sel,i.done),o={changes:[si(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ns(e,"historyAdded")}function ci(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function pi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ci(e,o,Mi(i.done),t))?i.done[i.done.length-1]=t:fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ai(i.undone)}function fi(e,t){var n=Mi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function di(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function hi(e){if(!e)return null;for(var t,n=0;n-1&&(Mi(a)[p]=c[p],delete c[p])}}}return i}function gi(e,t,n,r){n0?r.slice():Fs:r||Fs}function Si(e,t){function n(e){return function(){e.apply(null,o)}}var r=Ai(e,t,!1);if(r.length){var i,o=Array.prototype.slice.call(arguments,2);qo?i=qo.delayedCallbacks:Os?i=Os:(i=Os=[],setTimeout(wi,0));for(var s=0;s0}function ki(e){e.prototype.on=function(e,t){Ps(this,e,t)},e.prototype.off=function(e,t){Ms(this,e,t)}}function Pi(){this.id=null}function Fi(e){for(;Ws.length<=e;)Ws.push(Mi(Ws)+" ");return Ws[e]}function Mi(e){return e[e.length-1]}function Ni(e,t){for(var n=0;n-1&&Ks(e)?!0:t.test(e):Ks(e)}function Ui(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Vi(e){return e.charCodeAt(0)>=768&&zs.test(e)}function Wi(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Hi(e,t){return Gi(e).appendChild(t)}function qi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Ki(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function zi(e,t){for(var n=e.split(" "),r=0;r2&&!(bo&&8>xo))}var n=Xs?Wi("span",""):Wi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Qi(e){if(null!=Js)return Js;var t=Hi(e,document.createTextNode("AخA")),n=Hs(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Hs(t,1,2).getBoundingClientRect();return Js=r.right-n.right<3}function Zi(e){if(null!=ia)return ia;var t=Hi(e,Wi("span","x")),n=t.getBoundingClientRect(),r=Hs(t,0,1).getBoundingClientRect();return ia=Math.abs(n.left-r.left)>1}function eo(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function ro(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?no(Mi(t)):e.text.length}function oo(e,t){var n=$r(e.doc,t),r=yr(n);r!=n&&(t=ti(r));var i=ii(r),o=i?i[0].level%2?io(r):ro(r):0;return Bo(t,o)}function so(e,t){for(var n,r=$r(e.doc,t);n=vr(r);)r=n.find(1,!0).line,t=null;var i=ii(r),o=i?i[0].level%2?ro(r):io(r):r.text.length;return Bo(null==t?ti(r):t,o)}function ao(e,t){var n=oo(e,t.line),r=$r(e.doc,n.line),i=ii(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return Bo(n.line,s?0:o)}return n}function uo(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function lo(e,t){sa=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return uo(e,i.level,e[n].level)?(i.from!=i.to&&(sa=n),r):(i.from!=i.to&&(sa=r),n);n=r}}return n}function co(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Vi(e.text.charAt(t)));return t}function po(e,t,n,r){var i=ii(e);if(!i)return fo(e,t,n,r);for(var o=lo(i,t),s=i[o],a=co(e,t,s.level%2?-n:n,r);;){if(a>s.from&&a0==s.level%2?s.to:s.from);if(s=i[o+=n],!s)return null;a=n>0==s.level%2?co(e,s.to,-1,r):co(e,s.from,1,r)}}function fo(e,t,n,r){var i=t+n;if(r)for(;i>0&&Vi(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var ho=navigator.userAgent,mo=navigator.platform,vo=/gecko\/\d/i.test(ho),go=/MSIE \d/.test(ho),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ho),bo=go||yo,xo=bo&&(go?document.documentMode||6:yo[1]),Eo=/WebKit\//.test(ho),Co=Eo&&/Qt\/\d+\.\d+/.test(ho),Ao=/Chrome\//.test(ho),So=/Opera\//.test(ho),wo=/Apple Computer/.test(navigator.vendor),Do=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ho),_o=/PhantomJS/.test(ho),To=/AppleWebKit/.test(ho)&&/Mobile\/\w+/.test(ho),ko=To||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ho),Po=To||/Mac/.test(mo),Fo=/\bCrOS\b/.test(ho),Mo=/win/i.test(mo),No=So&&ho.match(/Version\/(\d*\.\d*)/);
-No&&(No=Number(No[1])),No&&No>=15&&(So=!1,Eo=!0);var Oo=Po&&(Co||So&&(null==No||12.11>No)),Io=vo||bo&&xo>=9,Lo=!1,Ro=!1;m.prototype=Ri({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Po&&!Do?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Pi,this.disableVert=new Pi},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),v.prototype=Ri({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":m,"null":v},w.prototype.signal=function(e,t){Ti(e,t)&&this.events.push(arguments)},w.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ps(o,"paste",function(e){Di(r,e)||Q(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Ps(o,"cut",t),Ps(o,"copy",t),Ps(e.scroller,"paste",function(t){qt(e,t)||Di(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Ps(e.lineSpace,"selectstart",function(t){qt(e,t)||_s(t)}),Ps(o,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ps(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=Ie(e);if(e.options.moveInputWithCursor){var i=dt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Hi(n.cursorDiv,e.cursors),Hi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=ra&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var s=t?"-":n||r.getSelection();this.textarea.value=s,r.state.focused&&Gs(this.textarea),bo&&xo>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",bo&&xo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!ko||qi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||na(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(bo&&xo>=9&&this.hasSelection===r||Po&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,r.length);s>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var a=this;return kt(e,function(){$(e,r.slice(o),n.length-o,null,a.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=a.prevInput="":a.prevInput=r,a.composing&&(a.composing.range.clear(),a.composing.range=e.markText(a.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&xo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=s.selectionStart){var e=i.somethingSelected(),t=""+(e?s.value:"");s.value="⇚",s.value=t,r.prevInput=e?"":"",s.selectionStart=1,s.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=p,s.style.cssText=c,bo&&9>xo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=u),null!=s.selectionStart){(!bo||bo&&9>xo)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&""==r.prevInput?Pt(i,cs.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,s=r.textarea,a=Kt(i,e),u=o.scroller.scrollTop;if(a&&!So){var l=i.options.resetSelectionOnContextMenu;l&&-1==i.doc.sel.contains(a)&&Pt(i,De)(i.doc,de(a),Rs);var c=s.style.cssText,p=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f=r.wrapper.getBoundingClientRect();if(s.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Eo)var d=window.scrollY;if(o.input.focus(),Eo&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(s.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),bo&&xo>=9&&t(),Io){ks(e);var h=function(){Ms(window,"mouseup",h),setTimeout(n,20)};Ps(window,"mouseup",h)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Ii,needsContentAttribute:!1},ne.prototype),ie.prototype=Ri({init:function(e){function t(e){if(!Di(r,e)){if(r.somethingSelected())Uo={lineWise:!1,text:r.getSelections()},"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Uo={lineWise:!0,text:t.text},"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Rs),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!To)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Uo.text.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Uo.text.join("\n");var o=document.activeElement;Gs(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,r=n.cm,i=n.div=e.lineDiv;te(i),Ps(i,"paste",function(e){Di(r,e)||Q(e,r)}),Ps(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),s=o.indexOf(t,Math.max(0,i.head.ch-t.length));s>-1&&s<=i.head.ch&&(n.composing.sel=de(Bo(i.head.line,s),Bo(i.head.line,s+t.length)))}}),Ps(i,"compositionupdate",function(e){n.composing.data=e.data}),Ps(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ps(i,"touchstart",function(){n.forceCompositionEnd()}),Ps(i,"input",function(){n.composing||!r.isReadOnly()&&n.pollContent()||kt(n.cm,function(){It(r)})}),Ps(i,"copy",t),Ps(i,"cut",t)},prepareSelection:function(){var e=Ie(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=ae(this.cm,e.anchorNode,e.anchorOffset),r=ae(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=jo(X(n,r),t.from())||0!=jo(Y(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var s=this.cm.display.view,a=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var u=s[s.length-1].measure,l=u.maps?u.maps[u.maps.length-1]:u.map;o={node:l[l.length-1],offset:l[l.length-2]-l[l.length-3]}}}else i={node:s[0].measure.map[2],offset:0};try{var c=Hs(i.node,i.offset,o.offset,o.node)}catch(p){}c&&(!vo&&this.cm.state.focused?(e.collapse(i.node,i.offset),c.collapsed||e.addRange(c)):(e.removeAllRanges(),e.addRange(c)),a&&null==e.anchorNode?e.addRange(a):vo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Hi(this.cm.display.cursorDiv,e.cursors),Hi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ys(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():kt(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=ae(t,e.anchorNode,e.anchorOffset),r=ae(t,e.focusNode,e.focusOffset);n&&r&&kt(t,function(){De(t.doc,de(n,r),Rs),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Bt(e,r.line)))var s=ti(t.view[0].line),a=t.view[0].node;else var s=ti(t.view[o].line),a=t.view[o-1].node.nextSibling;var u=Bt(e,i.line);if(u==t.view.length-1)var l=t.viewTo-1,c=t.lineDiv.lastChild;else var l=ti(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling;for(var p=e.doc.splitLines(le(e,a,c,s,l)),f=Qr(e.doc,Bo(s,0),Bo(l,$r(e.doc,l).text.length));p.length>1&&f.length>1;)if(Mi(p)==Mi(f))p.pop(),f.pop(),l--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),s++}for(var d=0,h=0,m=p[0],v=f[0],g=Math.min(m.length,v.length);g>d&&m.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=Mi(p),b=Mi(f),x=Math.min(y.length-(1==p.length?d:0),b.length-(1==f.length?d:0));x>h&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;p[p.length-1]=y.slice(0,y.length-h),p[0]=p[0].slice(d);var E=Bo(s,d),C=Bo(l,f.length?Mi(f).length-h:0);return p.length>1||p[0]||jo(E,C)?(Mn(e.doc,p,E,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Pt(this.cm,It)(this.cm):e.data&&e.data!=e.startData&&Pt(this.cm,$)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Pt(this.cm,$)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Ii,resetPosition:Ii,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&jo(e,r.to())<=0)return n}return-1}},pe.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return Y(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Vo,Wo,Go,Ho={left:0,right:0,top:0,bottom:0},qo=null,Ko=0,zo=0,Yo=0,Xo=null;bo?Xo=-.53:vo?Xo=15:Ao?Xo=-.7:wo&&(Xo=-1/3);var Jo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Jo(e);return t.x*=Xo,t.y*=Xo,t};var $o=new Pi,Qo=null,Zo=e.changeEnd=function(e){return e.text?Bo(e.from.line+e.text.length-1,Mi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,ts.hasOwnProperty(e)&&Pt(this,ts[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](zn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Un(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Bn(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;n>u;++u)Un(this,u,e);var l=this.doc.sel.ranges;0==o.ch&&t.length==l.length&&l[r].from().ch>0&&Ce(this.doc,r,new pe(o,l[r].to()),Rs)}}}),getTokenAt:function(e,t){return Mr(this,e,t)},getLineTokens:function(e,t){return Mr(this,Bo(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);var t,n=Ir(this,$r(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]a?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!as.hasOwnProperty(t))return n;var r=as[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=$r(this.doc,e)}else n=e;return ct(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:Ft(function(e,t,n){return Vn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Ui(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ft(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Lt(t,r,"gutter"),Ui(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ge(this.doc,e))return null;var t=e;if(e=$r(this.doc,e),!e)return null}else{var t=ti(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=dt(this,me(this.doc,e));var s=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var u=Math.max(o.wrapper.clientHeight,this.doc.height),l=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(s=e.bottom),a+t.offsetWidth>l&&(a=l-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&In(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Ft(fn),triggerOnKeyPress:Ft(mn),triggerOnKeyUp:hn,execCommand:function(e){return cs.hasOwnProperty(e)?cs[e].call(null,this):void 0},triggerElectric:Ft(function(e){Z(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,s=me(this.doc,e);t>o&&(s=Gn(this.doc,s,i,n,r),!s.hitSide);++o);return s},moveH:Ft(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Gn(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},js)}),deleteH:Ft(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Wn(this,function(n){var i=Gn(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var s=0,a=me(this.doc,e);t>s;++s){var u=dt(this,a,"div");if(null==o?o=u.left:u.left=o,a=Hn(this,u,i,n),a.hitSide)break}return a},moveV:Ft(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(s){if(o)return 0>e?s.from():s.to();var a=dt(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var u=Hn(n,a,e,t);return"page"==t&&s==r.sel.primary()&&Rn(n,null,ft(n,u,"div").top-a.top),u},js),i.length)for(var s=0;s0&&a(n.charAt(r-1));)--r;for(;i.5)&&s(this),Ns(this,"refresh",this)}),swapDoc:Ft(function(e){var t=this.doc;return t.cm=null,Jr(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Si(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ki(e);var es=e.defaults={},ts=e.optionHandlers={},ns=e.Init={toString:function(){return"CodeMirror.Init"}};qn("value","",function(e,t){e.setValue(t)},!0),qn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),qn("indentUnit",2,n,!0),qn("indentWithTabs",!1),qn("smartIndent",!0),qn("tabSize",4,function(e){r(e),at(e),It(e)},!0),qn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Bo(r,o))}r++});for(var i=n.length-1;i>=0;i--)Mn(e.doc,t,n[i],Bo(n[i].line,n[i].ch+t.length))}}),qn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),qn("specialCharPlaceholder",jr,function(e){e.refresh()},!0),qn("electricChars",!0),qn("inputStyle",ko?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),qn("rtlMoveVisually",!Mo),qn("wholeLineUpdateBefore",!0),qn("theme","default",function(e){a(e),u(e)},!0),qn("keyMap","default",function(t,n,r){var i=zn(n),o=r!=e.Init&&zn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),qn("extraKeys",null),qn("lineWrapping",!1,i,!0),qn("gutters",[],function(e){d(e.options),u(e)},!0),qn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?S(e.display)+"px":"0",e.refresh()},!0),qn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),qn("scrollbarStyle","native",function(e){g(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),qn("lineNumbers",!1,function(e){d(e.options),u(e)},!0),qn("firstLineNumber",1,u,!0),qn("lineNumberFormatter",function(e){return e},u,!0),qn("showCursorWhenSelecting",!1,Oe,!0),qn("resetSelectionOnContextMenu",!0),qn("lineWiseCopyCut",!0),qn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),qn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),qn("dragDrop",!0,Gt),qn("allowDropFileTypes",null),qn("cursorBlinkRate",530),qn("cursorScrollMargin",0),qn("cursorHeight",1,Oe,!0),qn("singleCursorHeightPerLine",!0,Oe,!0),qn("workTime",100),qn("workDelay",100),qn("flattenSpans",!0,r,!0),qn("addModeClass",!1,r,!0),qn("pollInterval",100),qn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),qn("historyEventDelay",1250),qn("viewportMargin",10,function(e){e.refresh()},!0),qn("maxHighlightLength",1e4,r,!0),qn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),qn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),qn("autofocus",null);var rs=e.modes={},is=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),rs[t]=n},e.defineMIME=function(e,t){is[e]=t},e.resolveMode=function(t){if("string"==typeof t&&is.hasOwnProperty(t))t=is[t];else if(t&&"string"==typeof t.name&&is.hasOwnProperty(t.name)){var n=is[t.name];"string"==typeof n&&(n={name:n}),t=Li(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=rs[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(os.hasOwnProperty(n.name)){var o=os[n.name];for(var s in o)o.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=o[s])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var s in n.modeProps)i[s]=n.modeProps[s];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var os=e.modeExtensions={};e.extendMode=function(e,t){var n=os.hasOwnProperty(e)?os[e]:os[e]={};Ri(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Ss.prototype[e]=t},e.defineOption=qn;var ss=[];e.defineInitHook=function(e){ss.push(e)};var as=e.helpers={};e.registerHelper=function(t,n,r){as.hasOwnProperty(t)||(as[t]=e[t]={_global:[]}),as[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),as[t]._global.push({pred:r,val:i})};var us=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},ls=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var cs=e.commands={selectAll:function(e){e.setSelection(Bo(e.firstLine(),0),Bo(e.lastLine()),Rs)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Rs)},killLine:function(e){Wn(e,function(t){if(t.empty()){var n=$r(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Bo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Bo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=$r(e.doc,i.line-1).text;s&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),Bo(i.line-1,s.length-1),Bo(i.line,1),"+transpose")}n.push(new pe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){kt(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}Bn(e)})},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},ps=e.keyMap={};ps.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ps.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ps.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ps.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ps["default"]=Po?ps.macDefault:ps.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Oi(n.split(" "),Kn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var vs=0,gs=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++vs};ki(gs),gs.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xt(e),Ti(this,"clear")){var n=this.find();n&&Si(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&It(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ke(e.doc)),e&&Si(e,"markerCleared",e,this),t&&Ct(e),this.parent&&this.parent.clear()}},gs.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Tr(i),Si(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Yr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof zr))){var a=[];this.collapse(a),this.children=[new zr(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var s=i.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var As=0,Ss=e.Doc=function(e,t,n,r){if(!(this instanceof Ss))return new Ss(e,t,n,r);null==n&&(n=0),Yr.call(this,[new zr([new xs("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Bo(n,0);this.sel=de(i),this.history=new oi(null),this.id=++As,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Kr(this,{from:i,to:i,text:e}),De(this,de(i),Rs)};Ss.prototype=Li(Yr.prototype,{constructor:Ss,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)Dn(this,r[o]);a?we(this,a):this.cm&&Bn(this.cm)}),undo:Mt(function(){Tn(this,"undo")}),redo:Mt(function(){Tn(this,"redo")}),undoSelection:Mt(function(){Tn(this,"undo",!0)}),redoSelection:Mt(function(){Tn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=me(this,e),t=me(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=u.to||null==u.from&&i!=e.line||null!=u.from&&i==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=o,void++n)}),me(this,Bo(n,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.toa||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}},Vs=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},Ws=[""],Gs=function(e){e.select()};To?Gs=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Gs=function(e){try{e.select()}catch(t){}});var Hs,qs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ks=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||qs.test(e))},zs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Hs=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ys=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};bo&&11>xo&&(qi=function(){try{return document.activeElement}catch(e){return document.body}});var Xs,Js,$s=e.rmClass=function(e,t){var n=e.className,r=Ki(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Qs=e.addClass=function(e,t){var n=e.className;Ki(t).test(n)||(e.className+=(n?" ":"")+t)},Zs=!1,ea=function(){if(bo&&9>xo)return!1;var e=Wi("div");return"draggable"in e||"dragDrop"in e}(),ta=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},na=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},ra=function(){var e=Wi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ia=null,oa=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)oa[e+48]=oa[e+96]=String(e);for(var e=65;90>=e;e++)oa[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)oa[e+111]=oa[e+63235]="F"+e}();var sa,aa=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,u=/[1n]/,l="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,p=[],f=0;c>f;++f)p.push(r=e(n.charCodeAt(f)));for(var f=0,d=l;c>f;++f){var r=p[f];"m"==r?p[f]=d:d=r}for(var f=0,h=l;c>f;++f){var r=p[f];"1"==r&&"r"==h?p[f]="n":s.test(r)&&(h=r,"r"==r&&(p[f]="R"))}for(var f=1,d=p[0];c-1>f;++f){var r=p[f];"+"==r&&"1"==d&&"1"==p[f+1]?p[f]="1":","!=r||d!=p[f+1]||"1"!=d&&"n"!=d||(p[f]=d),d=r}for(var f=0;c>f;++f){var r=p[f];if(","==r)p[f]="N";else if("%"==r){for(var m=f+1;c>m&&"%"==p[m];++m);for(var v=f&&"!"==p[f-1]||c>m&&"1"==p[m]?"1":"N",g=f;m>g;++g)p[g]=v;f=m-1}}for(var f=0,h=l;c>f;++f){var r=p[f];"L"==h&&"1"==r?p[f]="L":s.test(r)&&(h=r)}for(var f=0;c>f;++f)if(o.test(p[f])){for(var m=f+1;c>m&&o.test(p[m]);++m);for(var y="L"==(f?p[f-1]:l),b="L"==(c>m?p[m]:l),v=y||b?"L":"R",g=f;m>g;++g)p[g]=v;f=m-1}for(var x,E=[],f=0;c>f;)if(a.test(p[f])){var C=f;for(++f;c>f&&a.test(p[f]);++f);E.push(new t(0,C,f))}else{var A=f,S=E.length;for(++f;c>f&&"L"!=p[f];++f);for(var g=A;f>g;)if(u.test(p[g])){g>A&&E.splice(S,0,new t(1,A,g));var w=g;for(++g;f>g&&u.test(p[g]);++g);E.splice(S,0,new t(2,w,g)),A=g}else++g;f>A&&E.splice(S,0,new t(1,A,f))}return 1==E[0].level&&(x=n.match(/^\s+/))&&(E[0].from=x[0].length,E.unshift(new t(0,0,x[0].length))),1==Mi(E).level&&(x=n.match(/\s+$/))&&(Mi(E).to-=x[0].length,E.push(new t(0,c-x[0].length,c))),2==E[0].level&&E.unshift(new t(1,E[0].to,E[0].to)),E[0].level!=Mi(E).level&&E.push(new t(E[0].level,c,c)),E}}();return e.version="5.15.2",e})},function(e,t,n){!function(e){e(n(305),n(307),n(308))}(function(e){"use strict";function t(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}function n(r){return new t(e.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}e.defineMode("jsx",function(r,i){function o(e){var t=e.tagName;e.tagName=null;var n=l.indent(e,"");return e.tagName=t,n}function s(e,t){return t.context.mode==l?a(e,t,t.context):u(e,t,t.context)}function a(n,i,a){if(2==a.depth)return n.match(/^.*?\*\//)?a.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){l.skipAttribute(a.state);var u=o(a.state),p=a.state.context;if(p&&n.match(/^[^>]*>\s*$/,!1)){for(;p.prev&&!p.startOfLine;)p=p.prev;p.startOfLine?u-=r.indentUnit:a.prev.state.lexical&&(u=a.prev.state.lexical.indented)}else 1==a.depth&&(u+=r.indentUnit);return i.context=new t(e.startState(c,u),c,0,i.context),null}if(1==a.depth){if("<"==n.peek())return l.skipAttribute(a.state),i.context=new t(e.startState(l,o(a.state)),l,0,i.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return a.depth=2,s(n,i)}var f,d=l.token(n,a.state),h=n.current();return/\btag\b/.test(d)?/>$/.test(h)?a.state.context?a.depth=0:i.context=i.context.prev:/^-1&&n.backUp(h.length-f),d}function u(n,r,i){if("<"==n.peek()&&c.expressionAllowed(n,i.state))return c.skipExpression(i.state),r.context=new t(e.startState(l,c.indent(i.state,"")),l,0,r.context),null;var o=c.token(n,i.state);if(!o&&null!=i.depth){var s=n.current();"{"==s?i.depth++:"}"==s&&0==--i.depth&&(r.context=r.context.prev)}return o}var l=e.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1}),c=e.getMode(r,i&&i.base||"javascript");return{startState:function(){return{context:new t(e.startState(c),c)}},copyState:function(e){return{context:n(e.context)}},token:s,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}},"xml","javascript"),e.defineMIME("text/jsx","jsx")})},function(e,t,n){!function(e){e(n(305))}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{
-option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(u("atom","]]>")):null:e.match("--")?n(u("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(l(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=u("meta","?>"),"meta"):(D=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,D=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return D="equals",null;if("<"==n){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=a(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function u(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function l(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=l(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=l(e-1),n.tokenize(t,n)}}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(A.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function p(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!A.contextGrabbers.hasOwnProperty(n)||!A.contextGrabbers[n].hasOwnProperty(t))return;p(e)}}function d(e,t,n){return"openTag"==e?(n.tagStart=t.column(),h):"closeTag"==e?m:d}function h(e,t,n){return"word"==e?(n.tagName=t.current(),_="tag",y):(_="error",h)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&A.implicitlyClosed.hasOwnProperty(n.context.tagName)&&p(n),n.context&&n.context.tagName==r||A.matchClosing===!1?(_="tag",v):(_="tag error",g)}return _="error",g}function v(e,t,n){return"endTag"!=e?(_="error",v):(p(n),d)}function g(e,t,n){return _="error",v(e,t,n)}function y(e,t,n){if("word"==e)return _="attribute",b;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||A.autoSelfClosers.hasOwnProperty(r)?f(n,r):(f(n,r),n.context=new c(n,r,i==n.indented)),d}return _="error",y}function b(e,t,n){return"equals"==e?x:(A.allowMissing||(_="error"),y(e,t,n))}function x(e,t,n){return"string"==e?E:"word"==e&&A.allowUnquoted?(_="string",y):(_="error",y(e,t,n))}function E(e,t,n){return"string"==e?E:y(e,t,n)}var C=r.indentUnit,A={},S=i.htmlMode?t:n;for(var w in S)A[w]=S[w];for(var w in i)A[w]=i[w];var D,_;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;D=null;var n=t.tokenize(e,t);return(n||D)&&"comment"!=n&&(_=null,t.state=t.state(D||n,e,t),_&&(n="error"==_?n+" error":_)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+C;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return A.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+C*(A.multilineTagIndentFactor||1);if(A.alignCDATA&&/$/,blockCommentStart:"",configuration:A.htmlMode?"html":"xml",helperType:A.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(e,t,n){!function(e){e(n(305))}(function(e){"use strict";function t(e,t,n){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,r){function i(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function o(e,t,n){return Ee=e,Ce=n,t}function s(e,n){var r=e.next();if('"'==r||"'"==r)return n.tokenize=a(r),n.tokenize(e,n);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(n.tokenize=u,u(e,n)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,n,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Pe),o("operator","operator",e.current()));if("`"==r)return n.tokenize=l,l(e,n);if("#"==r)return e.skipToEnd(),o("error","error");if(Pe.test(r))return e.eatWhile(Pe),o("operator","operator",e.current());if(Te.test(r)){e.eatWhile(Te);var s=e.current(),c=ke.propertyIsEnumerable(s)&&ke[s];return c&&"."!=n.lastType?o(c.type,c.style,s):o("variable","variable",s)}}function a(e){return function(t,n){var r,i=!1;if(we&&"@"==t.peek()&&t.match(Fe))return n.tokenize=s,o("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=s),o("string","string")}}function u(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=s;break}r="*"==n}return o("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=s;break}r=!r&&"\\"==n}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),a=Me.indexOf(s);if(a>=0&&3>a){if(!r){++o;break}if(0==--r)break}else if(a>=3&&6>a)++r;else if(Te.test(s))i=!0;else{if(/["'\/]/.test(s))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function p(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(Oe.state=e,Oe.stream=i,Oe.marked=null,Oe.cc=o,Oe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=o.length?o.pop():De?A:C;if(s(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Oe.marked?Oe.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)Oe.cc.push(arguments[e])}function m(){return h.apply(null,arguments),!0}function v(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=Oe.state;if(Oe.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(){Oe.state.context={prev:Oe.state.context,vars:Oe.state.localVars},Oe.state.localVars=Ie}function y(){Oe.state.localVars=Oe.state.context.vars,Oe.state.context=Oe.state.context.prev}function b(e,t){var n=function(){var n=Oe.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new p(r,Oe.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function x(){var e=Oe.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function E(e){function t(n){return n==e?m():";"==e?h():m(t)}return t}function C(e,t){return"var"==e?m(b("vardef",t.length),X,E(";"),x):"keyword a"==e?m(b("form"),A,C,x):"keyword b"==e?m(b("form"),C,x):"{"==e?m(b("}"),H,x):";"==e?m():"if"==e?("else"==Oe.state.lexical.info&&Oe.state.cc[Oe.state.cc.length-1]==x&&Oe.state.cc.pop()(),m(b("form"),A,C,x,ee)):"function"==e?m(se):"for"==e?m(b("form"),te,C,x):"variable"==e?m(b("stat"),R):"switch"==e?m(b("form"),A,b("}","switch"),E("{"),H,x,x):"case"==e?m(A,E(":")):"default"==e?m(E(":")):"catch"==e?m(b("form"),g,E("("),ae,E(")"),C,x,y):"class"==e?m(b("form"),ue,x):"export"==e?m(b("stat"),fe,x):"import"==e?m(b("stat"),de,x):"module"==e?m(b("form"),J,b("}"),E("{"),H,x,x):"async"==e?m(C):h(b("stat"),A,E(";"),x)}function A(e){return w(e,!1)}function S(e){return w(e,!0)}function w(e,t){if(Oe.state.fatArrowAt==Oe.stream.start){var n=t?N:M;if("("==e)return m(g,b(")"),W(J,")"),x,E("=>"),n,y);if("variable"==e)return h(g,J,E("=>"),n,y)}var r=t?k:T;return Ne.hasOwnProperty(e)?m(r):"function"==e?m(se,r):"keyword c"==e?m(t?_:D):"("==e?m(b(")"),D,be,E(")"),x,r):"operator"==e||"spread"==e?m(t?S:A):"["==e?m(b("]"),ge,x,r):"{"==e?G(j,"}",null,r):"quasi"==e?h(P,r):"new"==e?m(O(t)):m()}function D(e){return e.match(/[;\}\)\],]/)?h():h(A)}function _(e){return e.match(/[;\}\)\],]/)?h():h(S)}function T(e,t){return","==e?m(A):k(e,t,!1)}function k(e,t,n){var r=0==n?T:k,i=0==n?A:S;return"=>"==e?m(g,n?N:M,y):"operator"==e?/\+\+|--/.test(t)?m(r):"?"==t?m(A,E(":"),i):m(i):"quasi"==e?h(P,r):";"!=e?"("==e?G(S,")","call",r):"."==e?m(B,r):"["==e?m(b("]"),D,E("]"),x,r):void 0:void 0}function P(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?m(P):m(A,F)}function F(e){return"}"==e?(Oe.marked="string-2",Oe.state.tokenize=l,m(P)):void 0}function M(e){return c(Oe.stream,Oe.state),h("{"==e?C:A)}function N(e){return c(Oe.stream,Oe.state),h("{"==e?C:S)}function O(e){return function(t){return"."==t?m(e?L:I):h(e?S:A)}}function I(e,t){return"target"==t?(Oe.marked="keyword",m(T)):void 0}function L(e,t){return"target"==t?(Oe.marked="keyword",m(k)):void 0}function R(e){return":"==e?m(x,C):h(T,E(";"),x)}function B(e){return"variable"==e?(Oe.marked="property",m()):void 0}function j(e,t){return"variable"==e||"keyword"==Oe.style?(Oe.marked="property",m("get"==t||"set"==t?U:V)):"number"==e||"string"==e?(Oe.marked=we?"property":Oe.style+" property",m(V)):"jsonld-keyword"==e?m(V):"modifier"==e?m(j):"["==e?m(A,E("]"),V):"spread"==e?m(A):void 0}function U(e){return"variable"!=e?h(V):(Oe.marked="property",m(se))}function V(e){return":"==e?m(S):"("==e?h(se):void 0}function W(e,t){function n(r,i){if(","==r){var o=Oe.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),m(e,n)}return r==t||i==t?m():m(E(t))}return function(r,i){return r==t||i==t?m():h(e,n)}}function G(e,t,n){for(var r=3;r"),Y):"["==e?m(E("]"),Y):void 0}function X(){return h(J,q,Q,Z)}function J(e,t){return"modifier"==e?m(J):"variable"==e?(v(t),m()):"spread"==e?m(J):"["==e?G(J,"]"):"{"==e?G($,"}"):void 0}function $(e,t){return"variable"!=e||Oe.stream.match(/^\s*:/,!1)?("variable"==e&&(Oe.marked="property"),"spread"==e?m(J):"}"==e?h():m(E(":"),J,Q)):(v(t),m(Q))}function Q(e,t){return"="==t?m(S):void 0}function Z(e){return","==e?m(X):void 0}function ee(e,t){return"keyword b"==e&&"else"==t?m(b("form","else"),C,x):void 0}function te(e){return"("==e?m(b(")"),ne,E(")"),x):void 0}function ne(e){return"var"==e?m(X,E(";"),ie):";"==e?m(ie):"variable"==e?m(re):h(A,E(";"),ie)}function re(e,t){return"in"==t||"of"==t?(Oe.marked="keyword",m(A)):m(T,ie)}function ie(e,t){return";"==e?m(oe):"in"==t||"of"==t?(Oe.marked="keyword",m(A)):h(A,E(";"),oe)}function oe(e){")"!=e&&m(A)}function se(e,t){return"*"==t?(Oe.marked="keyword",m(se)):"variable"==e?(v(t),m(se)):"("==e?m(g,b(")"),W(ae,")"),x,q,C,y):void 0}function ae(e){return"spread"==e?m(ae):h(J,q,K)}function ue(e,t){return"variable"==e?(v(t),m(le)):void 0}function le(e,t){return"extends"==t?m(A,le):"{"==e?m(b("}"),ce,x):void 0}function ce(e,t){return"variable"==e||"keyword"==Oe.style?"static"==t?(Oe.marked="keyword",m(ce)):(Oe.marked="property","get"==t||"set"==t?m(pe,se,ce):m(se,ce)):"*"==t?(Oe.marked="keyword",m(ce)):";"==e?m(ce):"}"==e?m():void 0}function pe(e){return"variable"!=e?h():(Oe.marked="property",m())}function fe(e,t){return"*"==t?(Oe.marked="keyword",m(ve,E(";"))):"default"==t?(Oe.marked="keyword",m(A,E(";"))):h(C)}function de(e){return"string"==e?m():h(he,ve)}function he(e,t){return"{"==e?G(he,"}"):("variable"==e&&v(t),"*"==t&&(Oe.marked="keyword"),m(me))}function me(e,t){return"as"==t?(Oe.marked="keyword",m(he)):void 0}function ve(e,t){return"from"==t?(Oe.marked="keyword",m(A)):void 0}function ge(e){return"]"==e?m():h(S,ye)}function ye(e){return"for"==e?h(be,E("]")):","==e?m(W(_,"]")):h(W(S,"]"))}function be(e){return"for"==e?m(te,be):"if"==e?m(A,be):void 0}function xe(e,t){return"operator"==e.lastType||","==e.lastType||Pe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Ee,Ce,Ae=n.indentUnit,Se=r.statementIndent,we=r.jsonld,De=r.json||we,_e=r.typescript,Te=r.wordCharacters||/[\w$\xa1-\uffff]/,ke=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},s={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":e("new"),"delete":r,"throw":r,"debugger":r,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":r,"export":e("export"),"import":e("import"),"extends":r,await:r,async:e("async")};if(_e){var a={type:"variable",style:"variable-3"},u={"interface":e("class"),"implements":r,namespace:r,module:e("module"),"enum":e("module"),"public":e("modifier"),"private":e("modifier"),"protected":e("modifier"),"abstract":e("modifier"),as:i,string:a,number:a,"boolean":a,any:a};for(var l in u)s[l]=u[l]}return s}(),Pe=/[+\-*&%=<>!?|~^]/,Fe=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Me="([{}])",Ne={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Oe={state:null,column:null,marked:null,cc:null},Ie={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:s,lastType:"sof",cc:[],lexical:new p((e||0)-Ae,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=u&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==Ee?n:(t.lastType="operator"!=Ee||"++"!=Ce&&"--"!=Ce?Ee:"incdec",d(t,n,Ee,Ce,e))},indent:function(t,n){if(t.tokenize==u)return e.Pass;if(t.tokenize!=s)return 0;var i=n&&n.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(n))for(var a=t.cc.length-1;a>=0;--a){var l=t.cc[a];if(l==x)o=o.prev;else if(l!=ee)break}"stat"==o.type&&"}"==i&&(o=o.prev),Se&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var c=o.type,p=i==c;return"vardef"==c?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==c&&"{"==i?o.indented:"form"==c?o.indented+Ae:"stat"==c?o.indented+(xe(t,n)?Se||Ae:0):"switch"!=o.info||p||0==r.doubleIndentSwitch?o.align?o.column+(p?0:1):o.indented+(p?0:Ae):o.indented+(/^(?:case|default)\b/.test(n)?Ae:2*Ae)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:De?null:"/*",blockCommentEnd:De?null:"*/",lineComment:De?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:De?"json":"javascript",jsonldMode:we,jsonMode:De,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=A&&t!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=__webpack_require__(300),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(310),_reactDom2=_interopRequireDefault(_reactDom),_server=__webpack_require__(311),_server2=_interopRequireDefault(_server),_babelStandalone=__webpack_require__(465),Preview=_react2["default"].createClass({displayName:"Preview",propTypes:{code:_react2["default"].PropTypes.string.isRequired,scope:_react2["default"].PropTypes.object.isRequired,previewComponent:_react2["default"].PropTypes.node,noRender:_react2["default"].PropTypes.bool,context:_react2["default"].PropTypes.object},getInitialState:function(){return{error:null}},getDefaultProps:function(){return{previewComponent:"div"}},componentDidMount:function(){this._executeCode()},componentDidUpdate:function(e){clearTimeout(this.timeoutID),this.props.code!==e.code&&this._executeCode()},_compileCode:function(){if(this.props.noRender){var e=function(e){var t=Object.keys(e).map(function(e){return e+": React.PropTypes.any.isRequired"});return"{ "+t.join(", ")+" }"};return(0,_babelStandalone.transform)("\n (function ("+Object.keys(this.props.scope).join(", ")+", mountNode) {\n return React.createClass({\n // childContextTypes: { test: React.PropTypes.string },\n childContextTypes: "+e(this.props.context)+",\n getChildContext: function () { return "+JSON.stringify(this.props.context)+"; },\n render: function () {\n return (\n "+this.props.code+"\n );\n }\n });\n });\n ",{presets:["es2015","react","stage-1"]}).code}return(0,_babelStandalone.transform)("\n (function ("+Object.keys(this.props.scope).join(",")+", mountNode) {\n "+this.props.code+"\n });\n ",{presets:["es2015","react","stage-1"]}).code},_setTimeout:function(){clearTimeout(this.timeoutID),this.timeoutID=setTimeout.apply(null,arguments)},_executeCode:function _executeCode(){var _this=this,mountNode=this.refs.mount;try{var scope=[];for(var s in this.props.scope)this.props.scope.hasOwnProperty(s)&&scope.push(this.props.scope[s]);scope.push(mountNode);var compiledCode=this._compileCode();if(this.props.noRender){var Component=_react2["default"].createElement(eval(compiledCode).apply(null,scope));_server2["default"].renderToString(_react2["default"].createElement(this.props.previewComponent,{},Component)),_reactDom2["default"].render(_react2["default"].createElement(this.props.previewComponent,{},Component),mountNode)}else eval(compiledCode).apply(null,scope);this.setState({error:null})}catch(err){this._setTimeout(function(){_this.setState({error:err.toString()})},500)}},render:function(){return _react2["default"].createElement("div",null,null!==this.state.error?_react2["default"].createElement("div",{className:"playgroundError"},this.state.error):null,_react2["default"].createElement("div",{ref:"mount",className:"previewArea"}))}});exports["default"]=Preview},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE_310__},function(e,t,n){"use strict";e.exports=n(312)},function(e,t,n){"use strict";var r=n(313),i=n(459),o=n(464);r.inject();var s={renderToString:i.renderToString,renderToStaticMarkup:i.renderToStaticMarkup,version:o};e.exports=s},function(e,t,n){"use strict";function r(){C||(C=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(d),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:a,ChangeEventPlugin:o,SelectEventPlugin:x,BeforeInputEventPlugin:i}),g.NativeComponent.injectGenericComponentClass(c),g.NativeComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(u),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(m),g.Component.injectEnvironment(l))}var i=n(314),o=n(336),s=n(354),a=n(355),u=n(360),l=n(361),c=n(375),p=n(337),f=n(427),d=n(428),h=n(429),m=n(430),v=n(431),g=n(434),y=n(438),b=n(446),x=n(447),E=n(448),C=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function i(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function o(e){switch(e){case T.topCompositionStart:return k.compositionStart;case T.topCompositionEnd:return k.compositionEnd;case T.topCompositionUpdate:return k.compositionUpdate}}function s(e,t){return e===T.topKeyDown&&t.keyCode===E}function a(e,t){switch(e){case T.topKeyUp:return-1!==x.indexOf(t.keyCode);case T.topKeyDown:return t.keyCode!==E;case T.topKeyPress:case T.topMouseDown:case T.topBlur:return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function l(e,t,n,r){var i,l;if(C?i=o(e):F?a(e,n)&&(i=k.compositionEnd):s(e,n)&&(i=k.compositionStart),!i)return null;w&&(F||i!==k.compositionStart?i===k.compositionEnd&&F&&(l=F.getData()):F=v.getPooled(r));var c=g.getPooled(i,t,n,r);if(l)c.data=l;else{var p=u(n);null!==p&&(c.data=p)}return h.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case T.topCompositionEnd:return u(t);case T.topKeyPress:var n=t.which;return n!==D?null:(P=!0,_);case T.topTextInput:var r=t.data;return r===_&&P?null:r;default:return null}}function p(e,t){if(F){if(e===T.topCompositionEnd||a(e,t)){var n=F.getData();return v.release(F),F=null,n}return null}switch(e){case T.topPaste:return null;case T.topKeyPress:return t.which&&!i(t)?String.fromCharCode(t.which):null;case T.topCompositionEnd:return w?null:t.data;default:return null}}function f(e,t,n,r){var i;if(i=S?c(e,n):p(e,n),!i)return null;var o=y.getPooled(k.beforeInput,t,n,r);return o.data=i,h.accumulateTwoPhaseDispatches(o),o}var d=n(315),h=n(318),m=n(327),v=n(328),g=n(332),y=n(334),b=n(335),x=[9,13,27,32],E=229,C=m.canUseDOM&&"CompositionEvent"in window,A=null;m.canUseDOM&&"documentMode"in document&&(A=document.documentMode);var S=m.canUseDOM&&"TextEvent"in window&&!A&&!r(),w=m.canUseDOM&&(!C||A&&A>8&&11>=A),D=32,_=String.fromCharCode(D),T=d.topLevelTypes,k={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},P=!1,F=null,M={eventTypes:k,extractEvents:function(e,t,n,r){return[l(e,t,n,r),f(e,t,n,r)]}};e.exports=M},function(e,t,n){"use strict";var r=n(316),i=r({bubbled:null,captured:null}),o=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),s={topLevelTypes:o,PropagationPhases:i};e.exports=s},function(e,t,n){"use strict";var r=n(317),i=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r,i,o,s,a){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,s,a],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return b(e,r)}function i(e,t,n){var i=t?y.bubbled:y.captured,o=r(e,n,i);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&m.traverseTwoPhase(e._targetInst,i,e)}function s(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?m.getParentInstance(t):null;m.traverseTwoPhase(n,i,e)}}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=b(e,r);i&&(n._dispatchListeners=v(n._dispatchListeners,i),n._dispatchInstances=v(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&a(e._targetInst,null,e)}function l(e){g(e,o)}function c(e){g(e,s)}function p(e,t,n,r){m.traverseEnterLeave(n,r,a,e,t)}function f(e){g(e,u)}var d=n(315),h=n(319),m=n(321),v=n(325),g=n(326),y=(n(323),d.PropagationPhases),b=h.getListener,x={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=x},function(e,t,n){"use strict";var r=n(320),i=n(321),o=n(322),s=n(325),a=n(326),u=n(317),l={},c=null,p=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return p(e,!0)},d=function(e){return p(e,!1)},h={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?u(!1):void 0;var i=l[t]||(l[t]={});i[e._rootNodeID]=n;var o=r.registrationNameModules[t];o&&o.didPutListener&&o.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var i=l[t];i&&delete i[e._rootNodeID]},deleteAllListeners:function(e){for(var t in l)if(l[t][e._rootNodeID]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e._rootNodeID]}},extractEvents:function(e,t,n,i){for(var o,a=r.plugins,u=0;u-1?void 0:s(!1),!l.plugins[n]){t.extractEvents?void 0:s(!1),l.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:s(!1)}}}function i(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?s(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];o(a,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){l.registrationNameModules[e]?s(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var s=n(317),a=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){a?s(!1):void 0,a=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]?s(!1):void 0,u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=l},function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function i(e){return e===y.topMouseMove||e===y.topTouchMove}function o(e){return e===y.topMouseDown||e===y.topTouchStart}function s(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(i,n,e):m.invokeGuardedCallback(i,n,e),e.currentTarget=null}function a(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;ie&&n[e]===i[e];e++);var s=r-e;for(t=1;s>=t&&n[r-t]===i[o-t];t++);var a=t>1?1-t:void 0;return this._fallbackText=i.slice(e,a),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;10>n;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(o){return!1}}var i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,s,a=n(e),u=1;u8));var L=!1;E.canUseDOM&&(L=D("input")&&(!("documentMode"in document)||document.documentMode>11));var R={get:function(){return O.get.call(this)},set:function(e){N=""+e,O.set.call(this,e)}},B={eventTypes:P,extractEvents:function(e,t,n,i){var o,s,a=t?C.getNodeFromInstance(t):window;if(r(a)?I?o=u:s=l:_(a)?L?o=d:(o=m,s=h):v(a)&&(o=g),o){var c=o(e,t);if(c){var p=S.getPooled(P.change,c,n,i);return p.type="change",x.accumulateTwoPhaseDispatches(p),p}}s&&s(e,a,t)}};e.exports=B},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function i(e,t){var n=r(e);n._nativeNode=t,t[m]=n}function o(e){var t=e._nativeNode;t&&(delete t[m],e._nativeNode=null)}function s(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,o=t.firstChild;e:for(var s in n)if(n.hasOwnProperty(s)){var a=n[s],u=r(a)._domID;if(null!=u){for(;null!==o;o=o.nextSibling)if(1===o.nodeType&&o.getAttribute(d)===String(u)||8===o.nodeType&&o.nodeValue===" react-text: "+u+" "||8===o.nodeType&&o.nodeValue===" react-empty: "+u+" "){i(a,o);continue e}f(!1)}}e._flags|=h.hasCachedChildNodes}}function a(e){if(e[m])return e[m];for(var t=[];!e[m];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[m]);e=t.pop())n=r,t.length&&s(r,e);return n}function u(e){var t=a(e);return null!=t&&t._nativeNode===e?t:null}function l(e){if(void 0===e._nativeNode?f(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:f(!1),e=e._nativeParent;for(;t.length;e=t.pop())s(e,e._nativeNode);return e._nativeNode}var c=n(338),p=n(339),f=n(317),d=c.ID_ATTRIBUTE_NAME,h=p,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:a,getInstanceFromNode:u,getNodeFromInstance:l,precacheChildNodes:s,precacheNode:i,uncacheNode:o};e.exports=v},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(317),o={MUST_USE_PROPERTY:1,HAS_SIDE_EFFECTS:2,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},s=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&a._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){a.properties.hasOwnProperty(p)?i(!1):void 0;var f=p.toLowerCase(),d=n[p],h={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasSideEffects:r(d,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(!h.mustUseProperty&&h.hasSideEffects?i(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:i(!1),u.hasOwnProperty(p)){var m=u[p];h.attributeName=m}s.hasOwnProperty(p)&&(h.attributeNamespace=s[p]),l.hasOwnProperty(p)&&(h.propertyName=l[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),a.properties[p]=h}}},s=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",a={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:s,ATTRIBUTE_NAME_CHAR:s+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;tn;n++){var r=g[n],i=r._pendingCallbacks;r._pendingCallbacks=null;var o;if(d.logTopLevelRenders){var a=r;r._currentElement.props===r._renderedComponent._currentElement&&(a=r._renderedComponent),o="React update: "+a.getName(),console.time(o)}if(h.performUpdateIfNecessary(r,e.reconcileTransaction,y),o&&console.timeEnd(o),i)for(var u=0;u=t||n<0||w&&r>=g}function p(){var e=n();return c(e)?f(e):void(x=setTimeout(p,o(e)))}function f(e){return x=void 0,T&&y?i(e):(y=m=void 0,b)}function d(){void 0!==x&&clearTimeout(x),S=0,y=_=m=x=void 0}function h(){return void 0===x?b:f(n())}function v(){var e=n(),r=c(e);if(y=arguments,m=this,_=e,r){if(void 0===x)return s(_);if(w)return x=setTimeout(p,t),i(_)}return void 0===x&&(x=setTimeout(p,t)),b}var y,m,g,b,x,_,S=0,C=!1,w=!1,T=!0;if("function"!=typeof e)throw new TypeError(l);return t=u(t)||0,a(r)&&(C=!!r.leading,w="maxWait"in r,g=w?E(u(r.maxWait)||0,t):g,T="trailing"in r?!!r.trailing:T),v.cancel=d,v.flush=h,v}function i(e){var t=a(e)?x.call(e):"";return t==p||t==f}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==typeof e}function o(e){return"symbol"==typeof e||s(e)&&x.call(e)==d}function u(e){if("number"==typeof e)return e;if(o(e))return c;if(a(e)){var t=i(e.valueOf)?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(h,"");var n=y.test(e);return n||m.test(e)?g(e.slice(2),n?2:8):v.test(e)?c:+e}var l="Expected a function",c=NaN,p="[object Function]",f="[object GeneratorFunction]",d="[object Symbol]",h=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt,b=Object.prototype,x=b.toString,E=Math.max,A=Math.min;e.exports=r},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Bi(r):{},Bi(es,r,!1),d(r);var i=r.value;"string"==typeof i&&(i=new Ss(i,r.mode,null,r.lineSeparator)),this.doc=i;var a=new e.inputStyles[r.inputStyle](this),s=this.display=new t(n,i,a);s.wrapper.CodeMirror=this,l(this),o(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!Pa&&s.input.focus(),m(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Oi,keySeq:null,specialChars:null};var u=this;ba&&xa<11&&setTimeout(function(){u.display.input.reset(!0)},20),Yt(this),Ji(),Et(this),this.curOp.forceUpdate=!0,$r(this,i),r.autofocus&&!Pa||u.hasFocus()?setTimeout(ji(gn,this),20):bn(this);for(var c in ts)ts.hasOwnProperty(c)&&ts[c](this,r[c],ns);A(this),r.finishInit&&r.finishInit(this);for(var p=0;pt.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function d(e){var t=Ii(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ge(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+He(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function v(e,t,n){this.cm=n;var r=this.vert=Yi("div",[Yi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Yi("div",[Yi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ds(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ds(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ba&&xa<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function y(){}function m(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&$s(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ds(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?sn(t,e):an(t,e)},t),t.display.scrollbars.addClass&&Qs(t.display.wrapper,t.display.scrollbars.addClass)}function g(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&O(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function x(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ye(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,a=ri(t,r),s=ri(t,i);if(n&&n.ensure){var o=n.ensure.from.line,u=n.ensure.to.line;o=s&&(a=ri(t,ii(Qr(t,u))-e.wrapper.clientHeight),s=u)}return{from:a,to:Math.max(s,a+1)}}function E(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=S(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Wt(e))return!1;A(e)&&(Bt(e),t.dims=F(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),La&&(a=Er(e.doc,a),s=Ar(e.doc,s));var o=a!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Vt(e,a,s),n.viewOffset=ii(Qr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Wt(e);if(!o&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=Hi();return u>4&&(n.lineDiv.style.display="none"),I(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,l&&Hi()!=l&&l.offsetHeight&&l.focus(),Gi(n.cursorDiv),Gi(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,o&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,je(e,400)),n.updateLineNumbers=null,!0}function k(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=qe(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Ge(e.display)-ze(e),n.top)}),t.visible=x(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&T(e,t);r=!1){O(e);var i=h(e);Ie(e),g(e,i),D(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function P(e,t){var n=new C(e,t);if(T(e,n)){O(e),k(e,n);var r=h(e);Ie(e),g(e,r),D(e,r),n.finish()}}function D(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+He(e)+"px"}function O(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.001||u<-.001)&&(ti(a.line,i),N(a.line),a.rest))for(var l=0;l-1&&(f=!1),M(e,p,l,n)),f&&(Gi(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(_(e.options,l)))),o=p.node.nextSibling}else{var d=Y(e,p,l,n);s.insertBefore(d,o)}l+=p.size}for(;o;)o=r(o)}function M(e,t,n,r){for(var i=0;i1)if(Ua&&Ua.text.join("\n")==t){if(r.ranges.length%Ua.text.length==0){u=[];for(var l=0;l=0;l--){var c=r.ranges[l],p=c.from(),f=c.to();c.empty()&&(n&&n>0?p=Ba(p.line,p.ch-n):e.state.overwrite&&!s?f=Ba(f.line,Math.min(Qr(a,f.line).text.length,f.ch+Fi(o).length)):Ua&&Ua.lineWise&&Ua.text.join("\n")==t&&(p=f=Ba(p.line,0)));var d=e.curOp.updateInput,h={from:p,to:f,text:u?u[l%u.length]:o,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};Tn(e.doc,h),Ci(e,"inputRead",e,h)}t&&!s&&Z(e,t),jn(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Q(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Dt(t,function(){$(t,n,0,null,"paste")}),!0}function Z(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),s=!1;if(a.electricChars){for(var o=0;o-1){s=Vn(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Qr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Vn(e,i.head.line,"smart"));s&&Ci(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;r=0){var s=X(a.from(),i.from()),o=z(a.to(),i.to()),u=a.empty()?i.from()==i.head:a.from()==a.head;r<=t&&--t,e.splice(--r,2,new pe(u?o:s,u?s:o))}}return new ce(e,t)}function de(e,t){return new ce([new pe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ve(e,t){if(t.linen?Ba(n,Qr(e,n).text.length):ye(t,Qr(e,t.line).text.length)}function ye(e,t){var n=e.ch;return null==n||n>t?Ba(e.line,t):n<0?Ba(e.line,0):e}function me(e,t){return t>=e.first&&t=t.ch:o.to>t.ch))){if(i&&(Fs(u,"beforeCursorEnter"),u.explicitlyCleared)){if(a.markedSpans){--s;continue}break}if(!u.atomic)continue;if(n){var l,c=u.find(r<0?1:-1);if((r<0?u.inclusiveRight:u.inclusiveLeft)&&(c=Fe(e,c,-r,c&&c.line==t.line?a:null)),c&&c.line==t.line&&(l=ja(c,n))&&(r<0?l<0:l>0))return Oe(e,c,t,r,i)}var p=u.find(r<0?-1:1);return(r<0?u.inclusiveLeft:u.inclusiveRight)&&(p=Fe(e,p,r,p.line==t.line?a:null)),p?Oe(e,p,t,r,i):null}}return t}function Ne(e,t,n,r,i){var a=r||1,s=Oe(e,t,n,a,i)||!i&&Oe(e,t,n,a,!0)||Oe(e,t,n,-a,i)||!i&&Oe(e,t,n,-a,!0);return s?s:(e.cantEdit=!0,Ba(e.first,0))}function Fe(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ve(e,Ba(t.line-1)):null:n>0&&t.ch==(r||Qr(e,t.line)).text.length?t.line=e.display.viewTo||o.to().line3&&(r(d,v.top,null,v.bottom),d=l,v.bottomu.bottom||p.bottom==u.bottom&&p.right>u.right)&&(u=p),d0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function je(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=us(t.mode,We(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(t.frontier>=e.display.viewFrom){var s=a.styles,o=a.text.length>e.options.maxHighlightLength,u=Mr(e,a,o?us(t.mode,r):r,!0);a.styles=u.styles;var l=a.styleClasses,c=u.classes;c?a.styleClasses=c:l&&(a.styleClasses=null);for(var p=!s||s.length!=a.styles.length||l!=c&&(!l||!c||l.bgClass!=c.bgClass||l.textClass!=c.textClass),f=0;!p&&fn)return je(e,e.options.workDelay),!0}),i.length&&Dt(e,function(){for(var t=0;ts;--o){if(o<=a.first)return a.first;var u=Qr(a,o-1);if(u.stateAfter&&(!n||o<=a.frontier))return o;var l=Us(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=o-1,r=l)}return i}function We(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var a=Ve(e,t,n),s=a>r.first&&Qr(r,a-1).stateAfter;return s=s?us(r.mode,s):ls(r.mode),r.iter(a,t,function(n){Lr(e,n.text,s);var o=a==t-1||a%5==0||a>=i.viewFrom&&a2&&a.push((u.bottom+l.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Je(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function $e(e,t){t=br(t);var n=ni(t),r=e.display.externalMeasured=new It(e.doc,t,n);r.lineN=n;var i=r.built=jr(e,r);return r.text=i.pre,Ki(e.display.lineMeasure,i.pre),r}function Qe(e,t,n,r){return tt(e,et(e,t),n,r)}function Ze(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(a=l-u,i=a-1,t>=l&&(s="right")),null!=i){if(r=e[o+2],u==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;o&&e[o-2]==e[o-3]&&e[o-1].insertLeft;)r=e[(o-=3)+2],s="left";if("right"==n&&i==l-u)for(;o=0&&(n=e[r]).left==n.right;r--);return n}function it(e,t,n,r){var i,a=nt(t.map,n,r),s=a.node,o=a.start,u=a.end,l=a.collapse;if(3==s.nodeType){for(var c=0;c<4;c++){for(;o&&Wi(t.line.text.charAt(a.coverStart+o));)--o;for(;a.coverStart+u0&&(l=r="right");var p;i=e.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==r?p.length-1:0]:s.getBoundingClientRect()}if(ba&&xa<9&&!o&&(!i||!i.left&&!i.right)){var f=s.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+xt(e.display),top:f.top,bottom:f.bottom}:Ga}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,v=(d+h)/2,y=t.view.measure.heights,c=0;cn.from?s(e-1):s(e,r)}r=r||Qr(e.doc,t.line),i||(i=et(e,r));var u=ai(r),l=t.ch;if(!u)return s(l);var c=ca(u,l),p=o(l,c);return null!=so&&(p.other=o(l,so)),p}function vt(e,t){var n=0,t=ve(e.doc,t);e.options.lineWrapping||(n=xt(e.display)*t.ch);var r=Qr(e.doc,t.line),i=ii(r)+Ye(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function yt(e,t,n,r){var i=Ba(e,t);return i.xRel=r,n&&(i.outside=!0),i}function mt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return yt(r.first,0,!0,-1);var i=ri(r,n),a=r.first+r.size-1;if(i>a)return yt(r.first+r.size-1,Qr(r,a).text.length,!0,1);t<0&&(t=0);for(var s=Qr(r,i);;){var o=gt(e,s,i,t,n),u=mr(s),l=u&&u.find(0,!0);if(!u||!(o.ch>l.from.ch||o.ch==l.from.ch&&o.xRel>0))return o;i=ni(s=l.to.line)}}function gt(e,t,n,r,i){function a(r){var i=ht(e,Ba(n,r),"line",t,l);return o=!0,s>i.bottom?i.left-u:sy)return yt(n,d,m,1);for(;;){if(c?d==f||d==fa(t,f,1):d-f<=1){var g=r0&&g1){var E=tt(e,l,g,"right");s<=E.bottom&&s>=E.top&&Math.abs(r-E.right)1?1:0);return A}var _=Math.ceil(p/2),S=f+_;if(c){S=f;for(var C=0;C<_;++C)S=fa(t,S,1)}var w=a(S);w>r?(d=S,y=w,(m=o)&&(y+=1e3),p=_):(f=S,h=w,v=o,p-=_)}}function bt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Va){Va=Yi("pre");for(var t=0;t<49;++t)Va.appendChild(document.createTextNode("x")),Va.appendChild(Yi("br"));Va.appendChild(document.createTextNode("x"))}Ki(e.measure,Va);var n=Va.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Gi(e.measure),n||1}function xt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Yi("span","xxxxxxxxxx"),n=Yi("pre",[t]);Ki(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Et(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ha},Ka?Ka.ops.push(e.curOp):e.curOp.ownsGroup=Ka={ops:[e.curOp],delayedCallbacks:[]}}function At(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new C(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function wt(e){e.updatedDisplay=e.mustUpdate&&T(e.cm,e.update)}function Tt(e){var t=e.cm,n=t.display;e.updatedDisplay&&O(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+He(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-qe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function kt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)La&&Er(e.doc,t)i.viewFrom?Bt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Bt(e);else if(t<=i.viewFrom){var a=Ut(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Bt(e)}else if(n>=i.viewTo){var a=Ut(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Bt(e)}else{var s=Ut(e,t,t,-1),o=Ut(e,n,n+r,1);s&&o?(i.view=i.view.slice(0,s.index).concat(Mt(e,s.lineN,o.lineN)).concat(i.view.slice(o.index)),i.viewTo+=r):Bt(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var a=r.view[jt(e,t)];if(null!=a.node){var s=a.changes||(a.changes=[]);Ii(s,n)==-1&&s.push(n)}}}function Bt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function jt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r0){if(a==s.length-1)return null;i=u+s[a].size-t,a++}else i=u-t;t+=i,n+=i}for(;Er(e.doc,n)!=n;){if(a==(r<0?0:s.length-1))return null;n+=r*s[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function Vt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,jt(e,n)))),r.viewTo=n}function Wt(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ds(i.scroller,"mousedown",Ot(e,zt)),ba&&xa<11?Ds(i.scroller,"dblclick",Ot(e,function(t){if(!Ti(e,t)){var n=qt(e,t);if(n&&!Zt(e,t)&&!Ht(e.display,t)){Ts(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):Ds(i.scroller,"dblclick",function(t){Ti(e,t)||Ts(t)}),Ma||Ds(i.scroller,"contextmenu",function(t){xn(e,t)});var a,s={end:0};Ds(i.scroller,"touchstart",function(t){if(!Ti(e,t)&&!n(t)){clearTimeout(a);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-s.end<=300?s:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Ds(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ds(i.scroller,"touchend",function(n){var a=i.activeTouch;if(a&&!Ht(i,n)&&null!=a.left&&!a.moved&&new Date-a.start<300){var s,o=e.coordsChar(i.activeTouch,"page");s=!a.prev||r(a,a.prev)?new pe(o,o):!a.prev.prev||r(a,a.prev.prev)?e.findWordAt(o):new pe(Ba(o.line,0),ve(e.doc,Ba(o.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),Ts(n)}t()}),Ds(i.scroller,"touchcancel",t),Ds(i.scroller,"scroll",function(){i.scroller.clientHeight&&(an(e,i.scroller.scrollTop),sn(e,i.scroller.scrollLeft,!0),Fs(e,"scroll",e))}),Ds(i.scroller,"mousewheel",function(t){on(e,t)}),Ds(i.scroller,"DOMMouseScroll",function(t){on(e,t)}),Ds(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ti(e,t)||Ps(t)},over:function(t){Ti(e,t)||(nn(e,t),Ps(t))},start:function(t){tn(e,t)},drop:Ot(e,en),leave:function(t){Ti(e,t)||rn(e)}};var o=i.input.getField();Ds(o,"keyup",function(t){vn.call(e,t)}),Ds(o,"keydown",Ot(e,dn)),Ds(o,"keypress",Ot(e,yn)),Ds(o,"focus",ji(gn,e)),Ds(o,"blur",ji(bn,e))}function Gt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var a=t.display.dragFunctions,s=n?Ds:Ns;s(t.display.scroller,"dragstart",a.start),s(t.display.scroller,"dragenter",a.enter),s(t.display.scroller,"dragover",a.over),s(t.display.scroller,"dragleave",a.leave),s(t.display.scroller,"drop",a.drop)}}function Kt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Ht(e,t){for(var n=Ai(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function qt(e,t,n,r){var i=e.display;if(!n&&"true"==Ai(t).getAttribute("cm-not-content"))return null;var a,s,o=i.lineSpace.getBoundingClientRect();try{a=t.clientX-o.left,s=t.clientY-o.top}catch(t){return null}var u,l=mt(e,a,s);if(r&&1==l.xRel&&(u=Qr(e.doc,l.line).text).length==l.ch){var c=Us(u,u.length,e.options.tabSize)-u.length;l=Ba(l.line,Math.max(0,Math.round((a-Ke(e.display).left)/xt(e.display))-c))}return l}function zt(e){var t=this,n=t.display;if(!(Ti(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,Ht(n,e))return void(Ea||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Zt(t,e)){var r=qt(t,e);switch(window.focus(),_i(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Xt(t,e,r):Ai(e)==n.scroller&&Ts(e);break;case 2:Ea&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),Ts(e);break;case 3:Ma?xn(t,e):mn(t)}}}}function Xt(e,t,n){ba?setTimeout(ji(J,e),0):e.curOp.focus=Hi();var r,i=+new Date;Ya&&Ya.time>i-400&&0==ja(Ya.pos,n)?r="triple":Wa&&Wa.time>i-400&&0==ja(Wa.pos,n)?(r="double",Ya={time:i,pos:n}):(r="single",Wa={time:i,pos:n});var a,s=e.doc.sel,o=Da?t.metaKey:t.ctrlKey;e.options.dragDrop&&eo&&!e.isReadOnly()&&"single"==r&&(a=s.contains(n))>-1&&(ja((a=s.ranges[a]).from(),n)<0||n.xRel>0)&&(ja(a.to(),n)>0||n.xRel<0)?Jt(e,t,n,o):$t(e,t,n,r,o)}function Jt(e,t,n,r){var i=e.display,a=+new Date,s=Ot(e,function(o){Ea&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ns(document,"mouseup",s),Ns(i.scroller,"drop",s),Math.abs(t.clientX-o.clientX)+Math.abs(t.clientY-o.clientY)<10&&(Ts(o),!r&&+new Date-200g&&i.push(new pe(Ba(h,g),Ba(h,Vs(m,d,a))))}i.length||i.push(new pe(n,n)),we(l,fe(f.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,x=b.anchor,E=t;if("single"!=r){if("double"==r)var A=e.findWordAt(t);else var A=new pe(Ba(t.line,0),ve(l,Ba(t.line+1,0)));ja(A.anchor,x)>0?(E=A.head,x=X(b.from(),A.anchor)):(E=A.anchor,x=z(b.to(),A.head))}var i=f.ranges.slice(0);i[p]=new pe(ve(l,x),E),we(l,fe(i,p),Bs)}}function s(t){var n=++g,i=qt(e,t,!0,"rect"==r);if(i)if(0!=ja(i,y)){e.curOp.focus=Hi(),a(i);var o=x(u,l);(i.line>=o.to||i.linem.bottom?20:0;c&&setTimeout(Ot(e,function(){g==n&&(u.scroller.scrollTop+=c,s(t))}),50)}}function o(t){e.state.selectingText=!1,g=1/0,Ts(t),u.input.focus(),Ns(document,"mousemove",b),Ns(document,"mouseup",E),l.history.lastSelOrigin=null}var u=e.display,l=e.doc;Ts(t);var c,p,f=l.sel,d=f.ranges;if(i&&!t.shiftKey?(p=l.sel.contains(n),c=p>-1?d[p]:new pe(n,n)):(c=l.sel.primary(),p=l.sel.primIndex),Oa?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(c=new pe(n,n)),n=qt(e,t,!0,!0),p=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||l.extend?be(l,c,h.anchor,h.head):h}else if("triple"==r){var v=new pe(Ba(n.line,0),ve(l,Ba(n.line+1,0)));c=e.display.shift||l.extend?be(l,c,v.anchor,v.head):v}else c=be(l,c,n);i?p==-1?(p=d.length,we(l,fe(d.concat([c]),p),{scroll:!1,origin:"*mouse"})):d.length>1&&d[p].empty()&&"single"==r&&!t.shiftKey?(we(l,fe(d.slice(0,p).concat(d.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),f=l.sel):Ae(l,p,c,Bs):(p=0,we(l,new ce([c],0),Bs),f=l.sel);var y=n,m=u.wrapper.getBoundingClientRect(),g=0,b=Ot(e,function(e){_i(e)?s(e):o(e)}),E=Ot(e,o);e.state.selectingText=E,Ds(document,"mousemove",b),Ds(document,"mouseup",E)}function Qt(e,t,n,r){try{var i=t.clientX,a=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ts(t);var s=e.display,o=s.lineDiv.getBoundingClientRect();if(a>o.bottom||!Pi(e,n))return Ei(t);a-=o.top-s.viewOffset;for(var u=0;u=i){var c=ri(e.doc,a),p=e.options.gutters[u];return Fs(e,n,e,c,p,t),Ei(t)}}}function Zt(e,t){return Qt(e,t,"gutterClick",!0)}function en(e){var t=this;if(rn(t),!Ti(t,e)&&!Ht(t.display,e)){Ts(e),ba&&(qa=+new Date);var n=qt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,o=function(e,r){if(!t.options.allowDropFileTypes||Ii(t.options.allowDropFileTypes,e.type)!=-1){var o=new FileReader;o.onload=Ot(t,function(){var e=o.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),a[r]=e,++s==i){n=ve(t.doc,n);var u={from:n,to:n,text:t.doc.splitLines(a.join(t.doc.lineSeparator())),origin:"paste"};Tn(t.doc,u),Ce(t.doc,de(n,Za(u)))}}),o.readAsText(e)}},u=0;u-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){if(t.state.draggingText&&!t.state.draggingText.copy)var l=t.listSelections();if(Te(t.doc,de(n,n)),l)for(var u=0;us.clientWidth,u=s.scrollHeight>s.clientHeight;if(r&&o||i&&u){if(i&&Da&&Ea)e:for(var l=t.target,c=a.view;l!=s;l=l.parentNode)for(var p=0;p=0;--i)kn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else kn(e,t)}}function kn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ja(t.from,t.to)){var n=_n(e,t);ci(e,t,n,e.cm?e.cm.curOp.id:NaN),On(e,t,n,sr(e,t));var r=[];Jr(e,function(e,n){n||Ii(r,e.history)!=-1||(xi(e.history,t),r.push(e.history)),On(e,t,null,sr(e,t))})}}function Pn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,a=e.sel,s="undo"==t?i.done:i.undone,o="undo"==t?i.undone:i.done,u=0;u=0;--u){var p=r.changes[u];if(p.origin=t,c&&!wn(e,p,!1))return void(s.length=0);l.push(oi(e,p));var f=u?_n(e,p):Fi(s);On(e,p,f,ur(e,p)),!u&&e.cm&&e.cm.scrollIntoView({from:p.from,to:Za(p)});var d=[];Jr(e,function(e,t){t||Ii(d,e.history)!=-1||(xi(e.history,p),d.push(e.history)),On(e,p,null,ur(e,p))})}}}}function Dn(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Mi(e.sel.ranges,function(e){return new pe(Ba(e.anchor.line+t,e.anchor.ch),Ba(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Rt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:Ba(a,Qr(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Zr(e,t.from,t.to),n||(n=_n(e,t)),e.cm?Nn(e.cm,t,r):qr(e,t,r),Te(e,n,Ls)}}function Nn(e,t,n){var r=e.doc,i=e.display,s=t.from,o=t.to,u=!1,l=s.line;e.options.lineWrapping||(l=ni(br(Qr(r,s.line))),r.iter(l,o.line+1,function(e){if(e==i.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ki(e),qr(r,t,n,a(e)),e.options.lineWrapping||(r.iter(l,s.line+t.text.length,function(e){var t=p(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,s.line),je(e,400);var c=t.text.length-(o.line-s.line)-1;t.full?Rt(e):s.line!=o.line||1!=t.text.length||Hr(e.doc,t)?Rt(e,s.line,o.line+1,c):Lt(e,s.line,"text");var f=Pi(e,"changes"),d=Pi(e,"change");
+if(d||f){var h={from:s,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&Ci(e,"change",e,h),f&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Fn(e,t,n,r,i){if(r||(r=n),ja(r,n)<0){var a=r;r=n,n=a}"string"==typeof t&&(t=e.splitLines(t)),Tn(e,{from:n,to:r,text:t,origin:i})}function In(e,t){if(!Ti(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Ta){var a=Yi("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-Ye(e.display))+"px; height: "+(t.bottom-t.top+He(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function Mn(e,t,n,r){null==r&&(r=0);for(var i=0;i<5;i++){var a=!1,s=ht(e,t),o=n&&n!=t?ht(e,n):s,u=Ln(e,Math.min(s.left,o.left),Math.min(s.top,o.top)-r,Math.max(s.left,o.left),Math.max(s.bottom,o.bottom)+r),l=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=u.scrollTop&&(an(e,u.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(a=!0)),null!=u.scrollLeft&&(sn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(a=!0)),!a)break}return s}function Rn(e,t,n,r,i){var a=Ln(e,t,n,r,i);null!=a.scrollTop&&an(e,a.scrollTop),null!=a.scrollLeft&&sn(e,a.scrollLeft)}function Ln(e,t,n,r,i){var a=e.display,s=bt(e.display);n<0&&(n=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:a.scroller.scrollTop,u=ze(e),l={};i-n>u&&(i=n+u);var c=e.doc.height+Ge(a),p=nc-s;if(no+u){var d=Math.min(n,(f?c:i)-u);d!=o&&(l.scrollTop=d)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:a.scroller.scrollLeft,v=qe(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),y=r-t>v;return y&&(r=t+v),t<10?l.scrollLeft=0:tv+h-3&&(l.scrollLeft=r+(y?0:10)-v),l}function Bn(e,t,n){null==t&&null==n||Un(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function jn(e){Un(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Ba(t.line,t.ch-1):t,r=Ba(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Un(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=vt(e,t.from),r=vt(e,t.to),i=Ln(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Vn(e,t,n,r){var i,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=We(e,t):n="prev");var s=e.options.tabSize,o=Qr(a,t),u=Us(o.text,null,s);o.stateAfter&&(o.stateAfter=null);var l,c=o.text.match(/^\s*/)[0];if(r||/\S/.test(o.text)){if("smart"==n&&(l=a.mode.indent(i,o.text.slice(c.length),o.text),l==Rs||l>150)){if(!r)return;n="prev"}}else l=0,n="not";"prev"==n?l=t>a.first?Us(Qr(a,t-1).text,null,s):0:"add"==n?l=u+e.options.indentUnit:"subtract"==n?l=u-e.options.indentUnit:"number"==typeof n&&(l=u+n),l=Math.max(0,l);var p="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(l/s);d;--d)f+=s,p+="\t";if(f=0;t--)Fn(e.doc,"",r[t].from,r[t].to,"+delete");jn(e)})}function Gn(e,t,n,r,i){function a(){var t=o+n;return!(t=e.first+e.size)&&(o=t,c=Qr(e,t))}function s(e){var t=(i?fa:da)(c,u,n,!0);if(null==t){if(e||!a())return!1;u=i?(n<0?aa:ia)(c):n<0?c.text.length:0}else u=t;return!0}var o=t.line,u=t.ch,l=n,c=Qr(e,o);if("char"==r)s();else if("column"==r)s(!0);else if("word"==r||"group"==r)for(var p=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||s(!h);h=!1){var v=c.text.charAt(u)||"\n",y=Ui(v,d)?"w":f&&"\n"==v?"n":!f||/\s/.test(v)?null:"p";if(!f||h||y||(y="s"),p&&p!=y){n<0&&(n=1,s());break}if(y&&(p=y),n>0&&!s(!h))break}var m=Ne(e,Ba(o,u),t,l,!0);return ja(t,m)||(m.hitSide=!0),m}function Kn(e,t,n,r){var i,a=e.doc,s=t.left;if("page"==r){var o=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(o-(n<0?1.5:.5)*bt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var u=mt(e,s,i);if(!u.outside)break;if(n<0?i<=0:i>=a.height){u.hitSide=!0;break}i+=5*n}return u}function Hn(t,n,r,i){e.defaults[t]=n,r&&(ts[t]=i?function(e,t,n){n!=ns&&r(e,t,n)}:r)}function qn(e){for(var t,n,r,i,a=e.split(/-(?!$)/),e=a[a.length-1],s=0;s0||0==s&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=Yi("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(gr(e,t.line,t,n,a)||t.line!=n.line&&gr(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");La=!0}a.addToHistory&&ci(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var o,u=t.line,l=e.cm;if(e.iter(u,n.line+1,function(e){l&&a.collapsed&&!l.options.lineWrapping&&br(e)==l.display.maxLine&&(o=!0),a.collapsed&&u!=t.line&&ti(e,0),rr(e,new er(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(t){_r(e,t)&&ti(t,0)}),a.clearOnEnter&&Ds(a,"beforeCursorEnter",function(){a.clear()}),a.readOnly&&(Ra=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ys,a.atomic=!0),l){if(o&&(l.curOp.updateMaxLine=!0),a.collapsed)Rt(l,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var c=t.line;c<=n.line;c++)Lt(l,c,"text");a.atomic&&Pe(l.doc),Ci(l,"markerAdded",l,a)}return a}function Jn(e,t,n,r,i){r=Bi(r),r.shared=!1;var a=[Xn(e,t,n,r,i)],s=a[0],o=r.widgetNode;return Jr(e,function(e){o&&(r.widgetNode=o.cloneNode(!0)),a.push(Xn(e,ve(e,t),ve(e,n),r,i));for(var u=0;u=t:a.to>t);(r||(r=[])).push(new er(s,a.from,u?null:a.to))}}return r}function ar(e,t,n){if(e)for(var r,i=0;i=t:a.to>t);if(o||a.from==t&&"bookmark"==s.type&&(!n||a.marker.insertLeft)){var u=null==a.from||(s.inclusiveLeft?a.from<=t:a.from0&&o)for(var p=0;p0)){var c=[u,1],p=ja(l.from,o.from),f=ja(l.to,o.to);(p<0||!s.inclusiveLeft&&!p)&&c.push({from:l.from,to:o.from}),(f>0||!s.inclusiveRight&&!f)&&c.push({from:o.to,to:l.to}),i.splice.apply(i,c),u+=c.length-1}}return i}function cr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&p<=0||c<=0&&p>=0)&&(c<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ja(l.to,n)>=0:ja(l.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ja(l.from,r)<=0:ja(l.from,r)<0)))return!0}}}function br(e){for(var t;t=yr(e);)e=t.find(-1,!0).line;return e}function xr(e){for(var t,n;t=mr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Er(e,t){var n=Qr(e,t),r=br(n);return n==r?t:ni(r)}function Ar(e,t){if(t>e.lastLine())return t;var n,r=Qr(e,t);if(!_r(e,r))return t;for(;n=mr(r);)r=n.find(1,!0).line;return ni(r)+1}function _r(e,t){var n=La&&t.markedSpans;if(n)for(var r,i=0;in.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function Fr(e,t,n,r){function i(e){return{start:p.start,end:p.pos,string:p.current(),type:a||null,state:e?us(s.mode,c):c}}var a,s=e.doc,o=s.mode;t=ve(s,t);var u,l=Qr(s,t.line),c=We(e,t.line,n),p=new vs(l.text,e.options.tabSize);for(r&&(u=[]);(r||p.pose.options.maxHighlightLength?(o=!1,s&&Lr(e,t,r,p.pos),p.pos=t.length,u=null):u=Dr(Nr(n,p,r,f),a),f){var d=f[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!o||c!=u){for(;le&&i.splice(u,1,e,i[u+1],r),u+=2,l=Math.min(e,r)}if(t)if(o.opaque)i.splice(n,u-n,e,"cm-overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength?us(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Lr(e,t,n,r){var i=e.doc.mode,a=new vs(t,e.options.tabSize);for(a.start=a.pos=r||0,""==t&&Or(i,n);!a.eol();)Nr(i,a,n),a.start=a.pos}function Br(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?As:Es;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function jr(e,t){var n=Yi("span",null,null,Ea?"padding-right: .1px":null),r={pre:Yi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(ba||Ea)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a,s=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Vr,Zi(e.display.measure)&&(a=ai(s))&&(r.addToken=Yr(r.addToken,a)),r.map=[];var o=t!=e.display.externalMeasured&&ni(s);Kr(s,r,Rr(e,s,o)),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=zi(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=zi(s.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Qi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Ea){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Fs(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=zi(r.pre.className,r.textClass||"")),r}function Ur(e){var t=Yi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Vr(e,t,n,r,i,a,s){if(t){var o=e.splitSpaces?Wr(t,e.trailingSpace):t,u=e.cm.state.specialChars,l=!1;if(u.test(t))for(var c=document.createDocumentFragment(),p=0;;){u.lastIndex=p;var f=u.exec(t),d=f?f.index-p:t.length-p;if(d){var h=document.createTextNode(o.slice(p,p+d));ba&&xa<9?c.appendChild(Yi("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+d,h),e.col+=d,e.pos+=d}if(!f)break;if(p+=d+1,"\t"==f[0]){var v=e.cm.options.tabSize,y=v-e.col%v,h=c.appendChild(Yi("span",Ni(y),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text","\t"),e.col+=y}else if("\r"==f[0]||"\n"==f[0]){var h=c.appendChild(Yi("span","\r"==f[0]?"␍":"","cm-invalidchar"));h.setAttribute("cm-text",f[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(f[0]);h.setAttribute("cm-text",f[0]),ba&&xa<9?c.appendChild(Yi("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(o);e.map.push(e.pos,e.pos+t.length,c),ba&&xa<9&&(l=!0),e.pos+=t.length}if(e.trailingSpace=32==o.charCodeAt(t.length-1),n||r||i||l||s){var m=n||"";r&&(m+=r),i&&(m+=i);var g=Yi("span",[c],m,s);return a&&(g.title=a),e.content.appendChild(g)}e.content.appendChild(c)}}function Wr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;il&&f.from<=l)break}if(f.to>=c)return e(n,r,i,a,s,o,u);e(n,r.slice(0,f.to-l),i,a,null,o,u),a=null,r=r.slice(f.to-l),l=f.to}}}function Gr(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Kr(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var s,o,u,l,c,p,f,d=i.length,h=0,v=1,y="",m=0;;){if(m==h){u=l=c=p=o="",f=null,m=1/0;for(var g,b=[],x=0;xh||A.collapsed&&E.to==h&&E.from==h)?(null!=E.to&&E.to!=h&&m>E.to&&(m=E.to,l=""),A.className&&(u+=" "+A.className),A.css&&(o=(o?o+";":"")+A.css),A.startStyle&&E.from==h&&(c+=" "+A.startStyle),A.endStyle&&E.to==m&&(g||(g=[])).push(A.endStyle,E.to),A.title&&!p&&(p=A.title),A.collapsed&&(!f||hr(f.marker,A)<0)&&(f=E)):E.from>h&&m>E.from&&(m=E.from)}if(g)for(var x=0;x=d)break;for(var _=Math.min(d,m);;){if(y){var S=h+y.length;if(!f){var C=S>_?y.slice(0,_-h):y;t.addToken(t,C,s?s+u:u,c,h+C.length==m?l:"",p,o)}if(S>=_){y=y.slice(_-h),h=_;break}h=S,c=""}y=i.slice(a,a=n[v++]),s=Br(n[v++],t.cm.options)}}else for(var v=1;v1&&e.remove(o.line+1,h-1),e.insert(o.line+1,v)}Ci(e,"change",e,t)}function zr(e){this.lines=e,this.parent=null;for(var t=0,n=0;t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Fi(e.done)):void 0}function ci(e,t,n,r){var i=e.history;i.undone.length=0;var a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(a=li(i,i.lastOp==r))){var o=Fi(a.changes);0==ja(t.from,t.to)&&0==ja(t.from,o.to)?o.to=Za(t):a.changes.push(oi(e,t))}else{var u=Fi(i.done);for(u&&u.ranges||di(e.sel,i.done),a={changes:[oi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||Fs(e,"historyAdded")}function pi(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fi(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||pi(e,a,Fi(i.done),t))?i.done[i.done.length-1]=t:di(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&ui(i.undone)}function di(e,t){var n=Fi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function hi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a})}function vi(e){if(!e)return null;for(var t,n=0;n-1&&(Fi(o)[p]=c[p],delete c[p])}}}return i}function gi(e,t,n,r){n0?r.slice():Os:r||Os}function Ci(e,t){function n(e){return function(){e.apply(null,a)}}var r=Si(e,t,!1);if(r.length){var i,a=Array.prototype.slice.call(arguments,2);Ka?i=Ka.delayedCallbacks:Is?i=Is:(i=Is=[],setTimeout(wi,0));for(var s=0;s0}function Di(e){e.prototype.on=function(e,t){Ds(this,e,t)},e.prototype.off=function(e,t){Ns(this,e,t)}}function Oi(){this.id=null}function Ni(e){for(;Ws.length<=e;)Ws.push(Fi(Ws)+" ");return Ws[e]}function Fi(e){return e[e.length-1]}function Ii(e,t){for(var n=0;n-1&&Hs(e))||t.test(e):Hs(e)}function Vi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Wi(e){return e.charCodeAt(0)>=768&&qs.test(e)}function Yi(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a0;--t)e.removeChild(e.firstChild);return e}function Ki(e,t){return Gi(e).appendChild(t)}function Hi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function qi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function zi(e,t){for(var n=e.split(" "),r=0;r2&&!(ba&&xa<8))}var n=Xs?Yi("span",""):Yi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Zi(e){if(null!=Js)return Js;var t=Ki(e,document.createTextNode("AخA")),n=Gs(t,0,1).getBoundingClientRect(),r=Gs(t,1,2).getBoundingClientRect();return Gi(e),!(!n||n.left==n.right)&&(Js=r.right-n.right<3)}function ea(e){if(null!=io)return io;var t=Ki(e,Yi("span","x")),n=t.getBoundingClientRect(),r=Gs(t,0,1).getBoundingClientRect();return io=Math.abs(n.left-r.left)>1}function ta(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,a=0;at||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function na(e){return e.level%2?e.to:e.from}function ra(e){return e.level%2?e.from:e.to}function ia(e){var t=ai(e);return t?na(t[0]):0}function aa(e){var t=ai(e);return t?ra(Fi(t)):e.text.length}function sa(e,t){var n=Qr(e.doc,t),r=br(n);r!=n&&(t=ni(r));var i=ai(r),a=i?i[0].level%2?aa(r):ia(r):0;return Ba(t,a)}function oa(e,t){for(var n,r=Qr(e.doc,t);n=mr(r);)r=n.find(1,!0).line,t=null;var i=ai(r),a=i?i[0].level%2?ia(r):aa(r):r.text.length;return Ba(null==t?ni(r):t,a)}function ua(e,t){var n=sa(e,t.line),r=Qr(e.doc,n.line),i=ai(r);if(!i||0==i[0].level){var a=Math.max(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=a&&t.ch;return Ba(n.line,s?0:a)}return n}function la(e,t,n){var r=e[0].level;return t==r||n!=r&&tt)return r;if(i.from==t||i.to==t){if(null!=n)return la(e,i.level,e[n].level)?(i.from!=i.to&&(so=n),r):(i.from!=i.to&&(so=r),n);n=r}}return n}function pa(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Wi(e.text.charAt(t)));return t}function fa(e,t,n,r){var i=ai(e);if(!i)return da(e,t,n,r);for(var a=ca(i,t),s=i[a],o=pa(e,t,s.level%2?-n:n,r);;){if(o>s.from&&o0==s.level%2?s.to:s.from);if(s=i[a+=n],!s)return null;o=n>0==s.level%2?pa(e,s.to,-1,r):pa(e,s.from,1,r)}}function da(e,t,n,r){var i=t+n;if(r)for(;i>0&&Wi(e.text.charAt(i));)i+=n;return i<0||i>e.text.length?null:i}var ha=navigator.userAgent,va=navigator.platform,ya=/gecko\/\d/i.test(ha),ma=/MSIE \d/.test(ha),ga=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ha),ba=ma||ga,xa=ba&&(ma?document.documentMode||6:ga[1]),Ea=/WebKit\//.test(ha),Aa=Ea&&/Qt\/\d+\.\d+/.test(ha),_a=/Chrome\//.test(ha),Sa=/Opera\//.test(ha),Ca=/Apple Computer/.test(navigator.vendor),wa=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ha),Ta=/PhantomJS/.test(ha),ka=/AppleWebKit/.test(ha)&&/Mobile\/\w+/.test(ha),Pa=ka||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ha),Da=ka||/Mac/.test(va),Oa=/\bCrOS\b/.test(ha),Na=/win/i.test(va),Fa=Sa&&ha.match(/Version\/(\d*\.\d*)/);
+Fa&&(Fa=Number(Fa[1])),Fa&&Fa>=15&&(Sa=!1,Ea=!0);var Ia=Da&&(Aa||Sa&&(null==Fa||Fa<12.11)),Ma=ya||ba&&xa>=9,Ra=!1,La=!1;v.prototype=Bi({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+a+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Da&&!wa?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Oi,this.disableVert=new Oi},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},v.prototype),y.prototype=Bi({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},y.prototype),e.scrollbarModel={"native":v,"null":y},C.prototype.signal=function(e,t){Pi(e,t)&&this.events.push(arguments)},C.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ds(a,"paste",function(e){Ti(r,e)||Q(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Ds(a,"cut",t),Ds(a,"copy",t),Ds(e.scroller,"paste",function(t){Ht(e,t)||Ti(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Ds(e.lineSpace,"selectstart",function(t){Ht(e,t)||Ts(t)}),Ds(a,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ds(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=Me(e);if(e.options.moveInputWithCursor){var i=ht(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-a.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Ki(n.cursorDiv,e.cursors),Ki(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var a=i.sel.primary();t=ro&&(a.to().line-a.from().line>100||(n=r.getSelection()).length>1e3);var s=t?"-":n||r.getSelection();this.textarea.value=s,r.state.focused&&Ys(this.textarea),ba&&xa>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",ba&&xa>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Pa||Hi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||no(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(ba&&xa>=9&&this.hasSelection===r||Da&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(n.length,r.length);a1e3||r.indexOf("\n")>-1?t.value=o.prevInput="":o.prevInput=r,o.composing&&(o.composing.range.clear(),o.composing.range=e.markText(o.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){ba&&xa>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=s.selectionStart){var e=i.somethingSelected(),t=""+(e?s.value:"");s.value="⇚",s.value=t,r.prevInput=e?"":"",s.selectionStart=1,s.selectionEnd=t.length,a.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=p,s.style.cssText=c,ba&&xa<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=u),null!=s.selectionStart){(!ba||ba&&xa<9)&&t();var e=0,n=function(){a.selForContextMenu==i.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&""==r.prevInput?Ot(i,cs.selectAll)(i):e++<10?a.detectingSelectAll=setTimeout(n,500):a.input.reset()};a.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,a=i.display,s=r.textarea,o=qt(i,e),u=a.scroller.scrollTop;if(o&&!Sa){var l=i.options.resetSelectionOnContextMenu;l&&i.doc.sel.contains(o)==-1&&Ot(i,we)(i.doc,de(o),Ls);var c=s.style.cssText,p=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f=r.wrapper.getBoundingClientRect();if(s.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px; z-index: 1000; background: "+(ba?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Ea)var d=window.scrollY;if(a.input.focus(),Ea&&window.scrollTo(null,d),a.input.reset(),i.somethingSelected()||(s.value=r.prevInput=" "),r.contextMenuPending=!0,a.selForContextMenu=i.doc.sel,clearTimeout(a.detectingSelectAll),ba&&xa>=9&&t(),Ma){Ps(e);var h=function(){Ns(window,"mouseup",h),setTimeout(n,20)};Ds(window,"mouseup",h)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Ri,needsContentAttribute:!1},ne.prototype),ie.prototype=Bi({init:function(e){function t(e){if(!Ti(r,e)){if(r.somethingSelected())Ua={lineWise:!1,text:r.getSelections()},"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Ua={lineWise:!0,text:t.text},"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ls),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!ka)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Ua.text.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Ua.text.join("\n");var a=document.activeElement;Ys(i),setTimeout(function(){r.display.lineSpace.removeChild(n),a.focus()},50)}}}var n=this,r=n.cm,i=n.div=e.lineDiv;te(i),Ds(i,"paste",function(e){Ti(r,e)||Q(e,r)}),Ds(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),a=r.getLine(i.head.line),s=a.indexOf(t,Math.max(0,i.head.ch-t.length));s>-1&&s<=i.head.ch&&(n.composing.sel=de(Ba(i.head.line,s),Ba(i.head.line,s+t.length)))}}),Ds(i,"compositionupdate",function(e){n.composing.data=e.data}),Ds(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ds(i,"touchstart",function(){n.forceCompositionEnd()}),Ds(i,"input",function(){n.composing||!r.isReadOnly()&&n.pollContent()||Dt(n.cm,function(){Rt(r)})}),Ds(i,"copy",t),Ds(i,"cut",t)},prepareSelection:function(){var e=Me(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=oe(this.cm,e.anchorNode,e.anchorOffset),r=oe(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=ja(X(n,r),t.from())||0!=ja(z(n,r),t.to())){var i=ae(this.cm,t.from()),a=ae(this.cm,t.to());if(i||a){var s=this.cm.display.view,o=e.rangeCount&&e.getRangeAt(0);if(i){if(!a){var u=s[s.length-1].measure,l=u.maps?u.maps[u.maps.length-1]:u.map;a={node:l[l.length-1],offset:l[l.length-2]-l[l.length-3]}}}else i={node:s[0].measure.map[2],offset:0};try{var c=Gs(i.node,i.offset,a.offset,a.node)}catch(p){}c&&(!ya&&this.cm.state.focused?(e.collapse(i.node,i.offset),c.collapsed||e.addRange(c)):(e.removeAllRanges(),e.addRange(c)),o&&null==e.anchorNode?e.addRange(o):ya&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Ki(this.cm.display.cursorDiv,e.cursors),Ki(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return zs(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Dt(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=oe(t,e.anchorNode,e.anchorOffset),r=oe(t,e.focusNode,e.focusOffset);n&&r&&Dt(t,function(){we(t.doc,de(n,r),Ls),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var a;if(r.line==t.viewFrom||0==(a=jt(e,r.line)))var s=ni(t.view[0].line),o=t.view[0].node;else var s=ni(t.view[a].line),o=t.view[a-1].node.nextSibling;var u=jt(e,i.line);if(u==t.view.length-1)var l=t.viewTo-1,c=t.lineDiv.lastChild;else var l=ni(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling;for(var p=e.doc.splitLines(le(e,o,c,s,l)),f=Zr(e.doc,Ba(s,0),Ba(l,Qr(e.doc,l).text.length));p.length>1&&f.length>1;)if(Fi(p)==Fi(f))p.pop(),f.pop(),l--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),s++}for(var d=0,h=0,v=p[0],y=f[0],m=Math.min(v.length,y.length);d1||p[0]||ja(E,A)?(Fn(e.doc,p,E,A,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Ot(this.cm,Rt)(this.cm):e.data&&e.data!=e.startData&&Ot(this.cm,$)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Ot(this.cm,$)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Ri,resetPosition:Ri,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&ja(e,r.to())<=0)return n}return-1}},pe.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return z(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Va,Wa,Ya,Ga={left:0,right:0,top:0,bottom:0},Ka=null,Ha=0,qa=0,za=0,Xa=null;ba?Xa=-.53:ya?Xa=15:_a?Xa=-.7:Ca&&(Xa=-1/3);var Ja=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Ja(e);return t.x*=Xa,t.y*=Xa,t};var $a=new Oi,Qa=null,Za=e.changeEnd=function(e){return e.text?Ba(e.from.line+e.text.length-1,Fi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,ts.hasOwnProperty(e)&&Ot(this,ts[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](zn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Vn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&jn(this));else{var a=i.from(),s=i.to(),o=Math.max(n,a.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var u=o;u0&&Ae(this.doc,r,new pe(a,l[r].to()),Ls)}}}),getTokenAt:function(e,t){return Fr(this,e,t)},getLineTokens:function(e,t){return Fr(this,Ba(e),t,!0)},getTokenTypeAt:function(e){e=ve(this.doc,e);var t,n=Rr(this,Qr(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=a)i=s;else{if(!(n[2*s+1]i&&(e=i,r=!0),n=Qr(this.doc,e)}else n=e;return pt(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ii(n):0)},defaultTextHeight:function(){return bt(this.display)},defaultCharWidth:function(){return xt(this.display)},setGutterMarker:Nt(function(e,t,n){return Wn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Vi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Nt(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Lt(t,r,"gutter"),Vi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!me(this.doc,e))return null;var t=e;if(e=Qr(this.doc,e),!e)return null}else{var t=ni(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a=this.display;e=ht(this,ve(this.doc,e));var s=e.bottom,o=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var u=Math.max(a.wrapper.clientHeight,this.doc.height),l=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(s=e.bottom),o+t.offsetWidth>l&&(o=l-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(o=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?o=0:"middle"==i&&(o=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=o+"px"),n&&Rn(this,o,s,o+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Nt(dn),triggerOnKeyPress:Nt(yn),triggerOnKeyUp:vn,execCommand:function(e){if(cs.hasOwnProperty(e))return cs[e].call(null,this)},triggerElectric:Nt(function(e){Z(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=0,s=ve(this.doc,e);a0&&o(n.charAt(r-1));)--r;for(;i.5)&&s(this),Fs(this,"refresh",this)}),swapDoc:Nt(function(e){var t=this.doc;return t.cm=null,$r(this,e),ut(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ci(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Di(e);var es=e.defaults={},ts=e.optionHandlers={},ns=e.Init={toString:function(){return"CodeMirror.Init"}};Hn("value","",function(e,t){e.setValue(t)},!0),Hn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Hn("indentUnit",2,n,!0),Hn("indentWithTabs",!1),Hn("smartIndent",!0),Hn("tabSize",4,function(e){r(e),ut(e),Rt(e)},!0),Hn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(a==-1)break;i=a+t.length,n.push(Ba(r,a))}r++});for(var i=n.length-1;i>=0;i--)Fn(e.doc,t,n[i],Ba(n[i].line,n[i].ch+t.length))}}),Hn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),r!=e.Init&&t.refresh()}),Hn("specialCharPlaceholder",Ur,function(e){e.refresh()},!0),Hn("electricChars",!0),Hn("inputStyle",Pa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Hn("rtlMoveVisually",!Na),Hn("wholeLineUpdateBefore",!0),Hn("theme","default",function(e){o(e),u(e)},!0),Hn("keyMap","default",function(t,n,r){var i=zn(n),a=r!=e.Init&&zn(r);a&&a.detach&&a.detach(t,i),i.attach&&i.attach(t,a||null)}),Hn("extraKeys",null),Hn("lineWrapping",!1,i,!0),Hn("gutters",[],function(e){d(e.options),u(e)},!0),Hn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?S(e.display)+"px":"0",e.refresh()},!0),Hn("coverGutterNextToScrollbar",!1,function(e){g(e)},!0),Hn("scrollbarStyle","native",function(e){m(e),g(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Hn("lineNumbers",!1,function(e){d(e.options),u(e)},!0),Hn("firstLineNumber",1,u,!0),Hn("lineNumberFormatter",function(e){return e},u,!0),Hn("showCursorWhenSelecting",!1,Ie,!0),Hn("resetSelectionOnContextMenu",!0),Hn("lineWiseCopyCut",!0),Hn("readOnly",!1,function(e,t){"nocursor"==t?(bn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Hn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Hn("dragDrop",!0,Gt),Hn("allowDropFileTypes",null),Hn("cursorBlinkRate",530),Hn("cursorScrollMargin",0),Hn("cursorHeight",1,Ie,!0),Hn("singleCursorHeightPerLine",!0,Ie,!0),Hn("workTime",100),Hn("workDelay",100),Hn("flattenSpans",!0,r,!0),Hn("addModeClass",!1,r,!0),Hn("pollInterval",100),Hn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Hn("historyEventDelay",1250),Hn("viewportMargin",10,function(e){e.refresh()},!0),Hn("maxHighlightLength",1e4,r,!0),Hn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Hn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Hn("autofocus",null);var rs=e.modes={},is=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),rs[t]=n},e.defineMIME=function(e,t){is[e]=t},e.resolveMode=function(t){if("string"==typeof t&&is.hasOwnProperty(t))t=is[t];else if(t&&"string"==typeof t.name&&is.hasOwnProperty(t.name)){var n=is[t.name];"string"==typeof n&&(n={name:n}),t=Li(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=rs[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(as.hasOwnProperty(n.name)){var a=as[n.name];for(var s in a)a.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=a[s])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var s in n.modeProps)i[s]=n.modeProps[s];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var as=e.modeExtensions={};e.extendMode=function(e,t){var n=as.hasOwnProperty(e)?as[e]:as[e]={};Bi(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Ss.prototype[e]=t},e.defineOption=Hn;var ss=[];e.defineInitHook=function(e){ss.push(e)};var os=e.helpers={};e.registerHelper=function(t,n,r){os.hasOwnProperty(t)||(os[t]=e[t]={_global:[]}),os[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),os[t]._global.push({pred:r,val:i})};var us=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},ls=e.startState=function(e,t,n){return!e.startState||e.startState(t,n)};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var cs=e.commands={selectAll:function(e){e.setSelection(Ba(e.firstLine(),0),Ba(e.lastLine()),Ls)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ls)},killLine:function(e){Yn(e,function(t){if(t.empty()){var n=Qr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Ba(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Ba(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=Qr(e.doc,i.line-1).text;s&&e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),Ba(i.line-1,s.length-1),Ba(i.line,1),"+transpose")}n.push(new pe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){Dt(e,function(){for(var t=e.listSelections().length,n=0;n=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},a=this.string.substr(this.pos,e.length);if(i(a)==i(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ys=0,ms=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ys};Di(ms),ms.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Et(e),Pi(this,"clear")){var n=this.find();n&&Ci(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Rt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Pe(e.doc)),e&&Ci(e,"markerCleared",e,this),t&&_t(e),this.parent&&this.parent.clear()}},ms.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;i